diff options
author | Joseph Koshy <jkoshy@FreeBSD.org> | 2006-08-06 10:53:54 +0000 |
---|---|---|
committer | Joseph Koshy <jkoshy@FreeBSD.org> | 2006-08-06 10:53:54 +0000 |
commit | 02e454d15d1b88464bea24b1fe794e707b78c633 (patch) | |
tree | 6c509124baef9f12c74f6da2210c4dde6bdc463a /lang/caml-light | |
parent | - Add readline as dependency when it was already installed. The program (diff) |
- Honor CC, CFLAGS etc. [1]
- Use BSD_INSTALL_* macros to install files. [1]
- Make the port PREFIX clean.
PR: ports/101398 [1]
Submitted by: Stanislav Sedov <ssedov@mbsd.msk.ru>
Notes
Notes:
svn path=/head/; revision=169820
Diffstat (limited to 'lang/caml-light')
24 files changed, 594 insertions, 24 deletions
diff --git a/lang/caml-light/Makefile b/lang/caml-light/Makefile index 9e94ed8555fb..40574af033a7 100644 --- a/lang/caml-light/Makefile +++ b/lang/caml-light/Makefile @@ -7,6 +7,7 @@ PORTNAME= caml PORTVERSION= 0.75 +PORTREVISION= 1 CATEGORIES= lang elisp MASTER_SITES= ftp://ftp.inria.fr/lang/caml-light/ \ ftp://sunsite.doc.ic.ac.uk/computing/programming/languages/ml/caml-light/ \ @@ -21,19 +22,18 @@ COMMENT= A strongly typed functional language belonging to the ML family USE_XLIB= yes WRKSRC= ${WRKDIR}/cl75 ALL_TARGET= configure world bootstrap -MAN1= camlc.1 camllex.1 camllibr.1 camllight.1 camlmktop.1 camlrun.1 camlyacc.1 mletags.1 camllorder.1 camlsearch.1 +MAN1= camlc.1 camllex.1 camllibr.1 camllight.1 camlmktop.1 \ + camlrun.1 camlyacc.1 mletags.1 camllorder.1 camlsearch.1 .include <bsd.port.pre.mk> do-build: - cd ${WRKSRC}/src; ${MAKE} ${ALL_TARGET} PREFIX=${PREFIX} \ - X11BASE=${X11BASE} + cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET} # build some contrib stuff too do-install: - cd ${WRKSRC}/src; ${MAKE} ${INSTALL_TARGET} PREFIX=${PREFIX} \ - X11BASE=${X11BASE} - cd ${WRKSRC}/contrib; ${MAKE} all ${INSTALL_TARGET} PREFIX=${PREFIX} \ - X11BASE=${X11BASE} + cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} + cd ${WRKSRC}/contrib; ${SETENV} ${MAKE_ENV} ${MAKE} all \ + ${INSTALL_TARGET} .include <bsd.port.post.mk> diff --git a/lang/caml-light/files/patch-aa b/lang/caml-light/files/patch-aa index a0d8f35c3470..81b7c3f5b325 100644 --- a/lang/caml-light/files/patch-aa +++ b/lang/caml-light/files/patch-aa @@ -1,11 +1,28 @@ ---- src/Makefile.orig Wed Mar 3 18:55:57 1999 -+++ src/Makefile Sat Mar 6 19:51:31 2004 +--- src/Makefile.orig Wed Mar 3 16:25:57 1999 ++++ src/Makefile Sat Aug 5 09:56:37 2006 +@@ -2,14 +2,14 @@ + + # Which C compiler to use. + # Performance is often improved if you use gcc 2.x instead of cc. +-CC=gcc ++#CC=gcc + + # Additional options to $(CC). + # If you are using gcc, add -fno-defer-pop. + # This option circumvents a gcc bug on some platforms (680x0, 80386). + # If you are using Linux with libc6 (RedHat 5, Debian 2), add -D__FAVOR_BSD + # This option avoids signal-related problems. +-OPTS=-fno-defer-pop -D__FAVOR_BSD ++OPTS=-fno-defer-pop -D__FAVOR_BSD ${CFLAGS} + + # Extra libraries that have to be linked with the runtime system. + # The math library "-lm" is linked by default. @@ -26,19 +26,19 @@ # not all Unix C preprocessors define it. # If your cpp is too fussy, make tools/clprepro and use this: # CPP=../../src/tools/clprepro -Dunix -CPP=/lib/cpp -P -traditional -Dunix -+CPP=/usr/bin/cpp -P -traditional -Dunix ++CPP=/usr/bin/cpp -P -traditional -Dunix ${CPPFLAGS} # The directory where public executables will be installed -BINDIR=/usr/local/bin diff --git a/lang/caml-light/files/patch-ab b/lang/caml-light/files/patch-ab index 0bc8b66a8880..6b5068407094 100644 --- a/lang/caml-light/files/patch-ab +++ b/lang/caml-light/files/patch-ab @@ -1,6 +1,6 @@ ---- contrib/Makefile.orig Sat Nov 11 15:57:42 2000 -+++ contrib/Makefile Sat Mar 6 06:42:32 2004 -@@ -5,7 +5,7 @@ +--- contrib/Makefile.orig Sun Nov 12 02:57:42 2000 ++++ contrib/Makefile Sat Aug 5 09:57:42 2006 +@@ -5,24 +5,24 @@ # Remember that "libunix" is required for # "debugger", "libgraph", "camltk", "camltk4", and "search_isos". PACKAGES=libunix libgraph debugger libnum libstr mletags \ @@ -9,7 +9,18 @@ # caml-tex # caml-latex2e # camltk -@@ -22,7 +22,7 @@ + + # Which C compiler to use. + # Should be the same compiler used to compile the main system (../src). +-CC=gcc ++#CC=gcc + + # Any additional options to $(CC). +-OPTS= ++OPTS=${CFLAGS} + + # How to call the C preprocessor on a file that does not have the .c extension. + # That's /lib/cpp on most machines, sometimes /usr/bin/cpp, # and /usr/ccs/lib/cpp under Solaris. # The -P option suppresses the generation of "# linenum" directives, # which are not understood by Caml Light. diff --git a/lang/caml-light/files/patch-ad b/lang/caml-light/files/patch-ad index 2b627cd4fd0a..556877869d9f 100644 --- a/lang/caml-light/files/patch-ad +++ b/lang/caml-light/files/patch-ad @@ -1,8 +1,9 @@ ---- src/man/Makefile-- Tue Nov 1 23:06:06 1994 -+++ src/man/Makefile Tue Jul 28 08:50:22 1998 +--- src/man/Makefile.orig Tue Nov 1 20:36:06 1994 ++++ src/man/Makefile Sat Aug 5 09:59:15 2006 @@ -3,4 +3,5 @@ MANDIR=/usr/man/man$(MANEXT) install: +- for f in $(MAN); do cp $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done + mkdir -p ${MANDIR} - for f in $(MAN); do cp $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done ++ for f in $(MAN); do ${BSD_INSTALL_MAN} $$f $(MANDIR)/`basename $$f .m`.$(MANEXT); done diff --git a/lang/caml-light/files/patch-ae b/lang/caml-light/files/patch-ae index 9e99b60102df..b5f3ba40814b 100644 --- a/lang/caml-light/files/patch-ae +++ b/lang/caml-light/files/patch-ae @@ -1,12 +1,13 @@ ---- contrib/camlmode/Makefile.orig Mon Dec 2 22:13:37 1996 -+++ contrib/camlmode/Makefile Thu Aug 20 08:11:56 1998 +--- contrib/camlmode/Makefile.orig Mon Dec 2 19:43:37 1996 ++++ contrib/camlmode/Makefile Sat Aug 5 10:00:05 2006 @@ -11,8 +11,8 @@ all: install: -+ mkdir -p $(EMACSLISPDIR) - cp $(FILES) $(EMACSLISPDIR) +- cp $(FILES) $(EMACSLISPDIR) - dir=`pwd`; cd $(EMACSLISPDIR); $(EMACS) -batch -l $$dir/compile ++ mkdir -p $(EMACSLISPDIR) ++ ${BSD_INSTALL_DATA} $(FILES) $(EMACSLISPDIR) clean: rm -f *~ #*# diff --git a/lang/caml-light/files/patch-af b/lang/caml-light/files/patch-af index 9d7bbddcf7a8..24495056b53d 100644 --- a/lang/caml-light/files/patch-af +++ b/lang/caml-light/files/patch-af @@ -1,7 +1,8 @@ ---- contrib/camlsearch/emacs-lisp/Makefile-- Sat Feb 4 23:42:23 1995 -+++ contrib/camlsearch/emacs-lisp/Makefile Tue Jul 28 08:49:53 1998 +--- contrib/camlsearch/emacs-lisp/Makefile.orig Sat Feb 4 21:12:23 1995 ++++ contrib/camlsearch/emacs-lisp/Makefile Sat Aug 5 10:00:54 2006 @@ -1,3 +1,4 @@ SOURCES=caml-search.el install: $(SOURCES) +- cp $(SOURCES) $(ELISPDIR) + mkdir -p $(ELISPDIR) - cp $(SOURCES) $(ELISPDIR) ++ ${BSD_INSTALL_DATA} $(SOURCES) $(ELISPDIR) diff --git a/lang/caml-light/files/patch-contrib_caml-tex_Makefile b/lang/caml-light/files/patch-contrib_caml-tex_Makefile new file mode 100644 index 000000000000..ff1730fe9e6a --- /dev/null +++ b/lang/caml-light/files/patch-contrib_caml-tex_Makefile @@ -0,0 +1,15 @@ +--- contrib/caml-tex/Makefile.orig Sat Aug 5 10:01:47 2006 ++++ contrib/caml-tex/Makefile Sat Aug 5 10:02:30 2006 +@@ -7,9 +7,9 @@ + all: + + install: +- - cp caml-tex $(BINDIR)/caml-tex +- - cp caml.sty caml-sl.sty $(TEXINPUTDIR) +- - cp caml-tex.1 $(MANDIR)/caml-tex.$(MANEXT) ++ - ${BSD_INSTALL_DATA} caml-tex $(BINDIR)/caml-tex ++ - ${BSD_INSTALL_DATA} caml.sty caml-sl.sty $(TEXINPUTDIR) ++ - ${BSD_INSTALL_MAN} caml-tex.1 $(MANDIR)/caml-tex.$(MANEXT) + + caml-tex.doc: caml-tex.1 + nroff -man caml-tex.1 | sed -e 's/_//g' > caml-tex.doc diff --git a/lang/caml-light/files/patch-contrib_camlsearch_doc_Makefile b/lang/caml-light/files/patch-contrib_camlsearch_doc_Makefile new file mode 100644 index 000000000000..405e6b71593a --- /dev/null +++ b/lang/caml-light/files/patch-contrib_camlsearch_doc_Makefile @@ -0,0 +1,6 @@ +--- contrib/camlsearch/doc/Makefile-- Thu Dec 22 21:41:25 1994 ++++ contrib/camlsearch/doc/Makefile Sun Aug 6 14:01:43 2006 +@@ -1,2 +1,2 @@ + install: +- cp camlsearch.l $(MANDIR)/camlsearch.$(MANEXT) ++ ${BSD_INSTALL_MAN} camlsearch.l $(MANDIR)/camlsearch.$(MANEXT) diff --git a/lang/caml-light/files/patch-contrib_camlsearch_source_Makefile b/lang/caml-light/files/patch-contrib_camlsearch_source_Makefile new file mode 100644 index 000000000000..a7bf944090c4 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_camlsearch_source_Makefile @@ -0,0 +1,32 @@ +--- contrib/camlsearch/source/Makefile.orig Thu Dec 24 00:36:57 1998 ++++ contrib/camlsearch/source/Makefile Sun Aug 6 14:00:09 2006 +@@ -1,6 +1,6 @@ +-CAMLCOMP =camlc -c +-CAMLLEX =camllex +-CAMLYACC =camlyacc ++CAMLCOMP =${PREFIX}/bin/camlc -c ++CAMLLEX =${PREFIX}/bin/camllex ++CAMLYACC =${PREFIX}/bin/camlyacc + CAMLTEX =../tools/caml-tex-format + CAMLDETEX =../tools/caml-tex-extract + COMPFLAGS =-I $(UNIXLIBDIR) -I $(COMPLIBDIR) $(DEBUG) -W +@@ -25,7 +25,7 @@ + + # Crée l'executable + $(NAME): $(OBJS) +- camlc -custom -g $(LINKFLAGS) -o $(NAME) $(COMPOBJS) $(OBJS) $(UNIXLIBDIR)/libunix.a ++ ${PREFIX}/bin/camlc -custom -g $(LINKFLAGS) -o $(NAME) $(COMPOBJS) $(OBJS) $(UNIXLIBDIR)/libunix.a + + # Formate pour TeX + report: $(TEXOBJ) +@@ -33,8 +33,8 @@ + + # Install CamlSearch + install: $(NAME) +- cp $(NAME) $(INSTALLDIR) +- chmod 755 $(INSTALLDIR)/$(NAME) ++ ${BSD_INSTALL_SCRIPT} $(NAME) $(INSTALLDIR) ++ + # Efface les fichiers inutiles + clean: + rm -f $(NAME) diff --git a/lang/caml-light/files/patch-contrib_debugger_Makefile b/lang/caml-light/files/patch-contrib_debugger_Makefile new file mode 100644 index 000000000000..c61f137c04fd --- /dev/null +++ b/lang/caml-light/files/patch-contrib_debugger_Makefile @@ -0,0 +1,29 @@ +--- ./contrib/debugger/Makefile-- Thu Dec 24 00:36:56 1998 ++++ ./contrib/debugger/Makefile Sun Aug 6 11:38:17 2006 +@@ -1,19 +1,19 @@ + # Makefile for the Caml Light debugger + + # These options are overriden when called from ../Makefile +-CC=cc ++#CC=cc + OPTS= +-LIBDIR=/usr/local/lib/caml-light +-CPP=/lib/cpp -P ++LIBDIR=${PREFIX}/lib/caml-light ++CPP=/usr/bin/cpp -P + + # Compilation options +-CAMLC=camlc +-CAMLLEX=camllex +-CAMLYACC=camlyacc ++CAMLC=${PREFIX}/bin/camlc ++CAMLLEX=${PREFIX}/bin/camllex ++CAMLYACC=${PREFIX}/bin/camlyacc + INCLUDES=-I ../libunix -I ../../src/compiler -I ../../src/linker -I ../../src/toplevel + COMPFLAGS=-W $(INCLUDES) + LINKFLAGS=$(INCLUDES) +-CFLAGS=$(OPTS) -O -I../../src/runtime ++CFLAGS+=$(OPTS) -I../../src/runtime + + EXTERNOBJS = \ + config.zo globals.zo misc.zo interntl.zo \ diff --git a/lang/caml-light/files/patch-contrib_libgraph_Makefile b/lang/caml-light/files/patch-contrib_libgraph_Makefile new file mode 100644 index 000000000000..dfd6501e724c --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libgraph_Makefile @@ -0,0 +1,38 @@ +--- ./contrib/libgraph/Makefile-- Thu Dec 24 00:36:55 1998 ++++ ./contrib/libgraph/Makefile Sun Aug 6 11:37:59 2006 +@@ -1,17 +1,17 @@ + # Makefile for the portable graphics library + + # These options are overriden when called from ../Makefile +-CC=cc ++#CC=cc + OPTS= +-X11_INCLUDES=/usr/include +-X11_LIB=/usr/lib +-CPP=/lib/cpp -P ++X11_INCLUDES=${X11BASE} ++X11_LIB=${X11BASE}/lib ++CPP=/usr/bin/cpp -P + +-BINDIR=/usr/local/bin +-LIBDIR=/usr/local/lib/caml-light ++BINDIR=${PREFIX}/bin ++LIBDIR=${PREFIX}/lib/caml-light + + # Compilation options +-CFLAGS=$(OPTS) -I../../src/runtime -I$(X11_INCLUDES) -O ++CFLAGS+=$(OPTS) -I../../src/runtime -I$(X11_INCLUDES) + + # Test to see whether ranlib exists on the machine + RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib +@@ -20,8 +20,8 @@ + RANLIB=ranlib + + # The Caml Light compilers +-CAMLC=camlc +-CAMLMKTOP=camlmktop ++CAMLC=${PREFIX}/bin/camlc ++CAMLMKTOP=${PREFIX}/bin/camlmktop + COMPFLAGS=-W -I ../libunix + + OBJS=open.o draw.o fill.o color.o text.o \ diff --git a/lang/caml-light/files/patch-contrib_libnum_Makefile b/lang/caml-light/files/patch-contrib_libnum_Makefile new file mode 100644 index 000000000000..60c21f330580 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libnum_Makefile @@ -0,0 +1,34 @@ +--- ./contrib/libnum/Makefile-- Thu Dec 24 00:36:56 1998 ++++ ./contrib/libnum/Makefile Sun Aug 6 11:40:07 2006 +@@ -12,12 +12,12 @@ + RANLIB=ranlib + + # Compilation options +-CFLAGS=-O -I../../src/runtime -I./bignum/h +-CAMLC=camlc ++CFLAGS+=-I../../src/runtime -I./bignum/h ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c + COMPFLAGS=-W #-O fast +-CAMLLIBR=camllibr +-CAMLMKTOP=camlmktop ++CAMLLIBR=${PREFIX}/bin/camllibr ++CAMLMKTOP=${PREFIX}/bin/camlmktop + + ZOFILES=int_misc.zo fnat.zo nat.zo big_int.zo arith_flags.zo ratio.zo \ + num.zo arith_status.zo +@@ -43,10 +43,10 @@ + cd bignum; make $(BIGNUM_ARCH) CC="$(CC)" + + install: +- cp libnums.a $(LIBDIR)/libnums.a +- if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libnums.a; else true; fi +- cp nums.zo $(ZIFILES) $(LIBDIR) +- cp camlnum $(LIBDIR) ++ ${BSD_INSTALL_DATA} libnums.a $(LIBDIR) ++ if $(RANLIBTEST); then (cd $(LIBDIR); $(RANLIB) libnums.a); else true; fi ++ ${BSD_INSTALL_DATA} nums.zo $(ZIFILES) $(LIBDIR) ++ ${BSD_INSTALL_SCRIPT} camlnum $(LIBDIR) + + clean: + rm -f libnums.a *.o *.z[io] camlnum diff --git a/lang/caml-light/files/patch-contrib_libnum_bignum_Makefile b/lang/caml-light/files/patch-contrib_libnum_bignum_Makefile new file mode 100644 index 000000000000..872b71cb2e9f --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libnum_bignum_Makefile @@ -0,0 +1,20 @@ +--- contrib/libnum/bignum/Makefile.orig Sat Aug 5 10:03:23 2006 ++++ contrib/libnum/bignum/Makefile Sat Aug 5 10:05:03 2006 +@@ -4,7 +4,7 @@ + # modified_on Thu Nov 2 14:23:14 GMT+1:00 1989 by gangnet + # modified_on Wed Jul 5 10:23:54 GMT+2:00 1989 by bertin + +-CC = cc ++#CC = cc + AR = ar + RANLIB = ranlib + RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib +@@ -327,7 +327,7 @@ + rm -f bignum.00.shar + $(SENDMAIL) $(SENDMAILFLAGS) $(USER) <tosend + for i in `ls bignum.[0-9][0-9].shar`; \ +- do cp sendmail_header tosend; \ ++ do ${BSD_INSTALL_DATA} sendmail_header tosend; \ + echo $$i | sed -e "s/^bignum0*/Subject: BigNum - Part /" >>tosend; \ + echo "# Remove all text above and including this line." >>tosend; \ + sed -e "s/modified_on/modified_on/g" <$$i >>tosend; \ diff --git a/lang/caml-light/files/patch-contrib_libstr_Makefile b/lang/caml-light/files/patch-contrib_libstr_Makefile new file mode 100644 index 000000000000..71aa2f6b65d1 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libstr_Makefile @@ -0,0 +1,49 @@ +--- contrib/libstr/Makefile.orig Thu Dec 24 00:36:56 1998 ++++ contrib/libstr/Makefile Sun Aug 6 15:25:09 2006 +@@ -1,7 +1,7 @@ + # Makefile for the strings library + + # These options are overriden when called from ../Makefile +-CC=cc ++#CC=cc + OPTS= + + # Test to see whether ranlib exists on the machine +@@ -11,8 +11,8 @@ + RANLIB=ranlib + + # Compilation options +-CFLAGS=-O -I$(REGEXLIB) -I../../src/runtime +-CAMLC=camlc ++CFLAGS=-I$(REGEXLIB) -I../../src/runtime ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c + COMPFLAGS=-W + REGEXLIB=regex-0.12 +@@ -26,10 +26,10 @@ + if test -f /bin/ranlib -o -f /usr/bin/ranlib; then ranlib libstr.a; fi + + camlstr: libstr.a str.zo +- camlmktop -o camlstr -custom str.zo libstr.a ++ ${PREFIX}/bin/camlmktop -o camlstr -custom str.zo libstr.a + + $(REGEXLIB)/regex.o: $(REGEXLIB)/regex.c $(REGEXLIB)/regex.h +- cd $(REGEXLIB); CC="$(CC)" sh configure; make ++ cd $(REGEXLIB); CC="$(CC) $(CFLAGS)" sh configure; make + + clean: + rm -f libstr.a *.o *.zo *.zi camlstr +@@ -37,10 +37,10 @@ + cd $(REGEXLIB); if test -f Makefile; then make distclean; else exit 0; fi + + install: +- cp libstr.a $(LIBDIR)/libstr.a ++ ${BSD_INSTALL_DATA} libstr.a $(LIBDIR) + if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libstr.a; else true; fi +- cp str.zo str.zi $(LIBDIR) +- cp camlstr $(LIBDIR) ++ ${BSD_INSTALL_DATA} str.zo str.zi $(LIBDIR) ++ ${BSD_INSTALL_SCRIPT} camlstr $(LIBDIR) + + .SUFFIXES: .ml .mli .zo .zi .tex + diff --git a/lang/caml-light/files/patch-contrib_libstr_regex_Makefile.in b/lang/caml-light/files/patch-contrib_libstr_regex_Makefile.in new file mode 100644 index 000000000000..2c50beec167a --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libstr_regex_Makefile.in @@ -0,0 +1,19 @@ +--- contrib/libstr/regex-0.12/Makefile.in-- Mon Nov 14 22:09:41 1994 ++++ contrib/libstr/regex-0.12/Makefile.in Sun Aug 6 15:38:53 2006 +@@ -26,13 +26,13 @@ + # -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to + # the corresponding C procedures). If not -DDEBUG, the macros + # are used. +-CPPFLAGS = ++CPPFLAGS ?= + + # Likewise, you can override CFLAGS to optimize, use -Wall, etc. +-CFLAGS = -O ++CFLAGS ?= -O + + # Ditto for LDFLAGS and LOADLIBES. +-LDFLAGS = ++LDFLAGS ?= + LOADLIBES = + + srcdir = @srcdir@ diff --git a/lang/caml-light/files/patch-contrib_libunix_Makefile b/lang/caml-light/files/patch-contrib_libunix_Makefile new file mode 100644 index 000000000000..3c7e7cc05b82 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_libunix_Makefile @@ -0,0 +1,40 @@ +--- ./contrib/libunix/Makefile-- Thu Dec 24 00:36:54 1998 ++++ ./contrib/libunix/Makefile Sun Aug 6 11:42:16 2006 +@@ -3,7 +3,7 @@ + # These options are overriden when called from ../Makefile + CC=cc + OPTS= +-LIBDIR=/usr/local/lib/caml-light ++LIBDIR=${PREFIX}/lib/caml-light + + # Test to see whether ranlib exists on the machine + RANLIBTEST=test -f /usr/bin/ranlib -o -f /bin/ranlib +@@ -12,11 +12,11 @@ + RANLIB=ranlib + + # Compilation options +-CFLAGS=-I../../src/runtime -O $(OPTS) +-CAMLC=camlc ++CFLAGS+=-I../../src/runtime $(OPTS) ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c + COMPFLAGS=-W +-CAMLMKTOP=camlmktop ++CAMLMKTOP=${PREFIX}/bin/camlmktop + + OBJS=accept.o access.o addrofstr.o alarm.o bind.o chdir.o chmod.o \ + chown.o chroot.o close.o closedir.o connect.o cst2constr.o cstringv.o \ +@@ -51,10 +51,10 @@ + rm -f libunix.a *.o *.zi *.zo lint-blurb camlunix + + install: +- cp libunix.a $(LIBDIR)/libunix.a ++ ${BSD_INSTALL_DATA} libunix.a $(LIBDIR) + if $(RANLIBTEST); then cd $(LIBDIR); $(RANLIB) libunix.a; else true; fi +- cp $(INTF) $(IMPL) $(LIBDIR) +- cp camlunix $(LIBDIR) ++ ${BSD_INSTALL_DATA} $(INTF) $(IMPL) $(LIBDIR) ++ ${BSD_INSTALL_SCRIPT} camlunix $(LIBDIR) + + .SUFFIXES: .ml .mli .zo .zi + diff --git a/lang/caml-light/files/patch-contrib_lorder_Makefile b/lang/caml-light/files/patch-contrib_lorder_Makefile new file mode 100644 index 000000000000..49d734d61df3 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_lorder_Makefile @@ -0,0 +1,36 @@ +--- contrib/lorder/Makefile.orig Thu Dec 24 00:36:56 1998 ++++ contrib/lorder/Makefile Sun Aug 6 12:14:52 2006 +@@ -1,9 +1,9 @@ +-MANDIR=/usr/man/man1 +-BINDIR=/usr/local/bin ++MANDIR=${PREFIX}/man/man1 ++BINDIR=${PREFIX}/bin + +-CPP=/lib/cpp -P -Dunix ++CPP=/usr/bin/cpp -P -Dunix + +-CAMLC=camlc ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c + COMPFLAGS=-g -W -I ../../src/compiler + LINKFLAGS=-g -I ../../src/compiler +@@ -15,7 +15,7 @@ + all: camllorder + + camllorder: $(OBJS) +- camlc $(LINKFLAGS) -o camllorder $(COMPILEROBJS) $(OBJS) ++ ${CAMLC} $(LINKFLAGS) -o camllorder $(COMPILEROBJS) $(OBJS) + + clean: + rm -f *.z[oi] camllorder Makefile.bak +@@ -26,8 +26,8 @@ + rm -f camllorder.tar.Z + + install: +- cp camllorder $(BINDIR) +- cp camllorder.1 $(MANDIR) ++ ${BSD_INSTALL_SCRIPT} camllorder $(BINDIR) ++ ${BSD_INSTALL_MAN} camllorder.1 $(MANDIR) + + + .SUFFIXES : diff --git a/lang/caml-light/files/patch-contrib_mletags_Makefile b/lang/caml-light/files/patch-contrib_mletags_Makefile new file mode 100644 index 000000000000..8bf0e04324f0 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_mletags_Makefile @@ -0,0 +1,36 @@ +--- contrib/mletags/Makefile.orig Thu Dec 24 00:36:56 1998 ++++ contrib/mletags/Makefile Sun Aug 6 12:13:31 2006 +@@ -1,9 +1,9 @@ + # Configuration +-CPP=/lib/cpp -P +-CAMLC=camlc ++CPP=/usr/bin/cpp -P ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c -g +-CAMLLEX=camllex +-CAMLYACC=camlyacc ++CAMLLEX=${PREFIX}/bin/camllex ++CAMLYACC=${PREFIX}/bin/camlyacc + + COMPFLAGS=-W -O fast + LINKFLAGS=-g +@@ -14,7 +14,7 @@ + all: mletags + + mletags: $(OBJS) +- camlc -o mletags $(LINKFLAGS) $(OBJS) ++ $(CAMLC) -o mletags $(LINKFLAGS) $(OBJS) + + lexer.mll: lexer.mlp + $(CPP) -Dunix lexer.mlp > lexer.mll +@@ -37,8 +37,8 @@ + compress mletags.tar + + install: mletags mletags.man +- cp mletags $(BINDIR) +- cp mletags.man $(MANDIR)/mletags.$(MANEXT) ++ ${BSD_INSTALL_SCRIPT} mletags $(BINDIR) ++ ${BSD_INSTALL_MAN} mletags.man $(MANDIR)/mletags.$(MANEXT) + + TAGS: + ./mletags *.ml *.mli diff --git a/lang/caml-light/files/patch-contrib_profiler_Makefile b/lang/caml-light/files/patch-contrib_profiler_Makefile new file mode 100644 index 000000000000..81f6e3291565 --- /dev/null +++ b/lang/caml-light/files/patch-contrib_profiler_Makefile @@ -0,0 +1,56 @@ +--- contrib/profiler/Makefile.orig Thu Dec 24 00:36:56 1998 ++++ contrib/profiler/Makefile Sun Aug 6 13:57:37 2006 +@@ -1,9 +1,9 @@ +-CPP=/lib/cpp -P ++CPP=/usr/bin/cpp -P + +-CAMLC=camlc ++CAMLC=${PREFIX}/bin/camlc + CAMLCOMP=$(CAMLC) -c +-CAMLLEX=camllex +-CAMLYACC=camlyacc ++CAMLLEX=${PREFIX}/bin/camllex ++CAMLYACC=${PREFIX}/bin/camlyacc + + COMPFLAGS=-W -g -I ../../src/compiler + LINKFLAGS=-g -I ../../src/compiler +@@ -27,7 +27,7 @@ + all: camlpro stdlibp.zo prodump.zo + + camlpro: $(OBJS) +- camlc $(LINKFLAGS) -o camlpro $(COMPILEROBJS) $(OBJS) ++ ${CAMLC} $(LINKFLAGS) -o camlpro $(COMPILEROBJS) $(OBJS) + + camlpro.ml: camlpro.mlp + @rm -f camlpro.ml +@@ -35,22 +35,22 @@ + @chmod -w camlpro.ml + + prodump.zo: prodump.ml +- camlc -c -O none prodump.ml ++ ${CAMLC} -c -O none prodump.ml + + stdlibp.zo: profiler.ml profiler.mli io.ml +- camlc -c -O none profiler.mli +- camlc -c -O none profiler.ml ++ ${CAMLC} -c -O none profiler.mli ++ ${CAMLC} -c -O none profiler.ml + /bin/rm -f io.mli + -ln -s ../../src/lib/io.mli ./io.mli +- camlc -c -O none io.mli +- camlc -c -O none io.ml +- camllibr -stdlib ../../src/lib -o stdlibp.zo $(PRO_IMPL) ++ ${CAMLC} -c -O none io.mli ++ ${CAMLC} -c -O none io.ml ++ ${PREFIX}/bin/camllibr -stdlib ../../src/lib -o stdlibp.zo $(PRO_IMPL) + + install: +- cp camlpro $(LIBDIR)/camlinstr ++ ${BSD_INSTALL_SCRIPT} camlpro $(LIBDIR)/camlinstr + rm -f $(BINDIR)/camlpro + ln -s $(LIBDIR)/camlinstr $(BINDIR)/camlpro +- cp stdlibp.zo prodump.zo profiler.zi $(LIBDIR) ++ ${BSD_INSTALL_DATA} stdlibp.zo prodump.zo profiler.zi $(LIBDIR) + + clean: + rm -f *.z[oi] camlinstr camlpro io.mli camlpro.ml diff --git a/lang/caml-light/files/patch-src_launch_Makefile b/lang/caml-light/files/patch-src_launch_Makefile new file mode 100644 index 000000000000..38b39aaca442 --- /dev/null +++ b/lang/caml-light/files/patch-src_launch_Makefile @@ -0,0 +1,23 @@ +--- src/launch/Makefile.orig Wed Feb 22 15:03:26 1995 ++++ src/launch/Makefile Sun Aug 6 11:58:56 2006 +@@ -17,16 +17,17 @@ + chmod a+x /tmp/testscr + sh -c 'if sh -c /tmp/testscr 2>/dev/null; \ + then echo "#!$(BINDIR)/camlrun" > $(LIBDIR)/header; \ +- else cp camlexec $(LIBDIR)/header; \ ++ else ${BSD_INSTALL_SCRIPT} camlexec $(LIBDIR)/header; \ + fi' + rm -f /tmp/testscr + for script in camlc camllight camlmktop; do \ +- cp $$script $(BINDIR)/$$script; \ ++ ${BSD_INSTALL_SCRIPT} $$script $(BINDIR)/$$script; \ + chmod a+x $(BINDIR)/$$script; \ + done + + SEDCOMMANDS=\ +- -e 's|LIBDIR|$(LIBDIR)|' -e 's|CC|$(CC) $(OPTS)|' -e 's|LIBS|$(LIBS)|' ++ -e 's|LIBDIR|$(LIBDIR)|' -e 's|CC|$(CC) $(OPTS)|' -e 's|LIBS|$(LIBS)|' \ ++ -e 's|BINDIR|$(BINDIR)|' + + camlc: camlc.tpl ../version.h + sed $(SEDCOMMANDS) \ diff --git a/lang/caml-light/files/patch-src_launch_camlc.tpl b/lang/caml-light/files/patch-src_launch_camlc.tpl new file mode 100644 index 000000000000..6e812a81ab04 --- /dev/null +++ b/lang/caml-light/files/patch-src_launch_camlc.tpl @@ -0,0 +1,49 @@ +--- src/launch/camlc.tpl-- Sun Aug 6 12:07:15 2006 ++++ src/launch/camlc.tpl Sun Aug 6 12:00:03 2006 +@@ -1,5 +1,6 @@ + #!/bin/sh + ++camlrun=BINDIR/camlrun + stdlib=LIBDIR + linkalso=true + includes="" +@@ -30,14 +31,14 @@ + if $profile + then + $stdlib/camlinstr -m $proflags -stdlib $stdlib $includes $compopt $1 ${1}t || { rc=$?; rm -f ${1}t; exit $rc; } +- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt ${1}t || { rc=$?; rm -f ${1}t; exit $rc; } ++ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt ${1}t || { rc=$?; rm -f ${1}t; exit $rc; } + rm -f ${1}t + else +- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $? ++ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $? + fi + linkfiles="$linkfiles $1";; + *.mli) +- camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $? ++ $camlrun $stdlib/camlcomp -stdlib $stdlib $includes $compopt $1 || exit $? + ;; + *.zo) + linkfiles="$linkfiles $1";; +@@ -63,9 +64,9 @@ + -v|-version) + echo "The Caml Light system, version" VERSION + echo " (standard library from $stdlib)" +- camlrun -V +- camlrun $stdlib/camlcomp -version +- camlrun $stdlib/camllink -version;; ++ $camlrun -V ++ $camlrun $stdlib/camlcomp -version ++ $camlrun $stdlib/camllink -version;; + -files) + linkfiles="$linkfiles $1 $2" + shift;; +@@ -106,7 +107,7 @@ + done + + if $linkalso && test -n "$linkfiles"; then +- camlrun $stdlib/camllink -stdlib $stdlib $includes $custom $linkopt \ ++ $camlrun $stdlib/camllink -stdlib $stdlib $includes $custom $linkopt \ + -exec $linkout $stdlib/stdlib$p.zo $linkfiles $prodump || exit $? + if test -n "$custom"; then + if mv $linkout /tmp/camlcode.$$ \ diff --git a/lang/caml-light/files/patch-src_launch_camllight.tpl b/lang/caml-light/files/patch-src_launch_camllight.tpl new file mode 100644 index 000000000000..96df7acd6497 --- /dev/null +++ b/lang/caml-light/files/patch-src_launch_camllight.tpl @@ -0,0 +1,19 @@ +--- src/launch/camllight.tpl-- Fri Jun 23 22:28:07 1995 ++++ src/launch/camllight.tpl Sun Aug 6 12:00:50 2006 +@@ -1,6 +1,7 @@ + #!/bin/sh + + stdlib=LIBDIR ++camlrun=BINDIR/camlrun + includes="" + options="" + +@@ -12,7 +13,7 @@ + while : ; do + case $1 in + "") +- exec camlrun $stdlib/camltop -stdlib $stdlib $includes $options;; ++ exec $camlrun $stdlib/camltop -stdlib $stdlib $includes $options;; + -I|-include) + includes="$includes -I $2" + shift;; diff --git a/lang/caml-light/files/patch-src_launch_camlmktop.tpl b/lang/caml-light/files/patch-src_launch_camlmktop.tpl new file mode 100644 index 000000000000..0f5e9d14ec52 --- /dev/null +++ b/lang/caml-light/files/patch-src_launch_camlmktop.tpl @@ -0,0 +1,24 @@ +--- src/launch/camlmktop.tpl-- Mon Feb 24 16:01:07 1997 ++++ src/launch/camlmktop.tpl Sun Aug 6 12:01:27 2006 +@@ -1,5 +1,6 @@ + #!/bin/sh + ++camlrun=BINDIR/camlrun + stdlib=LIBDIR + linkfiles="" + custom="" +@@ -58,11 +59,11 @@ + shift + done + +-camlrun $stdlib/provide -stdlib $stdlib $includes $perv > /tmp/camlreq.$$ \ ++$camlrun $stdlib/provide -stdlib $stdlib $includes $perv > /tmp/camlreq.$$ \ + || exit $? +-camlrun $stdlib/camllink -stdlib $stdlib $custom -require /tmp/camlreq.$$ \ ++$camlrun $stdlib/camllink -stdlib $stdlib $custom -require /tmp/camlreq.$$ \ + -exec /tmp/camlout.$$ -g $includes stdlib$p.zo toplib.zo $linkfiles topmain.zo || exit $? +-camlrun $stdlib/expunge $debug /tmp/camlout.$$ $output sys $perv || exit $? ++$camlrun $stdlib/expunge $debug /tmp/camlout.$$ $output sys $perv || exit $? + rm -f /tmp/camlreq.$$ /tmp/camlout.$$ + if test -n "$custom"; then + if mv $output /tmp/camlcode.$$ \ diff --git a/lang/caml-light/files/patch-src_runtime_Makefile b/lang/caml-light/files/patch-src_runtime_Makefile new file mode 100644 index 000000000000..17d383b2dd06 --- /dev/null +++ b/lang/caml-light/files/patch-src_runtime_Makefile @@ -0,0 +1,14 @@ +--- src/runtime/Makefile.orig Tue Jun 10 17:54:35 1997 ++++ src/runtime/Makefile Sun Aug 6 15:20:36 2006 +@@ -1,9 +1,9 @@ + # Makefile for the Caml Light runtime system + + # These options are overriden when called from ../Makefile. +-CC=cc ++#CC=cc + OPTS=#-fno-defer-pop +-CFLAGS=-O2 $(OPTS) -I.. ++CFLAGS=$(OPTS) -I.. + LIBS= + + # Test to see whether ranlib exists on the machine |