Tue Jun 12 10:15:03 2018 UTC ()
libimagequant: updated to 2.12.1

version 2.12
- new liq_histogram_add_fixed_color()
- faster for large/complex images
- workarounds for Microsoft's outdated C compiler


(adam)
diff -r1.13 -r1.14 pkgsrc/graphics/libimagequant/Makefile
diff -r1.15 -r1.16 pkgsrc/graphics/libimagequant/distinfo
diff -r1.4 -r1.5 pkgsrc/graphics/libimagequant/patches/patch-Makefile
diff -r1.7 -r1.8 pkgsrc/graphics/libimagequant/patches/patch-configure

cvs diff -r1.13 -r1.14 pkgsrc/graphics/libimagequant/Makefile (expand / switch to unified diff)

--- pkgsrc/graphics/libimagequant/Makefile 2018/03/12 16:47:35 1.13
+++ pkgsrc/graphics/libimagequant/Makefile 2018/06/12 10:15:03 1.14
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.13 2018/03/12 16:47:35 adam Exp $ 1# $NetBSD: Makefile,v 1.14 2018/06/12 10:15:03 adam Exp $
2 2
3DISTNAME= libimagequant-2.11.10 3DISTNAME= libimagequant-2.12.1
4CATEGORIES= graphics 4CATEGORIES= graphics
5MASTER_SITES+= ${MASTER_SITE_GITHUB:=ImageOptim/} 5MASTER_SITES+= ${MASTER_SITE_GITHUB:=ImageOptim/}
6GITHUB_TAG= ${PKGVERSION_NOREV} 6GITHUB_TAG= ${PKGVERSION_NOREV}
7 7
8MAINTAINER= adam@NetBSD.org 8MAINTAINER= adam@NetBSD.org
9HOMEPAGE= https://pngquant.org/lib/ 9HOMEPAGE= https://pngquant.org/lib/
10COMMENT= High-quality conversion of RGBA images to 8-bit indexed-color 10COMMENT= High-quality conversion of RGBA images to 8-bit indexed-color
11LICENSE= gnu-gpl-v3 11LICENSE= gnu-gpl-v3
12 12
13USE_LIBTOOL= yes 13USE_LIBTOOL= yes
14USE_TOOLS+= bash gmake 14USE_TOOLS+= bash gmake
15HAS_CONFIGURE= yes 15HAS_CONFIGURE= yes
16CONFIGURE_ARGS+= --prefix="${PREFIX}" 16CONFIGURE_ARGS+= --prefix="${PREFIX}"

cvs diff -r1.15 -r1.16 pkgsrc/graphics/libimagequant/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/libimagequant/distinfo 2018/03/12 16:47:35 1.15
+++ pkgsrc/graphics/libimagequant/distinfo 2018/06/12 10:15:03 1.16
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.15 2018/03/12 16:47:35 adam Exp $ 1$NetBSD: distinfo,v 1.16 2018/06/12 10:15:03 adam Exp $
2 2
3SHA1 (libimagequant-2.11.10.tar.gz) = beb2a0497fd8df1e8151b653f3b804b286cc6989 3SHA1 (libimagequant-2.12.1.tar.gz) = 3860b4fa2427b29d6c47050594c53a3186661eae
4RMD160 (libimagequant-2.11.10.tar.gz) = 9ed37406be9a5473eb33bfa8a883667ff157f28a 4RMD160 (libimagequant-2.12.1.tar.gz) = 92536ae6666e8d2a64a625548e4bc2a0a363e1e2
5SHA512 (libimagequant-2.11.10.tar.gz) = ac59ecd04d6a3a688cc4f9f77c063a59da8dc6f3ddd05bdc3b15b9809d057462fe5b712fdbfb38e975d633a1bd5179b8ae6b2aee765f5dd9dcfef107f5eb22c0 5SHA512 (libimagequant-2.12.1.tar.gz) = 2e65d1ccae4e885e200446756496c2446696f0d4c7057d85e40c9ab4d524fed5505584f21f240ce3a7c589b9156ccb117cf5b1562b4851f3fbf14bf11fed0f13
6Size (libimagequant-2.11.10.tar.gz) = 74886 bytes 6Size (libimagequant-2.12.1.tar.gz) = 75631 bytes
7SHA1 (patch-Makefile) = 9ac0719c2c8096874a584c3bedb8b925a9d2dc30 7SHA1 (patch-Makefile) = e75e9fea798efed44e25b840d5d433f16e18522a
8SHA1 (patch-configure) = 086d0bdf0f0d8b37c135a5a854ad85ab812b4d68 8SHA1 (patch-configure) = 7baac92db07ffb6fd58e41949407f339ee52622f

cvs diff -r1.4 -r1.5 pkgsrc/graphics/libimagequant/patches/Attic/patch-Makefile (expand / switch to unified diff)

--- pkgsrc/graphics/libimagequant/patches/Attic/patch-Makefile 2018/03/12 16:47:35 1.4
+++ pkgsrc/graphics/libimagequant/patches/Attic/patch-Makefile 2018/06/12 10:15:03 1.5
@@ -1,35 +1,35 @@ @@ -1,35 +1,35 @@
1$NetBSD: patch-Makefile,v 1.4 2018/03/12 16:47:35 adam Exp $ 1$NetBSD: patch-Makefile,v 1.5 2018/06/12 10:15:03 adam Exp $
2 2
3Libtoolize. 3Libtoolize.
4 4
5--- Makefile.orig 2018-03-10 12:31:19.000000000 +0000 5--- Makefile.orig 2018-06-03 19:46:28.000000000 +0000
6+++ Makefile 6+++ Makefile
7@@ -1,7 +1,7 @@ 7@@ -1,7 +1,7 @@
8 -include config.mk 8 -include config.mk
9  9
10 STATICLIB=libimagequant.a 10 STATICLIB=libimagequant.a
11-SHAREDLIB=libimagequant.$(SOLIBSUFFIX) 11-SHAREDLIB=libimagequant.$(SOLIBSUFFIX)
12+SHAREDLIB=libimagequant.la 12+SHAREDLIB=libimagequant.la
13 SOVER=0 13 SOVER=0
14  14 ifeq ($(SOLIBSUFFIX),dylib)
15 JNILIB=libimagequant.jnilib 15 SHAREDLIBVER=libimagequant.$(SOVER).$(SOLIBSUFFIX)
16@@ -45,13 +45,13 @@ $(STATICLIB): $(OBJS) 16@@ -52,15 +52,11 @@ $(STATICLIB): $(OBJS)
17 $(AR) $(ARFLAGS) $@ $^ 17 $(AR) $(ARFLAGS) $@ $^
18  18
19 $(SHAREDOBJS): 19 $(SHAREDOBJS):
20- $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@ 20- $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
21+ ${LIBTOOL} --mode=compile $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@ 21+ ${LIBTOOL} --mode=compile $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
22  22
23-libimagequant.so: $(SHAREDOBJS) 23-libimagequant.so: $(SHAREDOBJS)
24- $(CC) -shared -Wl,-soname,$(SHAREDLIB).$(SOVER) -o $(SHAREDLIB).$(SOVER) $^ $(LDFLAGS) 24- $(CC) -shared -Wl,-soname,$(SHAREDLIBVER) -o $(SHAREDLIBVER) $^ $(LDFLAGS)
25- ln -fs $(SHAREDLIB).$(SOVER) $(SHAREDLIB) 25- ln -fs $(SHAREDLIBVER) $(SHAREDLIB)
26- sed -i "s#^prefix=.*#prefix=$(PREFIX)#" $(PKGCONFIG) 26-
27- sed -i "s#^Version:.*#Version: $(VERSION)#" $(PKGCONFIG) 27-libimagequant.dylib: $(SHAREDOBJS)
 28- $(CC) -shared -o $(SHAREDLIBVER) $^ $(LDFLAGS)
 29- ln -fs $(SHAREDLIBVER) $(SHAREDLIB)
28+$(SHAREDLIB): $(SHAREDOBJS) 30+$(SHAREDLIB): $(SHAREDOBJS)
29+ ${LIBTOOL} --mode=link $(CC) -o $(SHAREDLIB) $^ $(LDFLAGS) \ 31+ ${LIBTOOL} --mode=link $(CC) -o $(SHAREDLIB) $^ $(LDFLAGS) \
30+ -rpath ${PREFIX}/lib -version-info $(subst .,:,$(basename $(VERSION))) 32+ -rpath ${PREFIX}/lib -version-info $(subst .,:,$(basename $(VERSION)))
31+ sed -e "s#^prefix=.*#prefix=$(PREFIX)#" $(PKGCONFIG) > $(PKGCONFIG).new 
32+ sed -e "s#^Version:.*#Version: $(VERSION)#" $(PKGCONFIG).new > $(PKGCONFIG) 
33  33
34 libimagequant.dylib: $(SHAREDOBJS) 34 $(OBJS): $(wildcard *.h) config.mk
35 $(CC) -shared -o $(SHAREDLIB).$(SOVER) $^ $(LDFLAGS) 35

cvs diff -r1.7 -r1.8 pkgsrc/graphics/libimagequant/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/graphics/libimagequant/patches/Attic/patch-configure 2018/03/12 16:47:35 1.7
+++ pkgsrc/graphics/libimagequant/patches/Attic/patch-configure 2018/06/12 10:15:03 1.8
@@ -1,72 +1,62 @@ @@ -1,72 +1,62 @@
1$NetBSD: patch-configure,v 1.7 2018/03/12 16:47:35 adam Exp $ 1$NetBSD: patch-configure,v 1.8 2018/06/12 10:15:03 adam Exp $
2 2
3Remove unwanted compiler flags. 3Remove unwanted compiler flags.
4Avoid leaving scratch files in /tmp. 4Avoid leaving scratch files in /tmp.
5 5
6--- configure.orig 2018-03-10 12:31:19.000000000 +0000 6--- configure.orig 2018-06-03 19:46:28.000000000 +0000
7+++ configure 7+++ configure
8@@ -5,7 +5,7 @@ PREFIX="/usr/local" 8@@ -5,7 +5,7 @@ PREFIX="/usr/local"
9 LIBDIR="$PREFIX/lib" 9 LIBDIR="$PREFIX/lib"
10 INCLUDEDIR="$PREFIX/include" 10 INCLUDEDIR="$PREFIX/include"
11 PKGCONFIGDIR="$LIBDIR/pkgconfig" 11 PKGCONFIGDIR="$LIBDIR/pkgconfig"
12-VERSION=$(grep LIQ_VERSION_STRING libimagequant.h | grep -Eo "2\.[0-9.]+") 12-VERSION=$(grep LIQ_VERSION_STRING libimagequant.h | grep -Eo "2\.[0-9.]+")
13+VERSION=$(awk -F\" '/LIQ_VERSION_STRING/ {print $2}' libimagequant.h) 13+VERSION=$(awk -F\" '/LIQ_VERSION_STRING/ {print $2}' libimagequant.h)
14  14
15 DEBUG= 15 DEBUG=
16 QUIET=0 16 QUIET=0
17@@ -143,7 +143,8 @@ if [ "$QUIET" -ne 1 ]; then 17@@ -157,7 +157,7 @@ cflags "-std=c99 -I."
18 fi 
19  
20 # /tmp, because mingw has problems opening /dev/null and gives false negative 
21-if ! echo "int main(){}" | "$CC" -xc -std=c99 -o /tmp/gcccheck - > /dev/null; then 
22+# not /tmp, because that's not safe 
23+if ! echo "int main(){}" | "$CC" -xc -std=c99 -o ./tmp-gcccheck - > /dev/null; then 
24 error "Compiler" "$CC failed to compile anything (make sure it's installed and supports C99)" 
25 fi 
26  
27@@ -155,7 +156,7 @@ cflags "-std=c99 -I." 
28  18
29 # DEBUG 19 # DEBUG
30 if [ -z "$DEBUG" ]; then 20 if [ -z "$DEBUG" ]; then
31- cflags "-O3 -DNDEBUG" 21- cflags "-O3 -DNDEBUG"
32+ cflags "-DNDEBUG" 22+ cflags "-DNDEBUG"
33 status "Debug" "no" 23 status "Debug" "no"
34 else 24 else
35 cflags "-O1 -g" 25 cflags "-O1 -g"
36@@ -193,15 +194,9 @@ if [ -n "$OPENMP" ]; then 26@@ -195,15 +195,9 @@ if [ -n "$OPENMP" ]; then
37 else 27 else
38 OPENMPFLAGS="-fopenmp" 28 OPENMPFLAGS="-fopenmp"
39 fi 29 fi
40- if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP 30- if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP
41- #include <omp.h> 31- #include <omp.h>
42- #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then 32- #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then
43 cflags "$OPENMPFLAGS" 33 cflags "$OPENMPFLAGS"
44 lflags "$OPENMPFLAGS" 34 lflags "$OPENMPFLAGS"
45 status "OpenMP" "yes" 35 status "OpenMP" "yes"
46- else 36- else
47- error "OpenMP" "not supported by compiler (please install a compiler that supports OpenMP (e.g. gcc) and specify it with the CC= argument)" 37- error "OpenMP" "not supported by compiler (please install a compiler that supports OpenMP (e.g. gcc) and specify it with the CC= argument)"
48- fi 38- fi
49 else 39 else
50 # silence warnings about omp pragmas 40 # silence warnings about omp pragmas
51 cflags "-Wno-unknown-pragmas" 41 cflags "-Wno-unknown-pragmas"
52@@ -209,20 +204,10 @@ else 42@@ -211,20 +205,9 @@ else
53 status "OpenMP" "no" 43 status "OpenMP" "no"
54 fi 44 fi
55  45
56-# Cocoa 46-# Cocoa
57-if [[ "$OSTYPE" =~ "darwin" ]]; then 47-if [[ "$OSTYPE" =~ "darwin" ]]; then
58- cflags "-mmacosx-version-min=10.6" 48- cflags "-mmacosx-version-min=10.7"
59- lflags "-mmacosx-version-min=10.6" 49- lflags "-mmacosx-version-min=10.7"
60-fi 50-fi
61  51-
62 if [[ "$OSTYPE" =~ "darwin" ]]; then 52 if [[ "$OSTYPE" =~ "darwin" ]]; then
63 SOLIBSUFFIX=dylib 53 SOLIBSUFFIX=dylib
64  54
65- # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones 55- # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones
66- XCODE_CMD="xcode-select" 56- XCODE_CMD="xcode-select"
67- XCODE_PATH=$($XCODE_CMD -p) 57- XCODE_PATH=$($XCODE_CMD -p)
68- DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib") 58- DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib")
69- DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib") 59- DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib")
70 elif [[ "$OSTYPE" =~ "msys" ]]; then 60 elif [[ "$OSTYPE" =~ "msys" ]]; then
71 SOLIBSUFFIX=dll 61 SOLIBSUFFIX=dll
72 else 62 else