[44443] trunk/dports/lang/mosml

macsforever2000 at macports.org macsforever2000 at macports.org
Sun Dec 28 11:31:17 PST 2008


Revision: 44443
          http://trac.macports.org/changeset/44443
Author:   macsforever2000 at macports.org
Date:     2008-12-28 11:31:16 -0800 (Sun, 28 Dec 2008)
Log Message:
-----------
Added new patchfile patch-src-dynlibs.diff. Added symlink for camlrunm. Modified version. Modified build.pre_args. All changes for mosml-dynlibs port. (#17659)

Modified Paths:
--------------
    trunk/dports/lang/mosml/Portfile

Added Paths:
-----------
    trunk/dports/lang/mosml/files/patch-src-dynlibs.diff

Modified: trunk/dports/lang/mosml/Portfile
===================================================================
--- trunk/dports/lang/mosml/Portfile	2008-12-28 19:18:43 UTC (rev 44442)
+++ trunk/dports/lang/mosml/Portfile	2008-12-28 19:31:16 UTC (rev 44443)
@@ -1,7 +1,8 @@
 # $Id$
 PortSystem        1.0
 name              mosml
-version           2.01_0
+version           2.01
+revision          2
 categories        lang devel ml
 maintainers       cso at rift.dk
 description       Moscow ML is an implementation of Standard ML (SML)
@@ -16,11 +17,16 @@
 patchfiles        patch-configure.diff\
                   patch-src-Makefile.diff\
                   patch-src-Makefile-inc.diff\
-                  patch-src-launch-Makefile.diff
+                  patch-src-launch-Makefile.diff\
+                  patch-src-dynlibs.diff
 post-patch {
   file attributes configure -permissions +x
 }
 worksrcdir        mosml
 build.target      world
-build.pre_args    -Csrc DESTROOT=${destroot}${prefix} ${build.target}
+build.pre_args    -Csrc DESTROOT=${prefix} ${build.target}
 destroot.pre_args -Csrc DESTROOT=${destroot}${prefix} ${destroot.target}
+post-destroot {
+   system "ln -sf ${prefix}/bin/camlrunm ${destroot}${prefix}/lib/mosml/camlrunm"
+}
+

Added: trunk/dports/lang/mosml/files/patch-src-dynlibs.diff
===================================================================
--- trunk/dports/lang/mosml/files/patch-src-dynlibs.diff	                        (rev 0)
+++ trunk/dports/lang/mosml/files/patch-src-dynlibs.diff	2008-12-28 19:31:16 UTC (rev 44443)
@@ -0,0 +1,206 @@
+diff -urN ../mosml.orig/include/config.h ./include/config.h
+--- ../mosml.orig/include/config.h	2004-01-19 15:02:21.000000000 +0000
++++ ./include/config.h	2008-12-03 11:39:56.000000000 +0000
+@@ -2,7 +2,7 @@
+ #define _config_
+ 
+ 
+-#if defined(__MWERKS__) || defined(THINK_C)
++#if defined(__MWERKS__) || defined(THINK_C) || defined(LSB)
+ #include "m.h"
+ #include "s.h"
+ #else
+diff -urN ../mosml.orig/src/Makefile ./src/Makefile
+--- ../mosml.orig/src/Makefile	2008-11-28 14:42:49.000000000 +0000
++++ ./src/Makefile	2008-12-09 17:09:12.000000000 +0000
+@@ -25,6 +25,24 @@
+ 	cd lex; make all
+ 	cd launch; make all
+ 
++world-dyn:
++	cd dynlibs/msocket; make
++	cd dynlibs/crypt; make
++	cd dynlibs/munix; make
++	cd dynlibs/mregex; make
++	cd dynlibs/mgdbm; make
++	cd dynlibs/mgd; make
++	cd dynlibs/intinf; make
++
++install-world-dyn: dirs
++	cd dynlibs/msocket; make install
++	cd dynlibs/crypt; make install
++	cd dynlibs/munix; make install
++	cd dynlibs/mregex; make install
++	cd dynlibs/mgdbm; make install
++	cd dynlibs/mgd; make install
++	cd dynlibs/intinf; make install
++
+ uptodate:
+ 	cd runtime; make all
+ 	cp runtime/camlrunm$(EXE) .
+@@ -42,13 +60,15 @@
+ 	cd toolssrc; make clean all
+ 	cd lex; make clean all
+ 
+-# Install the Mosml system
+-install:
++dirs:
+ 	test -d $(BINDIR) || mkdir -p $(BINDIR)
+ 	test -d $(LIBDIR) || mkdir -p $(LIBDIR)
+ 	test -d $(INCDIR) || mkdir -p $(INCDIR)
+ 	test -d $(DOCDIR) || mkdir -p $(DOCDIR)
+ 	test -d $(TOOLDIR) || mkdir -p $(TOOLDIR)
++
++# Install the Mosml system
++install: dirs
+ 	cd runtime; make install
+ 	cd config; make install
+ 	cd launch; make all install
+diff -urN ../mosml.orig/src/Makefile.inc ./src/Makefile.inc
+--- ../mosml.orig/src/Makefile.inc	2008-11-28 14:42:49.000000000 +0000
++++ ./src/Makefile.inc	2008-12-09 17:24:00.000000000 +0000
+@@ -30,9 +30,12 @@
+ # For Linux (x86 or Alpha), use:
+ # ------------------------------
+ CPP=/usr/bin/cpp -P -traditional -Dunix -Umsdos
+-STRIP=strip
+-LD=gcc -rdynamic
+-DYNLD=ld -shared
++STRIP=echo
++LD=gcc -Wl,-rpath -Wl,${DESTROOT}/lib/mosml
++DYNLD=gcc -bundle -bundle_loader ${DESTROOT}/bin/camlrunm
++ADDRUNLIBS=
++ADDRUNCFLAGS=
++ADDDYNLIBCFLAGS=-DLSB
+ 
+ # For Cygwin 20.1, use:
+ # ---------------------
+diff -urN ../mosml.orig/src/dynlibs/crypt/Makefile ./src/dynlibs/crypt/Makefile
+--- ../mosml.orig/src/dynlibs/crypt/Makefile	2000-02-16 15:36:57.000000000 +0000
++++ ./src/dynlibs/crypt/Makefile	2008-11-28 15:22:08.000000000 +0000
+@@ -13,8 +13,10 @@
+ 	$(CC) $(CFLAGS) -c -o crypt.o crypt.c
+ 
+ libcrypt.so: crypt.o
+-	$(DYNLD) -lcrypt -o libcrypt.so crypt.o
+-#	$(DYNLD)         -o libcrypt.so crypt.o
++	$(DYNLD)         -o libcrypt.so crypt.o
++
++install:
++	cp libcrypt.so $(LIBDIR)
+ 
+ clean:
+ 	rm -f *.o
+diff -urN ../mosml.orig/src/dynlibs/intinf/Makefile ./src/dynlibs/intinf/Makefile
+--- ../mosml.orig/src/dynlibs/intinf/Makefile	2000-02-16 15:36:57.000000000 +0000
++++ ./src/dynlibs/intinf/Makefile	2008-12-09 17:58:03.000000000 +0000
+@@ -5,12 +5,14 @@
+ 
+ # Where to find GMP header file and compiled library
+ 
+-GMPDIR=${HOME}/c/gmp-2.0.2
++GMPDIR=/opt/local
++GMPINCDIR=${GMPDIR}/include
++GMPLIBDIR=${GMPDIR}/lib
+ 
+ include ../../Makefile.inc
+ 
+ OPTS=-fno-defer-pop
+-CFLAGS=-Dunix -O2 $(OPTS) $(ADDDYNLIBCFLAGS) -I$(INCDIR) -I ${GMPDIR}
++CFLAGS=-Dunix -O2 $(OPTS) $(ADDDYNLIBCFLAGS) -I$(INCDIR) -I ${GMPINCDIR}
+ 
+ MOSMLTOOLS=camlrunm $(MOSMLHOME)/tools
+ MOSMLC=mosmlc -c
+@@ -18,16 +20,19 @@
+ MOSMLLEX=mosmllex
+ MOSMLYACC=mosmlyac
+ 
+-all: libmgmp.so IntInf.uo
++all: libmgmp.so IntInf.uo IntInf.ui
+ 
+-install:
++install: all
+ 	cp libmgmp.so $(LIBDIR)
++	cp IntInf.uo $(LIBDIR)
++	cp IntInf.ui $(LIBDIR)
++	cp IntInf.sig $(LIBDIR)
+ 
+ intinf.o: intinf.c
+ 	$(CC) $(CFLAGS) -c -o intinf.o intinf.c
+ 
+ libmgmp.so: intinf.o
+-	$(DYNLD) -o libmgmp.so intinf.o ${GMPDIR}/libgmp.a
++	$(DYNLD) -o libmgmp.so intinf.o ${GMPLIBDIR}/libgmp.a
+ 
+ test:
+ 	mosml testintinf.sml
+diff -urN ../mosml.orig/src/dynlibs/mgd/Makefile ./src/dynlibs/mgd/Makefile
+--- ../mosml.orig/src/dynlibs/mgd/Makefile	2000-02-23 17:11:42.000000000 +0000
++++ ./src/dynlibs/mgd/Makefile	2008-11-28 15:44:28.000000000 +0000
+@@ -5,12 +5,13 @@
+ 
+ # Where to find gd header file and compiled library
+ 
+-GDDIR=${HOME}/c/gd-1.7.3
++GDINCDIR=/opt/local/include
++GDLIBDIR=/opt/local/lib
+ 
+ include ../../Makefile.inc
+ 
+ OPTS=-fno-defer-pop
+-CFLAGS=-Dunix -O2 $(OPTS) $(ADDDYNLIBCFLAGS) -I$(INCDIR) -I ${GDDIR}
++CFLAGS=-Dunix -O2 $(OPTS) $(ADDDYNLIBCFLAGS) -I$(INCDIR) -I ${GDINCDIR}
+ 
+ MOSMLTOOLS=camlrunm $(MOSMLHOME)/tools
+ MOSMLC=mosmlc -c
+@@ -24,7 +25,7 @@
+ 	$(CC) $(CFLAGS) -c -o mgd.o mgd.c
+ 
+ libmgd.so: mgd.o
+-	$(DYNLD) -o libmgd.so mgd.o ${GDDIR}/libgd.a -L/usr/X11R6/lib -lpng -lz
++	$(DYNLD) -o libmgd.so mgd.o ${GDLIBDIR}/libgd.a -L/usr/X11R6/lib -lpng -lz
+ #	$(DYNLD) -o libmgd.so mgd.o ${GDDIR}/libgd.a -R/pack/libs/lib -L/pack/libs/lib -lpng -lz
+ 
+ test: Graphs.uo
+diff -urN ../mosml.orig/src/dynlibs/mgdbm/Makefile ./src/dynlibs/mgdbm/Makefile
+--- ../mosml.orig/src/dynlibs/mgdbm/Makefile	2000-02-16 15:36:57.000000000 +0000
++++ ./src/dynlibs/mgdbm/Makefile	2008-11-28 15:42:39.000000000 +0000
+@@ -5,10 +5,8 @@
+ 
+ # Where to find GDBM header file and compiled library
+ 
+-GDBMLIBDIR=${HOME}/c/gdbm-1.7.3
+-GDBMINCDIR=${HOME}/c/gdbm-1.7.3
+-#GDBMLIBDIR=/usr/lib
+-#GDBMINCDIR=/usr/include
++GDBMLIBDIR=/opt/local/lib
++GDBMINCDIR=/opt/local/include
+ 
+ include ../../Makefile.inc
+ 
+diff -urN ../mosml.orig/src/dynlibs/munix/munix.c ./src/dynlibs/munix/munix.c
+--- ../mosml.orig/src/dynlibs/munix/munix.c	2000-01-21 10:07:13.000000000 +0000
++++ ./src/dynlibs/munix/munix.c	2008-11-28 15:20:53.000000000 +0000
+@@ -59,8 +59,8 @@
+     failwith("EINVAL"); break;
+   case EISDIR:
+     failwith("EISDIR"); break;
+-  case ELIBBAD:
+-    failwith("ELIBBAD"); break;
++/*  case ELIBBAD:
++    failwith("ELIBBAD"); break; */
+   case ECHILD:
+     failwith("ECHILD"); break;
+   case EINTR:
+diff -urN ../mosml.orig/src/runtime/config.h ./src/runtime/config.h
+--- ../mosml.orig/src/runtime/config.h	2000-01-21 10:07:13.000000000 +0000
++++ ./src/runtime/config.h	2008-12-08 14:59:31.000000000 +0000
+@@ -2,7 +2,7 @@
+ #define _config_
+ 
+ 
+-#if defined(__MWERKS__) || defined(THINK_C)
++#if defined(__MWERKS__) || defined(THINK_C) || defined(LSB)
+ #include "m.h"
+ #include "s.h"
+ #else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081228/1d52c7da/attachment.html>


More information about the macports-changes mailing list