pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/freeimage
Module Name: pkgsrc
Committed By: adam
Date: Wed May 14 13:05:52 UTC 2025
Modified Files:
pkgsrc/graphics/freeimage: Makefile.common PLIST distinfo
pkgsrc/graphics/freeimage/patches: patch-Makefile.fip
patch-Makefile.gnu patch-Source_FreeImage_PluginEXR.cpp
Log Message:
freeimage[plus]: allow building on Darwin
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/graphics/freeimage/Makefile.common
cvs rdiff -u -r1.3 -r1.4 pkgsrc/graphics/freeimage/PLIST
cvs rdiff -u -r1.18 -r1.19 pkgsrc/graphics/freeimage/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/graphics/freeimage/patches/patch-Makefile.fip
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu \
pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/freeimage/Makefile.common
diff -u pkgsrc/graphics/freeimage/Makefile.common:1.6 pkgsrc/graphics/freeimage/Makefile.common:1.7
--- pkgsrc/graphics/freeimage/Makefile.common:1.6 Sun Feb 12 12:17:12 2023
+++ pkgsrc/graphics/freeimage/Makefile.common Wed May 14 13:05:52 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.6 2023/02/12 12:17:12 tnn Exp $
+# $NetBSD: Makefile.common,v 1.7 2025/05/14 13:05:52 adam Exp $
# used by graphics/freeimage/Makefile
# used by graphics/freeimageplus/Makefile
@@ -11,8 +11,9 @@ 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
+USE_CXX_FEATURES= c++11
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake pkg-config
WRKSRC= ${WRKDIR}/FreeImage
@@ -54,8 +55,6 @@ pre-configure:
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"
Index: pkgsrc/graphics/freeimage/PLIST
diff -u pkgsrc/graphics/freeimage/PLIST:1.3 pkgsrc/graphics/freeimage/PLIST:1.4
--- pkgsrc/graphics/freeimage/PLIST:1.3 Thu May 14 16:42:13 2020
+++ pkgsrc/graphics/freeimage/PLIST Wed May 14 13:05:52 2025
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.3 2020/05/14 16:42:13 nia Exp $
+@comment $NetBSD: PLIST,v 1.4 2025/05/14 13:05:52 adam Exp $
include/FreeImage.h
-lib/libfreeimage-${PKGVERSION_NOREV}.so
+lib/libfreeimage-${PKGVERSION_NOREV}.${SHLIB_EXT}
lib/libfreeimage.a
lib/libfreeimage.so
lib/libfreeimage.so.3
Index: pkgsrc/graphics/freeimage/distinfo
diff -u pkgsrc/graphics/freeimage/distinfo:1.18 pkgsrc/graphics/freeimage/distinfo:1.19
--- pkgsrc/graphics/freeimage/distinfo:1.18 Sat Mar 18 05:42:33 2023
+++ pkgsrc/graphics/freeimage/distinfo Wed May 14 13:05:52 2025
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.18 2023/03/18 05:42:33 wiz Exp $
+$NetBSD: distinfo,v 1.19 2025/05/14 13:05:52 adam Exp $
BLAKE2s (FreeImage3180.zip) = 08cd435f40d668418a710a63bebdd02763d4d7abab1b2eb6958d58c35aab4f7f
SHA512 (FreeImage3180.zip) = 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
Size (FreeImage3180.zip) = 7415716 bytes
-SHA1 (patch-Makefile.fip) = f16e2f589f9433472cd67e5485f7c34ed30a887e
-SHA1 (patch-Makefile.gnu) = f3528c8004ccab5067d9957387f6686ea8cef58a
+SHA1 (patch-Makefile.fip) = 76d99fd5e809e589c90c38badf09498a420c7a7f
+SHA1 (patch-Makefile.gnu) = 2622c97c8cd6ab1eab0f44c1c4d2788e23114d24
SHA1 (patch-Source_FreeImage.h) = 9b648a8734a0c3391850e2dd7eaa501d29e99689
SHA1 (patch-Source_FreeImageToolkit_JPEGTransform.cpp) = 4e7372c8947b4359de4d428bcfcfa2f55210f2e8
SHA1 (patch-Source_FreeImage_J2KHelper.cpp) = a479a373f5a584978129c00d723251a784210603
@@ -12,7 +12,7 @@ SHA1 (patch-Source_FreeImage_PSDParser.c
SHA1 (patch-Source_FreeImage_Plugin.cpp) = 58f5d7ca78a66ad7109b0e8dff219c26dfe50a86
SHA1 (patch-Source_FreeImage_PluginBMP.cpp) = 23629bdaf6ca705986a4f2ab5c680020b267793f
SHA1 (patch-Source_FreeImage_PluginDDS.cpp) = 02fd0eaaf6758a815b6b98080928206e69346bf0
-SHA1 (patch-Source_FreeImage_PluginEXR.cpp) = ce97b25f8968eea7c3216143b766b1c51ccd5e43
+SHA1 (patch-Source_FreeImage_PluginEXR.cpp) = fb30dcda91b5c67e9b25631fab4c88247b74070b
SHA1 (patch-Source_FreeImage_PluginJ2K.cpp) = bbc44884aba8be3af2aa824da5cf788d91c27fb6
SHA1 (patch-Source_FreeImage_PluginJP2.cpp) = 9a6d27e039b2050004a2d331389bdfa32dffe681
SHA1 (patch-Source_FreeImage_PluginJPEG.cpp) = 9ed3ce6d70871c9657a69daa4f68ae8423e100a2
Index: pkgsrc/graphics/freeimage/patches/patch-Makefile.fip
diff -u pkgsrc/graphics/freeimage/patches/patch-Makefile.fip:1.5 pkgsrc/graphics/freeimage/patches/patch-Makefile.fip:1.6
--- pkgsrc/graphics/freeimage/patches/patch-Makefile.fip:1.5 Mon May 25 12:24:37 2020
+++ pkgsrc/graphics/freeimage/patches/patch-Makefile.fip Wed May 14 13:05:52 2025
@@ -1,22 +1,25 @@
-$NetBSD: patch-Makefile.fip,v 1.5 2020/05/25 12:24:37 nia Exp $
+$NetBSD: patch-Makefile.fip,v 1.6 2025/05/14 13:05:52 adam Exp $
- Unbundle image libraries.
- Link with CXX for libstdc++.
+- Link correctly on Darwin.
- Fix installation.
---- Makefile.fip.orig 2015-03-10 09:03:56.000000000 +0000
+--- Makefile.fip.orig 2015-03-10 08:03:56.000000000 +0000
+++ Makefile.fip
-@@ -13,6 +13,9 @@ DOS2UNIX = dos2unix
-
- LIBRARIES = -lstdc++
+@@ -11,7 +11,10 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+-LIBRARIES = -lstdc++
++LIBRARIES = -lfreeimage -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
+@@ -28,23 +31,29 @@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis
CXXFLAGS += -D__ANSI__
CXXFLAGS += $(INCLUDE)
@@ -29,12 +32,34 @@ $NetBSD: patch-Makefile.fip,v 1.5 2020/0
TARGET = freeimageplus
STATICLIB = lib$(TARGET).a
-@@ -68,14 +69,12 @@ $(STATICLIB): $(MODULES)
++ifeq ($(shell uname),Darwin)
++SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
++LIBNAME = lib$(TARGET).dylib
++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib
++LDFLAGS += -Wl,-install_name,${PREFIX}/lib/$(SHAREDLIB)
++else
+ SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+ LIBNAME = lib$(TARGET).so
+ VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++LDFLAGS += -Wl,-soname,$(VERLIBNAME)
++endif
+ HEADER = Source/FreeImage.h
+ HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
+
+
+ default: all
+
+-all: dist
++all: FreeImage
+
+ dist: FreeImage
+ mkdir -p Dist
+@@ -68,14 +77,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)
++ $(CXX) -s -shared $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
install:
- install -d $(INCDIR) $(INSTALLDIR)
Index: pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu
diff -u pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu:1.2 pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu:1.3
--- pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu:1.2 Mon May 25 12:24:37 2020
+++ pkgsrc/graphics/freeimage/patches/patch-Makefile.gnu Wed May 14 13:05:52 2025
@@ -1,10 +1,11 @@
-$NetBSD: patch-Makefile.gnu,v 1.2 2020/05/25 12:24:37 nia Exp $
+$NetBSD: patch-Makefile.gnu,v 1.3 2025/05/14 13:05:52 adam Exp $
- Unbundle image libraries.
- Link with CXX for libstdc++.
+- Link correctly on Darwin.
- Fix installation.
---- Makefile.gnu.orig 2015-03-10 09:04:00.000000000 +0000
+--- Makefile.gnu.orig 2015-03-10 08:04:00.000000000 +0000
+++ Makefile.gnu
@@ -13,6 +13,9 @@ DOS2UNIX = dos2unix
@@ -16,7 +17,7 @@ $NetBSD: patch-Makefile.gnu,v 1.2 2020/0
MODULES = $(SRCS:.c=.o)
MODULES := $(MODULES:.cpp=.o)
CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
-@@ -28,10 +31,8 @@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis
+@@ -28,23 +31,28 @@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis
CXXFLAGS += -D__ANSI__
CXXFLAGS += $(INCLUDE)
@@ -29,21 +30,35 @@ $NetBSD: patch-Makefile.gnu,v 1.2 2020/0
TARGET = freeimage
STATICLIB = lib$(TARGET).a
-@@ -40,8 +41,6 @@ LIBNAME = lib$(TARGET).so
++ifeq ($(shell uname),Darwin)
++SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
++LIBNAME = lib$(TARGET).dylib
++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib
++LDFLAGS += -Wl,-install_name,${PREFIX}/lib/$(SHAREDLIB)
++else
++SHLIB_EXT = so
+ SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+ LIBNAME = lib$(TARGET).so
VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++LDFLAGS += -Wl,-soname,$(VERLIBNAME)
++endif
HEADER = Source/FreeImage.h
-
-
default: all
- all: dist
-@@ -67,13 +66,12 @@ $(STATICLIB): $(MODULES)
+-all: dist
++all: FreeImage
+
+ dist: FreeImage
+ mkdir -p Dist
+@@ -67,13 +75,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)
++ $(CXX) -s -shared $(LDFLAGS) -o $@ $(MODULES)
install:
- install -d $(INCDIR) $(INSTALLDIR)
Index: pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp
diff -u pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp:1.2 pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp:1.3
--- pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp:1.2 Thu Jul 8 21:26:12 2021
+++ pkgsrc/graphics/freeimage/patches/patch-Source_FreeImage_PluginEXR.cpp Wed May 14 13:05:52 2025
@@ -1,8 +1,10 @@
-$NetBSD: patch-Source_FreeImage_PluginEXR.cpp,v 1.2 2021/07/08 21:26:12 markd Exp $
+$NetBSD: patch-Source_FreeImage_PluginEXR.cpp,v 1.3 2025/05/14 13:05:52 adam Exp $
Unbundle image libraries.
---- Source/FreeImage/PluginEXR.cpp.orig 2015-03-04 00:07:08.000000000 +0000
+Imath::Int64 is deprecated, use uint64_t.
+
+--- Source/FreeImage/PluginEXR.cpp.orig 2015-03-03 23:07:08.000000000 +0000
+++ Source/FreeImage/PluginEXR.cpp
@@ -28,16 +28,17 @@
#pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning)
@@ -32,3 +34,31 @@ Unbundle image libraries.
// ==========================================================
+@@ -66,11 +67,11 @@ public:
+ return ((unsigned)n != _io->read_proc(c, 1, n, _handle));
+ }
+
+- virtual Imath::Int64 tellg() {
++ virtual uint64_t tellg() {
+ return _io->tell_proc(_handle);
+ }
+
+- virtual void seekg(Imath::Int64 pos) {
++ virtual void seekg(uint64_t pos) {
+ _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
+ }
+
+@@ -100,11 +101,11 @@ public:
+ }
+ }
+
+- virtual Imath::Int64 tellp() {
++ virtual uint64_t tellp() {
+ return _io->tell_proc(_handle);
+ }
+
+- virtual void seekp(Imath::Int64 pos) {
++ virtual void seekp(uint64_t pos) {
+ _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
+ }
+ };
Home |
Main Index |
Thread Index |
Old Index