diff options
author | nia <nia@pkgsrc.org> | 2020-05-25 12:24:37 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-05-25 12:24:37 +0000 |
commit | 07c72e96868ab6bab7ad5e1b21292e550d0230a1 (patch) | |
tree | 02777f0f017fedd108f75772a13a15a0ad15cfb6 | |
parent | 96340733cf67703de57b364515227733b62bf04b (diff) | |
download | pkgsrc-07c72e96868ab6bab7ad5e1b21292e550d0230a1.tar.gz |
freeimage*: Generalize packages. Unbreak freeimageplus.
-rw-r--r-- | graphics/freeimage/Makefile | 46 | ||||
-rw-r--r-- | graphics/freeimage/Makefile.common | 55 | ||||
-rw-r--r-- | graphics/freeimage/distinfo | 5 | ||||
-rw-r--r-- | graphics/freeimage/patches/patch-Makefile.fip | 50 | ||||
-rw-r--r-- | graphics/freeimage/patches/patch-Makefile.gnu | 18 | ||||
-rw-r--r-- | graphics/freeimageplus/Makefile | 47 | ||||
-rw-r--r-- | graphics/freeimageplus/PLIST | 9 |
7 files changed, 122 insertions, 108 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile index 9c0f003475d..561eafa7c8b 100644 --- a/graphics/freeimage/Makefile +++ b/graphics/freeimage/Makefile @@ -1,53 +1,13 @@ -# $NetBSD: Makefile,v 1.13 2020/05/21 20:53:42 ryoon Exp $ +# $NetBSD: Makefile,v 1.14 2020/05/25 12:24:37 nia Exp $ + +.include "Makefile.common" -DISTNAME= FreeImage3180 PKGNAME= freeimage-3.18.0 PKGREVISION= 2 -CATEGORIES= graphics -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/} -EXTRACT_SUFX= .zip MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= https://freeimage.sf.net/ COMMENT= Library for supporting PNG, BMP, JPEG, and TIFF -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_FILE= Makefile.gnu -INSTALLATION_DIRS+= include lib share/doc/${PKGBASE} - -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" -.include "../../graphics/tiff/buildlink3.mk" -.include "../../mk/jpeg.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/freeimage/Makefile.common b/graphics/freeimage/Makefile.common new file mode 100644 index 00000000000..d9a620d2368 --- /dev/null +++ b/graphics/freeimage/Makefile.common @@ -0,0 +1,55 @@ +# $NetBSD: Makefile.common,v 1.1 2020/05/25 12:24:37 nia 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.sf.net/ +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} + +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" +.include "../../graphics/tiff/buildlink3.mk" +.include "../../mk/jpeg.buildlink3.mk" diff --git a/graphics/freeimage/distinfo b/graphics/freeimage/distinfo index 5d6b2a9522f..ae6a15fab0f 100644 --- a/graphics/freeimage/distinfo +++ b/graphics/freeimage/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.9 2020/05/14 16:42:13 nia Exp $ +$NetBSD: distinfo,v 1.10 2020/05/25 12:24:37 nia Exp $ SHA1 (FreeImage3180.zip) = 38daa9d8f1bca2330a2eaa42ec66fbe6ede7dce9 RMD160 (FreeImage3180.zip) = b791715fccf49355a3cb27b6250d8ed809c2454e SHA512 (FreeImage3180.zip) = 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 Size (FreeImage3180.zip) = 7415716 bytes -SHA1 (patch-Makefile.gnu) = 1aa31ec7566565e9e59d06bfa2cd729500a0d2cb +SHA1 (patch-Makefile.fip) = f16e2f589f9433472cd67e5485f7c34ed30a887e +SHA1 (patch-Makefile.gnu) = f3528c8004ccab5067d9957387f6686ea8cef58a SHA1 (patch-Source_FreeImage.h) = 9b648a8734a0c3391850e2dd7eaa501d29e99689 SHA1 (patch-Source_FreeImageToolkit_JPEGTransform.cpp) = 4e7372c8947b4359de4d428bcfcfa2f55210f2e8 SHA1 (patch-Source_FreeImage_J2KHelper.cpp) = a479a373f5a584978129c00d723251a784210603 diff --git a/graphics/freeimage/patches/patch-Makefile.fip b/graphics/freeimage/patches/patch-Makefile.fip new file mode 100644 index 00000000000..1dbf1b86530 --- /dev/null +++ b/graphics/freeimage/patches/patch-Makefile.fip @@ -0,0 +1,50 @@ +$NetBSD: patch-Makefile.fip,v 1.5 2020/05/25 12:24:37 nia Exp $ + +- Unbundle image libraries. +- Link with CXX for libstdc++. +- Fix installation. + +--- Makefile.fip.orig 2015-03-10 09:03:56.000000000 +0000 ++++ Makefile.fip +@@ -13,6 +13,9 @@ DOS2UNIX = dos2unix + + LIBRARIES = -lstdc++ + ++INCLUDE += $(shell pkg-config --cflags libjpeg OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++LDFLAGS += $(shell pkg-config --libs libjpeg OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++ + MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden +@@ -28,10 +31,8 @@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis + CXXFLAGS += -D__ANSI__ + CXXFLAGS += $(INCLUDE) + +-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) +- CFLAGS += -fPIC +- CXXFLAGS += -fPIC +-endif ++CFLAGS += -fPIC ++CXXFLAGS += -fPIC + + TARGET = freeimageplus + STATICLIB = lib$(TARGET).a +@@ -68,14 +69,12 @@ $(STATICLIB): $(MODULES) + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) ++ $(CXX) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES) + + install: +- install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ $(BSD_INSTALL_DATA) $(HEADERFIP) $(INCDIR) ++ $(BSD_INSTALL_LIB) $(STATICLIB) $(INSTALLDIR) ++ $(BSD_INSTALL_LIB) $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + diff --git a/graphics/freeimage/patches/patch-Makefile.gnu b/graphics/freeimage/patches/patch-Makefile.gnu index e2f8fe52c45..a458a35c748 100644 --- a/graphics/freeimage/patches/patch-Makefile.gnu +++ b/graphics/freeimage/patches/patch-Makefile.gnu @@ -1,22 +1,12 @@ -$NetBSD: patch-Makefile.gnu,v 1.1 2020/05/14 16:42:14 nia Exp $ +$NetBSD: patch-Makefile.gnu,v 1.2 2020/05/25 12:24:37 nia Exp $ -- Use pkgsrc directories. -- Link with CXX for libstdc++. - Unbundle image libraries. +- Link with CXX for libstdc++. +- Fix installation. --- Makefile.gnu.orig 2015-03-10 09:04:00.000000000 +0000 +++ Makefile.gnu -@@ -5,14 +5,17 @@ include Makefile.srcs - - # General configuration variables: - DESTDIR ?= / --INCDIR ?= $(DESTDIR)/usr/include --INSTALLDIR ?= $(DESTDIR)/usr/lib -+INCDIR ?= $(DESTDIR)/$(PREFIX)/include -+INSTALLDIR ?= $(DESTDIR)/$(PREFIX)/lib - - # Converts cr/lf to just lf - DOS2UNIX = dos2unix +@@ -13,6 +13,9 @@ DOS2UNIX = dos2unix LIBRARIES = -lstdc++ diff --git a/graphics/freeimageplus/Makefile b/graphics/freeimageplus/Makefile index 8ed776a5422..b1b563364e6 100644 --- a/graphics/freeimageplus/Makefile +++ b/graphics/freeimageplus/Makefile @@ -1,49 +1,14 @@ -# $NetBSD: Makefile,v 1.7 2020/01/23 16:09:17 nia Exp $ +# $NetBSD: Makefile,v 1.8 2020/05/25 12:24:37 nia Exp $ + +.include "../../graphics/freeimage/Makefile.common" -DISTNAME= FreeImage3180 PKGNAME= freeimageplus-3.18.0 -CATEGORIES= devel graphics -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/} -EXTRACT_SUFX= .zip +PKGREVISION= 1 MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= https://freeimage.sf.net/ -COMMENT= Library for supporting PNG, BMP, JPEG, and TIFF - C++ Wrapper -LICENSE= gnu-gpl-v2 OR gnu-gpl-v3 OR mpl-1.0 +COMMENT= Library for supporting PNG, BMP, JPEG, and TIFF (C++ wrapper) -USE_LANGUAGES+= c c++03 -USE_TOOLS+= gmake MAKE_FILE= Makefile.fip -DEPENDS+= freeimage>=3.17.0:../../graphics/freeimage - -PATCHDIR= ${.CURDIR}/../../graphics/freeimage/patches -DISTINFO_FILE= ${.CURDIR}/../../graphics/freeimage/distinfo - -WRKSRC= ${WRKDIR}/FreeImage - -INSTALLATION_DIRS+= include lib share/doc/${PKGBASE} - -post-install: - ${INSTALL_DATA} ${WRKSRC}/Source/LibJXR/LICENCE \ - ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/LICENSE.LibJXR - ${INSTALL_DATA} ${WRKSRC}/Source/LibOpenJPEG/LICENSE \ - ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/LICENSE.OpenJPEG - ${HEAD} -n 31 ${WRKSRC}/Source/LibRawLite/internal/libraw_x3f.cpp \ - > ${WRKDIR}/LICENSE.x3f - ${HEAD} -n 33 ${WRKSRC}/Source/LibRawLite/internal/dcb_demosaicing.c \ - > ${WRKDIR}/LICENSE.dcb - ${HEAD} -n 25 ${WRKSRC}/Source/LibTIFF4/tif_open.c \ - > ${WRKDIR}/LICENSE.LibTIFF4 - ${INSTALL_DATA} ${WRKDIR}/LICENSE.* \ - ${DESTDIR}${PREFIX}/share/doc/${PKGBASE} - ${INSTALL_DATA} ${WRKSRC}/Source/LibWebP/COPYING \ - ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/LICENSE.LibWebP - ${INSTALL_DATA} ${WRKSRC}/Source/OpenEXR/Copyrights/openexr/LICENSE \ - ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/LICENSE.OpenEXR - -PLIST_SUBST+= PKGVERSION_NOREV=${PKGVERSION_NOREV} - -NOT_FOR_PLATFORM= Darwin-*-* - +.include "../../graphics/freeimage/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/freeimageplus/PLIST b/graphics/freeimageplus/PLIST index c6db97aa98c..66d6c436059 100644 --- a/graphics/freeimageplus/PLIST +++ b/graphics/freeimageplus/PLIST @@ -1,13 +1,6 @@ -@comment $NetBSD: PLIST,v 1.2 2017/08/11 15:26:21 nros Exp $ +@comment $NetBSD: PLIST,v 1.3 2020/05/25 12:24:37 nia Exp $ include/FreeImagePlus.h lib/libfreeimageplus-${PKGVERSION_NOREV}.so lib/libfreeimageplus.a lib/libfreeimageplus.so lib/libfreeimageplus.so.3 -share/doc/freeimageplus/LICENSE.LibJXR -share/doc/freeimageplus/LICENSE.LibTIFF4 -share/doc/freeimageplus/LICENSE.LibWebP -share/doc/freeimageplus/LICENSE.OpenEXR -share/doc/freeimageplus/LICENSE.OpenJPEG -share/doc/freeimageplus/LICENSE.dcb -share/doc/freeimageplus/LICENSE.x3f |