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]
This commit is contained in:
parent
88f6b6e8ab
commit
bc82a6d708
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77063
3 changed files with 61 additions and 9 deletions
|
@ -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}
|
||||
|
|
12
x11-toolkits/jx/files/makemake-template
Normal file
12
x11-toolkits/jx/files/makemake-template
Normal file
|
@ -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%" "${@}"
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue