All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] firefox: a new package
@ 2012-09-05 14:28 Stefan Fröberg
  2012-09-05 14:28 ` [Buildroot] [PATCH 1/9] firefox: host-python dependency needs --enable-unicodedata Stefan Fröberg
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:28 UTC (permalink / raw)
  To: buildroot

Hello everyone

I finally got my lazy butt up and finished firefox and all
it's minimal dependencies and changes.

The current status is as follows:

- Extensions work. I have included option and helper function 
  that will let users to download & install default extensions.
  For more information how this works and the limitations still
  existing see firefox_extensions.mk.in file from patch #6.
  That file is meant to only include new extension descriptions,
  they download url and the helpur function itself.

- Langpacks work. Will download and install any locale selected
  from menuconfig option.

- Plugins work. Tested with open source GNU gnash flash plugin.
  Proprietary plugins without source code (like Adobe Flash plugin) 
  can probably be made working with nspluginwrapper (working on)

- Flash works (with gnash) but is currently limited to older SWF file formats.
  This means you can mostly watch just YouTube videos and little else in the net.
  
  For complete open source flash solution, maybe 
  Lightspark (needs Mono ugh!) + gnash is sufficient (working on)

- Added WebM option. This will let you watch some YouTube videos
  without anykind of flash plugin (open source or proprietary)

- Debug build option added.

TODO List:

1 ) Use only buildroot provided, system-wide libraries for packages nss, nspr and
    libpng. 
    libpng needs an APNG patch from http://sourceforge.net/projects/libpng-apng.
    Currently internal, firefox tarball provided versions of these three libs are
    used.

2 ) Full flash support with lightspark + gnash and/or nspluginwrapper and official
    Adobe plugin.

3 ) Figure out if framebuffer enabled firefox building is possible.
    In the net there are some mentions of how to build DirectFB Firefox
    but they are outdated.

    There seems to be an configure option --enable-default-toolkit=cairo-gtk2-dfb
    for DirectFB and also --enable-default-toolkit=cairo-qt for Qt (Embedded?).
    Currently only traditional Xorg stuff, --enable-default-toolkit=cairo-gtk2
    is used.

    There have been reports that playing flash videos with GNU gnash under
    framebuffer is possible. So doing directfb firefox should be possible too  :)



All the builds were done under Fedora 16 x86 32-bit with buildroot-2012.05,
uclibc 0.9.33 (with NPTL enabled), binutils 2.22 and gcc 4.6 (with TLS enabled).

My CFLAGS were:
-pipe -funit-at-a-time -Wno-error -Os

My LDFLAGS were:
-Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,combreloc -Wl,--enable-new-dtags -Wl,--hash-style=gnu

Testing were made with VirtualBox and also with my crappy laptop.

Best Regards:
Stefan

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 1/9] firefox: host-python dependency needs --enable-unicodedata
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
@ 2012-09-05 14:28 ` Stefan Fröberg
  2012-09-05 14:28 ` [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build Stefan Fröberg
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:28 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/python/python.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/python/python.mk b/package/python/python.mk
index fae4e5c..6a79584 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -22,7 +22,7 @@ HOST_PYTHON_CONF_OPT += 	\
 	--disable-curses	\
 	--disable-codecs-cjk	\
 	--disable-nis		\
-	--disable-unicodedata	\
+	--enable-unicodedata	\
 	--disable-dbm		\
 	--disable-gdbm		\
 	--disable-bsddb		\
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
  2012-09-05 14:28 ` [Buildroot] [PATCH 1/9] firefox: host-python dependency needs --enable-unicodedata Stefan Fröberg
@ 2012-09-05 14:28 ` Stefan Fröberg
  2012-09-11 22:04   ` Arnout Vandecappelle
  2012-09-05 14:28 ` [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options Stefan Fröberg
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:28 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/valgrind/valgrind.mk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk
index 05f402f..1c44df7 100644
--- a/package/valgrind/valgrind.mk
+++ b/package/valgrind/valgrind.mk
@@ -7,7 +7,12 @@
 VALGRIND_VERSION = 3.7.0
 VALGRIND_SITE    = http://valgrind.org/downloads/
 VALGRIND_SOURCE  = valgrind-$(VALGRIND_VERSION).tar.bz2
+
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) && ($(BR2_GCC_ENABLE_TLS),y)
+VALGRIND_CONF_OPT = --enable-tls
+else
 VALGRIND_CONF_OPT = --disable-tls
+endif
 
 # On ARM, Valgrind only supports ARMv7, and uses the arch part of the
 # host tuple to determine whether it's being built for ARMv7 or
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
  2012-09-05 14:28 ` [Buildroot] [PATCH 1/9] firefox: host-python dependency needs --enable-unicodedata Stefan Fröberg
  2012-09-05 14:28 ` [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build Stefan Fröberg
@ 2012-09-05 14:28 ` Stefan Fröberg
  2012-09-11 21:51   ` Arnout Vandecappelle
  2012-09-05 14:28 ` [Buildroot] [PATCH 4/9] firefox: installing default extensions needs host-xmlstarlet dependency Stefan Fröberg
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:28 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/sqlite/Config.in |   34 ++++++++++++++++++++++++++++++++++
 package/sqlite/sqlite.mk |   12 ++++++++++++
 2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in
index 25aaa3f..75bce70 100644
--- a/package/sqlite/Config.in
+++ b/package/sqlite/Config.in
@@ -22,3 +22,37 @@ config BR2_PACKAGE_SQLITE_STAT3
 	  planner that can help SQLite to choose a better query plan under
 	  certain situations.
 
+config BR2_PACKAGE_SQLITE_ENABLE_FTS3
+	bool "Enables version 3 of the full-text search engine"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  When this option is defined in the amalgamation 
+	  (see http://www.sqlite.org/amalgamation.html), version 3 of
+	  the full-text search engine is added to the build automatically.
+
+config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
+	bool "Enables sqlite3_unlock_notify() interface"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  This option enables the sqlite3_unlock_notify() interface and its
+	  accosiated functionality. See the documentation 
+	  http://www.sqlite.org/unlock_notify.html for additional information.
+
+config BR2_PACKAGE_SQLITE_SECURE_DELETE
+	bool "Sets the secure_delete pragma on by default"
+	depends on BR2_PACKAGE_SQLITE
+	help
+	  This compile-time option changes the default settings of the
+	  secure_delete pragma. When this option is not used, secure_delete
+	  defaults to off. When this option is present, secure_delete defaults
+	  to on.
+
+	  The secure_delete setting causes deleted content to be overwritten
+	  with zeros. There is a small performance penalty for this since 
+	  additional I/O must occur. On the other hand, secure_delete can
+	  prevent sensitive information from lingering in unused parts 
+	  of the database file after it has allegedly been deleted.
+	  See the documentation on the 
+	  http://www.sqlite.org/pragma.html#pragma_secure_delete
+	  for additional information.
+
diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk
index 7b5b4aa..0320cc4 100644
--- a/package/sqlite/sqlite.mk
+++ b/package/sqlite/sqlite.mk
@@ -21,6 +21,18 @@ ifeq ($(BR2_PACKAGE_SQLITE_STAT3),y)
 SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT3
 endif
 
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y)
+SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y)
+SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE
+endif
+
 SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) $(SQLITE_CFLAGS)"
 
 SQLITE_CONF_OPT = \
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 4/9] firefox: installing default extensions needs host-xmlstarlet dependency
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (2 preceding siblings ...)
  2012-09-05 14:28 ` [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options Stefan Fröberg
@ 2012-09-05 14:28 ` Stefan Fröberg
  2012-09-05 14:29 ` [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency Stefan Fröberg
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:28 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/xmlstarlet/xmlstarlet.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk
index 5919619..e58b200 100644
--- a/package/xmlstarlet/xmlstarlet.mk
+++ b/package/xmlstarlet/xmlstarlet.mk
@@ -16,3 +16,4 @@ XMLSTARLET_CONF_OPT += --disable-static-libs \
 	--with-libiconv-prefix=${STAGING_DIR}/usr
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (3 preceding siblings ...)
  2012-09-05 14:28 ` [Buildroot] [PATCH 4/9] firefox: installing default extensions needs host-xmlstarlet dependency Stefan Fröberg
@ 2012-09-05 14:29 ` Stefan Fröberg
  2012-09-11 22:24   ` Arnout Vandecappelle
  2012-09-05 14:29 ` [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser Stefan Fröberg
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:29 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/Config.in                       |    1 +
 package/unzip/Config.in                 |    8 ++++
 package/unzip/unzip-respect-flags.patch |   23 +++++++++++
 package/unzip/unzip.mk                  |   66 +++++++++++++++++++++++++++++++
 4 files changed, 98 insertions(+), 0 deletions(-)
 create mode 100644 package/unzip/Config.in
 create mode 100644 package/unzip/unzip-respect-flags.patch
 create mode 100644 package/unzip/unzip.mk

diff --git a/package/Config.in b/package/Config.in
index e129522..636caf8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -13,6 +13,7 @@ source "package/gzip/Config.in"
 endif
 source "package/lzop/Config.in"
 source "package/lzma/Config.in"
+source "package/unzip/Config.in"
 source "package/xz/Config.in"
 endmenu
 
diff --git a/package/unzip/Config.in b/package/unzip/Config.in
new file mode 100644
index 0000000..f4fc111
--- /dev/null
+++ b/package/unzip/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_UNZIP
+	bool "unzip"
+	help
+	  The UnZip package contains ZIP extraction utilities. These are useful for extracting files from
+	  ZIP archives. ZIP archives are created with PKZIP or Info-ZIP utilities, primarily in a DOS
+	  environment.
+
+	  http://downloads.sourceforge.net/infozip/
diff --git a/package/unzip/unzip-respect-flags.patch b/package/unzip/unzip-respect-flags.patch
new file mode 100644
index 0000000..35c8314
--- /dev/null
+++ b/package/unzip/unzip-respect-flags.patch
@@ -0,0 +1,23 @@
+diff -Naur unzip60.org/unix/Makefile unzip60/unix/Makefile
+--- unzip60.org/unix/Makefile	2012-09-02 21:29:55.944176704 +0300
++++ unzip60/unix/Makefile	2012-09-02 21:31:20.276176583 +0300
+@@ -808,8 +808,8 @@
+ # systems.)
+ linux:		unix_make
+ 	@echo 'NOTE:  use linux_noasm target for non-Intel Linux compiles.'
+-	$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
+-	 CFLAGS="-O3 -Wall -DASM_CRC"\
++	$(MAKE) unzips CC=$(CC) LD=$(CC) AS=$(CC)\
++	 CFLAGS="$(CFLAGS) -DASM_CRC"\
+ 	 AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
+ # GRR:  this echo is pointless; if user gets this far, no difference to install
+ #	@echo 'Be sure to use the install_asm target rather than the install target'
+@@ -819,7 +819,7 @@
+ # Linux (Posix, approximately SysV):  virtually any version since before 0.96,
+ # for any platform.  Change "-O" to "-O3" or whatever, as desired...
+ linux_noasm:	unix_make
+-	$(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall"
++	$(MAKE) unzips CC=$(CC) LD=$(CC) CFLAGS="$(CFLAGS)"
+ 
+ # Linux with lcc compiler:  __inline__ (stat.h) not recognized, and must edit
+ # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined.  -O3
diff --git a/package/unzip/unzip.mk b/package/unzip/unzip.mk
new file mode 100644
index 0000000..fdfbe9f
--- /dev/null
+++ b/package/unzip/unzip.mk
@@ -0,0 +1,66 @@
+###################################################################
+#
+# unzip
+# 
+# quickly hacked from: 
+# http://www.linuxfromscratch.org/blfs/view/svn/general/unzip.html
+###################################################################
+
+UNZIP_MAJOR_VERSION = 6
+UNZIP_MINOR_VERSION = 0
+UNZIP_VERSION = $(UNZIP_MAJOR_VERSION).$(UNZIP_MINOR_VERSION)
+UNZIP_SOURCE = unzip$(UNZIP_MAJOR_VERSION)$(UNZIP_MINOR_VERSION).tar.gz
+UNZIP_SITE = http://downloads.sourceforge.net/infozip
+UNZIP_LICENSE = Info-ZIP
+UNZIP_LICENSE_FILES = LICENSE
+
+# No point of doing optimized build for host version,
+# so we build host version without any x86 specific asm stuff
+define HOST_UNZIP_BUILD_CMDS
+	(cd $(@D); \
+	sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile ; \
+	$(MAKE) -f unix/Makefile linux_noasm )
+endef
+
+define HOST_UNZIP_INSTALL_CMDS
+	(cd $(@D); \
+	$(MAKE) prefix=$(HOST_DIR)/usr install )
+endef
+
+# If you do have busybox installed in your target (like most do)
+# and if you have by accident also enabled unzip support in
+# your busybox configuration file, then guess what happens
+# after insallation of the real unzip application ?
+#
+# Yep, UNZIP_INSTALL_TARGET_CMDS will happily
+# write to your unzip -> /bin/busybox symlink
+# and overwrite your busybox ... :-(
+#
+# That's why I included this as an primitive safety mechanism.
+# Improvement are wellcome
+
+ifneq ($(BR2_PACKAGE_BUSYBOX),y)
+ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
+# Intel x86 asm optimized version
+define UNZIP_BUILD_CMDS
+	(cd $(@D);\
+	sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile;\
+	$(MAKE) -f unix/Makefile $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -DNO_LCHMOD" CC=$(TARGET_CC) LD=$(TARGET_LD) AS=$(TARGET_AS) linux )
+endef
+else
+# non-Intel asm optimized (aka generic) version
+define UNZIP_BUILD_CMDS
+	(cd $(@D); \
+	sed -i -e 's/CFLAGS="-O -Wall/& -DNO_LCHMOD/' unix/Makefile ; \
+	$(MAKE) -f unix/Makefile $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -DNO_LCHMOD" CC=$(TARGET_CC) LD=$(TARGET_LD) AS=$(TARGET_AS) linux_noasm )
+endef
+endif
+
+define UNZIP_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	$(MAKE) prefix=$(TARGET_DIR)/usr install )
+endef
+endif
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (4 preceding siblings ...)
  2012-09-05 14:29 ` [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency Stefan Fröberg
@ 2012-09-05 14:29 ` Stefan Fröberg
  2012-09-17 22:31   ` Arnout Vandecappelle
  2012-09-05 14:29 ` [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency Stefan Fröberg
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:29 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/Config.in                                  |    1 +
 package/firefox/Config.in                          |  417 ++++++++++++++++++++
 .../firefox/firefox-11.0-NativeWindowHandle.patch  |   12 +
 package/firefox/firefox-11.0-execinfo.patch        |   45 +++
 package/firefox/firefox-11.0-isfinite.patch        |   22 +
 package/firefox/firefox-11.0-uclibc.patch          |  112 ++++++
 package/firefox/firefox-11.0-uintptr_t.patch       |   12 +
 package/firefox/firefox.mk                         |  240 +++++++++++
 package/firefox/firefox_extensions.mk.in           |  168 ++++++++
 package/firefox/mozconfig                          |   35 ++
 package/firefox/prefs.js                           |  100 +++++
 11 files changed, 1164 insertions(+), 0 deletions(-)
 create mode 100644 package/firefox/Config.in
 create mode 100644 package/firefox/firefox-11.0-NativeWindowHandle.patch
 create mode 100644 package/firefox/firefox-11.0-execinfo.patch
 create mode 100644 package/firefox/firefox-11.0-isfinite.patch
 create mode 100644 package/firefox/firefox-11.0-uclibc.patch
 create mode 100644 package/firefox/firefox-11.0-uintptr_t.patch
 create mode 100644 package/firefox/firefox.mk
 create mode 100644 package/firefox/firefox_extensions.mk.in
 create mode 100644 package/firefox/mozconfig
 create mode 100755 package/firefox/prefs.js

diff --git a/package/Config.in b/package/Config.in
index 636caf8..1848abb 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -540,6 +540,7 @@ source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
+source "package/firefox/Config.in"
 source "package/heirloom-mailx/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/hiawatha/Config.in"
diff --git a/package/firefox/Config.in b/package/firefox/Config.in
new file mode 100644
index 0000000..fbd4749
--- /dev/null
+++ b/package/firefox/Config.in
@@ -0,0 +1,417 @@
+config BR2_PACKAGE_FIREFOX
+	bool "firefox"
+	select BR2_PACKAGE_ALSA_LIB
+	select BR2_PACKAGE_CAIRO
+	select BR2_PACKAGE_CAIRO_TEE
+	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBGTK2
+	select BR2_PACKAGE_LIBFFI
+	select BR2_PACKAGE_LIBNSS
+	select BR2_PACKAGE_LIBNSPR
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_SQLITE_ENABLE_FTS3
+	select BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
+	select BR2_PACKAGE_SQLITE_SECURE_DELETE
+	select BR2_PACKAGE_ZLIB
+	depends on BR2_PACKAGE_PYTHON
+	help
+	  Mozilla Firefox Web Browser
+
+	  http://releases.mozilla.org/pub/mozilla.org/firefox/releases/11.0/source/
+
+if BR2_PACKAGE_FIREFOX
+
+config BR2_PACKAGE_FIREFOX_ENABLE_DEBUG
+	bool "Enable debug build and Valgrind integration hooks"
+	select BR2_PACKAGE_VALGRIND if BR2_TOOLCHAIN_BUILDROOT && BR2_GCC_ENABLE_TLS
+	help
+		This enables debug support.
+		If you are using buildroot toolchain and your gcc has TLS enable then
+		this will also enable Valgrind integration hooks.
+
+config BR2_PACKAGE_FIREFOX_ENABLE_WEBM
+	bool "Enable WebM"
+	select BR2_PACKAGE_YASM if BR2_i386 || BR2_x86_64
+	help
+		WebM is an audio-video format designed to provide royalty-free, open video compression
+		for use with HTML5 video. The project's development is sponsored by Google inc.
+
+		A WebM file consist of VP8 video and Vorbis audio streams, in a container based on 
+		a profile of Matroska. The project releases WebM related software under a BSD license and
+		all users are granted a worldwide, non-exclusive, non-charge, royalty-free patent license.
+
+		WebM is one way of watching YouTube videos without proprietary Adobe Flash.
+		After you have installed WebM enabled Firefox you can try it by visiting the following link:
+
+		http://www.youtube.com/results?search_query=web&webm=1
+
+config BR2_PACKAGE_FIREFOX_ULTRA_PARANOID
+	bool "Enable Ulta-paranoid settings"
+	select BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	select BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
+	select BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
+	select BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
+	select BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
+	help
+		This enables my (IMHO) ultra-private custom settings.
+		The changed settings appear bold when typing about:config into your browser address bar.
+
+		Most (but not all!) are documented in 
+		http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
+
+		For more info of these entries please take a look at package/firefox/prefs.js file.
+
+		By selecting this option you are also enabling pipelining for your browser.
+
+		Below is a short summary of settings changed:
+		
+			network.http.pipelining = true;
+			network.http.pipelining.aggressive = true;
+			network.http.pipelining.ssl = true;
+			network.http.proxy.pipelining = true;
+			browser.download.manager.retention = 1;
+			browser.formfill.enable = false;
+			browser.privatebrowsing.autostart = true;
+			dom.disable_window_move_resize = false;
+			dom.event.contextmenu.enabled = false;
+			geo.enabled = false;
+			network.cookie.cookieBehavior = 1;
+			network.cookie.lifetimePolicy = 2;
+			network.cookie.prefsMigrated = true;
+			network.proxy.socks_remote_dns = true;
+			network.websocket.enabled = false; 
+			places.history.enabled = false;
+			privacy.clearOnShutdown.offlineApps = true;
+			privacy.clearOnShutdown.passwords = true;
+			privacy.clearOnShutdown.siteSettings = true;
+			privacy.donottrackheader.enabled = true;
+			privacy.item.cookies = true;
+			privacy.sanitize.sanitizeOnShutdown = true;
+
+			Note: 
+			By selecting this option you are also enabling the following privacy/security related
+			extensions: NoScript, Adblock Lite, Ghostery & HTTPS Everywhere
+
+config BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	bool "Enable installing of selected default extensions"
+	help
+		This option will enable you to select default extensions to
+		be installed when building Firefox.
+
+		Note: The selected extensions are only *installed*.
+		They are not *enabled* by default.
+		For that you have to manually enable them after starting you
+		freshly build Firefox.
+
+config BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
+	bool "Install NoScript extensions"
+	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	help
+		NoScript for Firefox pre-emptively blocks malicious scripts
+		and allows JavaScript, Java, Flash and other potentially dangerous
+		content only from sites you trust.
+
+		NoScript also provides the most anti-XSS and anti-Clickjacking
+		protection ever available in a browser
+
+		http://noscript.net
+
+config BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
+	bool "Install Adblock Lite extension"
+	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	help
+		Adblock Lite is a fork of the Adblock Plus version 1.3.10 (classic UI)
+		extension for blocking advertisements on the web.
+		This fork will provide the same features as Adblock Plus 2.x and higher
+		while keeping the old UI but without acceptable ads feature.
+
+		https://bitbucket.org/adstomper/adblocklite
+
+config BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
+	bool "Install Ghostery extension"
+	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	help
+		Protect your privacy. See who's tracking your web browsing and
+		block them with Ghostery.
+
+		http://www.ghostery.com
+
+config BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
+	bool "Install HTTPS Everywhere extension"
+	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	help
+		HTTPS Everywhere is a Firefox and Chrome extension
+		that encrypts your communications wit many major
+		websites, making your browsing more secure.
+
+		https://www.eff.org/https-everywhere
+
+config BR2_PACKAGE_FIREFOX_PLUGIN_GNASH
+	source "package/gnash/Config.in"
+
+choice
+	default BR2_PACKAGE_FIREFOX_LOCALE_EN_US
+	prompt "Select locale"
+	config BR2_PACKAGE_FIREFOX_LOCALE_AF
+		bool "af"
+	config BR2_PACKAGE_FIREFOX_LOCALE_AK
+		bool "ak"
+	config BR2_PACKAGE_FIREFOX_LOCALE_AR
+		bool "ar"
+	config BR2_PACKAGE_FIREFOX_LOCALE_AS
+		bool "as"
+	config BR2_PACKAGE_FIREFOX_LOCALE_AST
+		bool "ast"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BE
+		bool "be"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BG
+		bool "bg"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BN_BD
+		bool "bn-BD"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BN_ID
+		bool "bn-IN"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BR
+		bool "br"
+	config BR2_PACKAGE_FIREFOX_LOCALE_BS
+		bool "bs"
+	config BR2_PACKAGE_FIREFOX_LOCALE_CA
+		bool "ca"
+	config BR2_PACKAGE_FIREFOX_LOCALE_CSB
+		bool "csb"
+	config BR2_PACKAGE_FIREFOX_LOCALE_CS
+		bool "cs"
+	config BR2_PACKAGE_FIREFOX_LOCALE_CY
+		bool "cy"
+	config BR2_PACKAGE_FIREFOX_LOCALE_DA
+		bool "da"
+	config BR2_PACKAGE_FIREFOX_LOCALE_DE
+		bool "de"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EL
+		bool "el"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EN_GB
+		bool "en-GB"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EN_US
+		bool "en-US"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EN_ZA
+		bool "en-ZA"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EO
+		bool "eo"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ES_AR
+		bool "es-AR"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ES_CL
+		bool "es-CL"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ES_ES
+		bool "es-ES"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ES_MX
+		bool "es-MX"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ET
+		bool "et"
+	config BR2_PACKAGE_FIREFOX_LOCALE_EU
+		bool "eu"
+	config BR2_PACKAGE_FIREFOX_LOCALE_FA
+		bool "fa"
+	config BR2_PACKAGE_FIREFOX_LOCALE_FI
+		bool "fi"
+	config BR2_PACKAGE_FIREFOX_LOCALE_FR
+		bool "fr"
+	config BR2_PACKAGE_FIREFOX_LOCALE_FY_NL
+		bool "fy-NL"
+	config BR2_PACKAGE_FIREFOX_LOCALE_GA_IE
+		bool "ga-IE"
+	config BR2_PACKAGE_FIREFOX_LOCALE_GD
+		bool "gd"
+	config BR2_PACKAGE_FIREFOX_LOCALE_GL
+		bool "gl"
+	config BR2_PACKAGE_FIREFOX_LOCALE_GU_IN
+		bool "gu-IN"
+	config BR2_PACKAGE_FIREFOX_LOCALE_HE
+		bool "he"
+	config BR2_PACKAGE_FIREFOX_LOCALE_HI_IN
+		bool "hi-IN"
+	config BR2_PACKAGE_FIREFOX_LOCALE_HR
+		bool "hr"
+	config BR2_PACKAGE_FIREFOX_LOCALE_HU
+		bool "hu"
+	config BR2_PACKAGE_FIREFOX_LOCALE_HY_AM
+		bool "hy-AM"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ID
+		bool "id"
+	config BR2_PACKAGE_FIREFOX_LOCALE_IS
+		bool "is"
+	config BR2_PACKAGE_FIREFOX_LOCALE_IT
+		bool "it"
+	config BR2_PACKAGE_FIREFOX_LOCALE_JA
+		bool "ja"
+	config BR2_PACKAGE_FIREFOX_LOCALE_KK
+		bool "kk"
+	config BR2_PACKAGE_FIREFOX_LOCALE_KN
+		bool "kn"
+	config BR2_PACKAGE_FIREFOX_LOCALE_KO
+		bool "ko"
+	config BR2_PACKAGE_FIREFOX_LOCALE_KU
+		bool "ku"
+	config BR2_PACKAGE_FIREFOX_LOCALE_LG
+		bool "lg"
+	config BR2_PACKAGE_FIREFOX_LOCALE_LT
+		bool "lt"
+	config BR2_PACKAGE_FIREFOX_LOCALE_LV
+		bool "lv"
+	config BR2_PACKAGE_FIREFOX_LOCALE_MAI
+		bool "mai"
+	config BR2_PACKAGE_FIREFOX_LOCALE_MK
+		bool "mk"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ML
+		bool "ml"
+	config BR2_PACKAGE_FIREFOX_LOCALE_MR
+		bool "mr"
+	config BR2_PACKAGE_FIREFOX_LOCALE_NB_NO
+		bool "nb-NO"
+	config BR2_PACKAGE_FIREFOX_LOCALE_NL
+		bool "nl"
+	config BR2_PACKAGE_FIREFOX_LOCALE_NN_NO
+		bool "nn-NO"
+	config BR2_PACKAGE_FIREFOX_LOCALE_NSO
+		bool "nso"
+	config BR2_PACKAGE_FIREFOX_LOCALE_OR
+		bool "or"
+	config BR2_PACKAGE_FIREFOX_LOCALE_PA_IN
+		bool "pa-IN"
+	config BR2_PACKAGE_FIREFOX_LOCALE_PL
+		bool "pl"
+	config BR2_PACKAGE_FIREFOX_LOCALE_PT_BR
+		bool "pt-BR"
+	config BR2_PACKAGE_FIREFOX_LOCALE_PT_PT
+		bool "pt-PT"
+	config BR2_PACKAGE_FIREFOX_LOCALE_RM
+		bool "rm"
+	config BR2_PACKAGE_FIREFOX_LOCALE_RO
+		bool "ro"
+	config BR2_PACKAGE_FIREFOX_LOCALE_RU
+		bool "ru"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SI
+		bool "si"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SK
+		bool "sk"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SL
+		bool "sl"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SON
+		bool "son"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SQ
+		bool "sq"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SR
+		bool "sr"
+	config BR2_PACKAGE_FIREFOX_LOCALE_SV_SE
+		bool "sv-SE"
+	config BR2_PACKAGE_FIREFOX_LOCALE_TA
+		bool "ta"
+	config BR2_PACKAGE_FIREFOX_LOCALE_TA_LK
+		bool "ta-LK"
+	config BR2_PACKAGE_FIREFOX_LOCALE_TE
+		bool "te"
+	config BR2_PACKAGE_FIREFOX_LOCALE_TH
+		bool "th"
+	config BR2_PACKAGE_FIREFOX_LOCALE_TR
+		bool "tr"
+	config BR2_PACKAGE_FIREFOX_LOCALE_UK
+		bool "uk"
+	config BR2_PACKAGE_FIREFOX_LOCALE_VI
+		bool "vi"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ZH_CN
+		bool "zh-CN"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ZH_TW
+		bool "zh-TW"
+	config BR2_PACKAGE_FIREFOX_LOCALE_ZU
+		bool "zu"
+endchoice
+
+config BR2_PACKAGE_FIREFOX_LOCALE
+	string
+	default "af" 	if BR2_PACKAGE_FIREFOX_LOCALE_AF
+	default "ak" 	if BR2_PACKAGE_FIREFOX_LOCALE_AK
+	default "ar" 	if BR2_PACKAGE_FIREFOX_LOCALE_AR
+	default "as" 	if BR2_PACKAGE_FIREFOX_LOCALE_AS
+	default "ast" 	if BR2_PACKAGE_FIREFOX_LOCALE_AST
+	default "be" 	if BR2_PACKAGE_FIREFOX_LOCALE_BE
+	default "bg"	if BR2_PACKAGE_FIREFOX_LOCALE_BG
+	default "bn-BD"	if BR2_PACKAGE_FIREFOX_LOCALE_BN_BD
+	default "bn-IN"	if BR2_PACKAGE_FIREFOX_LOCALE_BN_ID
+	default "br"	if BR2_PACKAGE_FIREFOX_LOCALE_BR
+	default "bs"	if BR2_PACKAGE_FIREFOX_LOCALE_BS
+	default "ca"	if BR2_PACKAGE_FIREFOX_LOCALE_CA
+	default "csb"	if BR2_PACKAGE_FIREFOX_LOCALE_CSB
+	default "cs"	if BR2_PACKAGE_FIREFOX_LOCALE_CS
+	default "cy"	if BR2_PACKAGE_FIREFOX_LOCALE_CY
+	default "da"	if BR2_PACKAGE_FIREFOX_LOCALE_DA
+	default "de"	if BR2_PACKAGE_FIREFOX_LOCALE_DE
+	default "el"	if BR2_PACKAGE_FIREFOX_LOCALE_EL
+	default "en-GB"	if BR2_PACKAGE_FIREFOX_LOCALE_EN_GB
+	default "en-US"	if BR2_PACKAGE_FIREFOX_LOCALE_EN_US
+	default "en-ZA"	if BR2_PACKAGE_FIREFOX_LOCALE_EN_ZA
+	default "eo"	if BR2_PACKAGE_FIREFOX_LOCALE_EO
+	default "es-AR"	if BR2_PACKAGE_FIREFOX_LOCALE_ES_AR
+	default "es-CL"	if BR2_PACKAGE_FIREFOX_LOCALE_ES_CL
+	default "es-ES"	if BR2_PACKAGE_FIREFOX_LOCALE_ES_ES
+	default "es-MX" if BR2_PACKAGE_FIREFOX_LOCALE_ES_MX
+	default "et"	if BR2_PACKAGE_FIREFOX_LOCALE_ET
+	default	"eu"	if BR2_PACKAGE_FIREFOX_LOCALE_EU
+	default "fa"	if BR2_PACKAGE_FIREFOX_LOCALE_FA
+	default "fi"	if BR2_PACKAGE_FIREFOX_LOCALE_FI
+	default "fr"	if BR2_PACKAGE_FIREFOX_LOCALE_FR
+	default "fy-NL" if BR2_PACKAGE_FIREFOX_LOCALE_FY_NL
+	default "ga-IE"	if BR2_PACKAGE_FIREFOX_LOCALE_GA_IE
+	default "gd"	if BR2_PACKAGE_FIREFOX_LOCALE_GD
+	default "gl"	if BR2_PACKAGE_FIREFOX_LOCALE_GL
+	default "gu-IN"	if BR2_PACKAGE_FIREFOX_LOCALE_GU_IN
+	default "he"	if BR2_PACKAGE_FIREFOX_LOCALE_HE
+	default "hi-IN"	if BR2_PACKAGE_FIREFOX_LOCALE_HI_IN
+	default "hr"	if BR2_PACKAGE_FIREFOX_LOCALE_HR
+	default "hu"	if BR2_PACKAGE_FIREFOX_LOCALE_HU
+	default "hy-AM"	if BR2_PACKAGE_FIREFOX_LOCALE_HY_AM
+	default "id"	if BR2_PACKAGE_FIREFOX_LOCALE_ID
+	default "is"	if BR2_PACKAGE_FIREFOX_LOCALE_IS
+	default	"it"	if BR2_PACKAGE_FIREFOX_LOCALE_IT
+	default "ja"	if BR2_PACKAGE_FIREFOX_LOCALE_JA
+	default "kk"	if BR2_PACKAGE_FIREFOX_LOCALE_KK
+	default "kn"	if BR2_PACKAGE_FIREFOX_LOCALE_KN
+	default "ko"	if BR2_PACKAGE_FIREFOX_LOCALE_KO
+	default "ku"	if BR2_PACKAGE_FIREFOX_LOCALE_KU
+	default "lg"	if BR2_PACKAGE_FIREFOX_LOCALE_LG
+	default "lt"	if BR2_PACKAGE_FIREFOX_LOCALE_LT
+	default "lv"	if BR2_PACKAGE_FIREFOX_LOCALE_LV
+	default "mai"	if BR2_PACKAGE_FIREFOX_LOCALE_MAI
+	default "mk"	if BR2_PACKAGE_FIREFOX_LOCALE_MK
+	default "ml"	if BR2_PACKAGE_FIREFOX_LOCALE_ML
+	default "mr"	if BR2_PACKAGE_FIREFOX_LOCALE_MR
+	default "nb-NO"	if BR2_PACKAGE_FIREFOX_LOCALE_NB_NO
+	default "nl"	if BR2_PACKAGE_FIREFOX_LOCALE_NL
+	default "nn-NO"	if BR2_PACKAGE_FIREFOX_LOCALE_NN_NO
+	default "nso"	if BR2_PACKAGE_FIREFOX_LOCALE_NSO
+	default "or"	if BR2_PACKAGE_FIREFOX_LOCALE_OR
+	default "pa-IN"	if BR2_PACKAGE_FIREFOX_LOCALE_PA_IN
+	default "pl"	if BR2_PACKAGE_FIREFOX_LOCALE_PL
+	default "pt-BR"	if BR2_PACKAGE_FIREFOX_LOCALE_PT_BR
+	default "pt-PT"	if BR2_PACKAGE_FIREFOX_LOCALE_PT_PT
+	default "rm"	if BR2_PACKAGE_FIREFOX_LOCALE_RM
+	default "ro"	if BR2_PACKAGE_FIREFOX_LOCALE_RO
+	default "ru"	if BR2_PACKAGE_FIREFOX_LOCALE_RU
+	default "si"	if BR2_PACKAGE_FIREFOX_LOCALE_SI
+	default "sk"	if BR2_PACKAGE_FIREFOX_LOCALE_SK
+	default "sl"	if BR2_PACKAGE_FIREFOX_LOCALE_SL
+	default "son"	if BR2_PACKAGE_FIREFOX_LOCALE_SON
+	default "sq"	if BR2_PACKAGE_FIREFOX_LOCALE_SQ
+	default "sr"	if BR2_PACKAGE_FIREFOX_LOCALE_SR
+	default "sv-SE" if BR2_PACKAGE_FIREFOX_LOCALE_SV_SE
+	default "ta"	if BR2_PACKAGE_FIREFOX_LOCALE_TA
+	default "ta-LK"	if BR2_PACKAGE_FIREFOX_LOCALE_TA_LK
+	default "te"	if BR2_PACKAGE_FIREFOX_LOCALE_TE
+	default "th"	if BR2_PACKAGE_FIREFOX_LOCALE_TH
+	default "tr"	if BR2_PACKAGE_FIREFOX_LOCALE_TR
+	default "uk"	if BR2_PACKAGE_FIREFOX_LOCALE_UK
+	default "vi"	if BR2_PACKAGE_FIREFOX_LOCALE_VI
+	default "zh-CN"	if BR2_PACKAGE_FIREFOX_LOCALE_ZH_CN
+	default "zh-TW"	if BR2_PACKAGE_FIREFOX_LOCALE_ZH_TW
+	default "zu"	if BR2_PACKAGE_FIREFOX_LOCALE_ZU
+
+endif
diff --git a/package/firefox/firefox-11.0-NativeWindowHandle.patch b/package/firefox/firefox-11.0-NativeWindowHandle.patch
new file mode 100644
index 0000000..bced599
--- /dev/null
+++ b/package/firefox/firefox-11.0-NativeWindowHandle.patch
@@ -0,0 +1,12 @@
+diff -Naur firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h
+--- firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h	2012-09-04 22:20:07.086923927 +0300
++++ firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h	2012-09-04 22:23:45.195922486 +0300
+@@ -131,7 +131,7 @@
+ typedef HWND NativeWindowHandle;
+ #elif defined(MOZ_X11)
+ typedef XID NativeWindowHandle;
+-#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT)
++#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT) || defined(MOZ_DFB)
+ typedef intptr_t NativeWindowHandle; // never actually used, will always be 0
+ #else
+ #error Need NativeWindowHandle for this platform
diff --git a/package/firefox/firefox-11.0-execinfo.patch b/package/firefox/firefox-11.0-execinfo.patch
new file mode 100644
index 0000000..cacd7a1
--- /dev/null
+++ b/package/firefox/firefox-11.0-execinfo.patch
@@ -0,0 +1,45 @@
+diff -Naur firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc
+--- firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc	2012-08-06 15:09:43.325994371 +0300
++++ firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc	2012-08-06 23:30:33.750226316 +0300
+@@ -5,7 +5,7 @@
+ #include "build/build_config.h"
+ #include "base/debug_util.h"
+ 
+-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__))
++#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__) && !defined(__UCLIBC__) )
+ 
+ #include <errno.h>
+ #include <fcntl.h>
+diff -Naur firefox-11.0.org/tools/profiler/sps/platform-linux.cc firefox-11.0/tools/profiler/sps/platform-linux.cc
+--- firefox-11.0.org/tools/profiler/sps/platform-linux.cc	2012-08-06 15:09:24.330995513 +0300
++++ firefox-11.0/tools/profiler/sps/platform-linux.cc	2012-08-06 23:30:33.751226314 +0300
+@@ -28,7 +28,7 @@
+ #include <sys/stat.h>   // open
+ #include <fcntl.h>      // open
+ #include <unistd.h>     // sysconf
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>   // backtrace, backtrace_symbols
+ #endif  // def __GLIBC__
+ #include <strings.h>    // index
+@@ -114,7 +114,7 @@
+ static Sampler* sActiveSampler = NULL;
+ 
+ 
+-#if !defined(__GLIBC__) && (defined(__arm__) || defined(__thumb__))
++#if !defined(__GLIBC__) && (defined(__arm__) || defined(__thumb__)) && !defined(__UCLIBC__)
+ // Android runs a fairly new Linux kernel, so signal info is there,
+ // but the C library doesn't have the structs defined.
+ 
+diff -Naur firefox-11.0.org/xpcom/threads/nsThread.cpp firefox-11.0/xpcom/threads/nsThread.cpp
+--- firefox-11.0.org/xpcom/threads/nsThread.cpp	2012-08-06 15:09:49.129994022 +0300
++++ firefox-11.0/xpcom/threads/nsThread.cpp	2012-08-06 23:30:49.474225373 +0300
+@@ -53,7 +53,7 @@
+                       _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&           \
+                       !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
+ 
+-#if defined(XP_UNIX) && !defined(ANDROID) && !defined(DEBUG) && HAVE_UALARM \
++#if defined(XP_UNIX) && !defined(ANDROID) && !defined(__UCLIBC__) && !defined(DEBUG) && HAVE_UALARM \
+   && defined(_GNU_SOURCE)
+ # define MOZ_CANARY
+ # include <unistd.h>
diff --git a/package/firefox/firefox-11.0-isfinite.patch b/package/firefox/firefox-11.0-isfinite.patch
new file mode 100644
index 0000000..87c024d
--- /dev/null
+++ b/package/firefox/firefox-11.0-isfinite.patch
@@ -0,0 +1,22 @@
+diff -Naur firefox-11.0.org/xpcom/ds/nsMathUtils.h firefox-11.0/xpcom/ds/nsMathUtils.h
+--- firefox-11.0.org/xpcom/ds/nsMathUtils.h	2012-08-06 15:09:49.059994026 +0300
++++ firefox-11.0/xpcom/ds/nsMathUtils.h	2012-08-06 23:32:57.771217662 +0300
+@@ -42,6 +42,9 @@
+ 
+ #include "nscore.h"
+ #include <math.h>
++#ifdef	__UCLIBC__
++#include <cmath>
++#endif
+ #include <float.h>
+ 
+ #ifdef SOLARIS
+@@ -134,6 +137,8 @@
+     // Darwin has deprecated |finite| and recommends |isfinite|. The former is
+     // not present in the iOS SDK.
+     return isfinite(d);
++#elif __UCLIBC__
++    return std::isfinite(d);
+ #else
+     return finite(d);
+ #endif
diff --git a/package/firefox/firefox-11.0-uclibc.patch b/package/firefox/firefox-11.0-uclibc.patch
new file mode 100644
index 0000000..3d1b1a0
--- /dev/null
+++ b/package/firefox/firefox-11.0-uclibc.patch
@@ -0,0 +1,112 @@
+diff -Naur firefox-11.0.org/ipc/chromium/src/base/file_util.h firefox-11.0/ipc/chromium/src/base/file_util.h
+--- firefox-11.0.org/ipc/chromium/src/base/file_util.h	2012-08-06 15:09:43.333994370 +0300
++++ firefox-11.0/ipc/chromium/src/base/file_util.h	2012-08-06 23:42:29.523183319 +0300
+@@ -16,7 +16,9 @@
+ #include <sys/stat.h>
+ #elif defined(OS_POSIX) 
+ #include <sys/types.h>
++#ifndef __UCLIBC__
+ #include <fts.h>
++#endif
+ #include <sys/stat.h>
+ #endif
+ 
+@@ -466,7 +468,7 @@
+ #if defined(OS_WIN)
+   WIN32_FIND_DATA find_data_;
+   HANDLE find_handle_;
+-#elif defined(ANDROID)
++#elif defined(ANDROID) || defined(__UCLIBC__)
+   void *fts_;
+ #elif defined(OS_POSIX)
+   FTS* fts_;
+diff -Naur firefox-11.0.org/ipc/chromium/src/base/file_util_posix.cc firefox-11.0/ipc/chromium/src/base/file_util_posix.cc
+--- firefox-11.0.org/ipc/chromium/src/base/file_util_posix.cc	2012-08-06 15:09:43.296994374 +0300
++++ firefox-11.0/ipc/chromium/src/base/file_util_posix.cc	2012-08-06 23:42:29.525183319 +0300
+@@ -8,7 +8,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+-#ifndef ANDROID
++#if !defined(ANDROID) && !defined(__UCLIBC__)
+ #include <fts.h>
+ #endif
+ #include <libgen.h>
+@@ -123,7 +123,7 @@
+   if (!recursive)
+     return (rmdir(path_str) == 0);
+ 
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(__UCLIBC__)
+   // XXX Need ftsless impl for bionic
+   return false;
+ #else
+@@ -196,7 +196,7 @@
+     return false;
+   }
+ 
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(__UCLIBC__)
+   // XXX Need ftsless impl for bionic
+   return false;
+ #else
+@@ -419,7 +419,7 @@
+   std::string tmpdir_string = tmpdir.value();
+   // this should be OK since mkdtemp just replaces characters in place
+   char* buffer = const_cast<char*>(tmpdir_string.c_str());
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(__UCLIBC__)
+   char* dtemp = NULL;
+ #else
+   char* dtemp = mkdtemp(buffer);
+@@ -549,7 +549,7 @@
+ }
+ 
+ FileEnumerator::~FileEnumerator() {
+-#ifndef ANDROID
++#if !defined(ANDROID) && !defined(__UCLIBC__)
+   if (fts_)
+     fts_close(fts_);
+ #endif
+@@ -561,7 +561,7 @@
+   if (!is_in_find_op_)
+     return;
+ 
+-#ifndef ANDROID
++#if !defined(ANDROID) && !defined(__UCLIBC__)
+   memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
+   info->filename.assign(fts_ent_->fts_name);
+ #endif
+@@ -572,7 +572,7 @@
+ // large directories with many files this can be quite deep.
+ // TODO(erikkay) - get rid of this recursive pattern
+ FilePath FileEnumerator::Next() {
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(__UCLIBC__)
+   return FilePath();
+ #else
+   if (!is_in_find_op_) {
+diff -Naur firefox-11.0.org/js/src/ctypes/CTypes.cpp firefox-11.0/js/src/ctypes/CTypes.cpp
+--- firefox-11.0.org/js/src/ctypes/CTypes.cpp	2012-08-06 15:09:42.909994396 +0300
++++ firefox-11.0/js/src/ctypes/CTypes.cpp	2012-08-06 23:45:09.691173699 +0300
+@@ -473,6 +473,8 @@
+ static inline bool FloatIsFinite(jsdouble f) {
+ #ifdef WIN32
+   return _finite(f) != 0;
++#elif __UCLIBC__
++  return isinf(f);
+ #else
+   return finite(f);
+ #endif
+diff -Naur firefox-11.0.org/memory/mozalloc/mozalloc.cpp firefox-11.0/memory/mozalloc/mozalloc.cpp
+--- firefox-11.0.org/memory/mozalloc/mozalloc.cpp	2012-08-06 15:09:42.968994393 +0300
++++ firefox-11.0/memory/mozalloc/mozalloc.cpp	2012-08-06 23:45:58.800170749 +0300
+@@ -259,7 +259,7 @@
+ 
+ #if defined(XP_MACOSX)
+     return malloc_size(ptr);
+-#elif defined(MOZ_MEMORY) || defined(XP_LINUX)
++#elif defined(MOZ_MEMORY) || defined(XP_LINUX) && !defined(__UCLIBC__)
+     // XXX: the |defined(XP_LINUX)| may be too lax;  some Linux installations
+     // might use a libc that doesn't have malloc_usable_size.  Let's fix this
+     // if/when it happens.
diff --git a/package/firefox/firefox-11.0-uintptr_t.patch b/package/firefox/firefox-11.0-uintptr_t.patch
new file mode 100644
index 0000000..559b4c7
--- /dev/null
+++ b/package/firefox/firefox-11.0-uintptr_t.patch
@@ -0,0 +1,12 @@
+diff -Naur firefox-11.0.org/gfx/qcms/qcmstypes.h firefox-11.0/gfx/qcms/qcmstypes.h
+--- firefox-11.0.org/gfx/qcms/qcmstypes.h	2012-08-06 15:09:44.189994318 +0300
++++ firefox-11.0/gfx/qcms/qcmstypes.h	2012-08-06 23:35:38.339208022 +0300
+@@ -27,7 +27,7 @@
+ #ifdef __OS2__
+ /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
+ #include <stdlib.h>
+-#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
++#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED) && !defined(__UCLIBC__)
+ typedef PRUptrdiff uintptr_t;
+ #endif
+ #endif
diff --git a/package/firefox/firefox.mk b/package/firefox/firefox.mk
new file mode 100644
index 0000000..f501636
--- /dev/null
+++ b/package/firefox/firefox.mk
@@ -0,0 +1,240 @@
+#############################################################
+#
+# Mozilla Firefox
+#
+# Version:     11.0
+# Authors:     Stefan Froberg
+#
+# Builds a very minimal binary with all the optional features
+# stripped, except WebM. 
+#
+# With WebM enabled you can watch *some* (but not all!)
+# YouTube videos without Adobe Flash player
+# http://www.youtube.com/results?search_query=web&webm=1
+#
+# Because Adobe Flash player plug-in is a glibc binary it
+# will obviously not work with uClibc.
+# (but maybe with nspluginwrapper ... )
+# 
+# So the only real open source solution for playing flash videos
+# with Firefox under uClibc will be gnash + lightspark combo.
+# Lightspark handling the newer flash formats while falling back
+# to gnash with older versions.
+#
+# Further, Adobe has recently stopped supporting Linux version of 
+# their plug-in but Google Chrome PPAPI might some day
+# find it's way to firefox and save the day.
+# http://www.phoronix.com/scan.php?page=news_item&px=MTEyNzc
+#
+# Used Linux From Scratch as a starting template for this file
+# http://www.linuxfromscratch.org/blfs/view/svb/xsoft/firefox.html
+# 
+# Note: Even tought the libnss and libnspr are marked as dependencies 
+# here I could not get them to work when building firefox.
+# Seems that the configure script needs some patching ...
+#
+# So for now, untill somebody fixes this, instead of trying to 
+# use the buildroot system version of these libs the 
+# internal ones provided by the firefox tarball are used.
+#
+#############################################################
+FIREFOX_VERSION = 11.0
+FIREFOX_SOURCE = firefox-$(FIREFOX_VERSION).source.tar.bz2
+FIREFOX_SITE = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/source/
+FIREFOX_DEPENDENCIES = host-python alsa-lib cairo freetype jpeg libffi libgtk2 libnss libnspr libpng sqlite zlib
+
+ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_DEBUG),y)
+FIREFOX_DEPENDENCIES += valgrind
+define FIREFOX_ENABLE_DEBUG
+	echo "ac_add_options --enable-debug" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --enable-debug-symbols" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --disable-strip" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --enable-valgrind" >> $(FIREFOX_DIR)/mozconfig
+endef
+else
+define FIREFOX_ENABLE_DEBUG
+	echo "ac_add_options --disable-debug" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --disable-debug-symbols" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --enable-strip" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --disable-valgrind" >> $(FIREFOX_DIR)/mozconfig
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_WEBM),y)
+# Only x86 needs yasm
+ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
+FIREFOX_DEPENDENCIES += host-yasm
+endif
+define FIREFOX_ENABLE_WEBM
+	echo "ac_add_options --enable-webm" >> $(FIREFOX_DIR)/mozconfig
+endef
+else
+define FIREFOX_ENABLE_WEBM
+	echo "ac_add_options --disable-webm" >> $(FIREFOX_DIR)/mozconfig
+endef
+endif
+
+#####################################################################
+# Some post-install, optional default profile custom settings 
+# (extensions, secure default settings, language packs, flash etc...)
+#####################################################################
+
+# General Info & description of some Firefox extensions. 
+# Too large to put directly here.
+include package/firefox/firefox_extensions.mk.in
+
+# My (IMHO) privacy enhanced about:config settings.
+# Before you enable this feature please
+# check prefs.js file
+#
+# Note: This will also install NoScript, Adblock Lite, Ghostery and
+# HttpsEverywhere extensions
+
+ifeq ($(BR2_PACKAGE_FIREFOX_ULTRA_PARANOID),y)
+define FIREFOX_ULTRA_PARANOID
+	cp -i package/firefox/prefs.js $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
+
+# Because this setting will also install the extensions mentioned in 
+# package/firefox/firefox_extensions.mk.in we will need two
+# additional tools: host-unzip and host-xmlstarlet
+
+FIREFOX_DEPENDENCIES += host-unzip host-xmlstarlet
+
+define FIREFOX_INSTALL_DEFAULT_EXTENSIONS
+	$(call FIREFOX_INSTALL_EXTENSION,$(EXTENSION_SOURCE))
+endef
+endif
+
+# Installing selected langpack (en-US locale does not need any)	
+ifneq ($(BR2_FIREFOX_LOCALE_EN_US),y)
+
+FIREFOX_LOCALE:=$(call qstrip,$(BR2_PACKAGE_FIREFOX_LOCALE))
+FIREFOX_LOCALE_SOURCE:=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/linux-i686/xpi/$(FIREFOX_LOCALE).xpi
+
+define FIREFOX_INSTALL_LANGPACK
+	$(call DOWNLOAD,$(FIREFOX_LOCALE_SOURCE))
+	cp $(DL_DIR)/$(FIREFOX_LOCALE).xpi $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/langpack-$(FIREFOX_LOCALE)@firefox.mozilla.org.xpi
+	echo "user_pref(\"general.useragent.locale\",\"$(FIREFOX_LOCALE)\");" >> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/prefs.js
+endef
+endif
+
+define FIREFOX_CUSTOM_DEFAULT_PROFILE
+	mkdir -p $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile
+	$(FIREFOX_ULTRA_PARANOID)
+	$(FIREFOX_INSTALL_DEFAULT_EXTENSIONS)
+	$(FIREFOX_INSTALL_LANGPACK)
+endef
+
+FIREFOX_POST_INSTALL_TARGET_HOOKS += FIREFOX_CUSTOM_DEFAULT_PROFILE
+
+# Even thought Firefox uses autoconf it's configure process
+# is not simple "configure && make && make install"
+# but a lot more messier than that.
+
+define FIREFOX_CONFIGURE_CMDS
+	# Copy the default mozconfig to source directory.
+	cp package/firefox/mozconfig $(@D)
+
+	# If you want to enable any extra build options like
+	# DBus support, libnotify support, etc., then this 
+	# will be the right place to do it.
+
+	echo "ac_add_options --build=$(GNU_HOST_NAME)" >> $(FIREFOX_DIR)/mozconfig
+	echo "ac_add_options --host=$(GNU_TARGET_NAME)" >> $(FIREFOX_DIR)/mozconfig
+
+	# Enable parallel building
+	echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$(BR2_JLEVEL)\"" >> $(FIREFOX_DIR)/mozconfig
+
+	$(FIREFOX_ENABLE_WEBM)
+	$(FIREFOX_ENABLE_DEBUG)
+
+	# Create the needed build directory that was defined in mozconfig file
+	mkdir -p $(@D)/firefox-build-dir
+endef
+
+
+# Firefox needs SQLite to store it's configurations.
+# Further the SQLite must be build with SQLITE_SECURE_DELETE, SQLITE_THREADSAFE,
+# SQLITE_ENABLE_FTS3 and SLITE_ENABLE_UNLOCK_NOTIFY enabled.
+#
+# However, even if you *do* have these things enabled the damn configure
+# script says that they are not. So I had to force the correct settings.
+#
+# Even worse, it seems that the script does not respect even
+# pkg-config variables (see below) to find the buildroot version of SQLite
+# but insist of using *host* SQLite library.
+#
+# Luckily, in the actual linking time, the correct libraries seem to be used.
+
+define FIREFOX_BUILD_CMDS
+
+	# Picked the PKG_ variable suggestions from:
+	# http://www.flameeyess.eu/autotools-mythbuster/pkgconfig/cross-compiling
+	#
+	# With these settings, *most* of the buildroot system libs were found.
+	# With the exception of SQLite, NSS and NSPR.
+
+	# Had to enforce HOST_CC, CC_FOR_BUILD and HOST_CXX because
+	# the configure would not get them right.
+
+	(cd $(@D); \
+		sed -i 's# ""##' browser/base/Makefile.in && \
+		ac_cv_sqlite_secure_delete=yes \
+		ac_cv_sqlite_threadsafe=yes \
+		ac_cv_sqlite_enable_fts3=yes \
+		ac_cv_sqlite_enable_unlock_notify=yes \
+		HOST_CC=gcc \
+		CC_FOR_BUILD=gcc \
+		HOST_CXX=g++ \
+		PKG_CONFIG_DIR= \
+		PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \
+		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+		PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)"\
+		$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) CXXFLAGS="$(TARGET_CXXFLAGS) -fvisibility=hidden -fvisibility-inlines-hidden" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -f client.mk )
+
+endef
+
+define FIREFOX_INSTALL_TARGET_CMDS
+	# This will create a firefox installation tarball
+	(cd $(@D); \
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C firefox-build-dir/browser/installer )
+
+	# Make nice new clean home for our firefox and extract it there
+	rm -rf $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) && \
+	mkdir $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) && \
+	tar -xvf $(@D)/firefox-build-dir/dist/firefox-$(FIREFOX_VERSION).en-US.linux-*.tar.bz2 -C $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) --strip-components=1
+	
+	# Make some symlinks to firefox binary and plugins directory
+	(cd $(TARGET_DIR)/usr/bin && \
+	ln -sfv ../lib/firefox-$(FIREFOX_VERSION)/firefox . && \
+	mkdir -pv $(TARGET_DIR)/usr/lib/mozilla/plugins && \
+	cd $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) && \
+	ln -sfv ../mozilla/plugins . && \
+	chown -R -v root:root $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) )
+
+	# Using strace revealed that for some strange reason the firefox is looking these 
+	# from /usr/lib and not from /usr/lib/$(FIREFOX_VERSION) like the rest of the files.
+	# That's why I had to use symlinks to make it start.
+
+	(cd $(TARGET_DIR)/usr/lib && \
+	ln -sfv firefox-$(FIREFOX_VERSION)/libxul.so . && \
+	ln -sfv firefox-$(FIREFOX_VERSION)/libmozjs.so . && \
+	ln -sfv firefox-$(FIREFOX_VERSION)/libmozalloc.so . )
+
+	# For gnash support
+	rm -rf $(STAGING_DIR)/usr/include/npapi
+	mkdir -v $(STAGING_DIR)/usr/include/npapi	
+	cp -v $(FIREFOX_DIR)/dom/plugins/base/*.h $(STAGING_DIR)/usr/include/npapi
+
+endef
+
+$(eval $(generic-package))
+
+
+
+
+
diff --git a/package/firefox/firefox_extensions.mk.in b/package/firefox/firefox_extensions.mk.in
new file mode 100644
index 0000000..8c8fa3d
--- /dev/null
+++ b/package/firefox/firefox_extensions.mk.in
@@ -0,0 +1,168 @@
+#############################################################
+# Extensions
+#
+# General Info:
+#
+# Firefox extensions are nothing more than ordinary zip-files with .xpi file extension.
+#
+# If you want to add your own default extension(s) to your default firefox profile
+# then you basically have to:
+# - download the extension file
+# - get the extension id from that file with the help of xmlstarlet tool
+# - unzip the extension file to /usr/lib/firefox-$(FIREFOX_VERSION/extensions/$(EXTENSION_ID)
+#
+# For more information of global extension installation look at:
+# http://kb.mozillazine.org/Installing_extensions#Global_installation
+#
+# For information of how to get the extension id (needs unzip and xmlstarlet) look at:
+# http://kb.mozillazine.org/Determine_extension_ID
+#
+# Note that this process will only *install* your extensions to your default firefox profile.
+# It will not *enable* them by default.
+# You have to do it manually afterwards from Firefox Add-ons menu.
+#
+# There is an "extensions.enabledAddons" setting in about:config
+# but it's no use if you try to set it in pref.js file.
+# It seems it's a read-only setting and it will be updated each
+# time after you have manually enabled your installed extensions/language packs
+# from Add-ons menu.
+#
+# The messy way to enable your extensions by default with each build would be:
+#
+# - Start your firefox at least once and then enable all your extensions manually
+#
+# - Do all the necessary setting you need for your extensions/langpacks
+# (like Adblock Lite subscriptions, default language etc..)
+#
+# - Go to your $HOME/.mozilla/firefox/some_random_chars.default/ folder and copy 
+# at least the files starting with extensions.* (and maybe also addons.*)
+# to package/firefox/extensions buildroot folder.
+# To make sure, it's generally better to copy *all* files & directories from
+# $HOME/.mozilla/firefox/some_random_chars.default/ folder to 
+# packge/firefox/extensions
+#
+# - Add buildroot option that will copy all those saved custom settings from 
+# package/firefox/extensions folder in FIREFOX_POST_INSTALL_TARGET_HOOKS phase
+# (or alternativaly, at the end of the FIREFOX_INSTALL_TARGET_CMDS)
+# to $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions
+#
+# This seems to be the only way to *enable* extensions by default because 
+# firefox keep's track of extensions in SQLite database (like extensions.sqlite file) 
+# and not in easily editable/patchable text files :-(
+#
+# Next comes four privacy/security related extensions.
+# 
+
+# Name:		NoScript
+# Version:	2.5.3
+# Home:		http://noscript.net
+# Download URL:	http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi
+# Description:	"NoScript for Firefox pre-emptively blocks malicious scripts
+# 		and allows JavaScript, Java, Flash and other potentially dangerous
+# 		content only from sites you trust.
+# 		NoScript also provides the most anti-XSS and anti-Clickjacking
+#		protection ever available in a browser."
+
+ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT),y)
+EXTENSION_SOURCE+=http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi
+endif
+
+# Name:		Adblock Lite
+# Version:	1.4.3
+# Home:		https://bitbucket.org/adstomper/adblocklite
+# Download URL:	https://bitbucket.org/adstomper/adblocklite/downloads/adblocklite-1.4.3.xpi	
+# Description:	"Adblocklite is a fork of the Adblock Plus version 1.3.10 (classic UI)
+#		extension for blocking advertisements on the web.
+#		This fork will provide the same features as Adblock Plus 2.x and higher
+#		while keeping the old UI but without acceptable ads feature."
+#
+#		Indeed, I can confirm that Adblock Plus is still (as of version 2.1.2)
+#		using this "acceptable ads" feature and enabling some adds by default.
+#
+#		If you want to check it by yourself then do the following:
+#
+#		- wget http://releases.mozilla.org/pub/mozilla.org/addons/1865/adblock_plus-2.1.2-sm+an+fx+tb.xpi
+#
+#		- unzip -d adblockplus adblock_plus-2.1.2-sm+an+fx+tb.xpi
+#
+#		- cd adblockplus/defaults
+#
+#		- open the prefs.js file and look if you can find line entry named:
+#
+#		pref("extensions.adblockplus.subscriptions_exceptionsurl","https://easylist-downloads.adblockplus.org/exceptionrules.txt")
+#
+#		- if you open that https://easylist-downloads.adblockplus.org/exceptionrules.txt
+#		  in your browser you will see that Adblock Plus is whitelisting 
+#		  (all those lines starting with @@)
+#		  ads from google and amazon.
+#
+#		So the end of the story is: Use Adblock Lite instead :-)
+#
+#		Note: 
+#		You need some ad blacklist subscriptions for the Adblock Lite to be effective.
+#		You can get them by either selecting the subscriptions you want from
+#		Adblock Lite options menu or by visiting https://easylist.adblockplus.org
+#
+#		I might later add an option to download and install my own, 
+#		default ad blacklist subscription text file that contains *all* those
+#		subscriptions mentioned in https://easylist.adblockplus.org but
+#		without any whitelisted ad sites.
+
+ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE),y)
+EXTENSION_SOURCE+=http://bitbucket.org/adstomper/adblocklite/downloads/adblocklite-1.4.3.xpi
+endif
+
+# Name:		Ghostery
+# Version:	2.8.0.2
+# Home:		http://www.ghostery.com
+# Download URL:	http://releases.mozilla.org/pub/mozilla.org/addons/9609/ghostery-2.8.0.2-sm+fx.xpi
+# Description:	"Protect your privacy. See who's tracking your web browsing and 
+#		block them with Ghostery"
+
+ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY),y)
+EXTENSION_SOURCE+=http://releases.mozilla.org/pub/mozilla.org/addons/9609/ghostery-2.8.0.2-sm+fx.xpi
+endif
+
+# Name:		HTTPS Everywhere
+# Version:	2.2
+# Home:		https://www.eff.org/https-everywhere
+# Download URL:	https://www.eff.org/files/https-everywhere-latest.xpi
+# Description:	"HTTPS Everywhere is a Firefox and Chrome extension
+#		that encrypts your communications with many major
+#		websites, making your browsing more secure."
+
+ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE),y)
+EXTENSION_SOURCE+=http://www.eff.org/files/https-everywhere-latest.xpi
+endif
+
+
+ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
+
+UNZIP=$(HOST_DIR)/usr/bin/unzip
+XMLSTARLET=$(HOST_DIR)/usr/bin/xml
+
+define	FIREFOX_INSTALL_EXTENSION
+	
+# Do multi-download, get extension id for each downloaded file
+# and finally unzip it to 
+# $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/${EXTENSION_ID}
+#
+# Inner guts copied from package/pkg-download.mk DOWNLOAD_WGET
+# Thanks to Yann and Thomas for helping with that $${i##*/} thing!
+
+	for i in $(EXTENSION_SOURCE);do \
+		FILENAME=$${i##*/} ;\
+		test -e $(DL_DIR)/$${FILENAME} || \
+		$(WGET) -O $(DL_DIR)/$${FILENAME} $${i} || \
+		(rm -f $(DL_DIR)/$${FILENAME} ; exit 1) ;\
+		EXTENSION_ID=`$(UNZIP) -qc $(DL_DIR)/$${FILENAME} install.rdf | $(XMLSTARLET) sel \
+		-N rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# \
+		-N em=http://www.mozilla.org/2004/em-rdf# \
+		-t -v \
+		"//rdf:Description[@about='urn:mozilla:install-manifest']/em:id"` ;\
+		$(UNZIP) -d $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/$${EXTENSION_ID} $(DL_DIR)/$${FILENAME};\
+	done	
+
+endef
+endif
+	
diff --git a/package/firefox/mozconfig b/package/firefox/mozconfig
new file mode 100644
index 0000000..83450aa
--- /dev/null
+++ b/package/firefox/mozconfig
@@ -0,0 +1,35 @@
+ac_add_options --disable-crashreporter
+ac_add_options --disable-dbus
+ac_add_options --disable-elf-hack
+ac_add_options --disable-glibtest
+ac_add_options --disable-installer
+ac_add_options --disable-jemalloc
+ac_add_options --disable-libnotify
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-static
+ac_add_options --disable-tests
+ac_add_options --disable-trace-malloc
+ac_add_options --disable-tree-freetype
+ac_add_options --disable-updater
+ac_add_options --disable-warnings-as-errors
+ac_add_options --enable-application=browser
+ac_add_options --enable-default-toolkit=cairo-gtk2
+#ac_add_options --enable-official-branding
+ac_add_options --with-branding=browser/branding/unofficial
+ac_add_options --enable-shared
+ac_add_options --enable-shared-js
+ac_add_options --enable-system-cairo
+ac_add_options --enable-system-ffi
+ac_add_options --enable-system-sqlite
+ac_add_options --prefix=/usr
+ac_add_options --without-libIDL
+ac_add_options --with-pthreads
+ac_add_options --with-system-jpeg
+#ac_add_options --with-system-nspr
+#ac_add_options --with-system-nss
+#ac_add_options --with-system-png
+ac_add_options --with-system-zlib
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
+CROSS_COMPILE=1
+CC_FOR_BUILD=gcc
+HOST_CC=gcc
diff --git a/package/firefox/prefs.js b/package/firefox/prefs.js
new file mode 100755
index 0000000..7cbf675
--- /dev/null
+++ b/package/firefox/prefs.js
@@ -0,0 +1,100 @@
+# Mozilla User Preferences
+
+# Most of the settings below are documented in 
+# http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
+#
+# Those entries that are not documented (tagged UNDOCUMENTED) are 
+# the ones I found out when playing with various
+# Firefox Privacy settings and then checking afterwards 
+# from the about:config URL what had changed.
+
+# If you have more information about these entries please update.
+
+########################
+# Performance settings #
+########################
+
+# Enable pipelining
+user_pref("network.http.pipelining",true);
+user_pref("network.http.pipelining.agressive",true);
+user_pref("network.http.pipelining.ssl",true);
+user_pref("network.http.proxy.pipelining",true);
+
+###############################
+# Privacy & Security settings #
+###############################
+
+# When to remove downloaded files entries from the Download Manager
+#	0: Upon successful download
+#	1: When the browser exits
+#	2 (default): Manually
+user_pref("browser.download.manager.retention",1);
+
+# Don't save information entered in web page forms and the Search Bar
+user_pref("browser.formfill.enable",false);
+
+# Automatically Start in Private Browsing Mode
+user_pref("browser.privatebrowsing.autostart",true);
+
+# Windows may not be moved or resized via JavaScript
+user_pref("dom.disable_window_move_resize",true);
+
+# Webpages will not be able to affect the context menu event,
+# thus allowing to access the context menu all the time
+user_pref("dom.event.contextmenu.enabled",false);
+
+# Is location aware browsing enabled? Default setting *was* 'true' (Jesus Christ!)
+user_pref("geo.enabled",false);
+
+# Allow cookies from originating server only
+user_pref("network.cookie.cookieBehavior",1);
+
+# Accept cookies for session only
+user_pref("network.cookie.lifetimePolicy",2);
+
+# Consult current preferences for cookie prefs
+user_pref("network.cookie.prefsMigrated",true);
+
+# Perform all DNS lookups on remote proxy server 
+# NOTE: It has *still* (8th of June 2012) not been fixed!
+# ( see Bug 134105 https://bugzilla.mozilla.org/show_bug.cgi?id=134105 )
+user_pref("network.proxy.socks_remote_dns",true);
+
+# Only important if you are using Tor. Might be fixed by now
+# ( see https://trac.torproject.org/projects/tor/ticket/5741 )
+user_pref("network.websocket.enabled",false);
+
+# UNDOCUMENTED 
+# Not documented by Mozilla but my best guess is that this disables browser history :-)
+user_pref("places.history.enabled",false);
+
+# UNDOCUMENTED
+# Not documented by Mozilla (what the heck are offline apps???)
+user_pref("privacy.clearOnShutdown.offlineApps",true);
+
+# UNDOCUMENTED
+# Not documented by Mozilla (but should be obvious :-) )
+user_pref("privacy.clearOnShutdown.passwords",true);
+
+# UNDOCUMENTED
+# Not documented by Mozilla (???)
+user_pref("privacy.clearOnShutdown.siteSettings",true);
+
+# UNDOCUMENTED
+# Not documented by Mozilla but this is clearly the 
+# Do-not-track feature from Firefox privacy settings
+user_pref("privacy.donottrackheader.enabled",true);
+
+# Delete all cookies when using the Firefox Clear Private Data feature
+user_pref("privacy.item.cookies",true);
+
+# Perform the Firefox Clear Private Data operation when closing the browser
+user_pref("privacy.sanitize.sanitizeOnShutdown",true);
+
+
+
+
+
+
+
+
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (5 preceding siblings ...)
  2012-09-05 14:29 ` [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser Stefan Fröberg
@ 2012-09-05 14:29 ` Stefan Fröberg
  2012-09-19  5:30   ` Arnout Vandecappelle
  2012-09-05 14:29 ` [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency Stefan Fröberg
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:29 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/Config.in         |    1 +
 package/agg/Config.in     |   12 +++
 package/agg/agg-2.5.patch |  207 +++++++++++++++++++++++++++++++++++++++++++++
 package/agg/agg.mk        |   17 ++++
 4 files changed, 237 insertions(+), 0 deletions(-)
 create mode 100644 package/agg/Config.in
 create mode 100644 package/agg/agg-2.5.patch
 create mode 100644 package/agg/agg.mk

diff --git a/package/Config.in b/package/Config.in
index 1848abb..92c957e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -344,6 +344,7 @@ source "package/libsysfs/Config.in"
 endmenu
 
 menu "Graphics"
+source "package/agg/Config.in"
 source "package/atk/Config.in"
 source "package/cairo/Config.in"
 source "package/fltk/Config.in"
diff --git a/package/agg/Config.in b/package/agg/Config.in
new file mode 100644
index 0000000..98a7b02
--- /dev/null
+++ b/package/agg/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_AGG
+	bool "agg"
+	select BR2_PACKAGE_PKG_CONFIG
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_SDL
+	help
+	  The Anti-Grain Geometry (AGG) package contains a general purpse C++ graphical toolkit. 
+	  It can be used in many areas of computer programming where high quality 2D graphics is
+	  an essential part of the project.
+
+	  http://www.antigrain.com
+
diff --git a/package/agg/agg-2.5.patch b/package/agg/agg-2.5.patch
new file mode 100644
index 0000000..d8749c5
--- /dev/null
+++ b/package/agg/agg-2.5.patch
@@ -0,0 +1,207 @@
+diff -Naur agg-2.5.org/authors agg-2.5/authors
+--- agg-2.5.org/authors	2012-07-24 14:46:22.692942266 +0300
++++ agg-2.5/authors	1970-01-01 02:00:00.000000000 +0200
+@@ -1,3 +0,0 @@
+-Anti-Grain Geometry (AGG) - Version 2.5
+-A high quality rendering engine for C++
+-Copyright (C) 2002-2006 Maxim Shemanarev
+diff -Naur agg-2.5.org/AUTHORS agg-2.5/AUTHORS
+--- agg-2.5.org/AUTHORS	1970-01-01 02:00:00.000000000 +0200
++++ agg-2.5/AUTHORS	2006-10-09 07:06:36.000000000 +0300
+@@ -0,0 +1,3 @@
++Anti-Grain Geometry (AGG) - Version 2.5
++A high quality rendering engine for C++
++Copyright (C) 2002-2006 Maxim Shemanarev
+diff -Naur agg-2.5.org/configure.in agg-2.5/configure.in
+--- agg-2.5.org/configure.in	2012-07-24 14:46:22.685942274 +0300
++++ agg-2.5/configure.in	2012-07-24 14:48:22.177936690 +0300
+@@ -8,7 +8,6 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_ISC_POSIX
+-AM_C_PROTOTYPES
+ if test "x$U" != "x"; then
+   AC_MSG_ERROR(Compiler not ANSI compliant)
+ fi
+diff -Naur agg-2.5.org/news agg-2.5/news
+--- agg-2.5.org/news	2012-07-24 14:46:22.692942266 +0300
++++ agg-2.5/news	1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-Visit http://antigrain.com/news
+\ Ei rivinvaihtoa tiedoston lopussa
+diff -Naur agg-2.5.org/NEWS agg-2.5/NEWS
+--- agg-2.5.org/NEWS	1970-01-01 02:00:00.000000000 +0200
++++ agg-2.5/NEWS	2006-10-09 07:06:36.000000000 +0300
+@@ -0,0 +1 @@
++Visit http://antigrain.com/news
+\ Ei rivinvaihtoa tiedoston lopussa
+diff -Naur agg-2.5.org/readme agg-2.5/readme
+--- agg-2.5.org/readme	2012-07-24 14:46:22.692942266 +0300
++++ agg-2.5/readme	1970-01-01 02:00:00.000000000 +0200
+@@ -1,75 +0,0 @@
+-Anti-Grain Geometry (AGG) - Version 2.5
+-A high quality rendering engine for C++
+-Copyright (C) 2002-2006 Maxim Shemanarev
+-Contact: mcseem at antigrain.com
+-         mcseemagg at yahoo.com
+-         http://antigrain.com
+-
+-AGG is free software; you can redistribute it and/or
+-modify it under the terms of the GNU General Public License
+-as published by the Free Software Foundation; either version 2
+-of the License, or (at your option) any later version.
+-
+-AGG is distributed in the hope that it will be useful,
+-but WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-GNU General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with AGG; if not, write to the Free Software
+-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+-MA 02110-1301, USA.
+-
+-
+-
+----------------------------------
+-
+-Use automake to build the library.
+-
+-If automake is not available you still can use the old make.
+-There is a very simple Makefile that can be used. Note that
+-if you use automake it will overwrite Makefile.
+-
+----------------------------------
+-
+-If building on AmigaOS 4.0 or higher type the following for
+-instructions on what targets are available.
+- make -f Makefile.AmigaOS
+-
+-To just build and install AGG into the standard AmigaOS SDK
+-ready for use type:
+- make -f Makefile.AmigaOS install
+-
+-If you just want to build one demo (e.g. lion) use:
+- make -f Makefile.AmigaOS bin/lion
+-
+-If you have any questions about the AmigaOS port please
+-contact Steven Solie (ssolie at telus.net) for help.
+-
+----------------------------------
+-
+-To build all examples using SDL (Mac or Linux) just type:
+-
+-cd /examples/sdl
+-make
+-
+-Individual examples can be built with
+-
+-make aa_test
+-
+-In the same way the native Carbon examples can be built with
+-
+-cd /examples/macosx_carbon
+-make
+-
+-In both cases the static library will be built (if it was not already) 
+-from the existing global Makefile in /src/.
+-
+-The Makefiles for both SDL and Carbon will also attempt to download the 
+-required .bmp files if they are not found in the system for a given 
+-example. If the files could not be fetched (wget) the user will receive 
+-a message explaining where to download the samples from (sphere.bmp, 
+-etc.)  Since all programs reside in the same directory there is no need 
+-to duplicate the .bmp files for each program that needs to use them.
+-
+----------------------------------
+diff -Naur agg-2.5.org/README agg-2.5/README
+--- agg-2.5.org/README	1970-01-01 02:00:00.000000000 +0200
++++ agg-2.5/README	2006-10-09 07:06:36.000000000 +0300
+@@ -0,0 +1,75 @@
++Anti-Grain Geometry (AGG) - Version 2.5
++A high quality rendering engine for C++
++Copyright (C) 2002-2006 Maxim Shemanarev
++Contact: mcseem at antigrain.com
++         mcseemagg at yahoo.com
++         http://antigrain.com
++
++AGG is free software; you can redistribute it and/or
++modify it under the terms of the GNU General Public License
++as published by the Free Software Foundation; either version 2
++of the License, or (at your option) any later version.
++
++AGG is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with AGG; if not, write to the Free Software
++Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
++MA 02110-1301, USA.
++
++
++
++---------------------------------
++
++Use automake to build the library.
++
++If automake is not available you still can use the old make.
++There is a very simple Makefile that can be used. Note that
++if you use automake it will overwrite Makefile.
++
++---------------------------------
++
++If building on AmigaOS 4.0 or higher type the following for
++instructions on what targets are available.
++ make -f Makefile.AmigaOS
++
++To just build and install AGG into the standard AmigaOS SDK
++ready for use type:
++ make -f Makefile.AmigaOS install
++
++If you just want to build one demo (e.g. lion) use:
++ make -f Makefile.AmigaOS bin/lion
++
++If you have any questions about the AmigaOS port please
++contact Steven Solie (ssolie at telus.net) for help.
++
++---------------------------------
++
++To build all examples using SDL (Mac or Linux) just type:
++
++cd /examples/sdl
++make
++
++Individual examples can be built with
++
++make aa_test
++
++In the same way the native Carbon examples can be built with
++
++cd /examples/macosx_carbon
++make
++
++In both cases the static library will be built (if it was not already) 
++from the existing global Makefile in /src/.
++
++The Makefiles for both SDL and Carbon will also attempt to download the 
++required .bmp files if they are not found in the system for a given 
++example. If the files could not be fetched (wget) the user will receive 
++a message explaining where to download the samples from (sphere.bmp, 
++etc.)  Since all programs reside in the same directory there is no need 
++to duplicate the .bmp files for each program that needs to use them.
++
++---------------------------------
+diff -Naur agg-2.5.org/src/platform/X11/Makefile.am agg-2.5/src/platform/X11/Makefile.am
+--- agg-2.5.org/src/platform/X11/Makefile.am	2012-07-24 14:46:22.686942273 +0300
++++ agg-2.5/src/platform/X11/Makefile.am	2012-07-24 14:47:55.674937931 +0300
+@@ -1,7 +1,7 @@
+ if ENABLE_X11
+ lib_LTLIBRARIES = libaggplatformX11.la
+ 
+-libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@  -L at x_libraries@
++libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@ 
+ libaggplatformX11_la_SOURCES = agg_platform_support.cpp
+ libaggplatformX11_la_CXXFLAGS =  -I$(top_srcdir)/include -I at x_includes@
+ libaggplatformX11_la_LIBADD = -lX11
diff --git a/package/agg/agg.mk b/package/agg/agg.mk
new file mode 100644
index 0000000..f4b9a75
--- /dev/null
+++ b/package/agg/agg.mk
@@ -0,0 +1,17 @@
+#############################################################
+#
+# agg
+#
+#############################################################
+
+AGG_VERSION = 2.5
+AGG_SOURCE = agg-$(AGG_VERSION).tar.gz
+AGG_SITE = http://www.antigrain.com/
+AGG_DEPENDENCIES = xlib_libX11 pkg-config sdl
+AGG_INSTALL_STAGING = YES
+AGG_AUTORECONF = YES
+AGG_LICENSE = GPLv2
+AGG_LICENCE_FILE = readme
+
+$(eval $(autotools-package))
+
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (6 preceding siblings ...)
  2012-09-05 14:29 ` [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency Stefan Fröberg
@ 2012-09-05 14:29 ` Stefan Fröberg
  2012-09-19  6:16   ` Arnout Vandecappelle
  2012-09-05 14:29 ` [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin Stefan Fröberg
  2013-05-03 22:11 ` [Buildroot] firefox: a new package Thomas Petazzoni
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:29 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/Config.in       |    1 +
 package/gconf/Config.in |   11 +++++++++++
 package/gconf/gconf.mk  |   26 ++++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 package/gconf/Config.in
 create mode 100644 package/gconf/gconf.mk

diff --git a/package/Config.in b/package/Config.in
index 92c957e..fb4ec28 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -510,6 +510,7 @@ endmenu
 menu "Miscellaneous"
 source "package/collectd/Config.in"
 source "package/empty/Config.in"
+source "package/gconf/Config.in"
 source "package/mobile-broadband-provider-info/Config.in"
 source "package/shared-mime-info/Config.in"
 source "package/sound-theme-borealis/Config.in"
diff --git a/package/gconf/Config.in b/package/gconf/Config.in
new file mode 100644
index 0000000..770e707
--- /dev/null
+++ b/package/gconf/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_GCONF
+	bool "gconf"
+	select BR2_PACKAGE_INTLTOOL
+	select BR2_PACKAGE_DBUS_GLIB
+	select BR2_PACKAGE_LIBXML2
+	help
+	  The GConf package contains a configuration database system used by many GNOME
+	  applications.
+
+	  http://ftp.gnome.org/pub/gnome/sources/GConf/3.2
+
diff --git a/package/gconf/gconf.mk b/package/gconf/gconf.mk
new file mode 100644
index 0000000..8eefc05
--- /dev/null
+++ b/package/gconf/gconf.mk
@@ -0,0 +1,26 @@
+#############################################################
+#
+# GConf
+#
+#############################################################
+
+GCONF_VERSION = 3.2.0
+GCONF_SOURCE = GConf-$(GCONF_VERSION).tar.xz
+GCONF_SITE = http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/
+GCONF_DEPENDENCIES = dbus-glib intltool libxml2
+GCONF_INSTALL_STAGING = YES
+GCONF_CONF_OPT += --sysconfdir=/etc --libexecdir=/usr/lib/GConf --disable-orbit
+GCONF_LICENSE = GPLv2
+GCONG_LICENSE_FILE = COPYING
+
+define GCONF_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+
+	(cd $(@D); \
+	install -v -m755 -d $(TARGET_DIR)/etc/gconf/gconf.xml.system)
+
+endef
+
+$(eval $(autotools-package))
+
+
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (7 preceding siblings ...)
  2012-09-05 14:29 ` [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency Stefan Fröberg
@ 2012-09-05 14:29 ` Stefan Fröberg
  2012-10-20 15:55   ` Arnout Vandecappelle
  2013-05-03 22:11 ` [Buildroot] firefox: a new package Thomas Petazzoni
  9 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-05 14:29 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
---
 package/gnash/Config.in                            |   20 +++
 package/gnash/gnash-0.8.10-amf-include.patch       |   45 +++++
 package/gnash/gnash-0.8.10-cve-2012-1175.patch     |   63 +++++++
 package/gnash/gnash-0.8.10-external-dejagnu.patch  |   24 +++
 package/gnash/gnash-0.8.10-gettext-macro.patch     |  170 ++++++++++++++++++++
 package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch |   52 ++++++
 package/gnash/gnash-0.8.10-kde4-libdir.patch       |   12 ++
 package/gnash/gnash-0.8.10-klash.patch             |   12 ++
 package/gnash/gnash-0.8.10-npapi-sdk.patch         |   29 ++++
 package/gnash/gnash.mk                             |   45 +++++
 10 files changed, 472 insertions(+), 0 deletions(-)
 create mode 100644 package/gnash/Config.in
 create mode 100644 package/gnash/gnash-0.8.10-amf-include.patch
 create mode 100644 package/gnash/gnash-0.8.10-cve-2012-1175.patch
 create mode 100644 package/gnash/gnash-0.8.10-external-dejagnu.patch
 create mode 100644 package/gnash/gnash-0.8.10-gettext-macro.patch
 create mode 100644 package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
 create mode 100644 package/gnash/gnash-0.8.10-kde4-libdir.patch
 create mode 100644 package/gnash/gnash-0.8.10-klash.patch
 create mode 100644 package/gnash/gnash-0.8.10-npapi-sdk.patch
 create mode 100644 package/gnash/gnash.mk

diff --git a/package/gnash/Config.in b/package/gnash/Config.in
new file mode 100644
index 0000000..437b8d8
--- /dev/null
+++ b/package/gnash/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_GNASH
+	bool "Enable Adobe Flash support with GNU gnash"
+	select BR2_PACKAGE_AGG
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_GST_FFMPEG
+	select BR2_PACKAGE_GCONF
+	select BR2_PACKAGE_GIFLIB
+	select BR2_PACKAGE_OPENSSL
+	depends on BR2_PACKAGE_FIREFOX
+	help
+	  Gnash is the GNU Flash movie player and browser plugin. This is useful for watching
+	  YouTube videos or simple flash animations.
+
+	  Currently, Gnash can play SWF files up to version 7, and 80% of ActionScript 2.0.
+	  For full, open source Flash support you could try to use Lightspark with Gnash.
+	  That is, for newer SWF files Lightspark will be used and it will fallback to
+	  using Gnash with older versions.
+
+	  http://ftp.gnu.org/pub/gnu/gnash
+
diff --git a/package/gnash/gnash-0.8.10-amf-include.patch b/package/gnash/gnash-0.8.10-amf-include.patch
new file mode 100644
index 0000000..983fa6b
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-amf-include.patch
@@ -0,0 +1,45 @@
+diff -ur a/cygnal/libnet/cque.h b/cygnal/libnet/cque.h
+--- a/cygnal/libnet/cque.h	2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/cque.h	2012-02-23 20:13:39.000000000 +0100
+@@ -25,8 +25,9 @@
+ #include <boost/thread/condition.hpp>
+ #include <deque>
+ 
++#include "../libamf/amf.h"
+ #include "getclocktime.hpp"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+ #include "network.h"
+ #include "dsodefs.h" //For DSOEXPORT.
+ 
+diff -ur a/cygnal/libnet/sshclient.h b/cygnal/libnet/sshclient.h
+--- a/cygnal/libnet/sshclient.h	2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/sshclient.h	2012-02-23 20:13:09.000000000 +0100
+@@ -32,9 +32,10 @@
+ #include <libssh/sftp.h>
+ }
+ 
++#include "../libamf/amf.h"
+ #include "cque.h"
+ #include "network.h"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+ 
+ namespace gnash
+ {
+diff -ur a/cygnal/libnet/sslclient.h b/cygnal/libnet/sslclient.h
+--- a/cygnal/libnet/sslclient.h	2012-01-19 20:17:47.000000000 +0100
++++ b/cygnal/libnet/sslclient.h	2012-02-23 20:13:21.000000000 +0100
+@@ -36,10 +36,11 @@
+ #include <openssl/err.h>
+ #endif
+ 
++#include "../libamf/amf.h"
+ #include "dsodefs.h"
+ #include "cque.h"
+ #include "network.h"
+-#include "buffer.h"
++#include "../libamf/buffer.h"
+ 
+ 
+ namespace gnash
diff --git a/package/gnash/gnash-0.8.10-cve-2012-1175.patch b/package/gnash/gnash-0.8.10-cve-2012-1175.patch
new file mode 100644
index 0000000..9a218d9
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-cve-2012-1175.patch
@@ -0,0 +1,63 @@
+From bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 Mon Sep 17 00:00:00 2001
+From: Benjamin Wolsey <bwy@benjaminwolsey.de>
+Date: Sat, 10 Mar 2012 14:52:50 +0000
+Subject: Fix crash in GnashImage.cpp
+
+---
+diff --git a/libbase/GnashImage.cpp b/libbase/GnashImage.cpp
+index 11c6956..03a6939 100644
+--- a/libbase/GnashImage.cpp
++++ b/libbase/GnashImage.cpp
+@@ -26,6 +26,7 @@
+ #include <boost/scoped_array.hpp>
+ #include <boost/shared_ptr.hpp>
+ #include <algorithm>
++#include <cassert>
+ 
+ #ifdef USE_PNG
+ # include "GnashImagePng.h"
+@@ -44,6 +45,21 @@ namespace image {
+ 
+ namespace {
+     void processAlpha(GnashImage::iterator imageData, size_t pixels);
++    bool checkValidSize(size_t width, size_t height, size_t channels) {
++
++        if (width == 0 || height == 0) return false;
++
++        assert(channels > 0);
++
++        boost::uint32_t maxSize = std::numeric_limits<boost::int32_t>::max();
++        if (width >= maxSize || height >= maxSize) return false;
++
++        maxSize /= channels;
++        maxSize /= width;
++        maxSize /= height;
++
++        return maxSize > 0;
++    }
+ }
+ 
+ GnashImage::GnashImage(iterator data, size_t width, size_t height,
+@@ -55,6 +71,8 @@ GnashImage::GnashImage(iterator data, size_t width, size_t height,
+     _height(height),
+     _data(data)
+ {
++    // Callers should check dimensions
++    assert(checkValidSize(_width, _height, channels()));
+ }
+ 
+ /// Create an image allocating a buffer of height*pitch bytes
+@@ -66,8 +84,9 @@ GnashImage::GnashImage(size_t width, size_t height, ImageType type,
+     _width(width),
+     _height(height)
+ {
+-    const size_t max = std::numeric_limits<boost::int32_t>::max();
+-    if (size() > max) {
++    // Constructed from external input, so restrict dimensions to avoid
++    // overflow in size calculations
++    if (!checkValidSize(_width, _height, channels())) {
+         throw std::bad_alloc();
+     }
+     _data.reset(new value_type[size()]);
+--
+cgit v0.9.0.2
diff --git a/package/gnash/gnash-0.8.10-external-dejagnu.patch b/package/gnash/gnash-0.8.10-external-dejagnu.patch
new file mode 100644
index 0000000..eaffda7
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-external-dejagnu.patch
@@ -0,0 +1,24 @@
+diff -ur a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
+--- a/plugin/npapi/test.cpp	2011-03-13 17:47:36.000000000 +0100
++++ b/plugin/npapi/test.cpp	2011-03-20 23:52:20.369998096 +0100
+@@ -35,7 +35,7 @@
+ #include "npfunctions.h"
+ #endif
+ #include "pluginbase.h"
+-#include "dejagnu.h"
++#include <dejagnu.h>
+ #include "../../testsuite/check.h"
+ #include <regex.h>
+ 
+diff -ur a/testsuite/check.h b/testsuite/check.h
+--- a/testsuite/check.h	2011-02-26 19:11:08.000000000 +0100
++++ b/testsuite/check.h	2011-03-20 23:52:32.570998094 +0100
+@@ -29,7 +29,7 @@
+ 
+ #define HAVE_DEJAGNU_H 1 // we ship our own now...
+ #ifdef HAVE_DEJAGNU_H
+-#include "dejagnu.h"
++#include <dejagnu.h>
+ 
+ #define info(x) note x
+ 
diff --git a/package/gnash/gnash-0.8.10-gettext-macro.patch b/package/gnash/gnash-0.8.10-gettext-macro.patch
new file mode 100644
index 0000000..0501f74
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-gettext-macro.patch
@@ -0,0 +1,170 @@
+diff -ur a/libdevice/vaapi/VaapiImage.cpp b/libdevice/vaapi/VaapiImage.cpp
+--- a/libdevice/vaapi/VaapiImage.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiImage.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -35,7 +35,7 @@
+     : _format(format)
+     , _image_data(NULL)
+ {
+-    log_debug(_("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format)));
++    log_debug("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format));
+ 
+     memset(&_image, 0, sizeof(_image));
+     _image.image_id = VA_INVALID_ID;
+@@ -79,7 +79,7 @@
+     if (!vaapi_check_status(status, "vaCreateImage()"))
+         return false;
+ 
+-    log_debug(_("  image 0x%08x, format '%s'\n", get(), string_of_FOURCC(_format)));
++    log_debug("  image 0x%08x, format '%s'\n", get(), string_of_FOURCC(_format));
+ 
+     return true;
+ }
+diff -ur a/libdevice/vaapi/VaapiSubpicture.cpp b/libdevice/vaapi/VaapiSubpicture.cpp
+--- a/libdevice/vaapi/VaapiSubpicture.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSubpicture.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -32,7 +32,7 @@
+     : _image(image)
+     , _subpicture(VA_INVALID_ID)
+ {
+-    log_debug(_("VaapiSubpicture::VaapiSubpicture(): format '%s'\n", string_of_FOURCC(image->format())));
++    log_debug("VaapiSubpicture::VaapiSubpicture(): format '%s'\n", string_of_FOURCC(image->format()));
+ 
+     if (!create()) {
+         boost::format msg;
+diff -ur a/libdevice/vaapi/VaapiSurface.cpp b/libdevice/vaapi/VaapiSurface.cpp
+--- a/libdevice/vaapi/VaapiSurface.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurface.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -74,7 +74,7 @@
+ 
+ VaapiSurfaceImpl::~VaapiSurfaceImpl()
+ {
+-    log_debug(_("VaapiSurface::~VaapiSurface(): surface 0x%08x\n", surface()));
++    log_debug("VaapiSurface::~VaapiSurface(): surface 0x%08x\n", surface());
+ 
+     if (surface() == VA_INVALID_SURFACE) {
+         return;
+diff -ur a/libdevice/vaapi/VaapiSurfaceGLX.cpp b/libdevice/vaapi/VaapiSurfaceGLX.cpp
+--- a/libdevice/vaapi/VaapiSurfaceGLX.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurfaceGLX.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -202,14 +202,14 @@
+ 
+     reset(reinterpret_cast<uintptr_t>(surface));
+ 
+-    log_debug(_("  -> surface %p\n", this->surface()));
++    log_debug("  -> surface %p\n", this->surface());
+ }
+ 
+ VaapiSurfaceGLXImpl::~VaapiSurfaceGLXImpl()
+ {
+     // GNASH_REPORT_FUNCTION;
+ 
+-    log_debug(_("VaapiSurface::~VaapiSurface(): surface %p\n", surface()));
++    log_debug("VaapiSurface::~VaapiSurface(): surface %p\n", surface());
+ 
+     if (!surface()) {
+         return;
+@@ -263,7 +263,7 @@
+ 
+ bool VaapiSurfaceGLX::update(boost::shared_ptr<VaapiSurface> surface)
+ {
+-    log_debug(_("VaapiSurfaceGLX::update(): from surface 0x%08x\n", surface->get()));
++    log_debug("VaapiSurfaceGLX::update(): from surface 0x%08x\n", surface->get());
+ 
+     return dynamic_cast<VaapiSurfaceGLXImpl *>(_impl.get())->update(surface);
+ }
+diff -ur a/libdevice/vaapi/VaapiSurfaceProxy.cpp b/libdevice/vaapi/VaapiSurfaceProxy.cpp
+--- a/libdevice/vaapi/VaapiSurfaceProxy.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/vaapi/VaapiSurfaceProxy.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -28,12 +28,12 @@
+                                      boost::shared_ptr<VaapiContext> context)
+     : _context(context), _surface(surface)
+ {
+-    log_debug(_("VaapiSurfaceProxy::VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get()));
++    log_debug("VaapiSurfaceProxy::VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get());
+ }
+     
+ VaapiSurfaceProxy::~VaapiSurfaceProxy()
+ {
+-    log_debug(_("VaapiSurfaceProxy::~VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get()));
++    log_debug("VaapiSurfaceProxy::~VaapiSurfaceProxy(): surface 0x%08x\n", _surface->get());
+ 
+     _context->releaseSurface(_surface);
+ }
+diff -ur a/libdevice/x11/X11Device.cpp b/libdevice/x11/X11Device.cpp
+--- a/libdevice/x11/X11Device.cpp	2012-01-19 20:17:48.000000000 +0100
++++ b/libdevice/x11/X11Device.cpp	2012-02-23 19:05:13.000000000 +0100
+@@ -85,7 +85,7 @@
+     GNASH_REPORT_FUNCTION;
+ 
+     if (!initDevice(0, 0)) {
+-        log_error(_("Couldn't initialize X11 device!"));
++        log_error("Couldn't initialize X11 device!");
+     }
+ }
+ 
+@@ -103,7 +103,7 @@
+     GNASH_REPORT_FUNCTION;
+     
+     if (!initDevice(argc, argv)) {
+-        log_error(_("Couldn't initialize X11 device!"));
++        log_error("Couldn't initialize X11 device!");
+     }
+ }
+ 
+@@ -139,7 +139,7 @@
+ 
+     _display = XOpenDisplay(dpyName);
+     if (!_display) {
+-        log_error(_("couldn't open X11 display!"));
++        log_error("couldn't open X11 display!");
+         return false;
+     }
+ 
+@@ -159,7 +159,7 @@
+     _vinfo = XGetVisualInfo(_display, VisualIDMask, &visTemplate, &num_visuals);
+     std::cerr << "Num Visuals: " << num_visuals << std::endl;
+     if (!_vinfo) {
+-        log_error(_("Error: couldn't get X visual\n"));
++         log_error("Error: couldn't get X visual\n");
+          exit(1);
+     }
+     std::cerr << "X11 visual is: " << _vinfo->visual << std::endl;
+@@ -196,7 +196,7 @@
+     if (_display) {
+         XGetErrorText(_display, error, msg, 80);
+     } else {
+-        log_error(_("The default Display is not set!"));
++        log_error("The default Display is not set!");
+     }
+ 
+     return msg;
+@@ -209,12 +209,12 @@
+     GNASH_REPORT_FUNCTION;
+ 
+     if (!_display) {
+-        log_error(_("No Display device set!"));
++        log_error("No Display device set!");
+         return;
+     }
+     
+     if (!_root) {
+-        log_error(_("No drawable window set!"));
++        log_error("No drawable window set!");
+         return;
+     }
+ 
+@@ -279,11 +279,11 @@
+           case KeyPress:
+           {
+               char buffer[10];
+-              int code;
++              int r, code;
+               code = XLookupKeysym(&event.xkey, 0);
+               if (!keyPress || !keyPress(code)) {
+-                  // int r = XLookupString(&event.xkey, buffer, sizeof(buffer),
+-                  //                   NULL, NULL);
++                  r = XLookupString(&event.xkey, buffer, sizeof(buffer),
++                                    NULL, NULL);
+                   if (buffer[0] == 27) {
+                       // escape
+                       return;
diff --git a/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch b/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
new file mode 100644
index 0000000..413744c
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
@@ -0,0 +1,52 @@
+diff -Naur gnash-0.8.10.alt/libbase/jemalloc.c gnash-0.8.10/libbase/jemalloc.c
+--- gnash-0.8.10.alt/libbase/jemalloc.c	2012-02-07 09:39:41.000000000 +0100
++++ gnash-0.8.10/libbase/jemalloc.c	2012-02-24 18:36:47.000000000 +0100
+@@ -429,7 +429,7 @@
+ static const bool __isthreaded = true;
+ #endif
+ 
+-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
++#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) || defined(MOZ_MEMORY_LINUX)
+ #define JEMALLOC_USES_MAP_ALIGN	 /* Required on Solaris 10. Might improve performance elsewhere. */
+ #endif
+ 
+@@ -2238,6 +2238,7 @@
+ 	 * We don't use MAP_FIXED here, because it can cause the *replacement*
+ 	 * of existing mappings, and we only want to create new mappings.
+ 	 */
++#ifdef MOZ_MEMORY_SOLARIS
+ #ifdef MALLOC_PAGEFILE
+ 	if (pfd != -1) {
+ 		ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
+@@ -2252,6 +2253,31 @@
+ 
+ 	if (ret == MAP_FAILED)
+ 		ret = NULL;
++#else /* !MOZ_MEMORY_SOLARIS */
++#ifdef MALLOC_PAGEFILE
++	if (pfd != -1) {
++		ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
++		    MAP_NOSYNC, pfd, 0);
++	} else
++#endif
++	       {
++		ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE |
++		    MAP_NOSYNC | MAP_ANON, -1, 0);
++	}
++	assert(ret != NULL);
++
++	if (ret == MAP_FAILED)
++		return NULL;
++	
++	uintptr_t aligned_ret;
++	size_t extra_size;
++	aligned_ret = (uintptr_t)ret + alignment - 1;
++	aligned_ret &= ~(alignment - 1);
++	extra_size = aligned_ret - (uintptr_t)ret;
++	munmap(ret, extra_size);
++	munmap(ret + extra_size + size, alignment - extra_size);
++	ret = (void*)aligned_ret;
++#endif /* ifdef MOZ_MEMORY_SOLARIS*/
+ 	return (ret);
+ }
+ #endif
diff --git a/package/gnash/gnash-0.8.10-kde4-libdir.patch b/package/gnash/gnash-0.8.10-kde4-libdir.patch
new file mode 100644
index 0000000..b327944
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-kde4-libdir.patch
@@ -0,0 +1,12 @@
+diff -ur a/macros/kde4.m4 b/macros/kde4.m4
+--- a/macros/kde4.m4	2011-02-26 19:11:08.000000000 +0100
++++ b/macros/kde4.m4	2011-11-25 18:09:25.000000000 +0100
+@@ -198,7 +198,7 @@
+       if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then
+         KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4"
+       else
+-        KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
++        KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4"
+       fi
+     fi
+     if test x"${with_kde4_servicesdir}" != x ; then 
diff --git a/package/gnash/gnash-0.8.10-klash.patch b/package/gnash/gnash-0.8.10-klash.patch
new file mode 100644
index 0000000..e6afec0
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-klash.patch
@@ -0,0 +1,12 @@
+diff -ur a/macros/kde4.m4 b/macros/kde4.m4
+--- a/macros/kde4.m4	2011-02-26 19:11:08.000000000 +0100
++++ b/macros/kde4.m4	2011-03-21 00:04:38.845997945 +0100
+@@ -210,7 +210,7 @@
+       KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
+     fi
+     if test x"${KDE4_APPSDATADIR}" = x ; then 
+-      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
++      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
+     fi
+ 
+   if test x"${ac_cv_path_kde4_incl}" != x ; then
diff --git a/package/gnash/gnash-0.8.10-npapi-sdk.patch b/package/gnash/gnash-0.8.10-npapi-sdk.patch
new file mode 100644
index 0000000..eb54295
--- /dev/null
+++ b/package/gnash/gnash-0.8.10-npapi-sdk.patch
@@ -0,0 +1,29 @@
+From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 15 Sep 2011 12:59:55 +0200
+Subject: [PATCH] Support building against NPAPI-SDK as well.
+
+---
+ macros/npapi.m4 |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/macros/npapi.m4 b/macros/npapi.m4
+index e3bde2f..522bbb1 100644
+--- a/macros/npapi.m4
++++ b/macros/npapi.m4
+@@ -34,7 +34,11 @@ AC_DEFUN([GNASH_PATH_NPAPI],
+ 
+   if test x$cross_compiling = xno; then
+     if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_npapi_incl}" = x; then
+-      $PKG_CONFIG --exists mozilla-plugin && NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
++      if $PKG_CONFIG --exists npapi-sdk; then
++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags npapi-sdk`"
++      elif $PKG_CONFIG --exists mozilla-plugin; then
++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
++      fi
+     fi
+   fi
+ 
+-- 
+1.7.3.4
+
diff --git a/package/gnash/gnash.mk b/package/gnash/gnash.mk
new file mode 100644
index 0000000..7a2dd8e
--- /dev/null
+++ b/package/gnash/gnash.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# gnash
+#
+#############################################################
+
+GNASH_VERSION = 0.8.10
+GNASH_SOURCE = gnash-$(GNASH_VERSION).tar.gz
+
+# GNU tarball from:
+# http://ftp.gnu.org/pub/gnu/gnash/$(GNASH_VERSION)/
+# is broken. It is missing GnashVaapiTexture.h so you
+# can't even try to build VA API Hardware Accelerated Flash player.
+# (note that it is not working ... yet)
+#
+# http://savannah.gnu.org/bugs/?35612
+#
+# That's why we use gentoo one from one of the mirrors.
+GNASH_SITE = http://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/
+GNASH_DEPENDENCIES = agg boost gst-ffmpeg firefox gconf giflib openssl
+GNASH_AUTORECONF = YES
+
+GNASH_CONF_ENV = PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+		 PKG_CONFIG_DIR= \
+		 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \
+		 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+		 PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
+		 CPPFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags gdk-pixbuf-2.0`" \
+		 LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs gdk-pixbuf-2.0` `$(PKG_CONFIG_HOST_BINARY) --libs libva-x11`"
+
+GNASH_CONF_OPT +=  --enable-gui=gtk --enable-media=ffmpeg --with-sysroot=$(STAGING_DIR)/usr \
+		   --with-npapi-incl=$(STAGING_DIR)/usr/include/npapi \
+		   --with-npapi-plugindir=$(TARGET_DIR)/usr/lib/mozilla/plugins \
+		   --enable-renderer=agg,cairo --enable-doublebuf --enable-visibility --enable-offscreen --enable-ssl
+
+define GNASH_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-plugin
+endef
+
+$(eval $(autotools-package))
+
+
+
+
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options
  2012-09-05 14:28 ` [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options Stefan Fröberg
@ 2012-09-11 21:51   ` Arnout Vandecappelle
  2012-09-11 23:35     ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-11 21:51 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:28, Stefan Fr?berg wrote:
>
> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Small comments below.

> ---
>   package/sqlite/Config.in |   34 ++++++++++++++++++++++++++++++++++
>   package/sqlite/sqlite.mk |   12 ++++++++++++
>   2 files changed, 46 insertions(+), 0 deletions(-)
>
> diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in
> index 25aaa3f..75bce70 100644
> --- a/package/sqlite/Config.in
> +++ b/package/sqlite/Config.in
> @@ -22,3 +22,37 @@ config BR2_PACKAGE_SQLITE_STAT3
>   	  planner that can help SQLite to choose a better query plan under
>   	  certain situations.
>
> +config BR2_PACKAGE_SQLITE_ENABLE_FTS3
> +	bool "Enables version 3 of the full-text search engine"

  "Full-text search engine (fts3)"

> +	depends on BR2_PACKAGE_SQLITE

  Instead of a "depends on" every time, just enclose all the options in an
if block.

> +	help
> +	  When this option is defined in the amalgamation
> +	  (see http://www.sqlite.org/amalgamation.html), version 3 of
> +	  the full-text search engine is added to the build automatically.

  Is it relevant whether it's an amalgamation or a split build?

  I'd just write:

Adds the full-text search engine (version 3) to the build.

> +
> +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
> +	bool "Enables sqlite3_unlock_notify() interface"

  "sqlite3_unlock_notify() interface"

> +	depends on BR2_PACKAGE_SQLITE
> +	help
> +	  This option enables the sqlite3_unlock_notify() interface and its
> +	  accosiated functionality. See the documentation

  associated

> +	  http://www.sqlite.org/unlock_notify.html for additional information.
> +
> +config BR2_PACKAGE_SQLITE_SECURE_DELETE
> +	bool "Sets the secure_delete pragma on by default"
> +	depends on BR2_PACKAGE_SQLITE
> +	help
> +	  This compile-time option changes the default settings of the
> +	  secure_delete pragma. When this option is not used, secure_delete
> +	  defaults to off. When this option is present, secure_delete defaults
> +	  to on.
> +
> +	  The secure_delete setting causes deleted content to be overwritten
> +	  with zeros. There is a small performance penalty for this since
> +	  additional I/O must occur. On the other hand, secure_delete can
> +	  prevent sensitive information from lingering in unused parts
> +	  of the database file after it has allegedly been deleted.
> +	  See the documentation on the
> +	  http://www.sqlite.org/pragma.html#pragma_secure_delete
> +	  for additional information.

  Is this needed for firefox?  (Not that it matters, mind you.)

[snip]

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build
  2012-09-05 14:28 ` [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build Stefan Fröberg
@ 2012-09-11 22:04   ` Arnout Vandecappelle
  2012-09-11 23:39     ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-11 22:04 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:28, Stefan Fr?berg wrote:
> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)&&  ($(BR2_GCC_ENABLE_TLS),y)
> +VALGRIND_CONF_OPT = --enable-tls
> +else
>   VALGRIND_CONF_OPT = --disable-tls
> +endif

  I don't like this because it only works for internal toolchains.

  Is it possible to remove the --en/disable-tls and let configure discover it by
itself?  I tried a few configs and it seems to work correctly...  The
--disable-tls was introduced by a version bump 7 years ago, without any
comment why it is needed.  It may have caused runtime problems, but those
may have disappeared by now too.  So I'd risk removing it completely.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency
  2012-09-05 14:29 ` [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency Stefan Fröberg
@ 2012-09-11 22:24   ` Arnout Vandecappelle
  2012-09-12  0:05     ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-11 22:24 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:29, Stefan Fr?berg wrote:
>
> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>
> ---
>   package/Config.in                       |    1 +
>   package/unzip/Config.in                 |    8 ++++
>   package/unzip/unzip-respect-flags.patch |   23 +++++++++++
>   package/unzip/unzip.mk                  |   66 +++++++++++++++++++++++++++++++
>   4 files changed, 98 insertions(+), 0 deletions(-)
>   create mode 100644 package/unzip/Config.in
>   create mode 100644 package/unzip/unzip-respect-flags.patch
>   create mode 100644 package/unzip/unzip.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index e129522..636caf8 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -13,6 +13,7 @@ source "package/gzip/Config.in"
>   endif
>   source "package/lzop/Config.in"
>   source "package/lzma/Config.in"
> +source "package/unzip/Config.in"
>   source "package/xz/Config.in"
>   endmenu
>
> diff --git a/package/unzip/Config.in b/package/unzip/Config.in
> new file mode 100644
> index 0000000..f4fc111
> --- /dev/null
> +++ b/package/unzip/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_UNZIP
> +	bool "unzip"
> +	help
> +	  The UnZip package contains ZIP extraction utilities. These are useful for extracting files from
> +	  ZIP archives. ZIP archives are created with PKZIP or Info-ZIP utilities, primarily in a DOS
> +	  environment.

  Wordwrap at 80 columns

> +
> +	  http://downloads.sourceforge.net/infozip/
> diff --git a/package/unzip/unzip-respect-flags.patch b/package/unzip/unzip-respect-flags.patch
> new file mode 100644
> index 0000000..35c8314
> --- /dev/null
> +++ b/package/unzip/unzip-respect-flags.patch
> @@ -0,0 +1,23 @@

  Please add a comment at the top of the patch.

- Why is it needed

- Upstream status, if applicable

- Signed-of-by line

  Also upstreaming the patch would be useful.

> +diff -Naur unzip60.org/unix/Makefile unzip60/unix/Makefile
> +--- unzip60.org/unix/Makefile	2012-09-02 21:29:55.944176704 +0300
> ++++ unzip60/unix/Makefile	2012-09-02 21:31:20.276176583 +0300
> +@@ -808,8 +808,8 @@
> + # systems.)
> + linux:		unix_make
> + 	@echo 'NOTE:  use linux_noasm target for non-Intel Linux compiles.'
> +-	$(MAKE) unzips CC=gcc LD=gcc AS=gcc\
> +-	 CFLAGS="-O3 -Wall -DASM_CRC"\
> ++	$(MAKE) unzips CC=$(CC) LD=$(CC) AS=$(CC)\

  $(CC) should be quoted: "$(CC)"

> ++	 CFLAGS="$(CFLAGS) -DASM_CRC"\
> + 	 AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
> + # GRR:  this echo is pointless; if user gets this far, no difference to install
> + #	@echo 'Be sure to use the install_asm target rather than the install target'
> +@@ -819,7 +819,7 @@
> + # Linux (Posix, approximately SysV):  virtually any version since before 0.96,
> + # for any platform.  Change "-O" to "-O3" or whatever, as desired...
> + linux_noasm:	unix_make
> +-	$(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall"
> ++	$(MAKE) unzips CC=$(CC) LD=$(CC) CFLAGS="$(CFLAGS)"

  Same here.

  Wouldn't it be easier to run this $(MAKE) unzips command from the .mk file,
instead of going through the linux[_noasm] target?

> +
> + # Linux with lcc compiler:  __inline__ (stat.h) not recognized, and must edit
> + # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined.  -O3
> diff --git a/package/unzip/unzip.mk b/package/unzip/unzip.mk
> new file mode 100644
> index 0000000..fdfbe9f
> --- /dev/null
> +++ b/package/unzip/unzip.mk
> @@ -0,0 +1,66 @@
> +###################################################################
> +#
> +# unzip
> +#
> +# quickly hacked from:
> +# http://www.linuxfromscratch.org/blfs/view/svn/general/unzip.html
> +###################################################################
> +
> +UNZIP_MAJOR_VERSION = 6
> +UNZIP_MINOR_VERSION = 0
> +UNZIP_VERSION = $(UNZIP_MAJOR_VERSION).$(UNZIP_MINOR_VERSION)
> +UNZIP_SOURCE = unzip$(UNZIP_MAJOR_VERSION)$(UNZIP_MINOR_VERSION).tar.gz

  Why not just call it version 60?  Then the _SOURCE line isn't
needed.

> +UNZIP_SITE = http://downloads.sourceforge.net/infozip
> +UNZIP_LICENSE = Info-ZIP
> +UNZIP_LICENSE_FILES = LICENSE
> +
> +# No point of doing optimized build for host version,
> +# so we build host version without any x86 specific asm stuff
> +define HOST_UNZIP_BUILD_CMDS
> +	(cd $(@D); \
> +	sed -i -e 's/CFLAGS="-O -Wall/&  -DNO_LCHMOD/' unix/Makefile ; \

  This isn't needed anymore with the patch above, right?

> +	$(MAKE) -f unix/Makefile linux_noasm )
> +endef
> +
> +define HOST_UNZIP_INSTALL_CMDS
> +	(cd $(@D); \
> +	$(MAKE) prefix=$(HOST_DIR)/usr install )

  We normally use $(MAKE) -C $(@D) instead of cd $(@D)

> +endef
> +
> +# If you do have busybox installed in your target (like most do)
> +# and if you have by accident also enabled unzip support in
> +# your busybox configuration file, then guess what happens
> +# after insallation of the real unzip application ?
> +#
> +# Yep, UNZIP_INSTALL_TARGET_CMDS will happily
> +# write to your unzip ->  /bin/busybox symlink
> +# and overwrite your busybox ... :-(
> +#
> +# That's why I included this as an primitive safety mechanism.
> +# Improvement are wellcome

  AFAIK, install removes a symlink before installing, so busybox
itself shouldn't be overwritten.  To make sure the full unzip is
installed instead of the busybox unzip, you do:

UNZIP_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)

  That way, busybox is installed first and unzip will overwrite
the busybox symlink.  It's done like that for a lot of packages.

> +
> +ifneq ($(BR2_PACKAGE_BUSYBOX),y)
> +ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
> +# Intel x86 asm optimized version
> +define UNZIP_BUILD_CMDS
> +	(cd $(@D);\
> +	sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile;\
> +	$(MAKE) -f unix/Makefile $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -DNO_LCHMOD" CC=$(TARGET_CC) LD=$(TARGET_LD) AS=$(TARGET_AS) linux )

  CC="$(TARGET_CC)" should be quoted.  But anyway, it's already in
$(TARGET_CONFIGURE_OPTS) so that can be left out.  For the CFLAGS,
I believe it's possible to use CFLAGS+=-DNO_LCHMOD.

[snip]

  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options
  2012-09-11 21:51   ` Arnout Vandecappelle
@ 2012-09-11 23:35     ` Stefan Fröberg
  0 siblings, 0 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-11 23:35 UTC (permalink / raw)
  To: buildroot

Hello Arnout

12.9.2012 0:51, Arnout Vandecappelle kirjoitti:
> On 09/05/12 16:28, Stefan Fr?berg wrote:
>>
>> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>
>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>
>  Small comments below.
>
>> ---
>>   package/sqlite/Config.in |   34 ++++++++++++++++++++++++++++++++++
>>   package/sqlite/sqlite.mk |   12 ++++++++++++
>>   2 files changed, 46 insertions(+), 0 deletions(-)
>>
>> diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in
>> index 25aaa3f..75bce70 100644
>> --- a/package/sqlite/Config.in
>> +++ b/package/sqlite/Config.in
>> @@ -22,3 +22,37 @@ config BR2_PACKAGE_SQLITE_STAT3
>>         planner that can help SQLite to choose a better query plan under
>>         certain situations.
>>
>> +config BR2_PACKAGE_SQLITE_ENABLE_FTS3
>> +    bool "Enables version 3 of the full-text search engine"
>
>  "Full-text search engine (fts3)"
>

Okay

>> +    depends on BR2_PACKAGE_SQLITE
>
>  Instead of a "depends on" every time, just enclose all the options in an
> if block.
>

No problem

>> +    help
>> +      When this option is defined in the amalgamation
>> +      (see http://www.sqlite.org/amalgamation.html), version 3 of
>> +      the full-text search engine is added to the build automatically.
>
>  Is it relevant whether it's an amalgamation or a split build?
>

Well, no ...

>  I'd just write:
>
> Adds the full-text search engine (version 3) to the build.
>

Ok

>> +
>> +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
>> +    bool "Enables sqlite3_unlock_notify() interface"
>
>  "sqlite3_unlock_notify() interface"
>
>> +    depends on BR2_PACKAGE_SQLITE
>> +    help
>> +      This option enables the sqlite3_unlock_notify() interface and its
>> +      accosiated functionality. See the documentation
>
>  associated
>
>> +      http://www.sqlite.org/unlock_notify.html for additional
>> information.
>> +
>> +config BR2_PACKAGE_SQLITE_SECURE_DELETE
>> +    bool "Sets the secure_delete pragma on by default"
>> +    depends on BR2_PACKAGE_SQLITE
>> +    help
>> +      This compile-time option changes the default settings of the
>> +      secure_delete pragma. When this option is not used, secure_delete
>> +      defaults to off. When this option is present, secure_delete
>> defaults
>> +      to on.
>> +
>> +      The secure_delete setting causes deleted content to be
>> overwritten
>> +      with zeros. There is a small performance penalty for this since
>> +      additional I/O must occur. On the other hand, secure_delete can
>> +      prevent sensitive information from lingering in unused parts
>> +      of the database file after it has allegedly been deleted.
>> +      See the documentation on the
>> +      http://www.sqlite.org/pragma.html#pragma_secure_delete
>> +      for additional information.
>
>  Is this needed for firefox?  (Not that it matters, mind you.)
>

Yes. It is needed. Otherwise firefox starts barfing.

I cook a new patch later tomorrow for this based on your suggestions and
fixes.

Thanks!
Stefan
> [snip]
>
>  Regards,
>  Arnout

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build
  2012-09-11 22:04   ` Arnout Vandecappelle
@ 2012-09-11 23:39     ` Stefan Fröberg
  2012-09-13  5:49       ` Arnout Vandecappelle
  0 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-11 23:39 UTC (permalink / raw)
  To: buildroot

12.9.2012 1:04, Arnout Vandecappelle kirjoitti:
> On 09/05/12 16:28, Stefan Fr?berg wrote:
>> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)&&  ($(BR2_GCC_ENABLE_TLS),y)
>> +VALGRIND_CONF_OPT = --enable-tls
>> +else
>>   VALGRIND_CONF_OPT = --disable-tls
>> +endif
>
>  I don't like this because it only works for internal toolchains.
>
>  Is it possible to remove the --en/disable-tls and let configure
> discover it by
> itself?  I tried a few configs and it seems to work correctly...  The
> --disable-tls was introduced by a version bump 7 years ago, without any
> comment why it is needed.  It may have caused runtime problems, but those
> may have disappeared by now too.  So I'd risk removing it completely.
>

Firefox  did not complain about missing valgrind.h file ???
Strange...
I have to try to make a debug build of FF again  and valgrind with
--disable-tls and see

Stefan

>  Regards,
>  Arnout

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency
  2012-09-11 22:24   ` Arnout Vandecappelle
@ 2012-09-12  0:05     ` Stefan Fröberg
  2012-09-13  5:56       ` Arnout Vandecappelle
  0 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-12  0:05 UTC (permalink / raw)
  To: buildroot

12.9.2012 1:24, Arnout Vandecappelle kirjoitti:
> On 09/05/12 16:29, Stefan Fr?berg wrote:
>>
>> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>
>> ---
>>   package/Config.in                       |    1 +
>>   package/unzip/Config.in                 |    8 ++++
>>   package/unzip/unzip-respect-flags.patch |   23 +++++++++++
>>   package/unzip/unzip.mk                  |   66
>> +++++++++++++++++++++++++++++++
>>   4 files changed, 98 insertions(+), 0 deletions(-)
>>   create mode 100644 package/unzip/Config.in
>>   create mode 100644 package/unzip/unzip-respect-flags.patch
>>   create mode 100644 package/unzip/unzip.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index e129522..636caf8 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -13,6 +13,7 @@ source "package/gzip/Config.in"
>>   endif
>>   source "package/lzop/Config.in"
>>   source "package/lzma/Config.in"
>> +source "package/unzip/Config.in"
>>   source "package/xz/Config.in"
>>   endmenu
>>
>> diff --git a/package/unzip/Config.in b/package/unzip/Config.in
>> new file mode 100644
>> index 0000000..f4fc111
>> --- /dev/null
>> +++ b/package/unzip/Config.in
>> @@ -0,0 +1,8 @@
>> +config BR2_PACKAGE_UNZIP
>> +    bool "unzip"
>> +    help
>> +      The UnZip package contains ZIP extraction utilities. These are
>> useful for extracting files from
>> +      ZIP archives. ZIP archives are created with PKZIP or Info-ZIP
>> utilities, primarily in a DOS
>> +      environment.
>
>  Wordwrap at 80 columns
>
Ok

>> +
>> +      http://downloads.sourceforge.net/infozip/
>> diff --git a/package/unzip/unzip-respect-flags.patch
>> b/package/unzip/unzip-respect-flags.patch
>> new file mode 100644
>> index 0000000..35c8314
>> --- /dev/null
>> +++ b/package/unzip/unzip-respect-flags.patch
>> @@ -0,0 +1,23 @@
>
>  Please add a comment at the top of the patch.
>
> - Why is it needed
>
> - Upstream status, if applicable
>
> - Signed-of-by line
>
>  Also upstreaming the patch would be useful.
>
Okay

>> +diff -Naur unzip60.org/unix/Makefile unzip60/unix/Makefile
>> +--- unzip60.org/unix/Makefile    2012-09-02 21:29:55.944176704 +0300
>> ++++ unzip60/unix/Makefile    2012-09-02 21:31:20.276176583 +0300
>> +@@ -808,8 +808,8 @@
>> + # systems.)
>> + linux:        unix_make
>> +     @echo 'NOTE:  use linux_noasm target for non-Intel Linux
>> compiles.'
>> +-    $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
>> +-     CFLAGS="-O3 -Wall -DASM_CRC"\
>> ++    $(MAKE) unzips CC=$(CC) LD=$(CC) AS=$(CC)\
>
>  $(CC) should be quoted: "$(CC)"
>
>> ++     CFLAGS="$(CFLAGS) -DASM_CRC"\
>> +      AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
>> + # GRR:  this echo is pointless; if user gets this far, no
>> difference to install
>> + #    @echo 'Be sure to use the install_asm target rather than the
>> install target'
>> +@@ -819,7 +819,7 @@
>> + # Linux (Posix, approximately SysV):  virtually any version since
>> before 0.96,
>> + # for any platform.  Change "-O" to "-O3" or whatever, as desired...
>> + linux_noasm:    unix_make
>> +-    $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall"
>> ++    $(MAKE) unzips CC=$(CC) LD=$(CC) CFLAGS="$(CFLAGS)"
>
>  Same here.
>
>  Wouldn't it be easier to run this $(MAKE) unzips command from the .mk
> file,
> instead of going through the linux[_noasm] target?
>
Ummm....
Yea, I guess so
>> +
>> + # Linux with lcc compiler:  __inline__ (stat.h) not recognized, and
>> must edit
>> + # /usr/include/gnu/types.h to get rid of "long long" if __LCC__
>> defined.  -O3
>> diff --git a/package/unzip/unzip.mk b/package/unzip/unzip.mk
>> new file mode 100644
>> index 0000000..fdfbe9f
>> --- /dev/null
>> +++ b/package/unzip/unzip.mk
>> @@ -0,0 +1,66 @@
>> +###################################################################
>> +#
>> +# unzip
>> +#
>> +# quickly hacked from:
>> +# http://www.linuxfromscratch.org/blfs/view/svn/general/unzip.html
>> +###################################################################
>> +
>> +UNZIP_MAJOR_VERSION = 6
>> +UNZIP_MINOR_VERSION = 0
>> +UNZIP_VERSION = $(UNZIP_MAJOR_VERSION).$(UNZIP_MINOR_VERSION)
>> +UNZIP_SOURCE = unzip$(UNZIP_MAJOR_VERSION)$(UNZIP_MINOR_VERSION).tar.gz
>
>  Why not just call it version 60?  Then the _SOURCE line isn't
> needed.
>
Ok

>> +UNZIP_SITE = http://downloads.sourceforge.net/infozip
>> +UNZIP_LICENSE = Info-ZIP
>> +UNZIP_LICENSE_FILES = LICENSE
>> +
>> +# No point of doing optimized build for host version,
>> +# so we build host version without any x86 specific asm stuff
>> +define HOST_UNZIP_BUILD_CMDS
>> +    (cd $(@D); \
>> +    sed -i -e 's/CFLAGS="-O -Wall/&  -DNO_LCHMOD/' unix/Makefile ; \
>
>  This isn't needed anymore with the patch above, right?
>

That -DNO_LCHMOD is needed. I remember build process starting
complaining about it.

>> +    $(MAKE) -f unix/Makefile linux_noasm )
>> +endef
>> +
>> +define HOST_UNZIP_INSTALL_CMDS
>> +    (cd $(@D); \
>> +    $(MAKE) prefix=$(HOST_DIR)/usr install )
>
>  We normally use $(MAKE) -C $(@D) instead of cd $(@D)
>
>> +endef
>> +
>> +# If you do have busybox installed in your target (like most do)
>> +# and if you have by accident also enabled unzip support in
>> +# your busybox configuration file, then guess what happens
>> +# after insallation of the real unzip application ?
>> +#
>> +# Yep, UNZIP_INSTALL_TARGET_CMDS will happily
>> +# write to your unzip ->  /bin/busybox symlink
>> +# and overwrite your busybox ... :-(
>> +#
>> +# That's why I included this as an primitive safety mechanism.
>> +# Improvement are wellcome
>
>  AFAIK, install removes a symlink before installing, so busybox
> itself shouldn't be overwritten.  To make sure the full unzip is
> installed instead of the busybox unzip, you do:
>

But when I chrooted inside target system after building
it just spew unzip version stuff out and it had overwrited my busybox
binary.

> UNZIP_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
>
>  That way, busybox is installed first and unzip will overwrite
> the busybox symlink.  It's done like that for a lot of packages.
>
Ok, Ill try and see.

>> +
>> +ifneq ($(BR2_PACKAGE_BUSYBOX),y)
>> +ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
>> +# Intel x86 asm optimized version
>> +define UNZIP_BUILD_CMDS
>> +    (cd $(@D);\
>> +    sed -i -e 's/DASM"/DASM -DNO_LCHMOD"/' unix/Makefile;\
>> +    $(MAKE) -f unix/Makefile $(TARGET_MAKE_ENV)
>> $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -DNO_LCHMOD"
>> CC=$(TARGET_CC) LD=$(TARGET_LD) AS=$(TARGET_AS) linux )
>
>  CC="$(TARGET_CC)" should be quoted.  But anyway, it's already in
> $(TARGET_CONFIGURE_OPTS) so that can be left out.  For the CFLAGS,
> I believe it's possible to use CFLAGS+=-DNO_LCHMOD.
>
Ok. Ill make a new patch after I have had some sleep.

Thank you for taking time with these.
I really appreciate it.

Stefan

P.S:

Have you had time to check firefox patch #9 ? The gnash patch ?

I have somehow managed to broke my sytem config
(maybe some change I recently made to mesa3d package)
and now I can't build it anymore.
:-(

It start's complaining about missing
 -lselinux, security library used by Fedora that gnash  is not even
using ...
:-(

> [snip]
>
>  Regards,
>  Arnout
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build
  2012-09-11 23:39     ` Stefan Fröberg
@ 2012-09-13  5:49       ` Arnout Vandecappelle
  0 siblings, 0 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-13  5:49 UTC (permalink / raw)
  To: buildroot

On 09/12/12 01:39, Stefan Fr?berg wrote:
> 12.9.2012 1:04, Arnout Vandecappelle kirjoitti:
>> On 09/05/12 16:28, Stefan Fr?berg wrote:
>>> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)&&   ($(BR2_GCC_ENABLE_TLS),y)
>>> +VALGRIND_CONF_OPT = --enable-tls
>>> +else
>>>    VALGRIND_CONF_OPT = --disable-tls
>>> +endif
>>
>>   I don't like this because it only works for internal toolchains.
>>
>>   Is it possible to remove the --en/disable-tls and let configure
>> discover it by
>> itself?  I tried a few configs and it seems to work correctly...  The
>> --disable-tls was introduced by a version bump 7 years ago, without any
>> comment why it is needed.  It may have caused runtime problems, but those
>> may have disappeared by now too.  So I'd risk removing it completely.
>>
>
> Firefox  did not complain about missing valgrind.h file ???

  No, I meant that valgrind's configure seems to discover by itself if TLS is
available or not, i.e. removing the --disable-tls will default to --enable.

  So my suggestion is: instead of making the --en/disable-tls conditional,
just remove the --disable-tls completely.

  I haven't actually tried building with any of your patches.



  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency
  2012-09-12  0:05     ` Stefan Fröberg
@ 2012-09-13  5:56       ` Arnout Vandecappelle
  0 siblings, 0 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-13  5:56 UTC (permalink / raw)
  To: buildroot

On 09/12/12 02:05, Stefan Fr?berg wrote:
> 12.9.2012 1:24, Arnout Vandecappelle kirjoitti:
>> On 09/05/12 16:29, Stefan Fr?berg wrote:
[snip]
>>> +# No point of doing optimized build for host version,
>>> +# so we build host version without any x86 specific asm stuff
>>> +define HOST_UNZIP_BUILD_CMDS
>>> +    (cd $(@D); \
>>> +    sed -i -e 's/CFLAGS="-O -Wall/&   -DNO_LCHMOD/' unix/Makefile ; \
>>
>>   This isn't needed anymore with the patch above, right?
>>
>
> That -DNO_LCHMOD is needed. I remember build process starting
> complaining about it.

  Sorry, I meant that you could add the -DNO_LCHMOD to CFLAGS in
the $(MAKE) call below.

>>> +    $(MAKE) -f unix/Makefile linux_noasm )
>>> +endef
>>> +
>>> +define HOST_UNZIP_INSTALL_CMDS
>>> +    (cd $(@D); \
>>> +    $(MAKE) prefix=$(HOST_DIR)/usr install )
>>
>>   We normally use $(MAKE) -C $(@D) instead of cd $(@D)
>>
>>> +endef
>>> +
>>> +# If you do have busybox installed in your target (like most do)
>>> +# and if you have by accident also enabled unzip support in
>>> +# your busybox configuration file, then guess what happens
>>> +# after insallation of the real unzip application ?
>>> +#
>>> +# Yep, UNZIP_INSTALL_TARGET_CMDS will happily
>>> +# write to your unzip ->   /bin/busybox symlink
>>> +# and overwrite your busybox ... :-(
>>> +#
>>> +# That's why I included this as an primitive safety mechanism.
>>> +# Improvement are wellcome
>>
>>   AFAIK, install removes a symlink before installing, so busybox
>> itself shouldn't be overwritten.  To make sure the full unzip is
>> installed instead of the busybox unzip, you do:
>>
>
> But when I chrooted inside target system after building
> it just spew unzip version stuff out and it had overwrited my busybox
> binary.

  I haven't tried it, it's just that no other package does this.
For sure, not building/installing unzip when busybox is selected
(which it is by default) is not a good idea.


[snip]
> Have you had time to check firefox patch #9 ? The gnash patch ?

  Not yet, coming up.


> I have somehow managed to broke my sytem config
> (maybe some change I recently made to mesa3d package)
> and now I can't build it anymore.
> :-(
>
> It start's complaining about missing
>   -lselinux, security library used by Fedora that gnash  is not even
> using ...
> :-(

  That smells like there's a configure script that is trying to use
some host libraries...

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-05 14:29 ` [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser Stefan Fröberg
@ 2012-09-17 22:31   ` Arnout Vandecappelle
  2012-09-18 15:48     ` Stefan Fröberg
  2012-09-19  1:35     ` Stefan Fröberg
  0 siblings, 2 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-17 22:31 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:29, Stefan Fr?berg wrote:
> Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>

  First a general remark: it would be better to split this patch up in smaller
chunks.  It took me a week to review it (not full-time, of course), and
iterations on the patch will again take a lot of time to review.  By
splitting them up, individual patches can be acked and don't need to
be looked at again.

  The first patch should add a minimal firefox, without any additional
config options.  It should just work with both glibc-based and uclibc-
based toolchains.

  Next patches should add a feature/extension, one at a time.
Probably starting with debug and webm, and continuing with extensions
that download XPIs.


  Another overall remark: I think it's better to make separate packages
for the extensions, langpacks, etc. (xpis, in short).  The firefox.mk
can define some generic infrastructure which can be used by the extension
packages.  The extension's .mk would be something like:

FIREFOX_LANGPACK_XX_SITE = $(FIREFOX_LANGPACK_SITE)
FIREFOX_LANGPACK_XX_SOURCE = xx.xpi

FIREFOX_LANGPACK_XX_EXTRACT_CMDS =

define FIREFOX_LANGPACK_XX_INSTALL_TARGET_CMDS
	install -D -m 0644 $(DL_DIR)/$($(PKG)_SOURCE) $(FIREFOX_EXTENSIONS_DIR)/langpack-xx.xpi
endef

$(eval $(generic-package))

  Could be even simpler with a $(firefox-package) wrapper.	

  Admittedly, this step is non-trivial, so I'm OK with leaving the extensions
part of the firefox package for the time being.



  I build-tested on a few platforms.  On an ARM with Linaro-hardfloat toolchain,
some assembly function failed in nspr - but libnspr fails as well with that
toolchain.  On a MIPS, I needed the patch from
https://bugzilla.mozilla.org/show_bug.cgi?id=691898
to avoid compiling pcre.  But in the end, the compilation with a glibc toolchain
still failed because of the -D_FILE_OFFSET_BITS=64 from LARGEFILE. This requires
-U_FILE_OFFSET_BITS to be added to CFLAGS/CXXFLAGS.

  In the end, I didn't get it to compile on either the ARM or the MIPS config, so
I gave up...  But there's already plenty of material below to keep you busy
for a while :-)


[snip]
> diff --git a/package/firefox/Config.in b/package/firefox/Config.in
> new file mode 100644
> index 0000000..fbd4749
> --- /dev/null
> +++ b/package/firefox/Config.in
> @@ -0,0 +1,417 @@
> +config BR2_PACKAGE_FIREFOX
> +	bool "firefox"
> +	select BR2_PACKAGE_ALSA_LIB
> +	select BR2_PACKAGE_CAIRO
> +	select BR2_PACKAGE_CAIRO_TEE
> +	select BR2_PACKAGE_FREETYPE
> +	select BR2_PACKAGE_JPEG
> +	select BR2_PACKAGE_LIBGTK2

  Without Yann's _AVAILABLE series, you need to explicitly
depend on the dependencies of libgtk2 (and cairo but
that's implied):

         depends on BR2_USE_WCHAR # glib2
         depends on BR2_INSTALL_LIBSTDCPP # pango

  And there should be a comment to warn about it
if WCHAR and LIBSTDCPP are not available.

> +	select BR2_PACKAGE_LIBFFI
> +	select BR2_PACKAGE_LIBNSS
> +	select BR2_PACKAGE_LIBNSPR
> +	select BR2_PACKAGE_LIBPNG

  I thought the internal implementations of these three were used?

> +	select BR2_PACKAGE_SQLITE
> +	select BR2_PACKAGE_SQLITE_ENABLE_FTS3
> +	select BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
> +	select BR2_PACKAGE_SQLITE_SECURE_DELETE
> +	select BR2_PACKAGE_ZLIB
> +	depends on BR2_PACKAGE_PYTHON

  Ugh...  Firefox depends on Python?  But in the .mk file it just
says host-python, so this is probably a mistake...


  Missing dependencies:
	depends on BR2_PACKAGE_XSERVER_xorg # mesa3d
	select BR2_PACKAGE_XLIB_LIBXT
	select BR2_PACKAGE_MESA3D

(and add xlib_libXt and mesa3d to the _DEPENDENCIES in the .mk file)

> +	help
> +	  Mozilla Firefox Web Browser
> +
> +	  http://releases.mozilla.org/pub/mozilla.org/firefox/releases/11.0/source/

  The URL here should not point to the source.  Developer page is more
appropriate, or perhaps the release notes.

> +
> +if BR2_PACKAGE_FIREFOX
> +
> +config BR2_PACKAGE_FIREFOX_ENABLE_DEBUG
> +	bool "Enable debug build and Valgrind integration hooks"
> +	select BR2_PACKAGE_VALGRIND if BR2_TOOLCHAIN_BUILDROOT&&  BR2_GCC_ENABLE_TLS

  Let me get this clear: if you're using a glibc-based or
crosstool-NG-generated uclibc toolchain with TLS, valgrind.h
is not needed?

  In other words: shouldn't this just select valgrind unconditionally?

> +	help
> +		This enables debug support.
> +		If you are using buildroot toolchain and your gcc has TLS enable then
> +		this will also enable Valgrind integration hooks.

  Help text should be indented with 1 tab + 2 spaces and
word-wrapped at 80 columns (tab counts for 8).

  Same goes for the rest of the help texts.


> +
> +config BR2_PACKAGE_FIREFOX_ENABLE_WEBM
> +	bool "Enable WebM"
> +	select BR2_PACKAGE_YASM if BR2_i386 || BR2_x86_64
> +	help
> +		WebM is an audio-video format designed to provide royalty-free, open video compression
> +		for use with HTML5 video. The project's development is sponsored by Google inc.
> +
> +		A WebM file consist of VP8 video and Vorbis audio streams, in a container based on
> +		a profile of Matroska. The project releases WebM related software under a BSD license and
> +		all users are granted a worldwide, non-exclusive, non-charge, royalty-free patent license.
> +
> +		WebM is one way of watching YouTube videos without proprietary Adobe Flash.
> +		After you have installed WebM enabled Firefox you can try it by visiting the following link:
> +
> +		http://www.youtube.com/results?search_query=web&webm=1
> +
> +config BR2_PACKAGE_FIREFOX_ULTRA_PARANOID
> +	bool "Enable Ulta-paranoid settings"

  Do you think this option is useful for many buildroot users?  I
think most users will let firefox run full-screen at boot time,
pointing to one and only one site, with no UI for changing URL.
An option to provide *that* would be useful :-)

> +	select BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	select BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
> +	select BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
> +	select BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
> +	select BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
> +	help
> +		This enables my (IMHO) ultra-private custom settings.
> +		The changed settings appear bold when typing about:config into your browser address bar.
> +
> +		Most (but not all!) are documented in
> +		http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
> +
> +		For more info of these entries please take a look at package/firefox/prefs.js file.
> +
> +		By selecting this option you are also enabling pipelining for your browser.
> +
> +		Below is a short summary of settings changed:
> +		
> +			network.http.pipelining = true;
> +			network.http.pipelining.aggressive = true;
> +			network.http.pipelining.ssl = true;
> +			network.http.proxy.pipelining = true;
> +			browser.download.manager.retention = 1;
> +			browser.formfill.enable = false;
> +			browser.privatebrowsing.autostart = true;
> +			dom.disable_window_move_resize = false;
> +			dom.event.contextmenu.enabled = false;
> +			geo.enabled = false;
> +			network.cookie.cookieBehavior = 1;
> +			network.cookie.lifetimePolicy = 2;
> +			network.cookie.prefsMigrated = true;
> +			network.proxy.socks_remote_dns = true;
> +			network.websocket.enabled = false;
> +			places.history.enabled = false;
> +			privacy.clearOnShutdown.offlineApps = true;
> +			privacy.clearOnShutdown.passwords = true;
> +			privacy.clearOnShutdown.siteSettings = true;
> +			privacy.donottrackheader.enabled = true;
> +			privacy.item.cookies = true;
> +			privacy.sanitize.sanitizeOnShutdown = true;
> +
> +			Note:
> +			By selecting this option you are also enabling the following privacy/security related
> +			extensions: NoScript, Adblock Lite, Ghostery&  HTTPS Everywhere
> +
> +config BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	bool "Enable installing of selected default extensions"
> +	help
> +		This option will enable you to select default extensions to
> +		be installed when building Firefox.
> +
> +		Note: The selected extensions are only *installed*.
> +		They are not *enabled* by default.
> +		For that you have to manually enable them after starting you
> +		freshly build Firefox.

  built.

  The logic is reversed here, if you ask me. INSTALL_DEFAULT_EXTENSIONS
should select the default extensions, but the default extensions shouldn't
depend on it.  Or, if the idea is to make a submenu for the extensions,
it should be a menuconfig. But since there are only four extensions, I
don't think it's worth making a menuconfig for that.

  I propose to just remove the DEFAULT_EXTENSIONS symbol.

> +
> +config BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
> +	bool "Install NoScript extensions"
> +	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	help
> +		NoScript for Firefox pre-emptively blocks malicious scripts
> +		and allows JavaScript, Java, Flash and other potentially dangerous
> +		content only from sites you trust.
> +
> +		NoScript also provides the most anti-XSS and anti-Clickjacking
> +		protection ever available in a browser
> +
> +		http://noscript.net
> +
> +config BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
> +	bool "Install Adblock Lite extension"
> +	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	help
> +		Adblock Lite is a fork of the Adblock Plus version 1.3.10 (classic UI)
> +		extension for blocking advertisements on the web.
> +		This fork will provide the same features as Adblock Plus 2.x and higher
> +		while keeping the old UI but without acceptable ads feature.
> +
> +		https://bitbucket.org/adstomper/adblocklite
> +
> +config BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
> +	bool "Install Ghostery extension"
> +	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	help
> +		Protect your privacy. See who's tracking your web browsing and
> +		block them with Ghostery.
> +
> +		http://www.ghostery.com
> +
> +config BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
> +	bool "Install HTTPS Everywhere extension"
> +	depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	help
> +		HTTPS Everywhere is a Firefox and Chrome extension
> +		that encrypts your communications wit many major
> +		websites, making your browsing more secure.
> +
> +		https://www.eff.org/https-everywhere
> +
> +config BR2_PACKAGE_FIREFOX_PLUGIN_GNASH
> +	source "package/gnash/Config.in"

  The config symbol should be inside the sourced Config.in.  Also,
I think it should be included from packages/Config.in.

> +
> +choice
> +	default BR2_PACKAGE_FIREFOX_LOCALE_EN_US
> +	prompt "Select locale"

  Ideally, it should be possible to select several languages.
But you can leave it as is for the time being - can be added
later.

[snip]

> diff --git a/package/firefox/firefox-11.0-NativeWindowHandle.patch b/package/firefox/firefox-11.0-NativeWindowHandle.patch
> new file mode 100644
> index 0000000..bced599
> --- /dev/null
> +++ b/package/firefox/firefox-11.0-NativeWindowHandle.patch

  This patch misses some explanation + a signed-off-by tag.
(Same for the other patches.)

  Also, try to upstream the patches if possible.

  Also, patch names are preferably of the format
firefox-0001-NativeWindowHandle.patch
(i.e. without the version, and with a numbering scheme to
clarify the order in which they should be applied).

> @@ -0,0 +1,12 @@
> +diff -Naur firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h
> +--- firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h	2012-09-04 22:20:07.086923927 +0300
> ++++ firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h	2012-09-04 22:23:45.195922486 +0300
> +@@ -131,7 +131,7 @@
> + typedef HWND NativeWindowHandle;
> + #elif defined(MOZ_X11)
> + typedef XID NativeWindowHandle;
> +-#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT)
> ++#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT) || defined(MOZ_DFB)
> + typedef intptr_t NativeWindowHandle; // never actually used, will always be 0
> + #else
> + #error Need NativeWindowHandle for this platform
> diff --git a/package/firefox/firefox-11.0-execinfo.patch b/package/firefox/firefox-11.0-execinfo.patch
> new file mode 100644
> index 0000000..cacd7a1
> --- /dev/null
> +++ b/package/firefox/firefox-11.0-execinfo.patch
> @@ -0,0 +1,45 @@
> +diff -Naur firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc
> +--- firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc	2012-08-06 15:09:43.325994371 +0300
> ++++ firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc	2012-08-06 23:30:33.750226316 +0300
> +@@ -5,7 +5,7 @@
> + #include "build/build_config.h"
> + #include "base/debug_util.h"
> +
> +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID)&&  !defined(__OpenBSD__))
> ++#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID)&&  !defined(__OpenBSD__)&&  !defined(__UCLIBC__) )
> +
> + #include<errno.h>
> + #include<fcntl.h>

  uClibc does have backtrace functionality, but only if BACKTRACE is configured
(and it's not in buildroot's default). Make sure that this is mentioned in the
patch description, so it is easier in the future to add support for it when
available.

  (Note that it's necessary to link with libubacktrace so it probably
won't work out-of-the-box.)

[snip]

> diff --git a/package/firefox/firefox-11.0-isfinite.patch b/package/firefox/firefox-11.0-isfinite.patch
> new file mode 100644
> index 0000000..87c024d
> --- /dev/null
> +++ b/package/firefox/firefox-11.0-isfinite.patch
> @@ -0,0 +1,22 @@
> +diff -Naur firefox-11.0.org/xpcom/ds/nsMathUtils.h firefox-11.0/xpcom/ds/nsMathUtils.h
> +--- firefox-11.0.org/xpcom/ds/nsMathUtils.h	2012-08-06 15:09:49.059994026 +0300
> ++++ firefox-11.0/xpcom/ds/nsMathUtils.h	2012-08-06 23:32:57.771217662 +0300
> +@@ -42,6 +42,9 @@
> +
> + #include "nscore.h"
> + #include<math.h>
> ++#ifdef	__UCLIBC__
> ++#include<cmath>
> ++#endif
> + #include<float.h>
> +
> + #ifdef SOLARIS
> +@@ -134,6 +137,8 @@
> +     // Darwin has deprecated |finite| and recommends |isfinite|. The former is
> +     // not present in the iOS SDK.
> +     return isfinite(d);
> ++#elif __UCLIBC__
> ++    return std::isfinite(d);

  isfinite() is in math.h, so what's the point of getting it from cmath?

> + #else
> +     return finite(d);
> + #endif
> diff --git a/package/firefox/firefox-11.0-uclibc.patch b/package/firefox/firefox-11.0-uclibc.patch
> new file mode 100644
> index 0000000..3d1b1a0
> --- /dev/null
> +++ b/package/firefox/firefox-11.0-uclibc.patch
> @@ -0,0 +1,112 @@
> +diff -Naur firefox-11.0.org/ipc/chromium/src/base/file_util.h firefox-11.0/ipc/chromium/src/base/file_util.h
> +--- firefox-11.0.org/ipc/chromium/src/base/file_util.h	2012-08-06 15:09:43.333994370 +0300
> ++++ firefox-11.0/ipc/chromium/src/base/file_util.h	2012-08-06 23:42:29.523183319 +0300
> +@@ -16,7 +16,9 @@
> + #include<sys/stat.h>
> + #elif defined(OS_POSIX)
> + #include<sys/types.h>
> ++#ifndef __UCLIBC__
> + #include<fts.h>

  Again, uClibc does have FTS support (disabled by default in
buildroot).

[snip]

> +diff -Naur firefox-11.0.org/js/src/ctypes/CTypes.cpp firefox-11.0/js/src/ctypes/CTypes.cpp
> +--- firefox-11.0.org/js/src/ctypes/CTypes.cpp	2012-08-06 15:09:42.909994396 +0300
> ++++ firefox-11.0/js/src/ctypes/CTypes.cpp	2012-08-06 23:45:09.691173699 +0300
> +@@ -473,6 +473,8 @@
> + static inline bool FloatIsFinite(jsdouble f) {
> + #ifdef WIN32
> +   return _finite(f) != 0;
> ++#elif __UCLIBC__
> ++  return isinf(f);

  This is unrelated to the rest of the patch - should probably go in
the isfinite patch.

> + #else
> +   return finite(f);
> + #endif
> +diff -Naur firefox-11.0.org/memory/mozalloc/mozalloc.cpp firefox-11.0/memory/mozalloc/mozalloc.cpp
> +--- firefox-11.0.org/memory/mozalloc/mozalloc.cpp	2012-08-06 15:09:42.968994393 +0300
> ++++ firefox-11.0/memory/mozalloc/mozalloc.cpp	2012-08-06 23:45:58.800170749 +0300
> +@@ -259,7 +259,7 @@
> +
> + #if defined(XP_MACOSX)
> +     return malloc_size(ptr);
> +-#elif defined(MOZ_MEMORY) || defined(XP_LINUX)
> ++#elif defined(MOZ_MEMORY) || defined(XP_LINUX)&&  !defined(__UCLIBC__)
> +     // XXX: the |defined(XP_LINUX)| may be too lax;  some Linux installations
> +     // might use a libc that doesn't have malloc_usable_size.  Let's fix this
> +     // if/when it happens.

  I would put this in a separate patch from the FTS stuff.

> diff --git a/package/firefox/firefox-11.0-uintptr_t.patch b/package/firefox/firefox-11.0-uintptr_t.patch
> new file mode 100644
> index 0000000..559b4c7
> --- /dev/null
> +++ b/package/firefox/firefox-11.0-uintptr_t.patch
> @@ -0,0 +1,12 @@
> +diff -Naur firefox-11.0.org/gfx/qcms/qcmstypes.h firefox-11.0/gfx/qcms/qcmstypes.h
> +--- firefox-11.0.org/gfx/qcms/qcmstypes.h	2012-08-06 15:09:44.189994318 +0300
> ++++ firefox-11.0/gfx/qcms/qcmstypes.h	2012-08-06 23:35:38.339208022 +0300
> +@@ -27,7 +27,7 @@
> + #ifdef __OS2__
> + /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
> + #include<stdlib.h>
> +-#elif !defined(__intptr_t_defined)&&  !defined(_UINTPTR_T_DEFINED)
> ++#elif !defined(__intptr_t_defined)&&  !defined(_UINTPTR_T_DEFINED)&&  !defined(__UCLIBC__)
> + typedef PRUptrdiff uintptr_t;

  Is this necessary? stdint.h defines __intptr_t_defined (at least in
0.9.32)

> + #endif
> + #endif
> diff --git a/package/firefox/firefox.mk b/package/firefox/firefox.mk
> new file mode 100644
> index 0000000..f501636
> --- /dev/null
> +++ b/package/firefox/firefox.mk
> @@ -0,0 +1,240 @@
> +#############################################################
> +#
> +# Mozilla Firefox
> +#
> +# Version:     11.0
> +# Authors:     Stefan Froberg
> +#
> +# Builds a very minimal binary with all the optional features
> +# stripped, except WebM.
> +#
> +# With WebM enabled you can watch *some* (but not all!)
> +# YouTube videos without Adobe Flash player
> +# http://www.youtube.com/results?search_query=web&webm=1
> +#
> +# Because Adobe Flash player plug-in is a glibc binary it
> +# will obviously not work with uClibc.
> +# (but maybe with nspluginwrapper ... )
> +#
> +# So the only real open source solution for playing flash videos
> +# with Firefox under uClibc will be gnash + lightspark combo.
> +# Lightspark handling the newer flash formats while falling back
> +# to gnash with older versions.
> +#
> +# Further, Adobe has recently stopped supporting Linux version of
> +# their plug-in but Google Chrome PPAPI might some day
> +# find it's way to firefox and save the day.
> +# http://www.phoronix.com/scan.php?page=news_item&px=MTEyNzc
> +#
> +# Used Linux From Scratch as a starting template for this file
> +# http://www.linuxfromscratch.org/blfs/view/svb/xsoft/firefox.html
> +#
> +# Note: Even tought the libnss and libnspr are marked as dependencies
> +# here I could not get them to work when building firefox.
> +# Seems that the configure script needs some patching ...
> +#
> +# So for now, untill somebody fixes this, instead of trying to
> +# use the buildroot system version of these libs the
> +# internal ones provided by the firefox tarball are used.

  Then remove libnss and libnspr from the dependencies (unless
they really are dependencies).  Do keep this comment, though.

  Similar for libpng.

> +#
> +#############################################################
> +FIREFOX_VERSION = 11.0
> +FIREFOX_SOURCE = firefox-$(FIREFOX_VERSION).source.tar.bz2
> +FIREFOX_SITE = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/source/

  Mozilla only keeps a few recent releases there.  Use
https://ftp.mozilla.org/...

> +FIREFOX_DEPENDENCIES = host-python alsa-lib cairo freetype jpeg libffi libgtk2 libnss libnspr libpng sqlite zlib
> +
> +ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_DEBUG),y)
> +FIREFOX_DEPENDENCIES += valgrind
> +define FIREFOX_ENABLE_DEBUG

  Since it does both enable and disable, it should be called
SET_DEBUG or something similar.

> +	echo "ac_add_options --enable-debug">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --enable-debug-symbols">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --disable-strip">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --enable-valgrind">>  $(FIREFOX_DIR)/mozconfig
> +endef
> +else
> +define FIREFOX_ENABLE_DEBUG
> +	echo "ac_add_options --disable-debug">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --disable-debug-symbols">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --enable-strip">>  $(FIREFOX_DIR)/mozconfig

  We normally do stripping directly in the target/ directory,
so unstripped binaries are still available in the build
directory.  So --disable-strip should be unconditional.  Unless
there are non-executable files that should be stripped as well
(only executable files are stripped by buildroot).

> +	echo "ac_add_options --disable-valgrind">>  $(FIREFOX_DIR)/mozconfig
> +endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_WEBM),y)
> +# Only x86 needs yasm
> +ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
> +FIREFOX_DEPENDENCIES += host-yasm
> +endif
> +define FIREFOX_ENABLE_WEBM
> +	echo "ac_add_options --enable-webm">>  $(FIREFOX_DIR)/mozconfig
> +endef
> +else
> +define FIREFOX_ENABLE_WEBM
> +	echo "ac_add_options --disable-webm">>  $(FIREFOX_DIR)/mozconfig
> +endef
> +endif
> +
> +#####################################################################
> +# Some post-install, optional default profile custom settings
> +# (extensions, secure default settings, language packs, flash etc...)
> +#####################################################################
> +
> +# General Info&  description of some Firefox extensions.
> +# Too large to put directly here.
> +include package/firefox/firefox_extensions.mk.in
> +
> +# My (IMHO) privacy enhanced about:config settings.
> +# Before you enable this feature please
> +# check prefs.js file
> +#
> +# Note: This will also install NoScript, Adblock Lite, Ghostery and
> +# HttpsEverywhere extensions

  This is already explained in the config option's help
text, so no need to repeat it here.

> +
> +ifeq ($(BR2_PACKAGE_FIREFOX_ULTRA_PARANOID),y)
> +define FIREFOX_ULTRA_PARANOID
> +	cp -i package/firefox/prefs.js $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/

  Use install -D -m 0644.

> +endef
> +endif
> +
> +ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
> +
> +# Because this setting will also install the extensions mentioned in
> +# package/firefox/firefox_extensions.mk.in we will need two
> +# additional tools: host-unzip and host-xmlstarlet
> +
> +FIREFOX_DEPENDENCIES += host-unzip host-xmlstarlet

  Then this should probably move to the extensions.mk, no?

> +
> +define FIREFOX_INSTALL_DEFAULT_EXTENSIONS
> +	$(call FIREFOX_INSTALL_EXTENSION,$(EXTENSION_SOURCE))
> +endef
> +endif

  It's very strange to have this line using two macros that are defined
in a different file...  Move it to the extensions.mk.

> +
> +# Installing selected langpack (en-US locale does not need any)	
> +ifneq ($(BR2_FIREFOX_LOCALE_EN_US),y)
> +
> +FIREFOX_LOCALE:=$(call qstrip,$(BR2_PACKAGE_FIREFOX_LOCALE))
> +FIREFOX_LOCALE_SOURCE:=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/linux-i686/xpi/$(FIREFOX_LOCALE).xpi

  linux-i686? Aren't xpis platform-independent?  Will this work on different targets
(with different endianness)?

> +
> +define FIREFOX_INSTALL_LANGPACK
> +	$(call DOWNLOAD,$(FIREFOX_LOCALE_SOURCE))
> +	cp $(DL_DIR)/$(FIREFOX_LOCALE).xpi $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/langpack-$(FIREFOX_LOCALE)@firefox.mozilla.org.xpi

  Use "install -D -m 0644" instead of cp.

> +	echo "user_pref(\"general.useragent.locale\",\"$(FIREFOX_LOCALE)\");">>  $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/prefs.js
> +endef
> +endif
> +
> +define FIREFOX_CUSTOM_DEFAULT_PROFILE
> +	mkdir -p $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile
> +	$(FIREFOX_ULTRA_PARANOID)
> +	$(FIREFOX_INSTALL_DEFAULT_EXTENSIONS)
> +	$(FIREFOX_INSTALL_LANGPACK)
> +endef

  If ULTRA_PARANOID isn't set but one of the other two is, will this still
work?  Or should there be a non-paranoid default prefs.js as well?

> +
> +FIREFOX_POST_INSTALL_TARGET_HOOKS += FIREFOX_CUSTOM_DEFAULT_PROFILE
> +
> +# Even thought Firefox uses autoconf it's configure process
> +# is not simple "configure&&  make&&  make install"
> +# but a lot more messier than that.
> +
> +define FIREFOX_CONFIGURE_CMDS
> +	# Copy the default mozconfig to source directory.

  Comments inside _CMDS blocks aren't very nice, because they're
interpreted by the shell (and printed on the console). Move the
comments before the _CMDS block - but most of them are unnecessary,
the code is self-explanatory.

> +	cp package/firefox/mozconfig $(@D)
> +
> +	# If you want to enable any extra build options like
> +	# DBus support, libnotify support, etc., then this
> +	# will be the right place to do it.
> +
> +	echo "ac_add_options --build=$(GNU_HOST_NAME)">>  $(FIREFOX_DIR)/mozconfig
> +	echo "ac_add_options --host=$(GNU_TARGET_NAME)">>  $(FIREFOX_DIR)/mozconfig
> +
> +	# Enable parallel building
> +	echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$(BR2_JLEVEL)\"">>  $(FIREFOX_DIR)/mozconfig

  That doesn't work if JLEVEL=0.  Use $(PARALLEL_JOBS).

> +
> +	$(FIREFOX_ENABLE_WEBM)
> +	$(FIREFOX_ENABLE_DEBUG)

  You could define a FIREFOX_AC_OPTIONS variable, and then do

	for option in $(FIREFOX_AC_OPTIONS); do \
		echo "ac_add_options $${option}" >> $(FIREFOX_DIR)/mozconfig; \
	done

  That simplifies the WEBM and DEBUG conditional blocks a bit.  And it would
make it easy to add things like $(DISABLE_IPV6) and $(SHARED_STATIC_LIBS_OPTS).


> +
> +	# Create the needed build directory that was defined in mozconfig file
> +	mkdir -p $(@D)/firefox-build-dir

  To keep things together, it's better to also do
	echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir" >> $(FIREFOX_DIR)/mozconfig
here.

> +endef
> +
> +
> +# Firefox needs SQLite to store it's configurations.
                                    ^^^^ its

> +# Further the SQLite must be build with SQLITE_SECURE_DELETE, SQLITE_THREADSAFE,
> +# SQLITE_ENABLE_FTS3 and SLITE_ENABLE_UNLOCK_NOTIFY enabled.
> +#
> +# However, even if you *do* have these things enabled the damn configure
> +# script says that they are not. So I had to force the correct settings.
> +#
> +# Even worse, it seems that the script does not respect even
> +# pkg-config variables (see below) to find the buildroot version of SQLite
> +# but insist of using *host* SQLite library.
> +#
> +# Luckily, in the actual linking time, the correct libraries seem to be used.
> +
> +define FIREFOX_BUILD_CMDS
> +
> +	# Picked the PKG_ variable suggestions from:
> +	# http://www.flameeyess.eu/autotools-mythbuster/pkgconfig/cross-compiling
> +	#
> +	# With these settings, *most* of the buildroot system libs were found.
> +	# With the exception of SQLite, NSS and NSPR.
> +
> +	# Had to enforce HOST_CC, CC_FOR_BUILD and HOST_CXX because
> +	# the configure would not get them right.

  Again, move the comments outside (and remove the duplicates).

> +
> +	(cd $(@D); \
> +		sed -i 's# ""##' browser/base/Makefile.in&&  \

  Huh?  That merits some comment to explain why it is needed...
Also it fits better in a POST_PATCH_HOOK than here.

> +		ac_cv_sqlite_secure_delete=yes \
> +		ac_cv_sqlite_threadsafe=yes \
> +		ac_cv_sqlite_enable_fts3=yes \
> +		ac_cv_sqlite_enable_unlock_notify=yes \

  It's nicer to put all these in FIREFOX_CONF_ENV, for
consistency with $(autotools-package).

> +		HOST_CC=gcc \
> +		CC_FOR_BUILD=gcc \
> +		HOST_CXX=g++ \

  These already are in mozconfig, and also in TARGET_CONFIGURE_OPTS.
Well, except that TARGET_CONFIGURE_OPTS uses the absolute path
and adds ccache to it.  Or maybe the firefox build has a problem
with ccache? Then it should use $(HOSTCC_NOCCACHE) instead of plain
gcc/g++.

> +		PKG_CONFIG_DIR= \
> +		PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \
> +		PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
> +		PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)"\

  These shouldn't do anything, because our pkg-config already uses the
correct paths.  Unless firefox doesn't use our pkg-config,
which would explain all the problems you have - in that case, firefox
needs to be patched to use the correct pkg-config.


> +		$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) CXXFLAGS="$(TARGET_CXXFLAGS) -fvisibility=hidden -fvisibility-inlines-hidden" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -f client.mk )
> +
> +endef
> +
> +define FIREFOX_INSTALL_TARGET_CMDS
> +	# This will create a firefox installation tarball
> +	(cd $(@D); \
> +	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C firefox-build-dir/browser/installer )
> +
> +	# Make nice new clean home for our firefox and extract it there
> +	rm -rf $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \

  No need to join the lines with && here - newline is good enough.

  $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) is used quite
a lot, maybe abbreviate it to $(FIREFOX_INSTALL_DIR)

> +	mkdir $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \
> +	tar -xvf $(@D)/firefox-build-dir/dist/firefox-$(FIREFOX_VERSION).en-US.linux-*.tar.bz2 -C $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) --strip-components=1

  Remove the -v from tar - it's useful while debugging
but unneeded once it's finished. And it's better to use
$(TAR) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -f ... -C ...

> +	
> +	# Make some symlinks to firefox binary and plugins directory
> +	(cd $(TARGET_DIR)/usr/bin&&  \
> +	ln -sfv ../lib/firefox-$(FIREFOX_VERSION)/firefox .&&  \

  Don't cd, but just
	ln -sf ../lib/firefox-$(FIREFOX_VERSION)/firefox $(TARGET_DIR)/usr/bin

  And again, remove -v

> +	mkdir -pv $(TARGET_DIR)/usr/lib/mozilla/plugins&&  \

  No && needed

> +	cd $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \
> +	ln -sfv ../mozilla/plugins .&&  \

	ln -sf ../mozilla/plugins $(FIREFOX_INSTALL_DIR)

> +	chown -R -v root:root $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) )

  This is bad. You shouldn't build buildroot as root, but as
a normal user. At the end, when putting everything together
in the filesystem, buildroot will chown everything to root
using fakeroot, so it can be done without actual root access
on the build machine.

  In short: remove that line.

> +
> +	# Using strace revealed that for some strange reason the firefox is looking these
> +	# from /usr/lib and not from /usr/lib/$(FIREFOX_VERSION) like the rest of the files.
> +	# That's why I had to use symlinks to make it start.
> +
> +	(cd $(TARGET_DIR)/usr/lib&&  \
> +	ln -sfv firefox-$(FIREFOX_VERSION)/libxul.so .&&  \
> +	ln -sfv firefox-$(FIREFOX_VERSION)/libmozjs.so .&&  \
> +	ln -sfv firefox-$(FIREFOX_VERSION)/libmozalloc.so . )

	ln -sf firefox-$(FIREFOX_VERSION)/libxul.so $(TARGET_DIR)/usr/lib
  and no &&.

> +
> +	# For gnash support
> +	rm -rf $(STAGING_DIR)/usr/include/npapi
> +	mkdir -v $(STAGING_DIR)/usr/include/npapi	
> +	cp -v $(FIREFOX_DIR)/dom/plugins/base/*.h $(STAGING_DIR)/usr/include/npapi

  This should be in INSTALL_STAGING_CMDS, and you should define
FIREFOX_INSTALL_STAGING = YES

> +
> +endef
> +
> +$(eval $(generic-package))
> +
> +
> +
> +
> +

  Get rid of those empty lines at the end of the file.
I got some whitespace errors when applying the patch series,
so there are probably some spaces at the end of some lines as
well.

> diff --git a/package/firefox/firefox_extensions.mk.in b/package/firefox/firefox_extensions.mk.in
> new file mode 100644
> index 0000000..8c8fa3d
> --- /dev/null
> +++ b/package/firefox/firefox_extensions.mk.in
> @@ -0,0 +1,168 @@
> +#############################################################
> +# Extensions
> +#
> +# General Info:
> +#
> +# Firefox extensions are nothing more than ordinary zip-files with .xpi file extension.
> +#
> +# If you want to add your own default extension(s) to your default firefox profile
> +# then you basically have to:
> +# - download the extension file
> +# - get the extension id from that file with the help of xmlstarlet tool
> +# - unzip the extension file to /usr/lib/firefox-$(FIREFOX_VERSION/extensions/$(EXTENSION_ID)
> +#
> +# For more information of global extension installation look at:
> +# http://kb.mozillazine.org/Installing_extensions#Global_installation
> +#
> +# For information of how to get the extension id (needs unzip and xmlstarlet) look at:
> +# http://kb.mozillazine.org/Determine_extension_ID
> +#
> +# Note that this process will only *install* your extensions to your default firefox profile.
> +# It will not *enable* them by default.
> +# You have to do it manually afterwards from Firefox Add-ons menu.
> +#
> +# There is an "extensions.enabledAddons" setting in about:config
> +# but it's no use if you try to set it in pref.js file.
> +# It seems it's a read-only setting and it will be updated each
> +# time after you have manually enabled your installed extensions/language packs
> +# from Add-ons menu.
> +#
> +# The messy way to enable your extensions by default with each build would be:
> +#
> +# - Start your firefox at least once and then enable all your extensions manually
> +#
> +# - Do all the necessary setting you need for your extensions/langpacks
> +# (like Adblock Lite subscriptions, default language etc..)
> +#
> +# - Go to your $HOME/.mozilla/firefox/some_random_chars.default/ folder and copy
> +# at least the files starting with extensions.* (and maybe also addons.*)
> +# to package/firefox/extensions buildroot folder.
> +# To make sure, it's generally better to copy *all* files&  directories from
> +# $HOME/.mozilla/firefox/some_random_chars.default/ folder to
> +# packge/firefox/extensions
> +#
> +# - Add buildroot option that will copy all those saved custom settings from
> +# package/firefox/extensions folder in FIREFOX_POST_INSTALL_TARGET_HOOKS phase
> +# (or alternativaly, at the end of the FIREFOX_INSTALL_TARGET_CMDS)
> +# to $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions
> +#
> +# This seems to be the only way to *enable* extensions by default because
> +# firefox keep's track of extensions in SQLite database (like extensions.sqlite file)
> +# and not in easily editable/patchable text files :-(

  IIRC the .sqlite file is machine-specific, so this has to be done on
the target. May be worth adding that to the comment.

> +#
> +# Next comes four privacy/security related extensions.
> +#
> +
> +# Name:		NoScript
> +# Version:	2.5.3
> +# Home:		http://noscript.net
> +# Download URL:	http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi
> +# Description:	"NoScript for Firefox pre-emptively blocks malicious scripts
> +# 		and allows JavaScript, Java, Flash and other potentially dangerous
> +# 		content only from sites you trust.
> +# 		NoScript also provides the most anti-XSS and anti-Clickjacking
> +#		protection ever available in a browser."

  This whole comment is redundant: the description and homepage
are already in the Config.in help text, the download URL is
below.  Same goes for the other extensions.

> +
> +ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT),y)
> +EXTENSION_SOURCE+=http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi

  May be worthwhile to split into

FIREFOX_EXTENSION_NOSCRIPT_VERSION = 2.5.3
FIREFOX_EXTENSION_NOSCRIPT_SITE    = http://releases.mozilla.org/pub/mozilla.org/addons/722
FIREFOX_EXTENSION_NOSCRIPT_SOURCE  = noscript-$(FIREFOX_EXTENSION_NOSCRIPT_VERSION)-fx+fn+sm.xpi

for consistency with other packages.

  Then you can add

FIREFOX_EXTENSION-$(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT) += NOSCRIPT

  and use my rewrite below

[snip]

> +ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)

  This condition is redundant AFAICS.

> +
> +UNZIP=$(HOST_DIR)/usr/bin/unzip
> +XMLSTARLET=$(HOST_DIR)/usr/bin/xml
> +
> +define	FIREFOX_INSTALL_EXTENSION
> +	
> +# Do multi-download, get extension id for each downloaded file
> +# and finally unzip it to
> +# $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/${EXTENSION_ID}
> +#
> +# Inner guts copied from package/pkg-download.mk DOWNLOAD_WGET
> +# Thanks to Yann and Thomas for helping with that $${i##*/} thing!
> +
> +	for i in $(EXTENSION_SOURCE);do \
> +		FILENAME=$${i##*/} ;\
> +		test -e $(DL_DIR)/$${FILENAME} || \
> +		$(WGET) -O $(DL_DIR)/$${FILENAME} $${i} || \
> +		(rm -f $(DL_DIR)/$${FILENAME} ; exit 1) ;\
> +		EXTENSION_ID=`$(UNZIP) -qc $(DL_DIR)/$${FILENAME} install.rdf | $(XMLSTARLET) sel \
> +		-N rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# \
> +		-N em=http://www.mozilla.org/2004/em-rdf# \
> +		-t -v \
> +		"//rdf:Description[@about='urn:mozilla:install-manifest']/em:id"` ;\
> +		$(UNZIP) -d $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/$${EXTENSION_ID} $(DL_DIR)/$${FILENAME};\
> +	done	
> +
> +endef
> +endif

  Alternative:

# Download and install a firefox extension.
# The extension is defined by FIREFOX_EXTENSION_FOO_SITE and FIREFOX_EXTENSION_FOO_SOURCE
# Argument 1 is the extension name, FOO.
define FIREFOX_INSTALL_EXTENSION
	$(call DOWNLOAD,$(FIREFOX_EXTENSION_$(1)_SITE),$(FIREFOX_EXTENSION_$(1)_SOURCE))
	EXTENSION_ID="$$($(UNZIP) -qc $(DL_DIR)/$(FIREFOX_EXTENSION_$(1)_SOURCE) | \
		$(XMLSTARLET) sel -t \
			-N rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# \
			-N em=http://www.mozilla.org/2004/em-rdf# \
			-v "//rdf:Description[@about='urn:mozilla:install-manifest']/em:id")"; \
	$(UNZIP) -d $(FIREFOX_INSTALL_DIR)/extensions/$${EXTENSION_ID} $(DL_DIR)/$(FIREFOX_EXTENSION_$(1)_SOURCE)
endef

define FIREFOX_INSTALL_EXTENSIONS
	$(foreach ext,$(FIREFOX_EXTENSION-y),$(call FIREFOX_INSTALL_EXTENSION,$(ext))$(sep))
endef

FIREFOX_POST_INSTALL_TARGET_HOOKS += FIREFOX_INSTALL_EXTENSIONS


  (Untested, of course, and I admit there's a bit of make magickery in there.)

[snip]
> diff --git a/package/firefox/prefs.js b/package/firefox/prefs.js
> new file mode 100755
> index 0000000..7cbf675
> --- /dev/null
> +++ b/package/firefox/prefs.js

  Since this one is only used with the PARANOID config, perhaps it
should be called prefs.paranoid.js?

> @@ -0,0 +1,100 @@
> +# Mozilla User Preferences
> +
> +# Most of the settings below are documented in
> +# http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
> +#
> +# Those entries that are not documented (tagged UNDOCUMENTED) are
> +# the ones I found out when playing with various
> +# Firefox Privacy settings and then checking afterwards
> +# from the about:config URL what had changed.

  A bit a general remark: you use the first person ("I") a couple
of times. OK with me, but remember that your authorship will be
less evident in the files themselves.  So maybe it's better to
explicitly mention your name there.

> +
> +# If you have more information about these entries please update.
> +
> +########################
> +# Performance settings #
> +########################
> +
> +# Enable pipelining
> +user_pref("network.http.pipelining",true);
> +user_pref("network.http.pipelining.agressive",true);
> +user_pref("network.http.pipelining.ssl",true);
> +user_pref("network.http.proxy.pipelining",true);
> +
> +###############################
> +# Privacy&  Security settings #
> +###############################
> +
> +# When to remove downloaded files entries from the Download Manager
> +#	0: Upon successful download
> +#	1: When the browser exits
> +#	2 (default): Manually
> +user_pref("browser.download.manager.retention",1);
> +
> +# Don't save information entered in web page forms and the Search Bar
> +user_pref("browser.formfill.enable",false);
> +
> +# Automatically Start in Private Browsing Mode
> +user_pref("browser.privatebrowsing.autostart",true);
> +
> +# Windows may not be moved or resized via JavaScript
> +user_pref("dom.disable_window_move_resize",true);
> +
> +# Webpages will not be able to affect the context menu event,
> +# thus allowing to access the context menu all the time
> +user_pref("dom.event.contextmenu.enabled",false);
> +
> +# Is location aware browsing enabled? Default setting *was* 'true' (Jesus Christ!)
> +user_pref("geo.enabled",false);
> +
> +# Allow cookies from originating server only
> +user_pref("network.cookie.cookieBehavior",1);
> +
> +# Accept cookies for session only
> +user_pref("network.cookie.lifetimePolicy",2);
> +
> +# Consult current preferences for cookie prefs
> +user_pref("network.cookie.prefsMigrated",true);
> +
> +# Perform all DNS lookups on remote proxy server
> +# NOTE: It has *still* (8th of June 2012) not been fixed!
> +# ( see Bug 134105 https://bugzilla.mozilla.org/show_bug.cgi?id=134105 )
> +user_pref("network.proxy.socks_remote_dns",true);
> +
> +# Only important if you are using Tor. Might be fixed by now
> +# ( see https://trac.torproject.org/projects/tor/ticket/5741 )
> +user_pref("network.websocket.enabled",false);
> +
> +# UNDOCUMENTED
> +# Not documented by Mozilla but my best guess is that this disables browser history :-)
> +user_pref("places.history.enabled",false);
> +
> +# UNDOCUMENTED
> +# Not documented by Mozilla (what the heck are offline apps???)
> +user_pref("privacy.clearOnShutdown.offlineApps",true);
> +
> +# UNDOCUMENTED
> +# Not documented by Mozilla (but should be obvious :-) )
> +user_pref("privacy.clearOnShutdown.passwords",true);
> +
> +# UNDOCUMENTED
> +# Not documented by Mozilla (???)
> +user_pref("privacy.clearOnShutdown.siteSettings",true);
> +
> +# UNDOCUMENTED
> +# Not documented by Mozilla but this is clearly the
> +# Do-not-track feature from Firefox privacy settings
> +user_pref("privacy.donottrackheader.enabled",true);
> +
> +# Delete all cookies when using the Firefox Clear Private Data feature
> +user_pref("privacy.item.cookies",true);
> +
> +# Perform the Firefox Clear Private Data operation when closing the browser
> +user_pref("privacy.sanitize.sanitizeOnShutdown",true);
> +
> +
> +
> +
> +
> +
> +
> +

  Remove those empty lines at the end.


  Phew, glad I managed to finish this review :-)

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-17 22:31   ` Arnout Vandecappelle
@ 2012-09-18 15:48     ` Stefan Fröberg
  2012-09-18 21:25       ` Arnout Vandecappelle
  2012-09-19  1:35     ` Stefan Fröberg
  1 sibling, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-18 15:48 UTC (permalink / raw)
  To: buildroot

Hello Arnout

18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
> On 09/05/12 16:29, Stefan Fr?berg wrote:
>> Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
>
>  First a general remark: it would be better to split this patch up in
> smaller
> chunks.  It took me a week to review it (not full-time, of course), and
> iterations on the patch will again take a lot of time to review.  By
> splitting them up, individual patches can be acked and don't need to
> be looked at again.
>
>  The first patch should add a minimal firefox, without any additional
> config options.  It should just work with both glibc-based and uclibc-
> based toolchains.
>
>  Next patches should add a feature/extension, one at a time.
> Probably starting with debug and webm, and continuing with extensions
> that download XPIs.
>
>
>  Another overall remark: I think it's better to make separate packages
> for the extensions, langpacks, etc. (xpis, in short).  The firefox.mk
> can define some generic infrastructure which can be used by the extension
> packages.  The extension's .mk would be something like:
>
> FIREFOX_LANGPACK_XX_SITE = $(FIREFOX_LANGPACK_SITE)
> FIREFOX_LANGPACK_XX_SOURCE = xx.xpi
>
> FIREFOX_LANGPACK_XX_EXTRACT_CMDS =
>
> define FIREFOX_LANGPACK_XX_INSTALL_TARGET_CMDS
>     install -D -m 0644 $(DL_DIR)/$($(PKG)_SOURCE)
> $(FIREFOX_EXTENSIONS_DIR)/langpack-xx.xpi
> endef
>
> $(eval $(generic-package))
>
>  Could be even simpler with a $(firefox-package) wrapper.   
>
>  Admittedly, this step is non-trivial, so I'm OK with leaving the
> extensions
> part of the firefox package for the time being.
>
>
>
>  I build-tested on a few platforms.  On an ARM with Linaro-hardfloat
> toolchain,
> some assembly function failed in nspr - but libnspr fails as well with
> that
> toolchain.  On a MIPS, I needed the patch from
> https://bugzilla.mozilla.org/show_bug.cgi?id=691898
> to avoid compiling pcre.  But in the end, the compilation with a glibc
> toolchain
> still failed because of the -D_FILE_OFFSET_BITS=64 from LARGEFILE.
> This requires
> -U_FILE_OFFSET_BITS to be added to CFLAGS/CXXFLAGS.
>
>  In the end, I didn't get it to compile on either the ARM or the MIPS
> config, so
> I gave up...  But there's already plenty of material below to keep you
> busy
> for a while :-)
>
>
Oh my god.
I bet it will take me several weeks (or maybe even month or more) to fix
all these things ...
And because I don't have any other machines than x86  I can't test with
ARM or MIPS
> [snip]
>
>
>  Phew, glad I managed to finish this review :-)
>
>  Regards,
>  Arnout

Thank you so much! You have done a wonderful job!
I really really really appreciate it.

**Best regards
Stefan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120918/7daa1c82/attachment-0001.html>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-18 15:48     ` Stefan Fröberg
@ 2012-09-18 21:25       ` Arnout Vandecappelle
  2012-09-19  1:39         ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-18 21:25 UTC (permalink / raw)
  To: buildroot

On 09/18/12 17:48, Stefan Fr?berg wrote:
> And because I don't have any other machines than x86  I can't test with ARM or MIPS

  You can do a build-test.  And if you really want, you can try to run it
in QEMU.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-17 22:31   ` Arnout Vandecappelle
  2012-09-18 15:48     ` Stefan Fröberg
@ 2012-09-19  1:35     ` Stefan Fröberg
  2012-09-19  6:03       ` Arnout Vandecappelle
  1 sibling, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-19  1:35 UTC (permalink / raw)
  To: buildroot


18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
>
> [snip]
>> diff --git a/package/firefox/Config.in b/package/firefox/Config.in
>> new file mode 100644
>> index 0000000..fbd4749
>> --- /dev/null
>> +++ b/package/firefox/Config.in
>> @@ -0,0 +1,417 @@
>> +config BR2_PACKAGE_FIREFOX
>> +    bool "firefox"
>> +    select BR2_PACKAGE_ALSA_LIB
>> +    select BR2_PACKAGE_CAIRO
>> +    select BR2_PACKAGE_CAIRO_TEE
>> +    select BR2_PACKAGE_FREETYPE
>> +    select BR2_PACKAGE_JPEG
>> +    select BR2_PACKAGE_LIBGTK2
>
>  Without Yann's _AVAILABLE series, you need to explicitly
> depend on the dependencies of libgtk2 (and cairo but
> that's implied):
>
>         depends on BR2_USE_WCHAR # glib2
>         depends on BR2_INSTALL_LIBSTDCPP # pango
>
>  And there should be a comment to warn about it
> if WCHAR and LIBSTDCPP are not available.
>
Uh???? Sorry but what is this new  _AVAILABLE series you mentioned ?

>> +    select BR2_PACKAGE_LIBFFI
>> +    select BR2_PACKAGE_LIBNSS
>> +    select BR2_PACKAGE_LIBNSPR
>> +    select BR2_PACKAGE_LIBPNG
>
>  I thought the internal implementations of these three were used?
>
Yes, at currently nss, nspr and especially libpng (because it needs apng
feature patch) internal versions are used but
mind you that my version of buildroot is little outdated.

So maybe buildroot versions of nss and nspr will now be correctly
detected and linked against with firefox.

At least what I think seeing from the mailing list is that nspr and
nss(?) got some new changes (they were missing .pc files?).
So maybe they work now.

>> +    select BR2_PACKAGE_SQLITE
>> +    select BR2_PACKAGE_SQLITE_ENABLE_FTS3
>> +    select BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
>> +    select BR2_PACKAGE_SQLITE_SECURE_DELETE
>> +    select BR2_PACKAGE_ZLIB
>> +    depends on BR2_PACKAGE_PYTHON
>
>  Ugh...  Firefox depends on Python?  But in the .mk file it just
> says host-python, so this is probably a mistake...
>
>
My bad. What I meant is that firefox uses host-python (with
--enable-unicodedata) for some parts of the build process.

>  Missing dependencies:
>     depends on BR2_PACKAGE_XSERVER_xorg # mesa3d
>     select BR2_PACKAGE_XLIB_LIBXT
>     select BR2_PACKAGE_MESA3D
>
> (and add xlib_libXt and mesa3d to the _DEPENDENCIES in the .mk file)
>
Ok

>> +    help
>> +      Mozilla Firefox Web Browser
>> +
>> +     
>> http://releases.mozilla.org/pub/mozilla.org/firefox/releases/11.0/source/
>
>  The URL here should not point to the source.  Developer page is more
> appropriate, or perhaps the release notes.
>
Ok

>> +
>> +if BR2_PACKAGE_FIREFOX
>> +
>> +config BR2_PACKAGE_FIREFOX_ENABLE_DEBUG
>> +    bool "Enable debug build and Valgrind integration hooks"
>> +    select BR2_PACKAGE_VALGRIND if BR2_TOOLCHAIN_BUILDROOT&& 
>> BR2_GCC_ENABLE_TLS
>
>  Let me get this clear: if you're using a glibc-based or
> crosstool-NG-generated uclibc toolchain with TLS, valgrind.h
> is not needed?
>
>  In other words: shouldn't this just select valgrind unconditionally?
>
You might be right. I have always used only uclibc-based, buildroot
provided toolchain.
So in other words: I have no clue what will happen in other toolchains

>> +    help
>> +        This enables debug support.
>> +        If you are using buildroot toolchain and your gcc has TLS
>> enable then
>> +        this will also enable Valgrind integration hooks.
>
>  Help text should be indented with 1 tab + 2 spaces and
> word-wrapped at 80 columns (tab counts for 8).
>
>  Same goes for the rest of the help texts.
>
>
>> +
>> +config BR2_PACKAGE_FIREFOX_ENABLE_WEBM
>> +    bool "Enable WebM"
>> +    select BR2_PACKAGE_YASM if BR2_i386 || BR2_x86_64
>> +    help
>> +        WebM is an audio-video format designed to provide
>> royalty-free, open video compression
>> +        for use with HTML5 video. The project's development is
>> sponsored by Google inc.
>> +
>> +        A WebM file consist of VP8 video and Vorbis audio streams,
>> in a container based on
>> +        a profile of Matroska. The project releases WebM related
>> software under a BSD license and
>> +        all users are granted a worldwide, non-exclusive,
>> non-charge, royalty-free patent license.
>> +
>> +        WebM is one way of watching YouTube videos without
>> proprietary Adobe Flash.
>> +        After you have installed WebM enabled Firefox you can try it
>> by visiting the following link:
>> +
>> +        http://www.youtube.com/results?search_query=web&webm=1
>> +
>> +config BR2_PACKAGE_FIREFOX_ULTRA_PARANOID
>> +    bool "Enable Ulta-paranoid settings"
>
>  Do you think this option is useful for many buildroot users?  I
> think most users will let firefox run full-screen at boot time,
> pointing to one and only one site, with no UI for changing URL.
> An option to provide *that* would be useful :-)
>
You mean that WebM ? I think it's kinda cool option. :-)
To watch videos without flash.
But of course, being YouTube only it's usefulness is quite limited now....
>> +    select BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    select BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
>> +    select BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
>> +    select BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
>> +    select BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
>> +    help
>> +        This enables my (IMHO) ultra-private custom settings.
>> +        The changed settings appear bold when typing about:config
>> into your browser address bar.
>> +
>> +        Most (but not all!) are documented in
>> +        http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
>> +
>> +        For more info of these entries please take a look at
>> package/firefox/prefs.js file.
>> +
>> +        By selecting this option you are also enabling pipelining
>> for your browser.
>> +
>> +        Below is a short summary of settings changed:
>> +       
>> +            network.http.pipelining = true;
>> +            network.http.pipelining.aggressive = true;
>> +            network.http.pipelining.ssl = true;
>> +            network.http.proxy.pipelining = true;
>> +            browser.download.manager.retention = 1;
>> +            browser.formfill.enable = false;
>> +            browser.privatebrowsing.autostart = true;
>> +            dom.disable_window_move_resize = false;
>> +            dom.event.contextmenu.enabled = false;
>> +            geo.enabled = false;
>> +            network.cookie.cookieBehavior = 1;
>> +            network.cookie.lifetimePolicy = 2;
>> +            network.cookie.prefsMigrated = true;
>> +            network.proxy.socks_remote_dns = true;
>> +            network.websocket.enabled = false;
>> +            places.history.enabled = false;
>> +            privacy.clearOnShutdown.offlineApps = true;
>> +            privacy.clearOnShutdown.passwords = true;
>> +            privacy.clearOnShutdown.siteSettings = true;
>> +            privacy.donottrackheader.enabled = true;
>> +            privacy.item.cookies = true;
>> +            privacy.sanitize.sanitizeOnShutdown = true;
>> +
>> +            Note:
>> +            By selecting this option you are also enabling the
>> following privacy/security related
>> +            extensions: NoScript, Adblock Lite, Ghostery&  HTTPS
>> Everywhere
>> +
>> +config BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    bool "Enable installing of selected default extensions"
>> +    help
>> +        This option will enable you to select default extensions to
>> +        be installed when building Firefox.
>> +
>> +        Note: The selected extensions are only *installed*.
>> +        They are not *enabled* by default.
>> +        For that you have to manually enable them after starting you
>> +        freshly build Firefox.
>
>  built.
>
>  The logic is reversed here, if you ask me. INSTALL_DEFAULT_EXTENSIONS
> should select the default extensions, but the default extensions
> shouldn't
> depend on it.  Or, if the idea is to make a submenu for the extensions,
> it should be a menuconfig. But since there are only four extensions, I
> don't think it's worth making a menuconfig for that.
>
Yeah, that's what I had in mind. A menu option where user could decide
if he/she
want's any default extensions installed and then it would take him/her
to list
of extensions to install.
>  I propose to just remove the DEFAULT_EXTENSIONS symbol.
>
>> +
>> +config BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT
>> +    bool "Install NoScript extensions"
>> +    depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    help
>> +        NoScript for Firefox pre-emptively blocks malicious scripts
>> +        and allows JavaScript, Java, Flash and other potentially
>> dangerous
>> +        content only from sites you trust.
>> +
>> +        NoScript also provides the most anti-XSS and anti-Clickjacking
>> +        protection ever available in a browser
>> +
>> +        http://noscript.net
>> +
>> +config BR2_PACKAGE_FIREFOX_EXTENSION_ADBLOCK_LITE
>> +    bool "Install Adblock Lite extension"
>> +    depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    help
>> +        Adblock Lite is a fork of the Adblock Plus version 1.3.10
>> (classic UI)
>> +        extension for blocking advertisements on the web.
>> +        This fork will provide the same features as Adblock Plus 2.x
>> and higher
>> +        while keeping the old UI but without acceptable ads feature.
>> +
>> +        https://bitbucket.org/adstomper/adblocklite
>> +
>> +config BR2_PACKAGE_FIREFOX_EXTENSION_GHOSTERY
>> +    bool "Install Ghostery extension"
>> +    depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    help
>> +        Protect your privacy. See who's tracking your web browsing and
>> +        block them with Ghostery.
>> +
>> +        http://www.ghostery.com
>> +
>> +config BR2_PACKAGE_FIREFOX_EXTENSION_HTTPS_EVERYWHERE
>> +    bool "Install HTTPS Everywhere extension"
>> +    depends on BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    help
>> +        HTTPS Everywhere is a Firefox and Chrome extension
>> +        that encrypts your communications wit many major
>> +        websites, making your browsing more secure.
>> +
>> +        https://www.eff.org/https-everywhere
>> +
>> +config BR2_PACKAGE_FIREFOX_PLUGIN_GNASH
>> +    source "package/gnash/Config.in"
>
>  The config symbol should be inside the sourced Config.in.  Also,
> I think it should be included from packages/Config.in.
>
You mean that it should be possible to enable building gnash flash
plugin outside of firefox ?

>> +
>> +choice
>> +    default BR2_PACKAGE_FIREFOX_LOCALE_EN_US
>> +    prompt "Select locale"
>
>  Ideally, it should be possible to select several languages.
> But you can leave it as is for the time being - can be added
> later.
>
Ok
> [snip]
>
>> diff --git a/package/firefox/firefox-11.0-NativeWindowHandle.patch
>> b/package/firefox/firefox-11.0-NativeWindowHandle.patch
>> new file mode 100644
>> index 0000000..bced599
>> --- /dev/null
>> +++ b/package/firefox/firefox-11.0-NativeWindowHandle.patch
>
>  This patch misses some explanation + a signed-off-by tag.
> (Same for the other patches.)
>
>  Also, try to upstream the patches if possible.
>

Ok. I try to contact them.

>  Also, patch names are preferably of the format
> firefox-0001-NativeWindowHandle.patch
> (i.e. without the version, and with a numbering scheme to
> clarify the order in which they should be applied).
>
>> @@ -0,0 +1,12 @@
>> +diff -Naur firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h
>> firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h
>> +--- firefox-11.0.org/dom/plugins/ipc/PluginMessageUtils.h   
>> 2012-09-04 22:20:07.086923927 +0300
>> ++++ firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h    2012-09-04
>> 22:23:45.195922486 +0300
>> +@@ -131,7 +131,7 @@
>> + typedef HWND NativeWindowHandle;
>> + #elif defined(MOZ_X11)
>> + typedef XID NativeWindowHandle;
>> +-#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT)
>> ++#elif defined(XP_MACOSX) || defined(ANDROID) ||
>> defined(MOZ_WIDGET_QT) || defined(MOZ_DFB)
>> + typedef intptr_t NativeWindowHandle; // never actually used, will
>> always be 0
>> + #else
>> + #error Need NativeWindowHandle for this platform
>> diff --git a/package/firefox/firefox-11.0-execinfo.patch
>> b/package/firefox/firefox-11.0-execinfo.patch
>> new file mode 100644
>> index 0000000..cacd7a1
>> --- /dev/null
>> +++ b/package/firefox/firefox-11.0-execinfo.patch
>> @@ -0,0 +1,45 @@
>> +diff -Naur
>> firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc
>> firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc
>> +--- firefox-11.0.org/ipc/chromium/src/base/debug_util_posix.cc   
>> 2012-08-06 15:09:43.325994371 +0300
>> ++++ firefox-11.0/ipc/chromium/src/base/debug_util_posix.cc   
>> 2012-08-06 23:30:33.750226316 +0300
>> +@@ -5,7 +5,7 @@
>> + #include "build/build_config.h"
>> + #include "base/debug_util.h"
>> +
>> +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID)&& 
>> !defined(__OpenBSD__))
>> ++#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID)&& 
>> !defined(__OpenBSD__)&&  !defined(__UCLIBC__) )
>> +
>> + #include<errno.h>
>> + #include<fcntl.h>
>
>  uClibc does have backtrace functionality, but only if BACKTRACE is
> configured
> (and it's not in buildroot's default). Make sure that this is
> mentioned in the
> patch description, so it is easier in the future to add support for it
> when
> available.
>
Oh? I didn't know that uClibc has backtrace option.

>  (Note that it's necessary to link with libubacktrace so it probably
> won't work out-of-the-box.)
>
Ah, I see.

> [snip]
>
>> diff --git a/package/firefox/firefox-11.0-isfinite.patch
>> b/package/firefox/firefox-11.0-isfinite.patch
>> new file mode 100644
>> index 0000000..87c024d
>> --- /dev/null
>> +++ b/package/firefox/firefox-11.0-isfinite.patch
>> @@ -0,0 +1,22 @@
>> +diff -Naur firefox-11.0.org/xpcom/ds/nsMathUtils.h
>> firefox-11.0/xpcom/ds/nsMathUtils.h
>> +--- firefox-11.0.org/xpcom/ds/nsMathUtils.h    2012-08-06
>> 15:09:49.059994026 +0300
>> ++++ firefox-11.0/xpcom/ds/nsMathUtils.h    2012-08-06
>> 23:32:57.771217662 +0300
>> +@@ -42,6 +42,9 @@
>> +
>> + #include "nscore.h"
>> + #include<math.h>
>> ++#ifdef    __UCLIBC__
>> ++#include<cmath>
>> ++#endif
>> + #include<float.h>
>> +
>> + #ifdef SOLARIS
>> +@@ -134,6 +137,8 @@
>> +     // Darwin has deprecated |finite| and recommends |isfinite|.
>> The former is
>> +     // not present in the iOS SDK.
>> +     return isfinite(d);
>> ++#elif __UCLIBC__
>> ++    return std::isfinite(d);
>
>  isfinite() is in math.h, so what's the point of getting it from cmath?
>
Yes, I know but for some reason it didn't work out.
So I had to "hack it" out.
I will build it again and check the specific error message.
>> + #else
>> +     return finite(d);
>> + #endif
>> diff --git a/package/firefox/firefox-11.0-uclibc.patch
>> b/package/firefox/firefox-11.0-uclibc.patch
>> new file mode 100644
>> index 0000000..3d1b1a0
>> --- /dev/null
>> +++ b/package/firefox/firefox-11.0-uclibc.patch
>> @@ -0,0 +1,112 @@
>> +diff -Naur firefox-11.0.org/ipc/chromium/src/base/file_util.h
>> firefox-11.0/ipc/chromium/src/base/file_util.h
>> +--- firefox-11.0.org/ipc/chromium/src/base/file_util.h    2012-08-06
>> 15:09:43.333994370 +0300
>> ++++ firefox-11.0/ipc/chromium/src/base/file_util.h    2012-08-06
>> 23:42:29.523183319 +0300
>> +@@ -16,7 +16,9 @@
>> + #include<sys/stat.h>
>> + #elif defined(OS_POSIX)
>> + #include<sys/types.h>
>> ++#ifndef __UCLIBC__
>> + #include<fts.h>
>
>  Again, uClibc does have FTS support (disabled by default in
> buildroot).
>
> [snip]
>
>> +diff -Naur firefox-11.0.org/js/src/ctypes/CTypes.cpp
>> firefox-11.0/js/src/ctypes/CTypes.cpp
>> +--- firefox-11.0.org/js/src/ctypes/CTypes.cpp    2012-08-06
>> 15:09:42.909994396 +0300
>> ++++ firefox-11.0/js/src/ctypes/CTypes.cpp    2012-08-06
>> 23:45:09.691173699 +0300
>> +@@ -473,6 +473,8 @@
>> + static inline bool FloatIsFinite(jsdouble f) {
>> + #ifdef WIN32
>> +   return _finite(f) != 0;
>> ++#elif __UCLIBC__
>> ++  return isinf(f);
>
>  This is unrelated to the rest of the patch - should probably go in
> the isfinite patch.
>
Yes, you are right
>> + #else
>> +   return finite(f);
>> + #endif
>> +diff -Naur firefox-11.0.org/memory/mozalloc/mozalloc.cpp
>> firefox-11.0/memory/mozalloc/mozalloc.cpp
>> +--- firefox-11.0.org/memory/mozalloc/mozalloc.cpp    2012-08-06
>> 15:09:42.968994393 +0300
>> ++++ firefox-11.0/memory/mozalloc/mozalloc.cpp    2012-08-06
>> 23:45:58.800170749 +0300
>> +@@ -259,7 +259,7 @@
>> +
>> + #if defined(XP_MACOSX)
>> +     return malloc_size(ptr);
>> +-#elif defined(MOZ_MEMORY) || defined(XP_LINUX)
>> ++#elif defined(MOZ_MEMORY) || defined(XP_LINUX)&&  !defined(__UCLIBC__)
>> +     // XXX: the |defined(XP_LINUX)| may be too lax;  some Linux
>> installations
>> +     // might use a libc that doesn't have malloc_usable_size. 
>> Let's fix this
>> +     // if/when it happens.
>
>  I would put this in a separate patch from the FTS stuff.
>
>> diff --git a/package/firefox/firefox-11.0-uintptr_t.patch
>> b/package/firefox/firefox-11.0-uintptr_t.patch
>> new file mode 100644
>> index 0000000..559b4c7
>> --- /dev/null
>> +++ b/package/firefox/firefox-11.0-uintptr_t.patch
>> @@ -0,0 +1,12 @@
>> +diff -Naur firefox-11.0.org/gfx/qcms/qcmstypes.h
>> firefox-11.0/gfx/qcms/qcmstypes.h
>> +--- firefox-11.0.org/gfx/qcms/qcmstypes.h    2012-08-06
>> 15:09:44.189994318 +0300
>> ++++ firefox-11.0/gfx/qcms/qcmstypes.h    2012-08-06
>> 23:35:38.339208022 +0300
>> +@@ -27,7 +27,7 @@
>> + #ifdef __OS2__
>> + /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so
>> we don't collide */
>> + #include<stdlib.h>
>> +-#elif !defined(__intptr_t_defined)&&  !defined(_UINTPTR_T_DEFINED)
>> ++#elif !defined(__intptr_t_defined)&& 
>> !defined(_UINTPTR_T_DEFINED)&&  !defined(__UCLIBC__)
>> + typedef PRUptrdiff uintptr_t;
>
>  Is this necessary? stdint.h defines __intptr_t_defined (at least in
> 0.9.32)
>
I have 0.9.33 and still got some problems.
But I will check it again.
>> + #endif
>> + #endif
>> diff --git a/package/firefox/firefox.mk b/package/firefox/firefox.mk
>> new file mode 100644
>> index 0000000..f501636
>> --- /dev/null
>> +++ b/package/firefox/firefox.mk
>> @@ -0,0 +1,240 @@
>> +#############################################################
>> +#
>> +# Mozilla Firefox
>> +#
>> +# Version:     11.0
>> +# Authors:     Stefan Froberg
>> +#
>> +# Builds a very minimal binary with all the optional features
>> +# stripped, except WebM.
>> +#
>> +# With WebM enabled you can watch *some* (but not all!)
>> +# YouTube videos without Adobe Flash player
>> +# http://www.youtube.com/results?search_query=web&webm=1
>> +#
>> +# Because Adobe Flash player plug-in is a glibc binary it
>> +# will obviously not work with uClibc.
>> +# (but maybe with nspluginwrapper ... )
>> +#
>> +# So the only real open source solution for playing flash videos
>> +# with Firefox under uClibc will be gnash + lightspark combo.
>> +# Lightspark handling the newer flash formats while falling back
>> +# to gnash with older versions.
>> +#
>> +# Further, Adobe has recently stopped supporting Linux version of
>> +# their plug-in but Google Chrome PPAPI might some day
>> +# find it's way to firefox and save the day.
>> +# http://www.phoronix.com/scan.php?page=news_item&px=MTEyNzc
>> +#
>> +# Used Linux From Scratch as a starting template for this file
>> +# http://www.linuxfromscratch.org/blfs/view/svb/xsoft/firefox.html
>> +#
>> +# Note: Even tought the libnss and libnspr are marked as dependencies
>> +# here I could not get them to work when building firefox.
>> +# Seems that the configure script needs some patching ...
>> +#
>> +# So for now, untill somebody fixes this, instead of trying to
>> +# use the buildroot system version of these libs the
>> +# internal ones provided by the firefox tarball are used.
>
>  Then remove libnss and libnspr from the dependencies (unless
> they really are dependencies).  Do keep this comment, though.
>
>  Similar for libpng.
>
Ok
>> +#
>> +#############################################################
>> +FIREFOX_VERSION = 11.0
>> +FIREFOX_SOURCE = firefox-$(FIREFOX_VERSION).source.tar.bz2
>> +FIREFOX_SITE =
>> http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/source/
>
>  Mozilla only keeps a few recent releases there.  Use
> https://ftp.mozilla.org/...
>
>> +FIREFOX_DEPENDENCIES = host-python alsa-lib cairo freetype jpeg
>> libffi libgtk2 libnss libnspr libpng sqlite zlib
>> +
>> +ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_DEBUG),y)
>> +FIREFOX_DEPENDENCIES += valgrind
>> +define FIREFOX_ENABLE_DEBUG
>
>  Since it does both enable and disable, it should be called
> SET_DEBUG or something similar.
>
>> +    echo "ac_add_options --enable-debug">>  $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --enable-debug-symbols">> 
>> $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --disable-strip">>  $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --enable-valgrind">>  $(FIREFOX_DIR)/mozconfig
>> +endef
>> +else
>> +define FIREFOX_ENABLE_DEBUG
>> +    echo "ac_add_options --disable-debug">>  $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --disable-debug-symbols">> 
>> $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --enable-strip">>  $(FIREFOX_DIR)/mozconfig
>
>  We normally do stripping directly in the target/ directory,
> so unstripped binaries are still available in the build
> directory.  So --disable-strip should be unconditional.  Unless
> there are non-executable files that should be stripped as well
> (only executable files are stripped by buildroot).
>
Actually, at the very end of the installation process there is a long 
list of files
that do not seem like normal executable files and in default (non-debug)
build
firefox strips them.
But I have to check that again.

>> +    echo "ac_add_options --disable-valgrind">> 
>> $(FIREFOX_DIR)/mozconfig
>> +endef
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_WEBM),y)
>> +# Only x86 needs yasm
>> +ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y)
>> +FIREFOX_DEPENDENCIES += host-yasm
>> +endif
>> +define FIREFOX_ENABLE_WEBM
>> +    echo "ac_add_options --enable-webm">>  $(FIREFOX_DIR)/mozconfig
>> +endef
>> +else
>> +define FIREFOX_ENABLE_WEBM
>> +    echo "ac_add_options --disable-webm">>  $(FIREFOX_DIR)/mozconfig
>> +endef
>> +endif
>> +
>> +#####################################################################
>> +# Some post-install, optional default profile custom settings
>> +# (extensions, secure default settings, language packs, flash etc...)
>> +#####################################################################
>> +
>> +# General Info&  description of some Firefox extensions.
>> +# Too large to put directly here.
>> +include package/firefox/firefox_extensions.mk.in
>> +
>> +# My (IMHO) privacy enhanced about:config settings.
>> +# Before you enable this feature please
>> +# check prefs.js file
>> +#
>> +# Note: This will also install NoScript, Adblock Lite, Ghostery and
>> +# HttpsEverywhere extensions
>
>  This is already explained in the config option's help
> text, so no need to repeat it here.
>
Ok
>> +
>> +ifeq ($(BR2_PACKAGE_FIREFOX_ULTRA_PARANOID),y)
>> +define FIREFOX_ULTRA_PARANOID
>> +    cp -i package/firefox/prefs.js
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/
>
>  Use install -D -m 0644.
>
>> +endef
>> +endif
>> +
>> +ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
>> +
>> +# Because this setting will also install the extensions mentioned in
>> +# package/firefox/firefox_extensions.mk.in we will need two
>> +# additional tools: host-unzip and host-xmlstarlet
>> +
>> +FIREFOX_DEPENDENCIES += host-unzip host-xmlstarlet
>
>  Then this should probably move to the extensions.mk, no?
>
Yes, I forgot to move it there
>> +
>> +define FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>> +    $(call FIREFOX_INSTALL_EXTENSION,$(EXTENSION_SOURCE))
>> +endef
>> +endif
>
>  It's very strange to have this line using two macros that are defined
> in a different file...  Move it to the extensions.mk.
>
>> +
>> +# Installing selected langpack (en-US locale does not need any)   
>> +ifneq ($(BR2_FIREFOX_LOCALE_EN_US),y)
>> +
>> +FIREFOX_LOCALE:=$(call qstrip,$(BR2_PACKAGE_FIREFOX_LOCALE))
>> +FIREFOX_LOCALE_SOURCE:=https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/linux-i686/xpi/$(FIREFOX_LOCALE).xpi
>>
>
>  linux-i686? Aren't xpis platform-independent?  Will this work on
> different targets
> (with different endianness)?
>
As far as I know they are platform-independent.

If you wget for example my native language from
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$(FIREFOX_VERSION)/linux-i686/xpi/fi.xpi

and then unzip it and check them with file command it will tell that
they are just a bunch of XML and other text files.
>> +
>> +define FIREFOX_INSTALL_LANGPACK
>> +    $(call DOWNLOAD,$(FIREFOX_LOCALE_SOURCE))
>> +    cp $(DL_DIR)/$(FIREFOX_LOCALE).xpi
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/langpack-$(FIREFOX_LOCALE)@firefox.mozilla.org.xpi
>
>  Use "install -D -m 0644" instead of cp.
>
>> +    echo
>> "user_pref(\"general.useragent.locale\",\"$(FIREFOX_LOCALE)\");">> 
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/prefs.js
>>
>> +endef
>> +endif
>> +
>> +define FIREFOX_CUSTOM_DEFAULT_PROFILE
>> +    mkdir -p
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile
>> +    $(FIREFOX_ULTRA_PARANOID)
>> +    $(FIREFOX_INSTALL_DEFAULT_EXTENSIONS)
>> +    $(FIREFOX_INSTALL_LANGPACK)
>> +endef
>
>  If ULTRA_PARANOID isn't set but one of the other two is, will this still
> work?  Or should there be a non-paranoid default prefs.js as well?
>
It should work. I tested the following combinations:
- just ultra-paranoid
- ultra-paranoid+extensions
- ultra-paranoid+extensions+langpack
-  just extensions
- just langpack
none of the above

That prefs.js that I provided is only needed if ultra-paranoid is enabled.
Without it the firefox will use built-in defaults, like enabling
Geolocating your browser and where you are surfing and other "nice" things.
>> +
>> +FIREFOX_POST_INSTALL_TARGET_HOOKS += FIREFOX_CUSTOM_DEFAULT_PROFILE
>> +
>> +# Even thought Firefox uses autoconf it's configure process
>> +# is not simple "configure&&  make&&  make install"
>> +# but a lot more messier than that.
>> +
>> +define FIREFOX_CONFIGURE_CMDS
>> +    # Copy the default mozconfig to source directory.
>
>  Comments inside _CMDS blocks aren't very nice, because they're
> interpreted by the shell (and printed on the console). Move the
> comments before the _CMDS block - but most of them are unnecessary,
> the code is self-explanatory.
>
Okay
>> +    cp package/firefox/mozconfig $(@D)
>> +
>> +    # If you want to enable any extra build options like
>> +    # DBus support, libnotify support, etc., then this
>> +    # will be the right place to do it.
>> +
>> +    echo "ac_add_options --build=$(GNU_HOST_NAME)">> 
>> $(FIREFOX_DIR)/mozconfig
>> +    echo "ac_add_options --host=$(GNU_TARGET_NAME)">> 
>> $(FIREFOX_DIR)/mozconfig
>> +
>> +    # Enable parallel building
>> +    echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$(BR2_JLEVEL)\"">> 
>> $(FIREFOX_DIR)/mozconfig
>
>  That doesn't work if JLEVEL=0.  Use $(PARALLEL_JOBS).
>
Ok
>> +
>> +    $(FIREFOX_ENABLE_WEBM)
>> +    $(FIREFOX_ENABLE_DEBUG)
>
>  You could define a FIREFOX_AC_OPTIONS variable, and then do
>
>     for option in $(FIREFOX_AC_OPTIONS); do \
>         echo "ac_add_options $${option}" >> $(FIREFOX_DIR)/mozconfig; \
>     done
>
>  That simplifies the WEBM and DEBUG conditional blocks a bit.  And it
> would
> make it easy to add things like $(DISABLE_IPV6) and
> $(SHARED_STATIC_LIBS_OPTS).
>
>
Sounds good
>> +
>> +    # Create the needed build directory that was defined in
>> mozconfig file
>> +    mkdir -p $(@D)/firefox-build-dir
>
>  To keep things together, it's better to also do
>     echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir" >>
> $(FIREFOX_DIR)/mozconfig
> here.
>
>> +endef
>> +
>> +
>> +# Firefox needs SQLite to store it's configurations.
>                                    ^^^^ its
>
>> +# Further the SQLite must be build with SQLITE_SECURE_DELETE,
>> SQLITE_THREADSAFE,
>> +# SQLITE_ENABLE_FTS3 and SLITE_ENABLE_UNLOCK_NOTIFY enabled.
>> +#
>> +# However, even if you *do* have these things enabled the damn
>> configure
>> +# script says that they are not. So I had to force the correct
>> settings.
>> +#
>> +# Even worse, it seems that the script does not respect even
>> +# pkg-config variables (see below) to find the buildroot version of
>> SQLite
>> +# but insist of using *host* SQLite library.
>> +#
>> +# Luckily, in the actual linking time, the correct libraries seem to
>> be used.
>> +
>> +define FIREFOX_BUILD_CMDS
>> +
>> +    # Picked the PKG_ variable suggestions from:
>> +    #
>> http://www.flameeyess.eu/autotools-mythbuster/pkgconfig/cross-compiling
>> +    #
>> +    # With these settings, *most* of the buildroot system libs were
>> found.
>> +    # With the exception of SQLite, NSS and NSPR.
>> +
>> +    # Had to enforce HOST_CC, CC_FOR_BUILD and HOST_CXX because
>> +    # the configure would not get them right.
>
>  Again, move the comments outside (and remove the duplicates).
>
>> +
>> +    (cd $(@D); \
>> +        sed -i 's# ""##' browser/base/Makefile.in&&  \
>
>  Huh?  That merits some comment to explain why it is needed...
> Also it fits better in a POST_PATCH_HOOK than here.
>
Sorry, forgot to mention that sed line just removes unprintable control
characters from the title bar.
>> +        ac_cv_sqlite_secure_delete=yes \
>> +        ac_cv_sqlite_threadsafe=yes \
>> +        ac_cv_sqlite_enable_fts3=yes \
>> +        ac_cv_sqlite_enable_unlock_notify=yes \
>
>  It's nicer to put all these in FIREFOX_CONF_ENV, for
> consistency with $(autotools-package).
>
>> +        HOST_CC=gcc \
>> +        CC_FOR_BUILD=gcc \
>> +        HOST_CXX=g++ \
>
>  These already are in mozconfig, and also in TARGET_CONFIGURE_OPTS.
> Well, except that TARGET_CONFIGURE_OPTS uses the absolute path
> and adds ccache to it.  Or maybe the firefox build has a problem
> with ccache? Then it should use $(HOSTCC_NOCCACHE) instead of plain
> gcc/g++.
>
>> +        PKG_CONFIG_DIR= \
>> +       
>> PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig"
>> \
>> +        PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
>> +        PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)"\
>
>  These shouldn't do anything, because our pkg-config already uses the
> correct paths.  Unless firefox doesn't use our pkg-config,
> which would explain all the problems you have - in that case, firefox
> needs to be patched to use the correct pkg-config.
>
>
All I can say that I had a really hellish time trying to tell firefox
where to find packages with pkg-config.
But I will check this again too and try to clean it a bit like you
suggested.
>> +        $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV)
>> CXXFLAGS="$(TARGET_CXXFLAGS) -fvisibility=hidden
>> -fvisibility-inlines-hidden" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -f
>> client.mk )
>> +
>> +endef
>> +
>> +define FIREFOX_INSTALL_TARGET_CMDS
>> +    # This will create a firefox installation tarball
>> +    (cd $(@D); \
>> +    $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C
>> firefox-build-dir/browser/installer )
>> +
>> +    # Make nice new clean home for our firefox and extract it there
>> +    rm -rf $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \
>
>  No need to join the lines with && here - newline is good enough.
>
>  $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) is used quite
> a lot, maybe abbreviate it to $(FIREFOX_INSTALL_DIR)
>
>> +    mkdir $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \
>> +    tar -xvf
>> $(@D)/firefox-build-dir/dist/firefox-$(FIREFOX_VERSION).en-US.linux-*.tar.bz2
>> -C $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) --strip-components=1
>
>  Remove the -v from tar - it's useful while debugging
> but unneeded once it's finished. And it's better to use
> $(TAR) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -f ... -C ...
>
>> +   
>> +    # Make some symlinks to firefox binary and plugins directory
>> +    (cd $(TARGET_DIR)/usr/bin&&  \
>> +    ln -sfv ../lib/firefox-$(FIREFOX_VERSION)/firefox .&&  \
>
>  Don't cd, but just
>     ln -sf ../lib/firefox-$(FIREFOX_VERSION)/firefox
> $(TARGET_DIR)/usr/bin
>
>  And again, remove -v
>
>> +    mkdir -pv $(TARGET_DIR)/usr/lib/mozilla/plugins&&  \
>
>  No && needed
>
>> +    cd $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&&  \
>> +    ln -sfv ../mozilla/plugins .&&  \
>
>     ln -sf ../mozilla/plugins $(FIREFOX_INSTALL_DIR)
>
>> +    chown -R -v root:root
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION) )
>
>  This is bad. You shouldn't build buildroot as root, but as
> a normal user. At the end, when putting everything together
> in the filesystem, buildroot will chown everything to root
> using fakeroot, so it can be done without actual root access
> on the build machine.
>
>  In short: remove that line.
>
>> +
>> +    # Using strace revealed that for some strange reason the firefox
>> is looking these
>> +    # from /usr/lib and not from /usr/lib/$(FIREFOX_VERSION) like
>> the rest of the files.
>> +    # That's why I had to use symlinks to make it start.
>> +
>> +    (cd $(TARGET_DIR)/usr/lib&&  \
>> +    ln -sfv firefox-$(FIREFOX_VERSION)/libxul.so .&&  \
>> +    ln -sfv firefox-$(FIREFOX_VERSION)/libmozjs.so .&&  \
>> +    ln -sfv firefox-$(FIREFOX_VERSION)/libmozalloc.so . )
>
>     ln -sf firefox-$(FIREFOX_VERSION)/libxul.so $(TARGET_DIR)/usr/lib
>  and no &&.
>
>> +
>> +    # For gnash support
>> +    rm -rf $(STAGING_DIR)/usr/include/npapi
>> +    mkdir -v $(STAGING_DIR)/usr/include/npapi   
>> +    cp -v $(FIREFOX_DIR)/dom/plugins/base/*.h
>> $(STAGING_DIR)/usr/include/npapi
>
>  This should be in INSTALL_STAGING_CMDS, and you should define
> FIREFOX_INSTALL_STAGING = YES
>
>> +
>> +endef
>> +
>> +$(eval $(generic-package))
>> +
>> +
>> +
>> +
>> +
>
>  Get rid of those empty lines at the end of the file.
> I got some whitespace errors when applying the patch series,
> so there are probably some spaces at the end of some lines as
> well.
>
>> diff --git a/package/firefox/firefox_extensions.mk.in
>> b/package/firefox/firefox_extensions.mk.in
>> new file mode 100644
>> index 0000000..8c8fa3d
>> --- /dev/null
>> +++ b/package/firefox/firefox_extensions.mk.in
>> @@ -0,0 +1,168 @@
>> +#############################################################
>> +# Extensions
>> +#
>> +# General Info:
>> +#
>> +# Firefox extensions are nothing more than ordinary zip-files with
>> .xpi file extension.
>> +#
>> +# If you want to add your own default extension(s) to your default
>> firefox profile
>> +# then you basically have to:
>> +# - download the extension file
>> +# - get the extension id from that file with the help of xmlstarlet
>> tool
>> +# - unzip the extension file to
>> /usr/lib/firefox-$(FIREFOX_VERSION/extensions/$(EXTENSION_ID)
>> +#
>> +# For more information of global extension installation look at:
>> +# http://kb.mozillazine.org/Installing_extensions#Global_installation
>> +#
>> +# For information of how to get the extension id (needs unzip and
>> xmlstarlet) look at:
>> +# http://kb.mozillazine.org/Determine_extension_ID
>> +#
>> +# Note that this process will only *install* your extensions to your
>> default firefox profile.
>> +# It will not *enable* them by default.
>> +# You have to do it manually afterwards from Firefox Add-ons menu.
>> +#
>> +# There is an "extensions.enabledAddons" setting in about:config
>> +# but it's no use if you try to set it in pref.js file.
>> +# It seems it's a read-only setting and it will be updated each
>> +# time after you have manually enabled your installed
>> extensions/language packs
>> +# from Add-ons menu.
>> +#
>> +# The messy way to enable your extensions by default with each build
>> would be:
>> +#
>> +# - Start your firefox at least once and then enable all your
>> extensions manually
>> +#
>> +# - Do all the necessary setting you need for your extensions/langpacks
>> +# (like Adblock Lite subscriptions, default language etc..)
>> +#
>> +# - Go to your $HOME/.mozilla/firefox/some_random_chars.default/
>> folder and copy
>> +# at least the files starting with extensions.* (and maybe also
>> addons.*)
>> +# to package/firefox/extensions buildroot folder.
>> +# To make sure, it's generally better to copy *all* files& 
>> directories from
>> +# $HOME/.mozilla/firefox/some_random_chars.default/ folder to
>> +# packge/firefox/extensions
>> +#
>> +# - Add buildroot option that will copy all those saved custom
>> settings from
>> +# package/firefox/extensions folder in
>> FIREFOX_POST_INSTALL_TARGET_HOOKS phase
>> +# (or alternativaly, at the end of the FIREFOX_INSTALL_TARGET_CMDS)
>> +# to $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions
>> +#
>> +# This seems to be the only way to *enable* extensions by default
>> because
>> +# firefox keep's track of extensions in SQLite database (like
>> extensions.sqlite file)
>> +# and not in easily editable/patchable text files :-(
>
>  IIRC the .sqlite file is machine-specific, so this has to be done on
> the target. May be worth adding that to the comment.
>
Okay
>> +#
>> +# Next comes four privacy/security related extensions.
>> +#
>> +
>> +# Name:        NoScript
>> +# Version:    2.5.3
>> +# Home:        http://noscript.net
>> +# Download URL:   
>> http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi
>> +# Description:    "NoScript for Firefox pre-emptively blocks
>> malicious scripts
>> +#         and allows JavaScript, Java, Flash and other potentially
>> dangerous
>> +#         content only from sites you trust.
>> +#         NoScript also provides the most anti-XSS and
>> anti-Clickjacking
>> +#        protection ever available in a browser."
>
>  This whole comment is redundant: the description and homepage
> are already in the Config.in help text, the download URL is
> below.  Same goes for the other extensions.
>
>> +
>> +ifeq ($(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT),y)
>> +EXTENSION_SOURCE+=http://releases.mozilla.org/pub/mozilla.org/addons/722/noscript-2.5.3-fx+fn+sm.xpi
>>
>
>  May be worthwhile to split into
>
> FIREFOX_EXTENSION_NOSCRIPT_VERSION = 2.5.3
> FIREFOX_EXTENSION_NOSCRIPT_SITE    =
> http://releases.mozilla.org/pub/mozilla.org/addons/722
> FIREFOX_EXTENSION_NOSCRIPT_SOURCE  =
> noscript-$(FIREFOX_EXTENSION_NOSCRIPT_VERSION)-fx+fn+sm.xpi
>
> for consistency with other packages.
>
>  Then you can add
>
> FIREFOX_EXTENSION-$(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT) += NOSCRIPT
>
>  and use my rewrite below
>
> [snip]
>
>> +ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
>
>  This condition is redundant AFAICS.
>
>> +
>> +UNZIP=$(HOST_DIR)/usr/bin/unzip
>> +XMLSTARLET=$(HOST_DIR)/usr/bin/xml
>> +
>> +define    FIREFOX_INSTALL_EXTENSION
>> +   
>> +# Do multi-download, get extension id for each downloaded file
>> +# and finally unzip it to
>> +#
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/${EXTENSION_ID}
>> +#
>> +# Inner guts copied from package/pkg-download.mk DOWNLOAD_WGET
>> +# Thanks to Yann and Thomas for helping with that $${i##*/} thing!
>> +
>> +    for i in $(EXTENSION_SOURCE);do \
>> +        FILENAME=$${i##*/} ;\
>> +        test -e $(DL_DIR)/$${FILENAME} || \
>> +        $(WGET) -O $(DL_DIR)/$${FILENAME} $${i} || \
>> +        (rm -f $(DL_DIR)/$${FILENAME} ; exit 1) ;\
>> +        EXTENSION_ID=`$(UNZIP) -qc $(DL_DIR)/$${FILENAME}
>> install.rdf | $(XMLSTARLET) sel \
>> +        -N rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# \
>> +        -N em=http://www.mozilla.org/2004/em-rdf# \
>> +        -t -v \
>> +       
>> "//rdf:Description[@about='urn:mozilla:install-manifest']/em:id"` ;\
>> +        $(UNZIP) -d
>> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions/$${EXTENSION_ID}
>> $(DL_DIR)/$${FILENAME};\
>> +    done   
>> +
>> +endef
>> +endif
>
>  Alternative:
>
> # Download and install a firefox extension.
> # The extension is defined by FIREFOX_EXTENSION_FOO_SITE and
> FIREFOX_EXTENSION_FOO_SOURCE
> # Argument 1 is the extension name, FOO.
> define FIREFOX_INSTALL_EXTENSION
>     $(call
> DOWNLOAD,$(FIREFOX_EXTENSION_$(1)_SITE),$(FIREFOX_EXTENSION_$(1)_SOURCE))
>     EXTENSION_ID="$$($(UNZIP) -qc
> $(DL_DIR)/$(FIREFOX_EXTENSION_$(1)_SOURCE) | \
>         $(XMLSTARLET) sel -t \
>             -N rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# \
>             -N em=http://www.mozilla.org/2004/em-rdf# \
>             -v
> "//rdf:Description[@about='urn:mozilla:install-manifest']/em:id")"; \
>     $(UNZIP) -d $(FIREFOX_INSTALL_DIR)/extensions/$${EXTENSION_ID}
> $(DL_DIR)/$(FIREFOX_EXTENSION_$(1)_SOURCE)
> endef
>
> define FIREFOX_INSTALL_EXTENSIONS
>     $(foreach ext,$(FIREFOX_EXTENSION-y),$(call
> FIREFOX_INSTALL_EXTENSION,$(ext))$(sep))
> endef
>
> FIREFOX_POST_INSTALL_TARGET_HOOKS += FIREFOX_INSTALL_EXTENSIONS
>
>
>  (Untested, of course, and I admit there's a bit of make magickery in
> there.)
>
> [snip]
>> diff --git a/package/firefox/prefs.js b/package/firefox/prefs.js
>> new file mode 100755
>> index 0000000..7cbf675
>> --- /dev/null
>> +++ b/package/firefox/prefs.js
>
>  Since this one is only used with the PARANOID config, perhaps it
> should be called prefs.paranoid.js?
>
No problem
>> @@ -0,0 +1,100 @@
>> +# Mozilla User Preferences
>> +
>> +# Most of the settings below are documented in
>> +# http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
>> +#
>> +# Those entries that are not documented (tagged UNDOCUMENTED) are
>> +# the ones I found out when playing with various
>> +# Firefox Privacy settings and then checking afterwards
>> +# from the about:config URL what had changed.
>
>  A bit a general remark: you use the first person ("I") a couple
> of times. OK with me, but remember that your authorship will be
> less evident in the files themselves.  So maybe it's better to
> explicitly mention your name there.
>
>> +
>> +# If you have more information about these entries please update.
>> +
>> +########################
>> +# Performance settings #
>> +########################
>> +
>> +# Enable pipelining
>> +user_pref("network.http.pipelining",true);
>> +user_pref("network.http.pipelining.agressive",true);
>> +user_pref("network.http.pipelining.ssl",true);
>> +user_pref("network.http.proxy.pipelining",true);
>> +
>> +###############################
>> +# Privacy&  Security settings #
>> +###############################
>> +
>> +# When to remove downloaded files entries from the Download Manager
>> +#    0: Upon successful download
>> +#    1: When the browser exits
>> +#    2 (default): Manually
>> +user_pref("browser.download.manager.retention",1);
>> +
>> +# Don't save information entered in web page forms and the Search Bar
>> +user_pref("browser.formfill.enable",false);
>> +
>> +# Automatically Start in Private Browsing Mode
>> +user_pref("browser.privatebrowsing.autostart",true);
>> +
>> +# Windows may not be moved or resized via JavaScript
>> +user_pref("dom.disable_window_move_resize",true);
>> +
>> +# Webpages will not be able to affect the context menu event,
>> +# thus allowing to access the context menu all the time
>> +user_pref("dom.event.contextmenu.enabled",false);
>> +
>> +# Is location aware browsing enabled? Default setting *was* 'true'
>> (Jesus Christ!)
>> +user_pref("geo.enabled",false);
>> +
>> +# Allow cookies from originating server only
>> +user_pref("network.cookie.cookieBehavior",1);
>> +
>> +# Accept cookies for session only
>> +user_pref("network.cookie.lifetimePolicy",2);
>> +
>> +# Consult current preferences for cookie prefs
>> +user_pref("network.cookie.prefsMigrated",true);
>> +
>> +# Perform all DNS lookups on remote proxy server
>> +# NOTE: It has *still* (8th of June 2012) not been fixed!
>> +# ( see Bug 134105
>> https://bugzilla.mozilla.org/show_bug.cgi?id=134105 )
>> +user_pref("network.proxy.socks_remote_dns",true);
>> +
>> +# Only important if you are using Tor. Might be fixed by now
>> +# ( see https://trac.torproject.org/projects/tor/ticket/5741 )
>> +user_pref("network.websocket.enabled",false);
>> +
>> +# UNDOCUMENTED
>> +# Not documented by Mozilla but my best guess is that this disables
>> browser history :-)
>> +user_pref("places.history.enabled",false);
>> +
>> +# UNDOCUMENTED
>> +# Not documented by Mozilla (what the heck are offline apps???)
>> +user_pref("privacy.clearOnShutdown.offlineApps",true);
>> +
>> +# UNDOCUMENTED
>> +# Not documented by Mozilla (but should be obvious :-) )
>> +user_pref("privacy.clearOnShutdown.passwords",true);
>> +
>> +# UNDOCUMENTED
>> +# Not documented by Mozilla (???)
>> +user_pref("privacy.clearOnShutdown.siteSettings",true);
>> +
>> +# UNDOCUMENTED
>> +# Not documented by Mozilla but this is clearly the
>> +# Do-not-track feature from Firefox privacy settings
>> +user_pref("privacy.donottrackheader.enabled",true);
>> +
>> +# Delete all cookies when using the Firefox Clear Private Data feature
>> +user_pref("privacy.item.cookies",true);
>> +
>> +# Perform the Firefox Clear Private Data operation when closing the
>> browser
>> +user_pref("privacy.sanitize.sanitizeOnShutdown",true);
>> +
>> +
>> +
>> +
>> +
>> +
>> +
>> +
>
>  Remove those empty lines at the end.
>
>
>  Phew, glad I managed to finish this review :-)
>
>  Regards,
>  Arnout

:-)

Thank you Arnout.
You helped me a lot

Stefan

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-18 21:25       ` Arnout Vandecappelle
@ 2012-09-19  1:39         ` Stefan Fröberg
  0 siblings, 0 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-09-19  1:39 UTC (permalink / raw)
  To: buildroot

19.9.2012 0:25, Arnout Vandecappelle kirjoitti:
> On 09/18/12 17:48, Stefan Fr?berg wrote:
>> And because I don't have any other machines than x86  I can't test
>> with ARM or MIPS
>
>  You can do a build-test.  And if you really want, you can try to run it
> in QEMU.
>
I have used qemu in the past so I will give it a try.
Have been thinking of getting arm machine someday, maybe raspberry pi.


Stefan

>  Regards,
>  Arnout

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency
  2012-09-05 14:29 ` [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency Stefan Fröberg
@ 2012-09-19  5:30   ` Arnout Vandecappelle
  0 siblings, 0 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-19  5:30 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:29, Stefan Fr?berg wrote:
>
> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>

  A better commit message would be:

agg: new package

agg is needed for the GNU gnash flash plugin.


  Actually, this goes for many others in your series as well.


[snip]
> diff --git a/package/agg/Config.in b/package/agg/Config.in
> new file mode 100644
> index 0000000..98a7b02
> --- /dev/null
> +++ b/package/agg/Config.in
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_AGG
> +	bool "agg"
> +	select BR2_PACKAGE_PKG_CONFIG

  This is unlikely...  You probably just need a dependency on
host-pkg-config in the .mk file.

> +	select BR2_PACKAGE_XLIB_LIBX11

  If you select an x11r7 package, you have to add

	depends on BR2_PACKAGE_XORG7

> +	select BR2_PACKAGE_SDL
> +	help
> +	  The Anti-Grain Geometry (AGG) package contains a general purpse C++ graphical toolkit.
> +	  It can be used in many areas of computer programming where high quality 2D graphics is
> +	  an essential part of the project.

  Word-wrap at 80 columns please (tab counts as 8 columns).

> +
> +	  http://www.antigrain.com
> +
> diff --git a/package/agg/agg-2.5.patch b/package/agg/agg-2.5.patch

  The patch filename should be more descriptive, and remove the version
number.

  There should also be an explanation of the patch (why and how)
and a signed-off-by line at the top of the patch.

> new file mode 100644
> index 0000000..d8749c5
> --- /dev/null
> +++ b/package/agg/agg-2.5.patch
> @@ -0,0 +1,207 @@
> +diff -Naur agg-2.5.org/authors agg-2.5/authors
> +--- agg-2.5.org/authors	2012-07-24 14:46:22.692942266 +0300
> ++++ agg-2.5/authors	1970-01-01 02:00:00.000000000 +0200
> +@@ -1,3 +0,0 @@
> +-Anti-Grain Geometry (AGG) - Version 2.5
> +-A high quality rendering engine for C++
> +-Copyright (C) 2002-2006 Maxim Shemanarev
> +diff -Naur agg-2.5.org/AUTHORS agg-2.5/AUTHORS
> +--- agg-2.5.org/AUTHORS	1970-01-01 02:00:00.000000000 +0200
> ++++ agg-2.5/AUTHORS	2006-10-09 07:06:36.000000000 +0300
> +@@ -0,0 +1,3 @@
> ++Anti-Grain Geometry (AGG) - Version 2.5
> ++A high quality rendering engine for C++
> ++Copyright (C) 2002-2006 Maxim Shemanarev

  Renaming a file is more appropriate to do in a
POST_PATCH_HOOK - then it's clearer what's happening.

> +diff -Naur agg-2.5.org/configure.in agg-2.5/configure.in
> +--- agg-2.5.org/configure.in	2012-07-24 14:46:22.685942274 +0300
> ++++ agg-2.5/configure.in	2012-07-24 14:48:22.177936690 +0300
> +@@ -8,7 +8,6 @@
> + AC_PROG_CC
> + AC_PROG_CXX
> + AC_ISC_POSIX
> +-AM_C_PROTOTYPES

  Is this really needed? There are a few packages (minicom, lame,
make, ...) that use AM_C_PROTOTYPES and they seem to work...

> + if test "x$U" != "x"; then
> +   AC_MSG_ERROR(Compiler not ANSI compliant)
> + fi
> +diff -Naur agg-2.5.org/news agg-2.5/news
> +--- agg-2.5.org/news	2012-07-24 14:46:22.692942266 +0300
> ++++ agg-2.5/news	1970-01-01 02:00:00.000000000 +0200
> +@@ -1 +0,0 @@
> +-Visit http://antigrain.com/news
> +\ Ei rivinvaihtoa tiedoston lopussa
> +diff -Naur agg-2.5.org/NEWS agg-2.5/NEWS
> +--- agg-2.5.org/NEWS	1970-01-01 02:00:00.000000000 +0200
> ++++ agg-2.5/NEWS	2006-10-09 07:06:36.000000000 +0300
> +@@ -0,0 +1 @@
> ++Visit http://antigrain.com/news
> +\ Ei rivinvaihtoa tiedoston lopussa
> +diff -Naur agg-2.5.org/readme agg-2.5/readme
> +--- agg-2.5.org/readme	2012-07-24 14:46:22.692942266 +0300
> ++++ agg-2.5/readme	1970-01-01 02:00:00.000000000 +0200
> +@@ -1,75 +0,0 @@
> +-Anti-Grain Geometry (AGG) - Version 2.5
> +-A high quality rendering engine for C++
> +-Copyright (C) 2002-2006 Maxim Shemanarev
> +-Contact: mcseem at antigrain.com
> +-         mcseemagg at yahoo.com
> +-         http://antigrain.com
> +-
> +-AGG is free software; you can redistribute it and/or
> +-modify it under the terms of the GNU General Public License
> +-as published by the Free Software Foundation; either version 2
> +-of the License, or (at your option) any later version.
> +-
> +-AGG is distributed in the hope that it will be useful,
> +-but WITHOUT ANY WARRANTY; without even the implied warranty of
> +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +-GNU General Public License for more details.
> +-
> +-You should have received a copy of the GNU General Public License
> +-along with AGG; if not, write to the Free Software
> +-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> +-MA 02110-1301, USA.
> +-
> +-
> +-
> +----------------------------------
> +-
> +-Use automake to build the library.
> +-
> +-If automake is not available you still can use the old make.
> +-There is a very simple Makefile that can be used. Note that
> +-if you use automake it will overwrite Makefile.
> +-
> +----------------------------------
> +-
> +-If building on AmigaOS 4.0 or higher type the following for
> +-instructions on what targets are available.
> +- make -f Makefile.AmigaOS
> +-
> +-To just build and install AGG into the standard AmigaOS SDK
> +-ready for use type:
> +- make -f Makefile.AmigaOS install
> +-
> +-If you just want to build one demo (e.g. lion) use:
> +- make -f Makefile.AmigaOS bin/lion
> +-
> +-If you have any questions about the AmigaOS port please
> +-contact Steven Solie (ssolie at telus.net) for help.
> +-
> +----------------------------------
> +-
> +-To build all examples using SDL (Mac or Linux) just type:
> +-
> +-cd /examples/sdl
> +-make
> +-
> +-Individual examples can be built with
> +-
> +-make aa_test
> +-
> +-In the same way the native Carbon examples can be built with
> +-
> +-cd /examples/macosx_carbon
> +-make
> +-
> +-In both cases the static library will be built (if it was not already)
> +-from the existing global Makefile in /src/.
> +-
> +-The Makefiles for both SDL and Carbon will also attempt to download the
> +-required .bmp files if they are not found in the system for a given
> +-example. If the files could not be fetched (wget) the user will receive
> +-a message explaining where to download the samples from (sphere.bmp,
> +-etc.)  Since all programs reside in the same directory there is no need
> +-to duplicate the .bmp files for each program that needs to use them.
> +-
> +----------------------------------
> +diff -Naur agg-2.5.org/README agg-2.5/README
> +--- agg-2.5.org/README	1970-01-01 02:00:00.000000000 +0200
> ++++ agg-2.5/README	2006-10-09 07:06:36.000000000 +0300
> +@@ -0,0 +1,75 @@
> ++Anti-Grain Geometry (AGG) - Version 2.5
> ++A high quality rendering engine for C++
> ++Copyright (C) 2002-2006 Maxim Shemanarev
> ++Contact: mcseem at antigrain.com
> ++         mcseemagg at yahoo.com
> ++         http://antigrain.com
> ++
> ++AGG is free software; you can redistribute it and/or
> ++modify it under the terms of the GNU General Public License
> ++as published by the Free Software Foundation; either version 2
> ++of the License, or (at your option) any later version.
> ++
> ++AGG is distributed in the hope that it will be useful,
> ++but WITHOUT ANY WARRANTY; without even the implied warranty of
> ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ++GNU General Public License for more details.
> ++
> ++You should have received a copy of the GNU General Public License
> ++along with AGG; if not, write to the Free Software
> ++Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> ++MA 02110-1301, USA.
> ++
> ++
> ++
> ++---------------------------------
> ++
> ++Use automake to build the library.
> ++
> ++If automake is not available you still can use the old make.
> ++There is a very simple Makefile that can be used. Note that
> ++if you use automake it will overwrite Makefile.
> ++
> ++---------------------------------
> ++
> ++If building on AmigaOS 4.0 or higher type the following for
> ++instructions on what targets are available.
> ++ make -f Makefile.AmigaOS
> ++
> ++To just build and install AGG into the standard AmigaOS SDK
> ++ready for use type:
> ++ make -f Makefile.AmigaOS install
> ++
> ++If you just want to build one demo (e.g. lion) use:
> ++ make -f Makefile.AmigaOS bin/lion
> ++
> ++If you have any questions about the AmigaOS port please
> ++contact Steven Solie (ssolie at telus.net) for help.
> ++
> ++---------------------------------
> ++
> ++To build all examples using SDL (Mac or Linux) just type:
> ++
> ++cd /examples/sdl
> ++make
> ++
> ++Individual examples can be built with
> ++
> ++make aa_test
> ++
> ++In the same way the native Carbon examples can be built with
> ++
> ++cd /examples/macosx_carbon
> ++make
> ++
> ++In both cases the static library will be built (if it was not already)
> ++from the existing global Makefile in /src/.
> ++
> ++The Makefiles for both SDL and Carbon will also attempt to download the
> ++required .bmp files if they are not found in the system for a given
> ++example. If the files could not be fetched (wget) the user will receive
> ++a message explaining where to download the samples from (sphere.bmp,
> ++etc.)  Since all programs reside in the same directory there is no need
> ++to duplicate the .bmp files for each program that needs to use them.
> ++
> ++---------------------------------
> +diff -Naur agg-2.5.org/src/platform/X11/Makefile.am agg-2.5/src/platform/X11/Makefile.am
> +--- agg-2.5.org/src/platform/X11/Makefile.am	2012-07-24 14:46:22.686942273 +0300
> ++++ agg-2.5/src/platform/X11/Makefile.am	2012-07-24 14:47:55.674937931 +0300
> +@@ -1,7 +1,7 @@
> + if ENABLE_X11
> + lib_LTLIBRARIES = libaggplatformX11.la
> +
> +-libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@  -L at x_libraries@
> ++libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@
> + libaggplatformX11_la_SOURCES = agg_platform_support.cpp
> + libaggplatformX11_la_CXXFLAGS =  -I$(top_srcdir)/include -I at x_includes@

  It surprises me that you need to remove @x_libraries@ but not @x_includes at ...

> + libaggplatformX11_la_LIBADD = -lX11
> diff --git a/package/agg/agg.mk b/package/agg/agg.mk
> new file mode 100644
> index 0000000..f4b9a75
> --- /dev/null
> +++ b/package/agg/agg.mk
> @@ -0,0 +1,17 @@
> +#############################################################
> +#
> +# agg
> +#
> +#############################################################
> +
> +AGG_VERSION = 2.5
> +AGG_SOURCE = agg-$(AGG_VERSION).tar.gz

  That's the default, you can remove this line.

> +AGG_SITE = http://www.antigrain.com/
> +AGG_DEPENDENCIES = xlib_libX11 pkg-config sdl

  Shouldn't that be host-pkg-config?

> +AGG_INSTALL_STAGING = YES
> +AGG_AUTORECONF = YES
> +AGG_LICENSE = GPLv2
> +AGG_LICENCE_FILE = readme

  Hah, this is a tough one: if you have already built the
package, it will be README, not readme.  But if you just do
a 'make legal-info' without building, legal-info will just
extract the package, not patch it...

  The easiest way out is probably to copy readme instead of
renaming it.

> +
> +$(eval $(autotools-package))
> +

  Spurious empty line at the end.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser
  2012-09-19  1:35     ` Stefan Fröberg
@ 2012-09-19  6:03       ` Arnout Vandecappelle
  0 siblings, 0 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-19  6:03 UTC (permalink / raw)
  To: buildroot

On 09/19/12 03:35, Stefan Fr?berg wrote:
>
> 18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
>>
>> [snip]
>>> diff --git a/package/firefox/Config.in b/package/firefox/Config.in
>>> new file mode 100644
>>> index 0000000..fbd4749
>>> --- /dev/null
>>> +++ b/package/firefox/Config.in
>>> @@ -0,0 +1,417 @@
>>> +config BR2_PACKAGE_FIREFOX
>>> +    bool "firefox"
>>> +    select BR2_PACKAGE_ALSA_LIB
>>> +    select BR2_PACKAGE_CAIRO
>>> +    select BR2_PACKAGE_CAIRO_TEE
>>> +    select BR2_PACKAGE_FREETYPE
>>> +    select BR2_PACKAGE_JPEG
>>> +    select BR2_PACKAGE_LIBGTK2
>>
>>   Without Yann's _AVAILABLE series, you need to explicitly
>> depend on the dependencies of libgtk2 (and cairo but
>> that's implied):
>>
>>          depends on BR2_USE_WCHAR # glib2
>>          depends on BR2_INSTALL_LIBSTDCPP # pango
>>
>>   And there should be a comment to warn about it
>> if WCHAR and LIBSTDCPP are not available.
>>
> Uh???? Sorry but what is this new  _AVAILABLE series you mentioned ?

  If you don't know, never mind :-)



>>> +    select BR2_PACKAGE_LIBFFI
>>> +    select BR2_PACKAGE_LIBNSS
>>> +    select BR2_PACKAGE_LIBNSPR
>>> +    select BR2_PACKAGE_LIBPNG
>>
>>   I thought the internal implementations of these three were used?
>>
> Yes, at currently nss, nspr and especially libpng (because it needs apng
> feature patch) internal versions are used but
> mind you that my version of buildroot is little outdated.
>
> So maybe buildroot versions of nss and nspr will now be correctly
> detected and linked against with firefox.
>
> At least what I think seeing from the mailing list is that nspr and
> nss(?) got some new changes (they were missing .pc files?).
> So maybe they work now.

  Could you rebase against current master and recheck with the
buildroot nss/nspr in your next iteration?


[snip]
>>> +config BR2_PACKAGE_FIREFOX_ENABLE_DEBUG
>>> +    bool "Enable debug build and Valgrind integration hooks"
>>> +    select BR2_PACKAGE_VALGRIND if BR2_TOOLCHAIN_BUILDROOT&&
>>> BR2_GCC_ENABLE_TLS
>>
>>   Let me get this clear: if you're using a glibc-based or
>> crosstool-NG-generated uclibc toolchain with TLS, valgrind.h
>> is not needed?
>>
>>   In other words: shouldn't this just select valgrind unconditionally?
>>
> You might be right. I have always used only uclibc-based, buildroot
> provided toolchain.
> So in other words: I have no clue what will happen in other toolchains

  It's easy enough to build-test with an external Sourcery toolchain
as well.


[snip]
>>> +config BR2_PACKAGE_FIREFOX_ULTRA_PARANOID
>>> +    bool "Enable Ulta-paranoid settings"
>>
>>   Do you think this option is useful for many buildroot users?  I
>> think most users will let firefox run full-screen at boot time,
>> pointing to one and only one site, with no UI for changing URL.
>> An option to provide *that* would be useful :-)
>>
> You mean that WebM ? I think it's kinda cool option. :-)
> To watch videos without flash.
> But of course, being YouTube only it's usefulness is quite limited now....

  No, I mean ultra-paranoid.

  Remember that buildroot users (including yourself :-) can just
add a custom prefs.js to their skeleton, or add it post-build.

[snip]
>>> +config BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS
>>> +    bool "Enable installing of selected default extensions"
>>> +    help
>>> +        This option will enable you to select default extensions to
>>> +        be installed when building Firefox.
>>> +
>>> +        Note: The selected extensions are only *installed*.
>>> +        They are not *enabled* by default.
>>> +        For that you have to manually enable them after starting you
>>> +        freshly build Firefox.
>>
>>   built.
>>
>>   The logic is reversed here, if you ask me. INSTALL_DEFAULT_EXTENSIONS
>> should select the default extensions, but the default extensions
>> shouldn't
>> depend on it.  Or, if the idea is to make a submenu for the extensions,
>> it should be a menuconfig. But since there are only four extensions, I
>> don't think it's worth making a menuconfig for that.
>>
> Yeah, that's what I had in mind. A menu option where user could decide
> if he/she
> want's any default extensions installed and then it would take him/her
> to list
> of extensions to install.

  In that case: use 'menu' (I personally don't like menuconfig much, I
often forget to check the option before entering the menu and then you
just get an empty menu...).

>>   I propose to just remove the DEFAULT_EXTENSIONS symbol.

[snip]
>>> +config BR2_PACKAGE_FIREFOX_PLUGIN_GNASH
>>> +    source "package/gnash/Config.in"
>>
>>   The config symbol should be inside the sourced Config.in.  Also,
>> I think it should be included from packages/Config.in.
>>
> You mean that it should be possible to enable building gnash flash
> plugin outside of firefox ?

  Yes. First of all, it's also a stand-alone executable IIRC.
And even if it is only a firefox plugin, you can make it
depends on BR2_PACKAGE_FIREFOX.

[snip]
>>> diff --git a/package/firefox/firefox-11.0-uintptr_t.patch
>>> b/package/firefox/firefox-11.0-uintptr_t.patch
>>> new file mode 100644
>>> index 0000000..559b4c7
>>> --- /dev/null
>>> +++ b/package/firefox/firefox-11.0-uintptr_t.patch
>>> @@ -0,0 +1,12 @@
>>> +diff -Naur firefox-11.0.org/gfx/qcms/qcmstypes.h
>>> firefox-11.0/gfx/qcms/qcmstypes.h
>>> +--- firefox-11.0.org/gfx/qcms/qcmstypes.h    2012-08-06
>>> 15:09:44.189994318 +0300
>>> ++++ firefox-11.0/gfx/qcms/qcmstypes.h    2012-08-06
>>> 23:35:38.339208022 +0300
>>> +@@ -27,7 +27,7 @@
>>> + #ifdef __OS2__
>>> + /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so
>>> we don't collide */
>>> + #include<stdlib.h>
>>> +-#elif !defined(__intptr_t_defined)&&   !defined(_UINTPTR_T_DEFINED)
>>> ++#elif !defined(__intptr_t_defined)&&
>>> !defined(_UINTPTR_T_DEFINED)&&   !defined(__UCLIBC__)
>>> + typedef PRUptrdiff uintptr_t;
>>
>>   Is this necessary? stdint.h defines __intptr_t_defined (at least in
>> 0.9.32)
>>
> I have 0.9.33 and still got some problems.
> But I will check it again.

  Maybe stdint.h just isn't included (which means uintptr_t isn't
available either).

[snip]
>>> +define FIREFOX_ENABLE_DEBUG
>>> +    echo "ac_add_options --disable-debug">>   $(FIREFOX_DIR)/mozconfig
>>> +    echo "ac_add_options --disable-debug-symbols">>
>>> $(FIREFOX_DIR)/mozconfig
>>> +    echo "ac_add_options --enable-strip">>   $(FIREFOX_DIR)/mozconfig
>>
>>   We normally do stripping directly in the target/ directory,
>> so unstripped binaries are still available in the build
>> directory.  So --disable-strip should be unconditional.  Unless
>> there are non-executable files that should be stripped as well
>> (only executable files are stripped by buildroot).
>>
> Actually, at the very end of the installation process there is a long
> list of files
> that do not seem like normal executable files and in default (non-debug)
> build
> firefox strips them.
> But I have to check that again.

  Buildroot strips files with the executable bit set, not only
normal executables.

[snip]
>>> +    (cd $(@D); \
>>> +        sed -i 's# ""##' browser/base/Makefile.in&&   \
>>
>>   Huh?  That merits some comment to explain why it is needed...
>> Also it fits better in a POST_PATCH_HOOK than here.
>>
> Sorry, forgot to mention that sed line just removes unprintable control
> characters from the title bar.

  That is really mysterious... I'll look at it again in your next
iteration.

[snip]

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency
  2012-09-05 14:29 ` [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency Stefan Fröberg
@ 2012-09-19  6:16   ` Arnout Vandecappelle
  0 siblings, 0 replies; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-09-19  6:16 UTC (permalink / raw)
  To: buildroot

On 09/05/12 16:29, Stefan Fr?berg wrote:
>
> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>
> ---
>   package/Config.in       |    1 +
>   package/gconf/Config.in |   11 +++++++++++
>   package/gconf/gconf.mk  |   26 ++++++++++++++++++++++++++
>   3 files changed, 38 insertions(+), 0 deletions(-)
>   create mode 100644 package/gconf/Config.in
>   create mode 100644 package/gconf/gconf.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 92c957e..fb4ec28 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -510,6 +510,7 @@ endmenu
>   menu "Miscellaneous"
>   source "package/collectd/Config.in"
>   source "package/empty/Config.in"
> +source "package/gconf/Config.in"
>   source "package/mobile-broadband-provider-info/Config.in"
>   source "package/shared-mime-info/Config.in"
>   source "package/sound-theme-borealis/Config.in"
> diff --git a/package/gconf/Config.in b/package/gconf/Config.in
> new file mode 100644
> index 0000000..770e707
> --- /dev/null
> +++ b/package/gconf/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_GCONF
> +	bool "gconf"
> +	select BR2_PACKAGE_INTLTOOL

  Unlikely. You probably want to depend on host-intltool.

> +	select BR2_PACKAGE_DBUS_GLIB

  This means you also need
	select BR2_PACKAGE_DBUS
	depends on BR2_TOOLCHAIN_HAS_THREADS

...
comment "gconf requires a toolchain with thread support"
	depends on !BR2_TOOLCHAIN_HAS_THREADS


> +	select BR2_PACKAGE_LIBXML2
> +	help
> +	  The GConf package contains a configuration database system used by many GNOME
> +	  applications.

  Word-wrap at 80 columns.

> +
> +	  http://ftp.gnome.org/pub/gnome/sources/GConf/3.2

  Is there no real website to refer to?

> +

  Spurious line at end of file.

> diff --git a/package/gconf/gconf.mk b/package/gconf/gconf.mk
> new file mode 100644
> index 0000000..8eefc05
> --- /dev/null
> +++ b/package/gconf/gconf.mk
> @@ -0,0 +1,26 @@
> +#############################################################
> +#
> +# GConf
> +#
> +#############################################################
> +
> +GCONF_VERSION = 3.2.0
> +GCONF_SOURCE = GConf-$(GCONF_VERSION).tar.xz
> +GCONF_SITE = http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/

  For situations like this, we typically use
GCONF_VERSION_MAJOR = 3.2
GCONF_VERSION       = $(GCONF_VERSION_MAJOR).0
GCONF_SITE          = http://ftp.gnome.org/pub/gnome/sources/GConf/$(GCONF_VERSION_MAJOR)
GCONF_SOURCE        = GConf-$(GCONF_VERSION).tar.xz

  (As an aside: I personally prefer aligning the =, and I find
it more natural to put SOURCE after SITE. But those are not real
buildroot 'rules').

> +GCONF_DEPENDENCIES = dbus-glib intltool libxml2

  host-intltool, most likely.

> +GCONF_INSTALL_STAGING = YES
> +GCONF_CONF_OPT += --sysconfdir=/etc --libexecdir=/usr/lib/GConf --disable-orbit

  --sysconfdir=/etc is already in the standard configure
options.

  For --libexecdir, we usually use /usr/lib without subdirectory.

> +GCONF_LICENSE = GPLv2

  I haven't checked, but I would expect the gnome people to make
it GPLv2+.  Can you verify again?

> +GCONG_LICENSE_FILE = COPYING
> +
> +define GCONF_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +
> +	(cd $(@D); \

  cd is unneeded here.

> +	install -v -m755 -d $(TARGET_DIR)/etc/gconf/gconf.xml.system)

  mkdir -p is better. Though I don't see why you need to create an
empty directory...

  Also, it's better to put this in POST_INSTALL_TARGET_HOOKS,
then you don't have to re-insert the default install commands.

> +
> +endef
> +
> +$(eval $(autotools-package))
> +
> +

  Spurious newlines at end of file.


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-09-05 14:29 ` [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin Stefan Fröberg
@ 2012-10-20 15:55   ` Arnout Vandecappelle
  2012-10-21 12:10     ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-10-20 15:55 UTC (permalink / raw)
  To: buildroot

On 05/09/12 16:29, Stefan Fr?berg wrote:
>
> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>

  Finally got 'round to reviewing this patch.  Review only, no testing.

> ---
>   package/gnash/Config.in                            |   20 +++
>   package/gnash/gnash-0.8.10-amf-include.patch       |   45 +++++
>   package/gnash/gnash-0.8.10-cve-2012-1175.patch     |   63 +++++++
>   package/gnash/gnash-0.8.10-external-dejagnu.patch  |   24 +++
>   package/gnash/gnash-0.8.10-gettext-macro.patch     |  170 ++++++++++++++++++++
>   package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch |   52 ++++++
>   package/gnash/gnash-0.8.10-kde4-libdir.patch       |   12 ++
>   package/gnash/gnash-0.8.10-klash.patch             |   12 ++
>   package/gnash/gnash-0.8.10-npapi-sdk.patch         |   29 ++++
>   package/gnash/gnash.mk                             |   45 +++++
>   10 files changed, 472 insertions(+), 0 deletions(-)
>   create mode 100644 package/gnash/Config.in
>   create mode 100644 package/gnash/gnash-0.8.10-amf-include.patch
>   create mode 100644 package/gnash/gnash-0.8.10-cve-2012-1175.patch
>   create mode 100644 package/gnash/gnash-0.8.10-external-dejagnu.patch
>   create mode 100644 package/gnash/gnash-0.8.10-gettext-macro.patch
>   create mode 100644 package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
>   create mode 100644 package/gnash/gnash-0.8.10-kde4-libdir.patch
>   create mode 100644 package/gnash/gnash-0.8.10-klash.patch
>   create mode 100644 package/gnash/gnash-0.8.10-npapi-sdk.patch
>   create mode 100644 package/gnash/gnash.mk
>
> diff --git a/package/gnash/Config.in b/package/gnash/Config.in
> new file mode 100644
> index 0000000..437b8d8
> --- /dev/null
> +++ b/package/gnash/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_GNASH
> +	bool "Enable Adobe Flash support with GNU gnash"
> +	select BR2_PACKAGE_AGG
> +	select BR2_PACKAGE_BOOST
> +	select BR2_PACKAGE_GST_FFMPEG
> +	select BR2_PACKAGE_GCONF
> +	select BR2_PACKAGE_GIFLIB
> +	select BR2_PACKAGE_OPENSSL
> +	depends on BR2_PACKAGE_FIREFOX

  Gnash is a stand-alone executable, no?  It can also run without
firefox, right?

> +	help
> +	  Gnash is the GNU Flash movie player and browser plugin. This is useful for watching
> +	  YouTube videos or simple flash animations.
> +
> +	  Currently, Gnash can play SWF files up to version 7, and 80% of ActionScript 2.0.
> +	  For full, open source Flash support you could try to use Lightspark with Gnash.
> +	  That is, for newer SWF files Lightspark will be used and it will fallback to
> +	  using Gnash with older versions.

  Word wrap help text at 80 columns (where tab counts as 8).

> +
> +	  http://ftp.gnu.org/pub/gnu/gnash

  http://www.gnashdev.org/ or http://www.gnu.org/software/gnash/ seems
more appropriate.

> +

  Trailing empty line.

> diff --git a/package/gnash/gnash-0.8.10-amf-include.patch b/package/gnash/gnash-0.8.10-amf-include.patch
> new file mode 100644
> index 0000000..983fa6b
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-amf-include.patch
> @@ -0,0 +1,45 @@

  Missing explanation + SOB.

> +diff -ur a/cygnal/libnet/cque.h b/cygnal/libnet/cque.h
> +--- a/cygnal/libnet/cque.h	2012-01-19 20:17:47.000000000 +0100
> ++++ b/cygnal/libnet/cque.h	2012-02-23 20:13:39.000000000 +0100
> +@@ -25,8 +25,9 @@
> + #include<boost/thread/condition.hpp>
> + #include<deque>
> +
> ++#include "../libamf/amf.h"
> + #include "getclocktime.hpp"
> +-#include "buffer.h"
> ++#include "../libamf/buffer.h"

  That's weird...  It would seem that gnash wouldn't compile for anyone without
this patch...

> + #include "network.h"
> + #include "dsodefs.h" //For DSOEXPORT.
> +
> +diff -ur a/cygnal/libnet/sshclient.h b/cygnal/libnet/sshclient.h
> +--- a/cygnal/libnet/sshclient.h	2012-01-19 20:17:47.000000000 +0100
> ++++ b/cygnal/libnet/sshclient.h	2012-02-23 20:13:09.000000000 +0100
> +@@ -32,9 +32,10 @@
> + #include<libssh/sftp.h>
> + }
> +
> ++#include "../libamf/amf.h"
> + #include "cque.h"
> + #include "network.h"
> +-#include "buffer.h"
> ++#include "../libamf/buffer.h"
> +
> + namespace gnash
> + {
> +diff -ur a/cygnal/libnet/sslclient.h b/cygnal/libnet/sslclient.h
> +--- a/cygnal/libnet/sslclient.h	2012-01-19 20:17:47.000000000 +0100
> ++++ b/cygnal/libnet/sslclient.h	2012-02-23 20:13:21.000000000 +0100
> +@@ -36,10 +36,11 @@
> + #include<openssl/err.h>
> + #endif
> +
> ++#include "../libamf/amf.h"
> + #include "dsodefs.h"
> + #include "cque.h"
> + #include "network.h"
> +-#include "buffer.h"
> ++#include "../libamf/buffer.h"
> +
> +
> + namespace gnash
> diff --git a/package/gnash/gnash-0.8.10-cve-2012-1175.patch b/package/gnash/gnash-0.8.10-cve-2012-1175.patch
> new file mode 100644
> index 0000000..9a218d9
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-cve-2012-1175.patch
> @@ -0,0 +1,63 @@
> +From bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 Mon Sep 17 00:00:00 2001
> +From: Benjamin Wolsey<bwy@benjaminwolsey.de>
> +Date: Sat, 10 Mar 2012 14:52:50 +0000
> +Subject: Fix crash in GnashImage.cpp

  You still need to add your Signed-off-by tag here, to keep track of the
delivery path.  At least, that's how I interpret the rules.  Peter?

[snip]
> diff --git a/package/gnash/gnash-0.8.10-external-dejagnu.patch b/package/gnash/gnash-0.8.10-external-dejagnu.patch
> new file mode 100644
> index 0000000..eaffda7
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-external-dejagnu.patch
> @@ -0,0 +1,24 @@

  Missing explanation + SOB.

> +diff -ur a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
> +--- a/plugin/npapi/test.cpp	2011-03-13 17:47:36.000000000 +0100
> ++++ b/plugin/npapi/test.cpp	2011-03-20 23:52:20.369998096 +0100
> +@@ -35,7 +35,7 @@
> + #include "npfunctions.h"
> + #endif
> + #include "pluginbase.h"
> +-#include "dejagnu.h"
> ++#include<dejagnu.h>
> + #include "../../testsuite/check.h"
> + #include<regex.h>
> +
> +diff -ur a/testsuite/check.h b/testsuite/check.h
> +--- a/testsuite/check.h	2011-02-26 19:11:08.000000000 +0100
> ++++ b/testsuite/check.h	2011-03-20 23:52:32.570998094 +0100
> +@@ -29,7 +29,7 @@
> +
> + #define HAVE_DEJAGNU_H 1 // we ship our own now...
> + #ifdef HAVE_DEJAGNU_H
> +-#include "dejagnu.h"
> ++#include<dejagnu.h>
> +
> + #define info(x) note x
> +
> diff --git a/package/gnash/gnash-0.8.10-gettext-macro.patch b/package/gnash/gnash-0.8.10-gettext-macro.patch

  Missing explanation + SOB.

  I don't understand how this one can be needed, since gnash indirectly depends
on libglib2 which depends on gettext.

> new file mode 100644
> index 0000000..0501f74
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-gettext-macro.patch
> @@ -0,0 +1,170 @@
> +diff -ur a/libdevice/vaapi/VaapiImage.cpp b/libdevice/vaapi/VaapiImage.cpp
> +--- a/libdevice/vaapi/VaapiImage.cpp	2012-01-19 20:17:48.000000000 +0100
> ++++ b/libdevice/vaapi/VaapiImage.cpp	2012-02-23 19:05:13.000000000 +0100
> +@@ -35,7 +35,7 @@
> +     : _format(format)
> +     , _image_data(NULL)
> + {
> +-    log_debug(_("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format)));
> ++    log_debug("VaapiImage::VaapiImage(): format '%s'\n", string_of_FOURCC(format));
> +
> +     memset(&_image, 0, sizeof(_image));
> +     _image.image_id = VA_INVALID_ID;
[snip]
> diff --git a/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch b/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
> new file mode 100644
> index 0000000..413744c
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
> @@ -0,0 +1,52 @@

  Missing explanation + SOB.

> +diff -Naur gnash-0.8.10.alt/libbase/jemalloc.c gnash-0.8.10/libbase/jemalloc.c
> +--- gnash-0.8.10.alt/libbase/jemalloc.c	2012-02-07 09:39:41.000000000 +0100
> ++++ gnash-0.8.10/libbase/jemalloc.c	2012-02-24 18:36:47.000000000 +0100
> +@@ -429,7 +429,7 @@
> + static const bool __isthreaded = true;
> + #endif
> +
> +-#if defined(MOZ_MEMORY_SOLARIS)&&  defined(MAP_ALIGN)&&  !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
> ++#if defined(MOZ_MEMORY_SOLARIS)&&  defined(MAP_ALIGN)&&  !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) || defined(MOZ_MEMORY_LINUX)

  Add () to make the precedence more explicit.

> + #define JEMALLOC_USES_MAP_ALIGN	 /* Required on Solaris 10. Might improve performance elsewhere. */
> + #endif
> +
> +@@ -2238,6 +2238,7 @@
> + 	 * We don't use MAP_FIXED here, because it can cause the *replacement*
> + 	 * of existing mappings, and we only want to create new mappings.
> + 	 */
> ++#ifdef MOZ_MEMORY_SOLARIS
> + #ifdef MALLOC_PAGEFILE
> + 	if (pfd != -1) {
> + 		ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
> +@@ -2252,6 +2253,31 @@
> +
> + 	if (ret == MAP_FAILED)
> + 		ret = NULL;
> ++#else /* !MOZ_MEMORY_SOLARIS */
> ++#ifdef MALLOC_PAGEFILE
> ++	if (pfd != -1) {
> ++		ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
> ++		    MAP_NOSYNC, pfd, 0);
> ++	} else
> ++#endif
> ++	       {
> ++		ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE |
> ++		    MAP_NOSYNC | MAP_ANON, -1, 0);
> ++	}
> ++	assert(ret != NULL);
> ++
> ++	if (ret == MAP_FAILED)
> ++		return NULL;
> ++	
> ++	uintptr_t aligned_ret;
> ++	size_t extra_size;
> ++	aligned_ret = (uintptr_t)ret + alignment - 1;
> ++	aligned_ret&= ~(alignment - 1);
> ++	extra_size = aligned_ret - (uintptr_t)ret;
> ++	munmap(ret, extra_size);
> ++	munmap(ret + extra_size + size, alignment - extra_size);
> ++	ret = (void*)aligned_ret;
> ++#endif /* ifdef MOZ_MEMORY_SOLARIS*/
> + 	return (ret);
> + }
> + #endif
> diff --git a/package/gnash/gnash-0.8.10-kde4-libdir.patch b/package/gnash/gnash-0.8.10-kde4-libdir.patch
> new file mode 100644
> index 0000000..b327944
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-kde4-libdir.patch
> @@ -0,0 +1,12 @@

  Missing explanation + SOB.

  Is this patch relevant?  We don't have KDE in buildroot, so why would
we want patches for it?

> +diff -ur a/macros/kde4.m4 b/macros/kde4.m4
> +--- a/macros/kde4.m4	2011-02-26 19:11:08.000000000 +0100
> ++++ b/macros/kde4.m4	2011-11-25 18:09:25.000000000 +0100
> +@@ -198,7 +198,7 @@
> +       if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then
> +         KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4"
> +       else
> +-        KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
> ++        KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4"
> +       fi
> +     fi
> +     if test x"${with_kde4_servicesdir}" != x ; then
> diff --git a/package/gnash/gnash-0.8.10-klash.patch b/package/gnash/gnash-0.8.10-klash.patch
> new file mode 100644
> index 0000000..e6afec0
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-klash.patch
> @@ -0,0 +1,12 @@
> +diff -ur a/macros/kde4.m4 b/macros/kde4.m4
> +--- a/macros/kde4.m4	2011-02-26 19:11:08.000000000 +0100
> ++++ b/macros/kde4.m4	2011-03-21 00:04:38.845997945 +0100
> +@@ -210,7 +210,7 @@
> +       KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
> +     fi
> +     if test x"${KDE4_APPSDATADIR}" = x ; then
> +-      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
> ++      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
> +     fi
> +
> +   if test x"${ac_cv_path_kde4_incl}" != x ; then
> diff --git a/package/gnash/gnash-0.8.10-npapi-sdk.patch b/package/gnash/gnash-0.8.10-npapi-sdk.patch
> new file mode 100644
> index 0000000..eb54295
> --- /dev/null
> +++ b/package/gnash/gnash-0.8.10-npapi-sdk.patch
> @@ -0,0 +1,29 @@
> +From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?=<mgorny@gentoo.org>
> +Date: Thu, 15 Sep 2011 12:59:55 +0200
> +Subject: [PATCH] Support building against NPAPI-SDK as well.

  Add your SOB.

> +
> +---
> + macros/npapi.m4 |    6 +++++-
> + 1 files changed, 5 insertions(+), 1 deletions(-)
> +
> +diff --git a/macros/npapi.m4 b/macros/npapi.m4
> +index e3bde2f..522bbb1 100644
> +--- a/macros/npapi.m4
> ++++ b/macros/npapi.m4
> +@@ -34,7 +34,11 @@ AC_DEFUN([GNASH_PATH_NPAPI],
> +
> +   if test x$cross_compiling = xno; then
> +     if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_npapi_incl}" = x; then
> +-      $PKG_CONFIG --exists mozilla-plugin&&  NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
> ++      if $PKG_CONFIG --exists npapi-sdk; then
> ++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags npapi-sdk`"
> ++      elif $PKG_CONFIG --exists mozilla-plugin; then
> ++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
> ++      fi
> +     fi
> +   fi
> +
> +--
> +1.7.3.4
> +
> diff --git a/package/gnash/gnash.mk b/package/gnash/gnash.mk
> new file mode 100644
> index 0000000..7a2dd8e
> --- /dev/null
> +++ b/package/gnash/gnash.mk
> @@ -0,0 +1,45 @@
> +#############################################################
> +#
> +# gnash
> +#
> +#############################################################
> +
> +GNASH_VERSION = 0.8.10
> +GNASH_SOURCE = gnash-$(GNASH_VERSION).tar.gz
> +
> +# GNU tarball from:
> +# http://ftp.gnu.org/pub/gnu/gnash/$(GNASH_VERSION)/
> +# is broken. It is missing GnashVaapiTexture.h so you
> +# can't even try to build VA API Hardware Accelerated Flash player.
> +# (note that it is not working ... yet)
> +#
> +# http://savannah.gnu.org/bugs/?35612
> +#
> +# That's why we use gentoo one from one of the mirrors.
> +GNASH_SITE = http://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/
> +GNASH_DEPENDENCIES = agg boost gst-ffmpeg firefox gconf giflib openssl
> +GNASH_AUTORECONF = YES
> +
> +GNASH_CONF_ENV = PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
> +		 PKG_CONFIG_DIR= \
> +		 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \
> +		 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
> +		 PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \

  All this shouldn't be necessary.

> +		 CPPFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags gdk-pixbuf-2.0`" \
> +		 LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs gdk-pixbuf-2.0` `$(PKG_CONFIG_HOST_BINARY) --libs libva-x11`"

  Better define GNASH_CPPFLAGS and GNASH_LIBS separately and use
those variables here.

> +
> +GNASH_CONF_OPT +=  --enable-gui=gtk --enable-media=ffmpeg --with-sysroot=$(STAGING_DIR)/usr \
> +		   --with-npapi-incl=$(STAGING_DIR)/usr/include/npapi \
> +		   --with-npapi-plugindir=$(TARGET_DIR)/usr/lib/mozilla/plugins \
> +		   --enable-renderer=agg,cairo --enable-doublebuf --enable-visibility --enable-offscreen --enable-ssl

  Shouldn't cairo be a dependency as well?

  Can ssl be made optional with
ifeq ($(BR2_PACKAGE_OPENSSL),y)
GNASH_CONF_OPT += --enable-ssl
GNASH_CONF_DEPENDENCES += openssl
else
GNASH_CONF_OPT += --disable-ssl
endif

?

> +
> +define GNASH_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-plugin

  I would add the install-plugin only if firefox is selected.

> +endef
> +
> +$(eval $(autotools-package))
> +
> +
> +
> +

  Redundant empty lines.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-10-20 15:55   ` Arnout Vandecappelle
@ 2012-10-21 12:10     ` Stefan Fröberg
  2012-10-23 16:42       ` Arnout Vandecappelle
  0 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-10-21 12:10 UTC (permalink / raw)
  To: buildroot

20.10.2012 18:55, Arnout Vandecappelle kirjoitti:
> On 05/09/12 16:29, Stefan Fr?berg wrote:
>>
>> Signed-off-by: Stefan Fr?berg<stefan.froberg@petroprogram.com>
>
>  Finally got 'round to reviewing this patch.  Review only, no testing.
>
>> ---
>>   package/gnash/Config.in                            |   20 +++
>>   package/gnash/gnash-0.8.10-amf-include.patch       |   45 +++++
>>   package/gnash/gnash-0.8.10-cve-2012-1175.patch     |   63 +++++++
>>   package/gnash/gnash-0.8.10-external-dejagnu.patch  |   24 +++
>>   package/gnash/gnash-0.8.10-gettext-macro.patch     |  170
>> ++++++++++++++++++++
>>   package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch |   52 ++++++
>>   package/gnash/gnash-0.8.10-kde4-libdir.patch       |   12 ++
>>   package/gnash/gnash-0.8.10-klash.patch             |   12 ++
>>   package/gnash/gnash-0.8.10-npapi-sdk.patch         |   29 ++++
>>   package/gnash/gnash.mk                             |   45 +++++
>>   10 files changed, 472 insertions(+), 0 deletions(-)
>>   create mode 100644 package/gnash/Config.in
>>   create mode 100644 package/gnash/gnash-0.8.10-amf-include.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-cve-2012-1175.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-external-dejagnu.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-gettext-macro.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-kde4-libdir.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-klash.patch
>>   create mode 100644 package/gnash/gnash-0.8.10-npapi-sdk.patch
>>   create mode 100644 package/gnash/gnash.mk
>>
>> diff --git a/package/gnash/Config.in b/package/gnash/Config.in
>> new file mode 100644
>> index 0000000..437b8d8
>> --- /dev/null
>> +++ b/package/gnash/Config.in
>> @@ -0,0 +1,20 @@
>> +config BR2_PACKAGE_GNASH
>> +    bool "Enable Adobe Flash support with GNU gnash"
>> +    select BR2_PACKAGE_AGG
>> +    select BR2_PACKAGE_BOOST
>> +    select BR2_PACKAGE_GST_FFMPEG
>> +    select BR2_PACKAGE_GCONF
>> +    select BR2_PACKAGE_GIFLIB
>> +    select BR2_PACKAGE_OPENSSL
>> +    depends on BR2_PACKAGE_FIREFOX
>
>  Gnash is a stand-alone executable, no?  It can also run without
> firefox, right?
>

Hmmm...
Yes, but I haven't much bothered of using or testing playing
flash-files  outside of Firefox
 
>> diff --git a/package/gnash/gnash-0.8.10-kde4-libdir.patch
>> b/package/gnash/gnash-0.8.10-kde4-libdir.patch
>> new file mode 100644
>> index 0000000..b327944
>> --- /dev/null
>> +++ b/package/gnash/gnash-0.8.10-kde4-libdir.patch
>> @@ -0,0 +1,12 @@
>
>  Missing explanation + SOB.
>
>  Is this patch relevant?  We don't have KDE in buildroot, so why would
> we want patches for it?
>

Sorry, my bad.
I "borrowed" almost all those gnash patches from my Gentoo Linux
installation and that's why it got
accidentally included.


>> +diff -ur a/macros/kde4.m4 b/macros/kde4.m4
>> +--- a/macros/kde4.m4    2011-02-26 19:11:08.000000000 +0100
>> ++++ b/macros/kde4.m4    2011-11-25 18:09:25.000000000 +0100
>> +@@ -198,7 +198,7 @@
>> +       if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then
>> +         KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4"
>> +       else
>> +-        KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
>> ++        KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4"
>> +       fi
>> +     fi
>> +     if test x"${with_kde4_servicesdir}" != x ; then
>> diff --git a/package/gnash/gnash-0.8.10-klash.patch
>> b/package/gnash/gnash-0.8.10-klash.patch
>> new file mode 100644
>> index 0000000..e6afec0
>> --- /dev/null
>> +++ b/package/gnash/gnash-0.8.10-klash.patch
>> @@ -0,0 +1,12 @@
>> +diff -ur a/macros/kde4.m4 b/macros/kde4.m4
>> +--- a/macros/kde4.m4    2011-02-26 19:11:08.000000000 +0100
>> ++++ b/macros/kde4.m4    2011-03-21 00:04:38.845997945 +0100
>> +@@ -210,7 +210,7 @@
>> +       KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
>> +     fi
>> +     if test x"${KDE4_APPSDATADIR}" = x ; then
>> +-      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
>> ++      KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
>> +     fi
>> +
>> +   if test x"${ac_cv_path_kde4_incl}" != x ; then
>> diff --git a/package/gnash/gnash-0.8.10-npapi-sdk.patch
>> b/package/gnash/gnash-0.8.10-npapi-sdk.patch
>> new file mode 100644
>> index 0000000..eb54295
>> --- /dev/null
>> +++ b/package/gnash/gnash-0.8.10-npapi-sdk.patch
>> @@ -0,0 +1,29 @@
>> +From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001
>> +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?=<mgorny@gentoo.org>
>> +Date: Thu, 15 Sep 2011 12:59:55 +0200
>> +Subject: [PATCH] Support building against NPAPI-SDK as well.
>
>  Add your SOB.
>
>> +
>> +---
>> + macros/npapi.m4 |    6 +++++-
>> + 1 files changed, 5 insertions(+), 1 deletions(-)
>> +
>> +diff --git a/macros/npapi.m4 b/macros/npapi.m4
>> +index e3bde2f..522bbb1 100644
>> +--- a/macros/npapi.m4
>> ++++ b/macros/npapi.m4
>> +@@ -34,7 +34,11 @@ AC_DEFUN([GNASH_PATH_NPAPI],
>> +
>> +   if test x$cross_compiling = xno; then
>> +     if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_npapi_incl}" = x;
>> then
>> +-      $PKG_CONFIG --exists mozilla-plugin&& 
>> NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
>> ++      if $PKG_CONFIG --exists npapi-sdk; then
>> ++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags npapi-sdk`"
>> ++      elif $PKG_CONFIG --exists mozilla-plugin; then
>> ++        NPAPI_CFLAGS="`$PKG_CONFIG --cflags mozilla-plugin`"
>> ++      fi
>> +     fi
>> +   fi
>> +
>> +--
>> +1.7.3.4
>> +
>> diff --git a/package/gnash/gnash.mk b/package/gnash/gnash.mk
>> new file mode 100644
>> index 0000000..7a2dd8e
>> --- /dev/null
>> +++ b/package/gnash/gnash.mk
>> @@ -0,0 +1,45 @@
>> +#############################################################
>> +#
>> +# gnash
>> +#
>> +#############################################################
>> +
>> +GNASH_VERSION = 0.8.10
>> +GNASH_SOURCE = gnash-$(GNASH_VERSION).tar.gz
>> +
>> +# GNU tarball from:
>> +# http://ftp.gnu.org/pub/gnu/gnash/$(GNASH_VERSION)/
>> +# is broken. It is missing GnashVaapiTexture.h so you
>> +# can't even try to build VA API Hardware Accelerated Flash player.
>> +# (note that it is not working ... yet)
>> +#
>> +# http://savannah.gnu.org/bugs/?35612
>> +#
>> +# That's why we use gentoo one from one of the mirrors.
>> +GNASH_SITE = http://ftp.uni-erlangen.de/pub/mirrors/gentoo/distfiles/
>> +GNASH_DEPENDENCIES = agg boost gst-ffmpeg firefox gconf giflib openssl
>> +GNASH_AUTORECONF = YES
>> +
>> +GNASH_CONF_ENV = PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
>> +         PKG_CONFIG_DIR= \
>> +        
>> PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig"
>> \
>> +         PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
>> +         PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
>
>  All this shouldn't be necessary.
>
>> +         CPPFLAGS="`$(PKG_CONFIG_HOST_BINARY) --cflags
>> gdk-pixbuf-2.0`" \
>> +         LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs gdk-pixbuf-2.0`
>> `$(PKG_CONFIG_HOST_BINARY) --libs libva-x11`"
>
>  Better define GNASH_CPPFLAGS and GNASH_LIBS separately and use
> those variables here.
>
>> +
>> +GNASH_CONF_OPT +=  --enable-gui=gtk --enable-media=ffmpeg
>> --with-sysroot=$(STAGING_DIR)/usr \
>> +           --with-npapi-incl=$(STAGING_DIR)/usr/include/npapi \
>> +          
>> --with-npapi-plugindir=$(TARGET_DIR)/usr/lib/mozilla/plugins \
>> +           --enable-renderer=agg,cairo --enable-doublebuf
>> --enable-visibility --enable-offscreen --enable-ssl
>
>  Shouldn't cairo be a dependency as well?
>

My mistake, it's optional. Or actually it's only one of the supported
renderers.
I intended to later make subconfig option where user could select what
renderer to use (agg, cairo,opengl or all).

If I understanded correctly from the Gnash website, the agg renderer is
the fastest and preferred way and only
after that comes the rest.

>  Can ssl be made optional with
> ifeq ($(BR2_PACKAGE_OPENSSL),y)
> GNASH_CONF_OPT += --enable-ssl
> GNASH_CONF_DEPENDENCES += openssl
> else
> GNASH_CONF_OPT += --disable-ssl
> endif
>
> ?
>
Yes it can. I will add it

>> +
>> +define GNASH_INSTALL_TARGET_CMDS
>> +    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
>> +    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-plugin
>
>  I would add the install-plugin only if firefox is selected.
>
>> +endef
>> +
>> +$(eval $(autotools-package))
>> +
>> +
>> +
>> +
>
>  Redundant empty lines.
>
>  Regards,
>  Arnout

Thank you. To tell the truth I was in a little hurry to kick this patch
out before my vacation and didn't give it as much tought as
I did for Firefox itself and it's dependencies.

I was just happy to get it to play YouTube videos :)

Anyway, I have now finally managed to build basic ARM-image (for
versatile board) that boot's under qemu and can now continue building
xorg and the rest of the stuff.
And then Im going to fetch that arm-patch for Firefox you mentioned in
your previous posting.


Tell me Arnout, is the ARM-world really this ... complicated ?

I mean, there at least two dozens of defconfig files for various arm
vendor boards under linux source tree arch/arm/config.
And those config-files are just for boards right ??

Am I correct to presume that there are at least almost hundred of
different vendor board + arm cpu compinations that
are more or less incompatible with each other ?

And in addition to that, I must take into account if the arm-cpu Im
cross-compiling stuff for has softfp or hardfp and the type of fp (vpf,
neon etc....) ?



Regards
Stefan

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-10-21 12:10     ` Stefan Fröberg
@ 2012-10-23 16:42       ` Arnout Vandecappelle
  2012-10-24 13:43         ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-10-23 16:42 UTC (permalink / raw)
  To: buildroot

On 21/10/12 14:10, Stefan Fr?berg wrote:
> 20.10.2012 18:55, Arnout Vandecappelle kirjoitti:
>> On 05/09/12 16:29, Stefan Fr?berg wrote:
>>>
[snip]
>>> --with-npapi-plugindir=$(TARGET_DIR)/usr/lib/mozilla/plugins \
>>> +           --enable-renderer=agg,cairo --enable-doublebuf
>>> --enable-visibility --enable-offscreen --enable-ssl
>>
>>   Shouldn't cairo be a dependency as well?
>>
>
> My mistake, it's optional. Or actually it's only one of the supported
> renderers.
> I intended to later make subconfig option where user could select what
> renderer to use (agg, cairo,opengl or all).
>
> If I understanded correctly from the Gnash website, the agg renderer is
> the fastest and preferred way and only
> after that comes the rest.


  Then I'd start with supporting only the agg renderer, and leave a
comment in the .mk file that mentions the absence of support for
cairo and opengl.

[snip]
> Tell me Arnout, is the ARM-world really this ... complicated ?
>
> I mean, there at least two dozens of defconfig files for various arm
> vendor boards under linux source tree arch/arm/config.
> And those config-files are just for boards right ??
>
> Am I correct to presume that there are at least almost hundred of
> different vendor board + arm cpu compinations that
> are more or less incompatible with each other ?

  Yes, there are two reasons for that:

- Unlike for PCs, there is no BIOS in embedded platforms to hide the
board configuration.  So the BSP has to be part of the kernel.  That is
partially solved with a device tree, but even so you have to select a
device tree for your particular board.

- Unlike for PowerPC, the ARM core is used by many SoC vendors who make
completely different CPUs out of it.  Since an OS is actually about
managing everything around the CPU core itself, there's a big impact on
the Linux kernel. That's why you'll often see SoC-specific kernel
patches.

  However, this complexity shouldn't affect your use of buildroot too
much - at least if there's a defconfig for your board available in
U-Boot and in the kernel.


> And in addition to that, I must take into account if the arm-cpu Im
> cross-compiling stuff for has softfp or hardfp and the type of fp (vpf,
> neon etc....) ?

  That's in fact the same on x86, only nobody uses things like -mfpmath=sse
and just uses generic 387 code.


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-10-23 16:42       ` Arnout Vandecappelle
@ 2012-10-24 13:43         ` Stefan Fröberg
  2012-10-24 20:43           ` Arnout Vandecappelle
  0 siblings, 1 reply; 33+ messages in thread
From: Stefan Fröberg @ 2012-10-24 13:43 UTC (permalink / raw)
  To: buildroot

23.10.2012 19:42, Arnout Vandecappelle kirjoitti:
> [snip]
>> Tell me Arnout, is the ARM-world really this ... complicated ?
>>
>> I mean, there at least two dozens of defconfig files for various arm
>> vendor boards under linux source tree arch/arm/config.
>> And those config-files are just for boards right ??
>>
>> Am I correct to presume that there are at least almost hundred of
>> different vendor board + arm cpu compinations that
>> are more or less incompatible with each other ?
>
>  Yes, there are two reasons for that:
>
> - Unlike for PCs, there is no BIOS in embedded platforms to hide the
> board configuration.  So the BSP has to be part of the kernel.  That is
> partially solved with a device tree, but even so you have to select a
> device tree for your particular board.
>
> - Unlike for PowerPC, the ARM core is used by many SoC vendors who make
> completely different CPUs out of it.  Since an OS is actually about
> managing everything around the CPU core itself, there's a big impact on
> the Linux kernel. That's why you'll often see SoC-specific kernel
> patches.
>
>  However, this complexity shouldn't affect your use of buildroot too
> much - at least if there's a defconfig for your board available in
> U-Boot and in the kernel.
>

I just read the following:
http://www.extremetech.com/mobile/137412-linux-kernel-version-3-7-will-support-multiple-arm-socs

So it seems things are now getting more easier.

Im certainly going to upgrade to that kernel version and try if I have
better luck
this time with exonys board (basically the same stuff that those Samsung
Galaxy S II and III are using ????)
under qemu.

>
>> And in addition to that, I must take into account if the arm-cpu Im
>> cross-compiling stuff for has softfp or hardfp and the type of fp (vpf,
>> neon etc....) ?
>
>  That's in fact the same on x86, only nobody uses things like
> -mfpmath=sse
> and just uses generic 387 code.
>
>

I didn't know about that optimization switch.
Maybe it will give my systems some extra boost  ...  :-)
Thanks!

Best Regards
Stefan

>  Regards,
>  Arnout
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-10-24 13:43         ` Stefan Fröberg
@ 2012-10-24 20:43           ` Arnout Vandecappelle
  2012-10-25 11:22             ` Stefan Fröberg
  0 siblings, 1 reply; 33+ messages in thread
From: Arnout Vandecappelle @ 2012-10-24 20:43 UTC (permalink / raw)
  To: buildroot

On 24/10/12 15:43, Stefan Fr?berg wrote:
> I just read the following:
> http://www.extremetech.com/mobile/137412-linux-kernel-version-3-7-will-support-multiple-arm-socs
>
> So it seems things are now getting more easier.
>
> Im certainly going to upgrade to that kernel version and try if I have
> better luck
> this time with exonys board (basically the same stuff that those Samsung
> Galaxy S II and III are using ????)
> under qemu.

  AFAIK that board is not yet part of the multiplatform patch.  And anyway, you
still need a boot loader that sets up the SDRAM correctly, so you still need the
correct U-Boot/Barebox/... config.

  But what is your problem exactly?  Set the kernel defconfig to 'exynos' and all
is well, no?

  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin
  2012-10-24 20:43           ` Arnout Vandecappelle
@ 2012-10-25 11:22             ` Stefan Fröberg
  0 siblings, 0 replies; 33+ messages in thread
From: Stefan Fröberg @ 2012-10-25 11:22 UTC (permalink / raw)
  To: buildroot

24.10.2012 23:43, Arnout Vandecappelle kirjoitti:
> On 24/10/12 15:43, Stefan Fr?berg wrote:
>> I just read the following:
>> http://www.extremetech.com/mobile/137412-linux-kernel-version-3-7-will-support-multiple-arm-socs
>>
>>
>> So it seems things are now getting more easier.
>>
>> Im certainly going to upgrade to that kernel version and try if I have
>> better luck
>> this time with exonys board (basically the same stuff that those Samsung
>> Galaxy S II and III are using ????)
>> under qemu.
>
>  AFAIK that board is not yet part of the multiplatform patch.  And
> anyway, you
> still need a boot loader that sets up the SDRAM correctly, so you
> still need the
> correct U-Boot/Barebox/... config.
>
>  But what is your problem exactly?  Set the kernel defconfig to
> 'exynos' and all
> is well, no?
>

For some reason I could not get it booting.  Just black screen in qemu.
Maybe I messed something in linux-menuconfig or is it because it needs
boot loader ?

But I could boot versatile image without anykind boot loader in the
image with this:

qemu-system-arm   -M versatilepb -kernel zImage -initrd initramfs.xz
-append "root=/dev/ram0"

Best regards
Stefan

>  Regards,
>  Arnout
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Buildroot] firefox: a new package
  2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
                   ` (8 preceding siblings ...)
  2012-09-05 14:29 ` [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin Stefan Fröberg
@ 2013-05-03 22:11 ` Thomas Petazzoni
  9 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-05-03 22:11 UTC (permalink / raw)
  To: buildroot

Dear Stefan Fr?berg,

On Wed,  5 Sep 2012 17:28:55 +0300, Stefan Fr?berg wrote:

> I finally got my lazy butt up and finished firefox and all
> it's minimal dependencies and changes.

I'm getting back to you regarding those Firefox patches. Is this a work
you intend to continue, or something you decided to give up on?

I'm asking because I'm trying to clean up the backlog of patches that
have not been applied, so I'd need to know whether those patches have a
future or not.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2013-05-03 22:11 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 14:28 [Buildroot] firefox: a new package Stefan Fröberg
2012-09-05 14:28 ` [Buildroot] [PATCH 1/9] firefox: host-python dependency needs --enable-unicodedata Stefan Fröberg
2012-09-05 14:28 ` [Buildroot] [PATCH 2/9] firefox: valgrind dependency needs --enable-tls for debug build Stefan Fröberg
2012-09-11 22:04   ` Arnout Vandecappelle
2012-09-11 23:39     ` Stefan Fröberg
2012-09-13  5:49       ` Arnout Vandecappelle
2012-09-05 14:28 ` [Buildroot] [PATCH 3/9] firefox: sqlite dependency needs new compile-time options Stefan Fröberg
2012-09-11 21:51   ` Arnout Vandecappelle
2012-09-11 23:35     ` Stefan Fröberg
2012-09-05 14:28 ` [Buildroot] [PATCH 4/9] firefox: installing default extensions needs host-xmlstarlet dependency Stefan Fröberg
2012-09-05 14:29 ` [Buildroot] [PATCH 5/9] firefox: installing default extensions needs host-unzip dependency Stefan Fröberg
2012-09-11 22:24   ` Arnout Vandecappelle
2012-09-12  0:05     ` Stefan Fröberg
2012-09-13  5:56       ` Arnout Vandecappelle
2012-09-05 14:29 ` [Buildroot] [PATCH 6/9] firefox: Mozilla Web Browser Stefan Fröberg
2012-09-17 22:31   ` Arnout Vandecappelle
2012-09-18 15:48     ` Stefan Fröberg
2012-09-18 21:25       ` Arnout Vandecappelle
2012-09-19  1:39         ` Stefan Fröberg
2012-09-19  1:35     ` Stefan Fröberg
2012-09-19  6:03       ` Arnout Vandecappelle
2012-09-05 14:29 ` [Buildroot] [PATCH 7/9] firefox: GNU gnash flash plugin needs agg dependency Stefan Fröberg
2012-09-19  5:30   ` Arnout Vandecappelle
2012-09-05 14:29 ` [Buildroot] [PATCH 8/9] firefox: GNU gnash flash plugin needs gconf dependency Stefan Fröberg
2012-09-19  6:16   ` Arnout Vandecappelle
2012-09-05 14:29 ` [Buildroot] [PATCH 9/9] firefox: GNU gnash flash, an open source Adobe Flash player & plugin Stefan Fröberg
2012-10-20 15:55   ` Arnout Vandecappelle
2012-10-21 12:10     ` Stefan Fröberg
2012-10-23 16:42       ` Arnout Vandecappelle
2012-10-24 13:43         ` Stefan Fröberg
2012-10-24 20:43           ` Arnout Vandecappelle
2012-10-25 11:22             ` Stefan Fröberg
2013-05-03 22:11 ` [Buildroot] firefox: a new package Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.