Wed Dec 20 11:52:23 2017 UTC ()
Don't put configure scratch files in /tmp; it isn't safe and also might
fail for extraneous reasons.


(dholland)
diff -r1.11 -r1.12 pkgsrc/graphics/libimagequant/distinfo
diff -r1.5 -r1.6 pkgsrc/graphics/libimagequant/patches/patch-configure

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

--- pkgsrc/graphics/libimagequant/distinfo 2017/11/28 10:35:27 1.11
+++ pkgsrc/graphics/libimagequant/distinfo 2017/12/20 11:52:23 1.12
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.11 2017/11/28 10:35:27 adam Exp $ 1$NetBSD: distinfo,v 1.12 2017/12/20 11:52:23 dholland Exp $
2 2
3SHA1 (libimagequant-2.11.4.tar.gz) = 4ff6e1168b2526c9ea3761249ecd31b95c062750 3SHA1 (libimagequant-2.11.4.tar.gz) = 4ff6e1168b2526c9ea3761249ecd31b95c062750
4RMD160 (libimagequant-2.11.4.tar.gz) = c4009437c1d4a9e58719248f141541df97aa56d6 4RMD160 (libimagequant-2.11.4.tar.gz) = c4009437c1d4a9e58719248f141541df97aa56d6
5SHA512 (libimagequant-2.11.4.tar.gz) = e9d2aaac2f37968dc93ba0da7d03f0fcf60b3f17d9a0b9edfd6930eade25844dd603de74492d8e1de8dc2da4e7f3e47959a558b5a67588d71e9e1db035eca1cc 5SHA512 (libimagequant-2.11.4.tar.gz) = e9d2aaac2f37968dc93ba0da7d03f0fcf60b3f17d9a0b9edfd6930eade25844dd603de74492d8e1de8dc2da4e7f3e47959a558b5a67588d71e9e1db035eca1cc
6Size (libimagequant-2.11.4.tar.gz) = 74117 bytes 6Size (libimagequant-2.11.4.tar.gz) = 74117 bytes
7SHA1 (patch-Makefile) = 78a77b6348c3a254164cbbb2c8e2c3d000c10d10 7SHA1 (patch-Makefile) = 78a77b6348c3a254164cbbb2c8e2c3d000c10d10
8SHA1 (patch-configure) = 747b121b901dff19374999c543ea7cb361c25428 8SHA1 (patch-configure) = 4425589a1956f4c4303370baceb605308f07edf0

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

--- pkgsrc/graphics/libimagequant/patches/Attic/patch-configure 2017/07/03 21:50:32 1.5
+++ pkgsrc/graphics/libimagequant/patches/Attic/patch-configure 2017/12/20 11:52:23 1.6
@@ -1,54 +1,65 @@ @@ -1,54 +1,65 @@
1$NetBSD: patch-configure,v 1.5 2017/07/03 21:50:32 adam Exp $ 1$NetBSD: patch-configure,v 1.6 2017/12/20 11:52:23 dholland Exp $
2 2
3Remove unwanted compiler flags. 3Remove unwanted compiler flags.
 4Avoid leaving scratch files in /tmp.
4 5
5--- configure.orig 2017-07-02 21:40:53.000000000 +0000 6--- configure.orig 2017-11-27 15:38:43.000000000 +0000
6+++ configure 7+++ configure
7@@ -2,7 +2,7 @@ 8@@ -2,7 +2,7 @@
8  9
9 CONFIG="config.mk" 10 CONFIG="config.mk"
10 PREFIX="/usr/local" 11 PREFIX="/usr/local"
11-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.]+")
12+VERSION=$(awk -F\" '/LIQ_VERSION_STRING/ {print $2}' libimagequant.h) 13+VERSION=$(awk -F\" '/LIQ_VERSION_STRING/ {print $2}' libimagequant.h)
13  14
14 DEBUG= 15 DEBUG=
15 QUIET=0 16 QUIET=0
16@@ -136,7 +136,7 @@ cflags "-std=c99 -I." 17@@ -124,7 +124,8 @@ if [ "$QUIET" -ne 1 ]; then
 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@@ -136,7 +137,7 @@ cflags "-std=c99 -I."
17  28
18 # DEBUG 29 # DEBUG
19 if [ -z "$DEBUG" ]; then 30 if [ -z "$DEBUG" ]; then
20- cflags "-O3 -DNDEBUG" 31- cflags "-O3 -DNDEBUG"
21+ cflags "-DNDEBUG" 32+ cflags "-DNDEBUG"
22 status "Debug" "no" 33 status "Debug" "no"
23 else 34 else
24 cflags "-O1 -g" 35 cflags "-O1 -g"
25@@ -174,15 +174,9 @@ if [ -n "$OPENMP" ]; then 36@@ -174,15 +175,9 @@ if [ -n "$OPENMP" ]; then
26 else 37 else
27 OPENMPFLAGS="-fopenmp" 38 OPENMPFLAGS="-fopenmp"
28 fi 39 fi
29- if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP 40- if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP
30- #include <omp.h> 41- #include <omp.h>
31- #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then 42- #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then
32 cflags "$OPENMPFLAGS" 43 cflags "$OPENMPFLAGS"
33 lflags "$OPENMPFLAGS" 44 lflags "$OPENMPFLAGS"
34 status "OpenMP" "yes" 45 status "OpenMP" "yes"
35- else 46- else
36- error "OpenMP" "not supported by compiler (please install a compiler that supports OpenMP (e.g. gcc) and specify it with the CC= argument)" 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- fi 48- fi
38 else 49 else
39 # silence warnings about omp pragmas 50 # silence warnings about omp pragmas
40 cflags "-Wno-unknown-pragmas" 51 cflags "-Wno-unknown-pragmas"
41@@ -190,20 +184,10 @@ else 52@@ -190,20 +185,10 @@ else
42 status "OpenMP" "no" 53 status "OpenMP" "no"
43 fi 54 fi
44  55
45-# Cocoa 56-# Cocoa
46-if [[ "$OSTYPE" =~ "darwin" ]]; then 57-if [[ "$OSTYPE" =~ "darwin" ]]; then
47- cflags "-mmacosx-version-min=10.6" 58- cflags "-mmacosx-version-min=10.6"
48- lflags "-mmacosx-version-min=10.6" 59- lflags "-mmacosx-version-min=10.6"
49-fi 60-fi
50  61
51 if [[ "$OSTYPE" =~ "darwin" ]]; then 62 if [[ "$OSTYPE" =~ "darwin" ]]; then
52 SOLIBSUFFIX=dylib 63 SOLIBSUFFIX=dylib
53  64
54- # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones 65- # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones