aboutsummaryrefslogtreecommitdiff
path: root/graphics/apngdis
diff options
context:
space:
mode:
authorDanilo Egea Gondolfo <danilo@FreeBSD.org>2013-12-17 19:06:13 +0000
committerDanilo Egea Gondolfo <danilo@FreeBSD.org>2013-12-17 19:06:13 +0000
commita9b667385e49ae8c90aaddd78ea0286f7064ffba (patch)
tree39835b25d3efdb60a944fbafeae8a8fe1d38571e /graphics/apngdis
parent783e2a375cbff8195b822219d67e0b5b8ec40228 (diff)
downloadports-a9b667385e49ae8c90aaddd78ea0286f7064ffba.tar.gz
ports-a9b667385e49ae8c90aaddd78ea0286f7064ffba.zip
Notes
Diffstat (limited to 'graphics/apngdis')
-rw-r--r--graphics/apngdis/Makefile34
-rw-r--r--graphics/apngdis/distinfo4
-rw-r--r--graphics/apngdis/files/patch-Makefile24
3 files changed, 40 insertions, 22 deletions
diff --git a/graphics/apngdis/Makefile b/graphics/apngdis/Makefile
index 8667b37ecd43..1919dd1cfc4e 100644
--- a/graphics/apngdis/Makefile
+++ b/graphics/apngdis/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= apngdis
-PORTVERSION= 2.5
+PORTVERSION= 2.6
DISTVERSIONSUFFIX=-src
CATEGORIES= graphics
MASTER_SITES= SF/${PORTNAME}/${PORTVERSION}
@@ -12,36 +12,30 @@ COMMENT= Deconstructs APNG files into individual frames
LICENSE= ZLIB
+OPTIONS_DEFINE= DOCS STATIC
+
NO_WRKSUBDIR= yes
-USE_DOS2UNIX= yes
USE_ZIP= yes
-
-LDFLAGS+= -lz
-
-PLIST_FILES= bin/${PORTNAME}
+USES= dos2unix gmake
PORTDOCS= readme.txt
+PLIST_FILES= bin/${PORTNAME}
-OPTIONS_DEFINE= DOCS STATIC
+STATIC_BUILD_DEPENDS= ${LOCALBASE}/lib/libpng.a:${PORTSDIR}/graphics/png
+STATIC_MAKE_ENV= STATIC=1
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MSTATIC}
-LDFLAGS+= -static
+.if ! ${PORT_OPTIONS:MSTATIC}
+LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png
.endif
-do-build:
- cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} ${PORTNAME}.c \
- -o ${PORTNAME} ${LDFLAGS}
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin)
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} \
+ ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>
diff --git a/graphics/apngdis/distinfo b/graphics/apngdis/distinfo
index e5265a30d65b..68e6b5e101f5 100644
--- a/graphics/apngdis/distinfo
+++ b/graphics/apngdis/distinfo
@@ -1,2 +1,2 @@
-SHA256 (apngdis-2.5-src.zip) = 684ef8da1688c8fdb1a3dfe742fcf344bfff23b701fb31cea2ece7b2a272faec
-SIZE (apngdis-2.5-src.zip) = 9085
+SHA256 (apngdis-2.6-src.zip) = f2bed6570bd73155f2f729920398b141028bc4bf74dc0d621feb27b810231a17
+SIZE (apngdis-2.6-src.zip) = 450493
diff --git a/graphics/apngdis/files/patch-Makefile b/graphics/apngdis/files/patch-Makefile
new file mode 100644
index 000000000000..aa4351749469
--- /dev/null
+++ b/graphics/apngdis/files/patch-Makefile
@@ -0,0 +1,24 @@
+--- Makefile.orig
++++ Makefile
+@@ -1,11 +1,16 @@
+ PACKAGE = apngdis
+-CC = gcc
+-CFLAGS = -Wall -pedantic
+-CFLAGS_OPT = -O2
+-LIBS = -lstdc++ -lm -lpng -lz
++CXX ?= c++
++CXXFLAGS += -Wall -pedantic
++CPPFLAGS += $(shell libpng-config --cflags)
++ifeq ($(strip $(STATIC)),)
++LIBS = $(shell libpng-config --ldflags)
++else
++LIBS = $(shell libpng-config --static --ldflags)
++LDFLAGS += -static
++endif
+
+ all :
+- $(CC) $(CFLAGS) $(CFLAGS_OPT) -o apngdis apngdis.cpp -s $(LIBS)
++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o apngdis apngdis.cpp -s $(LIBS) $(LDFLAGS)
+
+ .PHONY : clean
+