summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-08-24 11:28:53 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-08-24 11:28:53 +0000
commit78b6eb5cfd92228419e7d93a48d2de5c8e8f0373 (patch)
tree3f5a589bddfc627a83bbe46753183a44cda6985c /lang
parentUpgrade to version 10.5.3. (diff)
- 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
Notes
Notes: svn path=/head/; revision=325293
Diffstat (limited to 'lang')
-rw-r--r--lang/sr/Makefile50
-rw-r--r--lang/sr/files/patch-sr-Makefile24
-rw-r--r--lang/sr/pkg-descr26
3 files changed, 67 insertions, 33 deletions
diff --git a/lang/sr/Makefile b/lang/sr/Makefile
index c59da8abab02..c640e1919df0 100644
--- a/lang/sr/Makefile
+++ b/lang/sr/Makefile
@@ -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>
diff --git a/lang/sr/files/patch-sr-Makefile b/lang/sr/files/patch-sr-Makefile
new file mode 100644
index 000000000000..d2a6e394345e
--- /dev/null
+++ b/lang/sr/files/patch-sr-Makefile
@@ -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
diff --git a/lang/sr/pkg-descr b/lang/sr/pkg-descr
index dc8e8ade8626..7572a2054975 100644
--- a/lang/sr/pkg-descr
+++ b/lang/sr/pkg-descr
@@ -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/