aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2003-03-09 02:33:06 +0800
committerlioux <lioux@FreeBSD.org>2003-03-09 02:33:06 +0800
commita4388953f61678b20f1b9b5e85613def7f54e36b (patch)
tree3b15be561328bdc38dfefbf261ad5da26256a2ae /x11-toolkits
parent2ba991b9e884e8598adc8e5d80c007bf0abaac86 (diff)
downloadfreebsd-ports-gnome-a4388953f61678b20f1b9b5e85613def7f54e36b.tar.gz
freebsd-ports-gnome-a4388953f61678b20f1b9b5e85613def7f54e36b.tar.zst
freebsd-ports-gnome-a4388953f61678b20f1b9b5e85613def7f54e36b.zip
Fix build: improve previous solution where the distfile was tricked
into believing makemake was installed during build time even though it really is not PR: 46217 [1] Reported by: bento, Nick Jennings <nkj@grenzik.us.mvd> [1]
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/jx/Makefile31
-rw-r--r--x11-toolkits/jx/files/makemake-template12
-rw-r--r--x11-toolkits/jx/files/patch-ab27
3 files changed, 61 insertions, 9 deletions
diff --git a/x11-toolkits/jx/Makefile b/x11-toolkits/jx/Makefile
index 30577243e50f..20cf5a7adfdc 100644
--- a/x11-toolkits/jx/Makefile
+++ b/x11-toolkits/jx/Makefile
@@ -24,6 +24,7 @@ LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_AUTOCONF= yes
+USE_REINPLACE= yes
USE_X_PREFIX= yes
USE_XPM= yes
USE_BISON= yes
@@ -33,8 +34,7 @@ USE_GMAKE= yes
MAKE_ARGS= CC="${CC}" CXX="${CXX}" \
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
MAKE_ENV= JX_INSTALL_ROOT="${PREFIX}/bin" \
- JX_LIB_ROOT="${PREFIX}/lib" \
- PATH="${WRKSRC}/programs/makemake:${PATH}"
+ JX_LIB_ROOT="${PREFIX}/lib"
PLIST_SUB= LIBACE="${LIBACE}" \
LIBJTOOL="${LIBJTOOL}" \
LIBJX="${LIBJX}"
@@ -73,7 +73,7 @@ EXTRALIBFILES_JXLAYOUT= class_map need_font_list option_map
EXTRALIBFILES_MAKE_WRKSRC= include/make
EXTRALIBFILES_MAKE_DIR= . sys
# odd behavior
-POSTBUILD_WRKSRC= makemake jxlayout
+POSTBUILD_WRKSRC= jxlayout
# post patch preprocessing
POSTPATCH_FILES= post-patch-aa
# post configure placement directory
@@ -100,7 +100,30 @@ LIBJX= 1.5
BROKEN= Does not work with gcc 3.x
.endif
-post-patch:
+# wrapper to allow makemake to work during build time
+# it requires some libs which are not available in build time
+makemake-extract-wrapper:
+ @${SED} \
+ -e 's|%libdir%|${WRKSRC}/lib|' \
+ -e 's|%makemake%|${WRKSRC}/programs/makemake/makemake|' \
+ ${FILESDIR}/makemake-template \
+ > ${WRKDIR}/makemake
+ @${CHMOD} u+rx ${WRKDIR}/makemake
+
+# have all relevant places point to location of the makemake wrapper
+makemake-patch-path:
+ @${FIND} ${WRKSRC}/libjx ${WRKSRC}/libjcore
+ -name "Make*" \
+ -exec ${REINPLACE_CMD} -E \
+ -e 's|makemake;|${WRKDIR}/makemake;|' \
+ {} \;
+ @${REINPLACE_CMD} -E \
+ -e 's|; makemake;|; ${WRKDIR}/makemake;|' \
+ ${WRKSRC}/lib/Makefile
+
+post-extract: makemake-extract-wrapper
+
+post-patch: makemake-patch-path
.for i in ${CONFIGURE_PREPROCESSING_FILES}
@${CP} ${WRKSRC}/${POSTCONFIGURE_WRKSRC}/${i} ${WRKDIR}/${i}.in
@cd ${WRKDIR}; ${PATCH} -s ${i}.in < ${PATCHDIR}/${POSTPATCH_FILES}
diff --git a/x11-toolkits/jx/files/makemake-template b/x11-toolkits/jx/files/makemake-template
new file mode 100644
index 000000000000..f2c3a535a9f4
--- /dev/null
+++ b/x11-toolkits/jx/files/makemake-template
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#export LD_LIBRARY_PATH
+
+if [ -z "${LD_LIBRARY_PATH}" ]
+then
+LD_LIBRARY_PATH="%libdir%"
+else
+LD_LIBRARY_PATH="%libdir%:${LD_LIBRARY_PATH}"
+fi
+
+env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" "%makemake%" "${@}"
diff --git a/x11-toolkits/jx/files/patch-ab b/x11-toolkits/jx/files/patch-ab
index 214cc4017165..a44b19866856 100644
--- a/x11-toolkits/jx/files/patch-ab
+++ b/x11-toolkits/jx/files/patch-ab
@@ -1,10 +1,27 @@
---- programs/makemake.ORIG/Makefile.port Sat Nov 6 13:36:35 1999
-+++ programs/makemake/Makefile.port Sat Nov 6 13:37:55 1999
-@@ -49,7 +49,6 @@
+--- programs/makemake/Makefile.port.orig Tue Sep 21 22:03:14 1999
++++ programs/makemake/Makefile.port Sat Mar 8 14:44:25 2003
+@@ -49,24 +49,7 @@
.PHONY : jxinstall
jxinstall: regex makemake
@strip makemake
- @mv makemake ${JX_INSTALL_ROOT}/
- @if { which makemake > /dev/null; } then \
- { \
+- @if { which makemake > /dev/null; } then \
+- { \
+- echo "makemake successfully installed"; \
+- } \
+- else \
+- { \
+- echo; \
+- echo "makemake is not on your execution path. It was placed in"; \
+- echo; \
+- echo " ${JX_INSTALL_ROOT}"; \
+- echo; \
+- echo "Please add this to your execution path and restart start the build."; \
+- echo; \
+- false; \
+- } \
+- fi
+
+ #
+ # libraries we have eaten