Bug 184232 - graphics/png2ico: Fix build
Summary: graphics/png2ico: Fix build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 18:10 UTC by tkato432
Modified: 2013-11-25 13:40 UTC (History)
0 users

See Also:


Attachments
file.diff (2.37 KB, patch)
2013-11-24 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-11-24 18:10:04 UTC
- Fix build

New file:
files/patch-png2ico.cpp

Remove file:
files/patch-Makefile
Comment 1 Alex Kozlov freebsd_committer freebsd_triage 2013-11-25 13:21:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-11-25 13:35:36 UTC
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>
+
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2013-11-25 13:35:54 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!