diff options
author | ak <ak@FreeBSD.org> | 2013-11-25 21:35:28 +0800 |
---|---|---|
committer | ak <ak@FreeBSD.org> | 2013-11-25 21:35:28 +0800 |
commit | 7136b191196fd6a9ad85f5e618a2c97c2b422a0c (patch) | |
tree | 98971b70f81b926a85d67652113ba1a18656d737 /graphics | |
parent | 65c96bb702c8275f492e22b1f3345d8d3906c59e (diff) | |
download | freebsd-ports-gnome-7136b191196fd6a9ad85f5e618a2c97c2b422a0c.tar.gz freebsd-ports-gnome-7136b191196fd6a9ad85f5e618a2c97c2b422a0c.tar.zst freebsd-ports-gnome-7136b191196fd6a9ad85f5e618a2c97c2b422a0c.zip |
- Fix build with clang
- Support STAGEDIR
- Convert to new LIB_DEPENDS syntax
PR: ports/184232
Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/png2ico/Makefile | 28 | ||||
-rw-r--r-- | graphics/png2ico/files/patch-Makefile | 11 | ||||
-rw-r--r-- | graphics/png2ico/files/patch-png2ico.cpp | 10 |
3 files changed, 24 insertions, 25 deletions
diff --git a/graphics/png2ico/Makefile b/graphics/png2ico/Makefile index 1cd0c6ab7002..759633154c94 100644 --- a/graphics/png2ico/Makefile +++ b/graphics/png2ico/Makefile @@ -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) -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> diff --git a/graphics/png2ico/files/patch-Makefile b/graphics/png2ico/files/patch-Makefile deleted file mode 100644 index aa187111bd1f..000000000000 --- a/graphics/png2ico/files/patch-Makefile +++ /dev/null @@ -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/' >$@ diff --git a/graphics/png2ico/files/patch-png2ico.cpp b/graphics/png2ico/files/patch-png2ico.cpp new file mode 100644 index 000000000000..1b0ea65710b1 --- /dev/null +++ b/graphics/png2ico/files/patch-png2ico.cpp @@ -0,0 +1,10 @@ +--- png2ico.cpp.orig ++++ png2ico.cpp +@@ -33,6 +33,7 @@ + + + #include <cstdio> ++#include <cstdlib> + #include <vector> + #include <climits> + |