Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2017 06:55:07 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456594 - in head/lang/ocaml: . files
Message-ID:  <201712180655.vBI6t75i044499@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Mon Dec 18 06:55:06 2017
New Revision: 456594
URL: https://svnweb.freebsd.org/changeset/ports/456594

Log:
  In sight of long-overdue update of `lang/ocaml', start cleaning things up:
  
  - Remove hunks from `patch-configure' that are irrelevant on *BSD
  - Do not aggressively edit configure script in `post-patch', especially
    when it is not required (e.g. no variables are expanded).  This was
    the reason for bogus changes committed in r403835 by wen@ and r403898
    by marino@ (cf. "$bytecclinkopts $bytecclinkopts $bytecclinkopts");
    now ``make makepatch'' command is idempotent again
  - Do not needlessly pass STAGEDIR via MAKE_ENV: it is correctly passed
    via MAKE_ARGS (as DESTDIR), and OCaml's build system is aware of it,
    while nowhere referencing STAGEDIR variable
  - Drop permission fix for ld.conf that was added in r169472 by itetcu@
    11 years 4 months ago: it is no-op these days
  
  Build logs remain identical (modulo the whitespace), regression tests pass.

Modified:
  head/lang/ocaml/Makefile
  head/lang/ocaml/files/patch-configure

Modified: head/lang/ocaml/Makefile
==============================================================================
--- head/lang/ocaml/Makefile	Mon Dec 18 06:53:26 2017	(r456593)
+++ head/lang/ocaml/Makefile	Mon Dec 18 06:55:06 2017	(r456594)
@@ -35,7 +35,6 @@ STRIP=
 SSP_UNSAFE=	yes
 MAKE_JOBS_UNSAFE=	yes
 
-MAKE_ENV+=	STAGEDIR="${STAGEDIR}"
 CONFIGURE_ARGS=	-verbose -prefix "${PREFIX}" \
 		-cc "${CC} ${CFLAGS}" \
 		-as "${AS} ${ASFLAGS}" \
@@ -121,8 +120,6 @@ post-patch:
 		-e '\|RANLIB|s|ranlib|${RANLIB}|' \
 		-e '\|bytecclinkopts=|s|""|"${LDFLAGS}"|' \
 		-e "\|nativecclinkopts=|s|''|\"${LDFLAGS:C/-Wl,//}\"|" \
-		-e '\|mksharedlib=|s|$$bytecc|& $$bytecclinkopts|' \
-		-e 's|-lbfd -ldl|-lbfd $$dllib|' \
 		${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's,$$(ARCH),$$(SYSTEM_ARCH),' \
 		${WRKSRC}/Makefile ${WRKSRC}/asmrun/Makefile \
@@ -160,8 +157,5 @@ post-install:
 	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${STAGEDIR}${DOCSDIR}
 .endif
-
-# Fix permissions for ld.conf
-	@${CHMOD} 644 ${STAGEDIR}${PREFIX}/lib/ocaml/ld.conf
 
 .include <bsd.port.post.mk>

Modified: head/lang/ocaml/files/patch-configure
==============================================================================
--- head/lang/ocaml/files/patch-configure	Mon Dec 18 06:53:26 2017	(r456593)
+++ head/lang/ocaml/files/patch-configure	Mon Dec 18 06:55:06 2017	(r456594)
@@ -17,57 +17,10 @@
 +    *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
        sharedcccompopts="-fPIC"
 -      mksharedlib="$bytecc -shared"
-+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
++      mksharedlib="$bytecc $bytecclinkopts -shared"
        bytecclinkopts="$bytecclinkopts -Wl,-E"
        byteccrpath="-Wl,-rpath,"
        mksharedlibrpath="-Wl,-rpath,"
-@@ -700,7 +700,7 @@ if test $with_sharedlibs = "yes"; then
-       case "$bytecc" in
-         *gcc*)
-           sharedcccompopts="-fPIC"
--          mksharedlib="$bytecc -shared"
-+          mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
-           byteccrpath="-Wl,-rpath,"
-           mksharedlibrpath="-Wl,-rpath,"
-           shared_libraries_supported=true;;
-@@ -716,11 +716,11 @@ if test $with_sharedlibs = "yes"; then
-         *gcc*)
-           sharedcccompopts="-fPIC"
-           if sh ./solaris-ld; then
--            mksharedlib="$bytecc -shared"
-+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
-             byteccrpath="-R"
-             mksharedlibrpath="-R"
-           else
--            mksharedlib="$bytecc -shared"
-+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
-             bytecclinkopts="$bytecclinkopts -Wl,-E"
-             natdynlinkopts="-Wl,-E"
-             byteccrpath="-Wl,-rpath,"
-@@ -744,12 +744,12 @@ if test $with_sharedlibs = "yes"; then
-       mksharedlibrpath="-rpath "
-       shared_libraries_supported=true;;
-     i[3456]86-*-darwin[89].*)
--      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
-+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
-       bytecccompopts="$dl_defs $bytecccompopts"
-       dl_needs_underscore=false
-       shared_libraries_supported=true;;
-     *-apple-darwin*)
--      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
-+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
-       bytecccompopts="$dl_defs $bytecccompopts"
-       dl_needs_underscore=false
-       shared_libraries_supported=true;;
-@@ -759,7 +759,7 @@ if test $with_sharedlibs = "yes"; then
-       shared_libraries_supported=false;;
-     *-*-openbsd*)
-       sharedcccompopts="-fPIC"
--      mksharedlib="$bytecc -shared"
-+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
-       bytecclinkopts="$bytecclinkopts -Wl,-E"
-       natdynlinkopts="-Wl,-E"
-       byteccrpath="-Wl,-rpath,"
 @@ -790,9 +790,11 @@ if test $with_sharedlibs = "yes"; then
        fi;;
      x86_64-*-darwin*)             natdynlink=true;;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712180655.vBI6t75i044499>