diff options
author | krion <krion@FreeBSD.org> | 2003-10-28 17:01:44 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2003-10-28 17:01:44 +0800 |
commit | b0c07be4fb4d342b4dc322a383e94bee96a964c5 (patch) | |
tree | 5c9fc0659d1963bd935f3a7196981fbea88b9b7f /math/rascal | |
parent | 3730dbdee31af8f11ab048c69e7d0e066674a8e5 (diff) | |
download | freebsd-ports-graphics-b0c07be4fb4d342b4dc322a383e94bee96a964c5.tar.gz freebsd-ports-graphics-b0c07be4fb4d342b4dc322a383e94bee96a964c5.tar.zst freebsd-ports-graphics-b0c07be4fb4d342b4dc322a383e94bee96a964c5.zip |
- Fix build on -current
- Utilize NOPORTDOCS
PR: 58223
Submitted by: Ports Fury
Diffstat (limited to 'math/rascal')
-rw-r--r-- | math/rascal/Makefile | 54 | ||||
-rw-r--r-- | math/rascal/files/patch-Makefile | 28 | ||||
-rw-r--r-- | math/rascal/files/patch-grascal.cpp | 22 | ||||
-rw-r--r-- | math/rascal/pkg-plist | 35 |
4 files changed, 75 insertions, 64 deletions
diff --git a/math/rascal/Makefile b/math/rascal/Makefile index c6991f4aec8..4f125616e6b 100644 --- a/math/rascal/Makefile +++ b/math/rascal/Makefile @@ -8,38 +8,58 @@ PORTNAME= rascal PORTVERSION= 0.3.2 -PORTREVISION= 1 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org -COMMENT= Rascal, the Advanced Scientific CALculator +COMMENT= The Advanced Scientific CALculator -BROKEN= Does not compile +WRKSRC= ${WRKDIR}/Rascal-${PORTVERSION} -USE_GETOPT_LONG=yes -USE_REINPLACE= yes +USE_GETOPT_LONG= yes USE_BISON= yes -#USE_GNOME= yes -WRKSRC= ${WRKDIR}/Rascal-${PORTVERSION} +WANT_GNOME= yes +USE_REINPLACE= yes USE_GMAKE= yes -#ALL_TARGET= rascal grascal +MAKE_ENV= CC="${CXX}" CFLAGS="${CXXFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" +ALL_TARGET= ${PROGRAMS} MAN1= rascal.1 +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500018 +BROKEN= "Requires readline 4.2 or newer" +.endif + +.if ${HAVE_GNOME:Mgnomelibs}!="" +PKGNAMESUFFIX= -gnome +USE_GNOME+= gnomelibs +PROGRAMS= rascal grascal +.else +PROGRAMS= rascal +.endif + post-patch: - @${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g ; \ - s,g\+\+,${CXX},g ; \ - s,doc/,share/doc/,g ; \ - s,gnome-config,${GNOME_CONFIG},g ; \ - s,CC,CXX,g" ${WRKSRC}/Makefile -.for file in hoc.y rascal.1 - @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${file} + @${REINPLACE_CMD} -e 's|^CC=|CC?=|g ; \ + s|^CFLAGS=-|CFLAGS+=$${CPPFLAGS} -|g ; \ + s|-O0 -fno-rtti -g||g ; \ + s|^LIBS=-|LIBS+=$${LDFLAGS} -|g ; \ + s|doc/|share/doc/|g ; \ + s|g++|$${CC}|g ; \ + s|-Os||g ; \ + s|gnome-config|$${GNOME_CONFIG}|g' ${WRKSRC}/Makefile +.for file in hoc.y rascal.1 grascal.cpp + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${file} .endfor do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/rascal ${PREFIX}/bin +.for file in ${PROGRAMS} + ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin +.endfor ${INSTALL_DATA} ${WRKSRC}/rascal.rc ${PREFIX}/etc ${INSTALL_MAN} ${WRKSRC}/rascal.1 ${MANPREFIX}/man/man1 .if !defined(NOPORTDOCS) @@ -50,4 +70,4 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/rascal_html/* ${DOCSDIR}/html .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/math/rascal/files/patch-Makefile b/math/rascal/files/patch-Makefile deleted file mode 100644 index 2cf701a1da2..00000000000 --- a/math/rascal/files/patch-Makefile +++ /dev/null @@ -1,28 +0,0 @@ ---- Makefile.orig Mon Dec 2 11:51:54 2002 -+++ Makefile Mon Dec 2 11:53:24 2002 -@@ -19,8 +19,7 @@ - - VERSION=0.3.2 - --CC=g++ --CFLAGS=-O0 -fno-rtti -g -DVERSION=\"$(VERSION)\" -+CFLAGS+=-DVERSION=\"$(VERSION)\" -I%%LOCALBASE%%/include - # With the following options you may generate an optimized version of - # Rascal, but you will need a lot of time (takes 20min, that is 15* - # longer, on my machine) and physical memory (256 MB physical memory -@@ -38,10 +37,14 @@ - RMDIR=rm -rf - INSTDIR=install -d - --LIBS=-lm -lreadline -lcurses -+LIBS+=-lm -lreadline -lcurses ${LDFLAGS} - OBJS=y.tab.o lex.yy.o symtab.o value.o - - -include value.mak -+ -+.SUFFIXES: .o .c -+ -+.c.o: ; ${CXX} ${CFLAGS} -c $*.c - - all: rascal - diff --git a/math/rascal/files/patch-grascal.cpp b/math/rascal/files/patch-grascal.cpp index 4e885a2282e..6698fa3c775 100644 --- a/math/rascal/files/patch-grascal.cpp +++ b/math/rascal/files/patch-grascal.cpp @@ -1,5 +1,14 @@ ---- grascal.cpp.orig Fri Jul 13 10:04:16 2001 -+++ grascal.cpp Fri Jul 13 10:05:23 2001 +--- grascal.cpp.orig Tue May 14 07:09:26 2002 ++++ grascal.cpp Sat Oct 18 14:51:09 2003 +@@ -76,7 +76,7 @@ + + int main(int argc,char **argv) + { +- Calterm a(string("grascal ")+string(VERSION),"/usr/local/bin/rascal","--shellcolour 4 --outputcolour 0"); ++ Calterm a(string("grascal ")+string(VERSION),"%%PREFIX%%/bin/rascal","--shellcolour 4 --outputcolour 0"); + + if(exist("./rascal")) + a.setClientPath("./rascal"); @@ -91,7 +91,7 @@ a.addMenu(new MenuFileSelect("/File/_Load","<control>L","Load Rascal File",rascal_load)); a.addMenu(new MenuFileSelect("/File/_Save","<control>S","Save Rascal File",rascal_save)); @@ -9,3 +18,12 @@ a.addMenu(new MenuTop("/_Show")); a.addMenu(new MenuSimpleSend("/Show/_Variables","","variables;\n")); +@@ -113,7 +113,7 @@ + a.addMenu(new MenuSimpleSend("/Help/Licence","","licence;\n")); + a.addMenu(new MenuSimpleSend("/Help/Changelog","","help changes;\n")); + a.addMenu(new MenuSeparator("/Help/sep2")); +- a.addMenu(new MenuShowUrl("/Help/Manual","","file:/usr/local/doc/rascal/html/index.html")); ++ a.addMenu(new MenuShowUrl("/Help/Manual","","file:%%PREFIX%%/share/doc/rascal/html/index.html")); + a.addMenu(new MenuSeparator("/Help/sep1")); + a.addMenu(new MenuShowUrl("/Help/Rascal Homepage","","http://rascal.sourceforge.net/")); + diff --git a/math/rascal/pkg-plist b/math/rascal/pkg-plist index 47b036c97f5..794cafcbd0a 100644 --- a/math/rascal/pkg-plist +++ b/math/rascal/pkg-plist @@ -1,19 +1,20 @@ +%%GNOME:%%bin/grascal bin/rascal etc/rascal.rc -share/doc/rascal/rascal.pdf -share/doc/rascal/rascal.ps -share/doc/rascal/CHANGES -share/doc/rascal/TEST -share/doc/rascal/TOOLBOXTEST -share/doc/rascal/html/img1.gif -share/doc/rascal/html/img2.gif -share/doc/rascal/html/img3.gif -share/doc/rascal/html/img4.gif -share/doc/rascal/html/img5.gif -share/doc/rascal/html/img6.gif -share/doc/rascal/html/img7.gif -share/doc/rascal/html/index.html -share/doc/rascal/html/rascal.css -share/doc/rascal/html/rascal.html -@dirrm share/doc/rascal/html -@dirrm share/doc/rascal +%%PORTDOCS%%%%DOCSDIR%%/rascal.pdf +%%PORTDOCS%%%%DOCSDIR%%/rascal.ps +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/TEST +%%PORTDOCS%%%%DOCSDIR%%/TOOLBOXTEST +%%PORTDOCS%%%%DOCSDIR%%/html/img1.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img2.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img3.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img4.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img5.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img6.gif +%%PORTDOCS%%%%DOCSDIR%%/html/img7.gif +%%PORTDOCS%%%%DOCSDIR%%/html/index.html +%%PORTDOCS%%%%DOCSDIR%%/html/rascal.css +%%PORTDOCS%%%%DOCSDIR%%/html/rascal.html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/html +%%PORTDOCS%%@dirrm %%DOCSDIR%% |