summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanilo <danilo@FreeBSD.org>2013-12-17 19:06:13 +0000
committerdanilo <danilo@FreeBSD.org>2013-12-17 19:06:13 +0000
commitf2458cb11aa3228c0be170c4214a91c24f419d16 (patch)
tree39835b25d3efdb60a944fbafeae8a8fe1d38571e
parent164d4de1e018c3ed7f39d28312b762f1ef3467eb (diff)
downloadFreeBSD-ports-f2458cb11aa3228c0be170c4214a91c24f419d16.zip
FreeBSD-ports-f2458cb11aa3228c0be170c4214a91c24f419d16.tar.gz
- Update from 2.5 to 2.6
- Convert USE_DOS2UNIX to USES - Add stage support PR: ports/184907 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
-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 8667b37..1919dd1 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 e5265a3..68e6b5e 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 0000000..aa43517
--- /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
+
OpenPOWER on IntegriCloud