1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Fix build with clang

- Support STAGEDIR
- Convert to new LIB_DEPENDS syntax

PR:	ports/184232
Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
This commit is contained in:
Alex Kozlov 2013-11-25 13:35:28 +00:00
parent 1cbb04d36f
commit 3686896291
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=334849
3 changed files with 24 additions and 25 deletions

View File

@ -13,24 +13,24 @@ COMMENT= Converts PNG files to Windows icon resource files
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)
PORTDOCS= bmp.txt
PLIST_FILES= bin/png2ico man/man1/png2ico.1.gz
do-build:
(cd ${WRKSRC} && ${CXX} ${CXXFLAGS} ${CPPFLAGS} -o png2ico \
png2ico.cpp ${LDFLAGS})
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doc/${MAN1} ${MAN1PREFIX}/man/man1
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
.endif
${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>

View File

@ -1,11 +0,0 @@
--- Makefile.orig Mon Oct 17 13:19:41 2005
+++ Makefile Mon Oct 17 13:21:09 2005
@@ -5,7 +5,7 @@
all: png2ico
png2ico: png2ico.cpp
- g++ $(CPPFLAGS) $(DEBUG) -o $@ $< -lpng -lz -lm
+ $(CXX) $(CXXFLAGS) -I$(LOCALBASE)/include -L$(LOCALBASE)/lib -o $@ $< -lpng -lz -lm
doc/png2ico.txt: doc/png2ico.1
man $< |sed -e $$'s/.\b\\(.\\)/\\1/g' -e 's/\(.*\)/\1'$$'\r/' >$@

View File

@ -0,0 +1,10 @@
--- png2ico.cpp.orig
+++ png2ico.cpp
@@ -33,6 +33,7 @@
#include <cstdio>
+#include <cstdlib>
#include <vector>
#include <climits>