Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2014 12:01:17 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r339002 - head/lang/modula3
Message-ID:  <201401071201.s07C1Hoc088386@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Tue Jan  7 12:01:16 2014
New Revision: 339002
URL: http://svnweb.freebsd.org/changeset/ports/339002

Log:
  lang/modula3: Support FreeBSD 10+
  
  It appears that modula3 will segfault if debug information is not
  generated in stabs format.  Clang doesn't recognize -gstabs+ options,
  but removing it results in lots of segfaults early during the build.
  
  By setting USE_GCC=any, FreeBSD 9 and below will use the base gcc 4.2.1
  and FreeBSD10 and later will need lang/gcc.  Verified on Redports.
  
  While here, make sure .bak files do not get installed into stage by
  using 'sed -i ""' rather than ${REINPLACE_CMD} which equals 'sed -i.bak'.

Modified:
  head/lang/modula3/Makefile

Modified: head/lang/modula3/Makefile
==============================================================================
--- head/lang/modula3/Makefile	Tue Jan  7 11:40:58 2014	(r339001)
+++ head/lang/modula3/Makefile	Tue Jan  7 12:01:16 2014	(r339002)
@@ -3,6 +3,7 @@
 
 PORTNAME=	modula3
 PORTVERSION=	5.8.6
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	https://modula3.elegosoft.com/cm3/releng/ \
 		http://downloads.dragonlace.net/m3/ \
@@ -26,6 +27,7 @@ USES=		gmake
 USE_PGSQL=	yes
 USE_XORG=	xaw xmu xext xt sm ice x11
 USE_GL=		gl glu
+USE_GCC=	any
 NO_MTREE=	yes
 
 MAKE_ENV+=	CM3_INSTALL="${STAGEDIR}${PREFIX}" \
@@ -70,11 +72,16 @@ do-extract:
 	@(cd ${WRKDIR} && tar -xf ${DISTDIR}/${BOOTDIST:C/:[^:]+$//})
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
+# Use sed -i instead of ${REINPLACE_CMD} because we don't want .bak files
+# installed in the final product which comes from config-no-install dir.
+	@${SED} -i "" -e 's|/usr/local|${PREFIX}|g' \
 	    -e 's|\\\\$$ORIGIN"|${PREFIX}/lib"|' \
 	    ${WRKSRC}/m3-sys/cminstall/src/config-no-install/FreeBSD.common
-	@${REINPLACE_CMD} -e 's|/usr/X11R6|${PREFIX}|g' \
+	@${SED} -i "" -e 's|/usr/X11R6|${PREFIX}|g' \
 	    ${WRKSRC}/m3-sys/cminstall/src/config-no-install/Unix.common
+	@${SED} -i "" -e 's/^SYSTEM_CC = ".* -gs/SYSTEM_CC = "${CC} -gs/' \
+	    ${WRKDIR}/bootstrap/etc/modula3/AMD64_FREEBSD \
+	    ${WRKSRC}/m3-sys/cminstall/src/config-no-install/AMD64_FREEBSD
 
 do-bootstrap:
 	@(cd ${WRKSRC}; ${SETENV} ${M3MAKE_ENV} ${BOOTCM3} SHIP=${TRUE} \



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