[oe-commits] org.oe.dev firefox_2.0.bb : add a version 2.0 of the browser. I have fixed problems

xora commit openembedded-commits at lists.openembedded.org
Tue Dec 12 12:27:48 UTC 2006


firefox_2.0.bb : add a version 2.0 of the browser. I have fixed problems
in crosscompiling where BUILD_HOST CCFLAGS were set by mozilla makefiles
and also a problem where jsautocfg.h crafter for arm was overwritten by
BUILD_HOST version during compile.

This still SIGILL's on me, hopefully someone will find that problem.

Author: xora at openembedded.org
Branch: org.openembedded.dev
Revision: 19860068438a3f48413a2f40e4032ce5e8c1fe7d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=19860068438a3f48413a2f40e4032ce5e8c1fe7d
Files:
1
packages/mozilla/firefox-2.0
packages/mozilla/firefox-2.0/jsautocfg-dontoverwrite.patch
packages/mozilla/firefox-2.0/jsautocfg.h
packages/mozilla/firefox-2.0/mozconfig
packages/mozilla/firefox-2.0/security-cross.patch
packages/mozilla/firefox_2.0.bb
Diffs:

#
# mt diff -rf1d7476860f569e3fa2e97db12daf5c4513332f8 -r19860068438a3f48413a2f40e4032ce5e8c1fe7d
#
# 
# 
# add_dir "packages/mozilla/firefox-2.0"
# 
# add_file "packages/mozilla/firefox-2.0/jsautocfg-dontoverwrite.patch"
#  content [8f2732cf8a7aff7b068849db230a84c7aba2cd44]
# 
# add_file "packages/mozilla/firefox-2.0/jsautocfg.h"
#  content [40eff76a6d339624a0863aeeecd123d4c6dd54fd]
# 
# add_file "packages/mozilla/firefox-2.0/mozconfig"
#  content [74aa186738f649c487aa2b9e77ee4cb73ca3e2d7]
# 
# add_file "packages/mozilla/firefox-2.0/security-cross.patch"
#  content [d414420652c62ebdb6b1d7c5967ad1366aa98d84]
# 
# add_file "packages/mozilla/firefox_2.0.bb"
#  content [c0f06e7955190d0c95904f014ddfa5b5a9cad0f1]
# 
============================================================
--- packages/mozilla/firefox-2.0/jsautocfg-dontoverwrite.patch	8f2732cf8a7aff7b068849db230a84c7aba2cd44
+++ packages/mozilla/firefox-2.0/jsautocfg-dontoverwrite.patch	8f2732cf8a7aff7b068849db230a84c7aba2cd44
@@ -0,0 +1,23 @@
+--- mozilla/js/src/Makefile.in.orig	2006-12-12 11:46:02.000000000 +0000
++++ mozilla/js/src/Makefile.in	2006-12-12 11:46:27.000000000 +0000
+@@ -319,20 +319,8 @@
+ 
+ jsopcode.h jsopcode.c: jsopcode.tbl
+ 
+-ifeq (,$(CROSS_COMPILE)$(filter-out WINNT,$(OS_ARCH)))
+ jsautocfg.h:
+ 	touch $@
+-else
+-ifeq ($(OS_ARCH),WINCE)
+-jsautocfg.h:
+-	touch $@
+-else
+-jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
+-	@rm -f $@ jsautocfg.tmp
+-	./jscpucfg > jsautocfg.tmp
+-	mv jsautocfg.tmp $@
+-endif
+-endif
+ 
+ # jscpucfg is a strange target
+ # Needs to be built with the host compiler but needs to include
============================================================
--- packages/mozilla/firefox-2.0/jsautocfg.h	40eff76a6d339624a0863aeeecd123d4c6dd54fd
+++ packages/mozilla/firefox-2.0/jsautocfg.h	40eff76a6d339624a0863aeeecd123d4c6dd54fd
@@ -0,0 +1,52 @@
+#ifndef js_cpucfg___
+#define js_cpucfg___
+
+/* Lovingly crafted by hand avoiding Mozilla stupidity */
+
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+
+#define JS_BYTES_PER_BYTE   1L
+#define JS_BYTES_PER_SHORT  2L
+#define JS_BYTES_PER_INT    4L
+#define JS_BYTES_PER_INT64  8L
+#define JS_BYTES_PER_LONG   4L
+#define JS_BYTES_PER_FLOAT  4L
+#define JS_BYTES_PER_DOUBLE 8L
+#define JS_BYTES_PER_WORD   4L
+#define JS_BYTES_PER_DWORD  8L
+
+#define JS_BITS_PER_BYTE    8L
+#define JS_BITS_PER_SHORT   16L
+#define JS_BITS_PER_INT     32L
+#define JS_BITS_PER_INT64   64L
+#define JS_BITS_PER_LONG    32L
+#define JS_BITS_PER_FLOAT   32L
+#define JS_BITS_PER_DOUBLE  64L
+#define JS_BITS_PER_WORD    32L
+
+#define JS_BITS_PER_BYTE_LOG2   3L
+#define JS_BITS_PER_SHORT_LOG2  4L
+#define JS_BITS_PER_INT_LOG2    5L
+#define JS_BITS_PER_INT64_LOG2  6L
+#define JS_BITS_PER_LONG_LOG2   5L
+#define JS_BITS_PER_FLOAT_LOG2  5L
+#define JS_BITS_PER_DOUBLE_LOG2 6L
+#define JS_BITS_PER_WORD_LOG2   5L
+
+#define JS_ALIGN_OF_SHORT   2L
+#define JS_ALIGN_OF_INT     4L
+#define JS_ALIGN_OF_LONG    4L
+#define JS_ALIGN_OF_INT64   4L
+#define JS_ALIGN_OF_FLOAT   4L
+#define JS_ALIGN_OF_DOUBLE  4L
+#define JS_ALIGN_OF_POINTER 4L
+#define JS_ALIGN_OF_WORD    4L
+
+#define JS_BYTES_PER_WORD_LOG2   2L
+#define JS_BYTES_PER_DWORD_LOG2  3L
+#define JS_WORDS_PER_DWORD_LOG2  2L
+
+#define JS_STACK_GROWTH_DIRECTION (-1)
+
+#endif /* js_cpucfg___ */
============================================================
--- packages/mozilla/firefox-2.0/mozconfig	74aa186738f649c487aa2b9e77ee4cb73ca3e2d7
+++ packages/mozilla/firefox-2.0/mozconfig	74aa186738f649c487aa2b9e77ee4cb73ca3e2d7
@@ -0,0 +1,53 @@
+. $topsrcdir/browser/config/mozconfig
+
+# use GTK+-2 widget set with XFT font rendering
+ac_add_options --enable-default-toolkit=gtk2
+ac_add_options --enable-xft
+ac_add_options --disable-freetype2
+
+# enable minimal profile support
+ac_add_options --disable-profilesharing
+ac_add_options --disable-profilelocking
+ac_add_options --enable-single-profile
+
+ac_add_options --with-system-zlib
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-png
+
+ac_add_options --disable-accessibility
+ac_add_options --disable-composer
+#ac_add_options --enable-plaintext-editor-only
+ac_add_options --disable-mailnews
+ac_add_options --disable-ldap	
+#ac_add_options --disable-postscript
+ac_add_options --disable-mathml
+ac_add_options --disable-jsd
+ac_add_options --disable-installer
+ac_add_options --disable-xprint
+ac_add_options --disable-necko-disk-cache
+
+# configure necko to allocate smaller network buffers
+ac_add_options --enable-necko-small-buffers
+
+# disable debug logging and tests
+#ac_add_options --disable-dtd-debug
+ac_add_options --disable-logging
+ac_add_options --disable-debug
+ac_add_options --disable-gtktest
+ac_add_options --disable-tests
+
+# build crypto module (PSM + NSS)
+ac_add_options --enable-crypto
+
+# build minimal set of protocol handlers
+ac_add_options --enable-necko-protocols=http,file,res,jar,ftp,about,viewsource
+
+# build minimal set of image decoders
+ac_add_options --enable-image-decoders=png,gif,jpeg
+
+#ac_add_options --enable-reorder
+#ac_add_options --enable-elf-dynstr-gc
+
+# enable static build
+#ac_add_options --disable-shared
+#ac_add_options --enable-static
============================================================
--- packages/mozilla/firefox-2.0/security-cross.patch	d414420652c62ebdb6b1d7c5967ad1366aa98d84
+++ packages/mozilla/firefox-2.0/security-cross.patch	d414420652c62ebdb6b1d7c5967ad1366aa98d84
@@ -0,0 +1,93 @@
+--- mozilla/security/coreconf/Linux.mk.orig	2006-12-12 10:53:12.000000000 +0000
++++ mozilla/security/coreconf/Linux.mk	2006-12-12 10:54:13.000000000 +0000
+@@ -52,88 +52,8 @@
+ 
+ DEFAULT_COMPILER = gcc
+ 
+-ifeq ($(OS_TEST),m68k)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= m68k
+-else
+-ifeq ($(OS_TEST),ppc64)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= ppc
+-ifeq ($(USE_64),1)
+-	ARCHFLAG	= -m64
+-endif
+-else
+-ifeq ($(OS_TEST),ppc)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= ppc
+-else
+-ifeq ($(OS_TEST),alpha)
+-        OS_REL_CFLAGS   = -D_ALPHA_ -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= alpha
+-else
+-ifeq ($(OS_TEST),ia64)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= ia64
+-else
+-ifeq ($(OS_TEST),x86_64)
+-ifeq ($(USE_64),1)
+-	OS_REL_CFLAGS	= -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH	= x86_64
+-else
+-	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
+-	CPU_ARCH	= x86
+-	ARCHFLAG	= -m32
+-endif
+-else
+-ifeq ($(OS_TEST),sparc)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = sparc
+-else
+-ifeq ($(OS_TEST),sparc64)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = sparc
+-else
+-ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = arm
+-else
+-ifeq ($(OS_TEST),parisc)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = hppa
+-else
+-ifeq ($(OS_TEST),parisc64)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = hppa
+-else
+-ifeq ($(OS_TEST),s390)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = s390
+-else
+-ifeq ($(OS_TEST),s390x)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = s390x
+-else
+-ifeq ($(OS_TEST),mips)
+-	OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
+-	CPU_ARCH        = mips
+-else
+-	OS_REL_CFLAGS	= -DLINUX1_2 -Di386 -D_XOPEN_SOURCE
+-	CPU_ARCH	= x86
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-endif
+-
++OS_REL_CFLAGS   = -DLINUX1_2 -D_XOPEN_SOURCE
++CPU_ARCH =
+ 
+ LIBC_TAG		= _glibc
+ 
============================================================
--- packages/mozilla/firefox_2.0.bb	c0f06e7955190d0c95904f014ddfa5b5a9cad0f1
+++ packages/mozilla/firefox_2.0.bb	c0f06e7955190d0c95904f014ddfa5b5a9cad0f1
@@ -0,0 +1,35 @@
+PR = "r1"
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}-source.tar.bz2 \
+	file://xptcstubs.patch;patch=1 \
+	file://no-xmb.patch;patch=1 \
+	file://jsautocfg.h \
+	file://extensions-hack.patch;patch=1 \
+    file://security-cross.patch;patch=1 \
+    file://jsautocfg-dontoverwrite.patch;patch=1"
+
+S = "${WORKDIR}/mozilla"
+DEFAULT_PREFERENCE = "-1"
+
+inherit mozilla
+
+require firefox.inc
+
+do_compile_prepend() {
+	cp ${WORKDIR}/jsautocfg.h ${S}/js/src/
+
+	sed -i "s|CPU_ARCH =|CPU_ARCH = ${TARGET_ARCH}|" security/coreconf/Linux.mk
+}
+
+do_stage() {
+
+        install -d ${STAGING_INCDIR}/${P}
+        cd dist/sdk/include
+        headers=`find . -name "*.h"`
+        for f in $headers
+        do
+                install -m 0644 $f ${STAGING_INCDIR}/${P}/$f
+        done
+        # removes 2 lines that call absent headers
+        sed -e '178,179d' ${STAGING_INCDIR}/${P}/nsIServiceManager.h
+}
+






More information about the Openembedded-commits mailing list