Ticket #2442: mozjs24_osx_build_lib_changes.diff
File mozjs24_osx_build_lib_changes.diff, 6.6 KB (added by , 10 years ago) |
---|
-
build/premake/extern_libs4.lua
562 562 }, 563 563 spidermonkey = { 564 564 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" } 570 571 else 571 572 if os.is("windows") then 572 573 include_dir = "include-win32" 573 574 elseif os.is("macosx") then 574 575 include_dir = "include" 575 576 else 576 include_dir = "include -unix"577 include_dir = "include" 577 578 end 578 579 configuration "Debug" 579 includedirs { libraries_source_dir.."spidermonkey/"..include_dir } 580 includedirs { libraries_source_dir.."spidermonkey/"..include_dir.."/mozjs-24/" } 581 defines { "DEBUG" } 580 582 configuration "Release" 581 includedirs { libraries_source_dir.."spidermonkey/"..include_dir }583 includedirs { libraries_source_dir.."spidermonkey/"..include_dir.."/mozjs-24/" } 582 584 configuration { } 583 585 end 584 586 end, 585 587 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 592 595 else 593 596 configuration "Debug" 594 links { "mozjs 185-ps-debug" }597 links { "mozjs24-ps-debug" } 595 598 configuration "Release" 596 links { "mozjs 185-ps-release" }599 links { "mozjs24-ps-release" } 597 600 configuration { } 598 601 add_source_lib_paths("spidermonkey") 599 602 end -
build/premake/premake4.lua
15 15 newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" } 16 16 newoption { trigger = "with-system-enet", description = "Search standard paths for libenet, instead of using bundled copy" } 17 17 newoption { trigger = "with-system-miniupnpc", description = "Search standard paths for libminiupnpc, instead of using bundled copy" } 18 newoption { trigger = "with-system-mozjs 185", description = "Search standard paths for libmozjs185, instead of using bundled copy" }18 newoption { trigger = "with-system-mozjs24", description = "Search standard paths for libmozjs24, instead of using bundled copy" } 19 19 newoption { trigger = "with-c++11", description = "Enable C++11 on GCC" } 20 20 newoption { trigger = "sysroot", description = "Set compiler system root path, used for building against a non-system SDK. For example /usr/local becomes SYSROOT/user/local" } 21 21 newoption { 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
37 37 with_system_nvtt=false 38 38 with_system_enet=false 39 39 with_system_miniupnpc=false 40 with_system_mozjs 185=false40 with_system_mozjs24=false 41 41 enable_atlas=true 42 42 43 43 for i in "$@" … … 47 47 --with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;; 48 48 --with-system-enet ) with_system_enet=true; premake_args="${premake_args} --with-system-enet" ;; 49 49 --with-system-miniupnpc ) with_system_miniupnpc=true; premake_args="${premake_args} --with-system-miniupnpc" ;; 50 --with-system-mozjs 185 ) 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" ;; 51 51 --enable-atlas ) enable_atlas=true ;; 52 52 --disable-atlas ) enable_atlas=false ;; 53 53 -j* ) JOBS=$i ;; … … 81 81 # Build/update bundled external libraries 82 82 (cd ../../libraries/source/fcollada/src && ${MAKE} ${JOBS}) || die "FCollada build failed" 83 83 echo 84 if [ "$with_system_mozjs 185" = "false" ]; then84 if [ "$with_system_mozjs24" = "false" ]; then 85 85 (cd ../../libraries/source/spidermonkey && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "SpiderMonkey build failed" 86 86 fi 87 87 echo -
libraries/osx/build-osx-libs.sh
524 524 # -------------------------------------------------------------------- 525 525 echo -e "Building Spidermonkey..." 526 526 527 LIB_VERSION=" js185-1.0.0"528 LIB_ARCHIVE="$LIB_VERSION.tar. gz"529 LIB_DIRECTORY=" js-1.8.5"527 LIB_VERSION="mozjs-24.2.0" 528 LIB_ARCHIVE="$LIB_VERSION.tar.bz2" 529 LIB_DIRECTORY="mozjs24" 530 530 531 531 pushd ../source/spidermonkey/ > /dev/null 532 532 … … 538 538 rm -f lib/*.a 539 539 rm -rf $LIB_DIRECTORY 540 540 tar -xf $LIB_ARCHIVE 541 mv mozjs-24.2.0 mozjs24 541 542 pushd $LIB_DIRECTORY/js/src 542 543 543 544 # We want separate debug/release versions of the library, so change their install name in the Makefile … … 555 556 556 557 mkdir -p build-debug 557 558 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" 559 560 popd 560 561 mv Makefile.in.bak Makefile.in 561 562 … … 563 564 564 565 mkdir -p build-release 565 566 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" 567 568 popd 568 569 mv Makefile.in.bak Makefile.in