diff options
author | mi <mi@FreeBSD.org> | 2005-07-03 14:02:21 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2005-07-03 14:02:21 +0800 |
commit | 32b42b53bd2eec975ff068f332459470ee7bada8 (patch) | |
tree | ddd75d0e1a747ba86c8531bd4fd1c5e85fac4864 /lang | |
parent | efa5eca0adb3352dde2345c0602b69753cf2c72b (diff) | |
download | freebsd-ports-graphics-32b42b53bd2eec975ff068f332459470ee7bada8.tar.gz freebsd-ports-graphics-32b42b53bd2eec975ff068f332459470ee7bada8.tar.zst freebsd-ports-graphics-32b42b53bd2eec975ff068f332459470ee7bada8.zip |
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)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ocaml/Makefile | 7 | ||||
-rw-r--r-- | lang/ocaml/files/patch-configure | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index 48919adf34d..68364eb1edb 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 b300cbf3207..299803b7afc 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" |