Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 19:06:14 +0000 (UTC)
From:      Danilo Egea Gondolfo <danilo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r336755 - in head/graphics/apngdis: . files
Message-ID:  <201312171906.rBHJ6EVj002954@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danilo
Date: Tue Dec 17 19:06:13 2013
New Revision: 336755
URL: http://svnweb.freebsd.org/changeset/ports/336755

Log:
  - 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>

Added:
  head/graphics/apngdis/files/
  head/graphics/apngdis/files/patch-Makefile   (contents, props changed)
Modified:
  head/graphics/apngdis/Makefile
  head/graphics/apngdis/distinfo

Modified: head/graphics/apngdis/Makefile
==============================================================================
--- head/graphics/apngdis/Makefile	Tue Dec 17 18:52:19 2013	(r336754)
+++ head/graphics/apngdis/Makefile	Tue Dec 17 19:06:13 2013	(r336755)
@@ -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 in
 
 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>

Modified: head/graphics/apngdis/distinfo
==============================================================================
--- head/graphics/apngdis/distinfo	Tue Dec 17 18:52:19 2013	(r336754)
+++ head/graphics/apngdis/distinfo	Tue Dec 17 19:06:13 2013	(r336755)
@@ -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

Added: head/graphics/apngdis/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/apngdis/files/patch-Makefile	Tue Dec 17 19:06:13 2013	(r336755)
@@ -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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312171906.rBHJ6EVj002954>