Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2013 08:34:48 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r323775 - head/lang/moscow_ml
Message-ID:  <201307270834.r6R8YmKT000795@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sat Jul 27 08:34:48 2013
New Revision: 323775
URL: http://svnweb.freebsd.org/changeset/ports/323775

Log:
  - Fix Makefile header, normalize COMMENT text
  - Drop explicit shlib ABI versions from LIB_DEPENDS
  - Do not redefine PKGMESSAGE, adding it to SUB_FILES does it automagically
  - Do not terminate RESTRICTED message with a dot
  - Add a comment about possible abuse of USE_PERL5
  - Mute post-patch target to match default ports' behavior closely
  - Do not abuse ALL_TARGET to pass variables to downstream make(1), use
    MAKE_ARGS properly instead (merge together with MAKE_ENV)
  - Fix inner makefiles and configure script to make port jobs (-jX) safe
  - Pad the output of PKGMESSAGE to be consistent with the package
  
  Reported by:	pointyhat-west

Modified:
  head/lang/moscow_ml/Makefile

Modified: head/lang/moscow_ml/Makefile
==============================================================================
--- head/lang/moscow_ml/Makefile	Sat Jul 27 08:22:02 2013	(r323774)
+++ head/lang/moscow_ml/Makefile	Sat Jul 27 08:34:48 2013	(r323775)
@@ -1,4 +1,4 @@
-# Created by: chuckr
+# Created by: Chuck Robey <chuckr@FreeBSD.org>
 # $FreeBSD$
 
 PORTNAME=	moscow_ml
@@ -9,27 +9,24 @@ MASTER_SITES=	http://www.itu.dk/~sestoft
 DISTNAME=	mos201src
 
 MAINTAINER=	johans@FreeBSD.org
-COMMENT=	Moscow ML, a lightweight implementation of Standard ML
+COMMENT=	Lightweight implementation of Standard ML
 
-LIB_DEPENDS=	gmp.10:${PORTSDIR}/math/gmp \
-		gdbm.4:${PORTSDIR}/databases/gdbm
+LIB_DEPENDS=	gmp:${PORTSDIR}/math/gmp \
+		gdbm:${PORTSDIR}/databases/gdbm
 
-RESTRICTED=	Restrictions on for-profit distribution.
+RESTRICTED=	Restrictions on for-profit distribution
 
-SUB_FILES=	pkg-message
-ALL_TARGET=	world MOSMLHOME=${MOSMLHOME}
-INSTALL_TARGET=	install MOSMLHOME=${MOSMLHOME}
-WRKSRC=		${WRKDIR}/mosml/src
-USE_PERL5=	yes
-MAKE_ENV+=	DOCSDIR="${DOCSDIR}" \
+USE_PERL5=	yes	# XXX: shouldn't it be changed to USE_PERL5_BUILD?
+ALL_TARGET=	world
+MAKE_ARGS=	MOSMLHOME="${MOSMLHOME}" DOCSDIR="${DOCSDIR}" \
 		LD_RUN_PATH="${PREFIX}/lib/mosml"
-LDFLAGS+=	-L${LOCALBASE}/lib
+WRKSRC=		${WRKDIR}/mosml/src
 
-PKGMESSAGE=	${WRKDIR}/pkgmessage
+LDFLAGS+=	-L${LOCALBASE}/lib
 
-.include <bsd.port.pre.mk>
+SUB_FILES=	pkg-message
 
-post-patch:
+post-patch: .SILENT
 	${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
 		${REINPLACE_CMD} -e "s,-O2,${CFLAGS} -I${LOCALBASE}/include,"
 	${FIND} ${WRKDIR}/mosml/examples -name Makefile -o \
@@ -38,12 +35,19 @@ post-patch:
 	${FIND} ${WRKDIR}/mosml/examples -name Makefile -o \
 		-name Makefile.stub | ${XARGS} ${REINPLACE_CMD} -e \
 		"s,^MOSMLTOOLS=.*,MOSMLTOOLS=camlrunm ${PREFIX}/libexec/mosml,"
-	${MKDIR} ${WRKDIR}/mosml/examples/ffi
+	@${MKDIR} ${WRKDIR}/mosml/examples/ffi
 	${LN} -s ${WRKSRC}/dynlibs/crypt ${WRKDIR}/mosml/examples/ffi
 	${LN} -s ${WRKSRC}/dynlibs/interface ${WRKDIR}/mosml/examples/ffi
 	${REINPLACE_CMD} -e "s,/usr/local,${PREFIX}," \
 		${WRKSRC}/dynlibs/crypt/Makefile \
 		${WRKSRC}/dynlibs/interface/Makefile
+# Fix inner makefiles and configure script to make port jobs (-jX) safe
+	${REINPLACE_CMD} -e '2s,^,cd "$$1" || exit 1 ; shift,' \
+		${WRKSRC}/config/autoconf
+	${REINPLACE_CMD} -E 's,cd( config); sh (autoconf),sh\1/\2\1,' \
+		${WRKSRC}/Makefile
+	${FIND} ${WRKSRC} -type f -name Makefile -print0 | ${XARGS} -0 \
+		${REINPLACE_CMD} -E 's|cd (.+); make|$$(MAKE) -C \1|'
 
 post-install:
 	${INSTALL_DATA} ${WRKDIR}/mosml/copyrght/copyrght.att ${DOCSDIR}
@@ -52,14 +56,15 @@ post-install:
 	${INSTALL_DATA} ${WRKDIR}/mosml/README ${DOCSDIR}
 	${INSTALL_DATA} ${PKGMESSAGE} ${DOCSDIR}/README.FreeBSD
 	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} "${DOCSDIR}"
-	${MKDIR} ${EXAMPLESDIR}
+	@${MKDIR} ${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKDIR}/mosml/tools/Makefile.stub ${EXAMPLESDIR}
-	cd ${WRKDIR}/mosml/examples && \
-	${TAR} -cf - --dereference \
-	   --exclude=\*.orig --exclude=\*.bak --exclude=\*.w32 * | \
-	   ${TAR} -xf - -C "${EXAMPLESDIR}"
+	cd ${WRKDIR}/mosml/examples && ${TAR} -cf - --dereference \
+		--exclude=\*.orig --exclude=\*.bak --exclude=\*.w32 * | \
+		${TAR} -xf - -C "${EXAMPLESDIR}"
 	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} "${EXAMPLESDIR}"
-	@${FIND} ${EXAMPLESDIR}/ -type f -exec ${CHMOD} ${SHAREMODE} {} \;
+	@${FIND} ${EXAMPLESDIR} -type f -exec ${CHMOD} ${SHAREMODE} {} \;
+	@${ECHO_MSG}
 	@${CAT} ${PKGMESSAGE}
+	@${ECHO_MSG}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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