1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

Allow patching as a regular user (and staging too)

This commit is contained in:
Antoine Brodin 2014-09-03 21:57:57 +00:00
parent 0090808295
commit 7080128355
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=367237
2 changed files with 14 additions and 14 deletions

View File

@ -15,9 +15,7 @@ USE_OCAML= yes
USE_JAVA= yes
JAVA_VERSION= 1.6+
.include <bsd.port.pre.mk>
post-extract:
post-patch:
@${REINPLACE_CMD} -e "s,^\(JAVAC=\).*,\1${JAVAC},g" \
-e "s,^\(JDKHOME=\).*,\1${JAVA_HOME},g" \
-e "s,include/linux,include/freebsd,g" \
@ -26,13 +24,8 @@ post-extract:
-e "s,i386,${ARCH},g" \
${WRKSRC}/Makefile.config
${REINPLACE_CMD} \
-e "s,^\(OCAMLLIB=\).*,\1${PREFIX}/lib/ocaml,g" \
-e "/^install/,/^$$/s,\([ \t]*\)cp,\1${INSTALL_DATA},g" \
${WRKSRC}/lib/Makefile
test:
@${ECHO_CMD} "Testing IDL library"
cd ${WRKSRC}/test && ${SETENV} ${MAKE_ENV} ${MAKE} all
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,14 +1,21 @@
--- lib/Makefile.orig 2014-07-10 23:17:16.801237680 +0800
+++ lib/Makefile 2014-07-10 23:17:43.641231560 +0800
@@ -9,9 +9,9 @@ CAMLJAVALIB=$(OCAMLLIB)/camljava
--- lib/Makefile.orig 2001-06-21 11:46:05 UTC
+++ lib/Makefile
@@ -3,15 +3,15 @@
OCAMLC=ocamlc -g
OCAMLOPT=ocamlopt
OCAMLDEP=ocamldep
-OCAMLLIB=`ocamlc -where`
+OCAMLLIB=$(PREFIX)/lib/ocaml
CAMLJAVALIB=$(OCAMLLIB)/camljava
all: jni.cma jni.cmxa javaclasses
install:
- mkdir -p $(CAMLJAVALIB)
- install -o root -g wheel -m 444 jni.cma jni.cmi jni.cmxa jni.a libcamljni.a jni.mli $(CAMLJAVALIB)
- cp jni.cma jni.cmi jni.cmxa jni.a libcamljni.a jni.mli $(CAMLJAVALIB)
- jar cf $(CAMLJAVALIB)/camljava.jar fr/inria/caml/camljava/*.class
+ mkdir -p $(DESTDIR)$(CAMLJAVALIB)
+ install -o root -g wheel -m 444 jni.cma jni.cmi jni.cmxa jni.a libcamljni.a jni.mli $(DESTDIR)$(CAMLJAVALIB)
+ $(BSD_INSTALL_DATA) jni.cma jni.cmi jni.cmxa jni.a libcamljni.a jni.mli $(DESTDIR)$(CAMLJAVALIB)
+ jar cf $(DESTDIR)$(CAMLJAVALIB)/camljava.jar fr/inria/caml/camljava/*.class
jni.cma: jni.cmo libcamljni.a