ports/188476: [PATCH] sysutils/bbcp fix build with clang

Pawel Pekala pawel at FreeBSD.org
Fri Apr 11 20:20:00 UTC 2014


>Number:         188476
>Category:       ports
>Synopsis:       [PATCH] sysutils/bbcp 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:   Fri Apr 11 20:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Pawel Pekala
>Release:        10.0
>Organization:
>Environment:
FreeBSD caprica.slowicza.org 10.0-STABLE FreeBSD 10.0-STABLE #2 r262297: Fri Feb 21 17:42:25 CET 2014     root at caprica.slowicza.org:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
- Fix build with clang on 10.0 and upwards
- Convert port to current standards
- Add staging support
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(wersja 351019)
+++ Makefile	(kopia robocza)
@@ -13,22 +13,23 @@
 
 LICENSE=	BSD
 
+USES=		tar:xz
+
 BUILD_WRKSRC=	${WRKSRC}/src
+MAKE_ARGS=	BSDcc=${CC} BSDCC=${CXX}
+
 PLIST_FILES=	bin/bbcp
 PORTDOCS=	${PORTNAME}.pdf
-USE_XZ=		yes
 
-NO_STAGE=	yes
-
 OPTIONS_DEFINE=	DOCS
 
-.include <bsd.port.options.mk>
+post-patch:
+	@${REINPLACE_CMD} 's|main|int &|' ${WRKSRC}/src/bbcp.C
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/bbcp ${PREFIX}/bin
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-20100818.pdf ${DOCSDIR}/${PORTNAME}.pdf
-.endif
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/bbcp ${STAGEDIR}${PREFIX}/bin
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${DISTDIR}/${PORTNAME}-20100818.pdf \
+		${STAGEDIR}${DOCSDIR}/${PORTNAME}.pdf
 
 .include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list