Date: Fri, 12 Feb 2016 20:45:01 +0000 (UTC) From: Alex Kozlov <ak@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r408759 - in head/graphics/pngquant: . files Message-ID: <201602122045.u1CKj1N6029629@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ak Date: Fri Feb 12 20:45:01 2016 New Revision: 408759 URL: https://svnweb.freebsd.org/changeset/ports/408759 Log: - Remove bash dependency - Modernize port Added: head/graphics/pngquant/files/ head/graphics/pngquant/files/patch-lib_configure (contents, props changed) Modified: head/graphics/pngquant/Makefile Modified: head/graphics/pngquant/Makefile ============================================================================== --- head/graphics/pngquant/Makefile Fri Feb 12 20:45:00 2016 (r408758) +++ head/graphics/pngquant/Makefile Fri Feb 12 20:45:01 2016 (r408759) @@ -3,6 +3,7 @@ PORTNAME= pngquant PORTVERSION= 2.5.2 +PORTREVISION= 1 DISTVERSIONSUFFIX= -src CATEGORIES= graphics MASTER_SITES= http://pngquant.org/ @@ -14,7 +15,6 @@ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYRIGHT LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png -BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} @@ -42,14 +42,7 @@ SSE_CFLAGS= -DUSE_SSE=1 -msse2 OPENMP_CFLAGS= -fopenmp OPENMP_LDFLAGS= -lgomp -pthread -.include <bsd.port.options.mk> - -.if empty(PORT_OPTIONS:MDEBUG) -CFLAGS+= -DNDEBUG -.endif - -post-patch: - @${REINPLACE_CMD} -e 's|-$$(MAKEFLAGS)||' ${WRKSRC}/Makefile +DEBUG_CFLAGS_OFF= -DNDEBUG do-install: ${INSTALL_PROGRAM} ${WRKSRC}/pngquant ${STAGEDIR}${PREFIX}/bin Added: head/graphics/pngquant/files/patch-lib_configure ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/pngquant/files/patch-lib_configure Fri Feb 12 20:45:01 2016 (r408759) @@ -0,0 +1,41 @@ +Index: lib/configure +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!/bin/sh + + CONFIG="config.mk" + PREFIX="/usr/local" +@@ -80,7 +80,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 +@@ -135,10 +135,8 @@ + + # SSE + if [ "$SSE" = 'auto' ]; then +- if [[ "$(uname -m)" =~ (amd|x86_)64 || +- "$(grep -E -m1 "^flags" /proc/cpuinfo)" =~ "sse" ]]; then +- SSE=1 +- 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 @@ + else + OPENMPFLAGS="-fopenmp" + fi +- if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP +- #include <omp.h> +- #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then ++ if echo "$(printf '#ifdef _OPENMP\n#include <omp.h>\n#endif\n' | \ ++ "$CC" -xc -E $OPENMPFLAGS - 2>&1)" | grep -q omp_get_thread_num; then + cflags "$OPENMPFLAGS" + lflags "$OPENMPFLAGS" + status "OpenMP" "yes"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602122045.u1CKj1N6029629>