pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ocaml ocaml: fix installation on Darwin + minor c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c43703559ff3
branches:  trunk
changeset: 405183:c43703559ff3
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Nov 24 09:23:13 2019 +0000

description:
ocaml: fix installation on Darwin + minor cleanups

diffstat:

 lang/ocaml/Makefile                |  17 ++++++++++-------
 lang/ocaml/Makefile.common         |  10 +---------
 lang/ocaml/distinfo                |   4 ++--
 lang/ocaml/options.mk              |   3 +--
 lang/ocaml/patches/patch-configure |  22 +++++++++++-----------
 5 files changed, 25 insertions(+), 31 deletions(-)

diffs (180 lines):

diff -r fa1ea17bdcf5 -r c43703559ff3 lang/ocaml/Makefile
--- a/lang/ocaml/Makefile       Sun Nov 24 09:03:35 2019 +0000
+++ b/lang/ocaml/Makefile       Sun Nov 24 09:23:13 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.130 2019/10/04 10:33:21 maya Exp $
+# $NetBSD: Makefile,v 1.131 2019/11/24 09:23:13 adam Exp $
 
 .include "Makefile.common"
 
@@ -97,12 +97,15 @@
 do-test:
        cd ${WRKSRC}/testsuite && ${MAKE_PROGRAM} all
 
-#post-install:
-#      set -e ; cd ${DESTDIR}${PREFIX}/lib/ocaml/${PKGMANDIR}/man1;    \
-#      for m in *; do                                                  \
-#        ln -sf ${PREFIX}/lib/ocaml/${PKGMANDIR}/man1/$$m              \
-#              ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/$$m;              \
-#      done
+.if ${OPSYS} == "Darwin"
+.PHONY: fix-darwin-install-name
+post-install: fix-darwin-install-name
+fix-darwin-install-name:
+       for f in ${DESTDIR}${PREFIX}/lib/ocaml/*.so \
+               ${DESTDIR}${PREFIX}/lib/ocaml/stublibs/*.so; do \
+               install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
+       done
+.endif
 
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/termcap.buildlink3.mk"
diff -r fa1ea17bdcf5 -r c43703559ff3 lang/ocaml/Makefile.common
--- a/lang/ocaml/Makefile.common        Sun Nov 24 09:03:35 2019 +0000
+++ b/lang/ocaml/Makefile.common        Sun Nov 24 09:23:13 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.56 2019/08/24 10:54:23 jaapb Exp $
+# $NetBSD: Makefile.common,v 1.57 2019/11/24 09:23:13 adam Exp $
 
 # used by x11/labltk/Makefile
 DISTNAME=      ocaml-4.08.1
@@ -33,14 +33,6 @@
 INSTALL_UNSTRIPPED=    yes
 .endif
 
-#.if ${OPSYS} == "Darwin"
-#CONFIGURE_ENV+=       CC="${CC} -arch ${MACHINE_ARCH} ${CFLAGS}"
-#CONFIGURE_ENV+=       ASPP="${CC} -arch ${MACHINE_ARCH} -c"
-#CONFIGURE_ENV+=       AS="as -arch ${MACHINE_ARCH}"
-#.else
-#CONFIGURE_ENV+=       CC="${CC} ${CFLAGS}"
-#.endif
-
 .include "../../mk/bdb.buildlink3.mk"
 
 #BDB_LINK=     ${BDB_LIBS}
diff -r fa1ea17bdcf5 -r c43703559ff3 lang/ocaml/distinfo
--- a/lang/ocaml/distinfo       Sun Nov 24 09:03:35 2019 +0000
+++ b/lang/ocaml/distinfo       Sun Nov 24 09:23:13 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.132 2019/10/04 10:33:21 maya Exp $
+$NetBSD: distinfo,v 1.133 2019/11/24 09:23:13 adam Exp $
 
 SHA1 (ocaml-4.08.1.tar.gz) = f89ae7513ee4f064c7db92066f9dd4ac085634e2
 RMD160 (ocaml-4.08.1.tar.gz) = a8c0b80d9b6ff52c9a5725eec3ce64adffd81ca6
@@ -9,7 +9,7 @@
 SHA1 (patch-asmcomp_amd64_emit.mlp) = 1bc44434fbe1821d3aa2eed1a6b0938258586851
 SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f
 SHA1 (patch-asmrun_amd64.S) = 68d8f3ba1c1ad951e688539b4659aee71a527222
-SHA1 (patch-configure) = 28243f1cf36cd26281e620617d2fe1937fd59372
+SHA1 (patch-configure) = c2c03a3e6706b71f12b16f28c751ca3a0e4d4dd5
 SHA1 (patch-driver_compenv.ml) = 27c68072bd73c9c00d2b3093d8c6498f192ca3d3
 SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991
 SHA1 (patch-driver_main_args.ml) = 4c6a6ec25f433974f9aab99b4f2ac9c884bb3b04
diff -r fa1ea17bdcf5 -r c43703559ff3 lang/ocaml/options.mk
--- a/lang/ocaml/options.mk     Sun Nov 24 09:03:35 2019 +0000
+++ b/lang/ocaml/options.mk     Sun Nov 24 09:23:13 2019 +0000
@@ -1,10 +1,9 @@
-# $NetBSD: options.mk,v 1.2 2019/08/24 10:54:23 jaapb Exp $
+# $NetBSD: options.mk,v 1.3 2019/11/24 09:23:13 adam Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.ocaml
 PKG_SUPPORTED_OPTIONS= pic flambda spacetime
 PKG_SUGGESTED_OPTIONS= pic
 
-.include "../../mk/bsd.prefs.mk"
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mpic)
diff -r fa1ea17bdcf5 -r c43703559ff3 lang/ocaml/patches/patch-configure
--- a/lang/ocaml/patches/patch-configure        Sun Nov 24 09:03:35 2019 +0000
+++ b/lang/ocaml/patches/patch-configure        Sun Nov 24 09:23:13 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.39 2019/10/04 10:33:21 maya Exp $
+$NetBSD: patch-configure,v 1.40 2019/11/24 09:23:13 adam Exp $
 
 All kinds of OS-specific changes to configure
 Honor LDFLAGS.
@@ -9,16 +9,16 @@
 
 --- configure.orig     2019-08-05 17:32:44.000000000 +0000
 +++ configure
-@@ -13311,7 +13311,7 @@ sharedlib_cflags=''
+@@ -13311,7 +13317,7 @@ sharedlib_cflags=''
  mksharedlib='shared-libs-not-available'
  rpath=''
  mksharedlibrpath=''
 -natdynlinkopts=""
-+natdynlinkopts="-L/usr/lib -R/usr/lib -R/usr/pkg/lib"
++natdynlinkopts="-L/usr/lib -R/usr/lib -R$(PREFIX)/lib"
  
  if test x"$enable_shared" != "xno"; then :
    case $host in #(
-@@ -13347,9 +13347,14 @@ esac ;; #(
+@@ -13347,9 +13353,14 @@ esac ;; #(
        rpath="-Wl,-rpath,"
        mksharedlibrpath="-Wl,-rpath,"
        natdynlinkopts="-Wl,-E"
@@ -35,7 +35,7 @@
  esac
  fi
  
-@@ -13403,6 +13408,8 @@ fi ;; #(
+@@ -13403,6 +13414,8 @@ fi ;; #(
      natdynlink=true ;; #(
    x86_64-*-netbsd*) :
      natdynlink=true ;; #(
@@ -44,7 +44,7 @@
    i386-*-gnu0.3) :
      natdynlink=true ;; #(
    i[3456]86-*-haiku*) :
-@@ -13415,6 +13422,8 @@ fi ;; #(
+@@ -13415,6 +13428,8 @@ fi ;; #(
      natdynlink=true ;; #(
    aarch64-*-linux*) :
      natdynlink=true ;; #(
@@ -53,7 +53,7 @@
    *) :
       ;;
  esac
-@@ -13466,6 +13475,8 @@ case $host in #(
+@@ -13466,6 +13481,8 @@ case $host in #(
      arch=i386; system=beos ;; #(
    i[3456]86-*-cygwin) :
      arch=i386; system=cygwin ;; #(
@@ -62,7 +62,7 @@
    i[3456]86-*-darwin*) :
      if $arch64; then :
    arch=amd64
-@@ -13510,6 +13521,10 @@ fi; system=elf ;; #(
+@@ -13510,6 +13527,10 @@ fi; system=elf ;; #(
      arch=arm; model=armv6; system=linux_eabi ;; #(
    armv6*-*-freebsd*) :
      arch=arm; model=armv6; system=freebsd ;; #(
@@ -73,7 +73,7 @@
    earmv6*-*-netbsd*) :
      arch=arm; model=armv6; system=netbsd ;; #(
    earmv7*-*-netbsd*) :
-@@ -13544,8 +13559,12 @@ fi; system=elf ;; #(
+@@ -13544,8 +13565,12 @@ fi; system=elf ;; #(
      arch=amd64; system=mingw64 ;; #(
    aarch64-*-linux*) :
      arch=arm64; system=linux ;; #(
@@ -87,7 +87,7 @@
   ;; #(
    *) :
       ;;
-@@ -13884,7 +13903,7 @@ fi
+@@ -13884,7 +13909,7 @@ fi
  # for the moment, to be backward-compatible
  
  case $host in #(
@@ -96,7 +96,7 @@
       ;; #(
    *) :
      has_c99_float_ops=true
-@@ -14085,6 +14104,9 @@ case $host in #(
+@@ -14085,6 +14110,9 @@ case $host in #(
    *-*-mingw32|*-pc-windows) :
      cclibs="$cclibs -lws2_32"
      sockets=true ;; #(



Home | Main Index | Thread Index | Old Index