From bc82a6d708b75fef4e02e12ecab88b9ee22353b6 Mon Sep 17 00:00:00 2001 From: Mario Sergio Fujikawa Ferreira Date: Sat, 8 Mar 2003 18:33:06 +0000 Subject: 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 [1] --- x11-toolkits/jx/Makefile | 31 +++++++++++++++++++++++++++---- x11-toolkits/jx/files/makemake-template | 12 ++++++++++++ x11-toolkits/jx/files/patch-ab | 27 ++++++++++++++++++++++----- 3 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 x11-toolkits/jx/files/makemake-template (limited to 'x11-toolkits') 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 -- cgit v1.2.3