Commit 1f13ae2f authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

PKG: add pkgsetup.in for linux and macosx

parent bd00681a
......@@ -2,19 +2,19 @@
cd `dirname $0`
##NOTE: $OUT_DIR is also used in make_sylinks script (see below)
#Avoid any pre-mature optimization on variable names here.
# NOTE: $OUT_DIR is also used in make_sylinks script (see below)
# Avoid any pre-mature optimization on variable names here.
OUT_DIR=`pwd`
PATCH_ELF_EXE=$OUT_DIR/tools/patchelf
# no interference with LD_LIBRARY_PATH
# No no interference with LD_LIBRARY_PATH
LD_LIBRARY_PATH=
echo "Configuring..."
BINARY_FILES="@PKG_BINARY_FILES@"
#run patchelf
# run patchelf
for bin_file in $BINARY_FILES; do
#echo "adding rpath to $OUT_DIR/$bin_file"
if [ -f $OUT_DIR/$bin_file ]; then
......@@ -22,7 +22,7 @@ for bin_file in $BINARY_FILES; do
fi
done
#echo "Creating symbolic links..."
# echo "Creating symbolic links..."
. ./make_symlinks
if [ -f lib/cmake/ITK-@ITK_VERSION_STRING@/ITKConfig.cmake ]; then
......
#!/bin/sh
cd `dirname $0`
# NOTE: $OUT_DIR is also used in make_sylinks script (see below)
# Avoid any pre-mature optimization on variable names here.
OUT_DIR=`pwd`
# find install_name_tool
INSTALL_NAME_TOOL=`which install_name_tool`
if [ -z "$INSTALL_NAME_TOOL" ]; then
echo "install_name_tool does not exists.."
echo "please install install_name_tool and make sure it can be found from PATH"
exit 1;
fi
# no interference with DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH
DYLD_LIBRARY_PATH=
DYLD_FALLBACK_LIBRARY_PATH=
echo "Configuring..."
BINARY_FILES="@PKG_BINARY_FILES@"
# #add rpath to LC_RPATH using install_name_tool
for bin_file in $BINARY_FILES; do
#echo "adding rpath to $OUT_DIR/$bin_file"
if [ -f $OUT_DIR/$bin_file ]; then
$INSTALL_NAME_TOOL -add_rpath "$OUT_DIR/lib" "$OUT_DIR/$bin_file"
fi
done
# echo "Creating symbolic links..."
. ./make_symlinks
if [ -f lib/cmake/ITK-@ITK_VERSION_STRING@/ITKConfig.cmake ]; then
rm -fr $OUT_DIR/bin/*
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT_DIR,g" lib/cmake/ITK-@ITK_VERSION_STRING@/Modules/ITKZLIB.cmake
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT_DIR,g" lib/cmake/ITK-@ITK_VERSION_STRING@/ITKConfig.cmake
sed -i "s,@CMAKE_INSTALL_PREFIX@,$OUT_DIR,g" lib/cmake/ITK-@ITK_VERSION_STRING@/ITKTargets-release.cmake
fi
rm -fr $OUT_DIR/tools
rm -f $OUT_DIR/pkgsetup
rm -f $OUT_DIR/make_symlinks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment