head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.8 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.6 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.4 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.2 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.5.0.40 pkgsrc-2025Q1-base:1.5 pkgsrc-2024Q4:1.5.0.38 pkgsrc-2024Q4-base:1.5 pkgsrc-2024Q3:1.5.0.36 pkgsrc-2024Q3-base:1.5 pkgsrc-2024Q2:1.5.0.34 pkgsrc-2024Q2-base:1.5 pkgsrc-2024Q1:1.5.0.32 pkgsrc-2024Q1-base:1.5 pkgsrc-2023Q4:1.5.0.30 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.28 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.26 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.24 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.22 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.20 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.18 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.16 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.14 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.12 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.10 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.8 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.6 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.4 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.2 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.3.0.2 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.2.0.24 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.20 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.18 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.16 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.14 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.12 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.10 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.8 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.6 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.4 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.1.0.18 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.16 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.14 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.12 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.10 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.8 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.6 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.4 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.2 pkgsrc-2015Q2-base:1.1; locks; strict; comment @# @; 1.6 date 2025.05.14.13.05.52; author adam; state Exp; branches; next 1.5; commitid HEBKM4TONp3blSUF; 1.5 date 2020.05.25.12.24.37; author nia; state Exp; branches; next 1.4; commitid ueBRhErEYLs3sC9C; 1.4 date 2020.05.14.16.42.14; author nia; state dead; branches; next 1.3; commitid 3Tph3M06xg54ee8C; 1.3 date 2020.01.11.14.40.44; author nia; state Exp; branches; next 1.2; commitid ob8z1coJpYLOxhSB; 1.2 date 2017.07.08.08.08.25; author nros; state Exp; branches; next 1.1; commitid bOvWNux6sdr8QoYz; 1.1 date 2015.05.27.21.59.26; author markd; state Exp; branches; next ; commitid LMz7KxUQL7cUh8ny; desc @@ 1.6 log @freeimage[plus]: allow building on Darwin @ text @$NetBSD: patch-Makefile.fip,v 1.5 2020/05/25 12:24:37 nia Exp $ - Unbundle image libraries. - Link with CXX for libstdc++. - Link correctly on Darwin. - Fix installation. --- Makefile.fip.orig 2015-03-10 08:03:56.000000000 +0000 +++ Makefile.fip @@@@ -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) @@@@ -28,23 +31,29 @@@@ 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 +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 $(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) @ 1.5 log @freeimage*: Generalize packages. Unbreak freeimageplus. @ text @d1 1 a1 1 $NetBSD$ d5 1 d8 1 a8 1 --- Makefile.fip.orig 2015-03-10 09:03:56.000000000 +0000 d10 3 a12 3 @@@@ -13,6 +13,9 @@@@ DOS2UNIX = dos2unix LIBRARIES = -lstdc++ d14 3 d19 1 a19 1 + d22 1 a22 2 CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden @@@@ -28,10 +31,8 @@@@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis d35 23 a57 1 @@@@ -68,14 +69,12 @@@@ $(STATICLIB): $(MODULES) d62 1 a62 1 + $(CXX) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@@ $(MODULES) $(LIBRARIES) @ 1.4 log @freeimage: Force use of unbundled libraries. Most Linux distributions have been forcing this for a while, because the reference image libraries are often full of bugs and slow to do releases, so everyone (including us) is carrying lots of local patches for security fixes. Bump PKGREVISION @ text @d1 1 a1 1 $NetBSD: patch-Makefile.fip,v 1.3 2020/01/11 14:40:44 nia Exp $ d3 3 a5 1 * use c++ for linking instead of linking with stdc++ d7 1 a7 1 --- Makefile.fip.orig 2015-03-08 17:03:56.000000000 +0000 d9 1 a9 1 @@@@ -5,8 +5,8 @@@@ include fipMakefile.srcs d11 9 a19 10 # 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 @@@@ -28,10 +28,8 @@@@ CXXFLAGS ?= -O3 -fPIC -fexceptions -fvis d32 1 a32 1 @@@@ -68,14 +66,12 @@@@ $(STATICLIB): $(MODULES) d37 1 a37 1 + $(CXX) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@@ $(MODULES) d46 1 a46 1 + $(BSD_INSTALL_DATA) $(STATICLIB) $(INSTALLDIR) @ 1.3 log @freeimage: Update to 3.18.0 Release 3.18.0 is a maintenance release that mainly brings updates of its third party libraries. The library has been updated with the new ZLib (1.2.11), LibJPEG (9c), LibPNG (1.6.35), LibTIFF (4.0.9), LibRaw (0.19.0), LibWebP (1.0.0), OpenEXR (2.2.1). Other significant improvements concern better support for JPEG saving (when using 32-bit CMYK images) and PSD saving. Lastly, the library contains many bug fixes provided by our users (will concern especially plugins PCX, TIFF, XPM, GIF, TARGA, PSD, BMP, DDS, PNG, HDR). As usual, check the changes log for full details (especially for bug fixes) and check also the updated FreeImage documentation. @ text @d1 1 a1 1 $NetBSD: patch-Makefile.fip,v 1.2 2017/07/08 08:08:25 nros Exp $ @ 1.2 log @Make freeimage and freeimageplus use the c++ copiler for linking and remove linking to stdc++. This will make them use the right runtime library, not all compilers use stdc++. @ text @d1 2 a2 1 $NetBSD: patch-Makefile.fip,v 1.1 2015/05/27 21:59:26 markd Exp $ d4 1 @ 1.1 log @Update to 3.17.0 Release 3.17.0 adds many improvements for ICO, TIFF, PNG, HDR, TGA, GIF, RAW, JXR, JP2, Exif plugins. It comes with new conversion functions for RGBA16/RGBAF formats, as well as new functions used to deal with external pixel buffers (ConvertFromRawBitsEx, CreateView). Other useful added functions are ReslaleRect, GetMemorySize, SetMetadataKeyValue and the FIQ_LFPQUANT quantizer algorithm. The library has been updated with the new LibPNG (1.6.16), LibTIFF (4.0.4), LibRaw (0.17.a1), LibWebP (0.4.2), OpenEXR (2.2.0). FreeImage is also distributed with updated VB6, Delphi and C++ wrappers. @ text @d1 3 a3 3 $NetBSD$ --- Makefile.fip.orig 2015-03-08 05:03:56.000000000 +0000 d29 6 a34 2 @@@@ -71,11 +69,9 @@@@ $(SHAREDLIB): $(MODULES) $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@@ $(MODULES) $(LIBRARIES) @