From c4dfb08350a69e89d0eaa112574b09fab723013d Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 11 Feb 2014 13:42:08 +0100 Subject: [PATCH 001/107] kickoff 2014.05 development cycle Signed-off-by: Peter Korsgaard --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9929e7e040..74022a5971 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ #-------------------------------------------------------------- # Set and export the version string -export BR2_VERSION:=2014.02-rc1 +export BR2_VERSION:=2014.05-git # Check for minimal make version (note: this check will break at make 10.x) MIN_MAKE_VERSION=3.81 From 00e71ee64408c6c226f458e80d6e444e94009814 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 9 Feb 2014 10:48:52 +0800 Subject: [PATCH 002/107] f2fs-tools: bump to version 1.3.0 This version includes: - add f2fstat tool - critical bug fix on nat bitmaps Signed-off-by: Axel Lin Signed-off-by: Peter Korsgaard --- package/f2fs-tools/f2fs-tools.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/f2fs-tools/f2fs-tools.mk b/package/f2fs-tools/f2fs-tools.mk index cffd4cb4bb..2045e05ff7 100644 --- a/package/f2fs-tools/f2fs-tools.mk +++ b/package/f2fs-tools/f2fs-tools.mk @@ -4,7 +4,7 @@ # ################################################################################ -F2FS_TOOLS_VERSION = 576cb469e73b9342f1d10ba5d0428bbce22cbc3b +F2FS_TOOLS_VERSION = 858c4039c85f7c00c57925902985701b1e083555 F2FS_TOOLS_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git F2FS_TOOLS_SITE_METHOD = git F2FS_TOOLS_CONF_ENV = ac_cv_file__git=no From de32f1e129fcdfbff56e916a52ee218b7fbd0d7e Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 6 Feb 2014 19:50:01 +0800 Subject: [PATCH 003/107] usb_modeswitch: bump to version 2.1.0 Version 2.1.0, 2014/01/28 ATTENTION: -I flag meaning reversed, default is to skip SCSI inquiry; introduction of StandardEject, replacing many MessageContents with the same function, reducing size of device config files, and always including the 'Allow Medium Removal' before ejecting (thanks to Lars Melin for the idea); fix in "bulk_read", removing bogus CSW request (report from "Sonya@zte") Signed-off-by: Axel Lin Signed-off-by: Peter Korsgaard --- package/usb_modeswitch/usb_modeswitch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk index 87afe9f865..5d3bacecbd 100644 --- a/package/usb_modeswitch/usb_modeswitch.mk +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -4,7 +4,7 @@ # ################################################################################ -USB_MODESWITCH_VERSION = 2.0.1 +USB_MODESWITCH_VERSION = 2.1.0 USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2 USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch USB_MODESWITCH_DEPENDENCIES = libusb From 91475e6111065655cce7bb8a411f77fc4eb7030e Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 6 Feb 2014 19:50:52 +0800 Subject: [PATCH 004/107] usb_modeswitch_data: bump to version 20140129 20140129: Minor bug fix in configs 19d2:0149 and 19d2:2000 (Lars Melin reported) Signed-off-by: Axel Lin Signed-off-by: Peter Korsgaard --- package/usb_modeswitch_data/usb_modeswitch_data.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.mk b/package/usb_modeswitch_data/usb_modeswitch_data.mk index 9aa0dc43de..537edd7422 100644 --- a/package/usb_modeswitch_data/usb_modeswitch_data.mk +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -4,7 +4,7 @@ # ################################################################################ -USB_MODESWITCH_DATA_VERSION = 20131113 +USB_MODESWITCH_DATA_VERSION = 20140129 USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch From fe795f551216940460960c418cd1311341745b74 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 11 Feb 2014 19:01:41 +0100 Subject: [PATCH 005/107] connman: bump version Signed-off-by: Peter Korsgaard --- package/connman/connman.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/connman/connman.mk b/package/connman/connman.mk index e0ae7a631a..27fe72ea9c 100644 --- a/package/connman/connman.mk +++ b/package/connman/connman.mk @@ -4,7 +4,7 @@ # ################################################################################ -CONNMAN_VERSION = 1.19 +CONNMAN_VERSION = 1.21 CONNMAN_SOURCE = connman-$(CONNMAN_VERSION).tar.xz CONNMAN_SITE = $(BR2_KERNEL_MIRROR)/linux/network/connman/ CONNMAN_DEPENDENCIES = libglib2 dbus iptables gnutls From 746be4fb522bf17d01c5cf5596d09889f1994874 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:43:54 +0100 Subject: [PATCH 006/107] gstreamer1: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gstreamer1/gstreamer1.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk index cf2a86d83a..a9c2ff43e6 100644 --- a/package/gstreamer1/gstreamer1/gstreamer1.mk +++ b/package/gstreamer1/gstreamer1/gstreamer1.mk @@ -4,7 +4,7 @@ # ################################################################################ -GSTREAMER1_VERSION = 1.2.2 +GSTREAMER1_VERSION = 1.2.3 GSTREAMER1_SOURCE = gstreamer-$(GSTREAMER1_VERSION).tar.xz GSTREAMER1_SITE = http://gstreamer.freedesktop.org/src/gstreamer GSTREAMER1_INSTALL_STAGING = YES From 1037a447c340e4b1cbabfc9f597537c2bd34c922 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:44:21 +0100 Subject: [PATCH 007/107] gst1-plugins-base: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk index 4cb84634cf..72e4514821 100644 --- a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST1_PLUGINS_BASE_VERSION = 1.2.2 +GST1_PLUGINS_BASE_VERSION = 1.2.3 GST1_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST1_PLUGINS_BASE_VERSION).tar.xz GST1_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base GST1_PLUGINS_BASE_INSTALL_STAGING = YES From bd4958b72e67696f12ff701b9cc08118d2d19fd6 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:44:47 +0100 Subject: [PATCH 008/107] gst1-plugins-good: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk index 694505f12b..2b7f032d24 100644 --- a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST1_PLUGINS_GOOD_VERSION = 1.2.2 +GST1_PLUGINS_GOOD_VERSION = 1.2.3 GST1_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST1_PLUGINS_GOOD_VERSION).tar.xz GST1_PLUGINS_GOOD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-good GST1_PLUGINS_GOOD_LICENSE_FILES = COPYING From bf0946d7c49dae6ce8dcc92a3355639616e2232f Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:45:17 +0100 Subject: [PATCH 009/107] gst1-plugins-ugly: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk index b59f885206..561bd92540 100644 --- a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST1_PLUGINS_UGLY_VERSION = 1.2.2 +GST1_PLUGINS_UGLY_VERSION = 1.2.3 GST1_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST1_PLUGINS_UGLY_VERSION).tar.xz GST1_PLUGINS_UGLY_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-ugly GST1_PLUGINS_UGLY_LICENSE_FILES = COPYING From 7a0570dca4a77214f659040305db08ffa45ece49 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:46:57 +0100 Subject: [PATCH 010/107] gst1-plugins-bad: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index 0d9a108b38..046f6bcf80 100644 --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST1_PLUGINS_BAD_VERSION = 1.2.2 +GST1_PLUGINS_BAD_VERSION = 1.2.3 GST1_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST1_PLUGINS_BAD_VERSION).tar.xz GST1_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad GST1_PLUGINS_BAD_LICENSE_FILES = COPYING COPYING.LIB From 24bb549098b3a0bb578a9c3724fcc75aa4764d26 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 12 Feb 2014 11:47:37 +0100 Subject: [PATCH 011/107] gst1-libav: bump version Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-libav/gst1-libav.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-libav/gst1-libav.mk b/package/gstreamer1/gst1-libav/gst1-libav.mk index 1c45acc737..50dd1dfc81 100644 --- a/package/gstreamer1/gst1-libav/gst1-libav.mk +++ b/package/gstreamer1/gst1-libav/gst1-libav.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST1_LIBAV_VERSION = 1.2.2 +GST1_LIBAV_VERSION = 1.2.3 GST1_LIBAV_SOURCE = gst-libav-$(GST1_LIBAV_VERSION).tar.xz GST1_LIBAV_SITE = http://gstreamer.freedesktop.org/src/gst-libav From 3f8b51338432686307f34a1ea44e6ff9a37e6399 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 28 Jan 2014 18:26:27 -0300 Subject: [PATCH 012/107] php: fix for external extensions Adjust phpize and php-config to make them work for cross-compiled external extensions. While at it also fix dl* issues that prevent said extensions from loading. Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/php/php-02-dlopen.patch | 25 +++++++++++++++++++++++++ package/php/php.mk | 25 ++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 package/php/php-02-dlopen.patch diff --git a/package/php/php-02-dlopen.patch b/package/php/php-02-dlopen.patch new file mode 100644 index 0000000000..1dd009f799 --- /dev/null +++ b/package/php/php-02-dlopen.patch @@ -0,0 +1,25 @@ +PHP can't be AUTORECONF with any modern autotools and the dl tests are +pretty bad for cross-compilation, so just kill the needed ac_cv value unsets +so they can flow through from the package makefile. + +Signed-off-by: Gustavo Zacarias + +diff -Nura php-5.5.8.orig/configure php-5.5.8/configure +--- php-5.5.8.orig/configure 2014-01-28 17:41:33.943851727 -0300 ++++ php-5.5.8/configure 2014-01-28 17:42:53.785493795 -0300 +@@ -16985,7 +16985,6 @@ + + + +- unset ac_cv_func_dlopen + unset ac_cv_func___dlopen + unset found + +@@ -17013,7 +17012,6 @@ + + *) + +- unset ac_cv_lib_dl_dlopen + unset ac_cv_lib_dl___dlopen + unset found + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 diff --git a/package/php/php.mk b/package/php/php.mk index de02f4bb91..2f6280fc72 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -19,15 +19,25 @@ PHP_CONF_OPT = --mandir=/usr/share/man \ --with-config-file-path=/etc \ --localstatedir=/var \ --disable-rpath +PHP_CONF_ENV = EXTRA_LIBS="$(PHP_EXTRA_LIBS)" + ifeq ($(BR2_ENDIAN),"BIG") -PHP_CONF_ENV = ac_cv_c_bigendian_php=yes +PHP_CONF_ENV += ac_cv_c_bigendian_php=yes else -PHP_CONF_ENV = ac_cv_c_bigendian_php=no +PHP_CONF_ENV += ac_cv_c_bigendian_php=no endif PHP_CONFIG_SCRIPTS = php-config PHP_CFLAGS = $(TARGET_CFLAGS) +# We need to force dl "detection" +ifeq ($(BR2_PREFER_STATIC_LIB),) +PHP_CONF_ENV += ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes +PHP_EXTRA_LIBS += -ldl +else +PHP_CONF_ENV += ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=no +endif + # Workaround for non-IPv6 uClibc toolchain ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) ifneq ($(BR2_INET_IPV6),y) @@ -116,7 +126,7 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y) # The intl module is implemented in C++, but PHP fails to use # g++ as the compiler for the final link. As a workaround, # tell it to link libstdc++. - PHP_CONF_ENV += EXTRA_LIBS="-lstdc++" + PHP_EXTRA_LIBS + = -lstdc++ endif ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y) @@ -200,6 +210,15 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y) PHP_DEPENDENCIES += netsnmp endif +define PHP_EXTENSIONS_FIXUP + $(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \ + $(STAGING_DIR)/usr/bin/phpize + $(SED) "/extension_dir/ s:/usr:$(TARGET_DIR)/usr:" \ + $(STAGING_DIR)/usr/bin/php-config +endef + +PHP_POST_INSTALL_TARGET_HOOKS += PHP_EXTENSIONS_FIXUP + define PHP_INSTALL_FIXUP rm -rf $(TARGET_DIR)/usr/lib/php rm -f $(TARGET_DIR)/usr/bin/phpize From efeda1bc487339beeeb9a1b58ab1fb241da6f548 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 28 Jan 2014 18:26:28 -0300 Subject: [PATCH 013/107] php-zmq: new package Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/Config.in | 10 ++++++++++ package/php-zmq/Config.in | 17 +++++++++++++++++ package/php-zmq/php-zmq.mk | 25 +++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 package/php-zmq/Config.in create mode 100644 package/php-zmq/php-zmq.mk diff --git a/package/Config.in b/package/Config.in index fca61d6752..9041059619 100644 --- a/package/Config.in +++ b/package/Config.in @@ -394,6 +394,16 @@ menu "Perl libraries/modules" endmenu endif source "package/php/Config.in" +if BR2_PACKAGE_PHP +if !BR2_PREFER_STATIC_LIB +menu "External php extensions" +source "package/php-zmq/Config.in" +endmenu +endif +if BR2_PREFER_STATIC_LIB +comment "External PHP extensions need a toolchain w/ dynamic library" +endif +endif source "package/python/Config.in" if BR2_PACKAGE_PYTHON menu "external python modules" diff --git a/package/php-zmq/Config.in b/package/php-zmq/Config.in new file mode 100644 index 0000000000..f32b5a3d90 --- /dev/null +++ b/package/php-zmq/Config.in @@ -0,0 +1,17 @@ +comment "php-zmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) + +config BR2_PACKAGE_PHP_ZMQ + bool "php-zmq" + depends on BR2_PACKAGE_PHP + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ZEROMQ + help + ZeroMQ messaging bindings for PHP + + http://pecl.php.net/package/zmq diff --git a/package/php-zmq/php-zmq.mk b/package/php-zmq/php-zmq.mk new file mode 100644 index 0000000000..2b48a637f8 --- /dev/null +++ b/package/php-zmq/php-zmq.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# php-zmq +# +################################################################################ + +PHP_ZMQ_VERSION = 1.1.2 +PHP_ZMQ_SOURCE = zmq-$(PHP_ZMQ_VERSION).tgz +PHP_ZMQ_SITE = http://pecl.php.net/get +# phpize does the autoconf magic +PHP_ZMQ_DEPENDENCIES = php zeromq host-autoconf host-pkgconf +PHP_ZMQ_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config +PHP_ZMQ_LICENSE = BSD-3c +PHP_ZMQ_LICENSE_FILES = LICENSE + +define PHP_ZMQ_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_ZMQ_PRE_CONFIGURE_HOOKS += PHP_ZMQ_PHPIZE + +$(eval $(autotools-package)) From 534039b3297042acb632652469019347b9966700 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 28 Jan 2014 18:26:29 -0300 Subject: [PATCH 014/107] php-yaml: new package Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/php-yaml/Config.in | 8 ++++++++ package/php-yaml/php-yaml.mk | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/php-yaml/Config.in create mode 100644 package/php-yaml/php-yaml.mk diff --git a/package/Config.in b/package/Config.in index 9041059619..8998882975 100644 --- a/package/Config.in +++ b/package/Config.in @@ -397,6 +397,7 @@ source "package/php/Config.in" if BR2_PACKAGE_PHP if !BR2_PREFER_STATIC_LIB menu "External php extensions" +source "package/php-yaml/Config.in" source "package/php-zmq/Config.in" endmenu endif diff --git a/package/php-yaml/Config.in b/package/php-yaml/Config.in new file mode 100644 index 0000000000..8d09ce28f3 --- /dev/null +++ b/package/php-yaml/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_YAML + bool "php-yaml" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_LIBYAML + help + PHP YAML-1.1 parser and emitter. + + http://pecl.php.net/package/yaml diff --git a/package/php-yaml/php-yaml.mk b/package/php-yaml/php-yaml.mk new file mode 100644 index 0000000000..a53e0126b5 --- /dev/null +++ b/package/php-yaml/php-yaml.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-yaml +# +################################################################################ + +PHP_YAML_VERSION = 1.1.1 +PHP_YAML_SOURCE = yaml-$(PHP_YAML_VERSION).tgz +PHP_YAML_SITE = http://pecl.php.net/get +PHP_YAML_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-yaml=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_YAML_DEPENDENCIES = libyaml php host-autoconf +PHP_YAML_LICENSE = MIT +PHP_YAML_LICENSE_FILES = LICENSE + +define PHP_YAML_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_YAML_PRE_CONFIGURE_HOOKS += PHP_YAML_PHPIZE + +$(eval $(autotools-package)) From 555120da7cc9b5500886dfb8266368cce538c5b7 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 28 Jan 2014 18:26:30 -0300 Subject: [PATCH 015/107] php-ssh2: new package Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/php-ssh2/Config.in | 8 ++++++++ package/php-ssh2/php-ssh2.mk | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/php-ssh2/Config.in create mode 100644 package/php-ssh2/php-ssh2.mk diff --git a/package/Config.in b/package/Config.in index 8998882975..1fd47191d3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -397,6 +397,7 @@ source "package/php/Config.in" if BR2_PACKAGE_PHP if !BR2_PREFER_STATIC_LIB menu "External php extensions" +source "package/php-ssh2/Config.in" source "package/php-yaml/Config.in" source "package/php-zmq/Config.in" endmenu diff --git a/package/php-ssh2/Config.in b/package/php-ssh2/Config.in new file mode 100644 index 0000000000..b457900740 --- /dev/null +++ b/package/php-ssh2/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_SSH2 + bool "php-ssh2" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_LIBSSH2 + help + PHP bindings for the libssh2 library. + + http://pecl.php.net/package/ssh2 diff --git a/package/php-ssh2/php-ssh2.mk b/package/php-ssh2/php-ssh2.mk new file mode 100644 index 0000000000..f2067a4dfa --- /dev/null +++ b/package/php-ssh2/php-ssh2.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-ssh2 +# +################################################################################ + +PHP_SSH2_VERSION = 0.12 +PHP_SSH2_SOURCE = ssh2-$(PHP_SSH2_VERSION).tgz +PHP_SSH2_SITE = http://pecl.php.net/get +PHP_SSH2_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-ssh2=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_SSH2_DEPENDENCIES = libssh2 php host-autoconf +PHP_SSH2_LICENSE = PHP +PHP_SSH2_LICENSE_FILES = LICENSE + +define PHP_SSH2_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_SSH2_PRE_CONFIGURE_HOOKS += PHP_SSH2_PHPIZE + +$(eval $(autotools-package)) From 7d27ff2fe0ce7e455aef93ffc58c6e4150ab49d5 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 28 Jan 2014 18:26:31 -0300 Subject: [PATCH 016/107] php-imagick: new package Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/php-imagick/Config.in | 8 ++++++++ package/php-imagick/php-imagick.mk | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/php-imagick/Config.in create mode 100644 package/php-imagick/php-imagick.mk diff --git a/package/Config.in b/package/Config.in index 1fd47191d3..19c9c4bc45 100644 --- a/package/Config.in +++ b/package/Config.in @@ -397,6 +397,7 @@ source "package/php/Config.in" if BR2_PACKAGE_PHP if !BR2_PREFER_STATIC_LIB menu "External php extensions" +source "package/php-imagick/Config.in" source "package/php-ssh2/Config.in" source "package/php-yaml/Config.in" source "package/php-zmq/Config.in" diff --git a/package/php-imagick/Config.in b/package/php-imagick/Config.in new file mode 100644 index 0000000000..1d55fccdda --- /dev/null +++ b/package/php-imagick/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_IMAGICK + bool "php-imagick" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_IMAGEMAGICK + help + PHP wrapper to the ImageMagick library. + + http://pecl.php.net/package/imagick diff --git a/package/php-imagick/php-imagick.mk b/package/php-imagick/php-imagick.mk new file mode 100644 index 0000000000..148d519495 --- /dev/null +++ b/package/php-imagick/php-imagick.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-imagick +# +################################################################################ + +PHP_IMAGICK_VERSION = 3.1.2 +PHP_IMAGICK_SOURCE = imagick-$(PHP_IMAGICK_VERSION).tgz +PHP_IMAGICK_SITE = http://pecl.php.net/get +PHP_IMAGICK_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-imagick=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_IMAGICK_DEPENDENCIES = imagemagick php host-autoconf +PHP_IMAGICK_LICENSE = PHP +PHP_IMAGICK_LICENSE_FILES = LICENSE + +define PHP_IMAGICK_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_IMAGICK_PRE_CONFIGURE_HOOKS += PHP_IMAGICK_PHPIZE + +$(eval $(autotools-package)) From 591b02ca7b47fb61a523e9db3d60350d0637b2cc Mon Sep 17 00:00:00 2001 From: Jerzy Grzegorek Date: Thu, 6 Feb 2014 15:05:05 +0100 Subject: [PATCH 017/107] git: bump to version 1.8.5.4 Signed-off-by: Jerzy Grzegorek Signed-off-by: Peter Korsgaard --- package/git/git.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/git/git.mk b/package/git/git.mk index e2df3a0484..63862f271d 100644 --- a/package/git/git.mk +++ b/package/git/git.mk @@ -4,7 +4,7 @@ # ################################################################################ -GIT_VERSION = 1.8.5.3 +GIT_VERSION = 1.8.5.4 GIT_SITE = http://git-core.googlecode.com/files/ GIT_LICENSE = GPLv2 LGPLv2.1+ GIT_LICENSE_FILES = COPYING LGPL-2.1 From 9b8ffcd8f25cede33bcd2dc81ef8682c2acb0b97 Mon Sep 17 00:00:00 2001 From: Julien Boibessot Date: Tue, 11 Feb 2014 09:43:19 +0100 Subject: [PATCH 018/107] Add OpenTyrian package (SDL game) [Peter: hide -data package if opentyrian isn't enabled] Signed-off-by: Julien Boibessot Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/Config.in | 2 ++ package/opentyrian-data/Config.in | 9 ++++++ package/opentyrian-data/opentyrian-data.mk | 23 ++++++++++++++ package/opentyrian/Config.in | 24 +++++++++++++++ package/opentyrian/opentyrian.mk | 36 ++++++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 package/opentyrian-data/Config.in create mode 100644 package/opentyrian-data/opentyrian-data.mk create mode 100644 package/opentyrian/Config.in create mode 100644 package/opentyrian/opentyrian.mk diff --git a/package/Config.in b/package/Config.in index 19c9c4bc45..c3237111d1 100644 --- a/package/Config.in +++ b/package/Config.in @@ -156,6 +156,8 @@ source "package/doom-wad/Config.in" source "package/gnuchess/Config.in" source "package/lbreakout2/Config.in" source "package/ltris/Config.in" +source "package/opentyrian/Config.in" +source "package/opentyrian-data/Config.in" source "package/prboom/Config.in" source "package/rubix/Config.in" endmenu diff --git a/package/opentyrian-data/Config.in b/package/opentyrian-data/Config.in new file mode 100644 index 0000000000..df25c218ea --- /dev/null +++ b/package/opentyrian-data/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_OPENTYRIAN_DATA + bool "OpenTyrian data" + depends on BR2_PACKAGE_OPENTYRIAN + help + Data files to use with OpenTyrian game. Currently only the original + Tyrian 2.1 data files, that have been released as Freeware in 2004, + are compatible. + + http://code.google.com/p/opentyrian/wiki/FAQ diff --git a/package/opentyrian-data/opentyrian-data.mk b/package/opentyrian-data/opentyrian-data.mk new file mode 100644 index 0000000000..75fa3d9a11 --- /dev/null +++ b/package/opentyrian-data/opentyrian-data.mk @@ -0,0 +1,23 @@ +############################################################################### +# +# opentyrian-data +# +############################################################################### + +OPENTYRIAN_DATA_VERSION = 2.1 +OPENTYRIAN_DATA_SITE = http://www.camanis.net/opentyrian/ +OPENTYRIAN_DATA_SOURCE = tyrian21.zip +OPENTYRIAN_DATA_LICENSE = Freeware + +define OPENTYRIAN_DATA_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(OPENTYRIAN_DATA_SOURCE) +endef + +define OPENTYRIAN_DATA_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/ + cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/ + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe +endef + +$(eval $(generic-package)) diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in new file mode 100644 index 0000000000..3ebcf0841a --- /dev/null +++ b/package/opentyrian/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_OPENTYRIAN_DATA + help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + It requires the original data files to run. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + http://code.google.com/p/opentyrian/ + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endif diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk new file mode 100644 index 0000000000..80465a308f --- /dev/null +++ b/package/opentyrian/opentyrian.mk @@ -0,0 +1,36 @@ +############################################################################### +# +# opentyrian +# +############################################################################### + +OPENTYRIAN_VERSION = 2.1.20130907 +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/ +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz +OPENTYRIAN_LICENSE = GPLv2+ +OPENTYRIAN_LICENSE_FILES = COPYING + +OPENTYRIAN_DEPENDENCIES = sdl + +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y) +OPENTYRIAN_DEPENDENCIES += sdl_net +OPENTYRIAN_NETWORK = true +else +OPENTYRIAN_NETWORK = false +endif + +define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="/bin/true" \ + SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef + +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/bin/opentyrian +endef + +$(eval $(generic-package)) From 937a95449ecaad02386523f8fe2eeefbea6be971 Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Fri, 7 Feb 2014 14:21:32 +0100 Subject: [PATCH 019/107] eudev: new package eudev is a userspace device management daemon. It is a standalone version, independent from systemd. It is a fork maintained by Gentoo. Features: - No extra configuration options are available: Gudev is build if libglib2 is selected. - No dependency on hwdata as the package uses its own hardware database (as does systemd). eudev 1.3 is in sync with systemd v207. [Peter: add BR2_USE_MMU dependency] Signed-off-by: Eric Le Bihan Signed-off-by: Peter Korsgaard --- linux/linux.mk | 2 ++ package/Config.in | 1 + package/eudev/Config.in | 38 ++++++++++++++++++++++++++++++++ package/eudev/S10udev | 48 +++++++++++++++++++++++++++++++++++++++++ package/eudev/eudev.mk | 43 ++++++++++++++++++++++++++++++++++++ system/Config.in | 12 +++++++++++ 6 files changed, 144 insertions(+) create mode 100644 package/eudev/Config.in create mode 100755 package/eudev/S10udev create mode 100644 package/eudev/eudev.mk diff --git a/linux/linux.mk b/linux/linux.mk index 603846740e..34ea9243e3 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -188,6 +188,8 @@ define LINUX_CONFIGURE_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)) $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV), $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) + $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV), + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) $(if $(BR2_PACKAGE_KTAP), $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config) diff --git a/package/Config.in b/package/Config.in index c3237111d1..b8b2f4e0a7 100644 --- a/package/Config.in +++ b/package/Config.in @@ -278,6 +278,7 @@ source "package/dmraid/Config.in" source "package/dvb-apps/Config.in" source "package/dvbsnoop/Config.in" source "package/eeprog/Config.in" +source "package/eudev/Config.in" source "package/evemu/Config.in" source "package/evtest/Config.in" source "package/fan-ctrl/Config.in" diff --git a/package/eudev/Config.in b/package/eudev/Config.in new file mode 100644 index 0000000000..9d2eb1b285 --- /dev/null +++ b/package/eudev/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_EUDEV + bool "eudev" + depends on !BR2_avr32 # no epoll_create1 + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + depends on BR2_USE_MMU # uses fork() + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_PREFER_STATIC_LIB # kmod + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_KMOD + help + Userspace device daemon. This is a standalone version, + independent of systemd. It is a fork maintained by Gentoo. + + eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs + and inotify. + + http://github.com/gentoo/eudev/ + +if BR2_PACKAGE_EUDEV + +config BR2_PACKAGE_EUDEV_RULES_GEN + bool "enable rules generator" + help + Enable persistent rules generator + +endif + +comment "eudev needs eudev /dev management" + depends on !BR2_avr32 + depends on BR2_USE_MMU + depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + +comment "eudev needs a toolchain w/ largefile, wchar, dynamic library" + depends on !BR2_avr32 + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB diff --git a/package/eudev/S10udev b/package/eudev/S10udev new file mode 100755 index 0000000000..e4d28a2323 --- /dev/null +++ b/package/eudev/S10udev @@ -0,0 +1,48 @@ +#!/bin/sh +# +# udev This is a minimal non-LSB version of a UDEV startup script. It +# was derived by stripping down the udev-058 LSB version for use +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. +# +# You may need to customize this for your system's resource limits +# (including startup time!) and administration. For example, if +# your early userspace has a custom initramfs or initrd you might +# need /dev much earlier; or without hotpluggable busses (like USB, +# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. +# +# This script assumes your system boots right into the eventual root +# filesystem, and that init runs this udev script before any programs +# needing more device nodes than the bare-bones set -- /dev/console, +# /dev/zero, /dev/null -- that's needed to boot and run this script. +# + +# Check for missing binaries +UDEV_BIN=/sbin/udevd +test -x $UDEV_BIN || exit 5 + +# Check for config file and read it +UDEV_CONFIG=/etc/udev/udev.conf +test -r $UDEV_CONFIG || exit 6 +. $UDEV_CONFIG + +case "$1" in + start) + echo -n "Populating ${udev_root:-/dev} using udev: " + echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug + $UDEV_BIN -d || (echo "FAIL" && exit 1) + udevadm trigger + echo "done" + ;; + stop) + # Stop execution of events + udevadm control --stop-exec-queue + killall udevd + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + + +exit 0 diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk new file mode 100644 index 0000000000..ffa413f3ad --- /dev/null +++ b/package/eudev/eudev.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# eudev +# +################################################################################ + +EUDEV_VERSION = 1.3 +EUDEV_SITE = $(call github,gentoo,eudev,v$(EUDEV_VERSION)) +EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) +EUDEV_LICENSE_FILES = COPYING +EUDEV_INSTALL_STAGING = YES +EUDEV_AUTORECONF = YES + +# mq_getattr is in librt +EUDEV_CONF_ENV += LIBS=-lrt + +EUDEV_CONF_OPT = \ + --sbindir=/sbin \ + --with-rootlibdir=/lib \ + --libexecdir=/lib \ + --with-firmware-path=/lib/firmware \ + --disable-introspection \ + --enable-split-usr \ + --enable-libkmod + +EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod + +ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y) +EUDEV_CONF_OPT += --enable-rule_generator +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +EUDEV_CONF_OPT += --enable-gudev +EUDEV_DEPENDENCIES += libglib2 +else +EUDEV_CONF_OPT += --disable-gudev +endif + +define EUDEV_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev +endef + +$(eval $(autotools-package)) diff --git a/system/Config.in b/system/Config.in index 181a0ac12a..d1b0cbb0db 100644 --- a/system/Config.in +++ b/system/Config.in @@ -137,6 +137,18 @@ comment "udev doesn't work with 'prefer static libraries'" depends on !BR2_avr32 # udev depends on BR2_PREFER_STATIC_LIB +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + bool "Dynamic using eudev" + depends on !BR2_avr32 # eudev + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + depends on !BR2_PREFER_STATIC_LIB + select BR2_PACKAGE_EUDEV + +comment "eudev needs a toolchain w/ largefile, wchar, dynamic library" + depends on !BR2_avr32 # eudev + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB + endchoice config BR2_ROOTFS_DEVICE_TABLE From fabcb119b978c123ce8903b637beb63dd605dccd Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Fri, 7 Feb 2014 14:21:33 +0100 Subject: [PATCH 020/107] udev: convert to virtual package This patch converts udev to a virtual package. For the moment, there is only one provider for the udev features: eudev. Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV. Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol. [Peter: move legacy symbols under 2014.05] Signed-off-by: Eric Le Bihan Signed-off-by: Peter Korsgaard --- Config.in.legacy | 58 +++++++++++++++++++ docs/manual/adding-packages-directory.txt | 3 +- linux/linux.mk | 2 - package/ccid/ccid.mk | 2 +- package/eudev/Config.in | 1 + package/gpsd/gpsd.mk | 2 +- package/libatasmart/Config.in | 4 +- package/libcec/libcec.mk | 2 +- package/libdrm/libdrm.mk | 2 +- package/libmbim/Config.in | 5 +- package/libusb/libusb.mk | 2 +- package/modem-manager/Config.in | 6 +- package/network-manager/Config.in | 8 +-- package/ofono/ofono.mk | 2 +- package/pcsc-lite/Config.in | 2 +- package/pcsc-lite/pcsc-lite.mk | 2 +- package/pulseaudio/pulseaudio.mk | 2 +- package/systemd/Config.in | 6 +- package/udev/Config.in | 51 ++-------------- package/udev/udev.mk | 49 +++------------- package/udisks/Config.in | 14 +++-- package/usbmount/Config.in | 4 +- package/vlc/vlc.mk | 2 +- package/weston/Config.in | 4 +- .../x11r7/xdriver_xf86-input-evdev/Config.in | 4 +- .../xserver_xorg-server.mk | 2 +- package/xenomai/xenomai.mk | 2 +- system/Config.in | 22 +------ 28 files changed, 115 insertions(+), 150 deletions(-) diff --git a/Config.in.legacy b/Config.in.legacy index 4424e31b5d..69d6abc31d 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -98,6 +98,64 @@ comment "build, or run, in unpredictable ways. " comment "----------------------------------------------------" endif +############################################################################### +comment "Legacy options removed in 2014.05" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + bool "/dev management by udev removed" + select BR2_LEGACY + help + The 'udev' package has been converted to a virtual package. + There is currently one provider for this feature: 'eudev'. + + Therefore, you must choose 'Dynamic using eudev' in the + '/dev management' menu to get the same behaviour as in your + old configuration. + + You must also check the packages depending on 'udev' are still + selected. + +config BR2_PACKAGE_UDEV + bool "udev is now a virtual package" + select BR2_LEGACY + select BR2_PACKAGE_HAS_UDEV + help + The 'udev' package has been converted to a virtual package. + There is currently one provider for this feature: 'eudev'. + + Your old configuration refers to packages depending on 'udev', + either for build or at runtime. + + Check that a 'udev' provider is selected, i.e. that 'eudev' is + selected, which is the case if '/dev management' is set to + 'Dynamic using eudev'. + +config BR2_PACKAGE_UDEV_RULES_GEN + bool "udev rules generation handled by eudev" + select BR2_LEGACY + select BR2_PACKAGE_EUDEV + select BR2_PACKAGE_EUDEV_RULES_GEN + help + The 'udev' package has been converted to a virtual package. + There is currently one provider for this feature: 'eudev'. + + udev rules generation will now be handled by 'eudev'. + + Check that '/dev management' is set to 'Dynamic using eudev' + to get the same behaviour as in your old configuration. + +config BR2_PACKAGE_UDEV_ALL_EXTRAS + bool "udev extras removed" + select BR2_LEGACY + help + The 'udev' package has been converted to a virtual package. + There is currently one provider for this feature: 'eudev'. + + The option to enable the extra features of 'udev' (gudev, ...) + has been removed. These features are automatically enabled in + the 'udev' providers if the dependencies are selected. For + example, selecting 'libglib2' will trigger the build of gudev. + ############################################################################### comment "Legacy options removed in 2014.02" diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt index 754a14505f..40af8091fa 100644 --- a/docs/manual/adding-packages-directory.txt +++ b/docs/manual/adding-packages-directory.txt @@ -273,8 +273,7 @@ foo needs a toolchain w/ featA, featB, featC and a Linux kernel to be built Dependencies on udev /dev management ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If a package needs udev /dev management, it should depend on symbol -+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV+, and the following comment -should be added: ++BR2_PACKAGE_HAS_UDEV+, and the following comment should be added: -------------------------- foo needs udev /dev management diff --git a/linux/linux.mk b/linux/linux.mk index 34ea9243e3..cc7efe849c 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -186,8 +186,6 @@ define LINUX_CONFIGURE_CMDS $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),, $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)) - $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV), - $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV), $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) $(if $(BR2_PACKAGE_KTAP), diff --git a/package/ccid/ccid.mk b/package/ccid/ccid.mk index f39edcefaa..b635aa1cbf 100644 --- a/package/ccid/ccid.mk +++ b/package/ccid/ccid.mk @@ -12,7 +12,7 @@ CCID_LICENSE_FILES = COPYING CCID_INSTALL_STAGING = YES CCID_DEPENDENCIES = pcsc-lite host-pkgconf libusb -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) define CCID_INSTALL_UDEV_RULES if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ cp $(@D)/src/92_pcscd_ccid.rules $(TARGET_DIR)/etc/udev/rules.d/ ; \ diff --git a/package/eudev/Config.in b/package/eudev/Config.in index 9d2eb1b285..bfad99a271 100644 --- a/package/eudev/Config.in +++ b/package/eudev/Config.in @@ -6,6 +6,7 @@ config BR2_PACKAGE_EUDEV depends on BR2_LARGEFILE # util-linux depends on BR2_USE_WCHAR # util-linux depends on !BR2_PREFER_STATIC_LIB # kmod + select BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_UTIL_LINUX select BR2_PACKAGE_UTIL_LINUX_LIBBLKID select BR2_PACKAGE_KMOD diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index efc8d37b2f..0f655ba284 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -222,7 +222,7 @@ define GPSD_INSTALL_STAGING_CMDS install) endef -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) define GPSD_INSTALL_UDEV_RULES (cd $(@D); \ $(GPSD_SCONS_ENV) \ diff --git a/package/libatasmart/Config.in b/package/libatasmart/Config.in index a3e44f8b2f..534e7c17b2 100644 --- a/package/libatasmart/Config.in +++ b/package/libatasmart/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_LIBATASMART bool "libatasmart" - depends on BR2_PACKAGE_UDEV # libudev is configure dependency + depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency help The libatasmart package is a disk reporting library. It only supports a subset of the ATA S.M.A.R.T. functionality. @@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBATASMART http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html comment "libatasmart requires udev to be enabled" - depends on !BR2_PACKAGE_UDEV + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk index 910f319bec..99cc767cf5 100644 --- a/package/libcec/libcec.mk +++ b/package/libcec/libcec.mk @@ -18,7 +18,7 @@ ifeq ($(BR2_PACKAGE_LOCKDEV),y) LIBCEC_DEPENDENCIES += lockdev endif -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) LIBCEC_DEPENDENCIES += udev endif diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk index f5efaf1b1d..a1b0580d9d 100644 --- a/package/libdrm/libdrm.mk +++ b/package/libdrm/libdrm.mk @@ -65,7 +65,7 @@ else LIBDRM_CONF_OPT += --disable-freedreno-experimental-api endif -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) LIBDRM_CONF_OPT += --enable-udev LIBDRM_DEPENDENCIES += udev else diff --git a/package/libmbim/Config.in b/package/libmbim/Config.in index d034e8480c..bd34dd4ba1 100644 --- a/package/libmbim/Config.in +++ b/package/libmbim/Config.in @@ -2,9 +2,8 @@ config BR2_PACKAGE_LIBMBIM bool "libmbim" depends on BR2_USE_WCHAR # libglib2 depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_UDEV_ALL_EXTRAS help libmbim is a glib-based library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) @@ -14,4 +13,4 @@ config BR2_PACKAGE_LIBMBIM comment "libmbim needs udev /dev management and a toolchain w/ wchar, threads" depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ - !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + !BR2_PACKAGE_HAS_UDEV diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk index a8ff74c2f9..417b2cebe9 100644 --- a/package/libusb/libusb.mk +++ b/package/libusb/libusb.mk @@ -21,7 +21,7 @@ ifeq ($(BR2_avr32),y) LIBUSB_CONF_OPT += --disable-timerfd endif -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) LIBUSB_DEPENDENCIES += udev else LIBUSB_CONF_OPT += --disable-udev diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in index e157ca838b..fe60850f65 100644 --- a/package/modem-manager/Config.in +++ b/package/modem-manager/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_MODEM_MANAGER bool "modemmanager" - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DBUS depends on BR2_INET_IPV6 depends on BR2_LARGEFILE # acl @@ -8,8 +8,6 @@ config BR2_PACKAGE_MODEM_MANAGER depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 depends on BR2_USE_MMU # dbus select BR2_PACKAGE_DBUS_GLIB - select BR2_PACKAGE_UDEV - select BR2_PACKAGE_UDEV_ALL_EXTRAS help ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections. @@ -33,4 +31,4 @@ endif comment "modemmanager needs udev /dev management and a toolchain w/ largefile, wchar, threads, IPv6" depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \ - !BR2_TOOLCHAIN_HAS_THREADS || !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in index a194433933..a4eeeaf462 100644 --- a/package/network-manager/Config.in +++ b/package/network-manager/Config.in @@ -1,16 +1,14 @@ config BR2_PACKAGE_NETWORK_MANAGER bool "NetworkManager" depends on !BR2_avr32 # udev - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV - select BR2_PACKAGE_DBUS depends on BR2_INET_IPV6 depends on BR2_LARGEFILE # acl depends on BR2_USE_WCHAR # libglib2 and gnutls depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 depends on BR2_USE_MMU # dbus + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_DBUS select BR2_PACKAGE_DBUS_GLIB - select BR2_PACKAGE_UDEV - select BR2_PACKAGE_UDEV_ALL_EXTRAS select BR2_PACKAGE_GNUTLS select BR2_PACKAGE_LIBGCRYPT select BR2_PACKAGE_LIBNL @@ -33,4 +31,4 @@ comment "NetworkManager needs udev /dev management and a toolchain w/ IPv6, larg depends on BR2_USE_MMU depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS || \ - !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + !BR2_PACKAGE_HAS_UDEV diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk index aaaa8fa22c..9e30c63635 100644 --- a/package/ofono/ofono.mk +++ b/package/ofono/ofono.mk @@ -22,7 +22,7 @@ OFONO_CONF_OPT = --disable-test # make sure that it is defined. OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) OFONO_CONF_OPT += --enable-udev OFONO_DEPENDENCIES += udev else diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in index 4cd89e93bc..aab42e8ce9 100644 --- a/package/pcsc-lite/Config.in +++ b/package/pcsc-lite/Config.in @@ -11,7 +11,7 @@ if BR2_PACKAGE_PCSC_LITE config BR2_PACKAGE_PCSC_LITE_FORCE_LIBUSB bool "use libusb" - depends on !BR2_PACKAGE_UDEV + depends on !BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_LIBUSB help Select Y if you want to support usb smart card readers. diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk index afbe822561..18859cdb12 100644 --- a/package/pcsc-lite/pcsc-lite.mk +++ b/package/pcsc-lite/pcsc-lite.mk @@ -16,7 +16,7 @@ PCSC_LITE_LICENSE_FILES = COPYING # - libudev and libusb can't be used together # - libudev has a priority over libusb -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) PCSC_LITE_CONF_OPT += --enable-libudev --disable-libusb PCSC_LITE_DEPENDENCIES += udev else diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk index 54340c49a3..6a9e369ba3 100644 --- a/package/pulseaudio/pulseaudio.mk +++ b/package/pulseaudio/pulseaudio.mk @@ -26,7 +26,7 @@ PULSEAUDIO_DEPENDENCIES = \ $(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \ $(if $(BR2_PACKAGE_DBUS),dbus) \ $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \ - $(if $(BR2_PACKAGE_UDEV),udev) \ + $(if $(BR2_PACKAGE_HAS_UDEV),udev) \ $(if $(BR2_PACKAGE_OPENSSL),openssl) \ $(if $(BR2_PACKAGE_FFTW),fftw) \ $(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \ diff --git a/package/systemd/Config.in b/package/systemd/Config.in index fe81900aa9..500e62345a 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_SYSTEMD bool "systemd" - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_INET_IPV6 depends on BR2_TOOLCHAIN_HAS_THREADS # dbus depends on BR2_USE_MMU # dbus @@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD http://freedesktop.org/wiki/Software/systemd -comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads" +comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads" depends on BR2_USE_MMU - depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \ + depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\ !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/udev/Config.in b/package/udev/Config.in index 7aa79c4452..5cd4051621 100644 --- a/package/udev/Config.in +++ b/package/udev/Config.in @@ -1,47 +1,6 @@ -config BR2_PACKAGE_UDEV - bool "udev" - depends on !BR2_avr32 # no epoll_create1 - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV - depends on BR2_LARGEFILE # util-linux - depends on BR2_USE_WCHAR # util-linux - depends on !BR2_PREFER_STATIC_LIB # kmod - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - select BR2_PACKAGE_KMOD +config BR2_PACKAGE_HAS_UDEV + bool help - Userspace device daemon. - - udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs - and inotify. - - ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ - -if BR2_PACKAGE_UDEV - -config BR2_PACKAGE_UDEV_RULES_GEN - bool "enable rules generator" - help - Enable persistant rules generator - -config BR2_PACKAGE_UDEV_ALL_EXTRAS - bool "enable all extras" - select BR2_PACKAGE_ACL - select BR2_PACKAGE_HWDATA - select BR2_PACKAGE_LIBGLIB2 - depends on BR2_USE_WCHAR # libglib2 - depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 - depends on BR2_USE_MMU # libglib2 - help - Enable all extras with external dependencies like - libacl, hwdata and libglib2 - -comment "enabling all extras needs a toolchain w/ wchar, threads" - depends on BR2_USE_MMU - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS - -endif - -comment "udev needs udev /dev management and a toolchain w/ largefile, wchar, dynamic library" - depends on !BR2_avr32 - depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \ - !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB + udev is now a virtual package. + Packages requiring udevd at run time or libudev/gudev at build time + should select it. diff --git a/package/udev/udev.mk b/package/udev/udev.mk index db86850ba2..d274246b20 100644 --- a/package/udev/udev.mk +++ b/package/udev/udev.mk @@ -4,48 +4,17 @@ # ################################################################################ -UDEV_VERSION = 182 -UDEV_SOURCE = udev-$(UDEV_VERSION).tar.xz -UDEV_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/ -UDEV_LICENSE = GPLv2+ -UDEV_LICENSE_FILES = COPYING -UDEV_INSTALL_STAGING = YES +UDEV_SOURCE = -# mq_getattr is in librt -UDEV_CONF_ENV += LIBS=-lrt - -UDEV_CONF_OPT = \ - --sbindir=/sbin \ - --with-rootlibdir=/lib \ - --libexecdir=/lib \ - --with-usb-ids-path=/usr/share/hwdata/usb.ids \ - --with-pci-ids-path=/usr/share/hwdata/pci.ids \ - --with-firmware-path=/lib/firmware \ - --disable-introspection - -UDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod - -ifeq ($(BR2_PACKAGE_UDEV_RULES_GEN),y) -UDEV_CONF_OPT += --enable-rule_generator +ifeq ($(BR2_PACKAGE_EUDEV),y) +UDEV_DEPENDENCIES += eudev endif -ifeq ($(BR2_PACKAGE_UDEV_ALL_EXTRAS),y) -UDEV_DEPENDENCIES += acl hwdata libglib2 -UDEV_CONF_OPT += \ - --enable-udev_acl -else -UDEV_CONF_OPT += \ - --disable-gudev -endif - -ifeq ($(BR2_PACKAGE_SYSTEMD),y) - UDEV_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system/ -endif - -define UDEV_INSTALL_INITSCRIPT - $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d/S10udev +ifeq ($(UDEV_DEPENDENCIES),) +define UDEV_CONFIGURE_CMDS + echo "No Udev implementation selected. Configuration error." + exit 1 endef +endif -UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT - -$(eval $(autotools-package)) +$(eval $(generic-package)) diff --git a/package/udisks/Config.in b/package/udisks/Config.in index e9539a30f4..d560b6cf76 100644 --- a/package/udisks/Config.in +++ b/package/udisks/Config.in @@ -1,11 +1,9 @@ config BR2_PACKAGE_UDISKS bool "udisks" depends on !BR2_avr32 # udev - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_PACKAGE_HAS_UDEV depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2 depends on BR2_USE_MMU # lvm2 - select BR2_PACKAGE_UDEV - select BR2_PACKAGE_UDEV_ALL_EXTRAS select BR2_PACKAGE_DBUS select BR2_PACKAGE_DBUS_GLIB depends on BR2_USE_WCHAR # dbus-glib -> glib2 @@ -36,8 +34,12 @@ config BR2_PACKAGE_UDISKS_LVM2 endif -comment "udisks needs udev /dev management and a toolchain w/ wchar, threads" +comment "udisks needs udev /dev management" depends on !BR2_avr32 depends on BR2_USE_MMU - depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \ - !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PACKAGE_HAS_UDEV + +comment "udisks needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in index 2583e7cc7c..0bb8883b96 100644 --- a/package/usbmount/Config.in +++ b/package/usbmount/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_USBMOUNT bool "usbmount" - depends on BR2_PACKAGE_UDEV + depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_LOCKFILE_PROGS help The usbmount package automatically mounts USB mass storage devices @@ -9,4 +9,4 @@ config BR2_PACKAGE_USBMOUNT http://usbmount.alioth.debian.org/ comment "usbmount requires udev to be enabled" - depends on !BR2_PACKAGE_UDEV + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk index f235ff8117..ad7d9ffd64 100644 --- a/package/vlc/vlc.mk +++ b/package/vlc/vlc.mk @@ -266,7 +266,7 @@ else VLC_CONF_OPT += --disable-tremor endif -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) VLC_CONF_OPT += --enable-udev VLC_DEPENDENCIES += udev else diff --git a/package/weston/Config.in b/package/weston/Config.in index 247efc8883..36bbb0159c 100644 --- a/package/weston/Config.in +++ b/package/weston/Config.in @@ -1,6 +1,6 @@ comment "weston needs udev and a toolchain w/ threads" depends on !BR2_avr32 - depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_WESTON bool "weston" @@ -11,7 +11,7 @@ config BR2_PACKAGE_WESTON select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_JPEG select BR2_PACKAGE_MTDEV - depends on BR2_PACKAGE_UDEV + depends on BR2_PACKAGE_HAS_UDEV depends on !BR2_avr32 # wayland depends on BR2_TOOLCHAIN_HAS_THREADS # wayland # Runtime dependency diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in index 88d3e6e82d..6ec14bfe8d 100644 --- a/package/x11r7/xdriver_xf86-input-evdev/Config.in +++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV bool "xf86-input-evdev" - depends on BR2_PACKAGE_UDEV # libudev is configure dependency + depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO @@ -8,4 +8,4 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV Generic Linux input driver comment "xf86-input-evdev requires udev to be enabled" - depends on !BR2_PACKAGE_UDEV + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk index 4089aab83c..a7ac9a0b74 100644 --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -123,7 +123,7 @@ XSERVER_XORG_SERVER_DEPENDENCIES += tslib XSERVER_XORG_SERVER_CONF_OPT += --enable-tslib LDFLAGS="-lts" endif -ifeq ($(BR2_PACKAGE_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) XSERVER_XORG_SERVER_DEPENDENCIES += udev XSERVER_XORG_SERVER_CONF_OPT += --enable-config-udev else diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk index 2dd1bf601e..4e9025db0e 100644 --- a/package/xenomai/xenomai.mk +++ b/package/xenomai/xenomai.mk @@ -93,7 +93,7 @@ define XENOMAI_DEVICES /dev/rtp c 666 0 0 150 0 0 1 32 endef -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) XENOMAI_DEPENDENCIES += udev define XENOMAI_INSTALL_UDEV_RULES diff --git a/system/Config.in b/system/Config.in index d1b0cbb0db..34726b079e 100644 --- a/system/Config.in +++ b/system/Config.in @@ -90,17 +90,17 @@ config BR2_INIT_SYSTEMD depends on BR2_LARGEFILE depends on BR2_USE_WCHAR depends on BR2_INET_IPV6 - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU select BR2_PACKAGE_DBUS select BR2_PACKAGE_SYSTEMD -comment 'systemd needs udev /dev management and a toolchain w/ largefile, wchar, IPv6, threads' +comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads' depends on BR2_USE_MMU depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \ BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \ - BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV) + BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV) config BR2_INIT_NONE bool "None" @@ -121,22 +121,6 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV bool "Dynamic using mdev" select BR2_PACKAGE_BUSYBOX -config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV - bool "Dynamic using udev" - depends on !BR2_avr32 # udev - depends on BR2_LARGEFILE # udev - depends on BR2_USE_WCHAR # udev - depends on !BR2_PREFER_STATIC_LIB # udev -> kmod - select BR2_PACKAGE_UDEV - -comment "udev needs a toolchain w/ largefile, wchar" - depends on !BR2_avr32 # udev - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) - -comment "udev doesn't work with 'prefer static libraries'" - depends on !BR2_avr32 # udev - depends on BR2_PREFER_STATIC_LIB - config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV bool "Dynamic using eudev" depends on !BR2_avr32 # eudev From 2c66e4429d23c6e293f9789cdef01b760399fccb Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Fri, 7 Feb 2014 14:21:34 +0100 Subject: [PATCH 021/107] systemd: bump to v207 This patch bumps systemd to v207 but also declares it as a provider for the udev virtual package. Starting with systemd 183, udev has been merged into systemd. The udev daemon is now installed as /lib/systemd/systemd-udevd. This means that /dev management using udev is only available if systemd is chosen as init system. When configuring systemd, the following options are available: - activation of systemd-journal-gatewayd, to access the journal via HTTP. - activation of extra features like journal compression and sealing. Support for uClibc has also been removed because: - upstream has no interest in supporting uClibc. - using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter. Signed-off-by: Eric Le Bihan Reviewed-by: Thomas De Schampheleire Signed-off-by: Peter Korsgaard --- Config.in.legacy | 41 ++++---- linux/linux.mk | 3 +- package/systemd/Config.in | 47 +++++++++- package/systemd/systemd-fix-getty-unit.patch | 36 ++++--- package/systemd/systemd-fix-page-size.patch | 43 --------- package/systemd/systemd-uclibc-fix.patch | 59 ------------ package/systemd/systemd.mk | 98 ++++++++++++++------ package/udev/udev.mk | 4 + system/Config.in | 18 ++-- 9 files changed, 170 insertions(+), 179 deletions(-) delete mode 100644 package/systemd/systemd-fix-page-size.patch delete mode 100644 package/systemd/systemd-uclibc-fix.patch diff --git a/Config.in.legacy b/Config.in.legacy index 69d6abc31d..09c3a2ba59 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -106,11 +106,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV select BR2_LEGACY help The 'udev' package has been converted to a virtual package. - There is currently one provider for this feature: 'eudev'. + The providers for this feature are: 'eudev', 'systemd'. - Therefore, you must choose 'Dynamic using eudev' in the - '/dev management' menu to get the same behaviour as in your - old configuration. + Therefore, if you are not using 'systemd' as init system, you + must choose 'Dynamic using eudev' in the '/dev management' + menu to get the same behaviour as in your old configuration. + + If you are using 'systemd', its internal implementation of + 'udev' will be used automatically. You must also check the packages depending on 'udev' are still selected. @@ -121,35 +124,41 @@ config BR2_PACKAGE_UDEV select BR2_PACKAGE_HAS_UDEV help The 'udev' package has been converted to a virtual package. - There is currently one provider for this feature: 'eudev'. + The providers for this feature are: 'eudev', 'systemd'. Your old configuration refers to packages depending on 'udev', either for build or at runtime. - Check that a 'udev' provider is selected, i.e. that 'eudev' is - selected, which is the case if '/dev management' is set to - 'Dynamic using eudev'. + Check that a 'udev' provider is selected. If you are not using + 'systemd' as init system, 'eudev' should be selected, which is + the case if '/dev management' is set to 'Dynamic using eudev'. + + If you are using 'systemd', its internal implementation of 'udev' + is used. config BR2_PACKAGE_UDEV_RULES_GEN - bool "udev rules generation handled by eudev" + bool "udev rules generation handled by provider" select BR2_LEGACY - select BR2_PACKAGE_EUDEV - select BR2_PACKAGE_EUDEV_RULES_GEN + select BR2_PACKAGE_EUDEV if !BR2_INIT_SYSTEMD + select BR2_PACKAGE_EUDEV_RULES_GEN if !BR2_INIT_SYSTEMD help The 'udev' package has been converted to a virtual package. - There is currently one provider for this feature: 'eudev'. + The providers for this feature are: 'eudev', 'systemd'. - udev rules generation will now be handled by 'eudev'. + If you are not using 'systemd' as init system, udev rules + generation will be handled by 'eudev'. Check that + '/dev management' is set to 'Dynamic using eudev' to get + the same behaviour as in your old configuration. - Check that '/dev management' is set to 'Dynamic using eudev' - to get the same behaviour as in your old configuration. + If you are using 'systemd', it internal implementation of 'udev' + will generate the rules. config BR2_PACKAGE_UDEV_ALL_EXTRAS bool "udev extras removed" select BR2_LEGACY help The 'udev' package has been converted to a virtual package. - There is currently one provider for this feature: 'eudev'. + The providers for this feature are: 'eudev', 'systemd'. The option to enable the extra features of 'udev' (gudev, ...) has been removed. These features are automatically enabled in diff --git a/linux/linux.mk b/linux/linux.mk index cc7efe849c..d7f51b3ec8 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -194,7 +194,8 @@ define LINUX_CONFIGURE_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config)) $(if $(BR2_PACKAGE_SYSTEMD), - $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)) + $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 500e62345a..e3ea433728 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -1,11 +1,21 @@ config BR2_PACKAGE_SYSTEMD bool "systemd" - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + depends on BR2_INIT_SYSTEMD + depends on !BR2_avr32 # no epoll_create1 + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux depends on BR2_INET_IPV6 + depends on !BR2_PREFER_STATIC_LIB # kmod depends on BR2_TOOLCHAIN_HAS_THREADS # dbus depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DBUS select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools + select BR2_PACKAGE_KMOD_TOOLS help systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization @@ -16,9 +26,36 @@ config BR2_PACKAGE_SYSTEMD elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit. + Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs, + tmpfs vfs and tmpfs POSIX ACL enabled. + + Systemd also provides udev, the userspace device daemon. + + The selection of other packages will enable some features: + + - libglib2 package will add support for gudev. + - acl package will add support for multi-seat. + http://freedesktop.org/wiki/Software/systemd -comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads" - depends on BR2_USE_MMU - depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\ - !BR2_TOOLCHAIN_HAS_THREADS +if BR2_PACKAGE_SYSTEMD + +config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS + bool "enable all extras" + select BR2_PACKAGE_XZ + select BR2_PACKAGE_LIBGCRYPT + help + Enable extra features for Systemd: journal compression and + signing. + +config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY + bool "HTTP server for journal events" + select BR2_PACKAGE_LIBMICROHTTPD + help + systemd-journal-gatewayd serves journal events over the + network. Clients must connect using HTTP. The server + listens on port 19531 by default. + + http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html + +endif diff --git a/package/systemd/systemd-fix-getty-unit.patch b/package/systemd/systemd-fix-getty-unit.patch index 6df54b1325..166a2e545c 100644 --- a/package/systemd/systemd-fix-getty-unit.patch +++ b/package/systemd/systemd-fix-getty-unit.patch @@ -1,34 +1,32 @@ Prefer getty to agetty in console setup systemd units Signed-off-by: Maxime Ripard +Signed-off-by: Eric Le Bihan --- - units/getty@.service.m4 | 2 +- - units/serial-getty@.service.m4 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) -Index: systemd-37/units/getty@.service.m4 +Index: systemd-206/units/getty@.service.m4 =================================================================== ---- systemd-37.orig/units/getty@.service.m4 -+++ systemd-37/units/getty@.service.m4 -@@ -32,7 +32,7 @@ - +--- systemd-206.orig/units/getty@.service.m4 2013-07-22 00:43:28.000000000 +0200 ++++ systemd-206/units/getty@.service.m4 2013-09-18 10:20:17.000000000 +0200 +@@ -27,7 +27,7 @@ + [Service] - Environment=TERM=linux --ExecStart=-/sbin/agetty %I 38400 + # the VT is cleared by TTYVTDisallocate +-ExecStart=-/sbin/agetty --noclear %I +ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle Restart=always RestartSec=0 - UtmpIdentifier=%I -Index: systemd-37/units/serial-getty@.service.m4 +Index: systemd-206/units/serial-getty@.service.m4 =================================================================== ---- systemd-37.orig/units/serial-getty@.service.m4 -+++ systemd-37/units/serial-getty@.service.m4 -@@ -32,7 +32,7 @@ - +--- systemd-206.orig/units/serial-getty@.service.m4 2013-07-22 00:43:28.000000000 +0200 ++++ systemd-206/units/serial-getty@.service.m4 2013-09-18 10:21:31.000000000 +0200 +@@ -22,7 +22,7 @@ + IgnoreOnIsolate=yes + [Service] - Environment=TERM=vt100 --ExecStart=-/sbin/agetty -s %I 115200,38400,9600 +-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600 +ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle Restart=always RestartSec=0 - UtmpIdentifier=%I diff --git a/package/systemd/systemd-fix-page-size.patch b/package/systemd/systemd-fix-page-size.patch deleted file mode 100644 index 241ceb8c0b..0000000000 --- a/package/systemd/systemd-fix-page-size.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 -Author: Lennart Poettering -Date: Wed Mar 21 23:47:44 2012 +0100 - - journal: PAGE_SIZE is not known on ppc and other archs - - Let's use NAME_MAX, as suggested by Dan Walsh - -diff --git a/src/journal/journald.c b/src/journal/journald.c -index d27cb60..87390bd 100644 ---- a/src/journal/journald.c -+++ b/src/journal/journald.c -@@ -29,7 +29,6 @@ - #include - #include - #include --#include - - #include - #include -@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) { - size_t label_len = 0; - union { - struct cmsghdr cmsghdr; -+ -+ /* We use NAME_MAX space for the -+ * SELinux label here. The kernel -+ * currently enforces no limit, but -+ * according to suggestions from the -+ * SELinux people this will change and -+ * it will probably be identical to -+ * NAME_MAX. For now we use that, but -+ * this should be updated one day when -+ * the final limit is known.*/ - uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) + - CMSG_SPACE(sizeof(struct timeval)) + -- CMSG_SPACE(sizeof(int)) + -- CMSG_SPACE(PAGE_SIZE)]; /* selinux label */ -+ CMSG_SPACE(sizeof(int)) + /* fd */ -+ CMSG_SPACE(NAME_MAX)]; /* selinux label */ - } control; - ssize_t n; - int v; diff --git a/package/systemd/systemd-uclibc-fix.patch b/package/systemd/systemd-uclibc-fix.patch deleted file mode 100644 index 9a208450ad..0000000000 --- a/package/systemd/systemd-uclibc-fix.patch +++ /dev/null @@ -1,59 +0,0 @@ -[PATCH] fix build with uClibc - -Based on OE patch from Khem Raj: - -http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch - -But extended to also cover execvpe (OE carries a patch adding execvpe -support to uClibc). - -Signed-off-by: Peter Korsgaard ---- - src/journal/journal-file.c | 2 ++ - src/macro.h | 15 +++++++++++++++ - 2 files changed, 17 insertions(+) - -Index: systemd-44/src/macro.h -=================================================================== ---- systemd-44.orig/src/macro.h -+++ systemd-44/src/macro.h -@@ -28,6 +28,21 @@ - #include - #include - -+#ifdef __UCLIBC__ -+/* uclibc does not implement mkostemp GNU extension */ -+#define mkostemp(x,y) mkstemp(x) -+/* uclibc does not implement execvpe GNU extension */ -+#ifndef _GNU_SOURCE -+#define _GNU_SOURCE -+#endif -+#include -+static inline int execvpe(const char *file, char *const argv[], -+ char *const envp[]) -+{ -+ environ = (char **)envp; -+ return execvp(file, argv); -+} -+#endif - #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b))) - #define _sentinel_ __attribute__ ((sentinel)) - #define _noreturn_ __attribute__((noreturn)) -Index: systemd-44/src/journal/journal-file.c -=================================================================== ---- systemd-44.orig/src/journal/journal-file.c -+++ systemd-44/src/journal/journal-file.c -@@ -229,11 +229,13 @@ - } - } - -+#ifndef __UCLIBC__ - /* Note that the glibc fallocate() fallback is very - inefficient, hence we try to minimize the allocation area - as we can. */ - if (posix_fallocate(f->fd, old_size, new_size - old_size) < 0) - return -errno; -+#endif - - if (fstat(f->fd, &f->last_stat) < 0) - return -errno; diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index a5dc8e5914..90860456da 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -4,75 +4,117 @@ # ################################################################################ -SYSTEMD_VERSION = 44 +SYSTEMD_VERSION = 207 SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/ SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz SYSTEMD_LICENSE = GPLv2+ -SYSTEMD_LICENSE_FILES = LICENSE +SYSTEMD_LICENSE_FILES = LICENSE.GPLV2 LICENSE.LGPL2.1 LICENSE.MIT SYSTEMD_INSTALL_STAGING = YES SYSTEMD_DEPENDENCIES = \ host-intltool \ libcap \ - udev \ - dbus + dbus \ + util-linux \ + kmod # Make sure that systemd will always be built after busybox so that we have # a consistent init setup between two builds ifeq ($(BR2_PACKAGE_BUSYBOX),y) - SYSTEMD_DEPENDENCIES += busybox +SYSTEMD_DEPENDENCIES += busybox endif SYSTEMD_CONF_OPT += \ - --with-distro=other \ + --with-rootprefix= \ + --with-rootlibdir=/lib \ + --localstatedir=/var \ + --enable-static=no \ + --disable-manpages \ --disable-selinux \ --disable-pam \ --disable-libcryptsetup \ - --disable-gtk \ - --disable-plymouth \ - --with-rootdir=/ \ --with-dbuspolicydir=/etc/dbus-1/system.d \ --with-dbussessionservicedir=/usr/share/dbus-1/services \ --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ - --with-udevrulesdir=/etc/udev/rules.d \ - --with-sysvinit-path=/etc/init.d/ \ - --without-sysvrcd-path \ - --enable-split-usr + --with-firmware-path=/lib/firmware \ + --enable-split-usr \ + --enable-introspection=no \ + --disable-efi \ + --disable-myhostname \ + --disable-tcpwrap \ + --disable-tests \ + --without-python ifeq ($(BR2_PACKAGE_ACL),y) - SYSTEMD_CONF_OPT += --enable-acl - SYSTEMD_DEPENDENCIES += acl +SYSTEMD_CONF_OPT += --enable-acl +SYSTEMD_DEPENDENCIES += acl else - SYSTEMD_CONF_OPT += --disable-acl +SYSTEMD_CONF_OPT += --disable-acl endif -ifneq ($(BR2_LARGEFILE),y) - SYSTEMD_CONF_OPT += --disable-largefile +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +SYSTEMD_CONF_OPT += --enable-gudev +SYSTEMD_DEPENDENCIES += libglib2 +else +SYSTEMD_CONF_OPT += --disable-gudev +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y) +SYSTEMD_DEPENDENCIES += \ + xz \ + libgcrypt +SYSTEMD_CONF_OPT += \ + --enable-xz \ + --enable-gcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +SYSTEMD_CONF_OPT += \ + --disable-xz \ + --disable-gcrypt +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y) +SYSTEMD_DEPENDENCIES += libmicrohttpd +else +SYSTEMD_CONF_OPT += --disable-microhttpd endif # mq_getattr needs -lrt SYSTEMD_MAKE_OPT += LIBS=-lrt SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl -ifeq ($(BR2_INIT_SYSTEMD),y) define SYSTEMD_INSTALL_INIT_HOOK - ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init - ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt - ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff - ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot + ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot - ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target + ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target endef -SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ - SYSTEMD_INSTALL_INIT_HOOK -endif define SYSTEMD_INSTALL_TTY_HOOK rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service - ln -fs ../../../../usr/lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service + ln -fs ../../../../lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service +endef + +define SYSTEMD_INSTALL_MACHINEID_HOOK + touch $(TARGET_DIR)/etc/machine-id +endef + +define SYSTEMD_SANITIZE_PATH_IN_UNITS + find $(TARGET_DIR)/lib/systemd/system -name '*.service' \ + -exec $(SED) -e 's,$(HOST_DIR),,g' {} \; endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK \ SYSTEMD_INSTALL_TTY_HOOK \ + SYSTEMD_INSTALL_MACHINEID_HOOK \ + SYSTEMD_SANITIZE_PATH_IN_UNITS + +define SYSTEMD_USERS + systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal + systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway +endef $(eval $(autotools-package)) diff --git a/package/udev/udev.mk b/package/udev/udev.mk index d274246b20..a5d0f800ca 100644 --- a/package/udev/udev.mk +++ b/package/udev/udev.mk @@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_EUDEV),y) UDEV_DEPENDENCIES += eudev endif +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +UDEV_DEPENDENCIES += systemd +endif + ifeq ($(UDEV_DEPENDENCIES),) define UDEV_CONFIGURE_CMDS echo "No Udev implementation selected. Configuration error." diff --git a/system/Config.in b/system/Config.in index 34726b079e..30d8efeaba 100644 --- a/system/Config.in +++ b/system/Config.in @@ -87,20 +87,19 @@ config BR2_INIT_SYSV config BR2_INIT_SYSTEMD bool "systemd" + depends on !BR2_avr32 # no epoll_create1 + depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_LARGEFILE depends on BR2_USE_WCHAR depends on BR2_INET_IPV6 - depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SSP depends on BR2_USE_MMU - select BR2_PACKAGE_DBUS + depends on !BR2_PREFER_STATIC_LIB select BR2_PACKAGE_SYSTEMD -comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads' - depends on BR2_USE_MMU - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \ - BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \ - BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV) +comment 'systemd needs an (e)glibc toolchain' + depends on !BR2_TOOLCHAIN_USES_GLIBC config BR2_INIT_NONE bool "None" @@ -108,7 +107,7 @@ config BR2_INIT_NONE endchoice choice - prompt "/dev management" + prompt "/dev management" if !BR2_INIT_SYSTEMD default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS config BR2_ROOTFS_DEVICE_CREATION_STATIC @@ -135,6 +134,9 @@ comment "eudev needs a toolchain w/ largefile, wchar, dynamic library" endchoice +comment "/dev management using udev (from systemd)" + depends on BR2_INIT_SYSTEMD + config BR2_ROOTFS_DEVICE_TABLE string "Path to the permission tables" default "system/device_table.txt" From 46dde29fbbf1450abb5584fb34b68d3bb24cb9d5 Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Fri, 7 Feb 2014 14:21:35 +0100 Subject: [PATCH 022/107] manual: update /dev management section. This patch updates the /dev management section in the manual with information about eudev, which replaces udev. Signed-off-by: Eric Le Bihan Acked-by: Thomas De Schampheleire Acked-by: Samuel Martin Signed-off-by: Peter Korsgaard --- docs/manual/configure.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/manual/configure.txt b/docs/manual/configure.txt index 89df3d9aa6..9b8135a6a4 100644 --- a/docs/manual/configure.txt +++ b/docs/manual/configure.txt @@ -216,7 +216,7 @@ x86_64 target, you have to generate a cross-compilation toolchain with Buildroot or crosstool-NG. If you want to generate a custom toolchain for your project, that can -be used as an external toolchain in Buildroot, our recommandation is +be used as an external toolchain in Buildroot, our recommendation is definitely to build it with http://crosstool-ng.org[crosstool-NG]. We recommend to build the toolchain separately from Buildroot, and then _import_ it in Buildroot using the external toolchain backend. @@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory : about +mdev+ and the syntax of its configuration file, see http://git.busybox.net/busybox/tree/docs/mdev.txt. - * The fourth solution is *Dynamic using udev*. This method also + * The fourth solution is *Dynamic using eudev*. This method also relies on the _devtmpfs_ virtual filesystem detailed above, but - adds the +udev+ userspace daemon on top of it. +udev+ is a daemon + adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon that runs in the background, and gets called by the kernel when a device gets added or removed from the system. It is a more - heavyweight solution than +mdev+, but provides higher flexibility - and is sometimes mandatory for some system components (systemd for - example). +udev+ is the mechanism used in most desktop Linux - distributions. For more details about +udev+, see - http://en.wikipedia.org/wiki/Udev. + heavyweight solution than +mdev+, but provides higher flexibility. + +eudev+ is a standalone version of +udev+, the original userspace + daemon used in most desktop Linux distributions, which is now part + of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev. -The Buildroot developers recommandation is to start with the *Dynamic +The Buildroot developers recommendation is to start with the *Dynamic using devtmpfs only* solution, until you have the need for userspace to be notified when devices are added/removed, or if firmwares are needed, in which case *Dynamic using mdev* is usually a good solution. +Note that if +systemd+ is chosen as init system, /dev management will +be performed by the +udev+ program provided by +systemd+. + init system ~~~~~~~~~~~ From 06bd17bdff90d15578ce11ae4ebbc3494b1571da Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 13 Feb 2014 16:41:44 +0400 Subject: [PATCH 023/107] gcc: arc: bump to git commit c6227bc This fixes two issues: one segmentation fault in GCC and one invalid code generation. Those fix numerous autobuild failures, including: http://autobuild.buildroot.net/results/715/7158a2a19da6bfa950125a951a39061ccaa73101/ http://autobuild.buildroot.net/results/9d4/9d4fbcb91cf76e01c833d70c401c0828ad37631a/ http://autobuild.buildroot.net/results/ef6/ef6a0e2d382ae202bb8f0e9fc9f5e48c90119faf/ http://autobuild.buildroot.net/results/276/27692619efee482cded56967017f260bd30eefe7/ Signed-off-by: Anton Kolesov Signed-off-by: Peter Korsgaard --- package/gcc/Config.in.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 7bd1eb3f8c..4fd8ec9955 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -96,7 +96,7 @@ config BR2_GCC_VERSION default "4.6.4" if BR2_GCC_VERSION_4_6_X default "4.7.3" if BR2_GCC_VERSION_4_7_X default "4.8.2" if BR2_GCC_VERSION_4_8_X - default "7466697995233cc3aab5b9427bf843e3c7fabd80" if BR2_GCC_VERSION_4_8_ARC + default "c6227bc154124e270f15793deddfa3fe18f7db54" if BR2_GCC_VERSION_4_8_ARC default "b93bb009e021aba64dd4b8cdb0bbc5a176c55543" if BR2_GCC_VERSION_4_9_MICROBLAZE default BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP From 35113c4c12a05324e003bd12b9236fa09c057b82 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 13 Feb 2014 16:41:45 +0400 Subject: [PATCH 024/107] Revert "dmraid: disable on ARC arch" This reverts commit 262a4c0bf7fb64d632ae6d40c22a62380c0af65f. Compiler error has been fixed, and building this package doesn't cause an ICE anymore. Signed-off-by: Anton Kolesov Signed-off-by: Peter Korsgaard --- package/dmraid/Config.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/package/dmraid/Config.in b/package/dmraid/Config.in index bfdd89b337..028b46c3a2 100644 --- a/package/dmraid/Config.in +++ b/package/dmraid/Config.in @@ -2,8 +2,6 @@ config BR2_PACKAGE_DMRAID bool "dmraid" depends on BR2_LARGEFILE depends on BR2_USE_MMU # lvm2 - # triggers gcc ice - depends on !BR2_arc select BR2_PACKAGE_LVM2 help dmraid discovers, activates, deactivates and displays properties @@ -15,4 +13,3 @@ config BR2_PACKAGE_DMRAID comment "dmraid needs a toolchain w/ largefile" depends on BR2_USE_MMU depends on !BR2_LARGEFILE - depends on !BR2_arc From a14988b7312a8c50da42c263dbf5f137ae004853 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 13 Feb 2014 16:41:46 +0400 Subject: [PATCH 025/107] binutils: arc: Bump to git commit a934fe5 Signed-off-by: Anton Kolesov Signed-off-by: Peter Korsgaard --- package/binutils/Config.in.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index 49b857e12f..58738e88ed 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -49,7 +49,7 @@ endchoice config BR2_BINUTILS_VERSION string default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1 - default "0c824ba511fa9b028220eb3c39b566af89ac9dda" if BR2_arc + default "a934fe50786aa0dc0fb5da4754e7e07591c9cd8e" if BR2_arc default "8351467c933d277ebea0c8d99ad2b65b5f7b6bc2" if BR2_microblaze default "2.20.1" if BR2_BINUTILS_VERSION_2_20_1 default "2.21" if BR2_BINUTILS_VERSION_2_21 From 3fd6918b8b73163a354a93e0d46a7799934314d2 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 13 Feb 2014 16:41:47 +0400 Subject: [PATCH 026/107] uclibc: arc: bump to git commit f37101d Signed-off-by: Anton Kolesov Signed-off-by: Peter Korsgaard --- package/uclibc/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in index f5543cca6a..860e4103d2 100644 --- a/package/uclibc/Config.in +++ b/package/uclibc/Config.in @@ -42,7 +42,7 @@ config BR2_UCLIBC_VERSION_STRING default 0.9.31.1 if BR2_UCLIBC_VERSION_0_9_31 default 0.9.32.1 if BR2_UCLIBC_VERSION_0_9_32 default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 - default "9f0f466d3b17181ce88be36ce24a775774fe686c" if BR2_arc + default "f37101d94284c692ee9b23bc72ef38b9473cd316" if BR2_arc default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT From 89673ec0df06b32dda86895f16f18064bc367ce2 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 13 Feb 2014 16:41:48 +0400 Subject: [PATCH 027/107] gdb: arc: bump to git commit cb15acc Signed-off-by: Anton Kolesov Signed-off-by: Peter Korsgaard --- package/gdb/Config.in.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 9c77028926..420408a50f 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -53,5 +53,5 @@ config BR2_GDB_VERSION (!BR2_PACKAGE_HOST_GDB && BR2_avr32) default "7.4.1" if BR2_GDB_VERSION_7_4 default "7.5.1" if BR2_GDB_VERSION_7_5 || !BR2_PACKAGE_HOST_GDB - default "f25a1952afd054205f9471e449c1f7ca5b271b7c" if BR2_arc + default "cb15acc5eecea46d041730e5c2c9fa1d4283ef25" if BR2_arc default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze From 6762e427dbf0e17177211dfcf72034cdc70f663d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 10 Feb 2014 18:43:46 +0100 Subject: [PATCH 028/107] glibc: add 2.19 as a supported version glibc 2.19 has been released recently (https://sourceware.org/ml/libc-alpha/2014-02/msg00224.html). This commit allows to build a toolchain with this new version. In order to allow this, we add a version selection that did not exist for glibc. We default to 2.18, which was the only supported version until now, and add an option for 2.19. For microblaze, which uses a specific glibc version, the version selection choice is not displayed. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/glibc/Config.in | 21 +++++++++++++++++++++ package/glibc/glibc.mk | 2 +- toolchain/toolchain-buildroot/Config.in | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 package/glibc/Config.in diff --git a/package/glibc/Config.in b/package/glibc/Config.in new file mode 100644 index 0000000000..a92b5eae4b --- /dev/null +++ b/package/glibc/Config.in @@ -0,0 +1,21 @@ +if BR2_TOOLCHAIN_BUILDROOT_GLIBC + +choice + prompt "glibc version" + default BR2_GLIBC_VERSION_2_18 + # Architectures supported in mainline glibc + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || \ + BR2_sh || BR2_sh64 || BR2_sparc || \ + BR2_x86_64 + +config BR2_GLIBC_VERSION_2_18 + bool "2.18" + +config BR2_GLIBC_VERSION_2_19 + bool "2.19" + +endchoice + +endif diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 96de02a754..89eaaf6de5 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -21,7 +21,7 @@ GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/ GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2 GLIBC_SRC_SUBDIR = libc else -GLIBC_VERSION = 2.18 +GLIBC_VERSION = $(if $(BR2_GLIBC_VERSION_2_19),2.19,2.18) GLIBC_SITE = $(BR2_GNU_MIRROR)/libc GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz GLIBC_SRC_SUBDIR = . diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in index cd88889c4a..eb5ee4644a 100644 --- a/toolchain/toolchain-buildroot/Config.in +++ b/toolchain/toolchain-buildroot/Config.in @@ -70,7 +70,7 @@ config BR2_TOOLCHAIN_BUILDROOT_LIBC default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC source "package/uclibc/Config.in" - +source "package/glibc/Config.in" source "package/binutils/Config.in.host" source "package/gcc/Config.in.host" source "package/elf2flt/Config.in.host" From 3e693854b361f8bf18613c2b54fea5a530883bbd Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Wed, 5 Feb 2014 19:12:17 +0100 Subject: [PATCH 029/107] libatomic_ops: Update repository and bump version Change the download source to a Github repository which is more recent. This patch also bump libatomic_ops version and remove a patch that is now upstream. Signed-off-by: Maxime Hadjinlian Signed-off-by: Peter Korsgaard --- ...tomic_ops-nothread-build-failure-fix.patch | 41 ------------------- package/libatomic_ops/libatomic_ops.mk | 7 ++-- 2 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch diff --git a/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch b/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch deleted file mode 100644 index cc14b1e2e9..0000000000 --- a/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7e940ce34ff4de254d460344f1a1a486a14fb045 Mon Sep 17 00:00:00 2001 -From: Gilles Talis -Date: Wed, 22 May 2013 16:21:26 -0700 -Subject: [PATCH] Fix build failure seen when using toolchain without threads support - -Signed-off-by: Gilles Talis ---- - src/atomic_ops.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/src/atomic_ops.c b/src/atomic_ops.c -index b6731a2..5769643 100644 ---- a/src/atomic_ops.c -+++ b/src/atomic_ops.c -@@ -48,7 +48,9 @@ - - #undef AO_REQUIRE_CAS - -+#if defined(AO_USE_PTHREAD_DEFS) - #include -+#endif - - #ifndef AO_USE_NO_SIGNALS - # include -@@ -72,11 +74,13 @@ - # include "atomic_ops/sysdeps/standard_ao_double_t.h" - #endif - -+#if defined(AO_USE_PTHREAD_DEFS) - /* - * Lock for pthreads-based implementation. - */ - - pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER; -+#endif - - /* - * Out of line compare-and-swap emulation based on test and set. --- -1.7.4.1 - diff --git a/package/libatomic_ops/libatomic_ops.mk b/package/libatomic_ops/libatomic_ops.mk index fbe250cfb1..d47390134a 100644 --- a/package/libatomic_ops/libatomic_ops.mk +++ b/package/libatomic_ops/libatomic_ops.mk @@ -4,8 +4,9 @@ # ################################################################################ -LIBATOMIC_OPS_VERSION = 7.2 -LIBATOMIC_OPS_SITE = http://www.hpl.hp.com/research/linux/atomic_ops/download +LIBATOMIC_OPS_VERSION = libatomic_ops-7_4_0 +LIBATOMIC_OPS_SITE = $(call github,ivmai,libatomic_ops,$(LIBATOMIC_OPS_VERSION)) +LIBATOMIC_OPS_AUTORECONF = YES # From doc/LICENSING.txt: "Our intent is to make it easy to use # libatomic_ops, in both free and proprietary software. Hence most @@ -14,7 +15,7 @@ LIBATOMIC_OPS_SITE = http://www.hpl.hp.com/research/linux/atomic_ops/download # by the GNU General Public License. These are put into a separate # library, libatomic_ops_gpl.a." LIBATOMIC_OPS_LICENSE = MIT (main library) / GPLv2+ (gpl extension) -LIBATOMIC_OPS_LICENSE_FILES = doc/LICENSING.txt doc/COPYING +LIBATOMIC_OPS_LICENSE_FILES = doc/LICENSING.txt COPYING LIBATOMIC_OPS_INSTALL_STAGING = YES From 898e54bd783280ee1ffb6aeeb523c9fb8c31641a Mon Sep 17 00:00:00 2001 From: Vicente Olivert Riera Date: Wed, 5 Feb 2014 13:21:57 +0000 Subject: [PATCH 030/107] ltp-testsuite: bump version to 20140115 Fixes: http://autobuild.buildroot.net/results/14c/14c107a735bb54f55c99391b0ea0ff6bd1234e12/ Signed-off-by: Vicente Olivert Riera Signed-off-by: Peter Korsgaard --- package/ltp-testsuite/ltp-testsuite.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk index 594fa18cd0..6294c5ead5 100644 --- a/package/ltp-testsuite/ltp-testsuite.mk +++ b/package/ltp-testsuite/ltp-testsuite.mk @@ -4,7 +4,7 @@ # ################################################################################ -LTP_TESTSUITE_VERSION = 20130904 +LTP_TESTSUITE_VERSION = 20140115 LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz LTP_TESTSUITE_SITE = http://downloads.sourceforge.net/project/ltp/LTP%20Source/ltp-$(LTP_TESTSUITE_VERSION) LTP_TESTSUITE_LICENSE = GPLv2 GPLv2+ From c2be5638061caf256df64d68dd016e6ca8916a0f Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Tue, 4 Feb 2014 12:46:18 +0100 Subject: [PATCH 031/107] dbus: bump version to 1.6.8 Cc: Gary Coulbourne Signed-off-by: Samuel Martin Signed-off-by: Peter Korsgaard --- package/dbus/dbus.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk index 560f63e8dd..74e2041424 100644 --- a/package/dbus/dbus.mk +++ b/package/dbus/dbus.mk @@ -4,7 +4,7 @@ # ################################################################################ -DBUS_VERSION = 1.4.26 +DBUS_VERSION = 1.6.8 DBUS_SITE = http://dbus.freedesktop.org/releases/dbus DBUS_LICENSE = AFLv2.1 GPLv2+ DBUS_LICENSE_FILES = COPYING From 55d1c953dc17a13e848951da88f45c673eafdda9 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Tue, 4 Feb 2014 12:46:19 +0100 Subject: [PATCH 032/107] dbus: ensure dbus user is created Since we are changing the default dbus user, make sure this user is consistently created. Signed-off-by: Samuel Martin Signed-off-by: Peter Korsgaard --- package/dbus/dbus.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk index 74e2041424..e8b3da7a86 100644 --- a/package/dbus/dbus.mk +++ b/package/dbus/dbus.mk @@ -30,6 +30,10 @@ DBUS_CONF_OPT = --with-dbus-user=dbus \ --with-system-socket=/var/run/dbus/system_bus_socket \ --with-system-pid-file=/var/run/messagebus.pid +define DBUS_USERS + dbus -1 dbus -1 * /var/run/dbus - dbus DBus messagebus user +endef + ifeq ($(BR2_PREFER_STATIC_LIB),y) DBUS_CONF_OPT += LIBS='-lpthread' endif From 6f13130ac9a1a5eebfccbd8c9f04a6ec3f5ceba2 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:03 +0100 Subject: [PATCH 033/107] package: add base dependency to every package Move "dependencies" "dirs" "prepare" dependencies from "toolchain" to every package. This way we can build correctly every package right after the clean stage. As example with this commit we can build successfully the glibc right after the clean stage: make clean glibc This is also a step forward supporting top-level parallel make. Signed-off-by: Fabio Porcedda Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/pkg-generic.mk | 5 +++++ toolchain/toolchain/toolchain.mk | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 555c3c2e26..e5b04ff643 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -427,6 +427,11 @@ $(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) $(1)-build: $(1)-configure \ $$($(2)_TARGET_BUILD) +$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dirs prepare +ifeq ($(filter $(1),$(DEPENDENCIES_HOST_PREREQ)),) +$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dependencies +endif + ifeq ($$($(2)_OVERRIDE_SRCDIR),) # In the normal case (no package override), the sequence of steps is # source, by downloading diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk index 1152e2508a..8559ac9df4 100644 --- a/toolchain/toolchain/toolchain.mk +++ b/toolchain/toolchain/toolchain.mk @@ -14,4 +14,4 @@ endif $(eval $(generic-package)) -toolchain-source: prepare dirs dependencies $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake +toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake From b2fd9f90e23e25ab6c55f116c2cf3c244d122ec2 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:04 +0100 Subject: [PATCH 034/107] package: add toolchain dependency to every target package This commit makes the dependency from the target toolchain explicit. This way we can buid from command line a package that use inner-generic-package right after the configuration phase, example: make clean Also remove TARGETS_ALL because the only purpose was to add toolchain dependency so it's superseded by this commit. To prevent circular dependency add the new variable _ADD_TOOLCHAIN_DEPENDENCY to avoid adding the toolchain dependency for toolchain packages. This is also a step forward supporting top-level parallel make. Signed-off-by: Fabio Porcedda Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- Makefile | 8 ++------ package/glibc/glibc.mk | 3 +++ package/linux-headers/linux-headers.mk | 3 +++ package/pkg-autotools.mk | 3 ++- package/pkg-cmake.mk | 2 +- package/pkg-generic.mk | 12 +++++++++++- package/pkg-python.mk | 2 +- package/uclibc/uclibc.mk | 3 +++ toolchain/toolchain-buildroot/toolchain-buildroot.mk | 2 ++ toolchain/toolchain-external/toolchain-external.mk | 2 ++ toolchain/toolchain/toolchain.mk | 2 ++ 11 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 74022a5971..8e65bc7735 100644 --- a/Makefile +++ b/Makefile @@ -399,7 +399,6 @@ TARGETS+=target-post-image TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) -TARGETS_ALL:=$(patsubst %,__real_tgt_%,$(TARGETS)) # host-* dependencies have to be handled specially, as those aren't # visible in Kconfig and hence not added to a variable like TARGETS. @@ -422,9 +421,6 @@ HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS))) TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\ $(TARGETS) $(BASE_TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS)))) -# all targets depend on the crosscompiler and it's prerequisites -$(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) % - dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) @@ -433,11 +429,11 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) prepare: $(BUILD_DIR)/buildroot-config/auto.conf -world: $(BASE_TARGETS) $(TARGETS_ALL) +world: $(TARGETS) .PHONY: all world toolchain dirs clean distclean source outputmakefile \ legal-info legal-info-prepare legal-info-clean printvars \ - $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \ + $(BASE_TARGETS) $(TARGETS) \ $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \ $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 89eaaf6de5..f50b4591bc 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -31,6 +31,9 @@ endif GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library) GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES) +# glibc is part of the toolchain so disable the toolchain dependency +GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + # Before (e)glibc is configured, we must have the first stage # cross-compiler and the kernel headers GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk index 30d3076592..6dac9e36f1 100644 --- a/package/linux-headers/linux-headers.mk +++ b/package/linux-headers/linux-headers.mk @@ -17,6 +17,9 @@ LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz LINUX_HEADERS_INSTALL_STAGING = YES +# linux-headers is part of the toolchain so disable the toolchain dependency +LINUX_HEADERS_ADD_TOOLCHAIN_DEPENDENCY = NO + define LINUX_HEADERS_INSTALL_STAGING_CMDS (cd $(@D); \ $(TARGET_MAKE_ENV) $(MAKE) \ diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 5f6c31d151..32ceef2086 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -210,7 +210,8 @@ endef # This must be repeated from inner-generic-package, otherwise we get an empty # _DEPENDENCIES if _AUTORECONF is YES. Also filter the result of _AUTORECONF # away from the non-host rule -$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\ +$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool \ + host-toolchain $(1),\ $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index dbe0d97c9a..f7e454bddd 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -89,7 +89,7 @@ endif # This must be repeated from inner-generic-package, otherwise we only get # host-cmake in _DEPENDENCIES because of the following line -$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) $(2)_DEPENDENCIES += host-cmake diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index e5b04ff643..b135b140ea 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -351,8 +351,18 @@ endif $(2)_REDISTRIBUTE ?= YES +# When a target package is a toolchain dependency set this variable to +# 'NO' so the 'toolchain' dependency is not added to prevent a circular +# dependency +$(2)_ADD_TOOLCHAIN_DEPENDENCY ?= YES -$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\ + $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +ifeq ($(4),target) +ifeq ($$($(2)_ADD_TOOLCHAIN_DEPENDENCY),YES) +$(2)_DEPENDENCIES += toolchain +endif +endif $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 9b3c97af35..f33980aaed 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -142,7 +142,7 @@ endif # be derived automatically from the dependencies of the corresponding # target package. For example, target packages need # host-python-distutilscross, but not host packages. -$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-python-distutilscross $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-python-distutilscross host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) # Target packages need both the python interpreter on the target (for # runtime) and the python interpreter on the host (for diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 7df9721c35..ea1c6946a1 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -22,6 +22,9 @@ endif UCLIBC_INSTALL_STAGING = YES +# uclibc is part of the toolchain so disable the toolchain dependency +UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + # Before uClibc is configured, we must have the first stage # cross-compiler and the kernel headers UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers diff --git a/toolchain/toolchain-buildroot/toolchain-buildroot.mk b/toolchain/toolchain-buildroot/toolchain-buildroot.mk index 2b5028cbb8..853baf89f8 100644 --- a/toolchain/toolchain-buildroot/toolchain-buildroot.mk +++ b/toolchain/toolchain-buildroot/toolchain-buildroot.mk @@ -14,4 +14,6 @@ BR_LIBC = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_LIBC)) TOOLCHAIN_BUILDROOT_DEPENDENCIES = host-gcc-final +TOOLCHAIN_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO + $(eval $(generic-package)) diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index a7bfafc102..51da48099c 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -366,6 +366,8 @@ TOOLCHAIN_EXTERNAL_SITE = TOOLCHAIN_EXTERNAL_SOURCE = endif +TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO + TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y) diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk index 8559ac9df4..7241fe786c 100644 --- a/toolchain/toolchain/toolchain.mk +++ b/toolchain/toolchain/toolchain.mk @@ -12,6 +12,8 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) TOOLCHAIN_DEPENDENCIES += toolchain-external endif +TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO + $(eval $(generic-package)) toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake From 6c5c08b854e4490697076ae3c5a9c587d8672c63 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:05 +0100 Subject: [PATCH 035/107] package: add support for top-level parallel make To be able to use top-level parallel make we must not depend in a rule on the order of evaluation of the prerequisites, so instead of relying on the left to right ordering of evaluation of the prerequisites add an explicit rule to describe the dependencies. We cannot use the pattern rules because they must have the same dependency for every package, but we need to change the dependencies depending on $(2)_OVERRIDE_SRCDIR variable value, so we must use a more flexible way like $(2)_TARGET_% variables. So add explicit dependencies for the following stamp files: $(2)_TARGET_EXTRACT $(2)_TARGET_PATCH $(2)_TARGET_CONFIGURE $(2)_TARGET_BUILD $(2)_TARGET_INSTALL_STAGING $(2)_TARGET_INSTALL_TARGET $(2)_TARGET_INSTALL_IMAGES $(2)_TARGET_INSTALL_HOST Signed-off-by: Fabio Porcedda Signed-off-by: Peter Korsgaard --- package/glibc/glibc.mk | 6 +++--- package/pkg-generic.mk | 45 +++++++++++++++++++++++++--------------- package/uclibc/uclibc.mk | 6 +++--- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index f50b4591bc..6579f4616b 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -38,9 +38,6 @@ GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO # cross-compiler and the kernel headers GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk -# Before (e)glibc is built, we must have the second stage cross-compiler -glibc-build: host-gcc-intermediate - GLIBC_SUBDIR = build GLIBC_INSTALL_STAGING = YES @@ -142,3 +139,6 @@ define GLIBC_INSTALL_TARGET_CMDS endef $(eval $(autotools-package)) + +# Before (e)glibc is built, we must have the second stage cross-compiler +$(GLIBC_TARGET_BUILD): | host-gcc-intermediate diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index b135b140ea..fec16b0cb2 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -412,30 +412,42 @@ $(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images endif ifeq ($$($(2)_INSTALL_TARGET),YES) -$(1)-install-target: $(1)-build \ - $$($(2)_TARGET_INSTALL_TARGET) +$(1)-install-target: $$($(2)_TARGET_INSTALL_TARGET) +$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_BUILD) else $(1)-install-target: endif ifeq ($$($(2)_INSTALL_STAGING),YES) -$(1)-install-staging: $(1)-build \ - $$($(2)_TARGET_INSTALL_STAGING) +$(1)-install-staging: $$($(2)_TARGET_INSTALL_STAGING) +$$($(2)_TARGET_INSTALL_STAGING): $$($(2)_TARGET_BUILD) +# Some packages use install-staging stuff for install-target +$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_INSTALL_STAGING) else $(1)-install-staging: endif ifeq ($$($(2)_INSTALL_IMAGES),YES) -$(1)-install-images: $(1)-build \ - $$($(2)_TARGET_INSTALL_IMAGES) +$(1)-install-images: $$($(2)_TARGET_INSTALL_IMAGES) +$$($(2)_TARGET_INSTALL_IMAGES): $$($(2)_TARGET_BUILD) else $(1)-install-images: endif -$(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) +$(1)-install-host: $$($(2)_TARGET_INSTALL_HOST) +$$($(2)_TARGET_INSTALL_HOST): $$($(2)_TARGET_BUILD) -$(1)-build: $(1)-configure \ - $$($(2)_TARGET_BUILD) +$(1)-build: $$($(2)_TARGET_BUILD) +$$($(2)_TARGET_BUILD): $$($(2)_TARGET_CONFIGURE) + +# Since $(2)_DEPENDENCIES are phony targets, they are always "newer" +# than $(2)_TARGET_CONFIGURE. This would force the configure step (and +# therefore the other steps as well) to be re-executed with every +# invocation of make. Therefore, make $(2)_DEPENDENCIES an order-only +# dependency by using |. + +$(1)-configure: $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): | $$($(2)_DEPENDENCIES) $$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dirs prepare ifeq ($(filter $(1),$(DEPENDENCIES_HOST_PREREQ)),) @@ -449,13 +461,13 @@ ifeq ($$($(2)_OVERRIDE_SRCDIR),) # extract # patch # configure -$(1)-configure: $(1)-patch $(1)-depends \ - $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): $$($(2)_TARGET_PATCH) -$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) +$(1)-patch: $$($(2)_TARGET_PATCH) +$$($(2)_TARGET_PATCH): $$($(2)_TARGET_EXTRACT) -$(1)-extract: $(1)-source \ - $$($(2)_TARGET_EXTRACT) +$(1)-extract: $$($(2)_TARGET_EXTRACT) +$$($(2)_TARGET_EXTRACT): $$($(2)_TARGET_SOURCE) $(1)-depends: $$($(2)_DEPENDENCIES) @@ -465,10 +477,9 @@ else # source, by rsyncing # depends # configure -$(1)-configure: $(1)-depends \ - $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): $$($(2)_TARGET_RSYNC) -$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $$($(2)_DEPENDENCIES) $(1)-patch: $(1)-rsync $(1)-extract: $(1)-rsync diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index ea1c6946a1..4860c580e3 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -29,9 +29,6 @@ UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO # cross-compiler and the kernel headers UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers -# Before uClibc is built, we must have the second stage cross-compiler -uclibc-build: host-gcc-intermediate - # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config # setting. ifndef UCLIBC_CONFIG_FILE @@ -556,3 +553,6 @@ uclibc-menuconfig: dirs uclibc-patch rm -f $(UCLIBC_DIR)/.stamp_{configured,built,target_installed,staging_installed} $(eval $(generic-package)) + +# Before uClibc is built, we must have the second stage cross-compiler +$(UCLIBC_TARGET_BUILD): | host-gcc-intermediate From a24877586a566e052897e50e6a0c2f53cfb029f5 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:06 +0100 Subject: [PATCH 036/107] Makefile: add support for top-level parallel make To be able to use top-level parallel make we must not depend in a rule on the order of evaluation of the prerequisites, so instead of relyng on the left to right ordering of evaluation of the prerequisites add an explicit rule to describe the dependencies. Add explicit rules to describe the following dependency chain: $(TARGETS) -> target-finalize -> rootfs-* -> target-post-image Signed-off-by: Fabio Porcedda Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- Makefile | 21 ++++++++++++--------- fs/common.mk | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 8e65bc7735..c89107ad30 100644 --- a/Makefile +++ b/Makefile @@ -377,8 +377,6 @@ include system/system.mk include $(BR2_EXTERNAL)/external.mk -TARGETS+=target-finalize - ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) TARGETS+=target-purgelocales endif @@ -395,8 +393,6 @@ endif include fs/common.mk -TARGETS+=target-post-image - TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS)) @@ -429,11 +425,16 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) prepare: $(BUILD_DIR)/buildroot-config/auto.conf -world: $(TARGETS) +# Add base dependencies to all targets even on those not based on the +# package framework. +$(TARGETS): dirs prepare dependencies + +world: target-post-image .PHONY: all world toolchain dirs clean distclean source outputmakefile \ legal-info legal-info-prepare legal-info-clean printvars \ - $(BASE_TARGETS) $(TARGETS) \ + target-finalize target-post-image \ + $(BASE_TARGETS) $(TARGETS) $(TARGETS_ROOTFS) \ $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \ $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) @@ -493,7 +494,7 @@ endif STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \) STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print -target-finalize: +target-finalize: $(TARGETS) rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake @@ -520,6 +521,8 @@ endif find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ xargs -r $(KSTRIPCMD); fi +$(TARGETS_ROOTFS): target-finalize + # See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads # besides the one in which crash occurred; or SIGTRAP kills my program when # I set a breakpoint" @@ -598,7 +601,7 @@ target-generatelocales: host-localedef done endif -target-post-image: +target-post-image: $(TARGETS_ROOTFS) @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ $(call MESSAGE,"Executing post-image script $(s)"); \ $(USER_HOOKS_EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) @@ -635,7 +638,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \ @rm -f $(LEGAL_WARNINGS) show-targets: - @echo $(TARGETS) + @echo $(TARGETS) $(TARGETS_ROOTFS) graph-build: $(O)/build/build-time.log @install -d $(O)/graphs diff --git a/fs/common.mk b/fs/common.mk index 30e752470e..d95c26ba5c 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -64,7 +64,7 @@ ROOTFS_$(2)_COMPRESS_EXT = .xz ROOTFS_$(2)_COMPRESS_CMD = $$(XZ) -9 -C crc32 -c endif -$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES) +$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES) @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)") $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep)) rm -f $$(FAKEROOT_SCRIPT) @@ -95,7 +95,7 @@ rootfs-$(1)-show-depends: rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS) ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y) -TARGETS += rootfs-$(1) +TARGETS_ROOTFS += rootfs-$(1) endif endef From 069b33a30e6d71454ba8cf3b41d1ee2db14549e7 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:07 +0100 Subject: [PATCH 037/107] package: enable jobserver for recursive make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add '+' prefix to the $($(PKG)_BUILD_CMDS) and $($(PKG)_INSTALL*_CMDS) commands to enable jobserver for the sub-make. Without the '+' prefix GNU make does not detect the sub-make so it disable the jobserver for the sub-make. >From GNU make documentation: Using the MAKE variable has the same effect as using a ‘+’ character at the beginning of the recipe line. This special feature is only enabled if the MAKE variable appears directly in the recipe: it does not apply if the MAKE variable is referenced through expansion of another variable. In the latter case you must use the ‘+’ token to get these special effects. Signed-off-by: Fabio Porcedda Signed-off-by: Peter Korsgaard --- package/pkg-generic.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index fec16b0cb2..acb6f62c25 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -173,7 +173,7 @@ $(BUILD_DIR)/%/.stamp_configured: $(BUILD_DIR)/%/.stamp_built:: @$(call step_start,build) @$(call MESSAGE,"Building") - $($(PKG)_BUILD_CMDS) + +$($(PKG)_BUILD_CMDS) $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@ @$(call step_end,build) @@ -182,7 +182,7 @@ $(BUILD_DIR)/%/.stamp_built:: $(BUILD_DIR)/%/.stamp_host_installed: @$(call step_start,install-host) @$(call MESSAGE,"Installing to host directory") - $($(PKG)_INSTALL_CMDS) + +$($(PKG)_INSTALL_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@ @$(call step_end,install-host) @@ -191,7 +191,7 @@ $(BUILD_DIR)/%/.stamp_host_installed: $(BUILD_DIR)/%/.stamp_staging_installed: @$(call step_start,install-staging) @$(call MESSAGE,"Installing to staging directory") - $($(PKG)_INSTALL_STAGING_CMDS) + +$($(PKG)_INSTALL_STAGING_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(call MESSAGE,"Fixing package configuration files") ;\ @@ -207,7 +207,7 @@ $(BUILD_DIR)/%/.stamp_staging_installed: $(BUILD_DIR)/%/.stamp_images_installed: @$(call step_start,install-image) @$(call MESSAGE,"Installing to images directory") - $($(PKG)_INSTALL_IMAGES_CMDS) + +$($(PKG)_INSTALL_IMAGES_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@ @$(call step_end,install-image) @@ -220,7 +220,7 @@ $(BUILD_DIR)/%/.stamp_target_installed: $($(PKG)_INSTALL_INIT_SYSTEMD)) $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $($(PKG)_INSTALL_INIT_SYSV)) - $($(PKG)_INSTALL_TARGET_CMDS) + +$($(PKG)_INSTALL_TARGET_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ From 2afb23a70270657a9887e35ffa0af4c248ae0b25 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:08 +0100 Subject: [PATCH 038/107] Makefile: update comment about top-level parallel Makefile After the latest patches top-level parallel Makefile is working but there is still an issue when a package has an unspecified optional dependency so change the comment to explain that. Signed-off-by: Fabio Porcedda Signed-off-by: Peter Korsgaard --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c89107ad30..ddb1f6ae8a 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,20 @@ export HOSTARCH := $(shell uname -m | \ -e s/macppc/powerpc/\ -e s/sh.*/sh/) -# This top-level Makefile can *not* be executed in parallel +# Parallel execution of this Makefile is disabled because it changes +# the packages building order, that can be a problem for two reasons: +# - If a package has an unspecified optional dependency and that +# dependency is present when the package is built, it is used, +# otherwise it isn't (but compilation happily proceeds) so the end +# result will differ if the order is swapped due to parallel +# building. +# - Also changing the building order can be a problem if two packages +# manipulate the same file in the target directory. +# +# Taking into account the above considerations, if you still want to execute +# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and +# build using the following command: +# make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1)) .NOTPARALLEL: # absolute path From f75b5de9f6f473a257c607e97419a2338d57333c Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Fri, 14 Feb 2014 10:55:09 +0100 Subject: [PATCH 039/107] sdl: add support for top-level parallel make To be sure that host-autoconf dependency is already built move the call to autogen.sh from SDL_POST_PATCH_HOOKS to SDL_PRE_CONFIGURE_HOOKS. Signed-off-by: Fabio Porcedda Acked-by: Maxime Hadjinlian Signed-off-by: Peter Korsgaard --- package/sdl/sdl.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk index ba5fbca020..cf3366db0c 100644 --- a/package/sdl/sdl.mk +++ b/package/sdl/sdl.mk @@ -17,7 +17,7 @@ define SDL_RUN_AUTOGEN cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh endef -SDL_POST_PATCH_HOOKS += SDL_RUN_AUTOGEN +SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN SDL_DEPENDENCIES += host-automake host-autoconf host-libtool From 0fa180aa8a0638c25a851f82658e88fbd954e5cd Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 13 Feb 2014 17:26:18 -0700 Subject: [PATCH 040/107] i.MX: Use FREESCALE_IMX_SITE for Freescale packages This patch consolidates the URLs for various Freescale-supplied packages to use FREESCALE_IMX_SITE. Signed-off-by: Eric Nelson Reviewed-by: "Thomas Petazzoni" Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +- package/freescale-imx/freescale-imx.mk | 2 +- package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 2 +- package/freescale-imx/imx-lib/imx-lib.mk | 2 +- package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk | 3 +-- package/libfslcodec/libfslcodec.mk | 3 +-- package/libfslparser/libfslparser.mk | 3 +-- package/libfslvpuwrap/libfslvpuwrap.mk | 3 +-- 8 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk index d9fcb89628..d26b31c1ee 100644 --- a/package/freescale-imx/firmware-imx/firmware-imx.mk +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -5,7 +5,7 @@ ################################################################################ FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) -FIRMWARE_IMX_SITE = $(FREESCALE_IMX_MIRROR_SITE) +FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE) FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ Atheros license (ath6k) diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk index d35a62e479..0dd56296c3 100644 --- a/package/freescale-imx/freescale-imx.mk +++ b/package/freescale-imx/freescale-imx.mk @@ -7,6 +7,6 @@ FREESCALE_IMX_VERSION = 1.1.0 # No official download site from freescale, just this mirror -FREESCALE_IMX_MIRROR_SITE = http://download.ossystems.com.br/bsp/freescale/source +FREESCALE_IMX_SITE = http://download.ossystems.com.br/bsp/freescale/source include $(sort $(wildcard package/freescale-imx/*/*.mk)) diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk index c48d1080dc..8e979ee51b 100644 --- a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +++ b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk @@ -5,7 +5,7 @@ ################################################################################ GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) -GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_MIRROR_SITE) +GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_SITE) GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin GPU_VIV_BIN_MX6Q_INSTALL_STAGING = YES diff --git a/package/freescale-imx/imx-lib/imx-lib.mk b/package/freescale-imx/imx-lib/imx-lib.mk index bd7e174d19..e1a68ef85c 100644 --- a/package/freescale-imx/imx-lib/imx-lib.mk +++ b/package/freescale-imx/imx-lib/imx-lib.mk @@ -5,7 +5,7 @@ ################################################################################ IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) -IMX_LIB_SITE = $(FREESCALE_IMX_MIRROR_SITE) +IMX_LIB_SITE = $(FREESCALE_IMX_SITE) IMX_LIB_LICENSE = LGPLv2.1+ # No license file included diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk index ccdb521284..44378759fb 100644 --- a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -5,8 +5,7 @@ ################################################################################ GST_FSL_PLUGINS_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -GST_FSL_PLUGINS_SITE = http://download.ossystems.com.br/bsp/freescale/source +GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE) # Most is LGPLv2+, but some sources are copied from upstream and are # LGPLv2.1+, which essentially makes it LGPLv2.1+ diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk index c18332aad7..ad1cc63333 100644 --- a/package/libfslcodec/libfslcodec.mk +++ b/package/libfslcodec/libfslcodec.mk @@ -5,8 +5,7 @@ ################################################################################ LIBFSLCODEC_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -LIBFSLCODEC_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) LIBFSLCODEC_LICENSE_FILES = EULA EULA.txt diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk index 3e27a6a6e4..3aab3a7b35 100644 --- a/package/libfslparser/libfslparser.mk +++ b/package/libfslparser/libfslparser.mk @@ -5,8 +5,7 @@ ################################################################################ LIBFSLPARSER_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -LIBFSLPARSER_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement LIBFSLPARSER_LICENSE_FILES = EULA EULA.txt diff --git a/package/libfslvpuwrap/libfslvpuwrap.mk b/package/libfslvpuwrap/libfslvpuwrap.mk index 1bc7129197..346a20a498 100644 --- a/package/libfslvpuwrap/libfslvpuwrap.mk +++ b/package/libfslvpuwrap/libfslvpuwrap.mk @@ -5,8 +5,7 @@ ################################################################################ LIBFSLVPUWRAP_VERSION = 1.0.17 -# No official download site from freescale, just this mirror -LIBFSLVPUWRAP_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement LIBFSLVPUWRAP_LICENSE_FILES = EULA.txt LIBFSLVPUWRAP_REDISTRIBUTE = NO From b0b72591d74c1a84b8c1b2e1990a2fe1dfe8c4ab Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 13 Feb 2014 17:26:19 -0700 Subject: [PATCH 041/107] i.MX: Update versions to match latest Freescale release Signed-off-by: Eric Nelson Signed-off-by: Peter Korsgaard --- package/freescale-imx/freescale-imx.mk | 6 ++--- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 6 ++++- package/freescale-imx/imx-lib/imx-lib.mk | 22 ++++++++++++++++-- .../gst-fsl-plugins/gst-fsl-plugins.mk | 2 +- package/libfslcodec/libfslcodec.mk | 2 +- package/libfslparser/libfslparser.mk | 5 +++- package/libfslvpuwrap/libfslvpuwrap.mk | 23 +++++++++++++++++-- 7 files changed, 54 insertions(+), 12 deletions(-) diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk index 0dd56296c3..39ffa8ac68 100644 --- a/package/freescale-imx/freescale-imx.mk +++ b/package/freescale-imx/freescale-imx.mk @@ -4,9 +4,7 @@ # ################################################################################ -FREESCALE_IMX_VERSION = 1.1.0 - -# No official download site from freescale, just this mirror -FREESCALE_IMX_SITE = http://download.ossystems.com.br/bsp/freescale/source +FREESCALE_IMX_VERSION = 3.5.7-1.0.0 +FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/ include $(sort $(wildcard package/freescale-imx/*/*.mk)) diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk index 8e979ee51b..e799fd2a5e 100644 --- a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +++ b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk @@ -4,7 +4,11 @@ # ################################################################################ -GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) +ifeq ($(BR2_ARM_EABIHF),y) +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-hfp +else +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-sfp +endif GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_SITE) GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin diff --git a/package/freescale-imx/imx-lib/imx-lib.mk b/package/freescale-imx/imx-lib/imx-lib.mk index e1a68ef85c..4f605d70a2 100644 --- a/package/freescale-imx/imx-lib/imx-lib.mk +++ b/package/freescale-imx/imx-lib/imx-lib.mk @@ -6,8 +6,9 @@ IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) IMX_LIB_SITE = $(FREESCALE_IMX_SITE) -IMX_LIB_LICENSE = LGPLv2.1+ -# No license file included +IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest) +IMX_LIB_LICENSE_FILES = EULA +IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin IMX_LIB_INSTALL_STAGING = YES @@ -25,6 +26,23 @@ IMX_LIB_MAKE_ENV = \ PLATFORM=$(BR2_PACKAGE_IMX_LIB_PLATFORM) \ INCLUDE="$(IMX_LIB_INCLUDE)" +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (imx-lib-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info +# Since there's a EULA in the bin file, extract it to imx-lib-x.y.z/EULA +# +define IMX_LIB_EXTRACT_CMDS + awk 'BEGIN { start=0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /< $(@D)/EULA + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(IMX_LIB_SOURCE) --force --auto-accept +endef + define IMX_LIB_BUILD_CMDS $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) endef diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk index 44378759fb..9ec92d8450 100644 --- a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -4,7 +4,7 @@ # ################################################################################ -GST_FSL_PLUGINS_VERSION = 3.0.1 +GST_FSL_PLUGINS_VERSION = $(FREESCALE_IMX_VERSION) GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE) # Most is LGPLv2+, but some sources are copied from upstream and are diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk index ad1cc63333..d52158ccc6 100644 --- a/package/libfslcodec/libfslcodec.mk +++ b/package/libfslcodec/libfslcodec.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBFSLCODEC_VERSION = 3.0.1 +LIBFSLCODEC_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk index 3aab3a7b35..0d92e02091 100644 --- a/package/libfslparser/libfslparser.mk +++ b/package/libfslparser/libfslparser.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBFSLPARSER_VERSION = 3.0.1 +LIBFSLPARSER_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement @@ -36,4 +36,7 @@ endef # The Makefile installs several versions of the libraries, but we only # need one of them, depending on the platform. +# without AUTORECONF, configure fails to find install-sh. +LIBFSLPARSER_AUTORECONF = YES + $(eval $(autotools-package)) diff --git a/package/libfslvpuwrap/libfslvpuwrap.mk b/package/libfslvpuwrap/libfslvpuwrap.mk index 346a20a498..75c988779d 100644 --- a/package/libfslvpuwrap/libfslvpuwrap.mk +++ b/package/libfslvpuwrap/libfslvpuwrap.mk @@ -4,14 +4,33 @@ # ################################################################################ -LIBFSLVPUWRAP_VERSION = 1.0.17 +LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) +LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement -LIBFSLVPUWRAP_LICENSE_FILES = EULA.txt +# N.B.: the content of the two license files is different +LIBFSLVPUWRAP_LICENSE_FILES = EULA EULA.txt LIBFSLVPUWRAP_REDISTRIBUTE = NO LIBFSLVPUWRAP_INSTALL_STAGING = YES LIBFSLVPUWRAP_DEPENDENCIES += imx-lib +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (libfslvpuwrap-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info +# Since the EULA in the bin file differs from the one in the tar file, +# extract the one from the bin file as well. +define LIBFSLVPUWRAP_EXTRACT_CMDS + awk 'BEGIN { start=0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /< $(@D)/EULA + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) --force --auto-accept +endef + $(eval $(autotools-package)) From 64b4fa7b256ff9d1f2bf9a2f7e50fd5c9b9ef8bf Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:50 +0100 Subject: [PATCH 042/107] python: expose PYTHON_PATH As a preparation to make the Python infrastructure support both Python and Python 3, as well as the bump of Python 2 and 3, we need the Python package to expose the Python module path in a variable called PYTHON_PATH. It will be used by the following commits. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python/python.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/python/python.mk b/package/python/python.mk index 6187d66e7d..f2e48c4e5d 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -167,5 +167,8 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES PYTHON_AUTORECONF = YES +# Provided to other packages +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ + $(eval $(autotools-package)) $(eval $(host-autotools-package)) From fa50b8eee17600d328ad661d17252c7f7cc3dac4 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:51 +0100 Subject: [PATCH 043/107] pkg-python: use the newly defined PYTHON_PATH variable Now that the Python package exposes its PYTHON_PATH variable, we can use it in the package infrastructure. This prepares both the upcoming bump of Python 2.x, and the introduction of Python 3 support in the Python package infrastructure. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/pkg-python.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index f33980aaed..65c9b4adc3 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -48,7 +48,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ PATH="$(TARGET_PATH)" \ - PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ + PYTHONPATH="$(PYTHON_PATH)" \ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ CROSS_COMPILING=yes \ _python_sysroot=$(STAGING_DIR) \ From 577e52ac087a1a3c63837d0da37c93949c455941 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:52 +0100 Subject: [PATCH 044/107] pkg-python: also pass PYTHONPATH when building distutils packages With the upcoming bump of Python 2.x, it will become important that the PYTHONPATH is passed whenever we build third-party packages, be they using the distutils build mechanism, or the setuptools build mechanism. This is because passing PYTHONPATH is what will allow Python to find a special Python module that contains all the compiler/library/headers definitions that are relevant when cross-compiling. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/pkg-python.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 65c9b4adc3..c423f7a5e2 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -28,6 +28,7 @@ PKG_PYTHON_DISTUTILS_ENV = \ LDFLAGS="$(TARGET_LDFLAGS)" \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ CROSS_COMPILING=yes \ + PYTHONPATH="$(PYTHON_PATH)" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr From 7e960dc9da56d4a484b5480746aaf617ca491274 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:53 +0100 Subject: [PATCH 045/107] python: bump to 2.7.6 Even though jumping from 2.7.3 to 2.7.6 looks like a minor version bump, it is in fact a fairly significant one, because a good number of changes to help cross-compilation have been merged into Python upstream. Therefore, most of our patches are affected by this change. In detail, this commit: * Renames all the patches to follow the naming convention of patches in Buildroot: the patch file names should not have any version number. * The patches numbered above 100, that add configuration options to disable certain modules of the Python standard library, are only renamed and slightly adapted, they didn't change that much. * The patches numbered below 100 are almost entirely rewritten: many of the cross-compilation problems that used to exist in Python 2.7.3 no longer exist, and the number of remaining problems is smaller, and can be fixed with smaller patches. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- .../python-001-remove-host-header-path.patch | 32 ++++ .../python-002-fix-get-python-inc.patch | 36 ++++ ...-003-properly-detect-if-python-build.patch | 23 +++ ...n-004-sysconfigdata-install-location.patch | 76 +++++++++ .../python-005-pyc-pyo-conditional.patch | 59 +++++++ ...python-006-cross-compile-getaddrinfo.patch | 13 ++ .../python-007-disable-extensions.patch | 60 +++++++ ...hon-008-distutils-use-python-sysroot.patch | 54 ++++++ .../python-009-no-termcap-host-path.patch | 23 +++ ...=> python-100-optional-test-modules.patch} | 48 +++--- ....patch => python-101-optional-pydoc.patch} | 36 ++-- ...3.patch => python-102-optional-2to3.patch} | 51 +++--- ...patch => python-103-optional-sqlite.patch} | 49 +++--- ...-tk.patch => python-104-optional-tk.patch} | 46 +++--- ...patch => python-105-optional-curses.patch} | 24 +-- ....patch => python-106-optional-expat.patch} | 30 ++-- ...h => python-107-optional-codecs-cjk.patch} | 8 +- ...is.patch => python-108-optional-nis.patch} | 8 +- ... => python-109-optional-unicodedata.patch} | 8 +- ...-db.patch => python-110-optional-db.patch} | 41 +++-- ...sl.patch => python-111-optional-ssl.patch} | 8 +- ....patch => python-112-optional-bzip2.patch} | 8 +- ...b.patch => python-113-optional-zlib.patch} | 8 +- .../python-2.7-001-support-for-build.patch | 154 ------------------ ...ython-2.7-002-cross-compile-variable.patch | 55 ------- ...7-003-no-import-when-cross-compiling.patch | 26 --- .../python-2.7-004-no-host-headers-libs.patch | 111 ------------- .../python-2.7-005-staging-headers-libs.patch | 38 ----- .../python-2.7-006-disable-extensions.patch | 102 ------------ ...on-2.7-007-do-not-generate-pyo-files.patch | 40 ----- .../python-2.7-008-reread-environment.patch | 65 -------- ...n-2.7-010-change-pyconfig-h-location.patch | 76 --------- package/python/python-2.7-011-no-rpath.patch | 75 --------- ...on-2.7-012-correct-32bit-64bit-check.patch | 55 ------- ...thon-2.7-013-fix-linux-3-compilation.patch | 24 --- .../python-2.7-014-verbose-module-build.patch | 19 --- ...-distutils-cross-compilation-support.patch | 125 -------------- ...on-2.7-016-cross-compile-getaddrinfo.patch | 15 -- package/python/python.mk | 49 +++--- 39 files changed, 589 insertions(+), 1189 deletions(-) create mode 100644 package/python/python-001-remove-host-header-path.patch create mode 100644 package/python/python-002-fix-get-python-inc.patch create mode 100644 package/python/python-003-properly-detect-if-python-build.patch create mode 100644 package/python/python-004-sysconfigdata-install-location.patch create mode 100644 package/python/python-005-pyc-pyo-conditional.patch create mode 100644 package/python/python-006-cross-compile-getaddrinfo.patch create mode 100644 package/python/python-007-disable-extensions.patch create mode 100644 package/python/python-008-distutils-use-python-sysroot.patch create mode 100644 package/python/python-009-no-termcap-host-path.patch rename package/python/{python-2.7-100-optional-test-modules.patch => python-100-optional-test-modules.patch} (71%) rename package/python/{python-2.7-101-optional-pydoc.patch => python-101-optional-pydoc.patch} (77%) rename package/python/{python-2.7-102-optional-2to3.patch => python-102-optional-2to3.patch} (70%) rename package/python/{python-2.7-103-optional-sqlite.patch => python-103-optional-sqlite.patch} (57%) rename package/python/{python-2.7-104-optional-tk.patch => python-104-optional-tk.patch} (59%) rename package/python/{python-2.7-105-optional-curses.patch => python-105-optional-curses.patch} (75%) rename package/python/{python-2.7-106-optional-expat.patch => python-106-optional-expat.patch} (84%) rename package/python/{python-2.7-107-optional-codecs-cjk.patch => python-107-optional-codecs-cjk.patch} (84%) rename package/python/{python-2.7-108-optional-nis.patch => python-108-optional-nis.patch} (85%) rename package/python/{python-2.7-109-optional-unicodedata.patch => python-109-optional-unicodedata.patch} (83%) rename package/python/{python-2.7-110-optional-db.patch => python-110-optional-db.patch} (75%) rename package/python/{python-2.7-111-optional-ssl.patch => python-111-optional-ssl.patch} (83%) rename package/python/{python-2.7-112-optional-bzip2.patch => python-112-optional-bzip2.patch} (83%) rename package/python/{python-2.7-113-optional-zlib.patch => python-113-optional-zlib.patch} (84%) delete mode 100644 package/python/python-2.7-001-support-for-build.patch delete mode 100644 package/python/python-2.7-002-cross-compile-variable.patch delete mode 100644 package/python/python-2.7-003-no-import-when-cross-compiling.patch delete mode 100644 package/python/python-2.7-004-no-host-headers-libs.patch delete mode 100644 package/python/python-2.7-005-staging-headers-libs.patch delete mode 100644 package/python/python-2.7-006-disable-extensions.patch delete mode 100644 package/python/python-2.7-007-do-not-generate-pyo-files.patch delete mode 100644 package/python/python-2.7-008-reread-environment.patch delete mode 100644 package/python/python-2.7-010-change-pyconfig-h-location.patch delete mode 100644 package/python/python-2.7-011-no-rpath.patch delete mode 100644 package/python/python-2.7-012-correct-32bit-64bit-check.patch delete mode 100644 package/python/python-2.7-013-fix-linux-3-compilation.patch delete mode 100644 package/python/python-2.7-014-verbose-module-build.patch delete mode 100644 package/python/python-2.7-015-distutils-cross-compilation-support.patch delete mode 100644 package/python/python-2.7-016-cross-compile-getaddrinfo.patch diff --git a/package/python/python-001-remove-host-header-path.patch b/package/python/python-001-remove-host-header-path.patch new file mode 100644 index 0000000000..206751d24b --- /dev/null +++ b/package/python/python-001-remove-host-header-path.patch @@ -0,0 +1,32 @@ +setup.py: do not add invalid header locations + +This piece of code incorrectly adds /usr/include to +self.compiler.include_dirs, and results in the following invalid +compilation line: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \ + -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ + -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \ + -I/usr/include -I. -IInclude -I./Include \ + -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \ + -I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \ + -I/home/thomas/projets/buildroot/output/build/python-2.7.6 \ + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \ + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o +cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] +[...] + +Signed-off-by: Thomas Petazzoni +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -478,7 +478,7 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr' \ ++ if False and os.path.normpath(sys.prefix) != '/usr' \ + and not sysconfig.get_config_var('PYTHONFRAMEWORK'): + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when diff --git a/package/python/python-002-fix-get-python-inc.patch b/package/python/python-002-fix-get-python-inc.patch new file mode 100644 index 0000000000..bfee03aaac --- /dev/null +++ b/package/python/python-002-fix-get-python-inc.patch @@ -0,0 +1,36 @@ +Fix get_python_inc() for cross-compilation + +When we are cross compiling, doing os.path.dirname(sys.executable) to +get the build directory is incorrect, because we're executing the host +Python to build things for the target. Instead, we should use the +project_base variable. + +This fixes cross-compilation, which was adding incorrect header paths +pointing to the location where the host Python was built: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -fno-strict-aliasing \ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \ + -I/usr/include -I. -IInclude -I./Include -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \ + -I/home/thomas/projets/buildroot/output/host/usr/bin/Include -I/home/thomas/projets/buildroot/output/host/usr/bin \ + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.c \ + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.o + +This patch allows to fix the +/home/thomas/projets/buildroot/output/host/usr/bin/Include and +/home/thomas/projets/buildroot/output/host/usr/bin paths that are +incorrectly added to the header paths. + +Signed-off-by: Thomas Petazzoni +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -79,7 +79,7 @@ + + if os.name == "posix": + if python_build: +- buildir = os.path.dirname(sys.executable) ++ buildir = project_base + if plat_specific: + # python.h is located in the buildir + inc_dir = buildir diff --git a/package/python/python-003-properly-detect-if-python-build.patch b/package/python/python-003-properly-detect-if-python-build.patch new file mode 100644 index 0000000000..3fb865f84f --- /dev/null +++ b/package/python/python-003-properly-detect-if-python-build.patch @@ -0,0 +1,23 @@ +distutils: fix build_ext check to find whether we're building Python or not + +The build_ext logic uses +sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to +determine whether we're building a third-party Python extension, or a +built-in Python extension. However, this check is wrong in +cross-compilation mode, and instead, the sysconfig.python_build +variable should be used. + +Signed-off-by: Thomas Petazzoni +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -235,7 +235,7 @@ + # Python's library directory must be appended to library_dirs + # See Issues: #1600860, #4366 + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): +- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): ++ if not sysconfig.python_build: + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: diff --git a/package/python/python-004-sysconfigdata-install-location.patch b/package/python/python-004-sysconfigdata-install-location.patch new file mode 100644 index 0000000000..940dde792a --- /dev/null +++ b/package/python/python-004-sysconfigdata-install-location.patch @@ -0,0 +1,76 @@ +Change the install location of _sysconfigdata.py + +The _sysconfigdata.py module contains definitions that are needed when +building Python modules. In cross-compilation mode, when building +Python extensions for the target, we need to use the _sysconfigdata.py +of the target Python while executing the host Python. + +However until now, the _sysconfigdata.py module was installed in +build/lib.- directory, together with a number of +architecture-specific shared objects, which cannot be used with the +host Python. + +To solve this problem, this patch moves _sysconfigdata.py to a +separate location, build/sysconfigdata.-/, and only +this directory gets added to the PYTHONPATH of the host Python +interpreter when building Python modules for the target. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -449,6 +449,9 @@ + # sys.path fixup -- see Modules/getpath.c. + pybuilddir.txt: $(BUILDPYTHON) + $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt ++ mkdir -p `cat pysysconfigdatadir.txt` ++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt` + + # Build the shared modules + # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for +@@ -965,7 +968,7 @@ + else true; \ + fi; \ + done +- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \ ++ @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ +@@ -975,6 +978,11 @@ + echo $(INSTALL_DATA) $$i $(LIBDEST); \ + fi; \ + done ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST) ++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST)/sysconfigdata + @for d in $(LIBSUBDIRS); \ + do \ + a=$(srcdir)/Lib/$$d; \ +@@ -1299,7 +1307,7 @@ + Modules/Setup Modules/Setup.local Modules/Setup.config \ + Modules/ld_so_aix Modules/python.exp Misc/python.pc + -rm -f python*-gdb.py +- -rm -f pybuilddir.txt ++ -rm -f pybuilddir.txt pysysconfigdatadir.txt + find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \ + -o -name '[@,#]*' -o -name '*.old' \ + -o -name '*.orig' -o -name '*.rej' \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -30,7 +30,7 @@ + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) diff --git a/package/python/python-005-pyc-pyo-conditional.patch b/package/python/python-005-pyc-pyo-conditional.patch new file mode 100644 index 0000000000..aa3b3305fa --- /dev/null +++ b/package/python/python-005-pyc-pyo-conditional.patch @@ -0,0 +1,59 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1013,24 +1013,32 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi ++ifeq (@PYC_BUILD@,yes) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYO_BUILD@,yes) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -733,6 +733,17 @@ + ;; + esac + ++AC_SUBST(PYC_BUILD) ++ ++AC_ARG_ENABLE(pyc-build, ++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]), ++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ]) ++ ++AC_SUBST(PYO_BUILD) ++ ++AC_ARG_ENABLE(pyo-build, ++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]), ++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ]) + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) diff --git a/package/python/python-006-cross-compile-getaddrinfo.patch b/package/python/python-006-cross-compile-getaddrinfo.patch new file mode 100644 index 0000000000..2c8248f5ad --- /dev/null +++ b/package/python/python-006-cross-compile-getaddrinfo.patch @@ -0,0 +1,13 @@ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -3337,7 +3337,7 @@ + + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) + +-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes + then + if test $ipv6 = yes + then diff --git a/package/python/python-007-disable-extensions.patch b/package/python/python-007-disable-extensions.patch new file mode 100644 index 0000000000..c03f84cace --- /dev/null +++ b/package/python/python-007-disable-extensions.patch @@ -0,0 +1,60 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -153,6 +153,8 @@ + # configure script arguments + CONFIG_ARGS= @CONFIG_ARGS@ + ++# disabled extensions ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ + + # Subdirectories with code + SRCDIRS= @SRCDIRS@ +@@ -464,6 +466,7 @@ + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library +@@ -1154,7 +1157,8 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2275,6 +2275,8 @@ + + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) + ++AC_SUBST(DISABLED_EXTENSIONS) ++ + # Check for use of the system expat library + AC_MSG_CHECKING(for --with-system-expat) + AC_ARG_WITH(system_expat, +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -33,7 +33,10 @@ + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") ++except KeyError: ++ disabled_module_list = list() + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if diff --git a/package/python/python-008-distutils-use-python-sysroot.patch b/package/python/python-008-distutils-use-python-sysroot.patch new file mode 100644 index 0000000000..7cd748761a --- /dev/null +++ b/package/python/python-008-distutils-use-python-sysroot.patch @@ -0,0 +1,54 @@ +Adjust library/header paths for cross-compilation + +When cross-compiling third-party extensions, the get_python_inc() or +get_python_lib() can be called, to return the path to headers or +libraries. However, they use the sys.prefix of the host Python, which +returns incorrect paths when cross-compiling (paths pointing to host +headers and libraries). + +In order to fix this, we introduce the _python_sysroot, _python_prefix +and _python_exec_prefix variables, that allow to override these +values, and get correct header/library paths when cross-compiling +third-party Python modules. + +The _python_sysroot variable is also used to prefix the LIBDIR value +taken from the sysconfigdata module. + +Signed-off-by: Thomas Petazzoni + +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -19,8 +19,13 @@ + from distutils.errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++if "_python_sysroot" in os.environ: ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -237,7 +237,10 @@ + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): + if not sysconfig.python_build: + # building third party extensions +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if "_python_sysroot" in os.environ: ++ libdir = os.environ.get("_python_sysroot") + libdir ++ self.library_dirs.append(libdir) + else: + # building python standard extensions + self.library_dirs.append('.') diff --git a/package/python/python-009-no-termcap-host-path.patch b/package/python/python-009-no-termcap-host-path.patch new file mode 100644 index 0000000000..7df8a32a00 --- /dev/null +++ b/package/python/python-009-no-termcap-host-path.patch @@ -0,0 +1,23 @@ +Don't look in /usr/lib/termcap for libraries + +Signed-off-by: Thomas Petazzoni + + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -760,12 +760,9 @@ + pass # Issue 7384: Already linked against curses or tinfo. + elif curses_library: + readline_libs.append(curses_library) +- elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], +- 'termcap'): ++ elif self.compiler.find_library_file(lib_dirs, 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: diff --git a/package/python/python-2.7-100-optional-test-modules.patch b/package/python/python-100-optional-test-modules.patch similarity index 71% rename from package/python/python-2.7-100-optional-test-modules.patch rename to package/python/python-100-optional-test-modules.patch index a988717d05..a5f7545783 100644 --- a/package/python/python-2.7-100-optional-test-modules.patch +++ b/package/python/python-100-optional-test-modules.patch @@ -11,19 +11,20 @@ Signed-off-by: Samuel Martin configure.in | 6 ++++++ 2 files changed, 33 insertions(+), 13 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -856,23 +856,30 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -934,23 +934,40 @@ plat-mac/lib-scriptpackages/SystemEvents \ - plat-mac/lib-scriptpackages/Terminal + plat-mac/lib-scriptpackages/Terminal PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages -LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \ -- lib-tk/test/test_ttk site-packages test test/data \ +- lib-tk/test/test_ttk site-packages test test/audiodata test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules \ -+LIBSUBDIRS= lib-tk site-packages \ ++LIBSUBDIRS= lib-tk \ ++ site-packages \ encodings compiler hotshot \ - email email/mime email/test email/test/data \ - json json/tests \ @@ -39,31 +40,40 @@ Index: Python-2.7.2/Makefile.pre.in + logging bsddb csv importlib wsgiref \ + lib2to3 lib2to3/fixes lib2to3/pgen2 \ + ctypes ctypes/macholib idlelib idlelib/Icons \ -+ distutils distutils/command $(XMLLIBSUBDIRS) \ ++ distutils distutils/command $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ - unittest unittest/test \ + unittest \ lib-old \ curses pydoc_data $(MACHDEPS) + ++TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ ++ lib-tk/test/test_ttk \ ++ test test/audiodata test/data \ ++ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ ++ test/tracedmodules \ ++ email/test email/test/data \ ++ json/tests \ ++ sqlite3/test \ ++ bsddb/test \ ++ lib2to3/tests \ ++ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ ++ ctypes/test \ ++ distutils/tests \ ++ unittest/test ++ +ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -+ lib-tk/test/test_ttk test test/data \ -+ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ -+ test/tracedmodules email/test email/test/data \ -+ json/tests sqlite3/test bsddb/test lib2to3/tests \ -+ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ -+ ctypes/test distutils/tests unittest/test ++LIBSUBDIRS += $(TESTSUBDIRS) +endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2408,6 +2408,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2614,6 +2614,12 @@ fi diff --git a/package/python/python-2.7-101-optional-pydoc.patch b/package/python/python-101-optional-pydoc.patch similarity index 77% rename from package/python/python-2.7-101-optional-pydoc.patch rename to package/python/python-101-optional-pydoc.patch index ccc937bb27..c9b05bd76a 100644 --- a/package/python/python-2.7-101-optional-pydoc.patch +++ b/package/python/python-101-optional-pydoc.patch @@ -12,21 +12,21 @@ Signed-off-by: Samuel Martin setup.py | 10 +++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -868,7 +868,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -947,7 +947,7 @@ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ - curses pydoc_data $(MACHDEPS) + curses $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -@@ -880,6 +880,10 @@ - ctypes/test distutils/tests unittest/test + TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ + lib-tk/test/test_ttk \ +@@ -968,6 +968,10 @@ + LIBSUBDIRS += $(TESTSUBDIRS) endif +ifeq (@PYDOC@,yes) @@ -36,12 +36,12 @@ Index: Python-2.7.2/Makefile.pre.in libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2407,6 +2407,11 @@ - esac]) +--- a/configure.ac ++++ b/configure.ac +@@ -2613,6 +2613,11 @@ + AC_CHECK_FUNCS(pthread_atfork) fi +AC_SUBST(PYDOC) @@ -52,11 +52,11 @@ Index: Python-2.7.2/configure.in AC_SUBST(TEST_MODULES) -Index: Python-2.7.2/setup.py +Index: b/setup.py =================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -2092,6 +2092,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -2205,6 +2205,12 @@ # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -69,7 +69,7 @@ Index: Python-2.7.2/setup.py setup(# PyPI Metadata (PEP 301) name = "Python", version = sys.version.split()[0], -@@ -2112,9 +2118,7 @@ +@@ -2225,9 +2231,7 @@ ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install diff --git a/package/python/python-2.7-102-optional-2to3.patch b/package/python/python-102-optional-2to3.patch similarity index 70% rename from package/python/python-2.7-102-optional-2to3.patch rename to package/python/python-102-optional-2to3.patch index 0321619fcd..586b24b421 100644 --- a/package/python/python-2.7-102-optional-2to3.patch +++ b/package/python/python-102-optional-2to3.patch @@ -12,50 +12,47 @@ Signed-off-by: Samuel Martin setup.py | 5 +++-- 3 files changed, 26 insertions(+), 9 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -862,7 +862,6 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -941,7 +941,6 @@ json \ sqlite3 \ logging bsddb csv importlib wsgiref \ - lib2to3 lib2to3/fixes lib2to3/pgen2 \ ctypes ctypes/macholib idlelib idlelib/Icons \ - distutils distutils/command $(XMLLIBSUBDIRS) \ + distutils distutils/command $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ -@@ -875,8 +874,7 @@ - lib-tk/test/test_ttk test test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules email/test email/test/data \ -- json/tests sqlite3/test bsddb/test lib2to3/tests \ -- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ -+ json/tests sqlite3/test bsddb/test \ - ctypes/test distutils/tests unittest/test - endif - -@@ -884,6 +882,16 @@ +@@ -958,8 +957,6 @@ + json/tests \ + sqlite3/test \ + bsddb/test \ +- lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ + ctypes/test \ + distutils/tests \ + unittest/test +@@ -972,6 +969,14 @@ LIBSUBDIRS += pydoc_data endif +ifeq (@LIB2TO3@,yes) +LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += lib2to3/tests \ ++TESTSUBDIRS += lib2to3/tests \ + lib2to3/tests/data \ + lib2to3/tests/data/fixers \ + lib2to3/tests/data/fixers/myfixes +endif -+endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2419,6 +2419,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2625,6 +2625,12 @@ AS_HELP_STRING([--disable-test-modules], [disable test modules]), [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) @@ -68,11 +65,11 @@ Index: Python-2.7.2/configure.in # Check for enable-ipv6 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) AC_MSG_CHECKING([if --enable-ipv6 is specified]) -Index: Python-2.7.2/setup.py +Index: b/setup.py =================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -2093,10 +2093,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -2206,10 +2206,11 @@ import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) diff --git a/package/python/python-2.7-103-optional-sqlite.patch b/package/python/python-103-optional-sqlite.patch similarity index 57% rename from package/python/python-2.7-103-optional-sqlite.patch rename to package/python/python-103-optional-sqlite.patch index a915c55c3a..a20afc7dd0 100644 --- a/package/python/python-2.7-103-optional-sqlite.patch +++ b/package/python/python-103-optional-sqlite.patch @@ -8,12 +8,12 @@ Signed-off-by: Samuel Martin configure.in | 9 +++++++++ 2 file changed, 9 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2407,6 +2407,15 @@ - esac]) +--- a/configure.ac ++++ b/configure.ac +@@ -2613,6 +2613,15 @@ + AC_CHECK_FUNCS(pthread_atfork) fi +AC_SUBST(SQLITE3) @@ -28,28 +28,33 @@ Index: Python-2.7.2/configure.in AC_SUBST(PYDOC) AC_ARG_ENABLE(pydoc, -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -875,7 +874,7 @@ - lib-tk/test/test_ttk test test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules email/test email/test/data \ -- json/tests sqlite3/test bsddb/test \ -+ json/tests bsddb/test \ - ctypes/test distutils/tests unittest/test - endif - -@@ -884,6 +882,13 @@ - LIBSUBDIRS += pydoc_data +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -939,7 +939,6 @@ + encodings compiler hotshot \ + email email/mime \ + json \ +- sqlite3 \ + logging bsddb csv importlib wsgiref \ + ctypes ctypes/macholib idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ +@@ -955,7 +954,6 @@ + test/tracedmodules \ + email/test email/test/data \ + json/tests \ +- sqlite3/test \ + bsddb/test \ + ctypes/test \ + distutils/tests \ +@@ -977,6 +975,11 @@ + lib2to3/tests/data/fixers/myfixes endif +ifeq (@SQLITE3@,yes) +LIBSUBDIRS += sqlite3 -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += sqlite3/test -+endif ++TESTSUBDIRS += sqlite3/test +endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c diff --git a/package/python/python-2.7-104-optional-tk.patch b/package/python/python-104-optional-tk.patch similarity index 59% rename from package/python/python-2.7-104-optional-tk.patch rename to package/python/python-104-optional-tk.patch index 9333e33a62..3e0dd16002 100644 --- a/package/python/python-2.7-104-optional-tk.patch +++ b/package/python/python-104-optional-tk.patch @@ -8,49 +8,49 @@ Signed-off-by: Samuel Martin configure.in | 9 +++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -856,7 +856,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -934,8 +934,7 @@ plat-mac/lib-scriptpackages/SystemEvents \ - plat-mac/lib-scriptpackages/Terminal + plat-mac/lib-scriptpackages/Terminal PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages --LIBSUBDIRS= lib-tk site-packages \ +-LIBSUBDIRS= lib-tk \ +- site-packages \ +LIBSUBDIRS= site-packages \ encodings compiler hotshot \ email email/mime \ json \ -@@ -870,8 +870,7 @@ +@@ -947,9 +946,7 @@ + lib-old \ curses $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) --LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -- lib-tk/test/test_ttk test test/data \ -+LIBSUBDIRS += test test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules email/test email/test/data \ - json/tests sqlite3/test bsddb/test \ -@@ -899,6 +898,14 @@ - endif +-TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ +- lib-tk/test/test_ttk \ +- test test/audiodata test/data \ ++TESTSUBDIRS = test test/audiodata test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ + test/tracedmodules \ + email/test email/test/data \ +@@ -980,6 +977,12 @@ + TESTSUBDIRS += sqlite3/test endif +ifeq (@TK@,yes) +LIBSUBDIRS += lib-tk -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ ++TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ + lib-tk/test/test_ttk +endif -+endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2416,6 +2416,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2622,6 +2622,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python/python-2.7-105-optional-curses.patch b/package/python/python-105-optional-curses.patch similarity index 75% rename from package/python/python-2.7-105-optional-curses.patch rename to package/python/python-105-optional-curses.patch index 7f8da7c8a2..2ae4989be4 100644 --- a/package/python/python-2.7-105-optional-curses.patch +++ b/package/python/python-105-optional-curses.patch @@ -8,21 +8,21 @@ Signed-off-by: Samuel Martin configure.in | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -867,7 +867,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -944,7 +944,7 @@ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ - curses $(MACHDEPS) + $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += test test/data \ -@@ -906,6 +906,10 @@ - endif + TESTSUBDIRS = test test/audiodata test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ +@@ -983,6 +983,10 @@ + lib-tk/test/test_ttk endif +ifeq (@CURSES@,yes) @@ -32,11 +32,11 @@ Index: Python-2.7.2/Makefile.pre.in libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2425,6 +2425,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2631,6 +2631,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" fi diff --git a/package/python/python-2.7-106-optional-expat.patch b/package/python/python-106-optional-expat.patch similarity index 84% rename from package/python/python-2.7-106-optional-expat.patch rename to package/python/python-106-optional-expat.patch index 2d8ae74e2b..9eee2cd972 100644 --- a/package/python/python-2.7-106-optional-expat.patch +++ b/package/python/python-106-optional-expat.patch @@ -15,20 +15,20 @@ Signed-off-by: Samuel Martin setup.py | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -863,7 +863,7 @@ - sqlite3 \ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -940,7 +940,7 @@ + json \ logging bsddb csv importlib wsgiref \ ctypes ctypes/macholib idlelib idlelib/Icons \ -- distutils distutils/command $(XMLLIBSUBDIRS) \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ + distutils distutils/command \ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ -@@ -910,6 +910,10 @@ +@@ -987,6 +987,10 @@ LIBSUBDIRS += curses endif @@ -39,11 +39,11 @@ Index: Python-2.7.2/Makefile.pre.in libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2102,13 +2102,21 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2278,13 +2278,21 @@ AC_SUBST(DISABLED_EXTENSIONS) # Check for use of the system expat library @@ -70,11 +70,11 @@ Index: Python-2.7.2/configure.in # Check for use of the system libffi library AC_MSG_CHECKING(for --with-system-ffi) -Index: Python-2.7.2/setup.py +Index: b/setup.py =================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -1403,7 +1403,7 @@ +--- a/setup.py ++++ b/setup.py +@@ -1457,7 +1457,7 @@ # # More information on Expat can be found at www.libexpat.org. # diff --git a/package/python/python-2.7-107-optional-codecs-cjk.patch b/package/python/python-107-optional-codecs-cjk.patch similarity index 84% rename from package/python/python-2.7-107-optional-codecs-cjk.patch rename to package/python/python-107-optional-codecs-cjk.patch index 8ba61fe082..1b3acac637 100644 --- a/package/python/python-2.7-107-optional-codecs-cjk.patch +++ b/package/python/python-107-optional-codecs-cjk.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2424,6 +2424,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2630,6 +2630,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python/python-2.7-108-optional-nis.patch b/package/python/python-108-optional-nis.patch similarity index 85% rename from package/python/python-2.7-108-optional-nis.patch rename to package/python/python-108-optional-nis.patch index 212f8d6ca5..8749dfcfb1 100644 --- a/package/python/python-2.7-108-optional-nis.patch +++ b/package/python/python-108-optional-nis.patch @@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2430,6 +2430,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2636,6 +2636,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" fi]) diff --git a/package/python/python-2.7-109-optional-unicodedata.patch b/package/python/python-109-optional-unicodedata.patch similarity index 83% rename from package/python/python-2.7-109-optional-unicodedata.patch rename to package/python/python-109-optional-unicodedata.patch index 229ba8c064..2d78818ada 100644 --- a/package/python/python-2.7-109-optional-unicodedata.patch +++ b/package/python/python-109-optional-unicodedata.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2436,6 +2436,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2642,6 +2642,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-110-optional-db.patch b/package/python/python-110-optional-db.patch similarity index 75% rename from package/python/python-2.7-110-optional-db.patch rename to package/python/python-110-optional-db.patch index b32eea970f..ea756daa8f 100644 --- a/package/python/python-2.7-110-optional-db.patch +++ b/package/python/python-110-optional-db.patch @@ -12,47 +12,44 @@ Signed-off-by: Samuel Martin configure.in | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) -Index: Python-2.7.2/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -861,7 +861,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -938,7 +938,7 @@ + encodings compiler hotshot \ email email/mime \ json \ - sqlite3 \ - logging bsddb csv importlib wsgiref \ + logging csv importlib wsgiref \ ctypes ctypes/macholib idlelib idlelib/Icons \ distutils distutils/command \ multiprocessing multiprocessing/dummy \ -@@ -873,7 +873,7 @@ - LIBSUBDIRS += test test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules email/test email/test/data \ -- json/tests bsddb/test \ -+ json/tests \ - ctypes/test distutils/tests unittest/test - endif - -@@ -914,6 +914,13 @@ +@@ -951,7 +951,6 @@ + test/tracedmodules \ + email/test email/test/data \ + json/tests \ +- bsddb/test \ + ctypes/test \ + distutils/tests \ + unittest/test +@@ -991,6 +990,11 @@ LIBSUBDIRS += $(XMLLIBSUBDIRS) endif +ifeq (@BSDDB@,yes) +LIBSUBDIRS += bsddb -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += bsddb/test -+endif ++TESTSUBDIRS += bsddb/test +endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2436,6 +2436,28 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2642,6 +2642,28 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-111-optional-ssl.patch b/package/python/python-111-optional-ssl.patch similarity index 83% rename from package/python/python-2.7-111-optional-ssl.patch rename to package/python/python-111-optional-ssl.patch index 5885b4eec7..8d4599d8b6 100644 --- a/package/python/python-2.7-111-optional-ssl.patch +++ b/package/python/python-111-optional-ssl.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2436,6 +2436,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2642,6 +2642,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-112-optional-bzip2.patch b/package/python/python-112-optional-bzip2.patch similarity index 83% rename from package/python/python-2.7-112-optional-bzip2.patch rename to package/python/python-112-optional-bzip2.patch index 83a2479116..ba7dbaa56d 100644 --- a/package/python/python-2.7-112-optional-bzip2.patch +++ b/package/python/python-112-optional-bzip2.patch @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2442,6 +2442,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2648,6 +2648,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl" fi]) diff --git a/package/python/python-2.7-113-optional-zlib.patch b/package/python/python-113-optional-zlib.patch similarity index 84% rename from package/python/python-2.7-113-optional-zlib.patch rename to package/python/python-113-optional-zlib.patch index f24eb17265..19f100bc61 100644 --- a/package/python/python-2.7-113-optional-zlib.patch +++ b/package/python/python-113-optional-zlib.patch @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.2/configure.in +Index: b/configure.ac =================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2448,6 +2448,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2654,6 +2654,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2" fi]) diff --git a/package/python/python-2.7-001-support-for-build.patch b/package/python/python-2.7-001-support-for-build.patch deleted file mode 100644 index b0430a4efa..0000000000 --- a/package/python/python-2.7-001-support-for-build.patch +++ /dev/null @@ -1,154 +0,0 @@ -Add support in Python build system to specify host tools - -Python needs a Python interpreter and a "pgen" program to build -itself. Unfortunately, the Python build system assumes that it can use -the interpreter and pgen program it has just built to build -itself. Obviously, this cannot work in cross-compilation mode since -the interpreter and the pgen program have been built for the target. - -Therefore, this patch adds support in the Python build system for the -new PYTHON_FOR_BUILD and PGEN_FOR_BUILD variables, so that we can -point Python ./configure script to the Python interpreter and pgen -program that have been previously built for the host. - -Patch ported to python2.7 by Maxime Ripard , and -later significantly reworked by Thomas Petazzoni -, with some inspiration taken -from the Python patches of the PTXdist project. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.pre.in | 32 +++++++++++++++++--------------- - configure.in | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+), 15 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -181,7 +181,8 @@ - UNICODE_OBJS= @UNICODE_OBJS@ - - PYTHON= python$(EXE) --BUILDPYTHON= python$(BUILDEXE) -+BUILDPYTHON= ./python$(BUILDEXE) -+PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ - - # The task to run while instrument when building the profile-opt target - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -@@ -213,7 +214,8 @@ - - ########################################################################## - # Parser --PGEN= Parser/pgen$(EXE) -+BUILDPGEN= Parser/pgen$(EXE) -+PGEN_FOR_BUILD=@PGEN_FOR_BUILD@ - - POBJS= \ - Parser/acceler.o \ -@@ -407,8 +409,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -540,13 +542,13 @@ - - # Use a stamp file to prevent make -j invoking pgen twice - $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp --Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) -+Parser/pgen.stamp: $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) - -@$(INSTALL) -d Include -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - -touch Parser/pgen.stamp - --$(PGEN): $(PGENOBJS) -- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) -+$(BUILDPGEN): $(PGENOBJS) -+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(BUILDPGEN) - - Parser/grammar.o: $(srcdir)/Parser/grammar.c \ - $(srcdir)/Include/token.h \ -@@ -926,25 +928,25 @@ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ -+ $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" -+ $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" - - # Create the PLATDIR source directory, if one wasn't distributed.. - $(srcdir)/Lib/$(PLATDIR): -@@ -1049,7 +1051,7 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -@@ -1188,7 +1190,7 @@ - find . -name '*.gc??' -exec rm -f {} ';' - - clobber: clean profile-removal -- -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ -+ -rm -f $(BUILDPYTHON) $(BUILDPGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ - tags TAGS Parser/pgen.stamp \ - config.cache config.log pyconfig.h Modules/config.c - -rm -rf build platform -Index: Python-2.7.2/configure.in -=================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -4305,6 +4305,23 @@ - done - AC_MSG_RESULT(done) - -+if test "$cross_compiling" = "yes"; then -+ AC_MSG_CHECKING(python for build) -+ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD}" -+ AC_MSG_RESULT($PYTHON_FOR_BUILD) -+ AC_MSG_CHECKING(pgen for build) -+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}" -+ AC_MSG_RESULT($PGEN_FOR_BUILD) -+else -+ PYTHON_FOR_BUILD='$(BUILDPYTHON)' -+ PGEN_FOR_BUILD='$(BUILDPGEN)' -+fi -+ -+AC_SUBST(PYTHON_FOR_BUILD) -+AC_SUBST(PGEN_FOR_BUILD) -+AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) -+AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) -+ - # generate output files - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) diff --git a/package/python/python-2.7-002-cross-compile-variable.patch b/package/python/python-2.7-002-cross-compile-variable.patch deleted file mode 100644 index f91ee7122c..0000000000 --- a/package/python/python-2.7-002-cross-compile-variable.patch +++ /dev/null @@ -1,55 +0,0 @@ -Pass a CROSS_COMPILING variable to setup.py - -The setup.py script in the Python source code plays a significant role -in the Python build process. It is responsible for building all the -modules and extensions, and due to this, does various checks that need -to be adjusted when we are cross-compiling. - -For that reason, this patch makes sure that a CROSS_COMPILING variable -is passed in the environment of the setup.py script. Later patches in -the stack make use of this variable. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.pre.in | 6 +++--- - configure.in | 3 +++ - 2 files changed, 6 insertions(+), 3 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -409,8 +409,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -1051,7 +1051,7 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.2/configure.in -=================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -4322,6 +4322,9 @@ - AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) - AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) - -+CROSS_COMPILING=$cross_compiling -+AC_SUBST(CROSS_COMPILING) -+ - # generate output files - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) diff --git a/package/python/python-2.7-003-no-import-when-cross-compiling.patch b/package/python/python-2.7-003-no-import-when-cross-compiling.patch deleted file mode 100644 index 17d67024d4..0000000000 --- a/package/python/python-2.7-003-no-import-when-cross-compiling.patch +++ /dev/null @@ -1,26 +0,0 @@ -Disable import check when cross-compiling - -Once Python has compiled an extension (i.e some C code, potentially -linked to a library), it tries to import it. This cannot work in -cross-compilation mode, so we just disable this check. - -Signed-off-by: Thomas Petazzoni ---- - setup.py | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -304,6 +304,10 @@ - self.announce('WARNING: skipping import check for Cygwin-based "%s"' - % ext.name) - return -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ self.announce('WARNING: skipping import check for cross compiled "%s"' -+ % ext.name) -+ return - ext_filename = os.path.join( - self.build_lib, - self.get_ext_filename(self.get_ext_fullname(ext.name))) diff --git a/package/python/python-2.7-004-no-host-headers-libs.patch b/package/python/python-2.7-004-no-host-headers-libs.patch deleted file mode 100644 index c0c528aceb..0000000000 --- a/package/python/python-2.7-004-no-host-headers-libs.patch +++ /dev/null @@ -1,111 +0,0 @@ -Do not look at host headers/libraries in cross-compile mode - -When we are cross-compiling, setup.py should never look in /usr or -/usr/local to find headers or libraries. A later patch adds a -mechanism to tell setup.py to look in a specific directory for headers -and libraries. - -Signed-off-by: Thomas Petazzoni ---- - setup.py | 39 +++++++++++++++++++++------------------ - 1 file changed, 21 insertions(+), 18 deletions(-) - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -373,9 +373,10 @@ - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- self.add_multiarch_paths() -+ if os.environ.get('CROSS_COMPILING') != 'yes': -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -383,10 +384,7 @@ - # directly since an inconsistently reproducible issue comes up where - # the environment variable is not set even though the value were passed - # into configure and stored in the Makefile (issue found on OS X 10.3). -- for env_var, arg_name, dir_list in ( -- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), -- ('LDFLAGS', '-L', self.compiler.library_dirs), -- ('CPPFLAGS', '-I', self.compiler.include_dirs)): -+ for env_var, arg_name, dir_list in (): - env_val = sysconfig.get_config_var(env_var) - if env_val: - # To prevent optparse from raising an exception about any -@@ -411,17 +409,6 @@ - for directory in reversed(options.dirs): - add_dir_to_list(dir_list, directory) - -- if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework -- # (PYTHONFRAMEWORK is set) to avoid # linking problems when -- # building a framework with different architectures than -- # the one that is currently installed (issue #7473) -- add_dir_to_list(self.compiler.library_dirs, -- sysconfig.get_config_var("LIBDIR")) -- add_dir_to_list(self.compiler.include_dirs, -- sysconfig.get_config_var("INCLUDEDIR")) -- - try: - have_unicode = unicode - except NameError: -@@ -430,11 +417,16 @@ - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -- lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -- ] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs -+ -+ if os.environ.get('CROSS_COMPILING') != 'yes': -+ lib_dirs += [ -+ '/lib64', '/usr/lib64', -+ '/lib', '/usr/lib', -+ ] -+ inc_dirs += ['/usr/include'] -+ - exts = [] - missing = [] - -@@ -867,6 +859,9 @@ - db_inc_paths.append('/pkg/db-3.%d/include' % x) - db_inc_paths.append('/opt/db-3.%d/include' % x) - -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ db_inc_paths = [] -+ - # Add some common subdirectories for Sleepycat DB to the list, - # based on the standard include directories. This way DB3/4 gets - # picked up when it is installed in a non-standard prefix and -@@ -1019,6 +1014,9 @@ - MIN_SQLITE_VERSION = ".".join([str(x) - for x in MIN_SQLITE_VERSION_NUMBER]) - -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ sqlite_inc_paths = [] -+ - # Scan the default include directories before the SQLite specific - # ones. This allows one to override the copy of sqlite on OSX, - # where /usr/include contains an old version of sqlite. -@@ -1118,6 +1116,8 @@ - # the more recent berkeleydb's db.h file first in the include path - # when attempting to compile and it will fail. - f = "/usr/include/db.h" -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ f = '' - - if sys.platform == 'darwin': - if is_macosx_sdk_path(f): diff --git a/package/python/python-2.7-005-staging-headers-libs.patch b/package/python/python-2.7-005-staging-headers-libs.patch deleted file mode 100644 index cd378f28c1..0000000000 --- a/package/python/python-2.7-005-staging-headers-libs.patch +++ /dev/null @@ -1,38 +0,0 @@ -Tell setup.py the location of headers/libraries - -Allow the libraries detection routine to look for headers and libs in -other directories than /usr/include or /usr/lib through the -environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB. - -We can then use it to look for libraries in the buildroot staging -directory. - -Patch ported to python2.7 by Maxime Ripard ---- - setup.py | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -372,6 +372,19 @@ - os.unlink(tmpfile) - - def detect_modules(self): -+ try: -+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() -+ except KeyError: -+ modules_include_dirs = ['/usr/include'] -+ try: -+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split() -+ except KeyError: -+ modules_lib_dirs = ['/usr/lib'] -+ for dir in modules_include_dirs: -+ add_dir_to_list(self.compiler.include_dirs, dir) -+ for dir in modules_lib_dirs: -+ add_dir_to_list(self.compiler.library_dirs, dir) -+ - # Ensure that /usr/local is always used - if os.environ.get('CROSS_COMPILING') != 'yes': - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') diff --git a/package/python/python-2.7-006-disable-extensions.patch b/package/python/python-2.7-006-disable-extensions.patch deleted file mode 100644 index f62a50fb51..0000000000 --- a/package/python/python-2.7-006-disable-extensions.patch +++ /dev/null @@ -1,102 +0,0 @@ -Add infrastructure to disable the build of certain extensions - -Some of the extensions part of the Python core have dependencies on -external libraries (sqlite, tk, etc.) or are relatively big and not -necessarly always useful (CJK codecs for example). By extensions, we -mean part of Python modules that are written in C and therefore -compiled to binary code. - -Therefore, we introduce a small infrastructure that allows to disable -some of those extensions. This can be done inside the configure.in by -adding values to the DISABLED_EXTENSIONS variable (which is a -word-separated list of extensions). - -The implementation works as follow : - - * configure.in defines a DISABLED_EXTENSIONS variable, which is - substituted (so that when Makefile.pre is generated from - Makefile.pre.in, the value of the variable is substituted). For - now, this DISABLED_EXTENSIONS variable is empty, later patches will - use it. - - * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the - variables passed in the environment when calling the setup.py - script that actually builds and installs those extensions. - - * setup.py is modified so that the existing "disabled_module_list" is - filled with those pre-disabled extensions listed in - DISABLED_EXTENSIONS. - -Patch ported to python2.7 by Maxime Ripard , and -then extended by Thomas Petazzoni -. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.pre.in | 8 +++++--- - configure.in | 2 ++ - setup.py | 5 ++++- - 3 files changed, 11 insertions(+), 4 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -144,6 +144,8 @@ - # configure script arguments - CONFIG_ARGS= @CONFIG_ARGS@ - -+# disabled extensions -+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ - - # Subdirectories with code - SRCDIRS= @SRCDIRS@ -@@ -409,8 +411,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -1051,7 +1053,7 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.2/configure.in -=================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -2098,6 +2098,8 @@ - - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) - -+AC_SUBST(DISABLED_EXTENSIONS) -+ - # Check for use of the system expat library - AC_MSG_CHECKING(for --with-system-expat) - AC_ARG_WITH(system_expat, -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -21,7 +21,10 @@ - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') - - # This global variable is used to hold the list of modules to be disabled. --disabled_module_list = [] -+try: -+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") -+except KeyError: -+ disabled_module_list = list() - - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (at the front) if diff --git a/package/python/python-2.7-007-do-not-generate-pyo-files.patch b/package/python/python-2.7-007-do-not-generate-pyo-files.patch deleted file mode 100644 index 4ae5ef5d6a..0000000000 --- a/package/python/python-2.7-007-do-not-generate-pyo-files.patch +++ /dev/null @@ -1,40 +0,0 @@ -Do not generate .pyo files - -By default, the Python installation byte-compiles all modules in two -forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo). - -According to -http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html, -the optimization do not do anything useful, and generating both the -"non-optimized" and "optimized" bytecode variants takes time. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.pre.in | 9 --------- - 1 file changed, 9 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -934,20 +934,11 @@ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" - - # Create the PLATDIR source directory, if one wasn't distributed.. diff --git a/package/python/python-2.7-008-reread-environment.patch b/package/python/python-2.7-008-reread-environment.patch deleted file mode 100644 index 4ca22a4c9a..0000000000 --- a/package/python/python-2.7-008-reread-environment.patch +++ /dev/null @@ -1,65 +0,0 @@ -Make sure setup.py reads the correct CONFIG_ARGS - -The setup.py script that builds and installs all the Python modules -shipped with the interpreter looks at the CONFIG_ARGS variable stored -in the "sysconfig" module to look at the ./configure options and -adjust its behaviour accordingly. - -Unfortunately, when cross-compiling, the value of CONFIG_ARGS returned -by the sysconfig are the one passed to the ./configure script of the -*host* Python and not the one we're currently building for the target. - -In order to avoid that, we re-initialize the values in the sysconfig -module by re-reading the environment at the beginning of the setup.py -script, and we make sure that the CONFIG_ARGS variable is actually -part of the environment of setup.py. - -See the beginning of -http://article.gmane.org/gmane.comp.python.devel/99772 for the -inspiration. - -Signed-off-by: Thomas Petazzoni - ---- - Makefile.pre.in | 6 +++--- - setup.py | 3 +++ - 2 files changed, 6 insertions(+), 3 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -411,8 +411,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -1044,7 +1044,7 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -20,6 +20,9 @@ - # Were we compiled --with-pydebug or with #define Py_DEBUG? - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') - -+sysconfig.get_config_vars() -+sysconfig._CONFIG_VARS.update(os.environ) -+ - # This global variable is used to hold the list of modules to be disabled. - try: - disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") diff --git a/package/python/python-2.7-010-change-pyconfig-h-location.patch b/package/python/python-2.7-010-change-pyconfig-h-location.patch deleted file mode 100644 index 9b95ddb151..0000000000 --- a/package/python/python-2.7-010-change-pyconfig-h-location.patch +++ /dev/null @@ -1,76 +0,0 @@ -Change the location of pyconfig.h - -The Python interpreter has a really strange behaviour: at *runtime*, -it reads a Makefile and a header file named pyconfig.h to get some -information about the configuration. - -The Makefile is located in usr/lib/python2.7/config, which is fine -since this location is kept on the target. - -However, by default, the pyconfig.h is installed in -usr/include/python2.7, but we completely remove the usr/include -directory for the target. Since making an exception just for -pyconfig.h is annoying, this patch also installs pyconfig.h to -usr/lib/python2.7/config, and modifies the sysconfig module so that it -looks in this location instead of usr/include. - -The pyconfig.h is still kept in usr/include/python2.7, because it is -needed in the $(STAGING_DIR) when building third-party Python -extensions that contain C code. - -Signed-off-by: Thomas Petazzoni - ---- - Lib/distutils/sysconfig.py | 3 ++- - Lib/sysconfig.py | 2 +- - Makefile.pre.in | 3 ++- - 3 files changed, 5 insertions(+), 3 deletions(-) - -Index: Python-2.7.2/Lib/distutils/sysconfig.py -=================================================================== ---- Python-2.7.2.orig/Lib/distutils/sysconfig.py -+++ Python-2.7.2/Lib/distutils/sysconfig.py -@@ -193,7 +193,8 @@ - else: - inc_dir = project_base - else: -- inc_dir = get_python_inc(plat_specific=1) -+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1) -+ inc_dir = os.path.join(lib_dir, "config") - if get_python_version() < '2.2': - config_h = 'config.h' - else: -Index: Python-2.7.2/Lib/sysconfig.py -=================================================================== ---- Python-2.7.2.orig/Lib/sysconfig.py -+++ Python-2.7.2/Lib/sysconfig.py -@@ -356,7 +356,7 @@ - else: - inc_dir = _PROJECT_BASE - else: -- inc_dir = get_path('platinclude') -+ inc_dir = os.path.join(get_path('stdlib'), "config") - return os.path.join(inc_dir, 'pyconfig.h') - - def get_scheme_names(): -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -972,7 +972,6 @@ - echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ - $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ - done -- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h - - # Install the library and miscellaneous stuff needed for extending/embedding - # This goes into $(exec_prefix) -@@ -1006,6 +1005,8 @@ - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in - $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h - $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup - $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local - $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config diff --git a/package/python/python-2.7-011-no-rpath.patch b/package/python/python-2.7-011-no-rpath.patch deleted file mode 100644 index 3422dceaab..0000000000 --- a/package/python/python-2.7-011-no-rpath.patch +++ /dev/null @@ -1,75 +0,0 @@ -Remove runtime library paths - -For some extensions (bsddb, sqlite and dbm), Python setup.py script -hardcode a runtime path (rpath) into the extension. However, this -runtime path is incorrect (because it points to the location of the -library directory on the development machine) and useless (because on -the target, all useful libraries are in a standard directory searched -by the dynamic loader). For those reasons, we just get rid of the -runtime paths in cross-compilation mode. - -Signed-off-by: Thomas Petazzoni ---- - setup.py | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -997,6 +997,12 @@ - print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir - db_incs = [db_incdir] - dblibs = [dblib] -+ -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ bsddb_runtime_library_dir = None -+ else: -+ bsddb_runtime_library_dir = dblib_dir -+ - # We add the runtime_library_dirs argument because the - # BerkeleyDB lib we're linking against often isn't in the - # system dynamic library search path. This is usually -@@ -1006,7 +1012,7 @@ - exts.append(Extension('_bsddb', ['_bsddb.c'], - depends = ['bsddb.h'], - library_dirs=dblib_dir, -- runtime_library_dirs=dblib_dir, -+ runtime_library_dirs=bsddb_runtime_library_dir, - include_dirs=db_incs, - libraries=dblibs)) - else: -@@ -1112,12 +1118,17 @@ - else: - sqlite_extra_link_args = () - -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ sqlite_runtime_library_dirs = None -+ else: -+ sqlite_runtime_library_dirs = sqlite_libdir -+ - exts.append(Extension('_sqlite3', sqlite_srcs, - define_macros=sqlite_defines, - include_dirs=["Modules/_sqlite", - sqlite_incdir], - library_dirs=sqlite_libdir, -- runtime_library_dirs=sqlite_libdir, -+ runtime_library_dirs=sqlite_runtime_library_dirs, - extra_link_args=sqlite_extra_link_args, - libraries=["sqlite3",])) - else: -@@ -1218,9 +1229,13 @@ - elif cand == "bdb": - if db_incs is not None: - print "building dbm using bdb" -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ db_runtime_library_dir = None -+ else: -+ db_runtime_library_dir = dblib_dir - dbmext = Extension('dbm', ['dbmmodule.c'], - library_dirs=dblib_dir, -- runtime_library_dirs=dblib_dir, -+ runtime_library_dirs=db_runtime_library_dir, - include_dirs=db_incs, - define_macros=[ - ('HAVE_BERKDB_H', None), diff --git a/package/python/python-2.7-012-correct-32bit-64bit-check.patch b/package/python/python-2.7-012-correct-32bit-64bit-check.patch deleted file mode 100644 index bfccbfd292..0000000000 --- a/package/python/python-2.7-012-correct-32bit-64bit-check.patch +++ /dev/null @@ -1,55 +0,0 @@ -Use correct mechanism to determine 32/64 bits - -Python setup.py builds certain extensions (dl and imageop) only on 32 -bits architecture. However, to test whether the architecture is 32 -bits or not, it was looking at the sys.maxint value of the host Python -interpreter... which might run on a 64 bits architecture even though -the target is 32 bits, or which might run on a 32 bits architecture -even though the target is 64 bits. - -Therefore, we introduce a is_arch_64_bits() function, which looks at -the pyconfig.h file generated by ./configure for the value of -SIZEOF_LONG to determine if the architecture is 32 or 64 bits. - -Signed-off-by: Thomas Petazzoni ---- - setup.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -29,6 +29,14 @@ - except KeyError: - disabled_module_list = list() - -+def is_arch_64_bits(): -+ data = open('pyconfig.h').read() -+ m = re.search(r"#s*define\s+SIZEOF_LONG\s+4\s*", data) -+ if m is None: -+ return True -+ else: -+ return False -+ - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (at the front) if - 1) 'dir' is not already in 'dirlist' -@@ -628,7 +636,7 @@ - exts.append( Extension('audioop', ['audioop.c']) ) - - # Disabled on 64-bit platforms -- if sys.maxint != 9223372036854775807L: -+ if not is_arch_64_bits(): - # Operations on images - exts.append( Extension('imageop', ['imageop.c']) ) - else: -@@ -1444,7 +1452,7 @@ - missing.append('_codecs_%s' % loc) - - # Dynamic loading module -- if sys.maxint == 0x7fffffff: -+ if not is_arch_64_bits(): - # This requires sizeof(int) == sizeof(long) == sizeof(char*) - dl_inc = find_file('dlfcn.h', [], inc_dirs) - if (dl_inc is not None) and (platform not in ['atheos']): diff --git a/package/python/python-2.7-013-fix-linux-3-compilation.patch b/package/python/python-2.7-013-fix-linux-3-compilation.patch deleted file mode 100644 index e834b9f172..0000000000 --- a/package/python/python-2.7-013-fix-linux-3-compilation.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: Python-2.7.2/configure -=================================================================== ---- Python-2.7.2.orig/configure -+++ Python-2.7.2/configure -@@ -3007,6 +3007,7 @@ - darwin*) MACHDEP="darwin";; - atheos*) MACHDEP="atheos";; - irix646) MACHDEP="irix6";; -+ linux*) MACHDEP="linux2";; - '') MACHDEP="unknown";; - esac - fi -Index: Python-2.7.2/configure.in -=================================================================== ---- Python-2.7.2.orig/configure.in -+++ Python-2.7.2/configure.in -@@ -297,6 +297,7 @@ - darwin*) MACHDEP="darwin";; - atheos*) MACHDEP="atheos";; - irix646) MACHDEP="irix6";; -+ linux*) MACHDEP="linux2";; - '') MACHDEP="unknown";; - esac - fi diff --git a/package/python/python-2.7-014-verbose-module-build.patch b/package/python/python-2.7-014-verbose-module-build.patch deleted file mode 100644 index ea81e55b8d..0000000000 --- a/package/python/python-2.7-014-verbose-module-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -Enables verbose output when building modules - -Patch borrowed from OpenBricks. - -Signed-off-by: Thomas Petazzoni - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -411,7 +411,7 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - diff --git a/package/python/python-2.7-015-distutils-cross-compilation-support.patch b/package/python/python-2.7-015-distutils-cross-compilation-support.patch deleted file mode 100644 index 7fd404e54e..0000000000 --- a/package/python/python-2.7-015-distutils-cross-compilation-support.patch +++ /dev/null @@ -1,125 +0,0 @@ -Add some cross-compilation fixes to distutils - -Inspired by work done by Marc Kleine-Budde in -PTXdist. - -Signed-off-by: Thomas Petazzoni ---- - Lib/distutils/sysconfig.py | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) - -Index: b/Lib/distutils/sysconfig.py -=================================================================== ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -18,14 +18,38 @@ - - from distutils.errors import DistutilsPlatformError - --# These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+if os.environ.get('CROSS_COMPILING') == 'yes': -+ _sysroot=os.environ.get('_python_sysroot') -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+ # In the cross-compilation case, we have two cases: -+ # -+ # 1/ We're currently cross-compiling Python itself. In this case, -+ # EXECUTABLE_DIRNAME should point to the source directory of the -+ # target Python, so that the rest of the code, especially the -+ # _python_build() function will properly understand that we are -+ # building Python itself. In this case, _python_srcdir is -+ # defined. -+ # -+ # 2/ We're currently cross-compiling third party Python -+ # modules. In this case, EXECUTABLE_DIRNAME should point to where -+ # the target python executable is installed in the sysroot, so -+ # that the proper Makefile is going to be read. In this case, -+ # _python_srcdir is not defined. -+ # -+ if os.environ.get('_python_srcdir') is not None: -+ EXECUTABLE_DIRNAME = os.environ.get('_python_srcdir') -+ else: -+ EXECUTABLE_DIRNAME = os.path.join(_sysroot, "usr/bin") -+else: -+ PREFIX = os.path.normpath(sys.prefix) -+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+ EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable)) - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. --project_base = os.path.dirname(os.path.abspath(sys.executable)) -+project_base = EXECUTABLE_DIRNAME - if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) - # PC/VS7.1 -@@ -74,7 +98,7 @@ - - if os.name == "posix": - if python_build: -- buildir = os.path.dirname(sys.executable) -+ buildir = EXECUTABLE_DIRNAME - if plat_specific: - # python.h is located in the buildir - inc_dir = buildir -@@ -245,7 +269,7 @@ - def get_makefile_filename(): - """Return full pathname of installed Makefile from the Python build.""" - if python_build: -- return os.path.join(os.path.dirname(sys.executable), "Makefile") -+ return os.path.join(EXECUTABLE_DIRNAME, "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - return os.path.join(lib_dir, "config", "Makefile") - -@@ -311,6 +335,11 @@ - # `$$' is a literal `$' in make - tmpv = v.replace('$$', '') - -+ # Adjust prefix and exec_prefix when we're cross compiling -+ if os.environ.get('CROSS_COMPILING') == "yes": -+ if n == "prefix" or n == "exec_prefix": -+ v = _sysroot + v -+ - if "$" in tmpv: - notdone[n] = v - else: -Index: b/configure.in -=================================================================== ---- a/configure.in -+++ b/configure.in -@@ -4342,6 +4342,20 @@ - CROSS_COMPILING=$cross_compiling - AC_SUBST(CROSS_COMPILING) - -+# -+# Cross compiling -+# -+# special RUNSHARED -+if test "$cross_compiling" = "yes"; then -+ RUNSHARED="\ -+ CROSS_COMPILING=yes \ -+ _python_cross_host=${ac_cv_host} \ -+ _python_srcdir=\"\$(srcdir)\" \ -+ _python_prefix=\"\$(prefix)\" \ -+ _python_exec_prefix=\"\$(exec_prefix)\"" -+fi -+ -+ - # generate output files - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) -Index: b/Lib/distutils/command/build_ext.py -=================================================================== ---- a/Lib/distutils/command/build_ext.py -+++ b/Lib/distutils/command/build_ext.py -@@ -237,7 +237,7 @@ - if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') - or sys.platform.startswith('sunos')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): -- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): -+ if not sysconfig.python_build: - # building third party extensions - self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) - else: diff --git a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch b/package/python/python-2.7-016-cross-compile-getaddrinfo.patch deleted file mode 100644 index dae300577d..0000000000 --- a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support - -Signed-off-by: Vanya Sergeev - ---- python-2.7.2.orig/configure.in 2012-04-22 06:52:09.361809545 -0400 -+++ python-2.7.2/configure.in 2012-04-22 06:56:37.900634194 -0400 -@@ -3128,7 +3128,7 @@ - - AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) - --if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes -+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes - then - if test $ipv6 = yes - then diff --git a/package/python/python.mk b/package/python/python.mk index f2e48c4e5d..0469820a68 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -5,16 +5,15 @@ ################################################################################ PYTHON_VERSION_MAJOR = 2.7 -PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).3 +PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).6 PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION) PYTHON_LICENSE = Python software foundation license v2, others PYTHON_LICENSE_FILES = LICENSE -# Python needs itself and a "pgen" program to build itself, both being -# provided in the Python sources. So in order to cross-compile Python, -# we need to build a host Python first. This host Python is also -# installed in $(HOST_DIR), as it is needed when cross-compiling +# Python needs itself to be built, so in order to cross-compile +# Python, we need to build a host Python first. This host Python is +# also installed in $(HOST_DIR), as it is needed when cross-compiling # third-party Python modules. HOST_PYTHON_CONF_OPT += \ @@ -32,12 +31,8 @@ HOST_PYTHON_CONF_OPT += \ --disable-bsddb \ --disable-test-modules \ --disable-bz2 \ - --disable-ssl - -HOST_PYTHON_MAKE_ENV = \ - PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \ - PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib" - + --disable-ssl \ + --disable-pyo-build # Building host python in parallel sometimes triggers a "Bus error" # during the execution of "./python setup.py build" in the @@ -51,12 +46,6 @@ PYTHON_DEPENDENCIES = host-python libffi HOST_PYTHON_DEPENDENCIES = host-expat host-zlib -define HOST_PYTHON_INSTALL_PGEN - $(INSTALL) -m0755 -D $(@D)/Parser/pgen $(HOST_DIR)/usr/bin/python-pgen -endef - -HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PGEN - PYTHON_INSTALL_STAGING = YES ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y) @@ -124,14 +113,9 @@ PYTHON_DEPENDENCIES += openssl endif PYTHON_CONF_ENV += \ - PYTHON_FOR_BUILD=$(HOST_DIR)/usr/bin/python \ - PGEN_FOR_BUILD=$(HOST_DIR)/usr/bin/python-pgen \ - ac_cv_have_long_long_format=yes - -PYTHON_MAKE_ENV += \ - _python_sysroot=$(STAGING_DIR) \ - PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \ - PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" + ac_cv_have_long_long_format=yes \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=yes PYTHON_CONF_OPT += \ --without-cxx-main \ @@ -143,7 +127,18 @@ PYTHON_CONF_OPT += \ --disable-gdbm \ --disable-tk \ --disable-nis \ - --disable-dbm + --disable-dbm \ + --disable-pyo-build + +# This is needed to make sure the Python build process doesn't try to +# regenerate those files with the pgen program. Otherwise, it builds +# pgen for the target, and tries to run it on the host. + +define PYTHON_TOUCH_GRAMMAR_FILES + touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c +endef + +PYTHON_POST_PATCH_HOOKS += PYTHON_TOUCH_GRAMMAR_FILES # # Remove useless files. In the config/ directory, only the Makefile @@ -168,7 +163,7 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES PYTHON_AUTORECONF = YES # Provided to other packages -PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ $(eval $(autotools-package)) $(eval $(host-autotools-package)) From 6f8c85569739492ffc8c3b1e04b4ae007e5cb02a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:54 +0100 Subject: [PATCH 046/107] pkg-python: simplifications after the Python 2.x bump Thanks to the Python 2.x bump, it is no longer needed to pass PYTHONCPREFIX, and CROSS_COMPILING when building third-party Python modules. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/pkg-python.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index c423f7a5e2..a8628953bd 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -27,7 +27,6 @@ PKG_PYTHON_DISTUTILS_ENV = \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ PYTHONPATH="$(PYTHON_PATH)" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ @@ -50,8 +49,6 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ PKG_PYTHON_SETUPTOOLS_ENV = \ PATH="$(TARGET_PATH)" \ PYTHONPATH="$(PYTHON_PATH)" \ - PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ - CROSS_COMPILING=yes \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr @@ -64,8 +61,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ # Host setuptools-based packages HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH="$(HOST_PATH)" \ - PYTHONXCPREFIX="$(HOST_DIR)/usr/" + PATH="$(HOST_PATH)" HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ --prefix=$(HOST_DIR)/usr From 88b638223baf85b14d141d289ca41286c6a9e7e6 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 13 Feb 2014 21:48:55 +0100 Subject: [PATCH 047/107] core: remove .py/.pyc for Python The main Buildroot Makefile was removing *.py or *.pyc if Python 2 was enabled, but for Python 3, this action was taken care of by a post install target hook of python3.mk, which means it wouldn't work with external modules (the .py/.pyc removal would be done before external Python modules are installed). We fix this by making the global *.py/*.pyc removal in the main Makefile work for both Python 2 and Python 3. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ddb1f6ae8a..20aabd61e1 100644 --- a/Makefile +++ b/Makefile @@ -522,10 +522,10 @@ endif rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc rm -rf $(TARGET_DIR)/usr/share/gtk-doc -rmdir $(TARGET_DIR)/usr/share 2>/dev/null -ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y) +ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY)$(BR2_PACKAGE_PYTHON3_PY_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f endif -ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) +ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif rm -rf $(TARGET_DIR)/usr/lib/luarocks From fc075564085ed1ebaf19847bd6ea078ff8b992d6 Mon Sep 17 00:00:00 2001 From: Ivan Sergeev Date: Fri, 14 Feb 2014 18:42:57 -0800 Subject: [PATCH 048/107] systemd: fix sed line in "sanitize path in units" hook The expanded SED variable already contains -e, so the extra -e was being interpreted as the sed command and causing sed to fail. Signed-off-by: Ivan Sergeev Signed-off-by: Peter Korsgaard --- package/systemd/systemd.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 90860456da..36ef704c7b 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -103,7 +103,7 @@ endef define SYSTEMD_SANITIZE_PATH_IN_UNITS find $(TARGET_DIR)/lib/systemd/system -name '*.service' \ - -exec $(SED) -e 's,$(HOST_DIR),,g' {} \; + -exec $(SED) 's,$(HOST_DIR),,g' {} \; endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ From 0510e34783b871c68273479e0f5ba7295c11339d Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 17 Feb 2014 10:16:27 +0100 Subject: [PATCH 049/107] package: add vo-aacenc (aac encoder) Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/vo-aacenc/Config.in | 9 +++++++++ package/vo-aacenc/vo-aacenc.mk | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 package/vo-aacenc/Config.in create mode 100644 package/vo-aacenc/vo-aacenc.mk diff --git a/package/Config.in b/package/Config.in index b8b2f4e0a7..cb2d31bce6 100644 --- a/package/Config.in +++ b/package/Config.in @@ -483,6 +483,7 @@ source "package/portaudio/Config.in" source "package/speex/Config.in" source "package/taglib/Config.in" source "package/tremor/Config.in" +source "package/vo-aacenc/Config.in" source "package/webrtc-audio-processing/Config.in" endmenu diff --git a/package/vo-aacenc/Config.in b/package/vo-aacenc/Config.in new file mode 100644 index 0000000000..b5487dc96d --- /dev/null +++ b/package/vo-aacenc/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_VO_AACENC + bool "vo-aacenc" + help + This library contains an encoder implementation of the + Advanced Audio Coding (AAC) audio codec. The library is + based on a codec implementation by VisualOn as part of the + Stagefright framework from the Google Android project. + + http://sourceforge.net/projects/opencore-amr/ diff --git a/package/vo-aacenc/vo-aacenc.mk b/package/vo-aacenc/vo-aacenc.mk new file mode 100644 index 0000000000..8f01c34b7c --- /dev/null +++ b/package/vo-aacenc/vo-aacenc.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# vo-aacenc +# +################################################################################ + +VO_AACENC_VERSION = 0.1.3 +VO_AACENC_SITE = http://downloads.sourceforge.net/project/opencore-amr/vo-aacenc +VO_AACENC_LICENSE = Apache-2.0 +VO_AACENC_LICENSE_FILES = COPYING +VO_AACENC_INSTALL_STAGING = YES + +# arm specific asm optimizations +ifeq ($(BR2_arm),y) + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +VO_AACENC_CONF_OPT += --enable-armv7neon +# mfpu=neon needed to assemble neon code +VO_AACENC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mfpu=neon" +else +VO_AACENC_CONF_OPT += --disable-armv7neon + +ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_strongarm)$(BR2_fa526),) +VO_AACENC_CONF_OPT += --enable-armv5e +else +VO_AACENC_CONF_OPT += --disable-armv5e +endif + +endif # !neon +endif # arm + +$(eval $(autotools-package)) From d413fd4c22e041b8afe94c34bf0f5d39206ea0e4 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 17 Feb 2014 11:04:18 +0100 Subject: [PATCH 050/107] gst1-plugins-bad: add vo-aacenc option Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-bad/Config.in | 4 ++++ package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in index 407bf315c6..95d1f1346b 100644 --- a/package/gstreamer1/gst1-plugins-bad/Config.in +++ b/package/gstreamer1/gst1-plugins-bad/Config.in @@ -318,6 +318,10 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK bool "apexsink" select BR2_PACKAGE_OPENSSL +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC + bool "voaacenc" + select BR2_PACKAGE_VO_AACENC + config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2 bool "bz2" select BR2_PACKAGE_BZIP2 diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index 046f6bcf80..1ad76fe8c4 100644 --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -41,7 +41,6 @@ GST1_PLUGINS_BAD_CONF_OPT += \ --disable-uvch264 \ --disable-assrender \ --disable-voamrwbenc \ - --disable-voaacenc \ --disable-chromaprint \ --disable-dash \ --disable-dc1394 \ @@ -511,6 +510,13 @@ else GST1_PLUGINS_BAD_CONF_OPT += --disable-apexsink endif +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-voaacenc +GST1_PLUGINS_BAD_DEPENDENCIES += vo-aacenc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-voaacenc +endif + ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2),y) GST1_PLUGINS_BAD_CONF_OPT += --enable-bz2 GST1_PLUGINS_BAD_DEPENDENCIES += bzip2 From 8d3590d4b0141b00e2430db67fafb2546b56ec26 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 17 Feb 2014 11:13:15 +0100 Subject: [PATCH 051/107] gst1-plugins-bad: add assrender option Signed-off-by: Peter Korsgaard --- package/gstreamer1/gst1-plugins-bad/Config.in | 4 ++++ package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in index 95d1f1346b..25be9cea2a 100644 --- a/package/gstreamer1/gst1-plugins-bad/Config.in +++ b/package/gstreamer1/gst1-plugins-bad/Config.in @@ -318,6 +318,10 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK bool "apexsink" select BR2_PACKAGE_OPENSSL +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASSRENDER + bool "assrender" + select BR2_PACKAGE_LIBASS + config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC bool "voaacenc" select BR2_PACKAGE_VO_AACENC diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk index 1ad76fe8c4..dbd0625379 100644 --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -39,7 +39,6 @@ GST1_PLUGINS_BAD_CONF_OPT += \ --disable-mfc \ --disable-opensles \ --disable-uvch264 \ - --disable-assrender \ --disable-voamrwbenc \ --disable-chromaprint \ --disable-dash \ @@ -510,6 +509,13 @@ else GST1_PLUGINS_BAD_CONF_OPT += --disable-apexsink endif +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASSRENDER),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-assrender +GST1_PLUGINS_BAD_DEPENDENCIES += libass +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-assrender +endif + ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC),y) GST1_PLUGINS_BAD_CONF_OPT += --enable-voaacenc GST1_PLUGINS_BAD_DEPENDENCIES += vo-aacenc From c7bf337ec56c4753d58de3e4c16f3f74e17d5001 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:39:54 +0100 Subject: [PATCH 052/107] pkg-python: no longer use distutilscross for setuptools Thanks to the bump of Python 2.x, distutilscross is no longer needed to achieve cross-compilation for setuptools packages. The host Python 2.x interpreter can be tricked into using the target compiler thanks to pointing it to a different sysconfigdata module, which is achieved using PYTHON_PATH. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/pkg-python.mk | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index a8628953bd..11ad75d643 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -114,7 +114,7 @@ endif else ifeq ($$($(2)_SETUP_TYPE),setuptools) ifeq ($(4),target) $(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV) -$(2)_BASE_BUILD_TGT = build -x +$(2)_BASE_BUILD_TGT = build $(2)_BASE_BUILD_OPT = $(2)_BASE_INSTALL_OPT = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPT) else @@ -133,13 +133,12 @@ endif # front of the dependencies. # # However it must be repeated from inner-generic-package, as we need -# to exclude the python, host-python, host-python-setuptools and -# host-distutilscross packages, which are added below in the list of -# dependencies depending on the package characteristics, and shouldn't -# be derived automatically from the dependencies of the corresponding -# target package. For example, target packages need -# host-python-distutilscross, but not host packages. -$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-python-distutilscross host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +# to exclude the python, host-python and host-python-setuptools +# packages, which are added below in the list of dependencies +# depending on the package characteristics, and shouldn't be derived +# automatically from the dependencies of the corresponding target +# package. +$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) # Target packages need both the python interpreter on the target (for # runtime) and the python interpreter on the host (for @@ -152,17 +151,13 @@ $(2)_DEPENDENCIES += host-python endif # Setuptools based packages will need host-python-setuptools (both -# host and target) and host-python-distutilscross (only target -# packages). We need to have a special exclusion for the +# host and target). We need to have a special exclusion for the # host-setuptools package itself: it is setuptools-based, but # shouldn't depend on host-setuptools (because it would otherwise # depend on itself!). ifeq ($$($(2)_SETUP_TYPE),setuptools) ifneq ($(2),HOST_PYTHON_SETUPTOOLS) $(2)_DEPENDENCIES += host-python-setuptools -ifeq ($(4),target) -$(2)_DEPENDENCIES += host-python-distutilscross -endif endif endif From 70b86189c9278ffb19526292c4a85b9a96a67ea8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:39:55 +0100 Subject: [PATCH 053/107] python-distutilscross: remove package that is no longer needed Thanks to the previous commit that makes distutilscross unecessary for setuptools packages, the host-distutilscross package can now be removed. There is no need for any Config.in.legacy handling, since there is no target variant, or visible Config.in option for host-distutilscross. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- .../python-distutilscross/python-distutilscross.mk | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 package/python-distutilscross/python-distutilscross.mk diff --git a/package/python-distutilscross/python-distutilscross.mk b/package/python-distutilscross/python-distutilscross.mk deleted file mode 100644 index cfe2811c20..0000000000 --- a/package/python-distutilscross/python-distutilscross.mk +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -# -# python-distutilscross -# -################################################################################ - -PYTHON_DISTUTILSCROSS_VERSION = 0.1 -PYTHON_DISTUTILSCROSS_SOURCE = distutilscross-$(PYTHON_DISTUTILSCROSS_VERSION).tar.gz -PYTHON_DISTUTILSCROSS_SITE = http://pypi.python.org/packages/source/d/distutilscross -PYTHON_DISTUTILSCROSS_SETUP_TYPE = setuptools - -$(eval $(host-python-package)) From e424050cfcaa2d14e10746908778615434cd0a49 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:39:56 +0100 Subject: [PATCH 054/107] python3: removal of *.py/*.pyc is now done globally Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python3/python3.mk | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index b5e9689324..d49fe4860b 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -159,26 +159,5 @@ ifneq ($(BR2_PACKAGE_PYTHON),y) PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK endif -ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) -define PYTHON3_REMOVE_MODULES_FILES - for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ - -name __pycache__` ; do \ - rm -rf $$i ; \ - done -endef -endif - -ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) -define PYTHON3_REMOVE_MODULES_FILES - for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ - -name *.py` ; do \ - rm -f $$i ; \ - done -endef -endif - -PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_MODULES_FILES - - $(eval $(autotools-package)) $(eval $(host-autotools-package)) From eebbd2d91935c4a87a51c19c5bd9a37e1f703483 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:39:57 +0100 Subject: [PATCH 055/107] python3: make it exclusive from python In Buildroot, we do not support installing both Python 2.x and Python 3.x on the target. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python3/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python3/Config.in b/package/python3/Config.in index 6580cfdc7f..12928f6b06 100644 --- a/package/python3/Config.in +++ b/package/python3/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_PYTHON3 bool "python3" + depends on !BR2_PACKAGE_PYTHON depends on BR2_USE_WCHAR # uses fork() depends on BR2_USE_MMU From a30f276a4a0af40fadf860f981fcae1ab74ab2c8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:39:58 +0100 Subject: [PATCH 056/107] python3: add python -> python3 symlink for the host variant The target python3 depends on host-python3, but most of the scripts call "python", so we need to ensure that $(HOST_DIR)/usr/bin/python exists. This patch achieves this by creating a python -> python3 symbolic link in $(HOST_DIR), just like we are already doing for the target Python 3. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python3/python3.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index d49fe4860b..ba72e75329 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -159,5 +159,11 @@ ifneq ($(BR2_PACKAGE_PYTHON),y) PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK endif +define HOST_PYTHON3_INSTALL_SYMLINK + ln -fs python3 $(HOST_DIR)/usr/bin/python +endef + +HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK + $(eval $(autotools-package)) $(eval $(host-autotools-package)) From 249778541b68c10156c6687e14888f6047556922 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:00 +0100 Subject: [PATCH 057/107] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3 Some parts of python3.mk were hardcoding the 3.3 version as the major version, which does not work for Python 3.4 and other future versions. Instead, use the existing PYTHON3_VERSION_MAJOR. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python3/python3.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index ba72e75329..2773a1203b 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -127,7 +127,7 @@ PYTHON3_MAKE_ENV = \ # trouble for cross compilation define PYTHON3_FIXUP_LIBDIR $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \ - $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/Makefile + $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/Makefile endef PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR @@ -141,7 +141,7 @@ define PYTHON3_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config rm -f $(TARGET_DIR)/usr/bin/python3-config rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 - for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/ \ + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \ -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ rm -f $$i ; \ done From 0d327c267a57e3a75b10becde772addb7fc49297 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:01 +0100 Subject: [PATCH 058/107] python3: bump to 3.4.0rc1 This commit bumps the Python3 package to use Python 3.4.0rc1. About the patches: * The patches below 100 are significantly changed, because like for Python 2.x, a good number of improvements have been made in the upstream Python for cross-compilation. Therefore, almost all of these patches have been modified. * All the patches above 100 are simply updated for Python 3.4.0, with a small refactoring for the handling of test modules. The details of the python3.mk changes are: * --without-ensurepip to tell Python to not use PIP at build time. * Many environment variables are no longer passed, they were specific to our cross-compilation patches * The fixup of the LIBDIR in the Python Makefile is no longer needed since Python has switched to _sysconfigdata.py for distutils configuration instead of parsing the Makefile. * A new post patch hooks touches the two files generated by pgen to make sure they are newer than the pgen sources, which ensures pgen is not built/executed. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- ...3-000-generate-sysconfigdata-buildir.patch | 158 ------------------ .../python3-001-remove-host-header-path.patch | 36 ++++ .../python3-001-support-for-build.patch | 68 -------- .../python3-002-no-host-headers-libs.patch | 72 -------- ...-002-properly-detect-if-python-build.patch | 23 +++ .../python3-003-staging-header-libs.patch | 41 ----- ...3-003-sysconfigdata-install-location.patch | 76 +++++++++ ...3-004-no-import-when-cross-compiling.patch | 27 --- ...tch => python3-004-old-stdlib-cache.patch} | 39 +++-- ...ython3-005-do-not-generate-pyo-files.patch | 40 ----- .../python3-005-pyc-pyo-conditional.patch | 60 +++++++ ...thon3-006-cross-compile-getaddrinfo.patch} | 8 +- .../python3-006-reread-environment.patch | 63 ------- ...thon3-007-change-pyconfig-h-location.patch | 76 --------- ...h => python3-007-disable-extensions.patch} | 44 ++--- ...istutils-sysconfig-use-sysconfigdata.patch | 58 +++++++ package/python3/python3-008-no-rpath.patch | 51 ------ ...on3-009-distutils-use-python-sysroot.patch | 57 +++++++ .../python3-009-verbose-module-build.patch | 26 --- ...-distutils-cross-compilation-support.patch | 71 -------- .../python3-010-no-termcap-host-path.patch | 22 +++ .../python3-100-optional-test-modules.patch | 60 +++---- .../python3/python3-101-optional-pydoc.patch | 46 ++--- .../python3/python3-102-optional-2to3.patch | 68 ++++---- .../python3/python3-103-optional-sqlite.patch | 53 +++--- package/python3/python3-104-optional-tk.patch | 51 +++--- .../python3/python3-105-optional-curses.patch | 30 ++-- .../python3/python3-106-optional-expat.patch | 36 ++-- .../python3-107-optional-codecs-cjk.patch | 8 +- .../python3/python3-108-optional-nis.patch | 8 +- .../python3-109-optional-unicodedata.patch | 8 +- .../python3/python3-110-optional-idle.patch | 39 +++-- package/python3/python3.mk | 58 +++---- 33 files changed, 608 insertions(+), 973 deletions(-) delete mode 100644 package/python3/python3-000-generate-sysconfigdata-buildir.patch create mode 100644 package/python3/python3-001-remove-host-header-path.patch delete mode 100644 package/python3/python3-001-support-for-build.patch delete mode 100644 package/python3/python3-002-no-host-headers-libs.patch create mode 100644 package/python3/python3-002-properly-detect-if-python-build.patch delete mode 100644 package/python3/python3-003-staging-header-libs.patch create mode 100644 package/python3/python3-003-sysconfigdata-install-location.patch delete mode 100644 package/python3/python3-004-no-import-when-cross-compiling.patch rename package/python3/{python3-112-old-stdlib-cache.patch => python3-004-old-stdlib-cache.patch} (61%) delete mode 100644 package/python3/python3-005-do-not-generate-pyo-files.patch create mode 100644 package/python3/python3-005-pyc-pyo-conditional.patch rename package/python3/{python3-011-cross-compile-getaddrinfo.patch => python3-006-cross-compile-getaddrinfo.patch} (81%) delete mode 100644 package/python3/python3-006-reread-environment.patch delete mode 100644 package/python3/python3-007-change-pyconfig-h-location.patch rename package/python3/{python3-012-disable-extensions.patch => python3-007-disable-extensions.patch} (78%) create mode 100644 package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch delete mode 100644 package/python3/python3-008-no-rpath.patch create mode 100644 package/python3/python3-009-distutils-use-python-sysroot.patch delete mode 100644 package/python3/python3-009-verbose-module-build.patch delete mode 100644 package/python3/python3-010-distutils-cross-compilation-support.patch create mode 100644 package/python3/python3-010-no-termcap-host-path.patch diff --git a/package/python3/python3-000-generate-sysconfigdata-buildir.patch b/package/python3/python3-000-generate-sysconfigdata-buildir.patch deleted file mode 100644 index a29aa0ffc8..0000000000 --- a/package/python3/python3-000-generate-sysconfigdata-buildir.patch +++ /dev/null @@ -1,158 +0,0 @@ -changeset: 79745:f85c3f4d9b98 -parent: 79743:36b2ca7dc893 -parent: 79744:24d52d3060e8 -user: Trent Nelson -date: Tue Oct 16 08:17:11 2012 -0400 -summary: Merge issue #15298: ensure _sysconfigdata is generated in build directory, - -Taken from upstream. - ---- - Lib/sysconfig.py | 11 ++++++++++- - Makefile.pre.in | 24 +++++++++++++----------- - setup.py | 14 -------------- - 3 files changed, 23 insertions(+), 26 deletions(-) - -Index: Python-3.3.0/Lib/sysconfig.py -=================================================================== ---- Python-3.3.0.orig/Lib/sysconfig.py -+++ Python-3.3.0/Lib/sysconfig.py -@@ -390,13 +390,22 @@ - if _PYTHON_BUILD: - vars['LDSHARED'] = vars['BLDSHARED'] - -- destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py') -+ pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3]) -+ if hasattr(sys, "gettotalrefcount"): -+ pybuilddir += '-pydebug' -+ os.makedirs(pybuilddir, exist_ok=True) -+ destfile = os.path.join(pybuilddir, '_sysconfigdata.py') -+ - with open(destfile, 'w', encoding='utf8') as f: - f.write('# system configuration generated and used by' - ' the sysconfig module\n') - f.write('build_time_vars = ') - pprint.pprint(vars, stream=f) - -+ # Create file used for sys.path fixup -- see Modules/getpath.c -+ with open('pybuilddir.txt', 'w', encoding='ascii') as f: -+ f.write(pybuilddir) -+ - def _init_posix(vars): - """Initialize the module as appropriate for POSIX systems.""" - # _sysconfigdata is generated at build time, see _generate_posix_vars() -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -410,8 +410,6 @@ - Objects/unicodectype.o \ - Objects/weakrefobject.o - --SYSCONFIGDATA=$(srcdir)/Lib/_sysconfigdata.py -- - ########################################################################## - # objects that get linked into the Python library - LIBRARY_OBJS_OMIT_FROZEN= \ -@@ -432,7 +430,7 @@ - - # Default target - all: build_all --build_all: $(BUILDPYTHON) $(SYSCONFIGDATA) oldsharedmods sharedmods gdbhooks Modules/_testembed -+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed - - # Compile a binary with gcc profile guided optimization. - profile-opt: -@@ -466,15 +464,17 @@ - $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - --platform: $(BUILDPYTHON) $(SYSCONFIGDATA) -+platform: $(BUILDPYTHON) - $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform - --# Generate the sysconfig build-time data --$(SYSCONFIGDATA): $(BUILDPYTHON) -+# Create build directory and generate the sysconfig build-time data there. -+# pybuilddir.txt contains the name of the build dir and is used for -+# sys.path fixup -- see Modules/getpath.c. -+pybuilddir.txt: $(BUILDPYTHON) - $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars - - # Build the shared modules --sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA) -+sharedmods: $(BUILDPYTHON) pybuilddir.txt - case $$MAKEFLAGS in *s*) quiet=-q; esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build -@@ -1036,7 +1036,7 @@ - else true; \ - fi; \ - done -- @for i in $(srcdir)/Lib/*.py ; \ -+ @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \ - do \ - if test -x $$i; then \ - $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ -@@ -1196,6 +1196,8 @@ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ - --root=$(DESTDIR)/ -+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py -+ -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ - - # Here are a couple of targets for MacOSX again, to install a full - # framework-based Python. frameworkinstall installs everything, the -@@ -1341,9 +1343,10 @@ - find . -name '*.s[ol]' -exec rm -f {} ';' - find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' - find build -name 'fficonfig.h' -exec rm -f {} ';' || true -- find build -name 'fficonfig.py' -exec rm -f {} ';' || true -+ find build -name '*.py' -exec rm -f {} ';' || true -+ find build -name '*.py[co]' -exec rm -f {} ';' || true -+ -rm -f pybuilddir.txt - -rm -f Lib/lib2to3/*Grammar*.pickle -- -rm -f $(SYSCONFIGDATA) - -rm -f Modules/_testembed Modules/_freeze_importlib - - profile-removal: -@@ -1367,7 +1370,6 @@ - Modules/Setup Modules/Setup.local Modules/Setup.config \ - Modules/ld_so_aix Modules/python.exp Misc/python.pc - -rm -f python*-gdb.py -- -rm -f pybuilddir.txt - find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ - -o -name '[@,#]*' -o -name '*.old' \ - -o -name '*.orig' -o -name '*.rej' \ -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -33,10 +33,6 @@ - # This global variable is used to hold the list of modules to be disabled. - disabled_module_list = [] - --# File which contains the directory for shared mods (for sys.path fixup --# when running from the build dir, see Modules/getpath.c) --_BUILDDIR_COOKIE = "pybuilddir.txt" -- - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (after any relative - directories) if: -@@ -252,16 +248,6 @@ - args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) - -- # Not only do we write the builddir cookie, but we manually install -- # the shared modules directory if it isn't already in sys.path. -- # Otherwise trying to import the extensions after building them -- # will fail. -- with open(_BUILDDIR_COOKIE, "wb") as f: -- f.write(self.build_lib.encode('utf-8', 'surrogateescape')) -- abs_build_lib = os.path.join(os.getcwd(), self.build_lib) -- if abs_build_lib not in sys.path: -- sys.path.append(abs_build_lib) -- - build_ext.build_extensions(self) - - longest = max([len(e.name) for e in self.extensions]) diff --git a/package/python3/python3-001-remove-host-header-path.patch b/package/python3/python3-001-remove-host-header-path.patch new file mode 100644 index 0000000000..e159e868c0 --- /dev/null +++ b/package/python3/python3-001-remove-host-header-path.patch @@ -0,0 +1,36 @@ +setup.py: do not add invalid header locations + +This piece of code incorrectly adds /usr/include to +self.compiler.include_dirs, and results in the following invalid +compilation line: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc + -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g + -O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + -D_FILE_OFFSET_BITS=64 -pipe -Os + -I./Include -I/usr/include -I. -IInclude + -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include + -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include + -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1 + -c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c + -o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o +cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] + +The -I/usr/include is wrong when cross compiling, so we disable adding +INCLUDEDIR and LIBDIR from the host when cross compiling. + +Signed-off-by: Thomas Petazzoni +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -487,7 +487,8 @@ + add_dir_to_list(dir_list, directory) + + if os.path.normpath(sys.base_prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ ++ and not cross_compiling: + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when + # building a framework with different architectures than diff --git a/package/python3/python3-001-support-for-build.patch b/package/python3/python3-001-support-for-build.patch deleted file mode 100644 index 8c57cfb9cc..0000000000 --- a/package/python3/python3-001-support-for-build.patch +++ /dev/null @@ -1,68 +0,0 @@ -Add support in Python build system to specify host pgen - -Python needs a "pgen" program to build itself. Unfortunately, the -Python build system assumes that it can use the pgen program it has -just built to build itself. Obviously, this cannot work in -cross-compilation mode since the pgen program have been built for the -target. - -Therefore, this patch adds support in the Python build system for the -new PGEN_FOR_BUILD variable, so that we can point Python ./configure -script to the pgen program that have been previously built for the -host. - -Patch ported to python2.7 by Maxime Ripard , and -later significantly reworked by Thomas Petazzoni -, with some inspiration taken -from the Python patches of the PTXdist project, and then ported to -python3.3 by Maxime Ripard - -Signed-off-by: Maxime Ripard ---- - Makefile.pre.in | 5 +++-- - configure.ac | 5 +++++ - 2 files changed, 8 insertions(+), 2 deletions(-) - -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -239,6 +239,7 @@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+PGEN_FOR_BUILD=@PGEN_FOR_BUILD@ - - PSRCS= \ - Parser/acceler.c \ -@@ -639,8 +640,8 @@ - - $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) - @$(MKDIR_P) Include -- $(MAKE) $(PGEN) -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(MAKE) $(PGEN_FOR_BUILD) -+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) - $(MAKE) $(GRAMMAR_H) - touch $(GRAMMAR_C) -Index: Python-3.3.0/configure.ac -=================================================================== ---- Python-3.3.0.orig/configure.ac -+++ Python-3.3.0/configure.ac -@@ -51,10 +51,15 @@ - AC_MSG_RESULT($interp) - PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp - fi -+ AC_MSG_CHECKING(pgen for build) -+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}" -+ AC_MSG_RESULT($PGEN_FOR_BUILD) - else - PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' -+ PGEN_FOR_BUILD='./$(PGEN)' - fi - AC_SUBST(PYTHON_FOR_BUILD) -+AC_SUBST(PGEN_FOR_BUILD) - - dnl Ensure that if prefix is specified, it does not end in a slash. If - dnl it does, we get path names containing '//' which is both ugly and diff --git a/package/python3/python3-002-no-host-headers-libs.patch b/package/python3/python3-002-no-host-headers-libs.patch deleted file mode 100644 index 9783f28ade..0000000000 --- a/package/python3/python3-002-no-host-headers-libs.patch +++ /dev/null @@ -1,72 +0,0 @@ -Do not look at host headers/libraries in cross-compile mode - -When we are cross-compiling, setup.py should never look in /usr or -/usr/local to find headers or libraries. A later patch adds a -mechanism to tell setup.py to look in a specific directory for headers -and libraries. - -Patch first written by Thomas Petazzoni - for python2.7, and then ported -to python3.3 by Maxime Ripard - -Signed-off-by: Maxime Ripard ---- - setup.py | 23 +++++------------------ - 1 file changed, 5 insertions(+), 18 deletions(-) - -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -447,10 +447,8 @@ - if not cross_compiling: - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- # only change this for cross builds for 3.3, issues on Mageia -- if cross_compiling: - self.add_gcc_paths() -- self.add_multiarch_paths() -+ self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -458,10 +456,7 @@ - # directly since an inconsistently reproducible issue comes up where - # the environment variable is not set even though the value were passed - # into configure and stored in the Makefile (issue found on OS X 10.3). -- for env_var, arg_name, dir_list in ( -- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), -- ('LDFLAGS', '-L', self.compiler.library_dirs), -- ('CPPFLAGS', '-I', self.compiler.include_dirs)): -+ for env_var, arg_name, dir_list in (): - env_val = sysconfig.get_config_var(env_var) - if env_val: - # To prevent optparse from raising an exception about any -@@ -486,17 +481,6 @@ - for directory in reversed(options.dirs): - add_dir_to_list(dir_list, directory) - -- if os.path.normpath(sys.base_prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework -- # (PYTHONFRAMEWORK is set) to avoid # linking problems when -- # building a framework with different architectures than -- # the one that is currently installed (issue #7473) -- add_dir_to_list(self.compiler.library_dirs, -- sysconfig.get_config_var("LIBDIR")) -- add_dir_to_list(self.compiler.include_dirs, -- sysconfig.get_config_var("INCLUDEDIR")) -- - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -@@ -506,6 +490,9 @@ - '/lib', '/usr/lib', - ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ else: -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs - exts = [] - missing = [] - diff --git a/package/python3/python3-002-properly-detect-if-python-build.patch b/package/python3/python3-002-properly-detect-if-python-build.patch new file mode 100644 index 0000000000..ce874c6cdb --- /dev/null +++ b/package/python3/python3-002-properly-detect-if-python-build.patch @@ -0,0 +1,23 @@ +distutils: fix build_ext check to find whether we're building Python or not + +The build_ext logic uses +sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to +determine whether we're building a third-party Python extension, or a +built-in Python extension. However, this check is wrong in +cross-compilation mode, and instead, the sysconfig.python_build +variable should be used. + +Signed-off-by: Thomas Petazzoni +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -246,7 +246,7 @@ + # Python's library directory must be appended to library_dirs + # See Issues: #1600860, #4366 + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): +- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): ++ if not sysconfig.python_build: + # building third party extensions + self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) + else: diff --git a/package/python3/python3-003-staging-header-libs.patch b/package/python3/python3-003-staging-header-libs.patch deleted file mode 100644 index b0efe29614..0000000000 --- a/package/python3/python3-003-staging-header-libs.patch +++ /dev/null @@ -1,41 +0,0 @@ -Tell setup.py the location of headers/libraries - -Allow the libraries detection routine to look for headers and libs in -other directories than /usr/include or /usr/lib through the -environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB. - -We can then use it to look for libraries in the buildroot staging -directory. - -Ported to python3.3 by Maxime Ripard based -on the work by Thomas Petazzoni - -Signed-off-by: Maxime Ripard ---- - setup.py | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -441,6 +441,19 @@ - os.unlink(tmpfile) - - def detect_modules(self): -+ try: -+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() -+ except KeyError: -+ modules_include_dirs = ['/usr/include'] -+ try: -+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split() -+ except KeyError: -+ modules_lib_dirs = ['/usr/lib'] -+ for dir in modules_include_dirs: -+ add_dir_to_list(self.compiler.include_dirs, dir) -+ for dir in modules_lib_dirs: -+ add_dir_to_list(self.compiler.library_dirs, dir) -+ - # Ensure that /usr/local is always used, but the local build - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. diff --git a/package/python3/python3-003-sysconfigdata-install-location.patch b/package/python3/python3-003-sysconfigdata-install-location.patch new file mode 100644 index 0000000000..af796d48d5 --- /dev/null +++ b/package/python3/python3-003-sysconfigdata-install-location.patch @@ -0,0 +1,76 @@ +Change the install location of _sysconfigdata.py + +The _sysconfigdata.py module contains definitions that are needed when +building Python modules. In cross-compilation mode, when building +Python extensions for the target, we need to use the _sysconfigdata.py +of the target Python while executing the host Python. + +However until now, the _sysconfigdata.py module was installed in +build/lib.- directory, together with a number of +architecture-specific shared objects, which cannot be used with the +host Python. + +To solve this problem, this patch moves _sysconfigdata.py to a +separate location, build/sysconfigdata.-/, and only +this directory gets added to the PYTHONPATH of the host Python +interpreter when building Python modules for the target. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -543,6 +543,9 @@ + # sys.path fixup -- see Modules/getpath.c. + pybuilddir.txt: $(BUILDPYTHON) + $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt ++ mkdir -p `cat pysysconfigdatadir.txt` ++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt` + + # Build the shared modules + # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for +@@ -1181,7 +1184,7 @@ + else true; \ + fi; \ + done +- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \ ++ @for i in $(srcdir)/Lib/*.py ; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ +@@ -1191,6 +1194,11 @@ + echo $(INSTALL_DATA) $$i $(LIBDEST); \ + fi; \ + done ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST) ++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST)/sysconfigdata + @for d in $(LIBSUBDIRS); \ + do \ + a=$(srcdir)/Lib/$$d; \ +@@ -1513,7 +1521,7 @@ + find build -name 'fficonfig.h' -exec rm -f {} ';' || true + find build -name '*.py' -exec rm -f {} ';' || true + find build -name '*.py[co]' -exec rm -f {} ';' || true +- -rm -f pybuilddir.txt ++ -rm -f pybuilddir.txt pysysconfigdatadir.txt + -rm -f Lib/lib2to3/*Grammar*.pickle + -rm -f Modules/_testembed Modules/_freeze_importlib + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -67,7 +67,7 @@ + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) diff --git a/package/python3/python3-004-no-import-when-cross-compiling.patch b/package/python3/python3-004-no-import-when-cross-compiling.patch deleted file mode 100644 index cd5a437472..0000000000 --- a/package/python3/python3-004-no-import-when-cross-compiling.patch +++ /dev/null @@ -1,27 +0,0 @@ -Disable import check when cross-compiling - -Once Python has compiled an extension (i.e some C code, potentially -linked to a library), it tries to import it. This cannot work in -cross-compilation mode, so we just disable this check. - -Signed-off-by: Thomas Petazzoni -Signed-off-by: Maxime Ripard ---- - setup.py | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -318,6 +318,10 @@ - self.announce('WARNING: skipping import check for Cygwin-based "%s"' - % ext.name) - return -+ if os.environ.get('CROSS_COMPILING') == 'yes': -+ self.announce('WARNING: skipping import check for cross compiled "%s"' -+ % ext.name) -+ return - ext_filename = os.path.join( - self.build_lib, - self.get_ext_filename(self.get_ext_fullname(ext.name))) diff --git a/package/python3/python3-112-old-stdlib-cache.patch b/package/python3/python3-004-old-stdlib-cache.patch similarity index 61% rename from package/python3/python3-112-old-stdlib-cache.patch rename to package/python3/python3-004-old-stdlib-cache.patch index 5a2cf8b961..ac34f8d50e 100644 --- a/package/python3/python3-112-old-stdlib-cache.patch +++ b/package/python3/python3-004-old-stdlib-cache.patch @@ -8,11 +8,13 @@ See http://www.python.org/dev/peps/pep-3147 Signed-off-by: Daniel Nelson ---- python3-3.3.0/configure.ac 2013-01-27 16:35:52.429067797 -0800 -+++ python3-3.3.0/configure.ac 2013-01-27 16:43:43.528601443 -0800 -@@ -1827,6 +1827,23 @@ - LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; - esac +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -349,6 +349,23 @@ + AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX) + AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX) +STDLIB_CACHE_FLAGS= +AC_MSG_CHECKING(for --enable-old-stdlib-cache) @@ -31,12 +33,14 @@ Signed-off-by: Daniel Nelson +]) +AC_SUBST(STDLIB_CACHE_FLAGS) + - AC_MSG_CHECKING(for --enable-framework) - if test "$enable_framework" - then ---- python3-3.3.0/Makefile.pre.in 2013-01-27 16:35:52.422067642 -0800 -+++ python3-3.3.0/Makefile.pre.in 2013-01-27 16:37:03.710650439 -0800 -@@ -143,6 +143,9 @@ + ##AC_ARG_WITH(dyld, + ## AS_HELP_STRING([--with-dyld], + ## [Use (OpenStep|Rhapsody) dynamic linker])) +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -157,6 +157,9 @@ # Options to enable prebinding (for fast startup prior to Mac OS X 10.3) OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ @@ -46,17 +50,28 @@ Signed-off-by: Daniel Nelson # Environment to run shared python without installed libraries RUNSHARED= @RUNSHARED@ -@@ -1079,12 +1082,12 @@ +@@ -1231,21 +1234,21 @@ fi -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ ++ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ + -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ ++ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ + -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ diff --git a/package/python3/python3-005-do-not-generate-pyo-files.patch b/package/python3/python3-005-do-not-generate-pyo-files.patch deleted file mode 100644 index 983d546473..0000000000 --- a/package/python3/python3-005-do-not-generate-pyo-files.patch +++ /dev/null @@ -1,40 +0,0 @@ -Do not generate .pyo files - -By default, the Python installation byte-compiles all modules in two -forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo). - -According to -http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html, -the optimization do not do anything useful, and generating both the -"non-optimized" and "optimized" bytecode variants takes time. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.pre.in | 9 --------- - 1 file changed, 9 deletions(-) - -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -1082,20 +1082,11 @@ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt diff --git a/package/python3/python3-005-pyc-pyo-conditional.patch b/package/python3/python3-005-pyc-pyo-conditional.patch new file mode 100644 index 0000000000..6b08c824ec --- /dev/null +++ b/package/python3/python3-005-pyc-pyo-conditional.patch @@ -0,0 +1,60 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1232,24 +1232,32 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -936,6 +936,18 @@ + + AC_MSG_CHECKING(LDLIBRARY) + ++AC_SUBST(PYC_BUILD) ++ ++AC_ARG_ENABLE(pyc-build, ++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]), ++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ]) ++ ++AC_SUBST(PYO_BUILD) ++ ++AC_ARG_ENABLE(pyo-build, ++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]), ++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ]) ++ + # MacOSX framework builds need more magic. LDLIBRARY is the dynamic + # library that we build, but we do not want to link against it (we + # will find it with a -framework option). For this reason there is an diff --git a/package/python3/python3-011-cross-compile-getaddrinfo.patch b/package/python3/python3-006-cross-compile-getaddrinfo.patch similarity index 81% rename from package/python3/python3-011-cross-compile-getaddrinfo.patch rename to package/python3/python3-006-cross-compile-getaddrinfo.patch index 33286ce391..512a534b9b 100644 --- a/package/python3/python3-011-cross-compile-getaddrinfo.patch +++ b/package/python3/python3-006-cross-compile-getaddrinfo.patch @@ -6,11 +6,11 @@ Signed-off-by: Vanya Sergeev configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: Python-3.3.0/configure.ac +Index: b/configure.ac =================================================================== ---- Python-3.3.0.orig/configure.ac -+++ Python-3.3.0/configure.ac -@@ -3204,7 +3204,7 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -3423,7 +3423,7 @@ AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) diff --git a/package/python3/python3-006-reread-environment.patch b/package/python3/python3-006-reread-environment.patch deleted file mode 100644 index 752b15a4e2..0000000000 --- a/package/python3/python3-006-reread-environment.patch +++ /dev/null @@ -1,63 +0,0 @@ -Make sure setup.py reads the correct CONFIG_ARGS - -The setup.py script that builds and installs all the Python modules -shipped with the interpreter looks at the CONFIG_ARGS variable stored -in the "sysconfig" module to look at the ./configure options and -adjust its behaviour accordingly. - -Unfortunately, when cross-compiling, the value of CONFIG_ARGS returned -by the sysconfig are the one passed to the ./configure script of the -*host* Python and not the one we're currently building for the target. - -In order to avoid that, we re-initialize the values in the sysconfig -module by re-reading the environment at the beginning of the setup.py -script, and we make sure that the CONFIG_ARGS variable is actually -part of the environment of setup.py. - -See the beginning of -http://article.gmane.org/gmane.comp.python.devel/99772 for the -inspiration. - -Signed-off-by: Thomas Petazzoni - ---- - Makefile.pre.in | 4 +++- - setup.py | 3 +++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -30,6 +30,9 @@ - # Were we compiled --with-pydebug or with #define Py_DEBUG? - COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) - -+sysconfig.get_config_vars() -+sysconfig._CONFIG_VARS.update(os.environ) -+ - # This global variable is used to hold the list of modules to be disabled. - disabled_module_list = [] - -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -478,6 +478,7 @@ - sharedmods: $(BUILDPYTHON) pybuilddir.txt - case $$MAKEFLAGS in *s*) quiet=-q; esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ CONFIG_ARGS="$(CONFIG_ARGS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - # Build static library -@@ -1183,7 +1184,8 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ -+ $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \ -+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ diff --git a/package/python3/python3-007-change-pyconfig-h-location.patch b/package/python3/python3-007-change-pyconfig-h-location.patch deleted file mode 100644 index 8d45daef4d..0000000000 --- a/package/python3/python3-007-change-pyconfig-h-location.patch +++ /dev/null @@ -1,76 +0,0 @@ -Change the location of pyconfig.h - -The Python interpreter has a really strange behaviour: at *runtime*, -it reads a Makefile and a header file named pyconfig.h to get some -information about the configuration. - -The Makefile is located in usr/lib/python3.3/config-3.3m, which is fine -since this location is kept on the target. - -However, by default, the pyconfig.h is installed in -usr/include/python3.3m, but we completely remove the usr/include -directory for the target. Since making an exception just for -pyconfig.h is annoying, this patch also installs pyconfig.h to -usr/lib/python3.3/config-3.3m, and modifies the sysconfig module so that it -looks in this location instead of usr/include. - -The pyconfig.h is still kept in usr/include/python3.3m, because it is -needed in the $(STAGING_DIR) when building third-party Python -extensions that contain C code. - -Signed-off-by: Thomas Petazzoni - ---- - Lib/distutils/sysconfig.py | 3 ++- - Lib/sysconfig.py | 2 +- - Makefile.pre.in | 3 ++- - 3 files changed, 5 insertions(+), 3 deletions(-) - -Index: Python-3.3.0/Lib/distutils/sysconfig.py -=================================================================== ---- Python-3.3.0.orig/Lib/distutils/sysconfig.py -+++ Python-3.3.0/Lib/distutils/sysconfig.py -@@ -239,7 +239,8 @@ - else: - inc_dir = _sys_home or project_base - else: -- inc_dir = get_python_inc(plat_specific=1) -+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1) -+ inc_dir = os.path.join(lib_dir, "config") - if get_python_version() < '2.2': - config_h = 'config.h' - else: -Index: Python-3.3.0/Lib/sysconfig.py -=================================================================== ---- Python-3.3.0.orig/Lib/sysconfig.py -+++ Python-3.3.0/Lib/sysconfig.py -@@ -467,7 +467,7 @@ - else: - inc_dir = _sys_home or _PROJECT_BASE - else: -- inc_dir = get_path('platinclude') -+ inc_dir = os.path.join(get_path('stdlib'), "config") - return os.path.join(inc_dir, 'pyconfig.h') - - -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -1123,7 +1123,6 @@ - echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ - $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ - done -- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h - - # Install the library and miscellaneous stuff needed for extending/embedding - # This goes into $(exec_prefix) -@@ -1157,6 +1156,8 @@ - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in - $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h - $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup - $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local - $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config diff --git a/package/python3/python3-012-disable-extensions.patch b/package/python3/python3-007-disable-extensions.patch similarity index 78% rename from package/python3/python3-012-disable-extensions.patch rename to package/python3/python3-007-disable-extensions.patch index ed1d1e2d93..462fed4ce8 100644 --- a/package/python3/python3-012-disable-extensions.patch +++ b/package/python3/python3-007-disable-extensions.patch @@ -38,11 +38,11 @@ Signed-off-by: Thomas Petazzoni setup.py | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -155,6 +155,8 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -175,6 +175,8 @@ # configure script arguments CONFIG_ARGS= @CONFIG_ARGS@ @@ -51,27 +51,29 @@ Index: cpython/Makefile.pre.in # Subdirectories with code SRCDIRS= @SRCDIRS@ -@@ -478,6 +480,7 @@ - sharedmods: $(BUILDPYTHON) pybuilddir.txt +@@ -561,6 +563,7 @@ + esac; \ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - CONFIG_ARGS="$(CONFIG_ARGS)" \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build # Build static library -@@ -1185,6 +1188,7 @@ +@@ -1371,7 +1374,8 @@ + # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods - $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \ -+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ -Index: cpython/configure.ac + --install-platlib=$(DESTSHARED) \ +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2175,6 +2175,8 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2360,6 +2360,8 @@ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) @@ -80,12 +82,12 @@ Index: cpython/configure.ac # Check for use of the system expat library AC_MSG_CHECKING(for --with-system-expat) AC_ARG_WITH(system_expat, -Index: cpython/setup.py +Index: b/setup.py =================================================================== ---- cpython.orig/setup.py -+++ cpython/setup.py -@@ -34,7 +34,10 @@ - sysconfig._CONFIG_VARS.update(os.environ) +--- a/setup.py ++++ b/setup.py +@@ -33,7 +33,10 @@ + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] diff --git a/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch b/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch new file mode 100644 index 0000000000..c77fed3f36 --- /dev/null +++ b/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch @@ -0,0 +1,58 @@ +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -430,49 +430,11 @@ + + def _init_posix(): + """Initialize the module as appropriate for POSIX systems.""" +- g = {} +- # load the installed Makefile: +- try: +- filename = get_makefile_filename() +- parse_makefile(filename, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # load the installed pyconfig.h: +- try: +- filename = get_config_h_filename() +- with open(filename) as file: +- parse_config_h(file, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # On AIX, there are wrong paths to the linker scripts in the Makefile +- # -- these paths are relative to the Python source, but when installed +- # the scripts are in another directory. +- if python_build: +- g['LDSHARED'] = g['BLDSHARED'] +- +- elif get_python_version() < '2.1': +- # The following two branches are for 1.5.2 compatibility. +- if sys.platform == 'aix4': # what about AIX 3.x ? +- # Linker script is in the config directory, not in Modules as the +- # Makefile says. +- python_lib = get_python_lib(standard_lib=1) +- ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') +- python_exp = os.path.join(python_lib, 'config', 'python.exp') +- +- g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) +- ++ # _sysconfigdata is generated at build time, see the sysconfig module ++ from _sysconfigdata import build_time_vars + global _config_vars +- _config_vars = g ++ _config_vars = {} ++ _config_vars.update(build_time_vars) + + + def _init_nt(): diff --git a/package/python3/python3-008-no-rpath.patch b/package/python3/python3-008-no-rpath.patch deleted file mode 100644 index cdeec22ce9..0000000000 --- a/package/python3/python3-008-no-rpath.patch +++ /dev/null @@ -1,51 +0,0 @@ -Remove runtime library paths - -For some extensions (sqlite and dbm), Python setup.py script -hardcode a runtime path (rpath) into the extension. However, this -runtime path is incorrect (because it points to the location of the -library directory on the development machine) and useless (because on -the target, all useful libraries are in a standard directory searched -by the dynamic loader). For those reasons, we just get rid of the -runtime paths in cross-compilation mode. - -Signed-off-by: Thomas Petazzoni ---- - setup.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -Index: Python-3.3.0/setup.py -=================================================================== ---- Python-3.3.0.orig/setup.py -+++ Python-3.3.0/setup.py -@@ -1134,11 +1134,15 @@ - # can end up with a bad search path order. - if sqlite_incdir not in self.compiler.include_dirs: - include_dirs.append(sqlite_incdir) -+ if cross_compiling: -+ sqlite_runtime_libdir = None -+ else: -+ sqlite_runtime_libdir = sqlite_libdir - exts.append(Extension('_sqlite3', sqlite_srcs, - define_macros=sqlite_defines, - include_dirs=include_dirs, - library_dirs=sqlite_libdir, -- runtime_library_dirs=sqlite_libdir, -+ runtime_library_dirs=sqlite_runtime_libdir, - extra_link_args=sqlite_extra_link_args, - libraries=["sqlite3",])) - else: -@@ -1205,9 +1209,13 @@ - elif cand == "bdb": - if db_incs is not None: - if dbm_setup_debug: print("building dbm using bdb") -+ if cross_compiling: -+ dblib_runtime_libdir = None -+ else: -+ dblib_runtime_libdir = dblib_dir - dbmext = Extension('_dbm', ['_dbmmodule.c'], - library_dirs=dblib_dir, -- runtime_library_dirs=dblib_dir, -+ runtime_library_dirs=dblib_runtime_libdir, - include_dirs=db_incs, - define_macros=[ - ('HAVE_BERKDB_H', None), diff --git a/package/python3/python3-009-distutils-use-python-sysroot.patch b/package/python3/python3-009-distutils-use-python-sysroot.patch new file mode 100644 index 0000000000..cfe30feb27 --- /dev/null +++ b/package/python3/python3-009-distutils-use-python-sysroot.patch @@ -0,0 +1,57 @@ +Adjust library/header paths for cross-compilation + +When cross-compiling third-party extensions, the get_python_inc() or +get_python_lib() can be called, to return the path to headers or +libraries. However, they use the sys.prefix of the host Python, which +returns incorrect paths when cross-compiling (paths pointing to host +headers and libraries). + +In order to fix this, we introduce the _python_sysroot, _python_prefix +and _python_exec_prefix variables, that allow to override these +values, and get correct header/library paths when cross-compiling +third-party Python modules. + +Signed-off-by: Thomas Petazzoni + +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -16,10 +16,17 @@ + from .errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +-BASE_PREFIX = os.path.normpath(sys.base_prefix) +-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) ++if "_python_sysroot" in os.environ: ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ BASE_PREFIX = PREFIX ++ BASE_EXEC_PREFIX = EXEC_PREFIX ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++ BASE_PREFIX = os.path.normpath(sys.base_prefix) ++ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -248,7 +248,10 @@ + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): + if not sysconfig.python_build: + # building third party extensions +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if "_python_sysroot" in os.environ: ++ libdir = os.environ.get("_python_sysroot") + libdir ++ self.library_dirs.append(libdir) + else: + # building python standard extensions + self.library_dirs.append('.') diff --git a/package/python3/python3-009-verbose-module-build.patch b/package/python3/python3-009-verbose-module-build.patch deleted file mode 100644 index 60b6d797d3..0000000000 --- a/package/python3/python3-009-verbose-module-build.patch +++ /dev/null @@ -1,26 +0,0 @@ -Enables verbose output when building modules - -Patch borrowed from OpenBricks. - -Signed-off-by: Thomas Petazzoni - ---- - Makefile.pre.in | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -Index: Python-3.3.0/Makefile.pre.in -=================================================================== ---- Python-3.3.0.orig/Makefile.pre.in -+++ Python-3.3.0/Makefile.pre.in -@@ -476,10 +476,9 @@ - - # Build the shared modules - sharedmods: $(BUILDPYTHON) pybuilddir.txt -- case $$MAKEFLAGS in *s*) quiet=-q; esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - CONFIG_ARGS="$(CONFIG_ARGS)" \ -- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build -+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build - - # Build static library - # avoid long command lines, same as LIBRARY_OBJS diff --git a/package/python3/python3-010-distutils-cross-compilation-support.patch b/package/python3/python3-010-distutils-cross-compilation-support.patch deleted file mode 100644 index 0a51400bf5..0000000000 --- a/package/python3/python3-010-distutils-cross-compilation-support.patch +++ /dev/null @@ -1,71 +0,0 @@ -Add some cross-compilation fixes to distutils - -Inspired by work done by Marc Kleine-Budde in -PTXdist. - -Signed-off-by: Thomas Petazzoni ---- - Lib/distutils/sysconfig.py | 17 +++++++++++++---- - configure.ac | 8 +++++++- - 2 files changed, 20 insertions(+), 5 deletions(-) - -Index: Python-3.3.0/Lib/distutils/sysconfig.py -=================================================================== ---- Python-3.3.0.orig/Lib/distutils/sysconfig.py -+++ Python-3.3.0/Lib/distutils/sysconfig.py -@@ -16,15 +16,24 @@ - from .errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable)) -+if os.environ.get('CROSS_COMPILING') == 'yes': -+ _sysroot=os.environ.get('_python_sysroot') -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+ if '_python_srcdir' in os.environ: -+ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir']) -+else: -+ PREFIX = os.path.normpath(sys.prefix) -+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+ - BASE_PREFIX = os.path.normpath(sys.base_prefix) - BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) - - # Path to the base directory of the project. On Windows the binary may - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. --project_base = os.path.dirname(os.path.abspath(sys.executable)) -+project_base = EXECUTABLE_DIRNAME - if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) - # PC/VS7.1 -@@ -98,7 +107,7 @@ - # the build directory may not be the source directory, we - # must use "srcdir" from the makefile to find the "Include" - # directory. -- base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) -+ base = _sys_home or EXECUTABLE_DIRNAME - if plat_specific: - return base - if _sys_home: -Index: Python-3.3.0/configure.ac -=================================================================== ---- Python-3.3.0.orig/configure.ac -+++ Python-3.3.0/configure.ac -@@ -963,7 +963,13 @@ - fi - - if test "$cross_compiling" = yes; then -- RUNSHARED= -+ RUNSHARED=" \ -+ CROSS_COMPILING=yes \ -+ _python_cross_host=${ac_cv_host} \ -+ _python_sysroot=\"\$(sysroot)\" \ -+ _python_srcdir=\"\$(srcdir)\" \ -+ _python_prefix=\"\$(prefix)\" \ -+ _python_exec_prefix=\"\$(exec_prefix)\"" - fi - - AC_MSG_RESULT($LDLIBRARY) diff --git a/package/python3/python3-010-no-termcap-host-path.patch b/package/python3/python3-010-no-termcap-host-path.patch new file mode 100644 index 0000000000..57fe47ab0b --- /dev/null +++ b/package/python3/python3-010-no-termcap-host-path.patch @@ -0,0 +1,22 @@ +Don't look in /usr/lib/termcap for libraries + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -725,12 +725,9 @@ + pass # Issue 7384: Already linked against curses or tinfo. + elif curses_library: + readline_libs.append(curses_library) +- elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], +- 'termcap'): ++ elif self.compiler.find_library_file(lib_dirs, 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: diff --git a/package/python3/python3-100-optional-test-modules.patch b/package/python3/python3-100-optional-test-modules.patch index 13e73a7ed9..6b52509b5a 100644 --- a/package/python3/python3-100-optional-test-modules.patch +++ b/package/python3/python3-100-optional-test-modules.patch @@ -11,11 +11,11 @@ Signed-off-by: Samuel Martin configure.ac | 6 ++++++ 2 files changed, 38 insertions(+), 18 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -976,8 +976,26 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1120,8 +1120,30 @@ EXTRAPLATDIR= @EXTRAPLATDIR@ MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax @@ -23,13 +23,16 @@ Index: cpython/Makefile.pre.in - tkinter/test/test_ttk site-packages test \ +LIBSUBDIRS= tkinter \ + site-packages \ ++ asyncio \ + collections concurrent concurrent/futures encodings \ + email email/mime \ ++ ensurepip ensurepip/_bundled \ + html json http dbm xmlrpc \ + sqlite3 \ + logging csv wsgiref urllib \ + lib2to3 lib2to3/fixes lib2to3/pgen2 \ -+ ctypes ctypes/macholib idlelib idlelib/Icons \ ++ ctypes ctypes/macholib \ ++ idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ + importlib \ + turtledemo \ @@ -38,37 +41,34 @@ Index: cpython/Makefile.pre.in + venv venv/scripts venv/scripts/posix \ + curses pydoc_data $(MACHDEPS) + -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ -+ tkinter/test/test_ttk test \ ++TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ ++ test test/test_asyncio ctypes/test \ ++ test/test_email test/test_email/data \ ++ test/test_json \ + test/audiodata \ test/capath test/data \ test/cjkencodings test/decimaltestdata test/xmltestdata \ - test/subprocessdata test/sndhdrdata \ -@@ -1000,26 +1018,22 @@ - test/namespace_pkgs/project3 \ - test/namespace_pkgs/project3/parent \ +@@ -1148,28 +1170,20 @@ test/namespace_pkgs/project3/parent/child \ -- test/namespace_pkgs/module_and_namespace_package \ -- test/namespace_pkgs/module_and_namespace_package/a_test \ + test/namespace_pkgs/module_and_namespace_package \ + test/namespace_pkgs/module_and_namespace_package/a_test \ +- asyncio \ +- test/test_asyncio \ - collections concurrent concurrent/futures encodings \ - email email/mime test/test_email test/test_email/data \ -- html json test/json_tests http dbm xmlrpc \ +- ensurepip ensurepip/_bundled \ +- html json test/test_json http dbm xmlrpc \ - sqlite3 sqlite3/test \ - logging csv wsgiref urllib \ - lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ -+ test/namespace_pkgs/module_and_namespace_package \ -+ test/namespace_pkgs/module_and_namespace_package/a_test \ -+ test/test_email test/test_email/data \ -+ test/json_tests \ -+ sqlite3/test \ + lib2to3/tests \ lib2to3/tests/data lib2to3/tests/data/fixers \ lib2to3/tests/data/fixers/myfixes \ -- ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \ +- ctypes ctypes/test ctypes/macholib \ +- idlelib idlelib/Icons idlelib/idle_test \ - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ - importlib test/test_importlib test/test_importlib/builtin \ -+ ctypes/test \ -+ distutils/tests \ ++ sqlite3/test idlelib/idle_test \ + test/test_importlib test/test_importlib/builtin \ test/test_importlib/extension test/test_importlib/frozen \ test/test_importlib/import_ test/test_importlib/source \ @@ -77,17 +77,21 @@ Index: cpython/Makefile.pre.in - unittest unittest/test unittest/test/testmock \ - venv venv/scripts venv/scripts/posix \ - curses pydoc_data $(MACHDEPS) -+ unittest unittest/test unittest/test/testmock ++ unittest/test unittest/test/testmock \ ++ distutils/tests ++ ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += $(TESTSUBDIRS) +endif + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2449,6 +2449,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2667,6 +2667,12 @@ fi diff --git a/package/python3/python3-101-optional-pydoc.patch b/package/python3/python3-101-optional-pydoc.patch index ac50ac39ea..331c842d3d 100644 --- a/package/python3/python3-101-optional-pydoc.patch +++ b/package/python3/python3-101-optional-pydoc.patch @@ -12,11 +12,11 @@ Signed-off-by: Samuel Martin setup.py | 9 +++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -952,7 +952,9 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1087,7 +1087,9 @@ -rm -f $(DESTDIR)$(BINDIR)/idle3 (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) -rm -f $(DESTDIR)$(BINDIR)/pydoc3 @@ -26,32 +26,32 @@ Index: cpython/Makefile.pre.in -rm -f $(DESTDIR)$(BINDIR)/2to3 (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) -rm -f $(DESTDIR)$(BINDIR)/pyvenv -@@ -991,7 +993,7 @@ +@@ -1138,7 +1140,7 @@ multiprocessing multiprocessing/dummy \ unittest \ venv venv/scripts venv/scripts/posix \ - curses pydoc_data $(MACHDEPS) + curses $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ -@@ -1034,6 +1036,10 @@ - unittest unittest/test unittest/test/testmock - endif + TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ + test test/test_asyncio ctypes/test \ +@@ -1180,6 +1182,10 @@ + unittest/test unittest/test/testmock \ + distutils/tests +ifeq (@PYDOC@,yes) +LIBSUBDIRS += pydoc_data +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -Index: cpython/configure.ac + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2448,6 +2448,11 @@ - esac]) +--- a/configure.ac ++++ b/configure.ac +@@ -2666,6 +2666,11 @@ + AC_CHECK_FUNCS(pthread_atfork) fi +AC_SUBST(PYDOC) @@ -62,11 +62,11 @@ Index: cpython/configure.ac AC_SUBST(TEST_MODULES) -Index: cpython/setup.py +Index: b/setup.py =================================================================== ---- cpython.orig/setup.py -+++ cpython/setup.py -@@ -2123,6 +2123,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -2182,6 +2182,12 @@ # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -79,7 +79,7 @@ Index: cpython/setup.py setup(# PyPI Metadata (PEP 301) name = "Python", version = sys.version.split()[0], -@@ -2147,8 +2153,7 @@ +@@ -2206,8 +2212,7 @@ # If you change the scripts installed here, you also need to # check the PyBuildScripts command above, and change the links # created by the bininstall target in Makefile.pre.in diff --git a/package/python3/python3-102-optional-2to3.patch b/package/python3/python3-102-optional-2to3.patch index f5e821ae6b..facf6e1780 100644 --- a/package/python3/python3-102-optional-2to3.patch +++ b/package/python3/python3-102-optional-2to3.patch @@ -12,11 +12,11 @@ Signed-off-by: Samuel Martin setup.py | 5 +++-- 3 files changed, 23 insertions(+), 6 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -956,7 +956,9 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1091,7 +1091,9 @@ (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) endif -rm -f $(DESTDIR)$(BINDIR)/2to3 @@ -25,46 +25,44 @@ Index: cpython/Makefile.pre.in +endif -rm -f $(DESTDIR)$(BINDIR)/pyvenv (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv) - -@@ -985,7 +987,6 @@ + if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ +@@ -1131,7 +1133,6 @@ html json http dbm xmlrpc \ sqlite3 \ logging csv wsgiref urllib \ - lib2to3 lib2to3/fixes lib2to3/pgen2 \ - ctypes ctypes/macholib idlelib idlelib/Icons \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ distutils distutils/command $(XMLLIBSUBDIRS) \ - importlib \ -@@ -1025,9 +1026,6 @@ - test/test_email test/test_email/data \ - test/json_tests \ - sqlite3/test \ +@@ -1172,9 +1173,6 @@ + test/namespace_pkgs/project3/parent/child \ + test/namespace_pkgs/module_and_namespace_package \ + test/namespace_pkgs/module_and_namespace_package/a_test \ - lib2to3/tests \ - lib2to3/tests/data lib2to3/tests/data/fixers \ - lib2to3/tests/data/fixers/myfixes \ - ctypes/test \ - distutils/tests \ + sqlite3/test idlelib/idle_test \ test/test_importlib test/test_importlib/builtin \ -@@ -1040,6 +1038,16 @@ + test/test_importlib/extension test/test_importlib/frozen \ +@@ -1186,6 +1184,14 @@ LIBSUBDIRS += pydoc_data endif +ifeq (@LIB2TO3@,yes) +LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += lib2to3/tests \ -+ lib2to3/tests/data \ -+ lib2to3/tests/data/fixers \ -+ lib2to3/tests/data/fixers/myfixes -+endif ++TESTSUBDIRS += lib2to3/tests \ ++ lib2to3/tests/data \ ++ lib2to3/tests/data/fixers \ ++ lib2to3/tests/data/fixers/myfixes +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -@@ -1109,10 +1117,12 @@ - $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST)/site-packages -f \ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +@@ -1281,10 +1287,12 @@ + -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + endif +ifeq (@LIB2TO3@,yes) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt @@ -74,11 +72,11 @@ Index: cpython/Makefile.pre.in # Create the PLATDIR source directory, if one wasn't distributed.. $(srcdir)/Lib/$(PLATDIR): -Index: cpython/setup.py +Index: b/setup.py =================================================================== ---- cpython.orig/setup.py -+++ cpython/setup.py -@@ -2124,10 +2124,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -2183,10 +2183,11 @@ import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -92,11 +90,11 @@ Index: cpython/setup.py setup(# PyPI Metadata (PEP 301) name = "Python", -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2460,6 +2460,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2678,6 +2678,12 @@ AS_HELP_STRING([--disable-test-modules], [disable test modules]), [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) diff --git a/package/python3/python3-103-optional-sqlite.patch b/package/python3/python3-103-optional-sqlite.patch index e3a63c3e02..eb8d242053 100644 --- a/package/python3/python3-103-optional-sqlite.patch +++ b/package/python3/python3-103-optional-sqlite.patch @@ -8,12 +8,12 @@ Signed-off-by: Samuel Martin configure.ac | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2448,6 +2448,15 @@ - esac]) +--- a/configure.ac ++++ b/configure.ac +@@ -2666,6 +2666,15 @@ + AC_CHECK_FUNCS(pthread_atfork) fi +AC_SUBST(SQLITE3) @@ -28,37 +28,36 @@ Index: cpython/configure.ac AC_SUBST(PYDOC) AC_ARG_ENABLE(pydoc, -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -985,7 +985,6 @@ - collections concurrent concurrent/futures encodings \ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1131,7 +1131,6 @@ email email/mime \ + ensurepip ensurepip/_bundled \ html json http dbm xmlrpc \ - sqlite3 \ logging csv wsgiref urllib \ - ctypes ctypes/macholib idlelib idlelib/Icons \ - distutils distutils/command $(XMLLIBSUBDIRS) \ -@@ -1025,7 +1024,6 @@ - test/namespace_pkgs/module_and_namespace_package/a_test \ - test/test_email test/test_email/data \ - test/json_tests \ -- sqlite3/test \ - ctypes/test \ - distutils/tests \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +@@ -1173,7 +1172,7 @@ + test/namespace_pkgs/project3/parent/child \ + test/namespace_pkgs/module_and_namespace_package \ + test/namespace_pkgs/module_and_namespace_package/a_test \ +- sqlite3/test idlelib/idle_test \ ++ idlelib/idle_test \ test/test_importlib test/test_importlib/builtin \ -@@ -1048,6 +1046,13 @@ - endif + test/test_importlib/extension test/test_importlib/frozen \ + test/test_importlib/import_ test/test_importlib/source \ +@@ -1192,6 +1191,11 @@ + lib2to3/tests/data/fixers/myfixes endif +ifeq (@SQLITE3@,yes) +LIBSUBDIRS += sqlite3 -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += sqlite3/test -+endif ++TESTSUBDIRS += sqlite3/test +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif diff --git a/package/python3/python3-104-optional-tk.patch b/package/python3/python3-104-optional-tk.patch index 2f89fe014f..32e2bee797 100644 --- a/package/python3/python3-104-optional-tk.patch +++ b/package/python3/python3-104-optional-tk.patch @@ -8,50 +8,47 @@ Signed-off-by: Samuel Martin configure.ac | 9 +++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -980,7 +980,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1124,7 +1124,7 @@ EXTRAPLATDIR= @EXTRAPLATDIR@ MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax -LIBSUBDIRS= tkinter \ +LIBSUBDIRS= \ site-packages \ + asyncio \ collections concurrent concurrent/futures encodings \ - email email/mime \ -@@ -996,8 +996,7 @@ +@@ -1142,8 +1142,7 @@ + venv venv/scripts venv/scripts/posix \ curses $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) --LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ -- tkinter/test/test_ttk test \ -+LIBSUBDIRS += test \ - test/capath test/data \ - test/cjkencodings test/decimaltestdata test/xmltestdata \ - test/subprocessdata test/sndhdrdata \ -@@ -1053,6 +1052,15 @@ - endif +-TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ +- test test/test_asyncio ctypes/test \ ++TESTSUBDIRS = test test/test_asyncio ctypes/test \ + test/test_email test/test_email/data \ + test/test_json \ + test/audiodata \ +@@ -1196,6 +1195,12 @@ + TESTSUBDIRS += sqlite3/test endif +ifeq (@TK@,yes) +LIBSUBDIRS += tkinter -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += \ -+ tkinter/test tkinter/test/test_tkinter \ -+ tkinter/test/test_ttk -+endif ++TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ ++ tkinter/test/test_ttk +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -Index: cpython/configure.ac + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2457,6 +2457,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2675,6 +2675,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python3/python3-105-optional-curses.patch b/package/python3/python3-105-optional-curses.patch index adb31836fd..75e2558db9 100644 --- a/package/python3/python3-105-optional-curses.patch +++ b/package/python3/python3-105-optional-curses.patch @@ -8,35 +8,35 @@ Signed-off-by: Samuel Martin configure.ac | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -993,7 +993,7 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1140,7 +1140,7 @@ multiprocessing multiprocessing/dummy \ unittest \ venv venv/scripts venv/scripts/posix \ - curses $(MACHDEPS) + $(MACHDEPS) - ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += test \ -@@ -1061,6 +1061,10 @@ - endif + TESTSUBDIRS = test test/test_asyncio ctypes/test \ + test/test_email test/test_email/data \ +@@ -1201,6 +1201,10 @@ + tkinter/test/test_ttk endif +ifeq (@CURSES@,yes) +LIBSUBDIRS += curses +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -Index: cpython/configure.ac + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2466,6 +2466,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2684,6 +2684,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" fi diff --git a/package/python3/python3-106-optional-expat.patch b/package/python3/python3-106-optional-expat.patch index d171b79ef7..80da9395ee 100644 --- a/package/python3/python3-106-optional-expat.patch +++ b/package/python3/python3-106-optional-expat.patch @@ -15,20 +15,20 @@ Signed-off-by: Samuel Martin setup.py | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -987,7 +987,7 @@ - html json http dbm xmlrpc \ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1134,7 +1134,7 @@ logging csv wsgiref urllib \ - ctypes ctypes/macholib idlelib idlelib/Icons \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ - distutils distutils/command $(XMLLIBSUBDIRS) \ + distutils distutils/command \ importlib \ turtledemo \ multiprocessing multiprocessing/dummy \ -@@ -1065,6 +1065,10 @@ +@@ -1205,6 +1205,10 @@ LIBSUBDIRS += curses endif @@ -36,14 +36,14 @@ Index: cpython/Makefile.pre.in +LIBSUBDIRS += $(XMLLIBSUBDIRS) +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -Index: cpython/configure.ac + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2178,13 +2178,21 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2363,13 +2363,21 @@ AC_SUBST(DISABLED_EXTENSIONS) # Check for use of the system expat library @@ -70,11 +70,11 @@ Index: cpython/configure.ac # Check for use of the system libffi library AC_MSG_CHECKING(for --with-system-ffi) -Index: cpython/setup.py +Index: b/setup.py =================================================================== ---- cpython.orig/setup.py -+++ cpython/setup.py -@@ -1404,7 +1404,7 @@ +--- a/setup.py ++++ b/setup.py +@@ -1396,7 +1396,7 @@ # # More information on Expat can be found at www.libexpat.org. # diff --git a/package/python3/python3-107-optional-codecs-cjk.patch b/package/python3/python3-107-optional-codecs-cjk.patch index de7f9109a4..f9d377d0b5 100644 --- a/package/python3/python3-107-optional-codecs-cjk.patch +++ b/package/python3/python3-107-optional-codecs-cjk.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2465,6 +2465,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2683,6 +2683,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python3/python3-108-optional-nis.patch b/package/python3/python3-108-optional-nis.patch index 3c9149769c..7ec5b19b59 100644 --- a/package/python3/python3-108-optional-nis.patch +++ b/package/python3/python3-108-optional-nis.patch @@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2471,6 +2471,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2689,6 +2689,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" fi]) diff --git a/package/python3/python3-109-optional-unicodedata.patch b/package/python3/python3-109-optional-unicodedata.patch index c75ee27c74..4b671ed9b0 100644 --- a/package/python3/python3-109-optional-unicodedata.patch +++ b/package/python3/python3-109-optional-unicodedata.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) -Index: cpython/configure.ac +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2477,6 +2477,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2695,6 +2695,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python3/python3-110-optional-idle.patch b/package/python3/python3-110-optional-idle.patch index 1a7fa65623..f657cbd965 100644 --- a/package/python3/python3-110-optional-idle.patch +++ b/package/python3/python3-110-optional-idle.patch @@ -11,11 +11,11 @@ Signed-off-by: Maxime Ripard setup.py | 4 +++- 3 files changed, 16 insertions(+), 2 deletions(-) -Index: cpython/Makefile.pre.in +Index: b/Makefile.pre.in =================================================================== ---- cpython.orig/Makefile.pre.in -+++ cpython/Makefile.pre.in -@@ -950,7 +950,9 @@ +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1085,7 +1085,9 @@ -rm -f $(DESTDIR)$(LIBPC)/python3.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) -rm -f $(DESTDIR)$(BINDIR)/idle3 @@ -25,16 +25,15 @@ Index: cpython/Makefile.pre.in -rm -f $(DESTDIR)$(BINDIR)/pydoc3 ifeq (@PYDOC@,yes) (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) -@@ -986,7 +988,7 @@ - email email/mime \ +@@ -1133,7 +1135,6 @@ html json http dbm xmlrpc \ logging csv wsgiref urllib \ -- ctypes ctypes/macholib idlelib idlelib/Icons \ -+ ctypes ctypes/macholib \ + ctypes ctypes/macholib \ +- idlelib idlelib/Icons \ distutils distutils/command \ importlib \ turtledemo \ -@@ -1069,6 +1071,10 @@ +@@ -1209,6 +1210,10 @@ LIBSUBDIRS += $(XMLLIBSUBDIRS) endif @@ -42,14 +41,14 @@ Index: cpython/Makefile.pre.in +LIBSUBDIRS += idlelib idlelib/Icons +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - @for i in $(SCRIPTDIR) $(LIBDEST); \ - do \ -Index: cpython/configure.ac + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac =================================================================== ---- cpython.orig/configure.ac -+++ cpython/configure.ac -@@ -2519,6 +2519,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2737,6 +2737,12 @@ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) @@ -62,11 +61,11 @@ Index: cpython/configure.ac # Check for enable-ipv6 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) AC_MSG_CHECKING([if --enable-ipv6 is specified]) -Index: cpython/setup.py +Index: b/setup.py =================================================================== ---- cpython.orig/setup.py -+++ cpython/setup.py -@@ -2124,11 +2124,13 @@ +--- a/setup.py ++++ b/setup.py +@@ -2183,11 +2183,13 @@ import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 2773a1203b..ad9b989095 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -4,10 +4,11 @@ # ################################################################################ -PYTHON3_VERSION_MAJOR = 3.3 -PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).0 +PYTHON3_VERSION_MAJOR = 3.4 +PYTHON3_VERSION_MINOR = 0 +PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)rc1 PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz -PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION) +PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) # Python needs itself and a "pgen" program to build itself, both being # provided in the Python sources. So in order to cross-compile Python, @@ -16,6 +17,7 @@ PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION) # third-party Python modules. HOST_PYTHON3_CONF_OPT += \ + --without-ensurepip \ --without-cxx-main \ --disable-sqlite3 \ --disable-tk \ @@ -25,25 +27,8 @@ HOST_PYTHON3_CONF_OPT += \ --disable-nis \ --disable-unicodedata \ --disable-test-modules \ - --disable-idle3 - -HOST_PYTHON3_MAKE_ENV = \ - PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \ - PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib" - - -define HOST_PYTHON3_CONFIGURE_CMDS - (cd $(@D) && rm -rf config.cache; \ - $(HOST_CONFIGURE_OPTS) \ - CFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" \ - $(HOST_PYTHON3_CONF_ENV) \ - ./configure \ - --prefix="$(HOST_DIR)/usr" \ - --sysconfdir="$(HOST_DIR)/etc" \ - $(HOST_PYTHON3_CONF_OPT) \ - ) -endef + --disable-idle3 \ + --disable-pyo-build PYTHON3_DEPENDENCIES = host-python3 libffi @@ -72,6 +57,10 @@ ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) PYTHON3_CONF_OPT += --enable-old-stdlib-cache endif +ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) +PYTHON3_CONF_OPT += --disable-pyc-build +endif + ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y) PYTHON3_DEPENDENCIES += sqlite else @@ -99,15 +88,12 @@ PYTHON3_DEPENDENCIES += zlib endif PYTHON3_CONF_ENV += \ - _PROJECT_BASE=$(PYTHON3_DIR) \ - _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \ - PYTHON_FOR_BUILD=$(HOST_PYTHON3_DIR)/python \ - PGEN_FOR_BUILD=$(HOST_PYTHON3_DIR)/Parser/pgen \ ac_cv_have_long_long_format=yes \ ac_cv_file__dev_ptmx=yes \ ac_cv_file__dev_ptc=yes \ PYTHON3_CONF_OPT += \ + --without-ensurepip \ --without-cxx-main \ --with-system-ffi \ --disable-pydoc \ @@ -115,22 +101,18 @@ PYTHON3_CONF_OPT += \ --disable-lib2to3 \ --disable-tk \ --disable-nis \ - --disable-idle3 + --disable-idle3 \ + --disable-pyo-build -PYTHON3_MAKE_ENV = \ - _PROJECT_BASE=$(PYTHON3_DIR) \ - _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \ - PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \ - PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" +# This is needed to make sure the Python build process doesn't try to +# regenerate those files with the pgen program. Otherwise, it builds +# pgen for the target, and tries to run it on the host. -# python distutils adds -L$LIBDIR when linking binary extensions, causing -# trouble for cross compilation -define PYTHON3_FIXUP_LIBDIR - $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \ - $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/Makefile +define PYTHON3_TOUCH_GRAMMAR_FILES + touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c endef -PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR +PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_GRAMMAR_FILES # # Remove useless files. In the config/ directory, only the Makefile From eb7667bf41d4ebb8a3de3c6bebdaadfa65ec775c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:02 +0100 Subject: [PATCH 059/107] python3: provide a PYTHON3_PATH The Python package infrastructure will need the Python 3 package to provide a PYTHON3_PATH environment variable in order to build third-party Python modules. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python3/python3.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index ad9b989095..1bf85004d0 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -147,5 +147,8 @@ endef HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK +# Provided to other packages +PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ + $(eval $(autotools-package)) $(eval $(host-autotools-package)) From 24cbcf13f90430e3474dab9d0983e36f7e64c307 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:03 +0100 Subject: [PATCH 060/107] package: add python3 support in the package infrastructure This commit improves the Python package infrastructure to allow Python packages to be built with Python 3. The changes are fairly simple: * Use either PYTHON_PATH or PYTHON3_PATH as the PYTHONPATH depending on which Python is used. * Depend on host-python or host-python3 and python or python3 depending on which Python is used. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/pkg-python.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 11ad75d643..512ef663f7 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -27,7 +27,7 @@ PKG_PYTHON_DISTUTILS_ENV = \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ LDSHARED="$(TARGET_CROSS)gcc -shared" \ - PYTHONPATH="$(PYTHON_PATH)" \ + PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr @@ -48,7 +48,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ PATH="$(TARGET_PATH)" \ - PYTHONPATH="$(PYTHON_PATH)" \ + PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \ _python_exec_prefix=/usr @@ -138,16 +138,16 @@ endif # depending on the package characteristics, and shouldn't be derived # automatically from the dependencies of the corresponding target # package. -$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) +$(2)_DEPENDENCIES ?= $(filter-out host-python host-python3 host-python-setuptools host-toolchain $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) # Target packages need both the python interpreter on the target (for # runtime) and the python interpreter on the host (for # compilation). However, host packages only need the python # interpreter on the host. ifeq ($(4),target) -$(2)_DEPENDENCIES += host-python python +$(2)_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3 python3,host-python python) else -$(2)_DEPENDENCIES += host-python +$(2)_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) endif # Setuptools based packages will need host-python-setuptools (both From 0520b8cf59ab1ed8dac0146a48c05f4cf5b3fc9f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:04 +0100 Subject: [PATCH 061/107] package: allow Python packages with Python3 Until now, Python external modules were only visible when Python 2.x was selected. With this commit, we now source all the Config.in files of Python external modules, as soon as one of the two Python interpreters is enabled. Since all Python external modules have a "depends on BR2_PACKAGE_PYTHON" in their Config.in, this commit in practice does not allow to enable any Python external module. However, thanks to this, we can progressively and safely enable more and more Python external modules to build with Python 3, by simply changing their dependency to "depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3". Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/Config.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/Config.in b/package/Config.in index cb2d31bce6..0f702a3e53 100644 --- a/package/Config.in +++ b/package/Config.in @@ -411,7 +411,8 @@ comment "External PHP extensions need a toolchain w/ dynamic library" endif endif source "package/python/Config.in" -if BR2_PACKAGE_PYTHON +source "package/python3/Config.in" +if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 menu "external python modules" source "package/python-bottle/Config.in" source "package/python-configobj/Config.in" @@ -447,7 +448,6 @@ source "package/python-tornado/Config.in" source "package/python-versiontools/Config.in" endmenu endif -source "package/python3/Config.in" source "package/ruby/Config.in" source "package/tcl/Config.in" if BR2_PACKAGE_TCL From 73293e88c828c9bddc0b684a4603f86f70f8e876 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:05 +0100 Subject: [PATCH 062/107] python, python3: enable unicodedata for host-python, needed by setuptools As we are going to bump setuptools to a much newer version, the host python needs to be built with support for unicodedata. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python/python.mk | 2 +- package/python3/python3.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/python/python.mk b/package/python/python.mk index 0469820a68..3b0a4ddfd5 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -25,7 +25,7 @@ HOST_PYTHON_CONF_OPT += \ --disable-curses \ --disable-codecs-cjk \ --disable-nis \ - --disable-unicodedata \ + --enable-unicodedata \ --disable-dbm \ --disable-gdbm \ --disable-bsddb \ diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 1bf85004d0..13f53f4f03 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -25,7 +25,7 @@ HOST_PYTHON3_CONF_OPT += \ --disable-curses \ --disable-codecs-cjk \ --disable-nis \ - --disable-unicodedata \ + --enable-unicodedata \ --disable-test-modules \ --disable-idle3 \ --disable-pyo-build From e51f87b825819986613cff58038b797e9925b25d Mon Sep 17 00:00:00 2001 From: Rohan Fletcher Date: Tue, 18 Feb 2014 21:40:06 +0100 Subject: [PATCH 063/107] python-setuptools: bump version to 2.1.2 [Thomas: bump to 2.1.2 instead of 0.8, remove comment that no longer made sense about setuptools being forked.] Signed-off-by: Rohan Fletcher Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-setuptools/python-setuptools.mk | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk index 13df4489d0..48bf7c5538 100644 --- a/package/python-setuptools/python-setuptools.mk +++ b/package/python-setuptools/python-setuptools.mk @@ -4,14 +4,9 @@ # ################################################################################ -# "distribute" is a fork of the unmaintained setuptools package. There -# are plans to re-merge it into setuptools; if this happens, we can -# switch back to it. -# See http://pypi.python.org/packages/source/s/setuptools - -PYTHON_SETUPTOOLS_VERSION = 0.6.36 -PYTHON_SETUPTOOLS_SOURCE = distribute-$(PYTHON_SETUPTOOLS_VERSION).tar.gz -PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/d/distribute +PYTHON_SETUPTOOLS_VERSION = 2.1.2 +PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz +PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/s/setuptools PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools $(eval $(python-package)) From 99d930e65db24ac1ed5e768324154cc1f10e9eae Mon Sep 17 00:00:00 2001 From: Przemyslaw Wrzos Date: Tue, 18 Feb 2014 21:40:07 +0100 Subject: [PATCH 064/107] python, python3: fix to ensure libpython is stripped The python and python3 builds mark libpython as read-only which prevents it from being stripped out correctly for the target. Signed-off-by: Przemyslaw Wrzos Acked-by: Thomas De Schampheleire Tested-by: Thomas De Schampheleire Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python/python.mk | 9 +++++++++ package/python3/python3.mk | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/package/python/python.mk b/package/python/python.mk index 3b0a4ddfd5..94765cbb84 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -160,6 +160,15 @@ endef PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES +# +# Make sure libpython gets stripped out on target +# +define PYTHON_ENSURE_LIBPYTHON_STRIPPED + chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR)*.so +endef + +PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_ENSURE_LIBPYTHON_STRIPPED + PYTHON_AUTORECONF = YES # Provided to other packages diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 13f53f4f03..880b66e3c5 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -131,6 +131,15 @@ endef PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES +# +# Make sure libpython gets stripped out on target +# +define PYTHON3_ENSURE_LIBPYTHON_STRIPPED + chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)*.so +endef + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_ENSURE_LIBPYTHON_STRIPPED + PYTHON3_AUTORECONF = YES define PYTHON3_INSTALL_SYMLINK From 5aa4f71b51a3713d765b0e430fc34abecd0bea93 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:08 +0100 Subject: [PATCH 065/107] python-pyasn: use the real upstream The https://code.google.com/p/pyasn/ project is not really the real upstream for PyASN, and at least not the upstream for the PyASN implementation recommended by the PySNMP developers. Instead, the real upstream is https://pypi.python.org/packages/source/p/pyasn1/, which has had much more regular releases than the other PyASN implementation. Therefore, we switch to using this implementation, as recommended by the PySNMP developers on http://pysnmp.sourceforge.net/download.html. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-pyasn/python-pyasn.mk | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/package/python-pyasn/python-pyasn.mk b/package/python-pyasn/python-pyasn.mk index b0072225b6..43fabe9cff 100644 --- a/package/python-pyasn/python-pyasn.mk +++ b/package/python-pyasn/python-pyasn.mk @@ -4,16 +4,10 @@ # ################################################################################ -PYTHON_PYASN_VERSION = 1.2 -PYTHON_PYASN_SOURCE = PyASN-$(PYTHON_PYASN_VERSION).zip -PYTHON_PYASN_SITE = https://pyasn.googlecode.com/files +PYTHON_PYASN_VERSION = 0.17 +PYTHON_PYASN_SOURCE = pyasn1-$(PYTHON_PYASN_VERSION).tar.gz +PYTHON_PYASN_SITE = https://pypi.python.org/packages/source/p/pyasn1/ PYTHON_PYASN_LICENSE = LGPLv3+ (pyasn.cpp), GPLv2+ (libgds) PYTHON_PYASN_SETUP_TYPE = distutils -define PYTHON_PYASN_EXTRACT_CMDS - unzip -d $(@D) $(DL_DIR)/$(PYTHON_PYASN_SOURCE) - mv $(@D)/PyASN-$(PYTHON_PYASN_VERSION)/* $(@D) - $(RM) -r $(@D)/PyASN-$(PYTHON_PYASN_VERSION) -endef - $(eval $(python-package)) From 95e471c4d0376efef0f4667a4876d618679d0d5e Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:09 +0100 Subject: [PATCH 066/107] python-bottle: allow to build with Python 3 Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-bottle/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python-bottle/Config.in b/package/python-bottle/Config.in index 07f490c29b..7b13c1d673 100644 --- a/package/python-bottle/Config.in +++ b/package/python-bottle/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_BOTTLE bool "python-bottle" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 help Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no From 2696d9c04528b88a53ddd70f1d625e2fca31a1f8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:10 +0100 Subject: [PATCH 067/107] python-serial: allow to build with Python 3 Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-serial/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python-serial/Config.in b/package/python-serial/Config.in index df26af14cc..72f556756a 100644 --- a/package/python-serial/Config.in +++ b/package/python-serial/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_SERIAL bool "python-serial" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 help python-serial is a Python library to access serial ports. From 69adc069f0e1924d04233cde5db14b74bd8e00a0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:11 +0100 Subject: [PATCH 068/107] python-pyasn: allow to build with Python 3 Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-pyasn/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python-pyasn/Config.in b/package/python-pyasn/Config.in index 13095f9098..eca53db8c6 100644 --- a/package/python-pyasn/Config.in +++ b/package/python-pyasn/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYASN bool "python-pyasn" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 depends on BR2_INSTALL_LIBSTDCPP help PyASN is a Python extension module that enables you to From 255d51f76c82110226bfd61315e3b890ca8d9f4d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:12 +0100 Subject: [PATCH 069/107] python-pycrypto: allow to build with Python 3 Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-pycrypto/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python-pycrypto/Config.in b/package/python-pycrypto/Config.in index 60a3446831..fe545b5f6a 100644 --- a/package/python-pycrypto/Config.in +++ b/package/python-pycrypto/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYCRYPTO bool "python-pycrypto" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_GMP help PyCrypto is a collection of cryptographic algorithms and From 1ec13284175f3c3ce7e7de6c338c64770f1418bc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 21:40:13 +0100 Subject: [PATCH 070/107] python-pysnmp{, -apps, -mibs}: allow to build with Python 3 Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/python-pysnmp-apps/Config.in | 2 +- package/python-pysnmp-mibs/Config.in | 2 +- package/python-pysnmp/Config.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/python-pysnmp-apps/Config.in b/package/python-pysnmp-apps/Config.in index 304e81222c..8edd04c553 100644 --- a/package/python-pysnmp-apps/Config.in +++ b/package/python-pysnmp-apps/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYSNMP_APPS bool "python-pysnmp-apps" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_PYSNMP depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn help diff --git a/package/python-pysnmp-mibs/Config.in b/package/python-pysnmp-mibs/Config.in index 90ec933a99..cc03676a3b 100644 --- a/package/python-pysnmp-mibs/Config.in +++ b/package/python-pysnmp-mibs/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYSNMP_MIBS bool "python-pysnmp-mibs" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_PYTHON_PYSNMP depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn help diff --git a/package/python-pysnmp/Config.in b/package/python-pysnmp/Config.in index d5f90edcf2..6cf18ee063 100644 --- a/package/python-pysnmp/Config.in +++ b/package/python-pysnmp/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYSNMP bool "python-pysnmp" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 depends on BR2_INSTALL_LIBSTDCPP # pyasn select BR2_PACKAGE_PYTHON_PYASN select BR2_PACKAGE_PYTHON_PYCRYPTO From 102f86e8d462b70ec687c7d3438926f778f3ddf2 Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Tue, 18 Feb 2014 00:37:10 +0100 Subject: [PATCH 071/107] sdl: add host version Host version is needed to build xbmc [Peter: use _PRE_CONFIGURE_HOOKS like target version] Signed-off-by: Maxime Hadjinlian Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- package/sdl/sdl.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk index cf3366db0c..a983fec5a9 100644 --- a/package/sdl/sdl.mk +++ b/package/sdl/sdl.mk @@ -18,8 +18,9 @@ define SDL_RUN_AUTOGEN endef SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN -SDL_DEPENDENCIES += host-automake host-autoconf host-libtool +HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN +SDL_DEPENDENCIES += host-automake host-autoconf host-libtool ifeq ($(BR2_PACKAGE_SDL_FBCON),y) SDL_CONF_OPT += --enable-video-fbcon=yes @@ -80,3 +81,4 @@ endef SDL_POST_INSTALL_STAGING_HOOKS += SDL_FIXUP_SDL_CONFIG $(eval $(autotools-package)) +$(eval $(host-autotools-package)) From e72b7a4e8c4b0bf1b5b268601de7990b54ee9a67 Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Tue, 18 Feb 2014 00:37:11 +0100 Subject: [PATCH 072/107] sdl_image: add host version Host version is needed to build xbmc Signed-off-by: Maxime Hadjinlian Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- package/sdl_image/sdl_image.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/sdl_image/sdl_image.mk b/package/sdl_image/sdl_image.mk index ba9751de60..05b9a1ffb9 100644 --- a/package/sdl_image/sdl_image.mk +++ b/package/sdl_image/sdl_image.mk @@ -38,4 +38,15 @@ SDL_IMAGE_DEPENDENCIES = sdl \ $(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),tiff) \ $(if $(BR2_PACKAGE_SDL_IMAGE_WEBP),webp) +HOST_SDL_IMAGE_CONF_OPT = --with-sdl-prefix=$(HOST_DIR)/usr \ + --with-sdl-exec-prefix=$(HOST_DIR)/usr \ + --disable-sdltest \ + --disable-static \ + --disable-jpg-shared \ + --disable-png-shared \ + --disable-tif-shared \ + +HOST_SDL_IMAGE_DEPENDENCIES = host-libjpeg host-libpng host-sdl + $(eval $(autotools-package)) +$(eval $(host-autotools-package)) From aac3d2b402fd2b8b91f125cf9314f4805b88f72a Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Tue, 18 Feb 2014 00:37:12 +0100 Subject: [PATCH 073/107] infra: Introduce BR2_HOST_NEEDS_JAVA XBMC needs Java on the host in order to build, because it uses a code-generator which is built in two phases: In the first phase SWIG is used to parse C++ header files that define the API. SWIG outputs an XML file that contains a complete description of the structure of the API. In the second phase, the XML file is ingested by a Groovy (Java) program that then creates C++ code that forms the bridge to the scripting language (Python). The second phase is why we need java on the host. You can learn more at the XBMC's wiki: http://wiki.xbmc.org/index.php?title=Codegeneration#How_it_works In order to check that, this patch introduce this mechanism in dependencies.sh, and it also defines the variable in Config.in [Peter: fix error message] Signed-off-by: Maxime Hadjinlian Signed-off-by: Peter Korsgaard --- Config.in | 5 +++++ support/dependencies/dependencies.sh | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/Config.in b/Config.in index bcfefc79f9..8afd156cbc 100644 --- a/Config.in +++ b/Config.in @@ -18,6 +18,11 @@ config BR2_EXTERNAL string option env="BR2_EXTERNAL" +# Hidden boolean selected by packages in need of Java in order to build +# (example: xbmc) +config BR2_HOST_NEEDS_JAVA + bool + # Hidden boolean selected by pre-built packages for x86, when they # need to run on x86-64 machines (example: pre-built external # toolchains, binary tools like SAM-BA, etc.). diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 0e7e1fa047..a965c6882a 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -191,6 +191,14 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then done fi +if grep -q ^BR2_HOST_NEEDS_JAVA=y $BR2_CONFIG ; then + if ! which java > /dev/null ; then + echo >&2 + echo "You must install 'java' on your build machine" >&2 + exit 1 + fi +fi + if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then if test ! -f /lib/ld-linux.so.2 ; then echo From 0721c7133022d270e997c0c42ef044b48c5c5943 Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Wed, 19 Feb 2014 16:33:50 +0100 Subject: [PATCH 074/107] infra: Change BR2_HOST_NEEDS_JAVA name Change BR2_HOST_NEEDS_JAVA to BR2_NEEDS_HOST_JAVA as it makes more sense. The host doesn't need Java but Buildroot needs the host to have Java in order to build the package that select this option. Signed-off-by: Maxime Hadjinlian Signed-off-by: Peter Korsgaard --- Config.in | 2 +- support/dependencies/dependencies.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Config.in b/Config.in index 8afd156cbc..c5c8aa822c 100644 --- a/Config.in +++ b/Config.in @@ -20,7 +20,7 @@ config BR2_EXTERNAL # Hidden boolean selected by packages in need of Java in order to build # (example: xbmc) -config BR2_HOST_NEEDS_JAVA +config BR2_NEEDS_HOST_JAVA bool # Hidden boolean selected by pre-built packages for x86, when they diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index a965c6882a..a8261b3b06 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -191,7 +191,7 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $BR2_CONFIG ; then done fi -if grep -q ^BR2_HOST_NEEDS_JAVA=y $BR2_CONFIG ; then +if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then if ! which java > /dev/null ; then echo >&2 echo "You must install 'java' on your build machine" >&2 From c24fdb3680019d18f0cb7c02a90975ee9fe9613c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 19 Feb 2014 20:10:18 +0100 Subject: [PATCH 075/107] grub2: add new package Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- boot/Config.in | 1 + boot/grub2/Config.in | 120 +++++++++++++++++++++++++++++ boot/grub2/grub.cfg | 6 ++ boot/grub2/grub2-remove-gets.patch | 21 +++++ boot/grub2/grub2.mk | 88 +++++++++++++++++++++ 5 files changed, 236 insertions(+) create mode 100644 boot/grub2/Config.in create mode 100644 boot/grub2/grub.cfg create mode 100644 boot/grub2/grub2-remove-gets.patch create mode 100644 boot/grub2/grub2.mk diff --git a/boot/Config.in b/boot/Config.in index d23c761117..c410d12084 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -6,6 +6,7 @@ source "boot/at91dataflashboot/Config.in" source "boot/barebox/Config.in" source "boot/boot-wrapper-aarch64/Config.in" source "boot/grub/Config.in" +source "boot/grub2/Config.in" source "boot/lpc32xxcdl/Config.in" source "boot/mxs-bootlets/Config.in" source "boot/syslinux/Config.in" diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in new file mode 100644 index 0000000000..e59626a8a8 --- /dev/null +++ b/boot/grub2/Config.in @@ -0,0 +1,120 @@ +config BR2_TARGET_GRUB2 + bool "grub2" + depends on BR2_i386 || BR2_x86_64 + help + GNU GRUB is a Multiboot boot loader. It was derived from + GRUB, the GRand Unified Bootloader, which was originally + designed and implemented by Erich Stefan Boleyn. GRUB 2 has + replaced what was formerly known as GRUB (i.e. version + 0.9x), which has, in turn, become GRUB Legacy. + + Amongst others, GRUB2 offers EFI support, which GRUB Legacy + doesn't provide. + + Notes on using Grub2 for BIOS-based platforms + ============================================= + + 1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 + 2. Partition it (either legacy or GPT style partitions work) + cfdisk disk.img + - Create one partition, type Linux, for the root + filesystem. The only constraint is to make sure there + is enough free space *before* the first partition to + store Grub2. Leaving 1 MB of free space is safe. + 3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a disk.img + 4. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt + 5. Install Grub2 + ./output/host/usr/sbin/grub-bios-setup \ + -b ./output/host/usr/lib/grub/i386-pc/boot.img \ + -c ./output/images/grub.img -d . /dev/loop0 + 6. Your disk.img is ready! + + To test your BIOS image in Qemu: + + qemu-system-{i386,x86-64} -hda disk.img + + Notes on using Grub2 for EFI-based platforms + ============================================ + + 1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 + 2. Partition it with GPT partitions + cgdisk disk.img + - Create a first partition, type EF00, for the + bootloader and kernel image + - Create a second partition, type 8300, for the root + filesystem. + 3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a /dev/loop0 + 4. Prepare the boot partition + sudo mkfs.vfat -n boot /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo cp -a output/images/efi-part/* /mnt/ + sudo cp output/images/bzImage /mnt/ + sudo umount /mnt + 5. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p2 + sudo mount /dev/loop0p2 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt + 6 Cleanup loop device + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 + 7. Your disk.img is ready! + + To test your EFI image in Qemu: + + 1. Download the EFI BIOS for Qemu + Version IA32 or X64 depending on the chosen Grub2 + platform (i386-efi vs. x86-64-efi) + http://sourceforge.net/projects/edk2/files/OVMF/ + 2. Extract, and rename OVMF.fd to bios.bin and + CirrusLogic5446.rom to vgabios-cirrus.bin. + 3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img + 4. Make sure to pass pci=nocrs to the kernel command line, + to workaround a bug in the EFI BIOS regarding the + EFI framebuffer. + + http://www.gnu.org/software/grub/ + +if BR2_TARGET_GRUB2 + +choice + prompt "Platform" + +config BR2_TARGET_GRUB2_I386_PC + bool "i386-pc" + help + Select this option if the platform you're targetting is a + x86 or x86-64 legacy BIOS based platform. + +config BR2_TARGET_GRUB2_I386_EFI + bool "i386-efi" + help + Select this option if the platform you're targetting has a + 32 bits EFI BIOS. Note that some x86-64 platforms use a 32 + bits EFI BIOS, and this option should be used in this case. + +config BR2_TARGET_GRUB2_X86_64_EFI + bool "x86-64-efi" + help + Select this option if the platform you're targetting has a + 64 bits EFI BIOS. + +endchoice + +config BR2_TARGET_GRUB2_BUILTIN_MODULES + string "builtin modules" + default "boot linux ext2 fat part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC + default "boot linux ext2 fat part_msdos part_gpt normal efi_gop" \ + if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI + +endif # BR2_TARGET_GRUB2 diff --git a/boot/grub2/grub.cfg b/boot/grub2/grub.cfg new file mode 100644 index 0000000000..9ea5281a42 --- /dev/null +++ b/boot/grub2/grub.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=/dev/sda1 console=tty1 +} diff --git a/boot/grub2/grub2-remove-gets.patch b/boot/grub2/grub2-remove-gets.patch new file mode 100644 index 0000000000..0da71b3292 --- /dev/null +++ b/boot/grub2/grub2-remove-gets.patch @@ -0,0 +1,21 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Pending +Index: grub-1.99/grub-core/gnulib/stdio.in.h +=================================================================== +--- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800 ++++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700 +@@ -140,8 +140,10 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk new file mode 100644 index 0000000000..5bb888402b --- /dev/null +++ b/boot/grub2/grub2.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# grub2 +# +################################################################################ + +GRUB2_VERSION = 2.00 +GRUB2_SITE = $(BR2_GNU_MIRROR)/grub/ +GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz +GRUB2_LICENSE = GPLv3+ +GRUB2_LICENSE_FILES = COPYING +GRUB2_DEPENDENCIES = host-bison host-flex + +ifeq ($(BR2_TARGET_GRUB2_I386_PC),y) +GRUB2_IMAGE = $(BINARIES_DIR)/grub.img +GRUB2_CFG = $(TARGET_DIR)/boot/grub/grub.cfg +GRUB2_TUPLE = i386-pc +GRUB2_TARGET = i386 +GRUB2_PLATFORM = pc +else ifeq ($(BR2_TARGET_GRUB2_I386_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootia32.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = i386-efi +GRUB2_TARGET = i386 +GRUB2_PLATFORM = efi +else ifeq ($(BR2_TARGET_GRUB2_X86_64_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = x86_64-efi +GRUB2_TARGET = x86_64 +GRUB2_PLATFORM = efi +endif + +GRUB2_BUILTIN_MODULES = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)) + +# Grub2 is kind of special: it considers CC, LD and so on to be the +# tools to build the native tools (i.e to be executed on the build +# machine), and uses TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS to +# build the bootloader itself. + +GRUB2_CONF_ENV = \ + $(HOST_CONFIGURE_OPTS) \ + CPP="$(HOSTCC) -E" \ + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" + +GRUB2_CONF_OPT = \ + --target=$(GRUB2_TARGET) \ + --with-platform=$(GRUB2_PLATFORM) \ + --disable-grub-mkfont \ + --enable-efiemu=no \ + --enable-liblzma=no \ + --enable-device-mapper=no \ + --enable-libzfs=no \ + --disable-werror + +# We don't want all the native tools and Grub2 modules to be installed +# in the target. So we in fact install everything into the host +# directory, and the image generation process (below) will use the +# grub-mkimage tool and Grub2 modules from the host directory. + +GRUB2_INSTALL_TARGET_OPT = DESTDIR=$(HOST_DIR) install + +define GRUB2_IMAGE_INSTALLATION + mkdir -p $(dir $(GRUB2_IMAGE)) + $(HOST_DIR)/usr/bin/grub-mkimage \ + -d $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE) \ + -O $(GRUB2_TUPLE) \ + -o $(GRUB2_IMAGE) \ + $(if $(GRUB2_PREFIX),-p $(GRUB2_PREFIX)) \ + $(GRUB2_BUILTIN_MODULES) + mkdir -p $(dir $(GRUB2_CFG)) + $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG) +endef +GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_IMAGE_INSTALLATION + +ifeq ($(GRUB2_PLATFORM),efi) +define GRUB2_EFI_STARTUP_NSH + echo $(notdir $(GRUB2_IMAGE)) > \ + $(BINARIES_DIR)/efi-part/startup.nsh +endef +GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_EFI_STARTUP_NSH +endif + +$(eval $(autotools-package)) From a241b4b0713a7ddc0899c587a96fe852cab0d8d9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 19 Feb 2014 20:10:19 +0100 Subject: [PATCH 076/107] gnu-efi: new package Signed-off-by: Thomas Petazzoni Signed-off-by: Christophe Vu-Brugier Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/gnu-efi/Config.in | 9 ++++ .../gnu-efi-01-use-override-cflags.patch | 53 +++++++++++++++++++ .../gnu-efi-02-parallel-make-archives.patch | 48 +++++++++++++++++ .../gnu-efi/gnu-efi-03-parallel-make.patch | 22 ++++++++ package/gnu-efi/gnu-efi.mk | 38 +++++++++++++ 6 files changed, 171 insertions(+) create mode 100644 package/gnu-efi/Config.in create mode 100644 package/gnu-efi/gnu-efi-01-use-override-cflags.patch create mode 100644 package/gnu-efi/gnu-efi-02-parallel-make-archives.patch create mode 100644 package/gnu-efi/gnu-efi-03-parallel-make.patch create mode 100644 package/gnu-efi/gnu-efi.mk diff --git a/package/Config.in b/package/Config.in index 0f702a3e53..087e5f47cf 100644 --- a/package/Config.in +++ b/package/Config.in @@ -584,6 +584,7 @@ endmenu menu "Hardware handling" source "package/ccid/Config.in" source "package/dtc/Config.in" +source "package/gnu-efi/Config.in" source "package/lcdapi/Config.in" source "package/libaio/Config.in" source "package/libatasmart/Config.in" diff --git a/package/gnu-efi/Config.in b/package/gnu-efi/Config.in new file mode 100644 index 0000000000..982102faa5 --- /dev/null +++ b/package/gnu-efi/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_GNU_EFI + bool "gnu-efi" + depends on BR2_i386 || BR2_x86_64 + help + Develop EFI applications for IA-64 (IPF), IA-32 (x86), and + x86_64 platforms using the GNU toolchain and the EFI + development environment. + + http://gnu-efi.sourceforge.net/ diff --git a/package/gnu-efi/gnu-efi-01-use-override-cflags.patch b/package/gnu-efi/gnu-efi-01-use-override-cflags.patch new file mode 100644 index 0000000000..07c3a9fd6d --- /dev/null +++ b/package/gnu-efi/gnu-efi-01-use-override-cflags.patch @@ -0,0 +1,53 @@ +Allow CFLAGS/CPPFLAGS to be completed from the environment + +Buildroot passes its own CPPFLAGS and CFLAGS in the environment, so +the CFLAGS += and CPPFLAGS += statements in gnu-efi Makefile have no +effect. Change these to override += so that they extend the +flags passed by Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: b/Make.defaults +=================================================================== +--- a/Make.defaults ++++ b/Make.defaults +@@ -83,25 +83,25 @@ + && [ $(GCCMINOR) -ge "7" ] ) ) \ + && echo 1) + ifeq ($(GCCNEWENOUGH),1) +- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 ++ override CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 + endif + + # Arch-specific compilation flags +-CPPFLAGS += -DCONFIG_$(ARCH) ++override CPPFLAGS += -DCONFIG_$(ARCH) + + ifeq ($(ARCH),ia64) +- CFLAGS += -mfixed-range=f32-f127 ++ override CFLAGS += -mfixed-range=f32-f127 + endif + + ifeq ($(ARCH),ia32) +- CFLAGS += -mno-mmx -mno-sse ++ override CFLAGS += -mno-mmx -mno-sse + ifeq ($(HOSTARCH),x86_64) + ARCH3264 = -m32 + endif + endif + + ifeq ($(ARCH),x86_64) +- CFLAGS += -mno-red-zone -mno-mmx -mno-sse ++ override CFLAGS += -mno-red-zone -mno-mmx -mno-sse + ifeq ($(HOSTARCH),ia32) + ARCH3264 = -m64 + endif +@@ -110,7 +110,7 @@ + # Generic compilation flags + INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \ + -I$(TOPDIR)/inc/protocol +-CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ ++override CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ + -fno-merge-constants -ffreestanding -fno-stack-protector \ + -fno-stack-check + ASFLAGS += $(ARCH3264) diff --git a/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch b/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch new file mode 100644 index 0000000000..e5b47c197a --- /dev/null +++ b/package/gnu-efi/gnu-efi-02-parallel-make-archives.patch @@ -0,0 +1,48 @@ +Fix parallel make failure for archives + +Upstream-Status: Pending + +The lib and gnuefi makefiles were using the lib.a() form which compiles +and ar's as a pair instead of compiling all and then ar'ing which can +parallelize better. This was resulting in build failures on larger values +of -j. + +See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105 +for details. + +Signed-off-by: Saul Wold +Signed-off-by: Darren Hart +--- +--- + gnuefi/Makefile | 3 ++- + lib/Makefile | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +Index: gnu-efi-3.0/lib/Makefile +=================================================================== +--- gnu-efi-3.0.orig/lib/Makefile ++++ gnu-efi-3.0/lib/Makefile +@@ -66,7 +66,8 @@ all: libsubdirs libefi.a + libsubdirs: + for sdir in $(SUBDIRS); do mkdir -p $$sdir; done + +-libefi.a: $(patsubst %,libefi.a(%),$(OBJS)) ++libefi.a: $(OBJS) ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f libefi.a *~ $(OBJS) */*.o +Index: gnu-efi-3.0/gnuefi/Makefile +=================================================================== +--- gnu-efi-3.0.orig/gnuefi/Makefile ++++ gnu-efi-3.0/gnuefi/Makefile +@@ -51,7 +51,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a + + all: $(TARGETS) + +-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) ++libgnuefi.a: $(OBJS) ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f $(TARGETS) *~ *.o $(OBJS) diff --git a/package/gnu-efi/gnu-efi-03-parallel-make.patch b/package/gnu-efi/gnu-efi-03-parallel-make.patch new file mode 100644 index 0000000000..27c94e8a74 --- /dev/null +++ b/package/gnu-efi/gnu-efi-03-parallel-make.patch @@ -0,0 +1,22 @@ +Fix parallel make failure + +Upstream-Status: Submitted [Maintainer directly] + +Add a missing dependency which resulted in a race leading to failure +on larger values of -j. + +Signed-off-by: Darren Hart + +Index: gnu-efi-3.0/Makefile +=================================================================== +--- gnu-efi-3.0.orig/Makefile ++++ gnu-efi-3.0/Makefile +@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults + + SUBDIRS = lib gnuefi inc apps + ++gnuefi: lib ++ + all: check_gcc $(SUBDIRS) + + $(SUBDIRS): diff --git a/package/gnu-efi/gnu-efi.mk b/package/gnu-efi/gnu-efi.mk new file mode 100644 index 0000000000..93c7b2c5b6 --- /dev/null +++ b/package/gnu-efi/gnu-efi.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# gnu-efi +# +################################################################################ + +GNU_EFI_VERSION = 3.0u +GNU_EFI_SOURCE = gnu-efi_$(GNU_EFI_VERSION).orig.tar.gz +GNU_EFI_SITE = http://downloads.sourceforge.net/project/gnu-efi/ +GNU_EFI_INSTALL_STAGING = YES +GNU_EFI_LICENSE = GPLv2+ (gnuefi), BSD (efilib) +GNU_EFI_LICENSE_FILES = debian/copyright + +# gnu-efi is a set of library and header files used to build +# standalone EFI applications such as bootloaders. There is no point +# in installing these libraries to the target. +GNU_EFI_INSTALL_TARGET = NO + +ifeq ($(BR2_i386),y) +GNU_EFI_PLATFORM=ia32 +else ifeq ($(BR2_x86_64),y) +GNU_EFI_PLATFORM=x86_64 +endif + +define GNU_EFI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + ARCH=$(GNU_EFI_PLATFORM) +endef + +define GNU_EFI_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + INSTALLROOT=$(STAGING_DIR) \ + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install +endef + +$(eval $(generic-package)) From 7961d45c24b76fc8112197f857c29d8e0b476d0a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 19 Feb 2014 20:10:20 +0100 Subject: [PATCH 077/107] gummiboot: new package Signed-off-by: Thomas Petazzoni Signed-off-by: Christophe Vu-Brugier Signed-off-by: Peter Korsgaard --- boot/Config.in | 1 + boot/gummiboot/Config.in | 28 +++++++++++++++++++++++ boot/gummiboot/buildroot.conf | 4 ++++ boot/gummiboot/gummiboot.mk | 42 +++++++++++++++++++++++++++++++++++ boot/gummiboot/loader.conf | 2 ++ 5 files changed, 77 insertions(+) create mode 100644 boot/gummiboot/Config.in create mode 100644 boot/gummiboot/buildroot.conf create mode 100644 boot/gummiboot/gummiboot.mk create mode 100644 boot/gummiboot/loader.conf diff --git a/boot/Config.in b/boot/Config.in index c410d12084..54760b9dac 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -7,6 +7,7 @@ source "boot/barebox/Config.in" source "boot/boot-wrapper-aarch64/Config.in" source "boot/grub/Config.in" source "boot/grub2/Config.in" +source "boot/gummiboot/Config.in" source "boot/lpc32xxcdl/Config.in" source "boot/mxs-bootlets/Config.in" source "boot/syslinux/Config.in" diff --git a/boot/gummiboot/Config.in b/boot/gummiboot/Config.in new file mode 100644 index 0000000000..8d70680d2b --- /dev/null +++ b/boot/gummiboot/Config.in @@ -0,0 +1,28 @@ +config BR2_TARGET_GUMMIBOOT + bool "gummiboot" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_GNU_EFI + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + help + gummiboot is a simple UEFI boot manager which executes + configured EFI images. The default entry is selected by a + configured pattern (glob) or an on-screen menu. + + gummiboot operates on the EFI System Partition (ESP) + only. Configuration file fragments, kernels, initrds, other + EFI images need to reside on the ESP. Linux kernels need to + be built with CONFIG_EFI_STUB to be able to be directly + executed as an EFI image. + + See the Grub2 help text for details on preparing an EFI + capable disk image using Gummiboot: the instructions are + exactly the same, except that the Gummiboot configuration + files will be located in /loader/ inside the EFI partition. + + http://freedesktop.org/wiki/Software/gummiboot/ + +comment "gummiboot needs a toolchain w/ largefile, wchar" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/boot/gummiboot/buildroot.conf b/boot/gummiboot/buildroot.conf new file mode 100644 index 0000000000..8a6f02e56a --- /dev/null +++ b/boot/gummiboot/buildroot.conf @@ -0,0 +1,4 @@ +title Buildroot +version 1 +linux /bzImage +options console=ttyS0 root=/dev/sda2 diff --git a/boot/gummiboot/gummiboot.mk b/boot/gummiboot/gummiboot.mk new file mode 100644 index 0000000000..165a1b0ff3 --- /dev/null +++ b/boot/gummiboot/gummiboot.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# gummiboot +# +################################################################################ + +GUMMIBOOT_SITE = git://anongit.freedesktop.org/gummiboot +GUMMIBOOT_VERSION = 43 +GUMMIBOOT_LICENSE = LGPLv2.1+ +GUMMIBOOT_LICENSE_FILES = LICENSE + +# The git archive does not have the autoconf/automake stuff generated. +GUMMIBOOT_AUTORECONF = YES +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux +GUMMIBOOT_INSTALL_TARGET = NO +GUMMIBOOT_INSTALL_IMAGES = YES + +ifeq ($(BR2_i386),y) +GUMMIBOOT_IMGARCH = ia32 +else ifeq ($(BR2_x86_64),y) +GUMMIBOOT_IMGARCH = x64 +endif + +GUMMIBOOT_CONF_OPT = \ + --host=$(BR2_ARCH) \ + --with-efi-libdir=$(STAGING_DIR)/usr/lib \ + --with-efi-ldsdir=$(STAGING_DIR)/usr/lib \ + --with-efi-includedir=$(STAGING_DIR)/usr/include \ + --disable-manpages + +define GUMMIBOOT_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \ + $(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi + echo "boot$(GUMMIBOOT_IMGARCH).efi" > \ + $(BINARIES_DIR)/efi-part/startup.nsh + $(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \ + $(BINARIES_DIR)/efi-part/loader/loader.conf + $(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \ + $(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf +endef + +$(eval $(autotools-package)) diff --git a/boot/gummiboot/loader.conf b/boot/gummiboot/loader.conf new file mode 100644 index 0000000000..93b77b8f93 --- /dev/null +++ b/boot/gummiboot/loader.conf @@ -0,0 +1,2 @@ +timeout 3 +default buildroot From 6104cc4f1067614f6daaaae4b436f2d8c834750c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 19 Feb 2014 20:10:21 +0100 Subject: [PATCH 078/107] board: add support for the MinnowBoard Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- board/minnowboard/grub.cfg | 6 + board/minnowboard/linux-3.8.config | 172 +++++++++++++++++++++++++++++ board/minnowboard/post-build.sh | 2 + board/minnowboard/readme.txt | 40 +++++++ configs/minnowboard_defconfig | 23 ++++ 5 files changed, 243 insertions(+) create mode 100644 board/minnowboard/grub.cfg create mode 100644 board/minnowboard/linux-3.8.config create mode 100755 board/minnowboard/post-build.sh create mode 100644 board/minnowboard/readme.txt create mode 100644 configs/minnowboard_defconfig diff --git a/board/minnowboard/grub.cfg b/board/minnowboard/grub.cfg new file mode 100644 index 0000000000..33a0f4aa8d --- /dev/null +++ b/board/minnowboard/grub.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200 +} diff --git a/board/minnowboard/linux-3.8.config b/board/minnowboard/linux-3.8.config new file mode 100644 index 0000000000..460aa2d0da --- /dev/null +++ b/board/minnowboard/linux-3.8.config @@ -0,0 +1,172 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_RCU_FANOUT=32 +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_CGROUPS=y +CONFIG_CGROUP_DEBUG=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +CONFIG_NAMESPACES=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EMBEDDED=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_KPROBES=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_SMP=y +CONFIG_MATOM=y +CONFIG_SCHED_SMT=y +CONFIG_PREEMPT=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_CHECK_BIOS_CORRUPTION=y +# CONFIG_MTRR_SANITIZER is not set +CONFIG_EFI=y +CONFIG_EFI_STUB=y +CONFIG_HZ_1000=y +CONFIG_PM_RUNTIME=y +CONFIG_PM_DEBUG=y +CONFIG_PM_ADVANCED_DEBUG=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_X86_ACPI_CPUFREQ=y +CONFIG_INTEL_IDLE=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +CONFIG_HOTPLUG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_SUB_POLICY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FW_LOADER=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_RAM=y +CONFIG_PCH_PHUB=m +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_NETCONSOLE=y +CONFIG_TUN=m +CONFIG_PCH_GBE=m +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO_POLLED=y +# CONFIG_MOUSE_PS2 is not set +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_PCH_UART=y +CONFIG_SERIAL_PCH_UART_CONSOLE=y +CONFIG_GEN_RTC=y +CONFIG_GEN_RTC_X=y +CONFIG_HPET=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_EG20T=m +CONFIG_SPI=y +CONFIG_SPI_GPIO=m +CONFIG_SPI_TOPCLIFF_PCH=m +CONFIG_SPI_SPIDEV=m +CONFIG_GPIOLIB=y +CONFIG_DEBUG_GPIO=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_SCH=y +CONFIG_GPIO_PCH=y +CONFIG_WATCHDOG=y +CONFIG_SOFT_WATCHDOG=m +CONFIG_AGP=m +CONFIG_DRM=m +CONFIG_FB=y +CONFIG_FB_EFI=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_HDA_INTEL=m +CONFIG_USB=y +CONFIG_USB_SUSPEND=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=m +CONFIG_USB_EG20T=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_DMADEVICES=y +CONFIG_PCH_DMA=y +CONFIG_MINNOWBOARD=y +CONFIG_MINNOWBOARD_GPIO=m +CONFIG_MINNOWBOARD_KEYS=m +CONFIG_EFI_VARS=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_FANOTIFY=y +CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y +CONFIG_ISO9660_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_CONFIGFS_FS=m +CONFIG_NFS_FS=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_PRINTK_TIME=y +CONFIG_FRAME_WARN=1024 +CONFIG_TIMER_STATS=y +CONFIG_LATENCYTOP=y +CONFIG_BLK_DEV_IO_TRACE=y diff --git a/board/minnowboard/post-build.sh b/board/minnowboard/post-build.sh new file mode 100755 index 0000000000..e3f4a92ec9 --- /dev/null +++ b/board/minnowboard/post-build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cp board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg diff --git a/board/minnowboard/readme.txt b/board/minnowboard/readme.txt new file mode 100644 index 0000000000..b62b677dfc --- /dev/null +++ b/board/minnowboard/readme.txt @@ -0,0 +1,40 @@ +Prepare the SD card for the Minnow Board +======================================== + + 1. Partition the SD card with a GPT partition table + + sudo cgdisk /dev/mmcblk0 + + Create two partitions: + + a) First partition of a few dozens of megabytes, which will be + used to store the bootloader and the kernel image. Type must + be EF00 (EFI partition). + + b) Second partition of any size, which will be used to store the + root filesystem. Type must be 8300 (Linux filesystem) + + 2. Prepare the boot partition + + We will format it, mount it, copy the EFI data generated by + Buildroot, and the kernel image. + + sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1 + sudo mount /dev/mmcblk0p1 /mnt + sudo cp -a output/images/efi-part/* /mnt/ + sudo cp output/images/bzImage /mnt/ + sudo umount /mnt + + 3. Prepare the root partition + + We will format it, mount it, and extract the root filesystem. + + sudo mkfs.ext3 -L root /dev/mmcblk0p2 + sudo mount /dev/mmcblk0p2 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt + + 4. Enjoy + +Additional informations about this board can be found at +http://www.minnowboard.org/. diff --git a/configs/minnowboard_defconfig b/configs/minnowboard_defconfig new file mode 100644 index 0000000000..5fdfd43545 --- /dev/null +++ b/configs/minnowboard_defconfig @@ -0,0 +1,23 @@ +# Architecture +BR2_x86_64=y +BR2_x86_atom=y + +# Misc +BR2_TARGET_GENERIC_GETTY_PORT="ttyPCH0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh" + +# Lock to 3.8 headers +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8" + +# Linux kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.yoctoproject.org/linux-yocto-3.8" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ba1587b9b62c801d161897303aa6d22809485f9b" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux-3.8.config" + +# Bootloader +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_I386_EFI=y From d4c0c642de85489a536e89d252ef6e19ecbbd6a4 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda Date: Thu, 20 Feb 2014 15:26:18 +0100 Subject: [PATCH 079/107] Makefile: fix target-finalize rule Fix a bug introduced by the commit a24877586a566e052897e50e6a0c2f53cfb029f5 (Makefile: add support for top-level parallel make). That commit put a new rule inside the target-finalize rule so it was erroneously splitted in two parts. Signed-off-by: Fabio Porcedda Cc: Eric Le Bihan Cc: Thomas De Schampheleire Acked-by: Thomas De Schampheleire Signed-off-by: Peter Korsgaard --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20aabd61e1..de568e31e0 100644 --- a/Makefile +++ b/Makefile @@ -507,6 +507,8 @@ endif STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \) STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print +$(TARGETS_ROOTFS): target-finalize + target-finalize: $(TARGETS) rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ @@ -534,8 +536,6 @@ endif find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ xargs -r $(KSTRIPCMD); fi -$(TARGETS_ROOTFS): target-finalize - # See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads # besides the one in which crash occurred; or SIGTRAP kills my program when # I set a breakpoint" From be7e2bca8dc96e0e2da50a2237ce406c9e8d079f Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Fri, 21 Feb 2014 14:25:55 +0100 Subject: [PATCH 080/107] jansson: bump to 2.6 Signed-off-by: Yegor Yefremov Signed-off-by: Peter Korsgaard --- package/jansson/jansson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/jansson/jansson.mk b/package/jansson/jansson.mk index bb3240f17a..6ead0ec10c 100644 --- a/package/jansson/jansson.mk +++ b/package/jansson/jansson.mk @@ -4,7 +4,7 @@ # ################################################################################ -JANSSON_VERSION = 2.5 +JANSSON_VERSION = 2.6 JANSSON_SITE = http://www.digip.org/jansson/releases JANSSON_LICENSE = MIT JANSSON_LICENSE_FILES = LICENSE From eda3d0e1d01c3f3e32a24759ddd107574a118c8c Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 29 Jan 2014 22:48:24 +0100 Subject: [PATCH 081/107] Config: default BR2_PACKAGE_OVERRIDE_FILE to $(CONFIG_DIR)/local.mk The current default for BR2_PACKAGE_OVERRIDE_FILE points to: $(TOPDIR)/local.mk This works well for in-tree builds, but is not very useful for out-of-tree builds, when the Buildroot source tree may be shared for different concurrent builds. Also, it seems to be more sensible to have local.mk alognside the .config file. Hence, change the default for BR2_PACKAGE_OVERRIDE_FILE to point to: $(CONFIG_DIR)/local.mk Note that this does not change the current behaviour for in-tree builds, since in that case $(CONFIG_DIR) == $(TOPDIR). Signed-off-by: "Yann E. MORIN" Cc: Thomas De Schampheleire Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.in b/Config.in index c5c8aa822c..55f5fd81a7 100644 --- a/Config.in +++ b/Config.in @@ -475,7 +475,7 @@ config BR2_PREFER_STATIC_LIB config BR2_PACKAGE_OVERRIDE_FILE string "location of a package override file" - default "$(TOPDIR)/local.mk" + default "$(CONFIG_DIR)/local.mk" help A package override file is a short makefile that contains variable definitions of the form _OVERRIDE_SRCDIR, From c64f948d2c7c2aaf61b8a45880eb9715b6cc9bb9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:08:59 +0100 Subject: [PATCH 082/107] toolchain: introduce a toolchain knob for NPTL As our architecture support expands to a number of architectures that do not implement NPTL threading, and the number of packages that depend on NPTL specific features, it has become necessary to be able to know whether the toolchain has NPTL support or not. This commit adds a new BR2_TOOLCHAIN_HAS_THREADS_NPTL hidden Config.in option that allows packages to know whether NPTL is available or not. This hidden option is: * Automatically enabled when glibc/eglibc or musl toolchains are used, either internal or external. * Automatically enabled when an internal uClibc toolchain with NPTL support is configured. It is left disabled otherwise for internal uClibc toolchains. * Configured according to a visible Config.in option for custom external uClibc toolchains. [Peter: factor _EXTERNAL_HAS_THREADS in single if as suggested by Arnout] Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/uclibc/Config.in | 1 + toolchain/Config.in | 2 ++ toolchain/helpers.mk | 1 + toolchain/toolchain-common.in | 3 +++ toolchain/toolchain-external/Config.in | 15 ++++++++++++++- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in index 860e4103d2..2b93660d1d 100644 --- a/package/uclibc/Config.in +++ b/package/uclibc/Config.in @@ -124,6 +124,7 @@ choice config BR2_PTHREADS_NATIVE bool "Native POSIX Threading (NPTL)" select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on !BR2_arc depends on !BR2_avr32 depends on !BR2_bfin diff --git a/toolchain/Config.in b/toolchain/Config.in index bbfd367a48..44f3ac66d8 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -9,6 +9,7 @@ config BR2_TOOLCHAIN_USES_GLIBC select BR2_ENABLE_LOCALE select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS select BR2_TOOLCHAIN_HAS_SSP @@ -23,6 +24,7 @@ config BR2_TOOLCHAIN_USES_MUSL select BR2_ENABLE_LOCALE select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL choice prompt "Toolchain type" diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index faa9d90745..892ab4befd 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -268,6 +268,7 @@ check_uclibc = \ $(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\ $(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support) # diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in index 8435a65a49..c4e38902a2 100644 --- a/toolchain/toolchain-common.in +++ b/toolchain/toolchain-common.in @@ -29,6 +29,9 @@ config BR2_TOOLCHAIN_HAS_THREADS config BR2_TOOLCHAIN_HAS_THREADS_DEBUG bool +config BR2_TOOLCHAIN_HAS_THREADS_NPTL + bool + config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS bool diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in index f02f89b39c..90bcc3b9e8 100644 --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -996,9 +996,10 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. +if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG bool "Toolchain has threads debugging support?" - depends on BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG default y help @@ -1006,6 +1007,18 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG debugging support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL + bool "Toolchain has NPTL threads support?" + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + default y + help + Select this option if your external toolchain uses the NPTL + (Native Posix Thread Library) implementation of Posix + threads. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP bool "Toolchain has SSP support?" select BR2_TOOLCHAIN_HAS_SSP From 7586be4aae3ab93badcfad2ccbd434f2e7885f11 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:09:00 +0100 Subject: [PATCH 083/107] docs/manual: indicate how to handle BR2_TOOLCHAIN_HAS_THREADS_NPTL Signed-off-by: Thomas Petazzoni Acked-by: Samuel Martin Signed-off-by: Peter Korsgaard --- docs/manual/adding-packages-directory.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt index 40af8091fa..3dc5395937 100644 --- a/docs/manual/adding-packages-directory.txt +++ b/docs/manual/adding-packages-directory.txt @@ -235,7 +235,12 @@ use in the comment. * thread support ** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS+ -** Comment string: +threads+ +** Comment string: +threads+ (unless +BR2_TOOLCHAIN_HAS_THREADS_NPTL+ + is also needed, in which case, specifying only +NPTL+ is sufficient) + +* NPTL thread support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS_NPTL+ +** Comment string: +NPTL+ * RPC support ** Dependency symbol: +BR2_TOOLCHAIN_HAS_NATIVE_RPC+ From fe061a9898369389cabca340ce00fd62b0e8481d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:09:01 +0100 Subject: [PATCH 084/107] rt-tests: use BR2_TOOLCHAIN_HAS_THREADS_NPTL Signed-off-by: Thomas Petazzoni Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/rt-tests/Config.in | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in index 58a88a8af1..461e6de6e8 100644 --- a/package/rt-tests/Config.in +++ b/package/rt-tests/Config.in @@ -1,10 +1,6 @@ config BR2_PACKAGE_RT_TESTS bool "rt-tests" - depends on BR2_TOOLCHAIN_HAS_THREADS - # priority-inheritance mutex needs NPTL - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - # no NPTL for these archs - depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL help Set of utilities for testing the real-time behaviour of a Linux system. @@ -23,7 +19,5 @@ config BR2_PACKAGE_RT_TESTS http://rt.wiki.kernel.org -comment "rt-tests needs a toolchain w/ threads" - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc - depends on !BR2_TOOLCHAIN_HAS_THREADS +comment "rt-tests needs a toolchain w/ NPTL" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL From 0c28e36a2b2cb48943bde5dfe6fe69606c2f5166 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:09:02 +0100 Subject: [PATCH 085/107] sconeserver: use BR2_TOOLCHAIN_HAS_THREADS_NPTL Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/sconeserver/Config.in | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in index ccb9c00d00..76c3d917be 100644 --- a/package/sconeserver/Config.in +++ b/package/sconeserver/Config.in @@ -1,11 +1,7 @@ menuconfig BR2_PACKAGE_SCONESERVER bool "sconeserver" depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_TOOLCHAIN_HAS_THREADS - # pthread_setschedprio needs NPTL - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - # no NPTL for these archs - depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL select BR2_PACKAGE_PCRE help Sconeserver is a modular, object-orientated and extremely versatile @@ -102,7 +98,5 @@ comment "ui module requires X.org" endif # BR2_PACKAGE_SCONESERVER -comment "sconeserver needs a toolchain w/ C++, threads" - depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc +comment "sconeserver needs a toolchain w/ C++, NPTL" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS_NPTL) From 977276685fe72fc6014e1f86e9f54199d725e0bd Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:09:03 +0100 Subject: [PATCH 086/107] tvheadend: use BR2_TOOLCHAIN_HAS_THREADS_NPTL Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/tvheadend/Config.in | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in index da60f83a9c..74df825db0 100644 --- a/package/tvheadend/Config.in +++ b/package/tvheadend/Config.in @@ -1,22 +1,16 @@ -comment "tvheadend needs a toolchain w/ largefile, IPv6, threads" - depends on !BR2_avr32 && !BR2_xtensa && !BR2_arc - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - depends on !BR2_LARGEFILE || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS +comment "tvheadend needs a toolchain w/ largefile, IPv6, NPTL" + depends on !BR2_LARGEFILE || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL config BR2_PACKAGE_TVHEADEND bool "tvheadend" depends on BR2_LARGEFILE && BR2_INET_IPV6 - depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # tvheadend requires an atomic_add operation. Either you have # a gcc >= 4.3 toolchain and it uses the gcc intrinsics, or it # has special code for x86, x86-64, PPC and ARM. So in the # context of Buildroot, the only really problematic # architecture is avr32, which uses gcc 4.2. depends on !BR2_avr32 - # clock_nanosleep needs NPTL - depends on !BR2_PTHREADS && !BR2_PTHREADS_OLD - # no NPTL for these archs - depends on !BR2_xtensa && !BR2_arc select BR2_PACKAGE_DVB_APPS select BR2_PACKAGE_OPENSSL help From a0f42cdd3701ab424b7f4232d736c75f38afb549 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 18 Feb 2014 22:09:04 +0100 Subject: [PATCH 087/107] qt5: needs NPTL threads Fixes: http://autobuild.buildroot.org/results/70b/70b77e7a5b292e3fcbcf8cab4651c48220f2bd17/ Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/qt5/Config.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/qt5/Config.in b/package/qt5/Config.in index b62a8102e8..5713c41f8c 100644 --- a/package/qt5/Config.in +++ b/package/qt5/Config.in @@ -6,10 +6,10 @@ config BR2_PACKAGE_QT5_JSCORE_AVAILABLE depends on !(BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_fa526) default y -comment "Qt5 needs a toolchain w/ wchar, IPv6, threads, C++" +comment "Qt5 needs a toolchain w/ wchar, IPv6, NPTL, C++" depends on !BR2_PACKAGE_QT depends on !BR2_avr32 - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL menuconfig BR2_PACKAGE_QT5 bool "Qt5" @@ -17,7 +17,7 @@ menuconfig BR2_PACKAGE_QT5 depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR depends on BR2_INET_IPV6 - depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on !BR2_PACKAGE_QT help This option enables the Qt5 framework. Sub-options allow to From 83fb9bb738ae17bf2f11ae3e25250c035a8a7dba Mon Sep 17 00:00:00 2001 From: Marcelo Gutierrez Date: Thu, 13 Feb 2014 18:38:33 +0000 Subject: [PATCH 088/107] ti-gfx: bump to version 5_01_00_01 Signed-off-by: Marcelo Gutierrez Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- package/ti-gfx/ti-gfx.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/ti-gfx/ti-gfx.mk b/package/ti-gfx/ti-gfx.mk index a94f00dc1f..5ea6b929e5 100644 --- a/package/ti-gfx/ti-gfx.mk +++ b/package/ti-gfx/ti-gfx.mk @@ -4,13 +4,13 @@ # ################################################################################ -TI_GFX_VERSION = 4_09_00_01 -TI_GFX_SO_VERSION = 1.9.2188537 +TI_GFX_VERSION = 5_01_00_01 +TI_GFX_SO_VERSION = 1.10.2359475 ifeq ($(BR2_ARM_EABIHF),y) -TI_GFX_SOURCE = Graphics_SDK_setuplinux_$(TI_GFX_VERSION)_hardfp_minimal_demos.bin +TI_GFX_SOURCE = Graphics_SDK_setuplinux_hardfp_$(TI_GFX_VERSION).bin else -TI_GFX_SOURCE = Graphics_SDK_setuplinux_$(TI_GFX_VERSION)_minimal_demos.bin +TI_GFX_SOURCE = Graphics_SDK_setuplinux_softfp_$(TI_GFX_VERSION).bin endif TI_GFX_SITE = http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/$(TI_GFX_VERSION)/exports/ From 7128d249c0227321f2588c09d184da436e45df84 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:15 +0100 Subject: [PATCH 089/107] perl: remove PERL_INSTALL_TARGET_GOALS useless since previous commit (removal of BR2_HAVE_DOCUMENTATION) see http://git.buildroot.net/buildroot/diff/package/perl/perl.mk?id=7164a32632d14cb83698ddec45e84ad2f3252e9e Signed-off-by: Francois Perrad Acked-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Thomas De Schampheleire Signed-off-by: Peter Korsgaard --- package/perl/perl.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package/perl/perl.mk b/package/perl/perl.mk index 5ede81b837..51aeb14910 100644 --- a/package/perl/perl.mk +++ b/package/perl/perl.mk @@ -90,10 +90,8 @@ define PERL_INSTALL_STAGING_CMDS $(MAKE1) -C $(@D) DESTDIR="$(STAGING_DIR)" install.perl endef -PERL_INSTALL_TARGET_GOALS = install.perl - define PERL_INSTALL_TARGET_CMDS - $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" $(PERL_INSTALL_TARGET_GOALS) + $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" install.perl endef $(eval $(generic-package)) From 9fbb169976a313a20b6fdaf37e67ce80c4771650 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:16 +0100 Subject: [PATCH 090/107] pkg-perl: new infrastructure Signed-off-by: Francois Perrad Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- Config.in | 11 +++ package/Makefile.in | 4 +- package/pkg-perl.mk | 181 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 package/pkg-perl.mk diff --git a/Config.in b/Config.in index 55f5fd81a7..5a2a09813e 100644 --- a/Config.in +++ b/Config.in @@ -230,6 +230,17 @@ config BR2_LUAROCKS_MIRROR See http://luarocks.org +config BR2_CPAN_MIRROR + string "CPAN mirror (Perl packages)" + default "http://search.cpan.org/CPAN" + help + CPAN (Comprehensive Perl Archive Network) is a repository + of Perl packages. It has multiple software mirrors scattered + around the world. This option allows you to select a mirror. + + The list of mirrors is available at: + http://search.cpan.org/mirror + endmenu config BR2_JLEVEL diff --git a/package/Makefile.in b/package/Makefile.in index eea7043d9b..454f61442a 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -206,7 +206,8 @@ HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH) HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \ sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p') -export PERL5LIB := $(HOST_DIR)/usr/lib/perl +HOST_PERL_ARCHNAME := $(shell perl -MConfig -e "print Config->{archname}") +export PERL5LIB := $(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ AR="$(TARGET_AR)" \ @@ -359,5 +360,6 @@ include package/pkg-download.mk include package/pkg-autotools.mk include package/pkg-cmake.mk include package/pkg-luarocks.mk +include package/pkg-perl.mk include package/pkg-python.mk include package/pkg-generic.mk diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk new file mode 100644 index 0000000000..fdf1580fa2 --- /dev/null +++ b/package/pkg-perl.mk @@ -0,0 +1,181 @@ +################################################################################ +# Perl package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for Perl packages. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this perl infrastructure requires +# the .mk file to only specify metadata information about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default perl behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +PERL_ARCHNAME = $(ARCH)-linux + +################################################################################ +# inner-perl-package -- defines how the configuration, compilation and +# installation of a perl package should be done, implements a +# few hooks to tune the build process for perl specifities and +# calls the generic package infrastructure to generate the necessary +# make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including an HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-perl-package + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(4),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build.PL \ + --config ar="$(TARGET_AR)" \ + --config full_ar="$(TARGET_AR)" \ + --config cc="$(TARGET_CC)" \ + --config ccflags="$(TARGET_CFLAGS)" \ + --config ld="$(TARGET_CC)" \ + --config lddlflags="-shared $(TARGET_LDFLAGS)" \ + --config ldflags="$(TARGET_LDFLAGS)" \ + --include_dirs $$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE \ + --destdir $$(TARGET_DIR) \ + --installdirs vendor \ + --install_path lib=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \ + --install_path arch=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$(PERL_ARCHNAME) \ + --install_path bin=/usr/bin \ + --install_path script=/usr/bin \ + --install_path bindoc=/usr/share/man/man1 \ + --install_path libdoc=/usr/share/man/man3 \ + $$($(2)_CONF_OPT); \ + else \ + PERL_AUTOINSTALL=--skipdeps \ + perl Makefile.PL \ + AR="$(TARGET_AR)" \ + FULL_AR="$(TARGET_AR)" \ + CC="$(TARGET_CC)" \ + CCFLAGS="$(TARGET_CFLAGS)" \ + LD="$(TARGET_CC)" \ + LDDLFLAGS="-shared $(TARGET_LDFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + DESTDIR=$$(TARGET_DIR) \ + INSTALLDIRS=vendor \ + INSTALLVENDORLIB=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \ + INSTALLVENDORARCH=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$(PERL_ARCHNAME) \ + INSTALLVENDORBIN=/usr/bin \ + INSTALLVENDORSCRIPT=/usr/bin \ + INSTALLVENDORMAN1DIR=/usr/share/man/man1 \ + INSTALLVENDORMAN3DIR=/usr/share/man/man3 \ + $$($(2)_CONF_OPT); \ + fi +endef +else + +# Configure package for host +define $(2)_CONFIGURE_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build.PL \ + --install_base $$(HOST_DIR)/usr \ + --installdirs vendor \ + $$($(2)_CONF_OPT); \ + else \ + PERL_AUTOINSTALL=--skipdeps \ + perl Makefile.PL \ + INSTALL_BASE=$$(HOST_DIR)/usr \ + INSTALLDIRS=vendor \ + $$($(2)_CONF_OPT); \ + fi +endef +endif +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(4),target) + +# Build package for target +define $(2)_BUILD_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build $$($(2)_BUILD_OPT) build; \ + else \ + $(MAKE1) \ + PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE \ + $$($(2)_BUILD_OPT) pure_all; \ + fi +endef +else + +# Build package for host +define $(2)_BUILD_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build $$($(2)_BUILD_OPT) build; \ + else \ + $(MAKE1) $$($(2)_BUILD_OPT) pure_all; \ + fi +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build $$($(2)_INSTALL_TARGET_OPT) install; \ + else \ + $(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \ + fi +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + perl Build $$($(2)_INSTALL_TARGET_OPT) install; \ + else \ + $(MAKE1) $$($(2)_INSTALL_TARGET_OPT) pure_install; \ + fi +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# perl-package -- the target generator macro for Perl packages +################################################################################ + +perl-package = $(call inner-perl-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-perl-package = $(call inner-perl-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) From 8dbab113a07ff8b3223d0c0ea24f85effbc7cc61 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:17 +0100 Subject: [PATCH 091/107] host-perl-xml-parser: rename and refactor with perl infrastructure Even though libxml-parser-perl had a Config.in file with an option to enable it on the target, this option was hidden by a dependency on BR2_HOST_ONLY. So in practice, it was not possible to enable libxml-parser-perl on the target. This allows us to rename libxml-parser-perl to perl-xml-parser to follow the new naming convention of Perl packages, without having to introduce Config.in.legacy material. In addition to this rename, the package is converted to use the newly introduced Perl package infrastructure. Signed-off-by: Francois Perrad Tested-by: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Thomas De Schampheleire Signed-off-by: Peter Korsgaard --- package/Config.in | 1 - package/intltool/intltool.mk | 2 +- package/libxml-parser-perl/Config.in | 10 ------ .../libxml-parser-perl/libxml-parser-perl.mk | 35 ------------------- package/metacity/metacity.mk | 2 +- package/perl-xml-parser/perl-xml-parser.mk | 17 +++++++++ 6 files changed, 19 insertions(+), 48 deletions(-) delete mode 100644 package/libxml-parser-perl/Config.in delete mode 100644 package/libxml-parser-perl/libxml-parser-perl.mk create mode 100644 package/perl-xml-parser/perl-xml-parser.mk diff --git a/package/Config.in b/package/Config.in index 087e5f47cf..543c7a64f1 100644 --- a/package/Config.in +++ b/package/Config.in @@ -634,7 +634,6 @@ source "package/json-c/Config.in" source "package/json-glib/Config.in" source "package/libjson/Config.in" source "package/libroxml/Config.in" -source "package/libxml-parser-perl/Config.in" source "package/libxml2/Config.in" source "package/libxmlpp/Config.in" source "package/libxslt/Config.in" diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk index 58b46e6578..6b2a7040ea 100644 --- a/package/intltool/intltool.mk +++ b/package/intltool/intltool.mk @@ -9,7 +9,7 @@ INTLTOOL_SITE = https://launchpad.net/intltool/trunk/$(INTLTOOL_VERSION)/+downlo INTLTOOL_LICENSE = GPLv2+ INTLTOOL_LICENSE_FILES = COPYING -HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl +HOST_INTLTOOL_DEPENDENCIES = host-gettext host-perl-xml-parser $(eval $(autotools-package)) $(eval $(host-autotools-package)) diff --git a/package/libxml-parser-perl/Config.in b/package/libxml-parser-perl/Config.in deleted file mode 100644 index bdda23637b..0000000000 --- a/package/libxml-parser-perl/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBXML_PARSER_PERL - bool "libxml-parser-perl" - select BR2_PACKAGE_EXPAT - # Hide from configuration as we only support the host package - # for the moment - depends on BR2_HOST_ONLY - help - The Perl XML::Parser module. - - http://www.cpan.org/modules/by-module/XML/ diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk deleted file mode 100644 index 53f3bcf6ea..0000000000 --- a/package/libxml-parser-perl/libxml-parser-perl.mk +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# -# libxml-parser-perl -# -################################################################################ - -LIBXML_PARSER_PERL_VERSION = 2.36 -LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz -LIBXML_PARSER_PERL_SITE = http://www.cpan.org/modules/by-module/XML/ - -LIBXML_PARSER_PERL_DEPENDENCIES = expat - -define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS - (cd $(@D) ; \ - $(HOST_CONFIGURE_OPTS) perl Makefile.PL \ - PREFIX=$(HOST_DIR)/usr \ - EXPATLIBPATH=$(HOST_DIR)/usr/lib \ - EXPATINCPATH=$(HOST_DIR)/usr/include \ - INSTALLDIRS=site \ - INSTALLSITELIB=$(HOST_DIR)/usr/lib/perl \ - INSTALLSITEARCH=$(HOST_DIR)/usr/lib/perl \ - USE_MM_LD_RUN_PATH=1 \ - ) -endef - -define HOST_LIBXML_PARSER_PERL_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) -endef - -define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install -endef - -$(eval $(generic-package)) -$(eval $(host-generic-package)) diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk index 9306b00207..18f5c7641d 100644 --- a/package/metacity/metacity.mk +++ b/package/metacity/metacity.mk @@ -19,7 +19,7 @@ METACITY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ METACITY_DEPENDENCIES = libgtk2 \ xlib_libX11 \ - host-libxml-parser-perl \ + host-perl-xml-parser \ xlib_libXcomposite \ xlib_libXfixes \ xlib_libXrender \ diff --git a/package/perl-xml-parser/perl-xml-parser.mk b/package/perl-xml-parser/perl-xml-parser.mk new file mode 100644 index 0000000000..fb9bf0f600 --- /dev/null +++ b/package/perl-xml-parser/perl-xml-parser.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# perl-xml-parser +# +################################################################################ + +PERL_XML_PARSER_VERSION = 2.41 +PERL_XML_PARSER_SOURCE = XML-Parser-$(PERL_XML_PARSER_VERSION).tar.gz +PERL_XML_PARSER_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR/ +PERL_XML_PARSER_DEPENDENCIES = expat +PERL_XML_PARSER_LICENSE = Artistic or GPLv1+ + +HOST_LIBXML_PARSER_PERL_CONF_OPT = \ + EXPATLIBPATH=$(HOST_DIR)/usr/lib \ + EXPATINCPATH=$(HOST_DIR)/usr/include + +$(eval $(host-perl-package)) From 649ce56f1924e2deb9abbd960cce153e0d780b48 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:18 +0100 Subject: [PATCH 092/107] host-perl-module-build: new package Some Perl packages depend on very recent versions of Module-Build which are not yet shipped with a stable perl version. But the cpan client is able to update Module-Build as pre-requirement. On Buildroot, we must install the latest Module-Build. Signed-off-by: Francois Perrad Reviewed-by: Thomas De Schampheleire Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/perl-module-build/perl-module-build.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 package/perl-module-build/perl-module-build.mk diff --git a/package/perl-module-build/perl-module-build.mk b/package/perl-module-build/perl-module-build.mk new file mode 100644 index 0000000000..a95278d8d2 --- /dev/null +++ b/package/perl-module-build/perl-module-build.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# perl-module-build +# +################################################################################ + +PERL_MODULE_BUILD_VERSION = 0.4204 +PERL_MODULE_BUILD_SOURCE = Module-Build-$(PERL_MODULE_BUILD_VERSION).tar.gz +PERL_MODULE_BUILD_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LE/LEONT/ +PERL_MODULE_BUILD_LICENSE = Artistic or GPLv1+ + +$(eval $(host-perl-package)) From d8fab8c5ee7a1b3a1236754a4a59e0630c0cf592 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:19 +0100 Subject: [PATCH 093/107] manual: adding packages perl Signed-off-by: Francois Perrad Signed-off-by: Peter Korsgaard --- docs/manual/adding-packages-perl.txt | 120 +++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 2 files changed, 122 insertions(+) create mode 100644 docs/manual/adding-packages-perl.txt diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt new file mode 100644 index 0000000000..53aacbd11c --- /dev/null +++ b/docs/manual/adding-packages-perl.txt @@ -0,0 +1,120 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for Perl/CPAN packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[perl-package-tutorial]] + ++perl-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a Perl/CPAN package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # perl-foo-bar +04: # +05: ################################################################################ +06: +07: PERL_FOO_BAR_VERSION = 0.02 +08: PERL_FOO_BAR_SOURCE = Foo-Bar-$(PERL_FOO_BAR_VERSION).tar.gz +09: PERL_FOO_BAR_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER/ +10: PERL_FOO_BAR_DEPENDENCIES = perl-strictures +11: PERL_FOO_BAR_LICENSE = Artistic or GPLv1+ +12: PERL_FOO_BAR_LICENSE_FILES = LICENSE +13: +14: $(eval $(perl-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball and the location +of the tarball on a CPAN server. Buildroot will automatically download +the tarball from this location. + +On line 10, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 11 and 12, we give licensing details about the package (its +license on line 11, and the file containing the license text on line +12). + +Finally, on line 14, we invoke the +perl-package+ macro that +generates all the Makefile rules that actually allow the package to be +built. + +Most of these data can be retrieved from https://metacpan.org/. +So, this file and the Config.in can be generated by running +the script +supports/scripts/scancpan Foo-Bar+ in the Buildroot directory +(or in the +BR2_EXTERNAL+ directory). +This script creates a Config.in file and foo-bar.mk file for the +requested package, and also recursively for all dependencies specified by +CPAN. You should still manually edit the result. In particular, the +following things should be checked. + +* The +PERL_FOO_BAR_LICENSE_FILES+ variable is not set, because metacpan + doesn't have this information. Also, the name of the license file(s) + varies between packages, and some don't even have a license file. +* If the perl module links with a shared library that is provided by + another (non-perl) package, this dependency is not added automatically. + It has to be added manually to +PERL_FOO_BAR_DEPENDENCIES+. +* The +package/Config.in+ file has to be updated manually to include the + generated Config.in files. As a hint, the +scancpan+ script prints out + the required +source "..."+ statements, sorted alphabetically. + +[[perl-package-reference]] + ++perl-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^ + +As a policy, packages that provide Perl/CPAN modules should all be +named +perl-+ in Buildroot. + +This infrastructure handles various Perl build systems : ++ExtUtils-MakeMaker+, +Module-Build+ and +Module-Build-Tiny+. ++Build.PL+ is always preferred when a package provides a +Makefile.PL+ +and a +Build.PL+. + +The main macro of the Perl/CPAN package infrastructure is ++perl-package+. It is similar to the +generic-package+ macro. The ability to +have target and host packages is also available, with the ++host-perl-package+ macro. + +Just like the generic infrastructure, the Perl/CPAN infrastructure +works by defining a number of variables before calling the ++perl-package+ macro. + +First, all the package metadata information variables that exist in the +generic infrastructure also exist in the Perl/CPAN infrastructure: ++PERL_FOO_VERSION+, +PERL_FOO_SOURCE+, ++PERL_FOO_PATCH+, +PERL_FOO_SITE+, ++PERL_FOO_SUBDIR+, +PERL_FOO_DEPENDENCIES+, ++PERL_FOO_INSTALL_TARGET+. + +Note that setting +PERL_FOO_INSTALL_STAGING+ to +YES+ has no effect +unless a +PERL_FOO_INSTALL_STAGING_CMDS+ variable is defined. The perl +infrastructure doesn't define these commands since Perl modules generally +don't need to be installed to the +staging+ directory. + +A few additional variables, specific to the Perl/CPAN infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them. + +* +PERL_FOO_CONF_OPT+/+HOST_PERL_FOO_CONF_OPT+, to specify additional + configure options to pass to the +perl Makefile.PL+ or +perl Build.PL+. + By default, empty. + +* +PERL_FOO_BUILD_OPT+/+HOST_PERL_FOO_BUILD_OPT+, to specify additional + options to pass to +make pure_all+ or +perl Build build+ in the build step. + By default, empty. + +* +PERL_FOO_INSTALL_TARGET_OPT+, to specify additional options to + pass to +make pure_install+ or +perl Build install+ in the install step. + By default, empty. + +* +HOST_PERL_FOO_INSTALL_OPT+, to specify additional options to + pass to +make pure_install+ or +perl Build install+ in the install step. + By default, empty. diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt index cc86529afb..745e33a2a1 100644 --- a/docs/manual/adding-packages.txt +++ b/docs/manual/adding-packages.txt @@ -22,6 +22,8 @@ include::adding-packages-python.txt[] include::adding-packages-luarocks.txt[] +include::adding-packages-perl.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[] From d5e794bc42aafef511428fd6ed1538a7ef40780f Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 23 Feb 2014 15:17:20 +0100 Subject: [PATCH 094/107] scancpan: a new script which creates Perl/CPAN package files [Peter: strip trailing spaces] Signed-off-by: Francois Perrad Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- support/scripts/scancpan | 741 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 741 insertions(+) create mode 100755 support/scripts/scancpan diff --git a/support/scripts/scancpan b/support/scripts/scancpan new file mode 100755 index 0000000000..8d267950f1 --- /dev/null +++ b/support/scripts/scancpan @@ -0,0 +1,741 @@ +#!/usr/bin/env perl + +# This chunk of stuff was generated by App::FatPacker. To find the original +# file's code, look for the end of this BEGIN block or the string 'FATPACK' +BEGIN { +my %fatpacked; + +$fatpacked{"MetaCPAN/API/Tiny.pm"} = <<'METACPAN_API_TINY'; + package MetaCPAN::API::Tiny; + { + $MetaCPAN::API::Tiny::VERSION = '1.131730'; + } + use strict; + use warnings; + # ABSTRACT: A Tiny API client for MetaCPAN + + use Carp; + use JSON::PP 'encode_json', 'decode_json'; + use HTTP::Tiny; + + + sub new { + my ($class, @args) = @_; + + $#_ % 2 == 0 + or croak 'Arguments must be provided as name/value pairs'; + + my %params = @args; + + die 'ua_args must be an array reference' + if $params{ua_args} && ref($params{ua_args}) ne 'ARRAY'; + + my $self = +{ + base_url => $params{base_url} || 'http://api.metacpan.org/v0', + ua => $params{ua} || HTTP::Tiny->new( + $params{ua_args} + ? @{$params{ua_args}} + : (agent => 'MetaCPAN::API::Tiny/' + . ($MetaCPAN::API::VERSION || 'xx'))), + }; + + return bless($self, $class); + } + + sub _build_extra_params { + my $self = shift; + + @_ % 2 == 0 + or croak 'Incorrect number of params, must be key/value'; + + my %extra = @_; + my $ua = $self->{ua}; + + foreach my $key (keys %extra) + { + # The implementation in HTTP::Tiny uses + instead of %20, fix that + $extra{$key} = $ua->_uri_escape($extra{$key}); + $extra{$key} =~ s/\+/%20/g; + } + + my $params = join '&', map { "$_=" . $extra{$_} } sort keys %extra; + + return $params; + } + + + # /source/{author}/{release}/{path} + sub source { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Provide 'author' and 'release' and 'path'"; + + %opts or croak $error; + + if ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) && + defined ( my $path = $opts{'path'} ) + ) { + $url = "source/$author/$release/$path"; + } else { + croak $error; + } + + $url = $self->{base_url} . "/$url"; + + my $result = $self->{ua}->get($url); + $result->{'success'} + or croak "Failed to fetch '$url': " . $result->{'reason'}; + + return $result->{'content'}; + } + + + # /release/{distribution} + # /release/{author}/{release} + sub release { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Either provide 'distribution', or 'author' and 'release', " . + "or 'search'"; + + %opts or croak $error; + + my %extra_opts = (); + + if ( defined ( my $dist = $opts{'distribution'} ) ) { + $url = "release/$dist"; + } elsif ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) + ) { + $url = "release/$author/$release"; + } elsif ( defined ( my $search_opts = $opts{'search'} ) ) { + ref $search_opts && ref $search_opts eq 'HASH' + or croak $error; + + %extra_opts = %{$search_opts}; + $url = 'release/_search'; + } else { + croak $error; + } + + return $self->fetch( $url, %extra_opts ); + } + + + # /pod/{module} + # /pod/{author}/{release}/{path} + sub pod { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Either provide 'module' or 'author and 'release' and 'path'"; + + %opts or croak $error; + + if ( defined ( my $module = $opts{'module'} ) ) { + $url = "pod/$module"; + } elsif ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) && + defined ( my $path = $opts{'path'} ) + ) { + $url = "pod/$author/$release/$path"; + } else { + croak $error; + } + + # check content-type + my %extra = (); + if ( defined ( my $type = $opts{'content-type'} ) ) { + $type =~ m{^ text/ (?: html|plain|x-pod|x-markdown ) $}x + or croak 'Incorrect content-type provided'; + + $extra{headers}{'content-type'} = $type; + } + + $url = $self->{base_url}. "/$url"; + + my $result = $self->{ua}->get( $url, \%extra ); + $result->{'success'} + or croak "Failed to fetch '$url': " . $result->{'reason'}; + + return $result->{'content'}; + } + + + # /module/{module} + sub module { + my $self = shift; + my $name = shift; + + $name or croak 'Please provide a module name'; + + return $self->fetch("module/$name"); + } + + + # file() is a synonym of module + sub file { goto &module } + + + # /author/{author} + sub author { + my $self = shift; + my ( $pause_id, $url, %extra_opts ); + + if ( @_ == 1 ) { + $url = 'author/' . shift; + } elsif ( @_ == 2 ) { + my %opts = @_; + + if ( defined $opts{'pauseid'} ) { + $url = "author/" . $opts{'pauseid'}; + } elsif ( defined $opts{'search'} ) { + my $search_opts = $opts{'search'}; + + ref $search_opts && ref $search_opts eq 'HASH' + or croak "'search' key must be hashref"; + + %extra_opts = %{$search_opts}; + $url = 'author/_search'; + } else { + croak 'Unknown option given'; + } + } else { + croak 'Please provide an author PAUSEID or a "search"'; + } + + return $self->fetch( $url, %extra_opts ); + } + + + + sub fetch { + my $self = shift; + my $url = shift; + my $extra = $self->_build_extra_params(@_); + my $base = $self->{base_url}; + my $req_url = $extra ? "$base/$url?$extra" : "$base/$url"; + + my $result = $self->{ua}->get($req_url); + return $self->_decode_result( $result, $req_url ); + } + + + sub post { + my $self = shift; + my $url = shift; + my $query = shift; + my $base = $self->{base_url}; + + defined $url + or croak 'First argument of URL must be provided'; + + ref $query and ref $query eq 'HASH' + or croak 'Second argument of query hashref must be provided'; + + my $query_json = encode_json( $query ); + my $result = $self->{ua}->request( + 'POST', + "$base/$url", + { + headers => { 'Content-Type' => 'application/json' }, + content => $query_json, + } + ); + + return $self->_decode_result( $result, $url, $query_json ); + } + + sub _decode_result { + my $self = shift; + my ( $result, $url, $original ) = @_; + my $decoded_result; + + ref $result and ref $result eq 'HASH' + or croak 'First argument must be hashref'; + + defined $url + or croak 'Second argument of a URL must be provided'; + + if ( defined ( my $success = $result->{'success'} ) ) { + my $reason = $result->{'reason'} || ''; + $reason .= ( defined $original ? " (request: $original)" : '' ); + + $success or croak "Failed to fetch '$url': $reason"; + } else { + croak 'Missing success in return value'; + } + + defined ( my $content = $result->{'content'} ) + or croak 'Missing content in return value'; + + eval { $decoded_result = decode_json $content; 1 } + or do { croak "Couldn't decode '$content': $@" }; + + return $decoded_result; + } + + 1; + + __END__ + + =pod + + =head1 NAME + + MetaCPAN::API::Tiny - A Tiny API client for MetaCPAN + + =head1 VERSION + + version 1.131730 + + =head1 DESCRIPTION + + This is the Tiny version of L. It implements a compatible API + with a few notable exceptions: + + =over 4 + + =item Attributes are direct hash access + + The attributes defined using Mo(o|u)se are now accessed via the blessed hash + directly. There are no accessors defined to access this elements. + + =item Exception handling + + Instead of using Try::Tiny, raw evals are used. This could potentially cause + issues, so just be aware. + + =item Testing + + Test::Fatal was replaced with an eval implementation of exception(). + Test::TinyMocker usage is retained, but may be absorbed since it is pure perl + + =back + + =head1 CLASS_METHODS + + =head2 new + + new is the constructor for MetaCPAN::API::Tiny. In the non-tiny version of this + module, this is provided via Any::Moose built from the attributes defined. In + the tiny version, we define our own constructor. It takes the same arguments + and provides similar checks to MetaCPAN::API with regards to arguments passed. + + =head1 PUBLIC_METHODS + + =head2 source + + my $source = $mcpan->source( + author => 'DOY', + release => 'Moose-2.0201', + path => 'lib/Moose.pm', + ); + + Searches MetaCPAN for a module or a specific release and returns the plain source. + + =head2 release + + my $result = $mcpan->release( distribution => 'Moose' ); + + # or + my $result = $mcpan->release( author => 'DOY', release => 'Moose-2.0001' ); + + Searches MetaCPAN for a dist. + + You can do complex searches using 'search' parameter: + + # example lifted from MetaCPAN docs + my $result = $mcpan->release( + search => { + author => "OALDERS AND ", + filter => "status:latest", + fields => "name", + size => 1, + }, + ); + + =head2 pod + + my $result = $mcpan->pod( module => 'Moose' ); + + # or + my $result = $mcpan->pod( + author => 'DOY', + release => 'Moose-2.0201', + path => 'lib/Moose.pm', + ); + + Searches MetaCPAN for a module or a specific release and returns the POD. + + =head2 module + + my $result = $mcpan->module('MetaCPAN::API'); + + Searches MetaCPAN and returns a module's ".pm" file. + + =head2 file + + A synonym of L + + =head2 author + + my $result1 = $mcpan->author('XSAWYERX'); + my $result2 = $mcpan->author( pauseid => 'XSAWYERX' ); + + Searches MetaCPAN for a specific author. + + You can do complex searches using 'search' parameter: + + # example lifted from MetaCPAN docs + my $result = $mcpan->author( + search => { + q => 'profile.name:twitter', + size => 1, + }, + ); + + =head2 fetch + + my $result = $mcpan->fetch('/release/distribution/Moose'); + + # with parameters + my $more = $mcpan->fetch( + '/release/distribution/Moose', + param => 'value', + ); + + This is a helper method for API implementations. It fetches a path from MetaCPAN, decodes the JSON from the content variable and returns it. + + You don't really need to use it, but you can in case you want to write your own extension implementation to MetaCPAN::API. + + It accepts an additional hash as "GET" parameters. + + =head2 post + + # /release&content={"query":{"match_all":{}},"filter":{"prefix":{"archive":"Cache-Cache-1.06"}}} + my $result = $mcpan->post( + 'release', + { + query => { match_all => {} }, + filter => { prefix => { archive => 'Cache-Cache-1.06' } }, + }, + ); + + The POST equivalent of the "fetch()" method. It gets the path and JSON request. + + =head1 THANKS + + Overall the tests and code were ripped directly from MetaCPAN::API and + tiny-fied. A big thanks to Sawyer X for writing the original module. + + =head1 AUTHOR + + Nicholas R. Perez + + =head1 COPYRIGHT AND LICENSE + + This software is copyright (c) 2013 by Nicholas R. Perez . + + This is free software; you can redistribute it and/or modify it under + the same terms as the Perl 5 programming language system itself. + + =cut +METACPAN_API_TINY + +s/^ //mg for values %fatpacked; + +unshift @INC, sub { + if (my $fat = $fatpacked{$_[1]}) { + if ($] < 5.008) { + return sub { + return 0 unless length $fat; + $fat =~ s/^([^\n]*\n?)//; + $_ = $1; + return 1; + }; + } + open my $fh, '<', \$fat + or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; + return $fh; + } + return +}; + +} # END OF FATPACK CODE + + +use 5.018; # same major version as target perl +use strict; +use warnings; +use Fatal qw(open close); + +use Getopt::Long; +use Pod::Usage; +use File::Basename; +use Module::CoreList; +use MetaCPAN::API::Tiny; + +my ($help, $man, $quiet, $force, $recommend); +GetOptions( 'help|?' => \$help, + 'man' => \$man, + 'quiet|q' => \$quiet, + 'force|f' => \$force, + 'recommend' => \$recommend +) or pod2usage(-exitval => 1); +pod2usage(-exitval => 0) if $help; +pod2usage(-exitval => 0, -verbose => 2) if $man; +pod2usage(-exitval => 1) if scalar @ARGV == 0; + +my %dist; # name -> metacpan data +my %need_target; # name -> 1 if target package is needed +my %need_host; # name -> 1 if host package is needed +my %deps_build; # name -> list of host dependencies +my %deps_runtime; # name -> list of target dependencies +my $mcpan = MetaCPAN::API::Tiny->new(); + +sub fetch { + my ($name, $need_target, $need_host) = @_; + $need_target{$name} = $need_target if $need_target; + $need_host{$name} = $need_host if $need_host; + unless ($dist{$name}) { + say qq{fetch ${name}} unless $quiet; + my $result = $mcpan->release( distribution => $name ); + $dist{$name} = $result; + my @deps_build = (); + my @deps_runtime = (); + my $mb; + foreach my $dep (@{$result->{dependency}}) { + my $modname = ${$dep}{module}; + $mb = 1 if $modname eq q{Module::Build}; + # Module::Build has a special treatment, because it is a core module, + # but some module require a very recent version of it + next if $modname eq q{perl}; + next if $modname =~ m|^Alien|; + next if $modname =~ m|^Win32|; + next if Module::CoreList::first_release( $modname ); + # we could use the host Module::CoreList data, because host perl and + # target perl have the same major version + next if ${$dep}{phase} eq q{develop}; + next if ${$dep}{phase} eq q{test}; + next if !$recommend && ${$dep}{relationship} ne q{requires}; + my $distname = $mcpan->module( $modname )->{distribution}; + if (${$dep}{phase} eq q{runtime}) { + push @deps_runtime, $distname; + } + else { # configure, build + push @deps_build, $distname; + } + } + unshift @deps_build, q{Module-Build} if $mb; + $deps_build{$name} = \@deps_build; + $deps_runtime{$name} = \@deps_runtime; + } + foreach my $distname (@{$deps_build{$name}}) { + fetch( $distname, 0, 1 ); + } + foreach my $distname (@{$deps_runtime{$name}}) { + fetch( $distname, $need_target, $need_host ); + } + return; +} + +foreach my $distname (@ARGV) { + # Command-line's distributions are needed for target, not host + fetch( $distname, 1, 0 ); +} +say scalar keys %dist, q{ packages fetched.} unless $quiet; + +# Buildroot package name: lowercase +sub fsname { + my $name = shift; + return q{perl-} . lc $name; +} + +# Buildroot variable name: uppercase +sub brname { + my $name = shift; + $name =~ s|-|_|g; + return uc $name; +} + +while (my ($distname, $dist) = each %dist) { + my $fsname = fsname( $distname ); + my $dirname = q{package/} . $fsname; + my $cfgname = $dirname . q{/Config.in}; + my $mkname = $dirname . q{/} . $fsname . q{.mk}; + my $brname = brname( $fsname ); + mkdir $dirname unless -d $dirname; + if ($need_target{$distname} && ($force || !-f $cfgname)) { + my $abstract = $dist->{abstract}; + say qq{write ${cfgname}} unless $quiet; + open my $fh, q{>}, $cfgname; + say {$fh} qq{config BR2_PACKAGE_${brname}}; + say {$fh} qq{\tbool "${fsname}"}; + foreach my $dep (@{$deps_runtime{$distname}}) { + my $brdep = brname( fsname( $dep ) ); + say {$fh} qq{\tselect BR2_PACKAGE_${brdep}}; + } + say {$fh} qq{\thelp} if $abstract; + say {$fh} qq{\t ${abstract}} if $abstract; + close $fh; + } + if ($force || !-f $mkname) { + my $version = $dist->{version}; + my($path) = $dist->{download_url} =~ m|^[^:/?#]+://[^/?#]*([^?#]*)|; + # this URL contains only the scheme, auth and path parts (but no query and fragment parts) + # the scheme is not used, because the job is done by the BR download infrastructure + # the auth part is not used, because we use $(BR2_CPAN_MIRROR) + my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} ); + my $dependencies = join q{ }, map( { q{host-} . fsname( $_ ); } @{$deps_build{$distname}} ), + map( { fsname( $_ ); } @{$deps_runtime{$distname}} ); + my $host_dependencies = join q{ }, map { q{host-} . fsname( $_ ); } @{$deps_build{$distname}}, + @{$deps_runtime{$distname}}; + my $license = ref $dist->{license} eq 'ARRAY' + ? join q{ or }, @{$dist->{license}} + : $dist->{license}; + $license = q{Artistic or GPLv1+} if $license eq q{perl_5}; + say qq{write ${mkname}} unless $quiet; + open my $fh, q{>}, $mkname; + say {$fh} qq{################################################################################}; + say {$fh} qq{#}; + say {$fh} qq{# ${fsname}}; + say {$fh} qq{#}; + say {$fh} qq{################################################################################}; + say {$fh} qq{}; + say {$fh} qq{${brname}_VERSION = ${version}}; + say {$fh} qq{${brname}_SOURCE = ${distname}-\$(${brname}_VERSION).${suffix}}; + say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}}; + say {$fh} qq{${brname}_DEPENDENCIES = perl ${dependencies}} if $need_target{$distname}; + say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}} if $need_host{$distname}; + say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown}; + say {$fh} qq{}; + say {$fh} qq{\$(eval \$(perl-package))} if $need_target{$distname}; + say {$fh} qq{\$(eval \$(host-perl-package))} if $need_host{$distname}; + close $fh; + } +} + +my %pkg; +my $cfgname = q{package/Config.in}; +if (-f $cfgname) { + open my $fh, q{<}, $cfgname; + while (<$fh>) { + chomp; + $pkg{$_} = 1 if m|package/perl-|; + } + close $fh; +} + +foreach my $distname (keys %need_target) { + my $fsname = fsname( $distname ); + $pkg{qq{source "package/${fsname}/Config.in"}} = 1; +} + +say qq{${cfgname} must contain the following lines:}; +say join qq{\n}, sort keys %pkg; + +__END__ + +=head1 NAME + +support/scripts/scancpan Try-Tiny Moo + +=head1 SYNOPSIS + +curl -kL http://install.perlbrew.pl | bash + +perlbrew install perl-5.18.2 + +supports/scripts/scancpan [options] [distname ...] + + Options: + -help + -man + -quiet + -force + -recommend + +=head1 OPTIONS + +=over 8 + +=item B<-help> + +Prints a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=item B<-quiet> + +Executes without output + +=item B<-force> + +Forces the overwriting of existing files. + +=item B<-recommend> + +Adds I dependencies. + +=back + +=head1 DESCRIPTION + +This script creates templates of the Buildroot package files for all the +Perl/CPAN distributions required by the specified distnames. The +dependencies and metadata are fetched from https://metacpan.org/. + +After running this script, it is necessary to check the generated files. +You have to manually enable the host- version if you need it. You have to +manually add the license files (PERL_FOO_LICENSE_FILES variable). For +distributions that link against a target library, you have to add the +buildroot package name for that library to the DEPENDENCIES variable. + +See the Buildroot documentation for details on the usage of the Perl +infrastructure. + +The major version of the host perl must be aligned on the target one, +in order to work with the right CoreList data. + +=head1 LICENSE + +Copyright (C) 2013-2014 by Francois Perrad + +This program 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. + +This program 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 this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +This script is a part of Buildroot. + +This script requires the module C (version 1.131730) +which was included at the beginning of this file by the tool C. + +See L. + +See L. + +These both libraries are free software and may be distributed under the same +terms as perl itself. + +And perl may be distributed under the terms of Artistic v1 or GPL v1 license. + +=cut From c16bc1b12ff334eec117f6c1835d7005eceaa5f9 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 25 Feb 2014 10:30:28 +0100 Subject: [PATCH 095/107] libpng: bump to version 1.6.9 This also fixes the download URL as oudated versions have been moved to the "older-releases" sub-folder. Signed-off-by: Sven Neumann Signed-off-by: Peter Korsgaard --- package/libpng/libpng.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk index f8b4d98fb2..0bfe7d1d1b 100644 --- a/package/libpng/libpng.mk +++ b/package/libpng/libpng.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBPNG_VERSION = 1.6.8 +LIBPNG_VERSION = 1.6.9 LIBPNG_SERIES = 16 LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.xz LIBPNG_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG_SERIES}/$(LIBPNG_VERSION) From 5cc2a89a45ddc34a5dbd863f924dfa12a8274395 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 4 Feb 2014 15:39:19 +0100 Subject: [PATCH 096/107] wpa_supplicant: rework .config file editing Do all substitutions on the .config file in a single sed command. Make the .config file editing a lot more readable. Based on ideas brought up by Arnout Vandecappelle on the mailing-list. Signed-off-by: Sven Neumann Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Arnout Vandecappelle (Essensium/Mind) (build-test with all features enabled) [Samuel: rebase on head of master] Signed-off-by: Samuel Martin Signed-off-by: Peter Korsgaard --- package/wpa_supplicant/wpa_supplicant.mk | 109 +++++++++-------------- 1 file changed, 40 insertions(+), 69 deletions(-) diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index 920f96a178..d2b21c2923 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -15,63 +15,57 @@ WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) +WPA_SUPPLICANT_CONFIG_EDITS = + +WPA_SUPPLICANT_CONFIG_SET = + +WPA_SUPPLICANT_CONFIG_ENABLE = \ + CONFIG_IEEE80211N \ + CONFIG_IEEE80211R \ + CONFIG_INTERWORKING \ + CONFIG_DELAYED_MIC \ + CONFIG_INTERNAL_LIBTOMMATH + +WPA_SUPPLICANT_CONFIG_DISABLE = \ + CONFIG_DRIVER_ATMEL \ + CONFIG_SMARTCARD + ifeq ($(BR2_PACKAGE_LIBNL),y) WPA_SUPPLICANT_DEPENDENCIES += libnl -define WPA_SUPPLICANT_LIBNL_CONFIG - echo 'CONFIG_LIBNL32=y' >>$(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_SET += CONFIG_LIBNL32 else -define WPA_SUPPLICANT_LIBNL_CONFIG - $(SED) 's/^\(CONFIG_DRIVER_NL80211.*\)/#\1/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_DRIVER_NL80211 endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) -define WPA_SUPPLICANT_EAP_CONFIG - $(SED) 's/\(#\)\(CONFIG_EAP_AKA.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_FAST.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_GPSK.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_IKEV2.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_PAX.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_PSK.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_SAKE.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_SIM.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_TNC.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_TLSV1.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_AKA \ + CONFIG_EAP_FAST \ + CONFIG_EAP_GPSK \ + CONFIG_EAP_IKEV2 \ + CONFIG_EAP_PAX \ + CONFIG_EAP_PSK \ + CONFIG_EAP_SAKE \ + CONFIG_EAP_SIM \ + CONFIG_EAP_TNC else -define WPA_SUPPLICANT_EAP_CONFIG - $(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT),y) -define WPA_SUPPLICANT_AP_CONFIG - echo 'CONFIG_AP=y' >>$(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_SET += CONFIG_AP endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS),y) -define WPA_SUPPLICANT_WPS_CONFIG - $(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_WPS endif -define WPA_SUPPLICANT_LIBTOMMATH_CONFIG - $(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef - # Try to use openssl if it's already available ifeq ($(BR2_PACKAGE_OPENSSL),y) WPA_SUPPLICANT_DEPENDENCIES += openssl -define WPA_SUPPLICANT_TLS_CONFIG - $(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/' + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_PWD else -define WPA_SUPPLICANT_TLS_CONFIG - $(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/' endif ifeq ($(BR2_PACKAGE_DBUS),y) @@ -81,9 +75,7 @@ ifeq ($(BR2_PACKAGE_DBUS),y) PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y) -define WPA_SUPPLICANT_DBUS_OLD_CONFIG - $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS=\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS= define WPA_SUPPLICANT_INSTALL_DBUS_OLD $(INSTALL) -D \ $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \ @@ -92,9 +84,7 @@ endef endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y) -define WPA_SUPPLICANT_DBUS_NEW_CONFIG - $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_NEW=\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_NEW define WPA_SUPPLICANT_INSTALL_DBUS_NEW $(INSTALL) -D \ $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ @@ -103,17 +93,9 @@ endef endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) -define WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG - $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_INTRO=\)/\2/' $(WPA_SUPPLICANT_CONFIG) -endef + WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_INTRO endif -define WPA_SUPPLICANT_DBUS_CONFIG - $(WPA_SUPPLICANT_DBUS_OLD_CONFIG) - $(WPA_SUPPLICANT_DBUS_NEW_CONFIG) - $(WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG) -endef - endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG),y) @@ -124,22 +106,11 @@ endif define WPA_SUPPLICANT_CONFIGURE_CMDS cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_HS20.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_IEEE80211N.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_IEEE80211R.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_IEEE80211W.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_INTERWORKING.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(#\)\(CONFIG_DELAYED_MIC.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(CONFIG_DRIVER_ATMEL\)/#\1/' $(WPA_SUPPLICANT_CONFIG) - $(SED) 's/\(CONFIG_SMARTCARD\)/#\1/' $(WPA_SUPPLICANT_CONFIG) - $(WPA_SUPPLICANT_LIBTOMMATH_CONFIG) - $(WPA_SUPPLICANT_TLS_CONFIG) - $(WPA_SUPPLICANT_EAP_CONFIG) - $(WPA_SUPPLICANT_WPS_CONFIG) - $(WPA_SUPPLICANT_LIBNL_CONFIG) - $(WPA_SUPPLICANT_DBUS_CONFIG) - $(WPA_SUPPLICANT_AP_CONFIG) - $(WPA_SUPPLICANT_DEBUG_CONFIG) + sed -i $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \ + $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \ + $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \ + $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \ + $(WPA_SUPPLICANT_CONFIG) endef define WPA_SUPPLICANT_BUILD_CMDS From 5e35c1bedd55c044ab68f3b37738686a951eb9ce Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Mon, 24 Feb 2014 10:25:41 +0100 Subject: [PATCH 097/107] udev: update udev to new virtual package infra. The udev virtual package and its current providers (eudev and systemd) have been updated to use the latest version of virtual package infrastructure. A provider should now select BR2_PACKAGE_HAS_UDEV and well as set a value for BR2_PACKAGE_PROVIDES_UDEV. Signed-off-by: Eric Le Bihan Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/eudev/Config.in | 3 +++ package/systemd/Config.in | 3 +++ package/udev/Config.in | 8 ++++---- package/udev/udev.mk | 16 ++++------------ 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/package/eudev/Config.in b/package/eudev/Config.in index bfad99a271..40ff721826 100644 --- a/package/eudev/Config.in +++ b/package/eudev/Config.in @@ -21,6 +21,9 @@ config BR2_PACKAGE_EUDEV if BR2_PACKAGE_EUDEV +config BR2_PACKAGE_PROVIDES_UDEV + default "eudev" + config BR2_PACKAGE_EUDEV_RULES_GEN bool "enable rules generator" help diff --git a/package/systemd/Config.in b/package/systemd/Config.in index e3ea433728..eacc23cc6e 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -40,6 +40,9 @@ config BR2_PACKAGE_SYSTEMD if BR2_PACKAGE_SYSTEMD +config BR2_PACKAGE_PROVIDES_UDEV + default "systemd" + config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS bool "enable all extras" select BR2_PACKAGE_XZ diff --git a/package/udev/Config.in b/package/udev/Config.in index 5cd4051621..941a5152ff 100644 --- a/package/udev/Config.in +++ b/package/udev/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_HAS_UDEV bool - help - udev is now a virtual package. - Packages requiring udevd at run time or libudev/gudev at build time - should select it. + +config BR2_PACKAGE_PROVIDES_UDEV + depends on BR2_PACKAGE_HAS_UDEV + string diff --git a/package/udev/udev.mk b/package/udev/udev.mk index a5d0f800ca..f5eeeb494b 100644 --- a/package/udev/udev.mk +++ b/package/udev/udev.mk @@ -5,20 +5,12 @@ ################################################################################ UDEV_SOURCE = +UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV)) -ifeq ($(BR2_PACKAGE_EUDEV),y) -UDEV_DEPENDENCIES += eudev -endif - -ifeq ($(BR2_PACKAGE_SYSTEMD),y) -UDEV_DEPENDENCIES += systemd -endif - +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) ifeq ($(UDEV_DEPENDENCIES),) -define UDEV_CONFIGURE_CMDS - echo "No Udev implementation selected. Configuration error." - exit 1 -endef +$(error No Udev implementation selected. Configuration error) +endif endif $(eval $(generic-package)) From 4c10eedc103ba9648f73439f1ab5d801da9d2ed7 Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Mon, 24 Feb 2014 10:25:42 +0100 Subject: [PATCH 098/107] systemd: enable required kernel features. When systemd is chosen as init system, the required kernel features are enabled. Signed-off-by: Eric Le Bihan Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- linux/linux.mk | 6 +++++- package/systemd/Config.in | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index d7f51b3ec8..f948e6c552 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -195,7 +195,11 @@ define LINUX_CONFIGURE_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config)) $(if $(BR2_PACKAGE_SYSTEMD), $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_XATTR,$(@D)/.config)) $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig diff --git a/package/systemd/Config.in b/package/systemd/Config.in index eacc23cc6e..4f180a11f0 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -26,8 +26,20 @@ config BR2_PACKAGE_SYSTEMD elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit. - Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs, - tmpfs vfs and tmpfs POSIX ACL enabled. + Systemd requires a Linux kernel >= 3.0 with the following options + enabled: + + - CONFIG_CGROUPS + - CONFIG_INOTIFY_USER + - CONFIG_FHANDLE + - CONFIG_AUTOFS4_FS + - CONFIG_TMPFS_POSIX_ACL + - CONFIG_TMPFS_XATTR + + These options will be automatically enabled by Buildroot if + it is responsible for building the kernel. Otherwise, if you + are building your kernel outside of Buildroot, make sure + these options are enabled. Systemd also provides udev, the userspace device daemon. From f72fe5736c806e6079830f3d953dc9875827b86b Mon Sep 17 00:00:00 2001 From: "eric.le.bihan.dev@free.fr" Date: Tue, 25 Feb 2014 16:45:36 +0100 Subject: [PATCH 099/107] packages: improve dependency check in virtual packages. The current version of dependency check for virtual package defines FOO_CONFIGURE_CMDS to print an error message if the dependencies are not met. This patch updates all the virtual packages to use the GNU Make control function $(error text...) instead. This makes the error happen at the beginning of the build, with a clearer message. Signed-off-by: Eric Le Bihan Reviewed-by: "Yann E. MORIN" Reviewed-by: Samuel Martin Signed-off-by: Peter Korsgaard --- package/luainterpreter/luainterpreter.mk | 6 ++++++ package/opengl/libegl/libegl.mk | 7 +++---- package/opengl/libgles/libgles.mk | 7 +++---- package/opengl/libopenmax/libopenmax.mk | 7 +++---- package/opengl/libopenvg/libopenvg.mk | 7 +++---- package/powervr/powervr.mk | 7 +++---- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk index c37d621b71..5443477054 100644 --- a/package/luainterpreter/luainterpreter.mk +++ b/package/luainterpreter/luainterpreter.mk @@ -9,4 +9,10 @@ LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUA_INTERPRET LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION)) +ifeq ($(BR2_PACKAGE_HAS_LUA_INTERPRETER),y) +ifeq ($(LUAINTERPRETER_DEPENDENCIES),) +$(error No lua interpreter implementation selected. Configuration error.) +endif +endif + $(eval $(generic-package)) diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk index b2b74f13a7..3311e50104 100644 --- a/package/opengl/libegl/libegl.mk +++ b/package/opengl/libegl/libegl.mk @@ -7,11 +7,10 @@ LIBEGL_SOURCE = LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_EGL)) +ifeq ($(BR2_PACKAGE_HAS_OPENGL_EGL),y) ifeq ($(LIBEGL_DEPENDENCIES),) -define LIBEGL_CONFIGURE_CMDS - echo "No libEGL implementation selected. Configuration error." - exit 1 -endef +$(error No libEGL implementation selected. Configuration error.) +endif endif $(eval $(generic-package)) diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk index 0dcbaa7ddb..7a07e37193 100644 --- a/package/opengl/libgles/libgles.mk +++ b/package/opengl/libgles/libgles.mk @@ -7,11 +7,10 @@ LIBGLES_SOURCE = LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_ES)) +ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y) ifeq ($(LIBGLES_DEPENDENCIES),) -define LIBGLES_CONFIGURE_CMDS - echo "No libGLES implementation selected. Configuration error." - exit 1 -endef +$(error No libGLES implementation selected. Configuration error.) +endif endif $(eval $(generic-package)) diff --git a/package/opengl/libopenmax/libopenmax.mk b/package/opengl/libopenmax/libopenmax.mk index c4f1f7117d..a2bd23d2ae 100644 --- a/package/opengl/libopenmax/libopenmax.mk +++ b/package/opengl/libopenmax/libopenmax.mk @@ -7,11 +7,10 @@ LIBOPENMAX_SOURCE = LIBOPENMAX_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENMAX)) +ifeq ($(BR2_PACKAGE_HAS_OPENMAX),y) ifeq ($(LIBOPENMAX_DEPENDENCIES),) -define LIBOPENMAX_CONFIGURE_CMDS - echo "No libopenmax implementation selected. Configuration error." - exit 1 -endef +$(error No libopenmax implementation selected. Configuration error.) +endif endif $(eval $(generic-package)) diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk index ffd9d6861e..f81db5ef16 100644 --- a/package/opengl/libopenvg/libopenvg.mk +++ b/package/opengl/libopenvg/libopenvg.mk @@ -7,11 +7,10 @@ LIBOPENVG_SOURCE = LIBOPENVG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENVG)) +ifeq ($(BR2_PACKAGE_HAS_OPENVG),y) ifeq ($(LIBOPENVG_DEPENDENCIES),) -define LIBOPENVG_CONFIGURE_CMDS - echo "No libOpenVG implementation selected. Configuration error." - exit 1 -endef +$(error No libOpenVG implementation selected. Configuration error.) +endif endif $(eval $(generic-package)) diff --git a/package/powervr/powervr.mk b/package/powervr/powervr.mk index 1f43505611..b36eb16b0a 100644 --- a/package/powervr/powervr.mk +++ b/package/powervr/powervr.mk @@ -7,11 +7,10 @@ POWERVR_SOURCE = POWERVR_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_POWERVR)) +ifeq ($(BR2_PACKAGE_HAS_POWERVR),y) ifeq ($(POWERVR_DEPENDENCIES),) -define POWERVR_CONFIGURE_CMDS - echo "No PowerVR implementation selected. Configuration error." - exit 1 -endef +$(error No PowerVR implementation selected. Configuration error.) +endif endif $(eval $(generic-package)) From b553ffe8dc38d285e0730ed9e6b16a6117ccab66 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 25 Feb 2014 17:15:42 -0300 Subject: [PATCH 100/107] php: bump to version 5.5.9 Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/php/php.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/php/php.mk b/package/php/php.mk index 2f6280fc72..f01e131263 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -4,7 +4,7 @@ # ################################################################################ -PHP_VERSION = 5.5.8 +PHP_VERSION = 5.5.9 PHP_SITE = http://www.php.net/distributions PHP_INSTALL_STAGING = YES PHP_INSTALL_STAGING_OPT = INSTALL_ROOT=$(STAGING_DIR) install From 7f6a380b1800f209ddefd729cc13837932451a65 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 25 Feb 2014 17:16:05 -0300 Subject: [PATCH 101/107] php-gnupg: new package Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/Config.in | 1 + package/php-gnupg/Config.in | 9 +++++++++ package/php-gnupg/php-gnupg.mk | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 package/php-gnupg/Config.in create mode 100644 package/php-gnupg/php-gnupg.mk diff --git a/package/Config.in b/package/Config.in index 543c7a64f1..fd081fd4a7 100644 --- a/package/Config.in +++ b/package/Config.in @@ -400,6 +400,7 @@ source "package/php/Config.in" if BR2_PACKAGE_PHP if !BR2_PREFER_STATIC_LIB menu "External php extensions" +source "package/php-gnupg/Config.in" source "package/php-imagick/Config.in" source "package/php-ssh2/Config.in" source "package/php-yaml/Config.in" diff --git a/package/php-gnupg/Config.in b/package/php-gnupg/Config.in new file mode 100644 index 0000000000..49fb43b5eb --- /dev/null +++ b/package/php-gnupg/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PHP_GNUPG + bool "php-gnupg" + depends on BR2_PACKAGE_PHP + depends on BR2_USE_MMU # libassuan + select BR2_PACKAGE_LIBGPGME + help + PHP wrapper around the gpgme library. + + http://pecl.php.net/package/gnupg diff --git a/package/php-gnupg/php-gnupg.mk b/package/php-gnupg/php-gnupg.mk new file mode 100644 index 0000000000..5fc1dc4973 --- /dev/null +++ b/package/php-gnupg/php-gnupg.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# php-gnupg +# +################################################################################ + +PHP_GNUPG_VERSION = 1.3.3 +PHP_GNUPG_SOURCE = gnupg-$(PHP_GNUPG_VERSION).tgz +PHP_GNUPG_SITE = http://pecl.php.net/get +# phpize does the autoconf magic +PHP_GNUPG_DEPENDENCIES = php libgpgme host-autoconf host-pkgconf +PHP_GNUPG_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config +PHP_GNUPG_LICENSE = BSD-2c +PHP_GNUPG_LICENSE_FILES = LICENSE + +define PHP_GNUPG_PHPIZE + (cd $(@D); \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_GNUPG_PRE_CONFIGURE_HOOKS += PHP_GNUPG_PHPIZE + +$(eval $(autotools-package)) From 14dc1ef762e365fe5a7535c416adbbdecc21199f Mon Sep 17 00:00:00 2001 From: "Derycke, Johan" Date: Wed, 26 Feb 2014 10:04:16 +0000 Subject: [PATCH 102/107] monit: bump to version 5.7 CHANGES version 5.7: https://mmonit.com/monit/dist/CHANGES.txt Signed-off-by: Johan Derycke Signed-off-by: Peter Korsgaard --- package/monit/monit.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/monit/monit.mk b/package/monit/monit.mk index ec7c95d897..3fdc17e249 100644 --- a/package/monit/monit.mk +++ b/package/monit/monit.mk @@ -4,7 +4,7 @@ # ################################################################################ -MONIT_VERSION = 5.6 +MONIT_VERSION = 5.7 MONIT_SITE = http://mmonit.com/monit/dist/ MONIT_LICENSE = AGPLv3 with OpenSSL exception MONIT_LICENSE_FILES = COPYING From 1a52145ac3a0099f1882dc3a0713f2efa160d0a6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 26 Feb 2014 19:43:14 +0100 Subject: [PATCH 103/107] package/ti-gfx: number and fix the new-clk-api patch Add a sequence number to the newclkapi patch. Rebase it ontop of the 5.01.00.01 release. Note: this is barely tested. It applies neatly, but I can't test it, since I do not have the hardware. I bumped the patch by basically renaming the problematic functions like the previous patch did: s/clk_enable/clk_prepare_enable/ s/clk_disable/clk_disable_unprepare/ Signed-off-by: "Yann E. MORIN" Cc: Spenser Gilliland Signed-off-by: Peter Korsgaard --- ...kapi.patch => ti-gfx-0000-newclkapi.patch} | 83 +++++++------------ 1 file changed, 29 insertions(+), 54 deletions(-) rename package/ti-gfx/{ti-gfx-newclkapi.patch => ti-gfx-0000-newclkapi.patch} (57%) diff --git a/package/ti-gfx/ti-gfx-newclkapi.patch b/package/ti-gfx/ti-gfx-0000-newclkapi.patch similarity index 57% rename from package/ti-gfx/ti-gfx-newclkapi.patch rename to package/ti-gfx/ti-gfx-0000-newclkapi.patch index 8f50c7ee12..69574c15f4 100644 --- a/package/ti-gfx/ti-gfx-newclkapi.patch +++ b/package/ti-gfx/ti-gfx-0000-newclkapi.patch @@ -2,15 +2,15 @@ This patch adjusts the omap3630 portion of the powervr driver to use the new clk kernel api. Signed-off-by: Spenser Gilliland ----- -Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c -=================================================================== ---- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-06-28 13:44:06.352701522 -0500 -+++ ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-06-28 13:45:12.364702727 -0500 -@@ -153,6 +153,49 @@ - psTimingInfo->ui32ActivePowManLatencyms = SYS_SGX_ACTIVE_POWER_LATENCY_MS; - } +[yann.morin.1998@free.fr: rebased ontop of 5.01.00.01] +Signed-off-by: "Yann E. MORIN" +diff -durN ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +--- ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-12-23 15:44:20.000000000 +0100 ++++ ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2014-02-26 19:17:39.829571846 +0100 +@@ -182,6 +182,49 @@ + @Return PVRSRV_ERROR + ******************************************************************************/ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_disable_unprepare(struct clk *clk) +{ @@ -57,50 +57,25 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData) { #if !defined(NO_HARDWARE) -@@ -167,19 +210,19 @@ +@@ -198,7 +241,7 @@ - PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks")); - -- res=clk_enable(psSysSpecData->psSGX_FCK); -+ res=clk_prepare_enable(psSysSpecData->psSGX_FCK); - if (res < 0) - { - PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res)); - return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK; - } - -- res=clk_enable(psSysSpecData->psSGX_ICK); -+ res=clk_prepare_enable(psSysSpecData->psSGX_ICK); + #if !defined(PM_RUNTIME_SUPPORT) + PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks")); +- res=clk_enable(psSysSpecData->psSGX_FCK); ++ res=clk_prepare_enable(psSysSpecData->psSGX_FCK); if (res < 0) { - PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX interface clock (%d)", res)); + PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res)); +@@ -324,7 +367,7 @@ -- clk_disable(psSysSpecData->psSGX_FCK); -+ clk_disable_unprepare(psSysSpecData->psSGX_FCK); - return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK; - } - -@@ -233,7 +276,6 @@ - return PVRSRV_OK; - } - -- - IMG_VOID DisableSGXClocks(SYS_DATA *psSysData) - { - #if !defined(NO_HARDWARE) -@@ -246,9 +288,9 @@ - PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks")); - -- clk_disable(psSysSpecData->psSGX_FCK); -+ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + #if !defined(PM_RUNTIME_SUPPORT) +- clk_disable(psSysSpecData->psSGX_FCK); ++ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + #endif + SysDisableSGXInterrupts(psSysData); -- clk_disable(psSysSpecData->psSGX_ICK); -+ clk_disable_unprepare(psSysSpecData->psSGX_ICK); - - // SysDisableSGXInterrupts(psSysData); - -@@ -374,14 +416,14 @@ +@@ -540,14 +583,14 @@ rate = clk_get_rate(psSysSpecData->psGPT11_FCK); PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate))); @@ -117,27 +92,27 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c if (res < 0) { PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res)); -@@ -444,9 +486,9 @@ +@@ -610,9 +653,9 @@ ExitDisableGPT11ICK: - #if defined(PVR_OMAP3_TIMING_PRCM) + #if defined(PVR_OMAP4_TIMING_PRCM) - clk_disable(psSysSpecData->psGPT11_ICK); + clk_disable_unprepare(psSysSpecData->psGPT11_ICK); ExitDisableGPT11FCK: - clk_disable(psSysSpecData->psGPT11_FCK); + clk_disable_unprepare(psSysSpecData->psGPT11_FCK); ExitError: - #endif + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED; -@@ -490,9 +532,9 @@ +@@ -664,9 +707,9 @@ + psSysSpecData->sTimerRegPhysBase.uiAddr = 0; #endif - - #if defined(PVR_OMAP3_TIMING_PRCM) + #if defined(PVR_OMAP4_TIMING_PRCM) - clk_disable(psSysSpecData->psGPT11_ICK); + clk_disable_unprepare(psSysSpecData->psGPT11_ICK); - clk_disable(psSysSpecData->psGPT11_FCK); + clk_disable_unprepare(psSysSpecData->psGPT11_FCK); - #endif + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ } - #endif + #endif /* PVR_OMAP_USE_DM_TIMER_API */ From 066a464aa14aec1abd38e5cc786efaef36a3c556 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 26 Feb 2014 19:40:03 +0100 Subject: [PATCH 104/107] package/ti-gfx: do not forcefully remove source dir on extract ti-gfx uses custom extract commands, which first and foremost removes the source dir unconditionally. Thee side-effect of this is that make will re-extract, re-patch and probably re-build ti-gfx at each run. Signed-off-by: "Yann E. MORIN" Cc: Spenser Gilliland Signed-off-by: Peter Korsgaard --- package/ti-gfx/ti-gfx.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/ti-gfx/ti-gfx.mk b/package/ti-gfx/ti-gfx.mk index 5ea6b929e5..e48715d8dc 100644 --- a/package/ti-gfx/ti-gfx.mk +++ b/package/ti-gfx/ti-gfx.mk @@ -90,7 +90,6 @@ TI_GFX_HDR_DIRS = OGLES2/EGL OGLES2/EWS OGLES2/GLES2 OGLES2/KHR \ OGLES/GLES bufferclass_ti/ pvr2d/ wsegl/ define TI_GFX_EXTRACT_CMDS - $(RM) -rf $(TI_GFX_DIR) chmod +x $(DL_DIR)/$(TI_GFX_SOURCE) printf "Y\nY\n qY\n\n" | $(DL_DIR)/$(TI_GFX_SOURCE) \ --prefix $(@D) \ From bd59a5dafa97a9e43d995b33163f3856644485ac Mon Sep 17 00:00:00 2001 From: Simon Dawson Date: Wed, 26 Feb 2014 17:56:53 +0000 Subject: [PATCH 105/107] libtpl: remove unnecessary autoreconf options The default $(PKG)_AUTORECONF_OPT already includes the -i and -f flags, so there is no point in specifying these in the package makefile. Signed-off-by: Simon Dawson Signed-off-by: Peter Korsgaard --- package/libtpl/libtpl.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/libtpl/libtpl.mk b/package/libtpl/libtpl.mk index ff05991395..1d4becf4b0 100644 --- a/package/libtpl/libtpl.mk +++ b/package/libtpl/libtpl.mk @@ -11,7 +11,6 @@ LIBTPL_LICENSE = BSD-like LIBTPL_LICENSE_FILES = LICENSE LIBTPL_AUTORECONF = YES -LIBTPL_AUTORECONF_OPT = --install --force define LIBTPL_CREATE_MISSING_FILES touch $(@D)/NEWS $(@D)/AUTHORS $(@D)/ChangeLog $(@D)/COPYING From c06693f7a8a2625e02903aae2693f51cb36072a7 Mon Sep 17 00:00:00 2001 From: Simon Dawson Date: Wed, 26 Feb 2014 17:59:12 +0000 Subject: [PATCH 106/107] giblib: remove unnecessary autoreconf options The default $(PKG)_AUTORECONF_OPT already includes the -i flag, so there is no point in specifying this in the package makefile. Signed-off-by: Simon Dawson Signed-off-by: Peter Korsgaard --- package/giblib/giblib.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/giblib/giblib.mk b/package/giblib/giblib.mk index b955943e47..6d1ebb84f9 100644 --- a/package/giblib/giblib.mk +++ b/package/giblib/giblib.mk @@ -9,7 +9,6 @@ GIBLIB_SITE = http://linuxbrit.co.uk/downloads/ GIBLIB_INSTALL_STAGING = YES GIBLIB_DEPENDENCIES = imlib2 GIBLIB_AUTORECONF = YES -GIBLIB_AUTORECONF_OPT = --install GIBLIB_CONF_OPT = --with-imlib2-prefix=$(STAGING_DIR)/usr \ --with-imlib2-exec-prefix=$(STAGING_DIR)/usr GIBLIB_CONFIG_SCRIPTS = giblib-config From 9e40a1005f51d10784db295797ed270a130d79d5 Mon Sep 17 00:00:00 2001 From: Simon Dawson Date: Wed, 26 Feb 2014 18:00:49 +0000 Subject: [PATCH 107/107] zyre: remove unnecessary autoreconf options The default $(PKG)_AUTORECONF_OPT already includes the -i and -f flags, so there is no point in specifying these in the package makefile. Further, the -v option to autoreconf is not required. Signed-off-by: Simon Dawson Signed-off-by: Peter Korsgaard --- package/zyre/zyre.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/package/zyre/zyre.mk b/package/zyre/zyre.mk index 405697ad44..66952aa8bc 100644 --- a/package/zyre/zyre.mk +++ b/package/zyre/zyre.mk @@ -11,7 +11,6 @@ ZYRE_LICENSE_FILES = COPYING COPYING.LESSER ZYRE_INSTALL_STAGING = YES ZYRE_DEPENDENCIES = filemq ZYRE_AUTORECONF = YES -ZYRE_AUTORECONF_OPT = --install --force --verbose define ZYRE_CREATE_CONFIG_DIR mkdir -p $(@D)/config