firefox: a new package
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
PATCH 1/9 firefox: host-python dependency needs --enable-unicodedata
--- package/python/python.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
package/python/python.mk +1 -1
@@ -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 \
Signature · 1 line
1.7.7.6
PATCH 2/9 firefox: valgrind dependency needs --enable-tls for debug build
In reply to Stefan Fröberg--- package/valgrind/valgrind.mk | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
package/valgrind/valgrind.mk +5 -0
@@ -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
Signature · 1 line
1.7.7.6
PATCH 2/9 firefox: valgrind dependency needs --enable-tls for debug build
package/valgrind/valgrind.mk line 15
Quoted 5 lines · Stefan Fr?berg
package/valgrind/valgrind.mk +4
-0+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
Signature · 6 lines
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
PATCH 2/9 firefox: valgrind dependency needs --enable-tls for debug build
12.9.2012 1:04, Arnout Vandecappelle kirjoitti:
Quoted 9 lines · Stefan Fr?berg
package/valgrind/valgrind.mk line 15
Quoted 5 lines
package/valgrind/valgrind.mk +4
-0+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)&& ($(BR2_GCC_ENABLE_TLS),y) +VALGRIND_CONF_OPT = --enable-tls +else VALGRIND_CONF_OPT = --disable-tls +endifI don't like this because it only works for internal toolchains.
Quoted 7 lines
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
Quoted 2 lines
Regards,
Arnout
PATCH 2/9 firefox: valgrind dependency needs --enable-tls for debug build
Quoted 18 lines · Stefan Fr?berg
12.9.2012 1:04, Arnout Vandecappelle kirjoitti:
Quoted 9 lines · Stefan Fr?berg
package/valgrind/valgrind.mk line 15
Quoted 5 lines
package/valgrind/valgrind.mk +4
-0+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)&& ($(BR2_GCC_ENABLE_TLS),y) +VALGRIND_CONF_OPT = --enable-tls +else VALGRIND_CONF_OPT = --disable-tls +endifI don't like this because it only works for internal toolchains.
Quoted 7 lines
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.
Quoted 1 line
Firefox did not complain about missing
valgrind.hfile ???
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
Signature · 6 lines
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
PATCH 3/9 firefox: sqlite dependency needs new compile-time options
In reply to Stefan Fröberg--- package/sqlite/Config.in | 34 ++++++++++++++++++++++++++++++++++ package/sqlite/sqlite.mk | 12 ++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-)
package/sqlite/Config.in +34 -0
@@ -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. +
package/sqlite/sqlite.mk +12 -0
@@ -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 = \
Signature · 1 line
1.7.7.6
PATCH 3/9 firefox: sqlite dependency needs new compile-time options
Quoted 2 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>
Small comments below.
Quoted 10 lines
--- package/sqlite/Config.in | 34 ++++++++++++++++++++++++++++++++++ package/sqlite/sqlite.mk | 12 ++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-)package/sqlite/Config.in +0
-0
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 26
Quoted 5 lines
package/sqlite/Config.in +2
-0@@ -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)"
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 27
Quoted 1 line
package/sqlite/Config.in +1
-0+ depends on BR2_PACKAGE_SQLITE
Instead of a "depends on" every time, just enclose all the options in an
if block.
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 31
Quoted 4 lines
package/sqlite/Config.in +4
-0+ 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.
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 34
Quoted 3 lines
package/sqlite/Config.in +3
-0+ +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY + bool "Enables sqlite3_unlock_notify() interface"
"sqlite3_unlock_notify() interface"
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 38
Quoted 4 lines
package/sqlite/Config.in +4
-0+ depends on BR2_PACKAGE_SQLITE + help + This option enables the sqlite3_unlock_notify() interface and its + accosiated functionality. See the documentation
associated
Quoted 9 lines
package/sqlite/Config.in +9
-0+ 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
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 57
Quoted 10 lines
package/sqlite/Config.in +10
-0+ 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
Signature · 6 lines
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
PATCH 3/9 firefox: sqlite dependency needs new compile-time options
Hello Arnout
12.9.2012 0:51, Arnout Vandecappelle kirjoitti:
Quoted 21 lines · Stefan Fr?berg
Quoted 2 lines
Signed-off-by Stefan Fr?berg<[email protected]>Small comments below.
Quoted 13 lines
--- package/sqlite/Config.in | 34 ++++++++++++++++++++++++++++++++++ package/sqlite/sqlite.mk | 12 ++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-)package/sqlite/Config.in +0
-0@@ -22,3 +22,37 @@ config BR2_PACKAGE_SQLITE_STAT3 planner that can help SQLite to choose a better query plan under certain situations.
Quoted 5 lines
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 26
Quoted 2 lines
package/sqlite/Config.in +2
-0+config BR2_PACKAGE_SQLITE_ENABLE_FTS3 + bool "Enables version 3 of the full-text search engine""Full-text search engine (fts3)"
Okay
Quoted 5 lines
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 27
Quoted 1 line
package/sqlite/Config.in +1
-0+ depends on BR2_PACKAGE_SQLITEInstead of a "depends on" every time, just enclose all the options in an
if block.
No problem
Quoted 7 lines
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 31
Quoted 4 lines
package/sqlite/Config.in +4
-0+ 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 ...
Quoted 4 lines
I'd just write:
Adds the full-text search engine (version 3) to the build.
Ok
Quoted 29 lines
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 34
Quoted 3 lines
package/sqlite/Config.in +3
-0+ +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY + bool "Enables sqlite3_unlock_notify() interface""
sqlite3_unlock_notify()interface"package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 38
Quoted 4 lines
package/sqlite/Config.in +4
-0+ depends on BR2_PACKAGE_SQLITE + help + This option enables the sqlite3_unlock_notify() interface and its + accosiated functionality. See the documentationassociated
Quoted 16 lines
package/sqlite/Config.in +1
-0+ http://www.sqlite.org/unlock_notify.html for additionalinformation.
package/sqlite/Config.in +8
-0+ +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_deletedefaults
package/sqlite/Config.in +3
-0+ to on. + + The secure_delete setting causes deleted content to beoverwritten
+ with zeros. There is a small performance penalty for this since
Quoted 9 lines
package/sqlite/Config.in config BR2_PACKAGE_SQLITE_STAT3 · line 57
Quoted 6 lines
package/sqlite/Config.in +6
-0+ 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
Quoted 4 lines
[snip]
Regards,
Arnout
PATCH 4/9 firefox: installing default extensions needs host-xmlstarlet dependency
In reply to Stefan Fröberg--- package/xmlstarlet/xmlstarlet.mk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
package/xmlstarlet/xmlstarlet.mk +1 -0
@@ -16,3 +16,4 @@ XMLSTARLET_CONF_OPT += --disable-static-libs \ --with-libiconv-prefix=${STAGING_DIR}/usr $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.7.7.6
PATCH 5/9 firefox: installing default extensions needs host-unzip dependency
In reply to Stefan Fröberg--- 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
package/Config.in +1 -0
@@ -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
package/unzip/Config.in new file +8 -0
@@ -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/
package/unzip/unzip-respect-flags.patch new file +23 -0
@@ -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
package/unzip/unzip.mk new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 5/9 firefox: installing default extensions needs host-unzip dependency
Quoted 30 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>--- 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.patchcreate mode 100644package/unzip/unzip.mkpackage/Config.in +1
-0@@ -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" endmenupackage/unzip/Config.in new file +0
-0
package/unzip/Config.in line 6
Quoted 6 lines
package/unzip/Config.in new file +6
-0@@ -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
package/unzip/unzip-respect-flags.patch
Quoted 8 lines
package/unzip/Config.in new file +2
-0+ + http://downloads.sourceforge.net/infozip/package/unzip/unzip-respect-flags.patch new file +0
-0@@ -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.
package/unzip/unzip-respect-flags.patch line 10
Quoted 10 lines
package/unzip/unzip-respect-flags.patch new file +10
-0+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)"
package/unzip/unzip-respect-flags.patch line 20
Quoted 10 lines
package/unzip/unzip-respect-flags.patch new file +10
-0++ 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?
Quoted 11 lines
package/unzip/unzip-respect-flags.patch new file +3
-0+ + # 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. -O3package/unzip/unzip.mk new file +2
-0@@ -0,0 +1,66 @@ +################################################################### +#
package/unzip/unzip.mk line 12
Quoted 10 lines
package/unzip/unzip.mk new file +10
-0+# 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.
package/unzip/unzip.mk line 21
Quoted 9 lines
package/unzip/unzip.mk new file +9
-0+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?
package/unzip/unzip.mk line 27
Quoted 6 lines
package/unzip/unzip.mk new file +6
-0+ $(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)
package/unzip/unzip.mk line 40
Quoted 13 lines
package/unzip/unzip.mk new file +13
-0+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.
package/unzip/unzip.mk line 48
Quoted 8 lines
package/unzip/unzip.mk new file +8
-0+ +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
Signature · 6 lines
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
PATCH 5/9 firefox: installing default extensions needs host-unzip dependency
12.9.2012 1:24, Arnout Vandecappelle kirjoitti:
Quoted 26 lines · Stefan Fr?berg
Quoted 25 lines
Signed-off-by Stefan Fr?berg<[email protected]>--- 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.patchcreate mode 100644package/unzip/unzip.mkpackage/Config.in +1
-0@@ -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
Quoted 17 lines
Quoted 10 lines
package/unzip/Config.in new file +4
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_UNZIP + bool "unzip" + help + The UnZip package contains ZIP extraction utilities. These areQuoted 4 lines
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
Quoted 12 lines
package/unzip/unzip-respect-flags.patch
Quoted 9 lines
package/unzip/Config.in new file +2
-0+ + http://downloads.sourceforge.net/infozip/package/unzip/unzip-respect-flags.patch new file +0
-0@@ -0,0 +1,23 @@Please add a comment at the top of the patch.
Quoted 8 lines
- Why is it needed
- Upstream status, if applicable
- Signed-of-by line
Also upstreaming the patch would be useful.
Okay
Quoted 28 lines
Quoted 11 lines
package/unzip/unzip-respect-flags.patch new file +7
-0+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 Linuxcompiles.'
+- $(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)"
Quoted 11 lines
++ 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 theinstall_asmtarget 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_makeQuoted 2 lines
+- $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall" ++ $(MAKE) unzips CC=$(CC) LD=$(CC) CFLAGS="$(CFLAGS)"
Quoted 6 lines
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
Quoted 18 lines
Quoted 18 lines
+
+ # Linux with lcc compiler:__inline__(stat.h) not recognized, and must edit
+ #/usr/include/gnu/types.hto get rid of "long long" if__LCC__defined. -O3package/unzip/unzip.mk new file +7
-0@@ -0,0 +1,66 @@ +################################################################### +# +# unzip +# +# quickly hacked from: +# http://www.linuxfromscratch.org/blfs/view/svn/general/unzip.html +###################################################################
Quoted 9 lines
package/unzip/unzip.mk line 12
Quoted 5 lines
package/unzip/unzip.mk new file +5
-0+ +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.gzWhy not just call it version 60? Then the
_SOURCEline isn't
needed.
Ok
Quoted 12 lines
package/unzip/unzip.mk line 21
Quoted 9 lines
package/unzip/unzip.mk new file +9
-0+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.
Quoted 18 lines
package/unzip/unzip.mk line 27
Quoted 6 lines
package/unzip/unzip.mk new file +6
-0+ $(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)
Quoted 9 lines
package/unzip/unzip.mk new file +9
-0+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
Quoted 9 lines
package/unzip/unzip.mk line 40
Quoted 4 lines
package/unzip/unzip.mk new file +4
-0+# and overwrite your busybox ... :-( +# +# That's why I included this as an primitive safety mechanism. +# Improvement are wellcomeAFAIK, 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.
Quoted 5 lines
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.
Quoted 6 lines
Quoted 6 lines
package/unzip/unzip.mk new file +6
-0+ +ifneq ($(BR2_PACKAGE_BUSYBOX),y) +ifeq ($(BR2_i386),y) || ($(BR2_x86_64),y) +# Intel x86 asm optimized version +define UNZIP_BUILD_CMDS + (cd $(@D);\
Quoted 9 lines
Quoted 4 lines
package/unzip/unzip.mk new file +2
-0+ 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 ...
:-(
Quoted 5 lines
[snip]
Regards,
Arnout
PATCH 5/9 firefox: installing default extensions needs host-unzip dependency
Quoted 2 lines · Stefan Fr?berg
12.9.2012 1:24, Arnout Vandecappelle kirjoitti:
Quoted 1 line · Stefan Fr?berg
[snip]
Quoted 11 lines
Quoted 8 lines
package/unzip/unzip.mk line 21
Quoted 5 lines
package/unzip/unzip.mk new file +5
-0+# 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.
Quoted 28 lines
Quoted 18 lines
package/unzip/unzip.mk line 27
Quoted 6 lines
package/unzip/unzip.mk new file +6
-0+ $(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)Quoted 9 lines
package/unzip/unzip.mk new file +9
-0+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 symlinkQuoted 9 lines
package/unzip/unzip.mk line 40
Quoted 4 lines
package/unzip/unzip.mk new file +4
-0+# and overwrite your busybox ... :-( +# +# That's why I included this as an primitive safety mechanism. +# Improvement are wellcomeAFAIK, 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:
Quoted 3 lines
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]
Quoted 1 line
Have you had time to check firefox patch #9 ? The gnash patch ?
Not yet, coming up.
Quoted 9 lines
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
Signature · 6 lines
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
PATCH 6/9 firefox: Mozilla Web Browser
In reply to Stefan Fröberg--- 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
package/Config.in +1 -0
@@ -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"
package/firefox/Config.in new file +417 -0
417 lines not on this page · raw message
package/firefox/firefox-11.0-NativeWindowHandle.patch new file +12 -0
@@ -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
package/firefox/firefox-11.0-execinfo.patch new file +45 -0
45 lines not on this page · raw message
package/firefox/firefox-11.0-isfinite.patch new file +22 -0
@@ -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
package/firefox/firefox-11.0-uclibc.patch new file +112 -0
112 lines not on this page · raw message
package/firefox/firefox-11.0-uintptr_t.patch new file +12 -0
@@ -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
package/firefox/firefox.mk new file +240 -0
240 lines not on this page · raw message
package/firefox/firefox_extensions.mk.in new file +168 -0
168 lines not on this page · raw message
package/firefox/mozconfig new file +35 -0
@@ -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
package/firefox/prefs.js new file +100 -0
100 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 6/9 firefox: Mozilla Web Browser
Quoted 1 line · Stefan Fr?berg
Signed-off-by Stefan Fr?berg <[email protected]>
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]
Quoted 6 lines
package/firefox/Config.in new file +0
-0
package/firefox/Config.in line 8
Quoted 8 lines
package/firefox/Config.in new file +8
-0@@ -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.
package/firefox/Config.in line 12
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ 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?
package/firefox/Config.in line 18
Quoted 6 lines
package/firefox/Config.in new file +6
-0+ 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)
package/firefox/Config.in line 22
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ 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.
package/firefox/Config.in
Quoted 6 lines
package/firefox/Config.in new file +6
-0+ +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?
package/firefox/Config.in line 32
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ 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.
Quoted 9 lines
package/firefox/Config.in new file +9
-0+ +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
package/firefox/Config.in line 51
Quoted 10 lines
package/firefox/Config.in new file +10
-0+ 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 :-)
Quoted 45 lines
package/firefox/Config.in new file +45
-0+ 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 +
package/firefox/Config.in line 106
Quoted 10 lines
package/firefox/Config.in new file +10
-0+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.
Quoted 36 lines
package/firefox/Config.in new file +36
-0+ +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"
package/firefox/Config.in line 152
Quoted 10 lines
package/firefox/Config.in new file +10
-0+ 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.
package/firefox/Config.in line 156
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ +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]
package/firefox/firefox-11.0-NativeWindowHandle.patch
Quoted 5 lines
package/firefox/firefox-11.0-NativeWindowHandle.patch new file +0
-0
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).
Quoted 21 lines
package/firefox/firefox-11.0-NativeWindowHandle.patch new file +12
-0@@ -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 platformpackage/firefox/firefox-11.0-execinfo.patch new file +2
-0@@ -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
package/firefox/firefox-11.0-execinfo.patch line 12
Quoted 10 lines
package/firefox/firefox-11.0-execinfo.patch new file +10
-0++++ 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]
Quoted 15 lines
package/firefox/firefox-11.0-isfinite.patch new file +9
-0@@ -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>
package/firefox/firefox-11.0-isfinite.patch line 19
Quoted 10 lines
package/firefox/firefox-11.0-isfinite.patch new file +10
-0++#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?
Quoted 9 lines
package/firefox/firefox-11.0-isfinite.patch new file +3
-0+ #else + return finite(d); + #endifpackage/firefox/firefox-11.0-uclibc.patch new file +0
-0
package/firefox/firefox-11.0-uclibc.patch line 9
Quoted 9 lines
package/firefox/firefox-11.0-uclibc.patch new file +9
-0@@ -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]
package/firefox/firefox-11.0-uclibc.patch line 97
Quoted 9 lines
package/firefox/firefox-11.0-uclibc.patch new file +9
-0+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.
Quoted 5 lines
package/firefox/firefox-11.0-uclibc.patch new file +5
-0+ #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
package/firefox/firefox-11.0-uclibc.patch line 112
Quoted 10 lines
package/firefox/firefox-11.0-uclibc.patch new file +10
-0++++ 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.
Quoted 6 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +0
-0
package/firefox/firefox-11.0-uintptr_t.patch line 10
Quoted 10 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +10
-0@@ -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)
Quoted 36 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +2
-0+ #endif + #endifpackage/firefox/firefox.mk new file +28
-0@@ -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 +#
package/firefox/firefox.mk line 38
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+# 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.
package/firefox/firefox.mk line 43
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+# +############################################################# +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/...
package/firefox/firefox.mk line 48
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+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 calledSET_DEBUG or something similar.
package/firefox/firefox.mk line 58
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+ 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).
Quoted 23 lines
package/firefox/firefox.mk new file +23
-0+ 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...) +##################################################################### +
package/firefox/firefox.mk line 91
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+# 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.
package/firefox/firefox.mk line 95
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ +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.
package/firefox/firefox.mk line 105
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+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?
package/firefox/firefox.mk line 110
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+ +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.
package/firefox/firefox.mk line 116
Quoted 6 lines
package/firefox/firefox.mk new file +6
-0+ +# 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)?
package/firefox/firefox.mk line 120
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ +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.
package/firefox/firefox.mk line 130
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+ 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?
package/firefox/firefox.mk line 139
Quoted 9 lines
package/firefox/firefox.mk new file +9
-0+ +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.
package/firefox/firefox.mk
Quoted 11 lines
package/firefox/firefox.mk new file +11
-0+ 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).
package/firefox/firefox.mk line 153
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + $(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).
package/firefox/firefox.mk line 156
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + # 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.
package/firefox/firefox.mk line 160
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+endef + + +# Firefox needs SQLite to store it's configurations.
^^^^ its
Quoted 12 lines
package/firefox/firefox.mk new file +12
-0+# 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. +
package/firefox/firefox.mk line 182
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+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).
package/firefox/firefox.mk
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + (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.
package/firefox/firefox.mk line 189
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ 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).
package/firefox/firefox.mk line 192
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ 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++.
package/firefox/firefox.mk line 196
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ 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.
package/firefox/firefox.mk
Quoted 11 lines
package/firefox/firefox.mk new file +11
-0+ $(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)
package/firefox/firefox.mk line 209
Quoted 2 lines
package/firefox/firefox.mk new file +2
-0+ 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 ...
package/firefox/firefox.mk
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ + # 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
package/firefox/firefox.mk line 214
Quoted 1 line
package/firefox/firefox.mk new file +1
-0+ mkdir -pv $(TARGET_DIR)/usr/lib/mozilla/plugins&& \
No && needed
package/firefox/firefox.mk line 216
Quoted 2 lines
package/firefox/firefox.mk new file +2
-0+ cd $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&& \ + ln -sfv ../mozilla/plugins .&& \
ln -sf ../mozilla/plugins $(FIREFOX_INSTALL_DIR)
package/firefox/firefox.mk line 217
Quoted 1 line
package/firefox/firefox.mk new file +1
-0+ 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.
package/firefox/firefox.mk line 226
Quoted 9 lines
package/firefox/firefox.mk new file +9
-0+ + # 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 &&.
package/firefox/firefox.mk line 231
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+ + # 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 defineFIREFOX_INSTALL_STAGING = YES
package/firefox/firefox.mk line 240
Quoted 9 lines
package/firefox/firefox.mk new file +9
-0+ +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.
Quoted 47 lines
package/firefox/firefox_extensions.mk.in new file +41
-0@@ -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
package/firefox/firefox_extensions.mk.in line 51
Quoted 10 lines
package/firefox/firefox_extensions.mk.in new file +10
-0+# 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.
package/firefox/firefox_extensions.mk.in line 64
Quoted 13 lines
package/firefox/firefox_extensions.mk.in new file +13
-0+# +# 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.
package/firefox/firefox_extensions.mk.in line 67
Quoted 3 lines
package/firefox/firefox_extensions.mk.in new file +3
-0+ +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.3FIREFOX_EXTENSION_NOSCRIPT_SITE = http://releases.mozilla.org/pub/mozilla.org/addons/722FIREFOX_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]
package/firefox/firefox_extensions.mk.in line 68
Quoted 1 line
package/firefox/firefox_extensions.mk.in new file +1
-0+ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
This condition is redundant AFAICS.
Quoted 18 lines
package/firefox/firefox_extensions.mk.in new file +18
-0+ +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) ;\
package/firefox/firefox_extensions.mk.in line 167
Quoted 10 lines
package/firefox/firefox_extensions.mk.in new file +10
-0+ 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]
package/firefox/prefs.js
Quoted 5 lines
package/firefox/prefs.js new file +0
-0
Since this one is only used with the PARANOID config, perhaps it
should be called prefs.paranoid.js?
package/firefox/prefs.js line 9
Quoted 10 lines
package/firefox/prefs.js new file +9
-0@@ -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.
Quoted 81 lines
package/firefox/prefs.js new file +81
-0+ +# 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); +
package/firefox/prefs.js line 100
Quoted 10 lines
package/firefox/prefs.js new file +10
-0+# 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
Signature · 6 lines
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
PATCH 6/9 firefox: Mozilla Web Browser
Hello Arnout
18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
Quoted 56 lines · Stefan Fr?berg
Quoted 1 line
Signed-off-by Stefan Fr?berg <[email protected]>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_CMDSinstall -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.
Quoted 7 lines
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
Quoted 7 lines
[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>
PATCH 6/9 firefox: Mozilla Web Browser
Quoted 1 line · Stefan Fr?berg
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
Signature · 6 lines
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
PATCH 6/9 firefox: Mozilla Web Browser
19.9.2012 0:25, Arnout Vandecappelle kirjoitti:
Quoted 7 lines · Stefan Fr?berg
Quoted 2 lines
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
Quoted 2 lines
Regards,
Arnout
PATCH 6/9 firefox: Mozilla Web Browser
In reply to Arnout Vandecappelle18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
Quoted 21 lines
[snip]
Quoted 6 lines
package/firefox/Config.in new file +0
-0package/firefox/Config.in line 8
Quoted 8 lines
package/firefox/Config.in new file +8
-0@@ -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_LIBGTK2Without Yann's
_AVAILABLEseries, you need to explicitly
depend on the dependencies of libgtk2 (and cairo but that's implied):
Quoted 6 lines
depends on
BR2_USE_WCHAR# glib2
depends onBR2_INSTALL_LIBSTDCPP# pangoAnd 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 ?
Quoted 7 lines
package/firefox/Config.in line 12
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBNSS + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_LIBPNGI 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.
Quoted 11 lines
package/firefox/Config.in line 18
Quoted 6 lines
package/firefox/Config.in new file +6
-0+ 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_PYTHONUgh... 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.
Quoted 7 lines
Missing dependencies:
depends onBR2_PACKAGE_XSERVER_xorg# mesa3d
selectBR2_PACKAGE_XLIB_LIBXT
selectBR2_PACKAGE_MESA3D(and add
xlib_libXtand mesa3d to the_DEPENDENCIESin the .mk file)
Ok
Quoted 9 lines
Quoted 5 lines
package/firefox/Config.in new file +4
-0+ 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
Quoted 12 lines
Quoted 7 lines
package/firefox/Config.in new file +6
-0+ +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_TLSLet me get this clear: if you're using a glibc-based or
crosstool-NG-generated uclibc toolchain with TLS,valgrind.his not needed?
Quoted 2 lines
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
Quoted 35 lines
Quoted 5 lines
package/firefox/Config.in new file +3
-0+ help + This enables debug support. + If you are using buildroot toolchain and your gcc has TLSenable 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.
Quoted 23 lines
package/firefox/Config.in new file +6
-0+ +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 provideroyalty-free, open video compression
+ for use with HTML5 video. The project's development is
sponsored by Google inc.package/firefox/Config.in new file +2
-0+ + 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.package/firefox/Config.in new file +2
-0+ + WebM is one way of watching YouTube videos withoutproprietary Adobe Flash.
+ After you have installed WebM enabled Firefox you can try it
by visiting the following link:package/firefox/Config.in new file +2
-0+ + http://www.youtube.com/results?search_query=web&webm=1
Quoted 9 lines
package/firefox/Config.in line 51
Quoted 3 lines
package/firefox/Config.in new file +3
-0+ +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....
Quoted 63 lines
Quoted 50 lines
package/firefox/Config.in new file +8
-0+ 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:configinto your browser address bar.
package/firefox/Config.in new file +5
-0+ + 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 atpackage/firefox/prefs.js file.
package/firefox/Config.in new file +2
-0+ + By selecting this option you are also enabling pipeliningfor your browser.
package/firefox/Config.in new file +28
-0+ + 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 thefollowing privacy/security related
+ extensions: NoScript, Adblock Lite, Ghostery& HTTPS
Everywherepackage/firefox/Config.in new file +1
-0+package/firefox/Config.in line 106
Quoted 10 lines
package/firefox/Config.in new file +10
-0+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.
Quoted 7 lines
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.
Quoted 46 lines
I propose to just remove the
DEFAULT_EXTENSIONSsymbol.Quoted 44 lines
package/firefox/Config.in new file +7
-0+ +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 potentiallydangerous
package/firefox/Config.in new file +12
-0+ 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)
package/firefox/Config.in new file +2
-0+ extension for blocking advertisements on the web. + This fork will provide the same features as Adblock Plus 2.xand higher
package/firefox/Config.in new file +20
-0+ 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.
Quoted 9 lines
package/firefox/Config.in line 152
Quoted 5 lines
package/firefox/Config.in new file +5
-0+ + 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 ?
Quoted 9 lines
package/firefox/Config.in line 156
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ +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
Quoted 12 lines
[snip]
package/firefox/firefox-11.0-NativeWindowHandle.patch
Quoted 6 lines
package/firefox/firefox-11.0-NativeWindowHandle.patch new file +0
-0This patch misses some explanation + a signed-off-by tag.
(Same for the other patches.)
Quoted 2 lines
Also, try to upstream the patches if possible.
Ok. I try to contact them.
Quoted 49 lines
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).Quoted 32 lines
package/firefox/firefox-11.0-NativeWindowHandle.patch new file +1
-0@@ -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.h2012-09-04 22:20:07.086923927 +0300++++
firefox-11.0/dom/plugins/ipc/PluginMessageUtils.h2012-09-04
22:23:45.195922486 +0300
+@@ -131,7 +131,7 @@
+ typedef HWND NativeWindowHandle;
+ #elifdefined(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_tNativeWindowHandle; // never actually used, will always be 0
+ #else
+ #error Need NativeWindowHandle for this platformpackage/firefox/firefox-11.0-execinfo.patch new file +1
-0@@ -0,0 +1,45 @@ +diff -Naurfirefox-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 +0300Quoted 11 lines
+@@ -5,7 +5,7 @@
+ #include "build/build_config.h"
+ #include "base/debug_util.h"
+
+-#defineMOZ_HAVE_EXECINFO_H(!defined(ANDROID)&& !defined(__OpenBSD__))
++#defineMOZ_HAVE_EXECINFO_H(!defined(ANDROID)&& !defined(__OpenBSD__)&& !defined(__UCLIBC__) ) +
+ #include<errno.h>
+ #include<fcntl.h>
Quoted 8 lines
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.
Quoted 3 lines
(Note that it's necessary to link with libubacktrace so it probably
won't work out-of-the-box.)
Ah, I see.
Quoted 26 lines
[snip]
Quoted 24 lines
package/firefox/firefox-11.0-isfinite.patch new file +1
-0@@ -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.h2012-08-06
15:09:49.059994026 +0300
++++firefox-11.0/xpcom/ds/nsMathUtils.h2012-08-06
23:32:57.771217662 +0300
+@@ -42,6 +42,9 @@package/firefox/firefox-11.0-isfinite.patch new file +10
-0+ + #include "nscore.h" + #include<math.h> ++#ifdef __UCLIBC__ ++#include<cmath> ++#endif + #include<float.h> + + #ifdef SOLARIS +@@ -134,6 +137,8 @@
Quoted 9 lines
package/firefox/firefox-11.0-isfinite.patch line 19
Quoted 6 lines
+ // Darwin has deprecated |finite| and recommends |isfinite|.
The former ispackage/firefox/firefox-11.0-isfinite.patch new file +4
-0+ // not present in the iOS SDK. + return isfinite(d); ++#elif __UCLIBC__ ++ return std::isfinite(d);
isfinite()is inmath.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.
Quoted 41 lines
Quoted 14 lines
+ #else
package/firefox/firefox-11.0-isfinite.patch new file +2
-0+ return finite(d); + #endifpackage/firefox/firefox-11.0-uclibc.patch new file +1
-0@@ -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.h2012-08-06
15:09:43.333994370 +0300Quoted 8 lines
++++
firefox-11.0/ipc/chromium/src/base/file_util.h2012-08-06
23:42:29.523183319 +0300
+@@ -16,7 +16,9 @@
+ #include<sys/stat.h>
+ #elifdefined(OS_POSIX)
+ #include<sys/types.h>
++#ifndef__UCLIBC__
+ #include<fts.h>Again, uClibc does have FTS support (disabled by default in
buildroot).[snip]
Quoted 4 lines
+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 +0300Quoted 8 lines
++++ 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);
Quoted 3 lines
This is unrelated to the rest of the patch - should probably go in
the isfinite patch.
Yes, you are right
Quoted 40 lines
Quoted 16 lines
+ #else
package/firefox/firefox-11.0-uclibc.patch new file +3
-0+ return finite(f); + #endif +diff -Naur firefox-11.0.org/memory/mozalloc/mozalloc.cppfirefox-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 @@package/firefox/firefox-11.0-uclibc.patch new file +6
-0+ + #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 LinuxQuoted 4 lines
installations
+ // might use a libc that doesn't havemalloc_usable_size.
Let's fix this
+ // if/when it happens.I would put this in a separate patch from the FTS stuff.
Quoted 17 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +1
-0@@ -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.h2012-08-06
15:09:44.189994318 +0300
++++firefox-11.0/gfx/qcms/qcmstypes.h2012-08-06
23:35:38.339208022 +0300
+@@ -27,7 +27,7 @@
+ #ifdef__OS2__
+ /* OS/2's stdlib typdefsuintptr_t. So we'll just include that so we don't collide */
Quoted 9 lines
Quoted 5 lines
+ #include<stdlib.h>
+-#elif !defined(__intptr_t_defined)&& !defined(_UINTPTR_T_DEFINED) ++#elif !defined(__intptr_t_defined)&& !defined(_UINTPTR_T_DEFINED)&& !defined(__UCLIBC__)
+ typedef PRUptrdiffuintptr_t;Is this necessary?
stdint.hdefines__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.
Quoted 50 lines
Quoted 36 lines
+ #endif
+ #endifpackage/firefox/firefox.mk new file +28
-0@@ -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 +#package/firefox/firefox.mk line 38
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+# 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.
Quoted 2 lines
Similar for libpng.
Ok
Quoted 30 lines
Quoted 6 lines
package/firefox/firefox.mk new file +5
-0+# +############################################################# +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/...package/firefox/firefox.mk line 48
Quoted 6 lines
+FIREFOX_DEPENDENCIES = host-python alsa-lib cairo freetype jpeg libffi libgtk2 libnss libnspr libpng sqlite zlib
package/firefox/firefox.mk new file +4
-0+ +ifeq ($(BR2_PACKAGE_FIREFOX_ENABLE_DEBUG),y) +FIREFOX_DEPENDENCIES += valgrind +define FIREFOX_ENABLE_DEBUGSince it does both enable and disable, it should be called
SET_DEBUGor something similar.Quoted 10 lines
package/firefox/firefox.mk new file +2
-0+ echo "ac_add_options --enable-debug">> $(FIREFOX_DIR)/mozconfig + echo "ac_add_options --enable-debug-symbols">>$(FIREFOX_DIR)/mozconfig
package/firefox/firefox.mk new file +7
-0+ 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">>
Quoted 9 lines
Quoted 2 lines
$(FIREFOX_DIR)/mozconfig
+ echo "ac_add_options--enable-strip">> $(FIREFOX_DIR)/mozconfigWe 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.
Quoted 29 lines
Quoted 29 lines
+ echo "
ac_add_options--disable-valgrind">>
$(FIREFOX_DIR)/mozconfigpackage/firefox/firefox.mk new file +27
-0+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.
Quoted 9 lines
package/firefox/firefox.mk line 91
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+# Before you enable this feature please +# check prefs.js file +# +# Note: This will also install NoScript, Adblock Lite, Ghostery and +# HttpsEverywhere extensionsThis is already explained in the config option's help
text, so no need to repeat it here.
Ok
Quoted 8 lines
Quoted 5 lines
package/firefox/firefox.mk new file +4
-0+ +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.
Quoted 13 lines
package/firefox/firefox.mk line 105
Quoted 10 lines
package/firefox/firefox.mk new file +10
-0+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-xmlstarletThen this should probably move to the extensions.mk, no?
Yes, I forgot to move it there
Quoted 9 lines
package/firefox/firefox.mk line 110
Quoted 5 lines
package/firefox/firefox.mk new file +5
-0+ +define FIREFOX_INSTALL_DEFAULT_EXTENSIONS + $(call FIREFOX_INSTALL_EXTENSION,$(EXTENSION_SOURCE)) +endef +endifIt's very strange to have this line using two macros that are defined
in a different file... Move it to the extensions.mk.
Quoted 12 lines
package/firefox/firefox.mk line 116
Quoted 7 lines
package/firefox/firefox.mk new file +6
-0+ +# 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).xpilinux-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.
Quoted 12 lines
Quoted 5 lines
package/firefox/firefox.mk new file +4
-0+ +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.
Quoted 4 lines
+ echo
"user_pref(\"general.useragent.locale\",\"$(FIREFOX_LOCALE)\");">> $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile/prefs.js
Quoted 14 lines
package/firefox/firefox.mk line 130
Quoted 10 lines
package/firefox/firefox.mk new file +5
-0+endef +endif + +define FIREFOX_CUSTOM_DEFAULT_PROFILE + mkdir -p$(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/defaults/profile
package/firefox/firefox.mk new file +4
-0+ $(FIREFOX_ULTRA_PARANOID) + $(FIREFOX_INSTALL_DEFAULT_EXTENSIONS) + $(FIREFOX_INSTALL_LANGPACK) +endefIf
ULTRA_PARANOIDisn'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.
Quoted 6 lines
Quoted 6 lines
package/firefox/firefox.mk new file +6
-0+ +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.
Quoted 9 lines
package/firefox/firefox.mk line 139
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ +define FIREFOX_CONFIGURE_CMDS + # Copy the default mozconfig to source directory.Comments inside
_CMDSblocks aren't very nice, because they're
interpreted by the shell (and printed on the console). Move the comments before the_CMDSblock - but most of them are unnecessary, the code is self-explanatory.
Okay
Quoted 8 lines
Quoted 8 lines
package/firefox/firefox.mk new file +7
-0+ 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
Quoted 9 lines
Quoted 6 lines
+ echo "
ac_add_options--host=$(GNU_TARGET_NAME)">>
$(FIREFOX_DIR)/mozconfigpackage/firefox/firefox.mk new file +3
-0+ + # 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
Quoted 6 lines
package/firefox/firefox.mk line 153
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + $(FIREFOX_ENABLE_WEBM) + $(FIREFOX_ENABLE_DEBUG)You could define a
FIREFOX_AC_OPTIONSvariable, and then do
Quoted 10 lines
for option in $(FIREFOX_AC_OPTIONS); do \ echo "ac_add_options $${option}" >> $(FIREFOX_DIR)/mozconfig; \ doneThat 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
Quoted 48 lines
Quoted 4 lines
package/firefox/firefox.mk new file +2
-0+ + # Create the needed build directory that was defined inmozconfig file
+ mkdir -p $(@D)/firefox-build-dirTo keep things together, it's better to also do
echo "mk_add_optionsMOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir" >>
$(FIREFOX_DIR)/mozconfig
here.package/firefox/firefox.mk line 160
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+endef + + +# Firefox needs SQLite to store it's configurations.^^^^ itsQuoted 25 lines
+# Further the SQLite must be build with
SQLITE_SECURE_DELETE,SQLITE_THREADSAFE,package/firefox/firefox.mk new file +3
-0+# SQLITE_ENABLE_FTS3 and SLITE_ENABLE_UNLOCK_NOTIFY enabled. +# +# However, even if you *do* have these things enabled the damnconfigure
+# script says that they are not. So I had to force the correct settings.package/firefox/firefox.mk new file +3
-0+# +# Even worse, it seems that the script does not respect even +# pkg-config variables (see below) to find the buildroot version ofSQLite
package/firefox/firefox.mk new file +3
-0+# but insist of using *host* SQLite library. +# +# Luckily, in the actual linking time, the correct libraries seem tobe used.
package/firefox/firefox.mk new file +5
-0+ +define FIREFOX_BUILD_CMDS + + # Picked the PKG_ variable suggestions from: + #http://www.flameeyess.eu/autotools-mythbuster/pkgconfig/cross-compiling
package/firefox/firefox.mk new file +2
-0+ # + # With these settings, *most* of the buildroot system libs werefound.
package/firefox/firefox.mk line 182
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ # 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).
Quoted 7 lines
package/firefox/firefox.mk
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + (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 aPOST_PATCH_HOOKthan here.
Sorry, forgot to mention that sed line just removes unprintable control characters from the title bar.
Quoted 25 lines
package/firefox/firefox.mk line 189
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ 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).package/firefox/firefox.mk line 192
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ HOST_CC=gcc \ + CC_FOR_BUILD=gcc \ + HOST_CXX=g++ \These already are in mozconfig, and also in
TARGET_CONFIGURE_OPTS.
Well, except thatTARGET_CONFIGURE_OPTSuses 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++.package/firefox/firefox.mk line 196
Quoted 6 lines
package/firefox/firefox.mk new file +2
-0+ PKG_CONFIG_DIR= \ +PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \
package/firefox/firefox.mk new file +2
-0+ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)"\
Quoted 6 lines
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.
Quoted 170 lines
Quoted 12 lines
+ $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV)
CXXFLAGS="$(TARGET_CXXFLAGS) -fvisibility=hidden -fvisibility-inlines-hidden" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -f client.mk )package/firefox/firefox.mk new file +7
-0+ +endef + +define FIREFOX_INSTALL_TARGET_CMDS + # This will create a firefox installation tarball + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -Cfirefox-build-dir/browser/installer )
package/firefox/firefox.mk
Quoted 3 lines
package/firefox/firefox.mk new file +3
-0+ + # 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)Quoted 4 lines
package/firefox/firefox.mk new file +2
-0+ 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 ...package/firefox/firefox.mk
Quoted 4 lines
package/firefox/firefox.mk new file +4
-0+ + # 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
Quoted 1 line
+ mkdir -pv $(TARGET_DIR)/usr/lib/mozilla/plugins&& \
No && needed
package/firefox/firefox.mk
Quoted 2 lines
package/firefox/firefox.mk new file +2
-0+ cd $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)&& \ + ln -sfv ../mozilla/plugins .&& \ln -sf ../mozilla/plugins $(FIREFOX_INSTALL_DIR)Quoted 2 lines
+ 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.
package/firefox/firefox.mk line 226
Quoted 11 lines
package/firefox/firefox.mk new file +2
-0+ + # Using strace revealed that for some strange reason the firefoxis looking these
+ # from/usr/liband not from /usr/lib/$(FIREFOX_VERSION) like
the rest of the files.package/firefox/firefox.mk new file +6
-0+ # 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/liband no &&.
Quoted 6 lines
package/firefox/firefox.mk new file +5
-0+ + # 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 defineFIREFOX_INSTALL_STAGING= YESpackage/firefox/firefox.mk line 240
Quoted 9 lines
package/firefox/firefox.mk new file +9
-0+ +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.Quoted 69 lines
package/firefox/firefox_extensions.mk.in new file +6
-0@@ -0,0 +1,168 @@ +############################################################# +# Extensions +# +# General Info: +# +# Firefox extensions are nothing more than ordinary zip-files with.xpi file extension.
package/firefox/firefox_extensions.mk.in new file +2
-0+# +# If you want to add your own default extension(s) to your defaultfirefox profile
package/firefox/firefox_extensions.mk.in new file +3
-0+# then you basically have to: +# - download the extension file +# - get the extension id from that file with the help of xmlstarlettool
+# - unzip the extension file to /usr/lib/firefox-$(FIREFOX_VERSION/extensions/$(EXTENSION_ID)package/firefox/firefox_extensions.mk.in new file +5
-0+# +# 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 andxmlstarlet) look at:
package/firefox/firefox_extensions.mk.in new file +3
-0+# http://kb.mozillazine.org/Determine_extension_ID +# +# Note that this process will only *install* your extensions to yourdefault firefox profile.
package/firefox/firefox_extensions.mk.in new file +7
-0+# 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 installedextensions/language packs
package/firefox/firefox_extensions.mk.in new file +3
-0+# from Add-ons menu. +# +# The messy way to enable your extensions by default with each buildwould be:
package/firefox/firefox_extensions.mk.in new file +2
-0+# +# - Start your firefox at least once and then enable all yourextensions manually
package/firefox/firefox_extensions.mk.in new file +5
-0+# +# - 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.*)package/firefox/firefox_extensions.mk.in new file +2
-0+# to package/firefox/extensions buildroot folder. +# To make sure, it's generally better to copy *all* files&directories from
package/firefox/firefox_extensions.mk.in new file +4
-0+# $HOME/.mozilla/firefox/some_random_chars.default/ folder to +# packge/firefox/extensions +# +# - Add buildroot option that will copy all those saved customsettings from
+# package/firefox/extensions folder inFIREFOX_POST_INSTALL_TARGET_HOOKSphasepackage/firefox/firefox_extensions.mk.in new file +3
-0+# (or alternativaly, at the end of the FIREFOX_INSTALL_TARGET_CMDS) +# to $(TARGET_DIR)/usr/lib/firefox-$(FIREFOX_VERSION)/extensions +#
Quoted 9 lines
Quoted 5 lines
+# 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
Quoted 115 lines
Quoted 15 lines
package/firefox/firefox_extensions.mk.in new file +8
-0+# +# 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
dangerouspackage/firefox/firefox_extensions.mk.in new file +2
-0+# content only from sites you trust. +# NoScript also provides the most anti-XSS andQuoted 2 lines
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.package/firefox/firefox_extensions.mk.in line 67
Quoted 4 lines
package/firefox/firefox_extensions.mk.in new file +3
-0+ +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.xpiMay be worthwhile to split into
FIREFOX_EXTENSION_NOSCRIPT_VERSION= 2.5.3FIREFOX_EXTENSION_NOSCRIPT_SITE=
http://releases.mozilla.org/pub/mozilla.org/addons/722FIREFOX_EXTENSION_NOSCRIPT_SOURCE= noscript-$(FIREFOX_EXTENSION_NOSCRIPT_VERSION)-fx+fn+sm.xpifor consistency with other packages.
Then you can add
FIREFOX_EXTENSION-$(BR2_PACKAGE_FIREFOX_EXTENSION_NOSCRIPT) += NOSCRIPT
and use my rewrite below
[snip]
Quoted 1 line
+ifeq ($(BR2_PACKAGE_FIREFOX_INSTALL_DEFAULT_EXTENSIONS),y)
This condition is redundant AFAICS.
Quoted 29 lines
package/firefox/firefox_extensions.mk.in new file +9
-0+ +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}
package/firefox/firefox_extensions.mk.in new file +10
-0+# +# 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 \
package/firefox/firefox_extensions.mk.in new file +4
-0+ -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};\package/firefox/firefox_extensions.mk.in line 167
Quoted 4 lines
package/firefox/firefox_extensions.mk.in new file +4
-0+ done + +endef +endifAlternative:
# Download and install a firefox extension.
# The extension is defined byFIREFOX_EXTENSION_FOO_SITEandFIREFOX_EXTENSION_FOO_SOURCE
# Argument 1 is the extension name, FOO.
defineFIREFOX_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)
endefdefine
FIREFOX_INSTALL_EXTENSIONS$(foreach ext,$(FIREFOX_EXTENSION-y),$(callFIREFOX_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]
Quoted 9 lines
package/firefox/prefs.js
Quoted 5 lines
package/firefox/prefs.js new file +0
-0Since this one is only used with the PARANOID config, perhaps it
should be called prefs.paranoid.js?
No problem
Quoted 115 lines
package/firefox/prefs.js line 9
Quoted 10 lines
package/firefox/prefs.js new file +9
-0@@ -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.Quoted 86 lines
package/firefox/prefs.js new file +37
-0+ +# 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!)
package/firefox/prefs.js new file +14
-0+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 134105https://bugzilla.mozilla.org/show_bug.cgi?id=134105 )
package/firefox/prefs.js new file +8
-0+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 disablesbrowser history :-)
package/firefox/prefs.js new file +23
-0+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 thebrowser
package/firefox/prefs.js line 100
Quoted 9 lines
package/firefox/prefs.js new file +9
-0+user_pref("privacy.sanitize.sanitizeOnShutdown",true); + + + + + + + +Remove those empty lines at the end.
Quoted 4 lines
Phew, glad I managed to finish this review :-)
Regards,
Arnout
:-)
Thank you Arnout.
You helped me a lot
Stefan
PATCH 6/9 firefox: Mozilla Web Browser
Quoted 23 lines · Stefan Fr?berg
18.9.2012 1:31, Arnout Vandecappelle kirjoitti:
Quoted 21 lines
[snip]
Quoted 6 lines
package/firefox/Config.in new file +0
-0package/firefox/Config.in line 8
Quoted 8 lines
package/firefox/Config.in new file +8
-0@@ -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_LIBGTK2Without Yann's
_AVAILABLEseries, you need to explicitly
depend on the dependencies of libgtk2 (and cairo but that's implied):
Quoted 7 lines
Quoted 6 lines
depends on
BR2_USE_WCHAR# glib2
depends onBR2_INSTALL_LIBSTDCPP# pangoAnd there should be a comment to warn about it
if WCHAR and LIBSTDCPP are not available.Uh???? Sorry but what is this new
_AVAILABLEseries you mentioned ?
If you don't know, never mind :-)
Quoted 11 lines
Quoted 7 lines
package/firefox/Config.in line 12
Quoted 4 lines
package/firefox/Config.in new file +4
-0+ select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBNSS + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_LIBPNGI 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.
Quoted 6 lines
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]
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
package/firefox/Config.in new file +3
-0+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_TLSLet me get this clear: if you're using a glibc-based or
crosstool-NG-generated uclibc toolchain with TLS,valgrind.his not needed?
Quoted 5 lines
Quoted 2 lines
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]
Quoted 11 lines
Quoted 8 lines
package/firefox/Config.in line 51
Quoted 2 lines
package/firefox/Config.in new file +2
-0+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]
Quoted 20 lines
Quoted 13 lines
package/firefox/Config.in line 106
Quoted 10 lines
package/firefox/Config.in new file +10
-0+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.
Quoted 7 lines
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.
Quoted 5 lines
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...).
Quoted 1 line
Quoted 1 line
I propose to just remove the
DEFAULT_EXTENSIONSsymbol.
[snip]
Quoted 8 lines
Quoted 6 lines
package/firefox/Config.in line 152
Quoted 2 lines
package/firefox/Config.in new file +2
-0+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]
Quoted 26 lines
Quoted 17 lines
Quoted 17 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +1
-0@@ -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.h2012-08-06
15:09:44.189994318 +0300
++++firefox-11.0/gfx/qcms/qcmstypes.h2012-08-06
23:35:38.339208022 +0300
+@@ -27,7 +27,7 @@
+ #ifdef__OS2__
+ /* OS/2's stdlib typdefsuintptr_t. So we'll just include that so we don't collide */Quoted 9 lines
Quoted 5 lines
+ #include<stdlib.h>
+-#elif !defined(__intptr_t_defined)&& !defined(_UINTPTR_T_DEFINED)
++#elif !defined(__intptr_t_defined)&&
!defined(_UINTPTR_T_DEFINED)&& !defined(__UCLIBC__)
+ typedef PRUptrdiffuintptr_t;Is this necessary?
stdint.hdefines__intptr_t_defined(at least in
0.9.32)
Quoted 2 lines
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]
Quoted 12 lines
Quoted 6 lines
Quoted 5 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +3
-0+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)/mozconfigQuoted 6 lines
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).
Quoted 6 lines
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]
Quoted 8 lines
Quoted 6 lines
package/firefox/firefox-11.0-uintptr_t.patch
Quoted 2 lines
package/firefox/firefox-11.0-uintptr_t.patch new file +2
-0+ (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 aPOST_PATCH_HOOKthan 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
Signature · 6 lines
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
PATCH 7/9 firefox: GNU gnash flash plugin needs agg dependency
In reply to Stefan Fröberg--- 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
package/Config.in +1 -0
@@ -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"
package/agg/Config.in new file +12 -0
@@ -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 +
package/agg/agg-2.5.patch new file +207 -0
207 lines not on this page · raw message
package/agg/agg.mk new file +17 -0
@@ -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)) +
Signature · 1 line
1.7.7.6
PATCH 7/9 firefox: GNU gnash flash plugin needs agg dependency
Quoted 2 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>
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]
package/agg/Config.in line 3
Quoted 9 lines
package/agg/Config.in new file +3
-0@@ -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.
package/agg/Config.in line 4
Quoted 1 line
package/agg/Config.in new file +1
-0+ select BR2_PACKAGE_XLIB_LIBX11
If you select an x11r7 package, you have to add
depends on BR2_PACKAGE_XORG7
package/agg/Config.in line 9
Quoted 5 lines
package/agg/Config.in new file +5
-0+ 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).
package/agg/agg-2.5.patch
Quoted 4 lines
package/agg/Config.in new file +3
-0+ + http://www.antigrain.com +package/agg/agg-2.5.patch +0
-0
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.
Quoted 9 lines
new file mode 100644
index 0000000..d8749c5package/agg/agg-2.5.patch new file +4
-0@@ -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 @@
package/agg/agg-2.5.patch line 14
Quoted 10 lines
package/agg/agg-2.5.patch new file +10
-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 aPOST_PATCH_HOOK - then it's clearer what's happening.
package/agg/agg-2.5.patch line 22
Quoted 8 lines
package/agg/agg-2.5.patch new file +8
-0+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...
Quoted 174 lines
package/agg/agg-2.5.patch new file +174
-0+ 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
package/agg/agg-2.5.patch line 206
Quoted 10 lines
package/agg/agg-2.5.patch new file +10
-0+--- 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 ...
Quoted 7 lines
package/agg/agg-2.5.patch new file +1
-0+ libaggplatformX11_la_LIBADD = -lX11package/agg/agg.mk new file +0
-0
package/agg/agg.mk line 8
Quoted 8 lines
package/agg/agg.mk new file +8
-0@@ -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.
package/agg/agg.mk line 10
Quoted 2 lines
package/agg/agg.mk new file +2
-0+AGG_SITE = http://www.antigrain.com/ +AGG_DEPENDENCIES = xlib_libX11 pkg-config sdl
Shouldn't that be host-pkg-config?
package/agg/agg.mk line 14
Quoted 4 lines
package/agg/agg.mk new file +4
-0+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.
package/agg/agg.mk line 17
Quoted 3 lines
package/agg/agg.mk new file +3
-0+ +$(eval $(autotools-package)) +
Spurious empty line at the end.
Regards,
Arnout
Signature · 6 lines
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
PATCH 8/9 firefox: GNU gnash flash plugin needs gconf dependency
In reply to Stefan Fröberg--- 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
package/Config.in +1 -0
@@ -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"
package/gconf/Config.in new file +11 -0
@@ -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 +
package/gconf/gconf.mk new file +26 -0
@@ -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)) + +
Signature · 1 line
1.7.7.6
PATCH 8/9 firefox: GNU gnash flash plugin needs gconf dependency
Quoted 28 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>--- 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 100644package/gconf/gconf.mkpackage/Config.in +1
-0@@ -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"package/gconf/Config.in new file +0
-0
package/gconf/Config.in line 3
Quoted 3 lines
package/gconf/Config.in new file +3
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_GCONF + bool "gconf" + select BR2_PACKAGE_INTLTOOL
Unlikely. You probably want to depend on host-intltool.
package/gconf/Config.in line 4
Quoted 1 line
package/gconf/Config.in new file +1
-0+ 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
package/gconf/Config.in line 8
Quoted 4 lines
package/gconf/Config.in new file +4
-0+ select BR2_PACKAGE_LIBXML2 + help + The GConf package contains a configuration database system used by many GNOME + applications.
Word-wrap at 80 columns.
package/gconf/Config.in line 10
Quoted 2 lines
package/gconf/Config.in new file +2
-0+ + http://ftp.gnome.org/pub/gnome/sources/GConf/3.2
Is there no real website to refer to?
package/gconf/Config.in line 11
Quoted 1 line
package/gconf/Config.in new file +1
-0+
Spurious line at end of file.
Quoted 6 lines
package/gconf/gconf.mk new file +0
-0
package/gconf/gconf.mk line 9
Quoted 9 lines
package/gconf/gconf.mk new file +9
-0@@ -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 useGCONF_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').
package/gconf/gconf.mk line 10
Quoted 1 line
package/gconf/gconf.mk new file +1
-0+GCONF_DEPENDENCIES = dbus-glib intltool libxml2
host-intltool, most likely.
package/gconf/gconf.mk line 12
Quoted 2 lines
package/gconf/gconf.mk new file +2
-0+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.
package/gconf/gconf.mk line 13
Quoted 1 line
package/gconf/gconf.mk new file +1
-0+GCONF_LICENSE = GPLv2
I haven't checked, but I would expect the gnome people to make
it GPLv2+. Can you verify again?
package/gconf/gconf.mk line 19
Quoted 6 lines
package/gconf/gconf.mk new file +6
-0+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.
package/gconf/gconf.mk line 20
Quoted 1 line
package/gconf/gconf.mk new file +1
-0+ 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.
package/gconf/gconf.mk line 26
Quoted 6 lines
package/gconf/gconf.mk new file +6
-0+ +endef + +$(eval $(autotools-package)) + +
Spurious newlines at end of file.
Regards,
Arnout
Signature · 6 lines
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
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
In reply to Stefan Fröberg--- 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
package/gnash/Config.in new file +20 -0
@@ -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 +
package/gnash/gnash-0.8.10-amf-include.patch new file +45 -0
45 lines not on this page · raw message
package/gnash/gnash-0.8.10-cve-2012-1175.patch new file +63 -0
63 lines not on this page · raw message
package/gnash/gnash-0.8.10-external-dejagnu.patch new file +24 -0
@@ -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 +
package/gnash/gnash-0.8.10-gettext-macro.patch new file +170 -0
170 lines not on this page · raw message
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch new file +52 -0
52 lines not on this page · raw message
package/gnash/gnash-0.8.10-kde4-libdir.patch new file +12 -0
@@ -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
package/gnash/gnash-0.8.10-klash.patch new file +12 -0
@@ -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
package/gnash/gnash-0.8.10-npapi-sdk.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]> +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 +
package/gnash/gnash.mk new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
Quoted 2 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>
Finally got 'round to reviewing this patch. Review only, no testing.
Quoted 29 lines
--- 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 100644package/gnash/gnash-0.8.10-amf-include.patchcreate mode 100644package/gnash/gnash-0.8.10-cve-2012-1175.patchcreate mode 100644package/gnash/gnash-0.8.10-external-dejagnu.patchcreate mode 100644package/gnash/gnash-0.8.10-gettext-macro.patchcreate mode 100644package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patchcreate mode 100644package/gnash/gnash-0.8.10-kde4-libdir.patchcreate mode 100644package/gnash/gnash-0.8.10-klash.patchcreate mode 100644package/gnash/gnash-0.8.10-npapi-sdk.patchcreate mode 100644package/gnash/gnash.mkpackage/gnash/Config.in new file +0
-0
package/gnash/Config.in line 9
Quoted 9 lines
package/gnash/Config.in new file +9
-0@@ -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?
package/gnash/Config.in line 17
Quoted 8 lines
package/gnash/Config.in new file +8
-0+ 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).
package/gnash/Config.in line 19
Quoted 2 lines
package/gnash/Config.in new file +2
-0+ + http://ftp.gnu.org/pub/gnu/gnash
http://www.gnashdev.org/ or http://www.gnu.org/software/gnash/ seems
more appropriate.
package/gnash/Config.in line 20
Quoted 1 line
package/gnash/Config.in new file +1
-0+
Trailing empty line.
package/gnash/gnash-0.8.10-amf-include.patch
Quoted 6 lines
package/gnash/gnash-0.8.10-amf-include.patch new file +0
-0@@ -0,0 +1,45 @@
Missing explanation + SOB.
package/gnash/gnash-0.8.10-amf-include.patch line 11
Quoted 11 lines
package/gnash/gnash-0.8.10-amf-include.patch new file +11
-0+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...
Quoted 40 lines
package/gnash/gnash-0.8.10-amf-include.patch new file +34
-0+ #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 gnashpackage/gnash/gnash-0.8.10-cve-2012-1175.patch new file +0
-0
package/gnash/gnash-0.8.10-cve-2012-1175.patch line 4
Quoted 4 lines
package/gnash/gnash-0.8.10-cve-2012-1175.patch new file +4
-0@@ -0,0 +1,63 @@ +From bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 Mon Sep 17 00:00:00 2001 +From: Benjamin Wolsey<[email protected]> +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]
package/gnash/gnash-0.8.10-external-dejagnu.patch
Quoted 6 lines
package/gnash/gnash-0.8.10-external-dejagnu.patch new file +0
-0@@ -0,0 +1,24 @@
Missing explanation + SOB.
package/gnash/gnash-0.8.10-gettext-macro.patch
Quoted 25 lines
package/gnash/gnash-0.8.10-external-dejagnu.patch new file +24
-0+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 +package/gnash/gnash-0.8.10-gettext-macro.patch +0
-0
Missing explanation + SOB.
I don't understand how this one can be needed, since gnash indirectly depends
on libglib2 which depends on gettext.
Quoted 17 lines
new file mode 100644
index 0000000..0501f74package/gnash/gnash-0.8.10-gettext-macro.patch new file +12
-0@@ -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]
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
Quoted 6 lines
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch new file +0
-0@@ -0,0 +1,52 @@
Missing explanation + SOB.
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch
Quoted 9 lines
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch new file +9
-0+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.
package/gnash/gnash-0.8.10-kde4-libdir.patch
Quoted 49 lines
package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patch new file +43
-0+ #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); + } + #endifpackage/gnash/gnash-0.8.10-kde4-libdir.patch new file +0
-0@@ -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?
Quoted 36 lines
package/gnash/gnash-0.8.10-kde4-libdir.patch new file +12
-0+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 ; thenpackage/gnash/gnash-0.8.10-klash.patch new file +12
-0@@ -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 ; thenpackage/gnash/gnash-0.8.10-npapi-sdk.patch new file +0
-0
package/gnash/gnash-0.8.10-npapi-sdk.patch line 4
Quoted 4 lines
package/gnash/gnash-0.8.10-npapi-sdk.patch new file +4
-0@@ -0,0 +1,29 @@ +From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?=<[email protected]> +Date: Thu, 15 Sep 2011 12:59:55 +0200 +Subject: [PATCH] Support building against NPAPI-SDK as well.
Add your SOB.
Quoted 48 lines
package/gnash/gnash-0.8.10-npapi-sdk.patch new file +25
-0+ +--- + 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 +package/gnash/gnash.mk new file +17
-0@@ -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 +#
package/gnash/gnash.mk line 27
Quoted 10 lines
package/gnash/gnash.mk new file +10
-0+# 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.
package/gnash/gnash.mk line 29
Quoted 2 lines
package/gnash/gnash.mk new file +2
-0+ 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.
package/gnash/gnash.mk line 34
Quoted 5 lines
package/gnash/gnash.mk new file +5
-0+ +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-sslGNASH_CONF_DEPENDENCES += openssl
elseGNASH_CONF_OPT += --disable-ssl
endif
?
package/gnash/gnash.mk line 38
Quoted 4 lines
package/gnash/gnash.mk new file +4
-0+ +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.
package/gnash/gnash.mk line 45
Quoted 7 lines
package/gnash/gnash.mk new file +7
-0+endef + +$(eval $(autotools-package)) + + + +
Redundant empty lines.
Regards,
Arnout
Signature · 6 lines
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
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
20.10.2012 18:55, Arnout Vandecappelle kirjoitti:
Quoted 40 lines · Stefan Fr?berg
Quoted 2 lines
Signed-off-by Stefan Fr?berg<[email protected]>Finally got 'round to reviewing this patch. Review only, no testing.
Quoted 34 lines
--- 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 100644package/gnash/gnash-0.8.10-amf-include.patchcreate mode 100644package/gnash/gnash-0.8.10-cve-2012-1175.patchcreate mode 100644package/gnash/gnash-0.8.10-external-dejagnu.patchcreate mode 100644package/gnash/gnash-0.8.10-gettext-macro.patchcreate mode 100644package/gnash/gnash-0.8.10-jemalloc-aslr-fix.patchcreate mode 100644package/gnash/gnash-0.8.10-kde4-libdir.patchcreate mode 100644package/gnash/gnash-0.8.10-klash.patchcreate mode 100644package/gnash/gnash-0.8.10-npapi-sdk.patchcreate mode 100644package/gnash/gnash.mkpackage/gnash/Config.in new file +4
-0@@ -0,0 +1,20 @@ +config BR2_PACKAGE_GNASH + bool "Enable Adobe Flash support with GNU gnash" + select BR2_PACKAGE_AGG + select BR2_PACKAGE_BOOST
Quoted 9 lines
package/gnash/Config.in line 9
Quoted 5 lines
package/gnash/Config.in new file +5
-0+ select BR2_PACKAGE_GST_FFMPEG + select BR2_PACKAGE_GCONF + select BR2_PACKAGE_GIFLIB + select BR2_PACKAGE_OPENSSL + depends on BR2_PACKAGE_FIREFOXGnash 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
Quoted 10 lines
package/gnash/gnash-0.8.10-kde4-libdir.patch
Quoted 7 lines
package/gnash/gnash-0.8.10-kde4-libdir.patch new file +0
-0@@ -0,0 +1,12 @@Missing explanation + SOB.
Quoted 3 lines
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.
Quoted 118 lines
Quoted 38 lines
package/gnash/gnash-0.8.10-kde4-libdir.patch new file +12
-0+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 ; thenpackage/gnash/gnash-0.8.10-klash.patch new file +12
-0@@ -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 ; thenpackage/gnash/gnash-0.8.10-npapi-sdk.patch new file +0
-0package/gnash/gnash-0.8.10-npapi-sdk.patch line 4
Quoted 4 lines
package/gnash/gnash-0.8.10-npapi-sdk.patch new file +4
-0@@ -0,0 +1,29 @@ +From 983a675c94ecec54ae14593744aa9a2198466499 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?=<[email protected]> +Date: Thu, 15 Sep 2011 12:59:55 +0200 +Subject: [PATCH] Support building against NPAPI-SDK as well.Add your SOB.
Quoted 60 lines
package/gnash/gnash-0.8.10-npapi-sdk.patch new file +13
-0+ +--- + 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"
++ fipackage/gnash/gnash-0.8.10-npapi-sdk.patch new file +6
-0+ fi + fi + +-- +1.7.3.4 +package/gnash/gnash.mk new file +25
-0@@ -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" \
package/gnash/gnash.mk line 27
Quoted 2 lines
package/gnash/gnash.mk new file +2
-0+ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \All this shouldn't be necessary.
Quoted 4 lines
+ 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_CPPFLAGSandGNASH_LIBSseparately and use
those variables here.
Quoted 11 lines
package/gnash/gnash.mk
Quoted 8 lines
package/gnash/gnash.mk new file +5
-3+ +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-sslShouldn'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.
Quoted 10 lines
Can ssl be made optional with
ifeq ($(BR2_PACKAGE_OPENSSL),y)GNASH_CONF_OPT+= --enable-sslGNASH_CONF_DEPENDENCES+= openssl
elseGNASH_CONF_OPT+= --disable-ssl
endif?
Yes it can. I will add it
Quoted 17 lines
package/gnash/gnash.mk line 38
Quoted 4 lines
package/gnash/gnash.mk new file +4
-0+ +define GNASH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-pluginI would add the install-plugin only if firefox is selected.
package/gnash/gnash.mk line 45
Quoted 7 lines
package/gnash/gnash.mk new file +7
-0+endef + +$(eval $(autotools-package)) + + + +Redundant empty lines.
Quoted 2 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
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
Quoted 3 lines · Stefan Fr?berg
20.10.2012 18:55, Arnout Vandecappelle kirjoitti:
Quoted 2 lines · Stefan Fr?berg
Quoted 1 line
[snip]
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
--with-npapi-plugindir=$(TARGET_DIR)/usr/lib/mozilla/plugins \
+ --enable-renderer=agg,cairo --enable-doublebuf
--enable-visibility --enable-offscreen --enable-sslShouldn't cairo be a dependency as well?
Quoted 8 lines
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]
Quoted 9 lines
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.
Quoted 3 lines
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
Signature · 6 lines
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
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
23.10.2012 19:42, Arnout Vandecappelle kirjoitti:
Quoted 24 lines
[snip]
Quoted 9 lines
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.
Quoted 4 lines
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.
Quoted 10 lines
Quoted 4 lines
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
Quoted 3 lines
Regards,
Arnout
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
Quoted 10 lines · Stefan Fr?berg
I just read the following:
http://www.extremetech.com/mobile/137412-linux-kernel-version-3-7-will-support-multiple-arm-socsSo 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
Signature · 6 lines
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
PATCH 9/9 firefox: GNU gnash flash, an open source Adobe Flash player & plugin
24.10.2012 23:43, Arnout Vandecappelle kirjoitti:
Quoted 19 lines · Stefan Fr?berg
Quoted 11 lines
I just read the following:
http://www.extremetech.com/mobile/137412-linux-kernel-version-3-7-will-support-multiple-arm-socsSo 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.
Quoted 4 lines
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
Quoted 3 lines
Regards,
Arnout
Dear Stefan Fr?berg,
Quoted 2 lines · Stefan Fr?berg
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com