Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/net
In directory vz-cvs-3.sog:/tmp/cvs-serv3224

Modified Files:
        tenfourfox.info tenfourfox.patch 
Log Message:
backported from tenfourfox5: enabled CPU optimizations, build works on 10.5


Index: tenfourfox.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/net/tenfourfox.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tenfourfox.patch    10 Jan 2011 01:47:52 -0000      1.1
+++ tenfourfox.patch    1 Jul 2011 03:34:27 -0000       1.2
@@ -1,30 +1,47 @@
-+++ mozilla-central/.mozconfig 2009-04-27 16:56:30.000000000 -0400
-@@ -0,0 +1,50 @@
+--- /dev/null
++++ mozilla-release/.mozconfig 2009-04-27 16:56:30.000000000 -0400
+@@ -0,0 +1,65 @@
 +# sh
 +# Build configuration script
 +#
 +# See https://developer.mozilla.org/en/Configuring_Build_Options for build 
options.
-+#
++# and http://code.google.com/p/tenfourfox/wiki/HowToBuildNow
 +
-+. $topsrcdir/browser/config/mozconfig
++# default to G3 if unknown
++tune=G3
++case `machine` in
++  ppc750) tune=G3 ;;
++  ppc7400) tune=G4-7400 ;;
++  ppc7450) tune=G4-7450 ;;
++  ppc970) tune=G5 ;;
++esac
++. $topsrcdir/$tune.mozcfg
++
++# This is already called inside the above config:
++# . $topsrcdir/browser/config/mozconfig
 +
 +# Options for client.mk.
 +# environment variables to set
 +
-+mk_add_options 
MOZ_OBJDIR=@TOPSRCDIR@/obj-@FINK_ARCH_TARGET@-apple-darwin`uname -r`
-+mk_add_options AUTOCONF=autoconf
-+CC="flag-sort gcc-4.0"
-+CXX="flag-sort g++-4.0"
++mk_add_options 
MOZ_OBJDIR=$topsrcdir/obj-@FINK_ARCH_TARGET@-apple-darwin`uname -r`
++#mk_add_options AUTOCONF=autoconf
++
++# compiler wrappers
++GCC_PREFIX="flag-sort"
++GCC_EXEC_OVERRIDE=
++CC="$GCC_PREFIX $CC $GCC_EXEC_OVERRIDE"
++CXX="$GCC_PREFIX $CXX $GCC_EXEC_OVERRIDE"
++
 +ac_add_options --target=@FINK_ARCH_TARGET@-apple-darwin`uname -r`
-+ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
-+HOST_CC="flag-sort gcc-4.0"
-+HOST_CXX="flag-sort g++-4.0"
-+RANLIB=/usr/bin/ranlib
-+AR=/usr/bin/ar
-+AS=$CC
-+LD=/usr/bin/ld
-+STRIP="strip -x -S"
-+CROSS_COMPILE=1
++#ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
++#HOST_CC="$CC"
++#HOST_CXX="$CXX"
++#RANLIB=/usr/bin/ranlib
++#AR=/usr/bin/ar
++#AS=$CC
++#LD="$GCC_EXEC_OVERRIDE/ld"
++#STRIP="strip -x -S"
++#CROSS_COMPILE=1
 +
 +# Options for 'configure' (same as command-line options).
 +ac_add_options --prefix=@FINKPREFIX@
@@ -38,27 +55,17 @@
 +#ac_add_options --enable-extensions=default,-gnomevfs
 +
 +#ac_add_options --disable-dependency-tracking
-+ac_add_options --disable-crashreporter
-+ac_add_options --disable-ipc
++#ac_add_options --disable-crashreporter
++#ac_add_options --disable-ipc
 +ac_add_options --disable-necko-wifi
 +
-+ac_add_options --disable-debug
-+ac_add_options --disable-tests
-+ac_add_options --enable-strip
-+ac_add_options --enable-macos-target=10.4
-+#ac_add_options --with-default-mozilla-five-home=@FINKPREFIX@/lib/firefox4
++#ac_add_options --disable-debug
++#ac_add_options --disable-tests
++#ac_add_options --enable-strip
++#ac_add_options --enable-macos-target=10.4
 +ac_add_options --with-system-jpeg=@FINKPREFIX@
 +ac_add_options --disable-system-cairo
 +ac_add_options --disable-system-sqlite
-+
-+# from tenfourfox patchset [export/3]:
-+ac_add_options --disable-static
-+ac_add_options --disable-libxul
-+ac_add_options --enable-chrome-format=jar
-+ac_add_options --enable-optimizations
-+ac_add_options --disable-cpp-exceptions
-+ac_add_options --enable-printing
-+ac_add_options --enable-prebinding
 diff -ruN 
mozilla-central-orig/browser/locales/generic/profile/bookmarks.html.in 
mozilla-central/browser/locales/generic/profile/bookmarks.html.in
 --- mozilla-central-orig/browser/locales/generic/profile/bookmarks.html.in     
2009-04-23 21:46:37.000000000 -0400
 +++ mozilla-central/browser/locales/generic/profile/bookmarks.html.in  
2009-04-27 16:56:30.000000000 -0400

Index: tenfourfox.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/net/tenfourfox.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- tenfourfox.info     23 Jun 2011 16:29:35 -0000      1.8
+++ tenfourfox.info     1 Jul 2011 03:34:27 -0000       1.9
@@ -1,14 +1,12 @@
 Info3: <<
 Package: tenfourfox
 Version: 4.0.1
-Revision: 2
+Revision: 3
 Distribution: 10.4, 10.5
 Architecture: powerpc
 Description: Port of Firefox 4 to 10.4 and PowerPC
 License: OSI-Approved
 Maintainer: David Fang <fang...@users.sourceforge.net>
-Conflicts: tenfourfox5
-Replaces: tenfourfox5
 Depends: <<
 #      bzip2-shlibs,
 #      fontconfig2-shlibs (>= 2.4.1-1),
@@ -45,32 +43,73 @@
        system-openssl-dev,
        system-sdk-10.4
 <<
+Conflicts: tenfourfox5
+Replaces: tenfourfox5
 Source: 
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%v/source/firefox-%v.source.tar.bz2
 SourceDirectory: mozilla-2.0
 Source-MD5: 9abda7d23151e97913c8555a64c13f34
 Source2: 
http://tenfourfox.googlecode.com/files/TenFourFox-changesets-20110422.zip
 Source2-MD5: 3edbc7aba3cacb52337ee4d553b860fd
 PatchFile: %n.patch
-PatchFile-MD5: 54a6d68b8289a0224d76d9e8f42335d7
+PatchFile-MD5: f79377eb04452a23e0425372b70b4891
 PatchScript: <<
   #!/bin/sh -ev
   # apply patchset from TenFourFox:
   for f in ../exports/*
   do
     echo "Patching in changeset $f ..."
-#    patch -p1 < $f || { echo "... patch $f failed." ; patch_err=1 ;}
-#    hg import --no-commit -p1 $f || { echo "... patch $f failed." ; 
patch_err=1 ;}
     git apply -p1 $f || { echo "... patch $f failed." ; patch_err=1 ;}
   done
   test -z "$patch_err" || { echo "Patch error above.  Aborting." ; exit 1;}
   ### apply the patch
   echo "Applying patch %{PatchFile} ..."
-  /usr/bin/sed -e 's|@FINKPREFIX@|%p|g' -e 's|@FINK_ARCH_TARGET@|%m|g' 
<%{PatchFile} | /usr/bin/patch -p1
+  /usr/bin/sed -e 's|@FINKPREFIX@|%p|g' \
+       -e 's|@FINK_ARCH_TARGET@|%m|g' \
+       < %{PatchFile} | /usr/bin/patch -p1
   # leave @executable_path alone and take care of adjusting install_names
   # between build and install, below.
   # configure inputs were patched, hence regeneration
   export PATH=%p/lib/autoconf2.13/bin:$PATH
   autoconf
+  mkdir -p opt-bin
+  pushd opt-bin
+    # darwin9 only: python with hacked environment
+    # b/c python requires run-time M_D_T to be consistent with build-time
+    # the rest of the build should use M_D_T=10.4
+    this_dist=`sw_vers -productVersion | cut -d. -f1-2`
+    if test $this_dist = 10.5
+    then
+      realpy=`which python`
+      echo "#!/bin/sh -e" > python
+      echo "export MACOSX_DEPLOYMENT_TARGET=$this_dist" >> python
+      echo "exec $realpy \"\$@\"" >> python
+      chmod +x python
+      echo "PYTHON=%b/opt-bin/python" >> ../.mozconfig
+      # and then force python-wrapped gcc calls back to M_D_T=10.4
+      echo "#!/bin/sh -e" > MDT10.4
+      echo "export MACOSX_DEPLOYMENT_TARGET=10.4" >> MDT10.4
+      echo "exec \"\$@\"" >> MDT10.4
+      chmod +x MDT10.4
+      sed -i.orig -e '/^GCC_PREFIX=/s|flag-sort|MDT10.4 &|' ../.mozconfig
+    fi
+  popd
+  # enable processor-specific optimization and tuning
+  for f in *.mozcfg
+  do
+       sed -i.orig -e '/AUTOCONF/s|autoconf213|autoconf|' \
+               -e '/MOZ_MAKE_FLAGS/s|^|# |' \
+               -e '/MOZ_OBJDIR/s|^|# |' $f
+  done
+  # .mozconfig will dispatch the right CPU.mozcfg
+  cpu=`machine`
+  case $cpu in
+    ppc750) alt=G3 ;;
+    ppc7400) alt=G4 ;;
+    ppc7450) alt=G4e ;;
+    ppc970) alt=G5 ;;
+  esac
+  sed -i.orig -e "/OPTIMIZED_FOR/s|Debugging|$cpu ($alt)|" 
netwerk/protocol/http/OptimizedFor.h
+  echo "%n-%v-%r build tuned for $cpu ($alt)" > BUILD.OPTIMIZATION
 <<
 # even on 10.5
 SetMACOSX_DEPLOYMENT_TARGET: 10.4
@@ -86,7 +125,7 @@
 echo "open -a %p/Applications/TenFourFox.app \"$@\"" ;} > tenfourfox
 chmod +x tenfourfox
 
-export PATH=%p/lib/autoconf2.13/bin:$PATH
+export PATH=%b/opt-bin:%p/lib/autoconf2.13/bin:$PATH
 export PKG_CONFIG_PATH=%p/lib/system-openssl/lib/pkgconfig:$PKG_CONFIG_PATH
 $make -w -f client.mk build
 objdir=obj-%m-apple-darwin`uname -r`
@@ -134,9 +173,13 @@
 DocFiles: LEGAL LICENSE README.txt toolkit/content/license.html
 # shlibs are all private for now, until there is actual interest in them
 Shlibs: <<
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libangle.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libfreebl3.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libgkgfx.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libmozalloc.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libmozjs.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libmozsqlite3.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libmozz.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libnspr4.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libnss3.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libnssckbi.dylib
@@ -147,7 +190,10 @@
        !%p/Applications/TenFourFox.app/Contents/MacOS/libsmime3.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libsoftokn3.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libssl3.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libthebes.dylib
        !%p/Applications/TenFourFox.app/Contents/MacOS/libxpcom.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libxpcom_core.dylib
+       !%p/Applications/TenFourFox.app/Contents/MacOS/libycbcr.dylib
 <<
 Homepage: http://www.tenfourfox.com/
 DescDetail: <<
@@ -187,10 +233,21 @@
 I've added it to BuildConflicts to be safe.
 <<
 DescPort: <<
+All the hard work is done by the developers of TenFourFox, 
+led by Cameron Kaiser.
+
 Bunch of patches to rules.mk and client.mk are for enabling
 parallel builds to share the same jobserver as the master/parent
 make, so recursive instances of make benefit from -jN MAKEFLAGS.  
 
+Compiling on darwin9 (10.5) was a big pain (MACOSX_DEPLOYMENT_TARGET):
+M_D_T needed to be set to 10.4 to use the 10.4 SDK.
+Python scripts (wrappers) however need M_D_T equal to that with which
+python was built, which happens to be 10.5.
+M_D_T was overriden in wrapped calls to python, but then gcc 
+needed the outermost M_D_T, so CC/CXX were wrapped in yet
+another layer of M_D_T.
+
 Using system-provided libraries:
 --------------------------------
 . system-png cannot be used because it lacks APNG (upstream won't include it)


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to