Ticket #59877: mozjs60.patch

File mozjs60.patch, 2.2 KB (added by Ionic (Mihai Moldovan), 5 years ago)

universal build fixes

  • lang/mozjs60/Portfile

    diff --git a/lang/mozjs60/Portfile b/lang/mozjs60/Portfile
    index 9f1fa79bcd0..433f679ec59 100644
    a b configure.cmd ../configure 
    6464configure.args      --with-system-nspr \
    6565                    --disable-readline
    6666
     67configure.universal_args-delete --disable-dependency-tracking
     68
    6769if { ${os.platform} eq "darwin" && ${os.major} < 13 } {
    6870    configure.args-append   --disable-xcode-checks
    6971}
    destroot.dir ${worksrcpath}/js/src/obj 
    7577post-destroot {
    7678    # make static lib name version specific to avoid conflict with other mozjs versions
    7779    move ${destroot}${prefix}/lib/libjs_static.ajs ${destroot}${prefix}/lib/libjs60_static.ajs
    78     # mozjs60 builds and links with libmozglue.dylib but fails to install it
    79     xinstall -m 0755 ${worksrcpath}/js/src/obj/mozglue/build/libmozglue.dylib ${destroot}${prefix}/lib
     80}
     81if {[variant_isset universal]} {
     82    merger-post-destroot {
     83        foreach arch ${universal_archs_to_use} {
     84            set dir ${destroot}-${arch}
     85            # mozjs60 builds and links with libmozglue.dylib but fails to install it
     86            xinstall -m 0755 ${worksrcpath}-${arch}/js/src/obj/mozglue/build/libmozglue.dylib ${dir}${prefix}/lib
     87        }
     88    }
     89} else {
     90    post-destroot {
     91        # mozjs60 builds and links with libmozglue.dylib but fails to install it
     92        xinstall -m 0755 ${worksrcpath}/js/src/obj/mozglue/build/libmozglue.dylib ${destroot}${prefix}/lib
     93    }
    8094}
    8195
    8296if {[variant_isset universal]} {
    8397    set merger_host(x86_64) x86_64-apple-${os.platform}${os.major}
    8498    set merger_host(i386) i686-apple-${os.platform}${os.major}
    85     set merger_configure_args(x86_64) "--build=x86_64-apple-${os.platform}${os.major} --target=x86_64-apple-${os.platform}${os.major}"
    86     set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --target=i686-apple-${os.platform}${os.major}"
     99    set merger_configure_args(x86_64) "--host=x86_64-apple-${os.platform}${os.major} --target=x86_64-apple-${os.platform}${os.major}"
     100    set merger_configure_args(i386) "--host=i686-apple-${os.platform}${os.major} --target=i686-apple-${os.platform}${os.major}"
    87101} else {
    88102    if {${build_arch} eq "i386"} {
    89103        configure.args-append \