--- admin/PlamoBuild-template-20170713 2017-07-13 13:07:00.000000000 +0900 +++ plamo/05_ext/devel2.txz/ocaml/PlamoBuild.ocaml-3.12.1 2018-02-18 13:13:03.000000000 +0900 @@ -1,19 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.1.tar.bz2" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=ocaml +vers=3.12.1 arch=`uname -m` -build=P1 +build=P2 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="INSTALL LICENSE README README.win32 Upgrading VERSION" template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -37,12 +37,27 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + cp -p configure{,.orig} + cat <<- "EOF" | patch configure + 1469a1470,1471 + > "-I/usr/local/include/tcl8.6 -I/usr/local/include/tk8.6" \ + > "-I/usr/include/tcl8.6 -I/usr/include/tk8.6" \ + 1494a1497 + > 8.6) tclmaj=8 tclmin=6 tkmaj=8 tkmin=6 ;; + EOF + for i in DMain Eval Main Misc Var Wait ; do + cp -p otherlibs/labltk/support/cltk$i.c{,.orig} + cat <<- "EOF" | patch otherlibs/labltk/support/cltk$i.c + 18a19 + > #define USE_INTERP_RESULT + EOF + done for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + ./configure -prefix /usr -libdir /usr/$libdir/ocaml \ + -mandir /usr/share/man ${OPT_CONFIG[$i]} fi done fi @@ -50,7 +65,10 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make + make world + make bootstrap + make opt + make opt.opt fi done fi @@ -62,7 +80,8 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make install BINDIR=$P/usr/bin LIBDIR=$P/usr/$libdir/ocaml \ + STUBLIBDIR=$P/usr/$libdir/ocaml/stublibs MANDIR=$P/usr/share/man fi done touch $W/i.et @@ -70,10 +89,15 @@ find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_libdir $P/usr/$libdir/ocaml/stublibs + strip_libdir $P/usr/$libdir/ocaml + touch -t `date '+%m%d0900'` $P/usr/$libdir/ocaml{/stublibs,} setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P usr/$libdir/ocaml tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz