Ticket #41319: patch-bin-mklib.diff

File patch-bin-mklib.diff, 1.6 KB (added by dstrubbe (David Strubbe), 11 years ago)
  • bin/mklib

    old new  
    4343ARCHOPT=""
    4444NOPREFIX=0
    4545EXPORTS=""
    46 
     46ID=""
    4747
    4848#
    4949# Parse arguments
     
    7373            echo '  -archopt OPT  specify an extra achitecture-specific option OPT'
    7474            echo "  -noprefix     don't prefix library name with 'lib' nor add any suffix"
    7575            echo '  -exports FILE only export the symbols listed in FILE'
     76            echo '  -id NAME      Sets the id of the dylib (Darwin)'
    7677            echo '  -h, --help    display this information and exit'
    7778            exit 1
    7879            ;;
     
    142143            shift 1;
    143144            EXPORTS=$1
    144145            ;;
     146        '-id')
     147            shift 1;
     148            ID=$1
     149            ;;
    145150        -*)
    146151            echo "mklib: Unknown option: " $1 ;
    147152            exit 1
     
    185190    echo PATCH is $PATCH
    186191    echo DEPS are $DEPS
    187192    echo "EXPORTS in" $EXPORTS
     193    echo ID is $ID
    188194    echo "-----------------"
    189195fi
    190196
     
    584590                OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
    585591            else
    586592                LIBSUFFIX="dylib"
    587                 OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
     593                if [ -z "$ID" ] ; then
     594                    ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
     595                fi
     596                OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
    588597            fi
    589598            LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
    590599            LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"