# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup github 1.0 categories www maintainers {@barracuda156 gmail.com:vital.had} openmaintainer license GPL-2 name tenfourfox subport tenfourfox-devel {} # Re ppc64: https://github.com/classilla/tenfourfox/issues/655 supported_archs ppc universal_variant no installs_libs no if {${subport} eq "${name}"} { conflicts ${name}-devel description Clone of Firefox, compatible with macOS 10.4+. This version corresponds \ to the latest released version of ${name}. long_description ${description} github.setup classilla tenfourfox FPR32SPR5 checksums rmd160 e9a499d3acfe69c622eeafc7ea68ef957b7bdf3c \ sha256 b5aef01b6d031e4b582460955e3a3b95f7b3bfb994cdfa0171f0cd6279ca21ce \ size 325688845 } elseif {${subport} eq "${name}-devel"} { conflicts ${name} description Clone of Firefox, compatible with macOS 10.4+. Tracks latest commit on GitHub. long_description ${description} github.setup classilla tenfourfox 656875dfebe724c31896e3073780638e2c213f81 version 20230921-FPR32 checksums rmd160 82d5229d46ab25ec9850754d97fd4f7ccad8c5e3 \ sha256 a523c6a9985f1df83c167839b36f8c3ed6a67e133baf42859cf0d826e3d17bda \ size 326149990 } # Verify we have the required SDK: platform darwin { set tiger_sdkpath ${developer_dir}/SDKs/MacOSX10.4u.sdk if {![file exists $tiger_sdkpath]} { pre-fetch {ui_error "Building ${name} @${version} requires the MacOSX10.4u.sdk to be present in ${developer_dir}/SDKs/"} } } # https://github.com/classilla/tenfourfox/wiki/HowToBuildFPR depends_build-append port:autoconf213 \ port:cctools \ port:freetype \ port:gcc48 \ port:gmake \ port:ld64 \ port:libidl \ port:python27 if {${os.major} < 10} { # Strip disabled below for 10.6 Rosetta/ppc. depends_build-append \ port:strip7 } variant G4 conflicts G5 description "Optimize for G4 CPU" { post-extract { if {${os.major} == 10} { move ${worksrcpath}/G4-7450-nostrip.mozcfg ${worksrcpath}/.mozconfig } else { move ${worksrcpath}/G4-7450.mozcfg ${worksrcpath}/.mozconfig } } post-patch { reinplace "s|Debugging|macOS ${macos_version} on G4|g" ${worksrcpath}/netwerk/protocol/http/OptimizedFor.h } } variant G5 conflicts G4 description "Optimize for G5 CPU" { post-extract { if {${os.major} == 10} { move ${worksrcpath}/G5-nostrip.mozcfg ${worksrcpath}/.mozconfig } else { move ${worksrcpath}/G5.mozcfg ${worksrcpath}/.mozconfig } } post-patch { reinplace "s|Debugging|macOS ${macos_version} on G5|g" ${worksrcpath}/netwerk/protocol/http/OptimizedFor.h } } if {![variant_isset G5]} { default_variants +G4 } patch.pre_args -p1 patchfiles-append patch-ots-stdlog-fix.diff post-patch { reinplace "s|-j2|-j${buildmakejobs}|" ${worksrcpath}/.mozconfig reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/.mozconfig reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/media/libvpx/Makefile.in reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/config/external/nss/Makefile.in reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/104fx_copy.sh } # This is hardcoded into the mozconfig build script, but here anyway as a reminder: compiler.whitelist macports-gcc-4.8 configure.cxx_stdlib libstdc++ use_autoconf yes autoconf.cmd autoconf213 use_configure no # We don't want to confuse the build with any macports-passed-in values. configure.cc configure.cxx configure.env # This is needed: build.env SHELL=/bin/bash build.cmd gmake -f client.mk build # Make it self-contained. This could be removed if we want to keep it lean, # but then we'd have to copy the app from a different spot. pre-destroot { system -W ${worksrcpath} "./104fx_copy.sh TenFourFox.app" } destroot { move ${worksrcpath}/TenFourFox.app ${destroot}${applications_dir} }