瀏覽代碼

add Darwin cross-compile patches

Waldemar Brodkorb 14 年之前
父節點
當前提交
ba43825b2d

+ 7 - 4
package/firefox/Makefile

@@ -9,11 +9,11 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		3468a2c463b4fc2788ba621e4b511c30
 PKG_DESCR:=		graphical webbrowser
 PKG_SECTION:=		x11/apps
-PKG_DEPENDS:=		libpthread alsa-lib dbus-glib glib libgtk libnotify libpng libtiff
+PKG_DEPENDS:=		libpthread alsa-lib dbus-glib glib libgtk libpng libtiff libnotify
 PKG_DEPENDS+=		nspr nss libjpeg libatk pango cairo libxt libx11 libstdcxx hicolor-icon-theme
 PKG_DEPENDS+=		libxdamage libxfixes libidl libsqlite libxcomposite gdk-pixbuf
-PKG_BUILDDEP:=		alsa-lib dbus-glib glib gtk+ libnotify libIDL libX11 MesaLib libtiff
-PKG_BUILDDEP+=		nspr nss jpeg libXt fontconfig sqlite atk libpng hicolor-icon-theme
+PKG_BUILDDEP:=		alsa-lib dbus-glib glib gtk+ libIDL libX11 MesaLib libtiff gdk-pixbuf
+PKG_BUILDDEP+=		nspr nss jpeg libXt fontconfig sqlite atk libpng hicolor-icon-theme libnotify
 PKG_URL:=		http://www.mozilla.org/
 PKG_SITES:=		http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PKG_VERSION}/source/
 PKG_NOPARALLEL:=	1
@@ -39,7 +39,9 @@ endif
 
 CONFIGURE_ENV+=		CROSS_COMPILE=1 \
 			HOST_CC="${CC_FOR_BUILD}" \
+			HOST_CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \
 			HOST_CFLAGS="${CFLAGS_FOR_BUILD}" \
+			HOST_LDFLAGS="${LDLAGS_FOR_BUILD}" \
 			HOST_CXX="${CXX_FOR_BUILD}" \
 			HOST_CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
 			BUILD_LIBIDL_CONFIG="${BUILD_LIBIDL_CONFIG}" \
@@ -65,6 +67,7 @@ CONFIGURE_ARGS+=	--enable-application=browser \
 			--with-libIDL-prefix=${STAGING_TARGET_DIR}/usr \
 			--with-glib-prefix=${STAGING_TARGET_DIR}/usr \
 			--enable-libxul \
+			--enable-libnotify \
 			--enable-dbus \
 			--disable-tests \
 			--disable-libconic \
@@ -78,7 +81,7 @@ CONFIGURE_ARGS+=	--enable-application=browser \
 			--disable-jemalloc \
 			--disable-crashreporter
 
-XAKE_FLAGS+=		OS_RELEASE="2.6"
+XAKE_FLAGS+=		OS_RELEASE="2.6" HOST_CC=$(CC_FOR_BUILD) HOST_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 XAKE_FLAGS+=            ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS}"
 
 firefox-install:

+ 10 - 1
package/firefox/patches/patch-configure

@@ -1,5 +1,14 @@
 --- mozilla-2.0.orig/configure	2011-03-19 00:48:56.000000000 +0100
-+++ mozilla-2.0/configure	2011-03-28 12:25:19.041814743 +0200
++++ mozilla-2.0/configure	2011-04-07 18:48:49.000000000 +0200
+@@ -1588,7 +1588,7 @@ test -n "$HOST_CXX" || HOST_CXX=""""
+         HOST_CXXFLAGS="$CXXFLAGS"
+     fi
+     if test -z "$HOST_LDFLAGS"; then
+-        HOST_LDFLAGS="$LDFLAGS"
++        HOST_LDFLAGS="$LDFLAGS_FOR_BUILD"
+     fi
+     if test -z "$HOST_AR_FLAGS"; then
+         HOST_AR_FLAGS="$AR_FLAGS"
 @@ -22573,15 +22573,6 @@ if test "${with_libIDL+set}" = set; then
  fi
  

+ 24 - 0
package/firefox/patches/patch-ipc_chromium_src_base_debug_util_posix_cc

@@ -0,0 +1,24 @@
+--- mozilla-2.0.orig/ipc/chromium/src/base/debug_util_posix.cc	2011-03-19 00:33:46.000000000 +0100
++++ mozilla-2.0/ipc/chromium/src/base/debug_util_posix.cc	2011-04-07 20:17:31.000000000 +0200
+@@ -119,11 +119,7 @@ StackTrace::StackTrace() {
+   const int kMaxCallers = 256;
+ 
+   void* callers[kMaxCallers];
+-#ifndef ANDROID
+-  int count = backtrace(callers, kMaxCallers);
+-#else
+   int count = 0;
+-#endif
+ 
+   // Though the backtrace API man page does not list any possible negative
+   // return values, we still still exclude them because they would break the
+@@ -138,9 +134,6 @@ StackTrace::StackTrace() {
+ 
+ void StackTrace::PrintBacktrace() {
+   fflush(stderr);
+-#ifndef ANDROID
+-  backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO);
+-#endif
+ }
+ 
+ void StackTrace::OutputToStream(std::ostream* os) {

+ 20 - 0
package/firefox/patches/patch-xpcom_reflect_xptcall_src_md_unix_xptc_platforms_unixish_x86_h

@@ -0,0 +1,20 @@
+--- mozilla-2.0.orig/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h	2011-03-19 00:34:13.000000000 +0100
++++ mozilla-2.0/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h	2011-04-07 19:02:44.000000000 +0200
+@@ -67,6 +67,9 @@
+ *
+ */
+ 
++#define CFRONT_STYLE_THIS_ADJUST
++
++#if 0
+ #if defined(LINUX) || (defined(__GLIBC__) && (defined(__FreeBSD_kernel__) || defined(__GNU__)))
+ 
+ #if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
+@@ -159,6 +162,7 @@
+ #else
+ #error "need a platform define if using unixish x86 code"
+ #endif
++#endif
+ 
+ /***************************************************************************/
+