Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 02:47:57 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/184814: ftp/multiget: Fix build with clang
Message-ID:  <20131217024757.875789d9cb9c227678d3c07f@yahoo.com>
Resent-Message-ID: <201312161810.rBGIA1Fg015803@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184814
>Category:       ports
>Synopsis:       ftp/multiget: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Add DESKTOP_ENTRIES

New file:
files/patch-common.cpp
files/patch-mgftpbase.cpp

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/ftp/multiget/Makefile ftp/multiget/Makefile
--- /usr/ports/ftp/multiget/Makefile	2013-11-06 21:49:12.000000000 +0900
+++ ftp/multiget/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -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>
diff -urN /usr/ports/ftp/multiget/files/patch-common.cpp ftp/multiget/files/patch-common.cpp
--- /usr/ports/ftp/multiget/files/patch-common.cpp	1970-01-01 09:00:00.000000000 +0900
+++ ftp/multiget/files/patch-common.cpp	2013-12-17 00:00:00.000000000 +0900
@@ -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"
diff -urN /usr/ports/ftp/multiget/files/patch-mgftpbase.cpp ftp/multiget/files/patch-mgftpbase.cpp
--- /usr/ports/ftp/multiget/files/patch-mgftpbase.cpp	1970-01-01 09:00:00.000000000 +0900
+++ ftp/multiget/files/patch-mgftpbase.cpp	2013-12-17 00:00:00.000000000 +0900
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024757.875789d9cb9c227678d3c07f>