Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2013 13:35:29 +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: r334849 - in head/graphics/png2ico: . files
Message-ID:  <201311251335.rAPDZTj8056023@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ak
Date: Mon Nov 25 13:35:28 2013
New Revision: 334849
URL: http://svnweb.freebsd.org/changeset/ports/334849

Log:
  - Fix build with clang
  - Support STAGEDIR
  - Convert to new LIB_DEPENDS syntax
  
  PR:	ports/184232
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/graphics/png2ico/files/patch-png2ico.cpp   (contents, props changed)
Deleted:
  head/graphics/png2ico/files/patch-Makefile
Modified:
  head/graphics/png2ico/Makefile

Modified: head/graphics/png2ico/Makefile
==============================================================================
--- head/graphics/png2ico/Makefile	Mon Nov 25 13:18:42 2013	(r334848)
+++ head/graphics/png2ico/Makefile	Mon Nov 25 13:35:28 2013	(r334849)
@@ -13,24 +13,24 @@ COMMENT=	Converts PNG files to Windows i
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png
-
-MAN1=		png2ico.1
-PLIST_FILES=	bin/png2ico
-PORTDOCS=	bmp.txt
+LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+CPPFLAGS+=	$$(libpng-config --cflags)
+LDFLAGS+=	$$(libpng-config --ldflags)
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/doc/${MAN1} ${MAN1PREFIX}/man/man1
+PORTDOCS=	bmp.txt
+PLIST_FILES=	bin/png2ico man/man1/png2ico.1.gz
+
+do-build:
+	(cd ${WRKSRC} && ${CXX} ${CXXFLAGS} ${CPPFLAGS} -o png2ico \
+		png2ico.cpp ${LDFLAGS})
 
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
-.endif
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/png2ico ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/doc/png2ico.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Added: head/graphics/png2ico/files/patch-png2ico.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/png2ico/files/patch-png2ico.cpp	Mon Nov 25 13:35:28 2013	(r334849)
@@ -0,0 +1,10 @@
+--- png2ico.cpp.orig
++++ png2ico.cpp
+@@ -33,6 +33,7 @@
+ 
+ 
+ #include <cstdio>
++#include <cstdlib>
+ #include <vector>
+ #include <climits>
+



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