From a26ed809b61a9e0c3b564326c522fe9b68c2ce46 Mon Sep 17 00:00:00 2001 From: Don Lewis Date: Wed, 25 Feb 2015 05:55:10 +0000 Subject: Fix build breakage when libreoffice is installed. The problem is that libreoffice installs its own copy of unopkg in ${PREFIX}/bin and that the openoffice build attempts to use this copy of unopkg instead of the openoffice version which is in subdirectory of ${WRKSRC}. The reason is that the openoffice build expects to find its own copy of unopkg by depending on having "." in its $PATH, but its $PATH has ${PREFIX}/bin before ".". Openoffice attempts to do the right thing by first constructing $PATH by prepending "." and a small number of other directories where it stashes executables used during the build to the value of $PATH that it inherits from the environment. Things go wrong when it tries to add the paths for ${CC}, perl, and java to $PATH. If $PATH has /usr/bin before ${PREFIX}/bin, the openoffice build finds the perl symlink in /usr/bin before it finds perl in ${PREFIX}/bin, so it prepends ${PREFIX}/bin to $PATH to try to ensure that the correct version of perl will be found first. This moves ${PREFIX}/bin earlier in $PATH than ".". The operation to put the path to ${CC} in $PATH has a different problem. It uses the variable COMPATH for this, which is the dirname of the patch to $CC, with the trailing /bin stripped off. That results in /usr/local being added to $PATH, which is nonsensical, though mostly harmless. There are three fixes here: * Always keep the parts of $PATH for the directories under ${WRKSRC}, including "." at the beginning of the path. * Ignore symlinks to executables when deciding to prepend a directory to the path. * Append "/bin" when using COMPATH so that the result points to the directory where ${CC} actually resides. There is actually another variable CC_PATH, but it has an extra trailing "/", so it doesn't match ${PREFIX}/bin. Differential Revision: https://reviews.freebsd.org/D1958 Reviewed by: pfg Approved by: mat (mentor) --- editors/openoffice-devel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors/openoffice-devel/Makefile') diff --git a/editors/openoffice-devel/Makefile b/editors/openoffice-devel/Makefile index 8a8d5c5017bd..012f472652ec 100644 --- a/editors/openoffice-devel/Makefile +++ b/editors/openoffice-devel/Makefile @@ -280,7 +280,7 @@ do-build: cd ${WRKSUBDIR} ; ${PRINTF} "main=active\n" >> source_config cd ${WRKSUBDIR} ; ${PRINTF} "extras=active\n" >> source_config cd ${WRKSRC} ; ./bootstrap - cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C" ${BASH} -c "source ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; build.pl --all -P${MAKE_JOBS_NUMBER} -- -P${MAKE_JOBS_NUMBER}" + cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C LC_TIME=it_IT.ISO8859-15" ${BASH} -c "source ${FREEBSD_ENV_SET} ; cd instsetoo_native/util ; build.pl --all -P${MAKE_JOBS_NUMBER} -- -P${MAKE_JOBS_NUMBER}" do-install: cd ${WRKSRC}/instsetoo_native/unxfbsd?.pro/Apache_OpenOffice/archive/install/${LOCALIZED_LANG}/ ; ${LS} *.tar.?z > ${WRKDIR}/INSTALLFILES -- cgit v1.2.3