Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics freeimage*: Generalize packages. Unbreak free...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a37e0574c416
branches: trunk
changeset: 432755:a37e0574c416
user: nia <nia%pkgsrc.org@localhost>
date: Mon May 25 12:24:37 2020 +0000
description:
freeimage*: Generalize packages. Unbreak freeimageplus.
diffstat:
graphics/freeimage/Makefile | 46 +---------------------
graphics/freeimage/Makefile.common | 55 +++++++++++++++++++++++++++
graphics/freeimage/distinfo | 5 +-
graphics/freeimage/patches/patch-Makefile.fip | 50 ++++++++++++++++++++++++
graphics/freeimage/patches/patch-Makefile.gnu | 18 +------
graphics/freeimageplus/Makefile | 47 ++--------------------
graphics/freeimageplus/PLIST | 9 +---
7 files changed, 122 insertions(+), 108 deletions(-)
diffs (297 lines):
diff -r e0242c51f38e -r a37e0574c416 graphics/freeimage/Makefile
--- a/graphics/freeimage/Makefile Mon May 25 12:01:20 2020 +0000
+++ b/graphics/freeimage/Makefile Mon May 25 12:24:37 2020 +0000
@@ -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 $
-DISTNAME= FreeImage3180
+.include "Makefile.common"
+
PKGNAME= freeimage-3.18.0
PKGREVISION= 2
-CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/}
-EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-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 -r e0242c51f38e -r a37e0574c416 graphics/freeimage/Makefile.common
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/Makefile.common Mon May 25 12:24:37 2020 +0000
@@ -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 -r e0242c51f38e -r a37e0574c416 graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo Mon May 25 12:01:20 2020 +0000
+++ b/graphics/freeimage/distinfo Mon May 25 12:24:37 2020 +0000
@@ -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 -r e0242c51f38e -r a37e0574c416 graphics/freeimage/patches/patch-Makefile.fip
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/patches/patch-Makefile.fip Mon May 25 12:24:37 2020 +0000
@@ -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 -r e0242c51f38e -r a37e0574c416 graphics/freeimage/patches/patch-Makefile.gnu
--- a/graphics/freeimage/patches/patch-Makefile.gnu Mon May 25 12:01:20 2020 +0000
+++ b/graphics/freeimage/patches/patch-Makefile.gnu Mon May 25 12:24:37 2020 +0000
@@ -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.
+- Unbundle image libraries.
- Link with CXX for libstdc++.
-- Unbundle image libraries.
+- 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 -r e0242c51f38e -r a37e0574c416 graphics/freeimageplus/Makefile
--- a/graphics/freeimageplus/Makefile Mon May 25 12:01:20 2020 +0000
+++ b/graphics/freeimageplus/Makefile Mon May 25 12:24:37 2020 +0000
@@ -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 $
-DISTNAME= FreeImage3180
+.include "../../graphics/freeimage/Makefile.common"
+
PKGNAME= freeimageplus-3.18.0
-CATEGORIES= devel graphics
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freeimage/}
-EXTRACT_SUFX= .zip
+PKGREVISION= 1
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-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 -r e0242c51f38e -r a37e0574c416 graphics/freeimageplus/PLIST
--- a/graphics/freeimageplus/PLIST Mon May 25 12:01:20 2020 +0000
+++ b/graphics/freeimageplus/PLIST Mon May 25 12:24:37 2020 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index