Selaa lähdekoodia

Bash this beasty package further on to hopefully build correctly at some point in the future. Patches are welcome to get this package building, please.

Ralf S. Engelschall 20 vuotta sitten
vanhempi
commit
9662812400
2 muutettua tiedostoa jossa 112 lisäystä ja 26 poistoa
  1. 88 0
      firefox/firefox.patch
  2. 24 26
      firefox/firefox.spec

+ 88 - 0
firefox/firefox.patch

@@ -1,3 +1,4 @@
+Index: nsprpub/pr/include/md/_freebsd.h
 --- nsprpub/pr/include/md/_freebsd.h.orig	Sat Feb 16 09:12:55 2002
 +++ nsprpub/pr/include/md/_freebsd.h	Thu Aug  8 19:31:23 2002
 @@ -40,6 +40,7 @@
@@ -8,6 +9,19 @@
  #include <sys/syscall.h>
  
  #define PR_LINKER_ARCH	"freebsd"
+Index: nsprpub/pr/include/md/_pth.h
+--- nsprpub/pr/include/md/_pth.h.orig	2002-12-12 00:10:39 +0100
++++ nsprpub/pr/include/md/_pth.h	2004-12-27 19:52:48 +0100
+@@ -90,7 +90,7 @@
+ #define _PT_PTHREAD_MUTEXATTR_INIT        pthread_mutexattr_init
+ #define _PT_PTHREAD_MUTEXATTR_DESTROY     pthread_mutexattr_destroy
+ #define _PT_PTHREAD_MUTEX_INIT(m, a)      pthread_mutex_init(&(m), &(a))
+-#define _PT_PTHREAD_MUTEX_IS_LOCKED(m)    (EBUSY == pthread_mutex_trylock(&(m)))
++#define _PT_PTHREAD_MUTEX_IS_LOCKED(m)    (0 != pthread_mutex_trylock(&(m)))
+ #if defined(DARWIN)
+ #define _PT_PTHREAD_CONDATTR_INIT(x)      0
+ #else
+Index: nsprpub/pr/src/md/unix/unix.c
 --- nsprpub/pr/src/md/unix/unix.c.orig	Sat May 31 18:06:04 2003
 +++ nsprpub/pr/src/md/unix/unix.c	Sat May 31 18:04:43 2003
 @@ -65,7 +65,8 @@
@@ -29,3 +43,77 @@
      || defined(NETBSD) || defined(OPENBSD) || defined(UNIXWARE) \
      || defined(DGUX) || defined(VMS) || defined(NTO)
  #define _PRSockLen_t size_t
+Index: nsprpub/pr/src/pthreads/ptio.c
+--- nsprpub/pr/src/pthreads/ptio.c.orig	2003-07-15 00:12:19 +0200
++++ nsprpub/pr/src/pthreads/ptio.c	2004-12-27 19:54:28 +0100
+@@ -189,7 +189,7 @@
+ #endif
+ #endif
+ 
+-#ifdef DARWIN
++#if defined(DARWIN) || defined(FREEBSD)
+ static PRBool _pr_ipv6_v6only_on_by_default;
+ /* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */
+ #ifndef IPV6_V6ONLY
+@@ -1154,7 +1154,7 @@
+     _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE);
+     PR_ASSERT(_pr_stdin && _pr_stdout && _pr_stderr);
+ 
+-#ifdef DARWIN
++#if defined(DARWIN) || defined(FREEBSD)
+     /* In Mac OS X v10.3 Panther Beta the IPV6_V6ONLY socket option
+      * is turned on by default, contrary to what RFC 3493, Section
+      * 5.3 says.  So we have to turn it off.  Find out whether we
+@@ -3462,7 +3462,7 @@
+     if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno);
+     else
+     {
+-#ifdef DARWIN
++#if defined(DARWIN) || defined(FREEBSD)
+         if ((domain == AF_INET6) && _pr_ipv6_v6only_on_by_default)
+         {
+             int on = 0;
+@@ -3470,6 +3470,17 @@
+                     &on, sizeof(on));
+         }
+ #endif
++#if (defined(_PR_INET6_PROBE) || defined(_PR_INET6)) && \
++	defined(__FreeBSD__) && defined(IPV6_V6ONLY)
++		if (domain == PR_AF_INET6) {
++			int opt = 0;
++			if (setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY,
++			    &opt, sizeof(opt))) {
++				close(osfd);
++				return NULL;
++			}
++		}
++#endif  
+         fd = pt_SetMethods(osfd, ftype, PR_FALSE, PR_FALSE);
+         if (fd == NULL) close(osfd);
+     }
+Index: layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp
+--- layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp.orig	2005-02-04 20:01:59 +0100
++++ layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp	2005-02-04 20:02:52 +0100
+@@ -50,6 +50,11 @@
+ #include "nsRenderingContextGTK.h"
+ #include <gdk/gdkx.h>
+ #include <cairo.h>
++#ifdef CAIRO_HAS_XLIB_SURFACE
++#include <cairo-xlib.h>
++#else
++#error Require Cairo with Xlib backend
++#endif
+ 
+ /**
+  * \addtogroup cairo_renderer Cairo Rendering Engine
+Index: layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp
+--- layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp.orig	2004-03-16 22:40:07 +0100
++++ layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp	2005-02-04 20:03:40 +0100
+@@ -50,6 +50,7 @@
+ #include "nsIDOMSVGRect.h"
+ #include "nsSVGTypeCIDs.h"
+ #include "nsIComponentManager.h"
++#include <stdlib.h>
+ #include <cairo.h>
+ 
+ /**

+ 24 - 26
firefox/firefox.spec

@@ -22,12 +22,6 @@
 ##  SUCH DAMAGE.
 ##
 
-#   FIXME: rse: fails because some .rdf/.jar stuff cannot be built
-
-#   package version
-%define       V_main   1.0.1
-%define       V_subdir 1.0.1
-
 #   package information
 Name:         firefox
 Summary:      Graphical Web Browser
@@ -38,28 +32,27 @@ Distribution: OpenPKG
 Class:        JUNK
 Group:        Web
 License:      MPL
-Version:      %{V_subdir}
-Release:      20050309
+Version:      1.0.2
+Release:      20050324
 
 #   package options
 %option       with_optimize   yes
 
 #   list of sources
-Source0:      ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{V_subdir}/source/firefox-%{V_main}-source.tar.bz2
-Source1:      ftp://ftp.openpkg.org/sources/CPY/mozilla/mozilla-1.7.2-libart.tar.bz2
-Source2:      firefox.sh
-Source3:      firefox.pod
+Source0:      ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
+Source1:      firefox.sh
+Source2:      firefox.pod
 Patch0:       firefox.patch
 
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, perl
-PreReq:       OpenPKG, openpkg >= 20040130, xsel
+BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, perl, pkgconfig
+PreReq:       OpenPKG, openpkg >= 20040130, xsel, wmctrl
 BuildPreReq:  X11, glib, gtk, png, jpeg, orbit, libiconv
-BuildPreReq:  infozip, zlib, openssl, freetype
 PreReq:       X11, glib, gtk, png, jpeg, orbit, libiconv
-PreReq:       infozip, zlib, openssl, freetype
+BuildPreReq:  infozip, zlib, openssl, freetype, cairo, cairo::with_x11 = yes
+PreReq:       infozip, zlib, openssl, freetype, cairo, cairo::with_x11 = yes
 AutoReq:      no
 AutoReqProv:  no
 
@@ -70,7 +63,7 @@ AutoReqProv:  no
 
 %track
     prog firefox = {
-        version   = %{V_main}
+        version   = %{version}
         url       = ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/
         regex     = (__VER__)
         url       = ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/__NEWVER__/source/
@@ -79,9 +72,7 @@ AutoReqProv:  no
 
 %prep
     #   extract source distribution
-    %setup -q -c
-    %setup -q -D -T -a 1
-    cd mozilla
+    %setup -q -n mozilla
 
     #   patch source distribution
     %patch -p0
@@ -95,8 +86,6 @@ AutoReqProv:  no
     rm -rf build/package
 
 %build
-    cd mozilla
-
     #   determine X11 paths
     x11_libdir=`%{l_rc} --query x11_libdir`
     x11_incdir=`%{l_rc} --query x11_incdir`
@@ -113,15 +102,19 @@ AutoReqProv:  no
     GTK_CONFIG="%{l_prefix}/bin/gtk-config"
     LIBIDL_CONFIG="%{l_prefix}/bin/libIDL-config"
     PERL="%{l_prefix}/bin/perl"
-    MOZ_INTERNAL_LIBART_LGPL=1
+    MOZILLA_OFFICIAL=1
+    BUILD_OFFICIAL=1
+    MOZ_PHOENIX=1
     export CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
     export GLIB_CONFIG GTK_CONFIG LIBIDL_CONFIG
-    export MOZ_INTERNAL_LIBART_LGPL
+    export MOZILLA_OFFICIAL BUILD_OFFICIAL
+    export MOZ_PHOENIX
 
     #   configure source
     ./configure \
         --prefix=%{l_prefix} \
         --libdir=%{l_prefix}/lib/firefox \
+        --with-default-mozilla-five-home=%{l_prefix}/lib/firefox \
         --includedir=%{l_prefix}/include/firefox \
         --with-x \
         --x-includes=`%{l_rc} --query x11_incdir` \
@@ -137,11 +130,14 @@ AutoReqProv:  no
         --with-system-png=%{l_prefix} \
         --with-system-zlib=%{l_prefix} \
         --with-ft-prefix=%{l_prefix} \
+        --enable-application=browser \
+        --with-user-appdir=.firefox \
+        --enable-extensions=all,-typeaheadfind \
         --enable-jsd \
         --enable-crypto \
         --enable-chrome-format=jar \
         --enable-svg \
-        --enable-svg-renderer-libart \
+        --enable-svg-renderer-cairo \
         --enable-static \
         --enable-strip \
 %if "%{with_optimize}" == "yes"
@@ -165,6 +161,8 @@ AutoReqProv:  no
         --disable-cpp-rtti \
         --disable-xterm-updates \
         --disable-elf-dynstr-gc \
+        --disable-profilesharing \
+        --enable-single-profile \
         --with-pthreads
 
     #   build program
@@ -209,7 +207,7 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/man/man1
 
     #   move files into temporary installation tree
-    ( cd mozilla/dist/bin && %{l_tar} -chf - . ) |\
+    ( cd dist/bin && %{l_tar} -chf - . ) |\
         ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/firefox && %{l_tar} -xf - ) || exit $?
 
     #   add startup convenience wrapper