# $NetBSD: Makefile.common,v 1.6 2023/02/12 12:17:12 tnn Exp $ # used by graphics/freeimage/Makefile # used by graphics/freeimageplus/Makefile # Remember to bump both PKGNAMEs when you change this. DISTNAME= FreeImage3180 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/} EXTRACT_SUFX= .zip HOMEPAGE= https://freeimage.sourceforge.io/ LICENSE= gnu-gpl-v2 OR gnu-gpl-v3 OR mpl-1.0 USE_LANGUAGES+= c c++11 USE_TOOLS+= gmake pkg-config WRKSRC= ${WRKDIR}/FreeImage MAKE_FLAGS+= INCDIR=${DESTDIR}/${PREFIX}/include MAKE_FLAGS+= INSTALLDIR=${DESTDIR}/${PREFIX}/lib PATCHDIR= ${.CURDIR}/../../graphics/freeimage/patches DISTINFO_FILE= ${.CURDIR}/../../graphics/freeimage/distinfo INSTALLATION_DIRS+= include lib share/doc/${PKGBASE} # Systems that use unzip from pkgsrc end up with DOS line endings, so # we need to ensure files can be patched. SUBST_CLASSES+= cr SUBST_STAGE.cr= post-extract SUBST_FILES.cr+= Source/FreeImage/PluginBMP.cpp SUBST_FILES.cr+= Source/FreeImage/PluginDDS.cpp SUBST_FILES.cr+= Source/FreeImage/PluginTIFF.cpp SUBST_FILTER_CMD.cr= ${SETENV} LC_ALL=C ${TR} -d '\r' SUBST_NOOP_OK.cr= yes pre-configure: # G3 and JPEGTransform can't be built, # due to using private headers in bundled libs cd ${WRKSRC} && ${RM} -r Source/Lib* \ Source/ZLib \ Source/OpenEXR \ Source/FreeImage/PluginG3.cpp \ Source/FreeImage/PluginJXR.cpp \ Source/FreeImageToolkit/JPEGTransform.cpp cd ${WRKSRC} && ${SH} gensrclist.sh cd ${WRKSRC} && ${SH} genfipsrclist.sh ${SED} \ -e 's| \./Source/FreeImage/PluginG3\.cpp||g' \ -e 's| \./Source/FreeImage/PluginJXR\.cpp||g' \ -e 's| \./Source/FreeImageToolkit/JPEGTransform\.cpp||g' \ ${WRKSRC}/Makefile.srcs > ${WRKSRC}/Makefile.srcs.new ${MV} ${WRKSRC}/Makefile.srcs.new ${WRKSRC}/Makefile.srcs PLIST_SUBST+= PKGVERSION_NOREV=${PKGVERSION_NOREV} NOT_FOR_PLATFORM= Darwin-*-* .include "../../graphics/libraw/buildlink3.mk" .include "../../graphics/libwebp/buildlink3.mk" .include "../../graphics/openexr/buildlink3.mk" .include "../../graphics/openjpeg/buildlink3.mk" .include "../../graphics/png/buildlink3.mk" BUILDLINK_API_DEPENDS.tiff+= tiff>=4.4.0 .include "../../graphics/tiff/buildlink3.mk" .include "../../mk/jpeg.buildlink3.mk"