Skip to content

Commit 0e3cda6

Browse files
authored
Merge pull request #1584 from GillesDuvert/test_have_all_needed_libraries_in_dmg
OK finally the good plplot libraries are shipped with the OSX DMG. No need to install anything on the target Mac. This will NOT work for a M1 mac however.
2 parents f3165e5 + 4a16fb6 commit 0e3cda6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

scripts/build_gdl.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ function prep_packages {
392392
pushd ${ROOT_DIR}/PLplot
393393
mkdir build
394394
pushd ${ROOT_DIR}/PLplot/build
395-
cmake .. -DCMAKE_INSTALL_PREFIX=${HOME}/plplot-local -DENABLE_octave=OFF -DENABLE_qt=OFF -DENABLE_lua=OFF -DENABLE_tk=OFF -DENABLE_python=OFF -DENABLE_tcl=OFF -DPLD_xcairo=OFF -DPLD_wxwidgets=ON -DENABLE_wxwidgets=ON -DENABLE_DYNDRIVERS=ON -DENABLE_java=OFF -DPLD_xwin=ON -DENABLE_fortran=OFF
395+
cmake .. -DENABLE_octave=OFF -DENABLE_qt=OFF -DENABLE_lua=OFF \
396+
-DENABLE_tk=OFF -DENABLE_python=OFF -DENABLE_tcl=OFF -DPLD_xcairo=OFF -DPLD_wxwidgets=ON -DENABLE_wxwidgets=ON \
397+
-DENABLE_DYNDRIVERS=ON -DENABLE_java=OFF -DPLD_xwin=ON -DENABLE_fortran=OFF
396398
make
397399
make install
398400
popd
@@ -440,14 +442,12 @@ function configure_gdl {
440442
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/opt/llvm/lib
441443
CMAKE_ADDITIONAL_ARGS=( "-DREADLINEDIR=/opt/homebrew/opt/readline"
442444
"-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++"
443-
"-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang"
444-
"-DCMAKE_PREFIX_PATH=${HOME}/plplot-local" )
445+
"-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang" )
445446
else
446447
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/llvm/lib
447448
CMAKE_ADDITIONAL_ARGS=( "-DREADLINEDIR=/usr/local/opt/readline"
448449
"-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++"
449-
"-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang"
450-
"-DCMAKE_PREFIX_PATH=${HOME}/plplot-local" )
450+
"-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang" )
451451
fi
452452
fi
453453

@@ -502,7 +502,6 @@ function install_gdl {
502502
make install || exit 1
503503

504504
cd ${ROOT_DIR}/install
505-
echo "mname="${mname}
506505
echo "ROOT_DIR="${ROOT_DIR}
507506
if [ ${BUILD_OS} == "Windows" ]; then
508507
log "Copying DLLs to install directory..."
@@ -598,6 +597,8 @@ function pack_gdl {
598597
cp ${GDL_DIR}/resource/gdl.icns Resources/
599598

600599
mkdir Frameworks
600+
#GD: found the need to have plplot libs seen with fixed paths in otool to make he App inependent from the build machine (to export via a DMG)
601+
for dylib in $(otool -l Resources/bin/gdl | grep libplplot | sed -e "s%name %%g;s%(.*)%%g" | xargs); do install_name_tool -change $dylib /usr/local/lib/`basename $dylib` Resources/bin/gdl; done
601602
found_dylibs=()
602603
copy_dylibs_recursive Resources/bin/gdl @executable_path/../../Frameworks Frameworks
603604

src/gdl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ namespace MyPaths {
242242

243243
int main(int argc, char *argv[])
244244
{
245-
#if GDL_DEBUG
245+
#ifdef GDL_DEBUG
246246
if( atexit( AtExit) != 0) cerr << "atexit registration failed." << endl;
247247
#endif
248248
// indicates if the user wants to see the welcome message

0 commit comments

Comments
 (0)