"Fossies" - the Fresh Open Source Software Archive

Member "gretl-2020e/osx/fixlinks.sh.in" (2 Oct 2015, 2128 Bytes) of package /linux/misc/gretl-2020e.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # exec in dir above {bin,lib} inside Gretl.app
    2 
    3 PREFIX=@prefix@
    4 
    5 # path to libraries installed via gretl's "make install"
    6 SRCPATH="${PREFIX}/lib"
    7 
    8 TOOL=install_name_tool
    9 
   10 # path to auxiliary libraries (may be set in environment)
   11 if [ "x$AUXPATH" = "x" ] ; then
   12    AUXPATH=/usr/local/lib
   13 fi
   14 
   15 # correct library path specification for distribution
   16 NEWPATH="@executable_path/../lib"
   17 
   18 # change install name of libraries
   19 $TOOL -id ${NEWPATH}/libgretl-1.0.0.dylib lib/libgretl-1.0.0.dylib
   20 $TOOL -id ${NEWPATH}/libgmp.3.dylib lib/libgmp.3.dylib
   21 $TOOL -id ${NEWPATH}/libmpfr.1.dylib lib/libmpfr.1.dylib
   22 $TOOL -id ${NEWPATH}/libreadline.5.2.dylib lib/libreadline.5.2.dylib
   23 if [ -f lib/libfftw3.3.dylib ] ; then
   24   $TOOL -id ${NEWPATH}/libfftw3.3.dylib lib/libfftw3.3.dylib
   25 fi
   26 
   27 # change install names copied into executables
   28 $TOOL -change ${SRCPATH}/libgretl-1.0.0.dylib ${NEWPATH}/libgretl-1.0.0.dylib bin/gretlcli
   29 $TOOL -change ${SRCPATH}/libgretl-1.0.0.dylib ${NEWPATH}/libgretl-1.0.0.dylib bin/gretl_x11
   30 $TOOL -change ${AUXPATH}/libgmp.3.dylib ${NEWPATH}/libgmp.3.dylib bin/gretlcli
   31 $TOOL -change ${AUXPATH}/libgmp.3.dylib ${NEWPATH}/libgmp.3.dylib bin/gretl_x11
   32 $TOOL -change ${AUXPATH}/libreadline.5.2.dylib ${NEWPATH}/libreadline.5.2.dylib bin/gretlcli
   33 $TOOL -change ${AUXPATH}/libgmp.3.dylib ${NEWPATH}/libgmp.3.dylib lib/libgretl-1.0.0.dylib
   34 $TOOL -change ${AUXPATH}/libgmp.3.dylib ${NEWPATH}/libgmp.3.dylib lib/libmpfr.1.dylib
   35 if [ -f lib/libfftw3.3.dylib ] ; then
   36   $TOOL -change ${AUXPATH}/libfftw3.3.dylib ${NEWPATH}/libfftw3.3.dylib lib/libgretl-1.0.0.dylib
   37   $TOOL -change ${AUXPATH}/libfftw3.3.dylib ${NEWPATH}/libfftw3.3.dylib bin/gretlcli
   38   $TOOL -change ${AUXPATH}/libfftw3.3.dylib ${NEWPATH}/libfftw3.3.dylib bin/gretl_x11
   39 fi
   40 
   41 # fix paths in plugins
   42 for d in lib/gretl-gtk2/*.so ; do
   43    $TOOL -change ${AUXPATH}/libgmp.3.dylib ${NEWPATH}/libgmp.3.dylib $d
   44    $TOOL -change ${AUXPATH}/libfftw3.3.dylib ${NEWPATH}/libfftw3.3.dylib $d
   45    $TOOL -change ${SRCPATH}/libgretl-1.0.0.dylib ${NEWPATH}/libgretl-1.0.0.dylib $d
   46 done
   47 
   48 $TOOL -change ${AUXPATH}/libmpfr.1.dylib ${NEWPATH}/libmpfr.1.dylib lib/gretl-gtk2/mp_ols.so
   49 
   50 
   51 
   52