From 3df8eb77680c4f0b7521eb0f9df595a5f3b0a63c Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Sun, 3 Jul 2005 06:02:21 +0000 Subject: OCaml folks use $(ARCH) in Makefiles to mean, what configure identified as the architecture (and wrote out ${WRKSRC}/config/Makefile). Our make, however, ignores assigments to this variable. Fortunately for most concerned, make's ARCH is the same as configure's. Except on sparc64. This update fixes this problem as well as . adds a hunk to patch-configure to enable profiling on all platforms; . modifies REPLINPLACE_ARGS to not even create .bak files instead of removing them later. at the moment, the build still dies on Panther due to a segfault in the freshly built ocamlc.opt. It may be due to Panther's running 6-current, however and there is no other sparc64 to check... Notified by: kris (the sparc vs. sparc64 issue) --- lang/ocaml/Makefile | 7 ++++++- lang/ocaml/files/patch-configure | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'lang') diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 48919adf34d9..68364eb1edbe 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -43,6 +43,7 @@ LIB_DEPENDS+= tk84.1:${PORTSDIR}/x11-toolkits/tk84 USE_BZIP2= yes USE_REINPLACE= yes +REINPLACE_ARGS= -i "" HAS_CONFIGURE= yes ALL_TARGET= world.opt STRIP= @@ -96,12 +97,17 @@ post-configure: @${REINPLACE_CMD} -E \ -e 's|(BYTECCCOMPOPTS[[:space:]]*=.*)|\1 ${CFLAGS}|' \ -e 's|(NATIVECCCOMPOPTS[[:space:]]*=.*)|\1 ${CFLAGS}|' \ + -e 's|gcc|${CC}|g' \ ${WRKSRC}/config/Makefile +.if ${MACHINE_ARCH} == sparc64 + @${REINPLACE_CMD} -e 's,-O2,-O,g' ${WRKSRC}/config/Makefile +.endif # INSTALL* safeness (which preserves the correct permissions despite # user's umask(1) @${FIND} ${WRKDIR} -type f -name Makefile -print0 | \ ${XARGS} -0 -n 5 -x \ ${REINPLACE_CMD} -E \ + -e 's,\$$\(ARCH\),${ARCH:sparc64=sparc},g' \ -e 's,^([[:space:]]*(then)?[[:space:]]*)cp([[:space:]]+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \3,' \ -e 's,^([[:space:]]*(then)?[[:space:]]*)cp([[:space:]]+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \3,' \ -e 's,^([[:space:]]*(then)?[[:space:]]*)cp([[:space:]]+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \3,' \ @@ -111,7 +117,6 @@ post-configure: -e 's,([[:space:]]*then[[:space:]]*)cp([[:space:]]+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \2,' \ -e 's,([[:space:]]*then[[:space:]]*)cp([[:space:]]+.*BINDIR),\1\$${BSD_INSTALL_PROGRAM} \2,' \ -e 's,([[:space:]]*(do|then)[[:space:]]*)(\$$\(CP\)|cp)([[:space:]]+.*(MANDIR|MANODIR|MANEXT)),\1\$${BSD_INSTALL_MAN} \4,' - @${FIND} ${WRKDIR} -type f -name Makefile.bak -delete post-install: @${TOUCH} ${PREFIX}/lib/ocaml/ocamldoc/custom/.keep diff --git a/lang/ocaml/files/patch-configure b/lang/ocaml/files/patch-configure index b300cbf32078..299803b7afc4 100644 --- a/lang/ocaml/files/patch-configure +++ b/lang/ocaml/files/patch-configure @@ -1,5 +1,14 @@ --- configure.orig Thu Jul 15 16:17:46 2004 +++ configure Thu Jul 15 16:58:51 2004 +@@ -652,7 +652,8 @@ + case "$arch,$model,$system" in + alpha,*,digital) profiling='prof';; + i386,*,linux_elf) profiling='prof';; + i386,*,bsd_elf) profiling='prof';; ++ *,*,freebsd) profiling='prof';; + sparc,*,solaris) + profiling='prof' + case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;; @@ -1113,116 +1113,14 @@ x11_include="not found" x11_link="not found" -- cgit v1.2.3