Ticket #2442: mozjs24_osx_build_lib_changes.diff

File mozjs24_osx_build_lib_changes.diff, 6.6 KB (added by Tom Brewe, 10 years ago)

build_osx_libs.sh changes with succesful compiling mozjs24

  • build/premake/extern_libs4.lua

     
    562562    },
    563563    spidermonkey = {
    564564        compile_settings = function()
    565             if _OPTIONS["with-system-mozjs185"] then
    566                 if not _OPTIONS["android"] then
    567                     pkgconfig_cflags("mozjs185")
    568                 end
    569                 defines { "WITH_SYSTEM_MOZJS185" }
     565            if _OPTIONS["with-system-mozjs24"] then
     566                -- to be implemented when such system packages exist
     567                --if not _OPTIONS["android"] then
     568                --  pkgconfig_cflags("mozjs24")
     569                --end
     570                --defines { "WITH_SYSTEM_MOZJS24" }
    570571            else
    571572                if os.is("windows") then
    572573                    include_dir = "include-win32"
    573574                elseif os.is("macosx") then
    574575                    include_dir = "include"
    575576                else
    576                     include_dir = "include-unix"
     577                    include_dir = "include"
    577578                end
    578579                configuration "Debug"
    579                     includedirs { libraries_source_dir.."spidermonkey/"..include_dir }
     580                    includedirs { libraries_source_dir.."spidermonkey/"..include_dir.."/mozjs-24/" }
     581                    defines { "DEBUG" }
    580582                configuration "Release"
    581                     includedirs { libraries_source_dir.."spidermonkey/"..include_dir }
     583                    includedirs { libraries_source_dir.."spidermonkey/"..include_dir.."/mozjs-24/" }
    582584                configuration { }
    583585            end
    584586        end,
    585587        link_settings = function()
    586             if _OPTIONS["with-system-mozjs185"] then
    587                 if _OPTIONS["android"] then
    588                     links { "mozjs185-1.0" }
    589                 else
    590                     pkgconfig_libs("mozjs185")
    591                 end
     588            if _OPTIONS["with-system-mozjs24"] then
     589                -- to be implemented when such system packages exist
     590                --if _OPTIONS["android"] then
     591                --  links { "mozjs185-1.0" }
     592                --else
     593                --  pkgconfig_libs("mozjs185")
     594                --end
    592595            else
    593596                configuration "Debug"
    594                     links { "mozjs185-ps-debug" }
     597                    links { "mozjs24-ps-debug" }
    595598                configuration "Release"
    596                     links { "mozjs185-ps-release" }
     599                    links { "mozjs24-ps-release" }
    597600                configuration { }
    598601                add_source_lib_paths("spidermonkey")
    599602            end
  • build/premake/premake4.lua

     
    1515newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" }
    1616newoption { trigger = "with-system-enet", description = "Search standard paths for libenet, instead of using bundled copy" }
    1717newoption { trigger = "with-system-miniupnpc", description = "Search standard paths for libminiupnpc, instead of using bundled copy" }
    18 newoption { trigger = "with-system-mozjs185", description = "Search standard paths for libmozjs185, instead of using bundled copy" }
     18newoption { trigger = "with-system-mozjs24", description = "Search standard paths for libmozjs24, instead of using bundled copy" }
    1919newoption { trigger = "with-c++11", description = "Enable C++11 on GCC" }
    2020newoption { trigger = "sysroot", description = "Set compiler system root path, used for building against a non-system SDK. For example /usr/local becomes SYSROOT/user/local" }
    2121newoption { trigger = "macosx-version-min", description = "Set minimum required version of the OS X API, the build will possibly fail if an older SDK is used, while newer API functions will be weakly linked (i.e. resolved at runtime)" }
  • build/workspaces/update-workspaces.sh

     
    3737with_system_nvtt=false
    3838with_system_enet=false
    3939with_system_miniupnpc=false
    40 with_system_mozjs185=false
     40with_system_mozjs24=false
    4141enable_atlas=true
    4242
    4343for i in "$@"
     
    4747    --with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;;
    4848    --with-system-enet ) with_system_enet=true; premake_args="${premake_args} --with-system-enet" ;;
    4949    --with-system-miniupnpc ) with_system_miniupnpc=true; premake_args="${premake_args} --with-system-miniupnpc" ;;
    50     --with-system-mozjs185 ) with_system_mozjs185=true; premake_args="${premake_args} --with-system-mozjs185" ;;
     50    --with-system-mozjs24 ) with_system_mozjs24=true; premake_args="${premake_args} --with-system-mozjs24" ;;
    5151    --enable-atlas ) enable_atlas=true ;;
    5252    --disable-atlas ) enable_atlas=false ;;
    5353    -j* ) JOBS=$i ;;
     
    8181  # Build/update bundled external libraries
    8282  (cd ../../libraries/source/fcollada/src && ${MAKE} ${JOBS}) || die "FCollada build failed"
    8383  echo
    84   if [ "$with_system_mozjs185" = "false" ]; then
     84  if [ "$with_system_mozjs24" = "false" ]; then
    8585    (cd ../../libraries/source/spidermonkey && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed"
    8686  fi
    8787  echo
  • libraries/osx/build-osx-libs.sh

     
    524524# --------------------------------------------------------------------
    525525echo -e "Building Spidermonkey..."
    526526
    527 LIB_VERSION="js185-1.0.0"
    528 LIB_ARCHIVE="$LIB_VERSION.tar.gz"
    529 LIB_DIRECTORY="js-1.8.5"
     527LIB_VERSION="mozjs-24.2.0"
     528LIB_ARCHIVE="$LIB_VERSION.tar.bz2"
     529LIB_DIRECTORY="mozjs24"
    530530
    531531pushd ../source/spidermonkey/ > /dev/null
    532532
     
    538538  rm -f lib/*.a
    539539  rm -rf $LIB_DIRECTORY
    540540  tar -xf $LIB_ARCHIVE
     541  mv mozjs-24.2.0 mozjs24
    541542  pushd $LIB_DIRECTORY/js/src
    542543
    543544  # We want separate debug/release versions of the library, so change their install name in the Makefile
     
    555556
    556557  mkdir -p build-debug
    557558  pushd build-debug
    558   (CC="$CC -arch $ARCH" CXX="$CXX -arch $ARCH" AR=ar CROSS_COMPILE=1 ../configure $CONF_OPTS --enable-debug --disable-optimize && make ${JOBS} && make install) || die "Spidermonkey build failed"
     559  (CC="clang -arch $ARCH" CXX="clang++ -arch $ARCH" AR=ar CROSS_COMPILE=1 ../configure $CONF_OPTS --enable-debug --disable-optimize && make ${JOBS} && make install) || die "Spidermonkey build failed"
    559560  popd
    560561  mv Makefile.in.bak Makefile.in
    561562 
     
    563564
    564565  mkdir -p build-release
    565566  pushd build-release
    566   (CC="$CC -arch $ARCH" CXX="$CXX -arch $ARCH" AR=ar CROSS_COMPILE=1 ../configure $CONF_OPTS && make ${JOBS} && make install) || die "Spidermonkey build failed"
     567  (CC="clang -arch $ARCH" CXX="clang++ -arch $ARCH" AR=ar CROSS_COMPILE=1 ../configure --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-optimize && make ${JOBS} && make install) || die "Spidermonkey build failed"
    567568  popd
    568569  mv Makefile.in.bak Makefile.in