Bug 184814 - ftp/multiget: Fix build with clang
Summary: ftp/multiget: Fix build with clang
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: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-19 14:20 UTC (History)
0 users

See Also:


Attachments
file.diff (2.41 KB, patch)
2013-12-16 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-12-16 18:10:01 UTC
- Fix build with clang
- Add DESKTOP_ENTRIES

New file:
files/patch-common.cpp
files/patch-mgftpbase.cpp
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 13:45:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-19 14:02:58 UTC
Author: pawel
Date: Thu Dec 19 14:02:50 2013
New Revision: 336908
URL: http://svnweb.freebsd.org/changeset/ports/336908

Log:
  - Fix build with clang
  - Add desktop entry file
  - Support staging
  
  PR:		ports/184814
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/ftp/multiget/files/
  head/ftp/multiget/files/patch-common.cpp   (contents, props changed)
  head/ftp/multiget/files/patch-mgftpbase.cpp   (contents, props changed)
Modified:
  head/ftp/multiget/Makefile   (contents, props changed)

Modified: head/ftp/multiget/Makefile
==============================================================================
--- head/ftp/multiget/Makefile	Thu Dec 19 13:53:30 2013	(r336907)
+++ head/ftp/multiget/Makefile	Thu Dec 19 14:02:50 2013	(r336908)
@@ -3,29 +3,40 @@
 
 PORTNAME=	multiget
 PORTVERSION=	1.1.3
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	ftp www
 MASTER_SITES=	SF/${PORTNAME}/OldFiles
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	An http/ftp downloader with a nice GUI
+COMMENT=	HTTP/FTP downloader with a nice GUI
 
+WRKSRC_SUBDIR=	src
+
+USES=		dos2unix
 USE_WX=		2.6+
 MAKEFILE=	makefile
 ALL_TARGET=	MultiGet
-WRKSRC=		${WRKDIR}/${DISTNAME}/src
 
-PLIST_FILES=	bin/${PORTNAME}
+PLIST_FILES=	bin/${PORTNAME} share/pixmaps/MultiGet.png
+
+DESKTOP_ENTRIES="MultiGet" "" "${PREFIX}/share/pixmaps/MultiGet.png" \
+		"${PORTNAME}" "" ""
 
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|g++|${CXX}|; \
-		 s|\(CFLAGS\) =|\1 +=|; \
-		 s|wx-config|${WX_CONFIG}|' \
+		's|$$(CC)|$$(CXX)| ; \
+		 s|$$(CFLAGS)|$$(CXXFLAGS)| ; \
+		 s|^CC =|CXX ?=| ; \
+		 s|^CFLAGS =|CXXFLAGS +=| ; \
+		 s| -O2 | | ; \
+		 s| -s | | ; \
+		 s|wx-config|$${WX_CONFIG}|' \
 		 ${WRKSRC}/${MAKEFILE}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/MultiGet ${PREFIX}/bin/${PORTNAME}
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} MultiGet \
+		${STAGEDIR}${PREFIX}/bin/${PORTNAME})
+	(cd ${WRKSRC}/.. && ${INSTALL_DATA} MultiGet.png \
+		${STAGEDIR}${PREFIX}/share/pixmaps)
 
 .include <bsd.port.mk>

Added: head/ftp/multiget/files/patch-common.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ftp/multiget/files/patch-common.cpp	Thu Dec 19 14:02:50 2013	(r336908)
@@ -0,0 +1,11 @@
+--- common.cpp.orig
++++ common.cpp
+@@ -22,6 +22,8 @@
+  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ 
++#include <cstdlib>
++
+ #include "common.h"
+ #include "speedctrl.h"
+ #include "mirroradmin.h"

Added: head/ftp/multiget/files/patch-mgftpbase.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/ftp/multiget/files/patch-mgftpbase.cpp	Thu Dec 19 14:02:50 2013	(r336908)
@@ -0,0 +1,11 @@
+--- mgftpbase.cpp.orig
++++ mgftpbase.cpp
+@@ -22,6 +22,8 @@
+  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  */
+ 
++#include <cstdlib>
++
+ #ifdef WIN32
+ #include <winsock2.h>
+ #endif
_______________________________________________
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 Pawel Pekala freebsd_committer freebsd_triage 2013-12-19 14:03:11 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-19 14:11:38 UTC
Author: bapt
Date: Thu Dec 19 14:11:30 2013
New Revision: 336914
URL: http://svnweb.freebsd.org/changeset/ports/336914

Log:
  MFH: r336908
  
  - Fix build with clang
  - Add desktop entry file
  - Support staging
  
  PR:		ports/184814
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  branches/2014Q1/ftp/multiget/files/
     - copied from r336908, head/ftp/multiget/files/
Modified:
  branches/2014Q1/ftp/multiget/Makefile   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/ftp/multiget/Makefile
==============================================================================
--- branches/2014Q1/ftp/multiget/Makefile	Thu Dec 19 14:10:15 2013	(r336913)
+++ branches/2014Q1/ftp/multiget/Makefile	Thu Dec 19 14:11:30 2013	(r336914)
@@ -3,29 +3,40 @@
 
 PORTNAME=	multiget
 PORTVERSION=	1.1.3
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	ftp www
 MASTER_SITES=	SF/${PORTNAME}/OldFiles
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	An http/ftp downloader with a nice GUI
+COMMENT=	HTTP/FTP downloader with a nice GUI
 
+WRKSRC_SUBDIR=	src
+
+USES=		dos2unix
 USE_WX=		2.6+
 MAKEFILE=	makefile
 ALL_TARGET=	MultiGet
-WRKSRC=		${WRKDIR}/${DISTNAME}/src
 
-PLIST_FILES=	bin/${PORTNAME}
+PLIST_FILES=	bin/${PORTNAME} share/pixmaps/MultiGet.png
+
+DESKTOP_ENTRIES="MultiGet" "" "${PREFIX}/share/pixmaps/MultiGet.png" \
+		"${PORTNAME}" "" ""
 
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|g++|${CXX}|; \
-		 s|\(CFLAGS\) =|\1 +=|; \
-		 s|wx-config|${WX_CONFIG}|' \
+		's|$$(CC)|$$(CXX)| ; \
+		 s|$$(CFLAGS)|$$(CXXFLAGS)| ; \
+		 s|^CC =|CXX ?=| ; \
+		 s|^CFLAGS =|CXXFLAGS +=| ; \
+		 s| -O2 | | ; \
+		 s| -s | | ; \
+		 s|wx-config|$${WX_CONFIG}|' \
 		 ${WRKSRC}/${MAKEFILE}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/MultiGet ${PREFIX}/bin/${PORTNAME}
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} MultiGet \
+		${STAGEDIR}${PREFIX}/bin/${PORTNAME})
+	(cd ${WRKSRC}/.. && ${INSTALL_DATA} MultiGet.png \
+		${STAGEDIR}${PREFIX}/share/pixmaps)
 
 .include <bsd.port.mk>
_______________________________________________
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"