host-autoconf2-13: new package
PATCH 1/2 host-autoconf2-13: new package
this obsolete version is required by Mozilla b2g
--- package/autoconf2-13/autoconf2-13.hash | 2 ++ package/autoconf2-13/autoconf2-13.mk | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 package/autoconf2-13/autoconf2-13.hash create mode 100644 package/autoconf2-13/autoconf2-13.mk
package/autoconf2-13/autoconf2-13.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz
package/autoconf2-13/autoconf2-13.mk new file +24 -0
@@ -0,0 +1,24 @@ +################################################################################ +# +# autoconf2-13 +# +################################################################################ + +AUTOCONF2_13_VERSION = 2.13 +AUTOCONF2_13_SOURCE = autoconf-$(AUTOCONF2_13_VERSION).tar.gz +AUTOCONF2_13_SITE = $(BR2_GNU_MIRROR)/autoconf + +AUTOCONF2_13_LICENSE = GPLv2 +AUTOCONF2_13_LICENSE_FILES = COPYING + +HOST_AUTOCONF2_13_CONF_ENV = \ + EMACS="no" \ + ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \ + ac_cv_prog_gnu_m4_gnu=no + +HOST_AUTOCONF2_13_CONF_OPTS = \ + --program-suffix=$(AUTOCONF2_13_VERSION) \ + +HOST_AUTOCONF2_13_DEPENDENCIES = host-m4 host-libtool + +$(eval $(host-autotools-package))
Signature · 1 line
2.7.4
PATCH 2/2 b2g: new package
--- package/Config.in | 1 + package/b2g/0001-fix-linking.patch | 28 +++++++++ package/b2g/Config.in | 29 +++++++++ package/b2g/b2g.mk | 125 +++++++++++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 package/b2g/0001-fix-linking.patch create mode 100644 package/b2g/Config.in create mode 100644 package/b2g/b2g.mk
package/Config.in +1 -0
@@ -226,6 +226,7 @@ endmenu menu "Graphic libraries and applications (graphic/text)" comment "Graphic applications" + source "package/b2g/Config.in" source "package/expedite/Config.in" source "package/fswebcam/Config.in" source "package/glmark2/Config.in"
package/b2g/0001-fix-linking.patch new file +28 -0
@@ -0,0 +1,28 @@ +fix linking + +b2g-2_5_20160125/dom/audiochannel/AudioChannelService.cpp:580: error: + undefined reference to 'mozilla::dom::TabParent::AudioChannelChangeNotification(nsPIDOMWindow*, mozilla::dom::AudioChannel, float, bool)' +collect2: error: ld returned 1 exit status + +Signed-off-by: Francois Perrad <[email protected]> + +diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp +index 7c9593e..cd9e1a5 100644 +--- a/dom/audiochannel/AudioChannelService.cpp ++++ b/dom/audiochannel/AudioChannelService.cpp +@@ -574,11 +574,13 @@ AudioChannelService::RefreshAgentsVolumeAndPropagate(AudioChannel aAudioChannel, + return; + } + ++#if 0 + for (uint32_t i = 0; i < mTabParents.Length(); ++i) { + mTabParents[i]->AudioChannelChangeNotification(aWindow, aAudioChannel, + winData->mChannels[(uint32_t)aAudioChannel].mVolume, + winData->mChannels[(uint32_t)aAudioChannel].mMuted); + } ++#endif + + RefreshAgentsVolume(aWindow); + } +-- +
package/b2g/Config.in new file +29 -0
@@ -0,0 +1,29 @@ +config BR2_PACKAGE_B2G + bool "b2g" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_TEE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBVPX + select BR2_PACKAGE_OPENSSL # libcurl4-openssl + select BR2_PACKAGE_XLIB_LIBXT + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 + depends on BR2_USE_MMU # libgtk2 + depends on BR2_USE_WCHAR # libgtk2 + help + B2G (Boot 2 Gecko), the Firefox OS desktop client. + + https://developer.mozilla.org/en-US/Firefox_OS + +comment "b2g needs a toolchain w/wchar, threads, C++" + depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
package/b2g/b2g.mk new file +125 -0
125 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 2/2 b2g: new package
Hello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>
Thanks for this patch. It looks mostly good, but I have some questions.
First of all, the obvious annoying aspect is the need of autoconf2.13. Do they have some plans to update to a newer decent version of autoconf, or would we have to keep autoconf2.13 forever?
Quoted 4 lines
package/Config.in | 1 + package/b2g/0001-fix-linking.patch | 28 +++++++++ package/b2g/Config.in | 29 +++++++++ package/b2g/b2g.mk | 125 +++++++++++++++++++++++++++++++++++++
Should the package be named boot2gecko, in order to be more explicit than b2g ? I'm not sure, since indeed from upstream's point of view the name is b2g. Maybe we should keep it.
Quoted 19 lines
package/b2g/0001-fix-linking.patch new file +13
-0@@ -0,0 +1,28 @@ +fix linking + +b2g-2_5_20160125/dom/audiochannel/AudioChannelService.cpp:580: error: + undefined reference to 'mozilla::dom::TabParent::AudioChannelChangeNotification(nsPIDOMWindow*, mozilla::dom::AudioChannel, float, bool)' +collect2: error: ld returned 1 exit status + +Signed-off-by: Francois Perrad <[email protected]> + +diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp +index 7c9593e..cd9e1a5 100644 +--- a/dom/audiochannel/AudioChannelService.cpp ++++ b/dom/audiochannel/AudioChannelService.cpp +@@ -574,11 +574,13 @@ AudioChannelService::RefreshAgentsVolumeAndPropagate(AudioChannel aAudioChannel,
package/b2g/0001-fix-linking.patch line 23
Quoted 10 lines
package/b2g/0001-fix-linking.patch new file +10
-0+ return; + } + ++#if 0 + for (uint32_t i = 0; i < mTabParents.Length(); ++i) { + mTabParents[i]->AudioChannelChangeNotification(aWindow, aAudioChannel, + winData->mChannels[(uint32_t)aAudioChannel].mVolume, + winData->mChannels[(uint32_t)aAudioChannel].mMuted); + } ++#endif
You're just removing the problematic code. Is this the right fix?
Quoted 13 lines
package/b2g/Config.in new file +7
-0@@ -0,0 +1,29 @@ +config BR2_PACKAGE_B2G + bool "b2g" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_TEE + select BR2_PACKAGE_JPEG
package/b2g/Config.in line 17
Quoted 10 lines
package/b2g/Config.in new file +10
-0+ select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBVPX + select BR2_PACKAGE_OPENSSL # libcurl4-openssl + select BR2_PACKAGE_XLIB_LIBXT + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2
Also needed because of the libvpx select.
package/b2g/Config.in line 25
Quoted 8 lines
package/b2g/Config.in new file +8
-0+ depends on BR2_USE_MMU # libgtk2 + depends on BR2_USE_WCHAR # libgtk2 + help + B2G (Boot 2 Gecko), the Firefox OS desktop client. + + https://developer.mozilla.org/en-US/Firefox_OS + +comment "b2g needs a toolchain w/wchar, threads, C++"
Space between w/ and wchar.
Quoted 35 lines
package/b2g/Config.in new file +4
-0+ depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPPpackage/b2g/b2g.mk new file +25
-0@@ -0,0 +1,125 @@ +################################################################################ +# +# b2g +# +################################################################################ + +B2G_VERSION = 2_5_20160125 +B2G_SITE = https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/archive +B2G_SOURCE = B2G_$(B2G_VERSION)_MERGEDAY.tar.gz +B2G_LICENSE = MPLv2.0 +B2G_LICENSE_FILES = toolkit/content/license.html + +B2G_DEPENDENCIES = host-autoconf2-13 host-python jpeg libcurl libevent libgtk2 libvpx xlib_libXt + +define B2G_MOZCONFIG_COMMON + echo "ac_add_options --prefix=/usr" > $(@D)/mozconfig + echo "ac_add_options --target=$(GNU_TARGET_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --host=$(GNU_HOST_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --build=$(GNU_HOST_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --enable-application=b2g" >> $(@D)/mozconfig + echo "ac_add_options --enable-xterm-updates" >> $(@D)/mozconfig + echo "ac_add_options --disable-debug" >> $(@D)/mozconfig + echo "ac_add_options --disable-tests" >> $(@D)/mozconfig + echo "ac_add_options --enable-optimize" >> $(@D)/mozconfig + echo "ac_add_options --enable-mobile-optimize" >> $(@D)/mozconfig
package/b2g/b2g.mk line 35
Quoted 10 lines
package/b2g/b2g.mk new file +10
-0+ echo "ac_add_options --disable-strip" >> $(@D)/mozconfig + echo "ac_add_options --disable-install-strip" >> $(@D)/mozconfig + echo "ac_add_options --disable-gconf" >> $(@D)/mozconfig + echo "ac_add_options --with-system-bz2" >> $(@D)/mozconfig + echo "ac_add_options --with-system-jpeg" >> $(@D)/mozconfig + echo "ac_add_options --with-system-libevent" >> $(@D)/mozconfig + echo "ac_add_options --with-system-libvpx" >> $(@D)/mozconfig + echo "ac_add_options --with-system-zlib" >> $(@D)/mozconfig + echo "ac_add_options --enable-system-cairo" >> $(@D)/mozconfig + echo "ac_add_options --enable-system-ffi" >> $(@D)/mozconfig
Since you specify --enable-system-ffi, I would have expected a dependency on libffi. Did I miss something?
package/b2g/b2g.mk line 71
Quoted 7 lines
package/b2g/b2g.mk new file +7
-0+ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +B2G_DEPENDENCIES += gst1-plugins-base +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --enable-gstreamer=1.0" >> $(@D)/mozconfig +endef +else +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
Put the
else ifeq ...
on the same line...
package/b2g/b2g.mk line 81
Quoted 10 lines
package/b2g/b2g.mk new file +10
-0+B2G_DEPENDENCIES += gst-plugins-base +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --enable-gstreamer=0.10" >> $(@D)/mozconfig +endef +else +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --disable-gstreamer" >> $(@D)/mozconfig +endef +endif +endif
... as it allows to remove one endif:
ifeq ...
...
else ifeq ...
...
endif
package/b2g/b2g.mk line 93
Quoted 11 lines
package/b2g/b2g.mk new file +11
-0+ifeq ($(BR2_PACKAGE_ICU),y) +B2G_DEPENDENCIES += icu +define B2G_MOZCONFIG_ICU + echo "ac_add_options --with-intl-api" >> $(@D)/mozconfig + echo "ac_add_options --with-system-icu" >> $(@D)/mozconfig +endef +else +define B2G_MOZCONFIG_ICU + echo "ac_add_options --without-intl-api" >> $(@D)/mozconfig +endef +endif
This whole thing seems a bit redundant. What about instead:
ifeq ...B2G_CONF_OPTS += --with-intl-api --with-system-icu elseB2G_CONF_OPTS += --without-intl-api
endif
And then later on:
$(foreach opt,$(B2G_CONF_OPTS),\ echo "ac_add_options $(opt)" >> $(@D)/mozconfig )
It avoids having to duplicate the echo "ac_add_options ..." >> $(@D)/mozconfig numerous times.
package/b2g/b2g.mk line 99
Quoted 6 lines
package/b2g/b2g.mk new file +6
-0+ +B2G_CONF_ENV = \ + MOZ_OBJDIR=$(@D)/obj-b2g \ + CROSS_COMPILE=1 \ + AUTOCONF=$(HOST_DIR)/usr/bin/autoconf2.13 \ + PERL=$(shell which perl) \
A priori this should not be needed, since package/Makefile.in exports PERL with the exact same value. Can you double check if it's really needed?
package/b2g/b2g.mk line 109
Quoted 10 lines
package/b2g/b2g.mk new file +10
-0+ PYTHON=$(HOST_DIR)/usr/bin/python + +define B2G_CONFIGURE_CMDS + $(B2G_MOZCONFIG_COMMON) + $(B2G_MOZCONFIG_ALSA) + $(B2G_MOZCONFIG_DBUS) + $(B2G_MOZCONFIG_GSTREAMER) + $(B2G_MOZCONFIG_ICU) + $(TARGET_CONFIGURE_OPTS) \ + $(B2G_CONF_ENV) \
Continuation lines should be indented with one more tab than the first line:
package/b2g/b2g.mk line 110
Quoted 1 line
package/b2g/b2g.mk new file +1
-0+ $(MAKE1) -C $(@D) -f client.mk configure
$(TARGET_CONFIGURE_OPTS) $(BG2_CONF_ENV) $(MAKE1) -C $(@D) -f client.mk configure
package/b2g/b2g.mk line 120
Quoted 10 lines
package/b2g/b2g.mk new file +10
-0+endef + +define B2G_BUILD_CMDS + $(MAKE1) -C $(@D) -f client.mk build_all \ + MOZ_OBJDIR=$(@D)/obj-b2g + $(MAKE1) -C $(@D)/obj-b2g package +endef + +define B2G_INSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/b2g
We normally don't remove stuff from the target prior to the installation.
package/b2g/b2g.mk line 125
Quoted 5 lines
package/b2g/b2g.mk new file +5
-0+ tar xfj $(@D)/obj-b2g/dist/b2g-*.tar.bz2 -C $(TARGET_DIR)/usr/lib + ln -sf ../lib/b2g/b2g $(TARGET_DIR)/usr/bin +endef + +$(eval $(generic-package))
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/2 b2g: new package
2016-07-16 15:01 GMT+02:00 Thomas Petazzoni
<[email protected]>:
Quoted 11 lines
Hello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>Thanks for this patch. It looks mostly good, but I have some questions.
First of all, the obvious annoying aspect is the need of autoconf2.13. Do they have some plans to update to a newer decent version of autoconf, or would we have to keep autoconf2.13 forever?
Mozilla will stay with autoconf2.13.
FYI, Debian have a package autoconf2.13
Quoted 9 lines
Quoted 4 lines
package/Config.in | 1 + package/b2g/0001-fix-linking.patch | 28 +++++++++ package/b2g/Config.in | 29 +++++++++ package/b2g/b2g.mk | 125 +++++++++++++++++++++++++++++++++++++Should the package be named boot2gecko, in order to be more explicit than b2g ? I'm not sure, since indeed from upstream's point of view the name is b2g. Maybe we should keep it.
I just follow the upstream.
Quoted 23 lines
Quoted 23 lines
package/b2g/0001-fix-linking.patch new file +17
-0@@ -0,0 +1,28 @@ +fix linking + +b2g-2_5_20160125/dom/audiochannel/AudioChannelService.cpp:580: error: + undefined reference to 'mozilla::dom::TabParent::AudioChannelChangeNotification(nsPIDOMWindow*, mozilla::dom::AudioChannel, float, bool)' +collect2: error: ld returned 1 exit status + +Signed-off-by: Francois Perrad <[email protected]> + +diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp +index 7c9593e..cd9e1a5 100644 +--- a/dom/audiochannel/AudioChannelService.cpp ++++ b/dom/audiochannel/AudioChannelService.cpp +@@ -574,11 +574,13 @@ AudioChannelService::RefreshAgentsVolumeAndPropagate(AudioChannel aAudioChannel, + return; + } + ++#if 0
Quoted 8 lines
package/b2g/0001-fix-linking.patch line 23
Quoted 6 lines
package/b2g/0001-fix-linking.patch new file +6
-0+ for (uint32_t i = 0; i < mTabParents.Length(); ++i) { + mTabParents[i]->AudioChannelChangeNotification(aWindow, aAudioChannel, + winData->mChannels[(uint32_t)aAudioChannel].mVolume, + winData->mChannels[(uint32_t)aAudioChannel].mMuted); + } ++#endifYou're just removing the problematic code. Is this the right fix?
Just a quick & dirty fix, as first step.
Quoted 18 lines
Quoted 18 lines
package/b2g/Config.in new file +11
-0@@ -0,0 +1,29 @@ +config BR2_PACKAGE_B2G + bool "b2g" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_TEE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBVPX
Quoted 8 lines
package/b2g/Config.in line 17
Quoted 6 lines
package/b2g/Config.in new file +6
-0+ select BR2_PACKAGE_OPENSSL # libcurl4-openssl + select BR2_PACKAGE_XLIB_LIBXT + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2Also needed because of the libvpx select.
OK
Quoted 11 lines
package/b2g/Config.in line 25
Quoted 9 lines
package/b2g/Config.in new file +8
-0+ depends on BR2_USE_MMU # libgtk2 + depends on BR2_USE_WCHAR # libgtk2 + help + B2G (Boot 2 Gecko), the Firefox OS desktop client. + + https://developer.mozilla.org/en-US/Firefox_OS + +comment "b2g needs a toolchain w/wchar, threads, C++"Space between w/ and wchar.
OK
Quoted 41 lines
Quoted 41 lines
package/b2g/Config.in new file +4
-0+ depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPPpackage/b2g/b2g.mk new file +30
-0@@ -0,0 +1,125 @@ +################################################################################ +# +# b2g +# +################################################################################ + +B2G_VERSION = 2_5_20160125 +B2G_SITE = https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/archive +B2G_SOURCE = B2G_$(B2G_VERSION)_MERGEDAY.tar.gz +B2G_LICENSE = MPLv2.0 +B2G_LICENSE_FILES = toolkit/content/license.html + +B2G_DEPENDENCIES = host-autoconf2-13 host-python jpeg libcurl libevent libgtk2 libvpx xlib_libXt + +define B2G_MOZCONFIG_COMMON + echo "ac_add_options --prefix=/usr" > $(@D)/mozconfig + echo "ac_add_options --target=$(GNU_TARGET_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --host=$(GNU_HOST_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --build=$(GNU_HOST_NAME)" >> $(@D)/mozconfig + echo "ac_add_options --enable-application=b2g" >> $(@D)/mozconfig + echo "ac_add_options --enable-xterm-updates" >> $(@D)/mozconfig + echo "ac_add_options --disable-debug" >> $(@D)/mozconfig + echo "ac_add_options --disable-tests" >> $(@D)/mozconfig + echo "ac_add_options --enable-optimize" >> $(@D)/mozconfig + echo "ac_add_options --enable-mobile-optimize" >> $(@D)/mozconfig + echo "ac_add_options --disable-strip" >> $(@D)/mozconfig + echo "ac_add_options --disable-install-strip" >> $(@D)/mozconfig + echo "ac_add_options --disable-gconf" >> $(@D)/mozconfig + echo "ac_add_options --with-system-bz2" >> $(@D)/mozconfig + echo "ac_add_options --with-system-jpeg" >> $(@D)/mozconfig
Quoted 8 lines
package/b2g/b2g.mk line 35
Quoted 5 lines
package/b2g/b2g.mk new file +5
-0+ echo "ac_add_options --with-system-libevent" >> $(@D)/mozconfig + echo "ac_add_options --with-system-libvpx" >> $(@D)/mozconfig + echo "ac_add_options --with-system-zlib" >> $(@D)/mozconfig + echo "ac_add_options --enable-system-cairo" >> $(@D)/mozconfig + echo "ac_add_options --enable-system-ffi" >> $(@D)/mozconfigSince you specify --enable-system-ffi, I would have expected a dependency on libffi. Did I miss something?
OK
Quoted 11 lines
package/b2g/b2g.mk line 71
Quoted 8 lines
package/b2g/b2g.mk new file +7
-0+ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +B2G_DEPENDENCIES += gst1-plugins-base +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --enable-gstreamer=1.0" >> $(@D)/mozconfig +endef +else +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)Put the
Quoted 3 lines
else ifeq ...
on the same line...
OK
Quoted 40 lines
package/b2g/b2g.mk line 81
Quoted 11 lines
package/b2g/b2g.mk new file +10
-0+B2G_DEPENDENCIES += gst-plugins-base +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --enable-gstreamer=0.10" >> $(@D)/mozconfig +endef +else +define B2G_MOZCONFIG_GSTREAMER + echo "ac_add_options --disable-gstreamer" >> $(@D)/mozconfig +endef +endif +endif... as it allows to remove one endif:
ifeq ...
...
else ifeq ...
...
endifpackage/b2g/b2g.mk line 93
Quoted 11 lines
package/b2g/b2g.mk new file +11
-0+ifeq ($(BR2_PACKAGE_ICU),y) +B2G_DEPENDENCIES += icu +define B2G_MOZCONFIG_ICU + echo "ac_add_options --with-intl-api" >> $(@D)/mozconfig + echo "ac_add_options --with-system-icu" >> $(@D)/mozconfig +endef +else +define B2G_MOZCONFIG_ICU + echo "ac_add_options --without-intl-api" >> $(@D)/mozconfig +endef +endifThis whole thing seems a bit redundant. What about instead:
ifeq ...
B2G_CONF_OPTS+= --with-intl-api --with-system-icu elseB2G_CONF_OPTS+= --without-intl-api
endif
Quoted 6 lines
And then later on:
$(foreach opt,$(B2G_CONF_OPTS),\ echo "ac_add_options $(opt)" >> $(@D)/mozconfig )
Great improvement
Quoted 13 lines
It avoids having to duplicate the echo "
ac_add_options..." >> $(@D)/mozconfig numerous times.package/b2g/b2g.mk line 99
Quoted 6 lines
package/b2g/b2g.mk new file +6
-0+ +B2G_CONF_ENV = \ + MOZ_OBJDIR=$(@D)/obj-b2g \ + CROSS_COMPILE=1 \ + AUTOCONF=$(HOST_DIR)/usr/bin/autoconf2.13 \ + PERL=$(shell which perl) \A priori this should not be needed, since package/Makefile.in exports PERL with the exact same value. Can you double check if it's really needed?
OK
Quoted 14 lines
package/b2g/b2g.mk line 109
Quoted 11 lines
package/b2g/b2g.mk new file +10
-0+ PYTHON=$(HOST_DIR)/usr/bin/python + +define B2G_CONFIGURE_CMDS + $(B2G_MOZCONFIG_COMMON) + $(B2G_MOZCONFIG_ALSA) + $(B2G_MOZCONFIG_DBUS) + $(B2G_MOZCONFIG_GSTREAMER) + $(B2G_MOZCONFIG_ICU) + $(TARGET_CONFIGURE_OPTS) \ + $(B2G_CONF_ENV) \Continuation lines should be indented with one more tab than the first line:
OK
Quoted 6 lines
package/b2g/b2g.mk line 110
Quoted 2 lines
package/b2g/b2g.mk new file +1
-0+ $(MAKE1) -C $(@D) -f client.mk configure$(TARGET_CONFIGURE_OPTS) $(BG2_CONF_ENV) $(MAKE1) -C $(@D) -f client.mk configure
Quoted 13 lines
package/b2g/b2g.mk line 120
Quoted 10 lines
package/b2g/b2g.mk new file +10
-0+endef + +define B2G_BUILD_CMDS + $(MAKE1) -C $(@D) -f client.mk build_all \ + MOZ_OBJDIR=$(@D)/obj-b2g + $(MAKE1) -C $(@D)/obj-b2g package +endef + +define B2G_INSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/b2gWe normally don't remove stuff from the target prior to the installation.
OK
Fran?ois
Quoted 18 lines
package/b2g/b2g.mk line 125
Quoted 6 lines
package/b2g/b2g.mk new file +5
-0+ tar xfj $(@D)/obj-b2g/dist/b2g-*.tar.bz2 -C $(TARGET_DIR)/usr/lib + ln -sf ../lib/b2g/b2g $(TARGET_DIR)/usr/bin +endef + +$(eval $(generic-package))Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot