svn commit: r436747 - in head/graphics/pngquant: . files
Alex Kozlov
ak at FreeBSD.org
Wed Mar 22 22:50:18 UTC 2017
Author: ak
Date: Wed Mar 22 22:50:16 2017
New Revision: 436747
URL: https://svnweb.freebsd.org/changeset/ports/436747
Log:
- Update to 2.9.0
- Remove MAKE_ARGS, CPPFLAGS, LDFLAGS - handled by configure
- Use configure to handle DEBUG option
- Add description for OPTIMIZED_FLAGS
- Disable OPENMP option for now - impossible to use without significant
manual intervention on 10.x-11.x (needs devel/llvm39 or modern gcc)
- Use configure to handle SSE option (only provided on i386/amd64, enabled by default on amd64)
- Conditionally install DOCS
PR: 217987
Submitted by: Anton Yuzhaninov <citrin+pr at citrin.ru> (except OPENMP stuff)
Modified:
head/graphics/pngquant/Makefile
head/graphics/pngquant/distinfo
head/graphics/pngquant/files/patch-configure
head/graphics/pngquant/files/patch-lib_configure
Modified: head/graphics/pngquant/Makefile
==============================================================================
--- head/graphics/pngquant/Makefile Wed Mar 22 21:36:49 2017 (r436746)
+++ head/graphics/pngquant/Makefile Wed Mar 22 22:50:16 2017 (r436747)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= pngquant
-PORTVERSION= 2.7.2
+PORTVERSION= 2.9.0
DISTVERSIONSUFFIX= -src
CATEGORIES= graphics
MASTER_SITES= http://pngquant.org/
@@ -19,40 +19,35 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVER
USES= gmake pkgconfig
HAS_CONFIGURE= yes
-MAKE_ARGS+= CC="${CC}"
-
-CPPFLAGS+= $$(libpng-config --I_opts)
-LDFLAGS+= $$(libpng-config --ldflags)
PORTDOCS= CHANGELOG README.md
PLIST_FILES= bin/pngquant \
man/man1/pngquant.1.gz
-OPTIONS_DEFINE= OPTIMIZED_FLAGS OPENMP LCMS2 DEBUG DOCS
+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_CFLAGS_OFF= -DNDEBUG
+DEBUG_CONFIGURE_ON= --enable-debug
LCMS2_CONFIGURE_WITH= lcms2
LCMS2_LIB_DEPENDS= liblcms2.so:graphics/lcms2
-OPENMP_LIB_DEPENDS= libomp.so:devel/openmp
-OPENMP_CPPFLAGS= -I${LOCALBASE}/include
-OPENMP_CONFIGURE_ON= --with-openmp
-OPENMP_CONFIGURE_ENV= C_INCLUDE_PATH=${LOCALBASE}/include
-
-OPTIMIZED_FLAGS_CFLAGS= -O3 -fearly-inlining -fstrict-aliasing \
+OPTIMIZED_FLAGS_CFLAGS= -O3 -fstrict-aliasing \
-ffast-math -funroll-loops -fomit-frame-pointer \
-fexpensive-optimizations -ffinite-math-only \
-funsafe-loop-optimizations -ftree-vectorize
-# SSE2 support is always enabled on amd64
-SSE_CFLAGS= -DUSE_SSE=1 -msse2
+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}
Modified: head/graphics/pngquant/distinfo
==============================================================================
--- head/graphics/pngquant/distinfo Wed Mar 22 21:36:49 2017 (r436746)
+++ head/graphics/pngquant/distinfo Wed Mar 22 22:50:16 2017 (r436747)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1476836074
-SHA256 (pngquant-2.7.2-src.tar.gz) = 75801ed048c40cc4bff12773892d16d7ff00c11b9c549845c2133fd3abca17c2
-SIZE (pngquant-2.7.2-src.tar.gz) = 91721
+TIMESTAMP = 1490049268
+SHA256 (pngquant-2.9.0-src.tar.gz) = ed9ae6943a3520c7e14700692ebfbd568dad73790582efaeb4cab93104f21cfc
+SIZE (pngquant-2.9.0-src.tar.gz) = 94747
Modified: head/graphics/pngquant/files/patch-configure
==============================================================================
--- head/graphics/pngquant/files/patch-configure Wed Mar 22 21:36:49 2017 (r436746)
+++ head/graphics/pngquant/files/patch-configure Wed Mar 22 22:50:16 2017 (r436747)
@@ -1,11 +1,12 @@
-Index: configure
+--- configure.orig 2017-03-02 11:48:03 UTC
++++ configure
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
CONFIG="config.mk"
PREFIX="/usr/local"
-@@ -8,7 +8,7 @@ DEBUG=
+@@ -14,7 +14,7 @@ DEBUG=
SSE=auto
OPENMP=
LIBPNG_DIR=.
@@ -14,7 +15,7 @@ Index: configure
COCOA_READER=auto
LCMS2=0
else
-@@ -38,7 +38,7 @@ for i in "$@"; do
+@@ -44,7 +44,7 @@ for i in "$@"; do
echo
help "--with-openmp=static compile with multicore support"
help "--with-lcms2/--without-lcms2 compile with color profile support"
@@ -23,7 +24,7 @@ Index: configure
help "--with-cocoa/--without-cocoa use Cocoa framework to read images"
fi
help "--with-libpng=<dir> search for libpng in directory"
-@@ -109,7 +109,7 @@ done
+@@ -115,7 +115,7 @@ done
# If someone runs sudo make install as very first command, and configure later,
# $CONFIG cannot be overwritten, and must be deleted before continuing.
@@ -32,7 +33,7 @@ Index: configure
echo "Cannot overwrite file $CONFIG! Please delete it."
exit 1
fi
-@@ -146,7 +146,7 @@ find_h() {
+@@ -152,7 +152,7 @@ find_h() {
find_pkgconfig() {
local LIBNAME=$1
@@ -41,7 +42,7 @@ Index: configure
cflags "$(pkg-config --cflags "$LIBNAME")"
lflags "$(pkg-config --libs "$LIBNAME")"
status "$LIBNAME" "shared ($(pkg-config --modversion "$LIBNAME"))"
-@@ -210,9 +210,13 @@ find_library() {
+@@ -216,9 +216,13 @@ find_library() {
return 0
fi
@@ -58,20 +59,22 @@ Index: configure
return 0
fi
done
-@@ -262,10 +266,8 @@ fi
-
+@@ -272,12 +276,8 @@ fi
# SSE
if [ "$SSE" = 'auto' ]; then
-- if [[ "$(uname -m)" =~ (amd|x86_)64 ||
-- "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then
-- SSE=1
+ 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
-@@ -288,9 +290,8 @@ if [ -n "$OPENMP" ]; then
+@@ -300,9 +300,8 @@ if [ -n "$OPENMP" ]; then
else
OPENMPFLAGS="-fopenmp"
fi
@@ -83,7 +86,7 @@ Index: configure
cflags "$OPENMPFLAGS"
lflags "$OPENMPFLAGS"
status "OpenMP" "yes"
-@@ -305,11 +306,13 @@ else
+@@ -317,11 +316,13 @@ else
fi
# Cocoa
@@ -99,7 +102,7 @@ Index: configure
COCOA_READER=1
cflags "-DUSE_COCOA=1"
lflags "-framework Cocoa"
-@@ -320,25 +323,24 @@ if [[ "$OSTYPE" =~ "darwin" ]]; then
+@@ -332,25 +333,24 @@ if [[ "$OSTYPE" =~ "darwin" ]]; then
fi
# pairs of possible *.h and lib*.so locations
@@ -133,7 +136,7 @@ Index: configure
else
SOLIBSUFFIX=so
fi
-@@ -350,7 +352,7 @@ HAS_LIBPNG=0
+@@ -362,7 +362,7 @@ HAS_LIBPNG=0
if echo "#include \"png.h\"
int main(){
return !png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
@@ -142,7 +145,7 @@ Index: configure
status "libpng" "custom flags"
HAS_LIBPNG=1
fi
-@@ -361,7 +363,7 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
+@@ -373,7 +373,7 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
if [ -n "$PNGH" ]; then
PNGH_STRING=$(pngh_string "$PNGH")
PNGH_MAJMIN=$(pngh_majmin "$PNGH")
@@ -151,7 +154,7 @@ Index: configure
LIBPNGA=$(find_f "$LIBPNG_DIR" "libpng${PNGH_MAJMIN}.a")
if [ -n "$LIBPNGA" ]; then
cflags "-I${PNGH%/*}"
-@@ -377,14 +379,19 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
+@@ -389,14 +389,19 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
if find_pkgconfig libpng; then
HAS_LIBPNG=1
else
@@ -176,7 +179,7 @@ Index: configure
if [ -n "$LIBPNGSO" ]; then
cflags "-I${PNGH%/*}"
lflags "-L${LIBPNGSO%/*} -lpng${PNGH_MAJMIN}"
-@@ -398,7 +405,7 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
+@@ -410,7 +415,7 @@ if [ "$HAS_LIBPNG" -eq 0 ]; then
fi
fi
if [ "$HAS_LIBPNG" -eq 0 ]; then
Modified: head/graphics/pngquant/files/patch-lib_configure
==============================================================================
--- head/graphics/pngquant/files/patch-lib_configure Wed Mar 22 21:36:49 2017 (r436746)
+++ head/graphics/pngquant/files/patch-lib_configure Wed Mar 22 22:50:16 2017 (r436747)
@@ -1,11 +1,12 @@
-Index: lib/configure
+--- lib/configure.orig 2017-03-02 11:48:03 UTC
++++ lib/configure
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
CONFIG="config.mk"
PREFIX="/usr/local"
-@@ -80,7 +80,7 @@
+@@ -79,7 +79,7 @@ done
# If someone runs sudo make install as very first command, and configure later,
# $CONFIG cannot be overwritten, and must be deleted before continuing.
@@ -14,20 +15,22 @@ Index: lib/configure
echo "Cannot overwrite file $CONFIG! Please delete it."
exit 1
fi
-@@ -135,10 +135,8 @@
-
+@@ -138,12 +138,8 @@ fi
# SSE
if [ "$SSE" = 'auto' ]; then
-- if [[ "$(uname -m)" =~ (amd|x86_)64 ||
-- "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then
-- SSE=1
+ 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
-@@ -161,9 +159,8 @@
+@@ -166,9 +162,8 @@ if [ -n "$OPENMP" ]; then
else
OPENMPFLAGS="-fopenmp"
fi
More information about the svn-ports-all
mailing list