Index: head/graphics/pngquant/Makefile =================================================================== --- head/graphics/pngquant/Makefile (revision 476173) +++ head/graphics/pngquant/Makefile (revision 476174) @@ -1,54 +1,54 @@ # Created by: Alex Hayward # $FreeBSD$ PORTNAME= pngquant -PORTVERSION= 2.11.7 +PORTVERSION= 2.12.0 DISTVERSIONSUFFIX= -src CATEGORIES= graphics MASTER_SITES= http://pngquant.org/ MAINTAINER= ak@FreeBSD.org COMMENT= Converts 32-bit RGBA PNGs into 8-bit RGBA-palette PNGs LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYRIGHT LIB_DEPENDS= libpng.so:graphics/png WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USES= gmake pkgconfig HAS_CONFIGURE= yes PORTDOCS= CHANGELOG README.md PLIST_FILES= bin/pngquant \ man/man1/pngquant.1.gz OPTIONS_DEFINE= OPTIMIZED_FLAGS LCMS2 DEBUG DOCS OPTIONS_DEFINE_i386= SSE OPTIONS_DEFINE_amd64= SSE LCMS2_DESC= Support for ICC profiles via LCMS library OPTIMIZED_FLAGS_DESC= ${OPTIMIZED_CFLAGS_DESC} OPTIONS_DEFAULT_amd64= SSE DEBUG_CONFIGURE_ON= --enable-debug LCMS2_CONFIGURE_WITH= lcms2 LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2 OPTIMIZED_FLAGS_CFLAGS= -O3 -fstrict-aliasing \ -ffast-math -funroll-loops -fomit-frame-pointer \ -fexpensive-optimizations -ffinite-math-only \ -funsafe-loop-optimizations -ftree-vectorize SSE_CONFIGURE_ENABLE=sse do-install: ${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/pngquant.1 ${STAGEDIR}${MANPREFIX}/man/man1 post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include Index: head/graphics/pngquant/distinfo =================================================================== --- head/graphics/pngquant/distinfo (revision 476173) +++ head/graphics/pngquant/distinfo (revision 476174) @@ -1,3 +1,3 @@ -TIMESTAMP = 1517669180 -SHA256 (pngquant-2.11.7-src.tar.gz) = d70b46c3335c7abf21944aced2d9d2b54819ab84ed1a140b354d5e8cc9f0fb0a -SIZE (pngquant-2.11.7-src.tar.gz) = 141959 +TIMESTAMP = 1533123633 +SHA256 (pngquant-2.12.0-src.tar.gz) = 0e540c64bb58c05f2a05b4eaf1d3d165f0d3278500f15abfeac47f93f8fa8fa8 +SIZE (pngquant-2.12.0-src.tar.gz) = 143335 Index: head/graphics/pngquant/files/patch-configure =================================================================== --- head/graphics/pngquant/files/patch-configure (revision 476173) +++ head/graphics/pngquant/files/patch-configure (revision 476174) @@ -1,263 +1,261 @@ Index: configure @@ -1,11 +1,11 @@ -#!/usr/bin/env bash +#!/bin/sh CONFIG="config.mk" PREFIX="/usr/local" DEBUG= LIQSRCDIR=./lib -LIQCONFIGURE=(--quiet) +LIQCONFIGURE=--quiet SSE=auto OPENMP= LIBPNG_DIR=. -@@ -41,7 +41,7 @@ +@@ -35,7 +35,7 @@ help "--with-libimagequant= external libimagequant (lib/ default)" help "--with-openmp=static compile with multicore support" help "--with-lcms2/--without-lcms2 compile with color profile support" -if [[ "$OSTYPE" =~ "darwin" ]]; then +if echo "$OSTYPE" | grep -q "darwin"; then help "--with-cocoa/--without-cocoa use Cocoa framework to read images" fi help "--with-libpng= search for libpng in directory" -@@ -56,35 +56,35 @@ +@@ -50,35 +50,35 @@ CC=*) CC=${i#*=} SKIP_CC_CHECK=1 - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; CFLAGS=*) CFLAGS=${i#*=} - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; LDFLAGS=*) LDFLAGS=${i#*=} - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --enable-debug) DEBUG=1 - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --enable-sse) SSE=1 - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --disable-sse) SSE=0 - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --with-openmp) OPENMP=1 - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --with-openmp=static) OPENMP=static - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --with-lcms2) LCMS2=1 -@@ -111,16 +111,16 @@ +@@ -103,16 +103,16 @@ ;; --prefix=*) PREFIX=${i#*=} - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; # can be used multiple times or in quotes to set multiple flags --extra-cflags=*) EXTRA_CFLAGS="$EXTRA_CFLAGS ${i#*=}" - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; --extra-ldflags=*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS ${i#*=}" - LIQCONFIGURE+=("$i") + LIQCONFIGURE="$LIQCONFIGURE $i" ;; *) echo "warning: unknown switch ${i%%=*} (see $0 --help for the list)" -@@ -130,7 +130,7 @@ +@@ -122,7 +122,7 @@ # If someone runs sudo make install as very first command, and configure later, # $CONFIG cannot be overwritten, and must be deleted before continuing. -if [[ -f "$CONFIG" && ! -w "$CONFIG" ]]; then +if [ -f "$CONFIG" -a ! -w "$CONFIG" ]; then echo "Cannot overwrite file $CONFIG! Please delete it." exit 1 fi -@@ -167,7 +167,7 @@ +@@ -159,7 +159,7 @@ find_pkgconfig() { local LIBNAME=$1 - if pkg-config --exists "$LIBNAME" &> /dev/null; then + if pkg-config --exists "$LIBNAME" >/dev/null; then cflags "$(pkg-config --cflags "$LIBNAME")" lflags "$(pkg-config --libs "$LIBNAME")" LIBRARY_FOUND_VERSION=$(pkg-config --modversion "$LIBNAME") -@@ -248,9 +248,13 @@ +@@ -240,9 +240,13 @@ return 0 fi - for i in "${DIRS[@]}"; do - DIR=($i) - if find_dynamic "$LIBNAME" "$HEADERPATTERN" "$DYNAMICPATTERN" "${DIR[0]}" "${DIR[1]}"; then + # destroys positional parameters + set -- ${DIRS} + while [ -n "$1" -a -n "$2" ]; do + DIRS_h="$1" + DIRS_l="$2" + shift 2 + if find_dynamic "$LIBNAME" "$HEADERPATTERN" "$DYNAMICPATTERN" "${DIRS_h}" "${DIRS_l}"; then return 0 fi done -@@ -305,12 +309,8 @@ +@@ -299,12 +303,8 @@ # SSE if [ "$SSE" = 'auto' ]; then SSE=0 - if type uname > /dev/null; then - if [[ "$(uname -m)" =~ "amd64" || "$(uname -m)" =~ "x86_64" || - "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then - SSE=1 - fi - fi + echo $(uname -m) | grep -E -q '(amd|x86_)64' && SSE=1 + grep -E -m1 -q '^flags.*sse' /proc/cpuinfo 2>/dev/null && SSE=1 fi if [ "$SSE" -eq 1 ]; then -@@ -333,9 +333,8 @@ +@@ -327,9 +327,8 @@ else OPENMPFLAGS="-fopenmp" fi - if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP - #include - #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then + if echo "$(printf '#ifdef _OPENMP\n#include \n#endif\n' | \ + "$CC" -xc -E $OPENMPFLAGS - 2>&1)" | grep -q omp_get_thread_num; then cflags "$OPENMPFLAGS" lflags "$OPENMPFLAGS" status "OpenMP" "yes" -@@ -342,7 +342,7 @@ +@@ -344,38 +343,35 @@ fi # Cocoa -if [[ "$OSTYPE" =~ "darwin" ]]; then +if echo "$OSTYPE" | grep -q "darwin"; then - cflags "-mmacosx-version-min=10.6" - lflags "-mmacosx-version-min=10.6" + cflags "-mmacosx-version-min=10.7" + lflags "-mmacosx-version-min=10.7" fi -@@ -365,32 +366,29 @@ - fi # pairs of possible *.h and lib*.so locations -DIRS=() +DIRS= if command -v >/dev/null libpng-config; then - DIRS+=("$(libpng-config --prefix) $(libpng-config --libdir)") + DIRS="$(libpng-config --prefix) $(libpng-config --libdir)" fi -if [ -n $"LIQSRCDIR" ]; then - DIRS+=("$LIQSRCDIR" "$LIQSRCDIR") # local libimagequant +if [ -n "$LIQSRCDIR" ]; then + DIRS="$DIRS $LIQSRCDIR $LIQSRCDIR" # local libimagequant fi -DIRS+=( - "/usr/local/include /usr/local/lib" - "/usr/include /usr/lib64" - "/usr/include /usr/lib" - "/opt/local/include /opt/local/lib" # macports - ) +DIRS="$DIRS /usr/local/include /usr/local/lib \ + /usr/include /usr/lib \ + /opt/local/include /opt/local/lib" # macports -if [[ "$OSTYPE" =~ "darwin" ]]; then +if echo "$OSTYPE" | grep -q "darwin" ; then SOLIBSUFFIX=dylib # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones XCODE_CMD="xcode-select" XCODE_PATH=$($XCODE_CMD -p) - 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") - 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") -elif [[ "$OSTYPE" =~ "msys" ]]; then + DIRS="$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" + DIRS="$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" +elif echo "$OSTYPE" | grep -q "msys" ; then SOLIBSUFFIX=dll else SOLIBSUFFIX=so -@@ -431,7 +429,7 @@ +@@ -416,7 +412,7 @@ if echo "#include \"png.h\" int main(){ return !png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -}" | "$CC" -xc -std=c99 -o /dev/null $CFLAGS $LDFLAGS - &> /dev/null; then +}" | "$CC" -xc -std=c99 -o /dev/null $CFLAGS $LDFLAGS - >/dev/null 2>&1; then status "libpng" "custom flags" HAS_LIBPNG=1 fi -@@ -442,7 +440,7 @@ +@@ -427,7 +423,7 @@ if [ -n "$PNGH" ]; then PNGH_STRING=$(pngh_string "$PNGH") PNGH_MAJMIN=$(pngh_majmin "$PNGH") - if [[ -n "$PNGH_STRING" && -n "$PNGH_MAJMIN" ]]; then + if [ -n "$PNGH_STRING" -a -n "$PNGH_MAJMIN" ]; then LIBPNGA=$(find_f "$LIBPNG_DIR" "libpng${PNGH_MAJMIN}.a") if [ -z "$LIBPNGA" ]; then LIBPNGA=$(find_f "$LIBPNG_DIR" "libpng.a") -@@ -461,14 +459,19 @@ +@@ -446,14 +442,19 @@ if find_pkgconfig libpng; then HAS_LIBPNG=1 else - for i in "${DIRS[@]}"; do - DIR=($i) - PNGH=$(find_h "${DIR[0]}" "png.h") + # destroys positional parameters + set -- ${DIRS} + while [ -n "$1" -a -n "$2" ]; do + DIRS_h="$1" + DIRS_l="$2" + shift 2 + + PNGH=$(find_h "${DIRS_h}" "png.h") if [ -n "$PNGH" ]; then PNGH_STRING=$(pngh_string "$PNGH") PNGH_MAJMIN=$(pngh_majmin "$PNGH") - if [[ -n "$PNGH_STRING" && -n "$PNGH_MAJMIN" ]]; then - LIBPNGSO=$(find_f "${DIR[1]}" "libpng${PNGH_MAJMIN}.$SOLIBSUFFIX*") + if [ -n "$PNGH_STRING" -a -n "$PNGH_MAJMIN" ]; then + LIBPNGSO=$(find_f "${DIRS_l}" "libpng${PNGH_MAJMIN}.$SOLIBSUFFIX*") if [ -n "$LIBPNGSO" ]; then cflags "-I${PNGH%/*}" lflags "-L${LIBPNGSO%/*} -lpng${PNGH_MAJMIN}" -@@ -482,7 +485,7 @@ +@@ -467,7 +468,7 @@ fi fi if [ "$HAS_LIBPNG" -eq 0 ]; then - if [[ "$OSTYPE" =~ "darwin" ]]; then + if echo "$OSTYPE" | grep -q "darwin"; then LIBPNG_CMD='`brew install libpng`' else LIBPNG_CMD='`apt-get install libpng16-dev` or `apt-get install libpng-dev` or `yum install libpng-devel`' -@@ -550,6 +553,6 @@ +@@ -534,6 +535,6 @@ SOLIBSUFFIX = $SOLIBSUFFIX STATICLIBDEPS = $STATICLIBDEPS LIQSRCDIR = $LIQSRCDIR -LIQCONFIGUREFLAGS = $(printf "'%s' " "${LIQCONFIGURE[@]}") +LIQCONFIGUREFLAGS = "$LIQCONFIGURE" " > "$CONFIG" Index: head/graphics/pngquant/files/patch-lib_configure =================================================================== --- head/graphics/pngquant/files/patch-lib_configure (revision 476173) +++ head/graphics/pngquant/files/patch-lib_configure (revision 476174) @@ -1,69 +1,69 @@ Index: lib/configure @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh CONFIG="config.mk" PREFIX="/usr/local" -@@ -86,7 +86,7 @@ +@@ -105,7 +105,7 @@ # If someone runs sudo make install as very first command, and configure later, # $CONFIG cannot be overwritten, and must be deleted before continuing. -if [[ -f "$CONFIG" && ! -w "$CONFIG" ]]; then +if [ -f "$CONFIG" -a ! -w "$CONFIG" ]; then echo "Cannot overwrite file $CONFIG! Please delete it." exit 1 fi -@@ -146,12 +146,8 @@ +@@ -167,12 +167,8 @@ # SSE if [ "$SSE" = 'auto' ]; then SSE=0 - if type uname > /dev/null; then - if [[ "$(uname -m)" =~ "amd64" || "$(uname -m)" =~ "x86_64" || - "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then - SSE=1 - fi - fi + echo $(uname -m) | grep -E -q '(amd|x86_)64' && SSE=1 + grep -E -m1 -q '^flags.*sse' /proc/cpuinfo 2>/dev/null && SSE=1 fi if [ "$SSE" -eq 1 ]; then -@@ -174,9 +170,8 @@ +@@ -195,9 +191,8 @@ else OPENMPFLAGS="-fopenmp" fi - if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP - #include - #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then + if echo "$(printf '#ifdef _OPENMP\n#include \n#endif\n' | \ + "$CC" -xc -E $OPENMPFLAGS - 2>&1)" | grep -q omp_get_thread_num; then cflags "$OPENMPFLAGS" lflags "$OPENMPFLAGS" status "OpenMP" "yes" -@@ -191,20 +186,20 @@ +@@ -212,20 +207,20 @@ fi # Cocoa -if [[ "$OSTYPE" =~ "darwin" ]]; then +if echo "$OSTYPE" | grep -q "darwin" ; then - cflags "-mmacosx-version-min=10.6" - lflags "-mmacosx-version-min=10.6" + cflags "-mmacosx-version-min=10.7" + lflags "-mmacosx-version-min=10.7" fi -if [[ "$OSTYPE" =~ "darwin" ]]; then +if echo "$OSTYPE" | grep -q "darwin" ; then SOLIBSUFFIX=dylib # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones XCODE_CMD="xcode-select" XCODE_PATH=$($XCODE_CMD -p) - 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") - 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") -elif [[ "$OSTYPE" =~ "msys" ]]; then + DIRS="$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" + DIRS="$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" +elif echo "$OSTYPE" | grep -q "msys" ; then SOLIBSUFFIX=dll else SOLIBSUFFIX=so