Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2014 12:34:07 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363576 - head/net/mgen
Message-ID:  <201407311234.s6VCY7HG066128@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Thu Jul 31 12:34:06 2014
New Revision: 363576
URL: http://svnweb.freebsd.org/changeset/ports/363576
QAT: https://qat.redports.org/buildarchive/r363576/

Log:
  Stage and fix build without gcc.

Modified:
  head/net/mgen/Makefile

Modified: head/net/mgen/Makefile
==============================================================================
--- head/net/mgen/Makefile	Thu Jul 31 12:23:03 2014	(r363575)
+++ head/net/mgen/Makefile	Thu Jul 31 12:34:06 2014	(r363576)
@@ -18,28 +18,31 @@ ONLY_FOR_ARCHS=	i386
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 USES=		gmake tar:tgz
+MAKEFILE=	Makefile.freebsd
 
 PLIST_FILES=	bin/mgen
 PORTDOCS=	README.TXT VERSION.TXT mgen.html example.mgn
 
-NO_STAGE=	yes
+OPTIONS_DEFINE=	DOCS
+
 post-patch:
-	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/unix/Makefile.common \
+	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
+		${WRKSRC}/unix/Makefile.common \
 		${WRKSRC}/protolib/unix/Makefile.common
 
-	@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g' ${WRKSRC}/unix/Makefile.freebsd \
-	                ${WRKSRC}/protolib/unix/Makefile.freebsd
+	@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g; \
+		s|g++|${CXX}|; s|gcc|${CC}|; /CFLAGS =/s|$$|${CFLAGS}|' \
+		${WRKSRC}/unix/Makefile.freebsd \
+		${WRKSRC}/protolib/unix/Makefile.freebsd
 
 do-build:
-	cd ${WRKSRC}/unix && ${MAKE_CMD} -f Makefile.freebsd ${PORTNAME}
+	${DO_MAKE_BUILD} -C ${WRKSRC}/unix ${PORTNAME}
 
 do-install:
-	${INSTALL_PROGRAM}	${WRKSRC}/unix/mgen ${PREFIX}/bin
-.ifndef(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/unix/mgen ${STAGEDIR}${PREFIX}/bin
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for FILE in ${PORTDOCS}
-	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
 .endfor
-.endif
 
 .include <bsd.port.mk>



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