Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 11:28:53 +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: r325293 - in head/lang/sr: . files
Message-ID:  <201308241128.r7OBSrMt037895@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sat Aug 24 11:28:53 2013
New Revision: 325293
URL: http://svnweb.freebsd.org/changeset/ports/325293

Log:
  - Hopefully fix parallel (-jX) builds; unfortunately, had to use GNU make(1)
    because of order-only prerequisites
  - Drop indefinite article from the COMMENT line
  - Respect CC and CFLAGS (passed via MAKE_ARGS)
  - Convert to OptionsNG; minor miscellaneous fixes
  - Update port description text while I am here

Added:
  head/lang/sr/files/patch-sr-Makefile   (contents, props changed)
Modified:
  head/lang/sr/Makefile
  head/lang/sr/pkg-descr

Modified: head/lang/sr/Makefile
==============================================================================
--- head/lang/sr/Makefile	Sat Aug 24 11:16:53 2013	(r325292)
+++ head/lang/sr/Makefile	Sat Aug 24 11:28:53 2013	(r325293)
@@ -6,46 +6,58 @@ PORTVERSION=	2.3.1
 PORTREVISION=	2
 CATEGORIES=	lang parallel
 MASTER_SITES=	ftp://ftp.cs.arizona.edu/sr/
-DISTNAME=	sr231
+DISTNAME=	sr${PORTVERSION:S/.//g}
 EXTRACT_SUFX=	.tar.Z
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A parallel language "Synchronization Resources"
+COMMENT=	Parallel language (Synchronization Resources)
 
+USES=		gmake	# required to support parallel (-jX) builds
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	prefix
 CONFIGURE_ENV=	PREFIX="${PREFIX}"
+MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}" MAKE="${MAKE_CMD}"
+REINPLACE_ARGS=	-i ''
+
 NO_WRKSUBDIR=	yes
+
 MAN1=		sr.1 srl.1 srm.1 srprof.1 srtex.1 srlatex.1 srgrind.1 \
 		ccr2sr.1 m2sr.1 csp2sr.1
 MAN3=		sranimator.3 srgetopt.3 srwin.3
 MAN5=		srmap.5 srtrace.5
-MAKE_JOBS_UNSAFE=	yes
 
-.if defined(WITHOUT_X11)
-PLIST_SUB+=	X11="@comment "
-.else
-PLIST_SUB+=	X11=""
-USE_XORG=	x11
-.endif
+OPTIONS_DEFINE=	X11 DOCS EXAMPLES
+OPTIONS_DEFAULT=	X11
+OPTIONS_SUB=	yes
 
-.include	<bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if ${ARCH} != "i386" && ${ARCH} != "alpha"
-BROKEN=		Does not compile on !i386 and !alpha
+.if ${ARCH} != "i386"
+BROKEN=		does not compile on ${ARCH}
 .endif
 
-pre-install:
+.if ${PORT_OPTIONS:MX11}
+USE_XORG=	x11
+.endif
+
+# Make parallel builds (-jX) actually work: sanitize make(1) syntax
+post-patch:
+	@${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \
+		-E 's/cd (.+);[[:blank:]]*(\$$\(R?MAKE\))/\2 -C \1/ ; \
+		s/RMAKE/MAKE/'
+
+pre-su-install:
 	@${MKDIR} ${PREFIX}/lib/sr
 
 post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}/notes
-	${MKDIR} ${DOCSDIR}/ps
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${DOCSDIR}/notes ${DOCSDIR}/ps
 	${INSTALL_DATA} ${WRKSRC}/notes/* ${DOCSDIR}/notes
 	${INSTALL_DATA} ${WRKSRC}/ps/* ${DOCSDIR}/ps
-	${MKDIR} ${EXAMPLESDIR}
-	${CP} -pR ${WRKSRC}/examples/* ${EXAMPLESDIR}
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@${MKDIR} ${EXAMPLESDIR}
+	${CP} -a ${WRKSRC}/examples/* ${EXAMPLESDIR}
 .endif
 
-.include	<bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/lang/sr/files/patch-sr-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/sr/files/patch-sr-Makefile	Sat Aug 24 11:28:53 2013	(r325293)
@@ -0,0 +1,24 @@
+--- sr/Makefile.orig	1995-12-16 04:45:48.000000000 +0800
++++ sr/Makefile	2013-08-24 18:47:23.000000000 +0800
+@@ -45,16 +45,16 @@
+ 	. ../paths.sh; $(CC) $(CFLAGS) -o sr $(OBJ) $$LIBL $$LIBM $$LIBC
+ 
+ tokens.c: tokens.l
+-	lex tokens.l
+-	mv lex.yy.c tokens.c
++	lex tokens.l && mv lex.yy.c tokens.c
+ 
+-grammar.c tokens.h: grammar.y
++grammar.c: grammar.y
+ 	@echo ...expect 4 shift/reduce conflicts:
+-	$(YACC) $(YFLAGS) -d grammar.y 
+ 	# following sed removes misdeclaration (vs ANSI) added by Sun Yacc.
++	$(YACC) $(YFLAGS) -d grammar.y && \
+ 	sed '/extern char .malloc(), .realloc();/d' <y.tab.c >grammar.c
++
++tokens.h: | grammar.c
+ 	mv y.tab.h tokens.h
+-	rm -f y.tab.c
+ 
+ tkflags.h: grammar.y
+ 	echo '/*  Created mechanically;  DO NOT EDIT THIS FILE  */' >tkflags.h

Modified: head/lang/sr/pkg-descr
==============================================================================
--- head/lang/sr/pkg-descr	Sat Aug 24 11:16:53 2013	(r325292)
+++ head/lang/sr/pkg-descr	Sat Aug 24 11:28:53 2013	(r325293)
@@ -1,17 +1,15 @@
-SR is a programming language "Synchronization Resource", development
-in the University of Arizona.
+SR (Synchronizing Resources) is a language for writing concurrent programs,
+developed in the University of Arizona.  The main language constructs are
+resources and operations.  Resources encapsulate processes and variables
+they share; operations provide the primary mechanism for process interaction.
 
-It is designed for writing concurrent programs. You can run
-SR program in you local net (by installing SR daemons on startup
-on all your machines), and specify a number of SR processes in one 
-machine.
+SR provides a novel integration of the mechanisms for invoking and servicing
+operations.  Consequently, all local and remote procedure call, rendezvous,
+message passing, dynamic process creation, multicast, and semaphores are
+supported.  SR also supports shared global variables and operations.  Has a
+nice interface (X11 and xtango).
 
-SR has nice interface with X11 and xtango.
+SR is the predecessor to the MPD programming language, which provides the
+same capabilities using different syntax.
 
-Syntax of language  is pascal-like, for all references to documentation,
-web links and examples please look at its own README, which situated
-in /usr/local/share/doc/sr/notes/README.
-
-Enjoy.
-
-WWW: http://www.cs.arizona.edu/sr
+WWW: http://www.cs.arizona.edu/sr/



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