Skip to content

Commit 5f3bff5

Browse files
committed
Create lib64-->lib symlink required by 64bit Fedora.
1 parent a04e0b8 commit 5f3bff5

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Linux/install

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ adjust_macosx_environment() {
193193
compilerpaths=( ${(M)compilerpaths:#[ ]*} )
194194
compilerpaths=( ${${compilerpaths##[[:blank:]]##}%%[[:blank:]]*} )
195195
compilerpaths=( ${^compilerpaths}(N-/) )
196-
local PORTDIR=${$(whence -p port):h:h}
196+
local PORTDIR=${$(whence -p port):h}
197197
local cxxhasboost
198198
cxxhasboost=( ${^compilerpaths}/boost(N-/) )
199199
if [[ -z $cxxhasboost && -d ${PORTDIR}/include/boost ]]; then
@@ -283,7 +283,16 @@ do_build() {
283283
adjust_build_environment
284284

285285
if [[ -z ${opt_dryrun} && -n ${build_selection} ]]; then
286-
mkdir -p ${BINDIR?} ${INCLUDEDIR?} ${LIBDIR?} ${PYTHONDIR?}
286+
mkdir -p ${BINDIR?} ${INCLUDEDIR?} ${LIBDIR?} ${PYTHONDIR?} || exit $?
287+
# x86_64 fedora wants to install to lib64 - in such case create symbolic
288+
# link lib64 that points to lib
289+
local binlibdest=$($PYTHON -c \
290+
"import distutils.sysconfig; \
291+
print distutils.sysconfig.get_config_var('BINLIBDEST')")
292+
cd ${LIBDIR:h}
293+
if [[ ${binlibdest:h:h:t} == lib64 && ! lib64 -ef ${LIBDIR:t} ]]; then
294+
rm -f lib64 && ln -svf "${LIBDIR:t}" lib64 || exit $?
295+
fi
287296
fi
288297

289298
ListSkipOrDo build "PyCifRW" || {

0 commit comments

Comments
 (0)