[44565] trunk/dports/lang

macsforever2000 at macports.org macsforever2000 at macports.org
Tue Dec 30 12:01:49 PST 2008


Revision: 44565
          http://trac.macports.org/changeset/44565
Author:   macsforever2000 at macports.org
Date:     2008-12-30 12:01:46 -0800 (Tue, 30 Dec 2008)
Log Message:
-----------
Added new port. (#17659)

Added Paths:
-----------
    trunk/dports/lang/mosml-dynlibs/
    trunk/dports/lang/mosml-dynlibs/Portfile
    trunk/dports/lang/mosml-dynlibs/files/
    trunk/dports/lang/mosml-dynlibs/files/patch-configure.diff
    trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile-inc.diff
    trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile.diff
    trunk/dports/lang/mosml-dynlibs/files/patch-src-dynlibs.diff
    trunk/dports/lang/mosml-dynlibs/files/patch-src-launch-Makefile.diff

Added: trunk/dports/lang/mosml-dynlibs/Portfile
===================================================================
--- trunk/dports/lang/mosml-dynlibs/Portfile	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/Portfile	2008-12-30 20:01:46 UTC (rev 44565)
@@ -0,0 +1,39 @@
+# $Id$
+
+PortSystem        1.0
+
+name              mosml-dynlibs
+version           2.01_0
+categories        lang devel ml
+platforms         darwin
+maintainers       nomaintainer
+
+description       Moscow ML dynamic libraries
+long_description  Dynamic libraries for Moscow ML includes:\
+                  intinf, crypt, munix, mregex, msocket, mgdbm, mgd
+
+homepage          http://www.dina.dk/~sestoft/mosml.html
+master_sites      http://www.dina.kvl.dk/~sestoft/mosml
+distfiles         mos201src.tar.gz
+
+checksums         md5 74aaaf988201fe92a9dbfbcb1e646f70
+
+patchfiles        patch-configure.diff\
+                  patch-src-Makefile.diff\
+                  patch-src-Makefile-inc.diff\
+                  patch-src-launch-Makefile.diff\
+                  patch-src-dynlibs.diff
+
+post-patch {
+  file attributes configure -permissions +x
+}
+
+worksrcdir        mosml
+build.target      world-dyn
+build.pre_args    -Csrc DESTROOT=${prefix} ${build.target}
+destroot.target   install-world-dyn
+destroot.pre_args -Csrc DESTROOT=${destroot}${prefix} ${destroot.target}
+
+depends_lib       port:gmp \
+                  port:gdbm \
+                  port:gd2


Property changes on: trunk/dports/lang/mosml-dynlibs/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/lang/mosml-dynlibs/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/mosml-dynlibs/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/files/patch-configure.diff	2008-12-30 20:01:46 UTC (rev 44565)
@@ -0,0 +1,8 @@
+--- configure	2006-08-27 16:12:46.000000000 +0200
++++ configure	2006-08-27 16:07:47.000000000 +0200
+@@ -0,0 +1,5 @@
++#!/bin/sh
++cd src/config
++./autoconf
++cd ..
++

Added: trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile-inc.diff
===================================================================
--- trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile-inc.diff	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile-inc.diff	2008-12-30 20:01:46 UTC (rev 44565)
@@ -0,0 +1,46 @@
+--- src/Makefile.inc	2006-08-27 16:20:05.000000000 +0200
++++ src/Makefile.inc	2006-08-27 16:30:56.000000000 +0200
+@@ -2,7 +2,7 @@
+ 
+ # Where to install stuff
+ 
+-MOSMLHOME=${HOME}/mosml
++MOSMLHOME=${DESTROOT}
+ 
+ # Various utility programs
+ INSTALL_PROGRAM=cp
+@@ -22,14 +22,14 @@
+ # To compile the runtime system camlrunm under Cygwin with support for
+ # dynamically loadable libraries (DDLs), uncomment these:
+ 
+-ADDPRIMS=dynlib.c
+-ADDOBJS=dynlib.o
+-ADDRUNCFLAGS=
+-ADDDYNLIBCFLAGS=
++#ADDPRIMS=dynlib.c
++#ADDOBJS=dynlib.o
++#ADDRUNCFLAGS=
++#ADDDYNLIBCFLAGS=
+ 
+ # For Linux (x86 or Alpha), use:
+ # ------------------------------
+-CPP=/lib/cpp -P -traditional -Dunix -Umsdos
++CPP=/usr/bin/cpp -P -traditional -Dunix -Umsdos
+ STRIP=strip
+ LD=gcc -rdynamic
+ DYNLD=ld -shared
+@@ -114,10 +114,10 @@
+ # DOCDIR contains documentation
+ 
+ BINDIR=${MOSMLHOME}/bin
+-LIBDIR=${MOSMLHOME}/lib
+-INCDIR=${MOSMLHOME}/include
+-DOCDIR=${MOSMLHOME}/doc
+-TOOLDIR=${MOSMLHOME}/tools
++LIBDIR=${MOSMLHOME}/lib/mosml
++INCDIR=${MOSMLHOME}/include/mosml
++DOCDIR=${MOSMLHOME}/share/doc/mosml
++TOOLDIR=${MOSMLHOME}/bin
+ # LIBDIR=${MOSMLHOME}/lib/moscow_ml
+ # TOOLDIR=${MOSMLHOME}/libexec/moscow_ml
+ 

Added: trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile.diff
===================================================================
--- trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile.diff	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/files/patch-src-Makefile.diff	2008-12-30 20:01:46 UTC (rev 44565)
@@ -0,0 +1,18 @@
+--- src/Makefile	2006-08-27 16:20:05.000000000 +0200
++++ src/Makefile	2006-08-27 16:44:37.000000000 +0200
+@@ -16,7 +16,6 @@
+ # Build the entire system for the first time
+ 
+ world:
+-	cd config; sh autoconf $(CC)
+ 	cd runtime; make all
+ 	cp runtime/camlrunm$(EXE) .
+ 	cd mosmlyac; make all
+@@ -58,7 +57,6 @@
+ 	cd compiler; make install
+ 	cd toolssrc; make install
+ 	cd lex; make install
+-	(cd $(INCDIR)/..; rm -f config; ln -s include config)
+ 	cd doc; make install
+ 
+ # Remove all generated files

Added: trunk/dports/lang/mosml-dynlibs/files/patch-src-dynlibs.diff
===================================================================
--- trunk/dports/lang/mosml-dynlibs/files/patch-src-dynlibs.diff	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/files/patch-src-dynlibs.diff	2008-12-30 20:01:46 UTC (rev 44565)
@@ -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

Added: trunk/dports/lang/mosml-dynlibs/files/patch-src-launch-Makefile.diff
===================================================================
--- trunk/dports/lang/mosml-dynlibs/files/patch-src-launch-Makefile.diff	                        (rev 0)
+++ trunk/dports/lang/mosml-dynlibs/files/patch-src-launch-Makefile.diff	2008-12-30 20:01:46 UTC (rev 44565)
@@ -0,0 +1,46 @@
+--- src/launch/Makefile	2006-08-27 16:20:03.000000000 +0200
++++ src/launch/Makefile	2006-08-27 16:57:52.000000000 +0200
+@@ -1,6 +1,9 @@
+ # Unix Makefile for launching Moscow ML
+ # Based on Caml Light (copyright 1993 INRIA)
+ 
++TRUEBINDIR=/opt/local/bin
++TRUELIBDIR=/opt/local/lib/mosml
++
+ include ../Makefile.inc
+ 
+ all: mosml mosmlc mosmllex camlexec testprog 
+@@ -13,7 +16,7 @@
+ 	 cat testprog) > /tmp/testscr
+ 	chmod a+x /tmp/testscr
+ 	sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
+-               then echo "#!$(BINDIR)/camlrunm" > $(LIBDIR)/header; \
++               then echo "#!$(TRUEBINDIR)/camlrunm" > $(LIBDIR)/header; \
+                else ${INSTALL_PROGRAM} camlexec$(EXE) $(LIBDIR)/header; \
+                fi'
+ 	rm -f /tmp/testscr
+@@ -23,20 +26,20 @@
+ 	done
+ 
+ mosml: mosml.tpl
+-	sed -e "s|LIBDIR|$(LIBDIR)|" -e "s|BINDIR|$(BINDIR)|" mosml.tpl > mosml
++	sed -e "s|LIBDIR|$(TRUELIBDIR)|" -e "s|BINDIR|$(TRUEBINDIR)|" mosml.tpl > mosml
+ 
+ mosmlc: mosmlc.tpl
+-	sed -e "s|LIBDIR|$(LIBDIR)|" -e "s|BINDIR|$(BINDIR)|" mosmlc.tpl > mosmlc
++	sed -e "s|LIBDIR|$(TRUELIBDIR)|" -e "s|BINDIR|$(TRUEBINDIR)|" mosmlc.tpl > mosmlc
+ 
+ mosmllex: mosmllex.tpl
+-	sed -e "s|LIBDIR|$(LIBDIR)|" -e "s|BINDIR|$(BINDIR)|" mosmllex.tpl > mosmllex
++	sed -e "s|LIBDIR|$(TRUELIBDIR)|" -e "s|BINDIR|$(TRUEBINDIR)|" mosmllex.tpl > mosmllex
+ 
+ testprog: testprog.sml
+ 	$(MOSMLC) testprog.sml
+ 	$(MOSMLL) -noheader -o testprog BasicIO.uo testprog.uo
+ 
+ camlexec.c: camlexec.tpl
+-	sed -e "s|LIBDIR|$(LIBDIR)|" -e "s|BINDIR|$(BINDIR)|" camlexec.tpl > camlexec.c
++	sed -e "s|LIBDIR|$(TRUELIBDIR)|" -e "s|BINDIR|$(TRUEBINDIR)|" camlexec.tpl > camlexec.c
+ 
+ camlexec: camlexec.c
+ 	$(CC) $(OPTS) -o camlexec$(EXE) camlexec.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081230/f3989e46/attachment-0001.html>


More information about the macports-changes mailing list