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 +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 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 ++#include + #include + #include +