Skip to content
Permalink
Browse files

pngquant: new port, version 2.1.0 (https://trac.macports.org/ticket/4…

…2730)

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@117656 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Mar 7, 2014
1 parent 9ac4572 commit 3933a546d3b922c36f1a1e8e241fd2bcc3792078
Showing with 93 additions and 0 deletions.
  1. +58 −0 graphics/pngquant/Portfile
  2. +35 −0 graphics/pngquant/files/patch-Makefile.diff
@@ -0,0 +1,58 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem 1.0
PortGroup github 1.0

github.setup pornel pngquant 2.1.0
categories graphics
platforms darwin
maintainers gmail.com:lpancescu
license BSD

description command-line utility and library for lossy compression of PNG images.

long_description pngquant is a ${description}. \
The conversion reduces file sizes significantly (often as \
much as 70%) and preserves full alpha transparency. \
Generated images are compatible with all modern web \
browsers, and have better fallback in IE6 than 24-bit PNGs.

homepage http://pngquant.org/
master_sites ${homepage}
use_bzip2 yes
distfiles ${name}-${version}-src${extract.suffix}

checksums rmd160 f76bf91ed33b00eb5f5daf1e3b03ffe1170d5707 \
sha256 ef41138ff320495c785155eb9f774ae6e1d41978b3e490854e6a8c46c0b032e2

depends_lib port:libpng \
port:zlib

patchfiles patch-Makefile.diff

use_configure no

variant universal {}

build.env-append PREFIX=${prefix} \
CC=${configure.cc} \
CFLAGSADD="[get_canonical_archflags cc]" \
LDFLAGSADD="[get_canonical_archflags ld]" \
ARFLAGS=rsv

eval destroot.env-append ${build.env}

post-destroot {
set docdir ${prefix}/share/doc/${subport}
xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} \
CHANGELOG \
COPYRIGHT \
README.md \
${destroot}${docdir}
}

livecheck.type regex
livecheck.url ${homepage}releases.html
livecheck.regex ${name}-(\[0-9.\]+)-src${extract.suffix}
@@ -0,0 +1,35 @@
--- Makefile.orig 2014-02-26 16:33:10.000000000 -0600
+++ Makefile 2014-03-07 01:04:08.000000000 -0600
@@ -15,10 +15,10 @@

CFLAGSOPT ?= -DNDEBUG -O3 -ffast-math -funroll-loops -fomit-frame-pointer

-CFLAGS ?= -Wall -Wno-unknown-pragmas -I. -I/usr/local/include/ -I/usr/include/ $(CFLAGSOPT)
+CFLAGS ?= -Wall -Wno-unknown-pragmas -I. -I$(PREFIX)/include -I/usr/include $(CFLAGSOPT)
CFLAGS += -std=c99 $(CFLAGSADD)

-LDFLAGS ?= -L/usr/local/lib/ -L/usr/lib/
+LDFLAGS ?= -L$(PREFIX)/lib -L/usr/lib

ifneq "$(wildcard $(CUSTOMZLIB))" ""
LDFLAGS += -L$(CUSTOMZLIB) -L$(CUSTOMZLIB)/lib
@@ -29,19 +29,6 @@
LDFLAGS += -L$(CUSTOMLIBPNG) -L$(CUSTOMLIBPNG)/lib
CFLAGS += -I$(CUSTOMLIBPNG) -I$(CUSTOMLIBPNG)/include

-else ifneq "$(wildcard /usr/local/include/png.h)" ""
-
-else ifneq "$(wildcard /opt/local/include/libpng15)" ""
-LDFLAGS += -L/opt/local/lib
-CFLAGS += -I/opt/local/include/libpng15
-
-else ifneq "$(wildcard /opt/X11/include/libpng15/)" ""
-LDFLAGS += -L/opt/X11/lib
-CFLAGS += -I/opt/X11/include/libpng15/
-
-else ifneq "$(wildcard /usr/X11/lib/)" ""
-LDFLAGS += -L/usr/X11/lib/
-CFLAGS += -I/usr/X11/include/
endif

LDFLAGS += -lpng -lz -lm lib/libimagequant.a -lm $(LDFLAGSADD)

0 comments on commit 3933a54

Please sign in to comment.
You can’t perform that action at this time.