* [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name
@ 2020-01-22 6:38 Khem Raj
2020-01-22 6:38 ` [meta-networking][PATCH 02/12] crda: Fix build with python3 Khem Raj
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Lets this inc file become usable for py3 module as well
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-python/recipes-devtools/python/python-m2crypto.inc b/meta-python/recipes-devtools/python/python-m2crypto.inc
index 5f5444f37e..76dd58ce04 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto.inc
+++ b/meta-python/recipes-devtools/python/python-m2crypto.inc
@@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
inherit pypi siteinfo
DEPENDS += "openssl swig-native"
-RDEPENDS_${PN} += "python-typing"
+RDEPENDS_${PN} += "${PYTHON_PN}-typing"
DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-networking][PATCH 02/12] crda: Fix build with python3
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 03/12] lio-utils: Make it visible only with meta-py2 in BBFILE_COLLECTIONS Khem Raj
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../crda/crda/crda-4.14-python-3.patch | 101 ++++++++++++++++++
.../recipes-connectivity/crda/crda_3.18.bb | 3 +-
2 files changed, 103 insertions(+), 1 deletion(-)
create mode 100644 meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
diff --git a/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch b/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
new file mode 100644
index 0000000000..9125d0ab97
--- /dev/null
+++ b/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch
@@ -0,0 +1,101 @@
+Imported from Gentoo
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c50acec16bc7c33d6dc122c007d713e7fbecf9c
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/utils/key2pub.py
++++ b/utils/key2pub.py
+@@ -1,22 +1,22 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ import sys
+ try:
+ from M2Crypto import RSA
+-except ImportError, e:
++except ImportError as e:
+ sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
+ sys.stderr.write('Please install the "M2Crypto" Python module.\n')
+ sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
+ sys.exit(1)
+
+ def print_ssl_64(output, name, val):
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ while len(val) % 8:
+- val = '\0' + val
++ val = b'\0' + val
+ vnew = []
+ while len(val):
+- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8]))
+ val = val[8:]
+ vnew.reverse()
+ output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val):
+ output.write('};\n\n')
+
+ def print_ssl_32(output, name, val):
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ while len(val) % 4:
+- val = '\0' + val
++ val = b'\0' + val
+ vnew = []
+ while len(val):
+- vnew.append((val[0], val[1], val[2], val[3], ))
++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4]))
+ val = val[4:]
+ vnew.reverse()
+ output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
+@@ -81,21 +81,21 @@ struct pubkey {
+
+ static struct pubkey keys[] __attribute__((unused))= {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+ pass
+
+ def print_gcrypt(output, name, val):
+ output.write('#include <stdint.h>\n')
+- while val[0] == '\0':
++ while val[0:1] == b'\0':
+ val = val[1:]
+ output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
+ idx = 0
+ for v in val:
+ if not idx:
+ output.write('\t')
+- output.write('0x%.2x, ' % ord(v))
++ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v)))
+ idx += 1
+ if idx == 8:
+ idx = 0
+@@ -118,7 +118,7 @@ struct key_params {
+
+ static const struct key_params keys[] __attribute__((unused))= {
+ ''')
+- for n in xrange(n + 1):
++ for n in range(n + 1):
+ output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
+ output.write('};\n')
+
+@@ -136,7 +136,7 @@ except IndexError:
+ mode = None
+
+ if not mode in modes:
+- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
++ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())))
+ sys.exit(2)
+
+ output = open(outfile, 'w')
+@@ -154,3 +154,5 @@ for f in files:
+ idx += 1
+
+ modes[mode][1](output, idx - 1)
++
++output.close()
diff --git a/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-networking/recipes-connectivity/crda/crda_3.18.bb
index d3c00424db..b380eaf94e 100644
--- a/meta-networking/recipes-connectivity/crda/crda_3.18.bb
+++ b/meta-networking/recipes-connectivity/crda/crda_3.18.bb
@@ -4,7 +4,7 @@ SECTION = "net"
LICENSE = "copyleft-next-0.3.0"
LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe"
-DEPENDS = "python-m2crypto-native python-typing-native python-native libnl libgcrypt"
+DEPENDS = "python3-m2crypto-native libnl libgcrypt"
SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
file://do-not-run-ldconfig-if-destdir-is-set.patch \
@@ -14,6 +14,7 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \
file://make.patch \
file://use-target-word-size-instead-of-host-s.patch \
file://fix-issues-when-USE_OPENSSL-1.patch \
+ file://crda-4.14-python-3.patch \
"
SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a"
SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 03/12] lio-utils: Make it visible only with meta-py2 in BBFILE_COLLECTIONS
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
2020-01-22 6:38 ` [meta-networking][PATCH 02/12] crda: Fix build with python3 Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 04/12] openlmi: Make it visible when meta-py2 is in layermix Khem Raj
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 59f1703f4d..cb4be4a8a1 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -241,7 +241,7 @@ RDEPENDS_packagegroup-meta-oe-support ="\
libgpiod libiio libjs-jquery libjs-sizzle liblinebreak libmicrohttpd \
libmxml liboauth libol liboop libp11 libraw1394 libsmi libsoc libssh2 \
libssh libtar libteam libtinyxml2 libtinyxml libusbg libusb-compat libutempter \
- links lio-utils lockdev log4c log4cpp logwarn libdevmapper lvm2 \
+ links lockdev log4c log4cpp logwarn libdevmapper lvm2 \
mailcap mbuffer mg minini \
multipath-tools nano neon nmon numactl onig openct openldap \
opensc wbxml2 p910nd pcsc-lite picocom libotr pidgin \
@@ -260,6 +260,7 @@ RDEPENDS_packagegroup-meta-oe-support ="\
procmail \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "udisks2 upower", "", d)} \
${NE10} \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "lio-utils", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-support_remove_arm ="numactl"
diff --git a/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb b/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
index 058117ed83..8e5986bd9e 100644
--- a/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
+++ b/meta-oe/recipes-support/lio-utils/lio-utils_4.1.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/Datera/lio-utils.git \
SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e"
S = "${WORKDIR}/git"
-inherit distutils3
+inherit distutils
EXTRA_OEMAKE += "DESTDIR=${D}"
@@ -64,3 +64,9 @@ FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*"
# http://errors.yoctoproject.org/Errors/Details/184712/
# python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
CLEANBROKEN = "1"
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
+
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 04/12] openlmi: Make it visible when meta-py2 is in layermix
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
2020-01-22 6:38 ` [meta-networking][PATCH 02/12] crda: Fix build with python3 Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 03/12] lio-utils: Make it visible only with meta-py2 in BBFILE_COLLECTIONS Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 05/12] rrdtool: Disable python packageconfig by default Khem Raj
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 2 +-
meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index cb4be4a8a1..baf1fa1d61 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -153,7 +153,7 @@ RDEPENDS_packagegroup-meta-oe-extended ="\
${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam-ssh-agent-auth openwsman sblim-sfcb ", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit polkit-group-rule-datetime ", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit-group-rule-network ", "", d)} \
- ${@bb.utils.contains("BBPATH", "meta-python", "openlmi-tools", "", d)} \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "openlmi-tools", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-extended_remove_mipsarch = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc = "upm mraa"
diff --git a/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb b/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb
index 513bd11acf..e1f376d0f3 100644
--- a/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb
+++ b/meta-oe/recipes-extended/openlmi/openlmi-tools_0.10.5.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://../COPYING;md5=75859989545e37968a99b631ef42722e"
SECTION = "System/Management"
-inherit setuptools3
+inherit setuptools
DEPENDS = "python3-native python3-pywbem-native python3-m2crypto python-pywbem"
@@ -21,6 +21,6 @@ do_configure_prepend() {
}
python() {
- if 'meta-python' not in d.getVar('BBFILE_COLLECTIONS').split():
- raise bb.parse.SkipRecipe('Requires meta-python to be present.')
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
}
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 05/12] rrdtool: Disable python packageconfig by default
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (2 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 04/12] openlmi: Make it visible when meta-py2 is in layermix Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 06/12] telepathy-idle: Disable when meta-py2 is not present Khem Raj
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
This needs python2 which is in another layer
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
index c7dbb6e39e..d96fe8131f 100644
--- a/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.7.2.bb
@@ -24,7 +24,7 @@ SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service"
EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
-PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
PACKAGECONFIG[python] = "--enable-python=yes \
am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 06/12] telepathy-idle: Disable when meta-py2 is not present
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (3 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 05/12] rrdtool: Disable python packageconfig by default Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 07/12] mysql-python: Enable only when meta-py2 is present Khem Raj
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb | 7 ++++++-
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb b/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
index 5eb00aefbe..42ce3301f5 100644
--- a/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
+++ b/meta-oe/recipes-connectivity/telepathy/telepathy-idle_0.2.0.bb
@@ -11,7 +11,12 @@ SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz
SRC_URI[md5sum] = "92a2de5198284cbd3c430b0d1a971a86"
SRC_URI[sha256sum] = "3013ad4b38d14ee630b8cc8ada5e95ccaa849b9a6fe15d2eaf6d0717d76f2fab"
-inherit autotools pkgconfig python3native
+inherit autotools pkgconfig pythonnative
FILES_${PN} += "${datadir}/telepathy \
${datadir}/dbus-1"
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index baf1fa1d61..f045167e8e 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -65,11 +65,12 @@ RDEPENDS_packagegroup-meta-oe-connectivity ="\
libuv libwebsockets linuxptp lirc loudmouth \
modemmanager mosh \
paho-mqtt-c phonet-utils rabbitmq-c rfkill rtorrent \
- ser2net smstools3 telepathy-glib telepathy-idle thrift \
+ ser2net smstools3 telepathy-glib thrift \
usbmuxd zabbix zeromq \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "obex-data-server", "", d)} \
libmikmod \
obexftp openobex libnet \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "telepathy-idle", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-connectivity_append_libc-glibc = " wvstreams wvdial"
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 07/12] mysql-python: Enable only when meta-py2 is present
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (4 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 06/12] telepathy-idle: Disable when meta-py2 is not present Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 08/12] hplip: Upgrade to 3.19.12 Khem Raj
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index f045167e8e..6dda3005e7 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -101,8 +101,9 @@ RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv32 = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-dbs ="\
leveldb libdbi mariadb mariadb-native \
- mysql-python postgresql psqlodbc rocksdb soci \
+ postgresql psqlodbc rocksdb soci \
sqlite \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "mysql-python", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-devtools ="\
diff --git a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
index 6d52222ce4..f1c2b7701c 100644
--- a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
+++ b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
@@ -16,4 +16,9 @@ SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e
S = "${WORKDIR}/${SRCNAME}-${PV}"
-inherit setuptools3
+inherit setuptools
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 08/12] hplip: Upgrade to 3.19.12
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (5 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 07/12] mysql-python: Enable only when meta-py2 is present Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 09/12] fontforge: Link with libpython3 Khem Raj
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Use python3 instead of py2
Apply patches from openwrt to fix crosscompile and musl builds
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...ps-ppd.h-for-missing-ppd-definitions.patch | 42 --
.../hplip/hplip-3.12.6/configure.patch | 14 -
.../hplip/hplip-3.12.6/cups-1.6.patch | 395 ------------------
.../hplip/hplip-3.12.6/fix-libusb-paths.patch | 35 --
.../setup-add-sleep-after-cups-reset.patch | 12 -
...0-replace_unsafe_memcpy_with_memmove.patch | 15 +
.../hplip/hplip/050-fix-glibcisms.patch | 17 +
.../hplip/hplip/600-fix.patch | 10 +
.../hplip/999-remove-lImageProcessor.patch | 69 +++
.../hplip/hplip/configure.patch | 12 +
.../hplip/hplip/fix-libusb-paths.patch | 33 ++
.../recipes-extended/hplip/hplip_3.12.6.bb | 75 ----
.../recipes-extended/hplip/hplip_3.19.12.bb | 87 ++++
13 files changed, 243 insertions(+), 573 deletions(-)
delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/600-fix.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/configure.patch
create mode 100644 meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
delete mode 100644 meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
create mode 100644 meta-oe/recipes-extended/hplip/hplip_3.19.12.bb
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
deleted file mode 100644
index f259b5f05d..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/0001-include-cups-ppd.h-for-missing-ppd-definitions.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7ef9c040dd959105c16d4dc67e14f3bbea25e77f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 16 Dec 2016 19:51:19 +0000
-Subject: [PATCH] include cups/ppd.h for missing ppd definitions
-
-Fixes errors spotted by clang
-
-| prnt/hpcups/HPCupsFilter.cpp:365:18: error: use of undeclared identifier 'ppdFindAttr'
-| if (((attr = ppdFindAttr(m_ppd, "hpPrinterLanguage", NULL)) == NULL) ||
-| ^
-| prnt/hpcups/HPCupsFilter.cpp:368:13: error: use of undeclared identifier 'ppdClose'
-| ppdClose(m_ppd);
-| ^
-| prnt/hpcups/HPCupsFilter.cpp:444:9: error: use of undeclared identifier 'ppdClose'
-| ppdClose(m_ppd);
-| ^
-| prnt/hpcups/HPCupsFilter.cpp:497:13: error: use of undeclared identifier 'ppdOpenFile'
-| m_ppd = ppdOpenFile(getenv("PPD"));
-| ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- prnt/hpcups/HPCupsFilter.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h
-index 0431a7a..eb0cad6 100644
---- a/prnt/hpcups/HPCupsFilter.h
-+++ b/prnt/hpcups/HPCupsFilter.h
-@@ -37,6 +37,7 @@
- #include "Job.h"
-
- #include "dbuscomm.h"
-+#include <cups/ppd.h>
-
- #define DBITMAPFILEHEADER 14
- #define DBITMAPINFOHEADER 40
---
-1.9.1
-
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch
deleted file mode 100644
index 31c005c60c..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/configure.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: hplip-3.12.6/configure.in
-===================================================================
---- hplip-3.12.6.orig/configure.in 2014-07-16 20:03:51.310044196 +0000
-+++ hplip-3.12.6/configure.in 2014-07-18 07:53:31.589559192 +0000
-@@ -27,8 +27,7 @@
-
- #AC_PREREQ(2.59)
- AC_INIT([HP Linux Imaging and Printing], [3.12.6], [3.12.6], [hplip])
--#AM_INIT_AUTOMAKE([1.9 foreign])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([1.9 foreign])
- AC_DISABLE_STATIC
-
- # Checks for programs.
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch
deleted file mode 100644
index 7df01aab33..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/cups-1.6.patch
+++ /dev/null
@@ -1,395 +0,0 @@
-Imported from gentoo:
-https://bugs.gentoo.org/show_bug.cgi?id=428672
-
-diff -Naur hplip-3.12.6_old/prnt/cupsext/cupsext.c hplip-3.12.6/prnt/cupsext/cupsext.c
---- hplip-3.12.6_old/prnt/cupsext/cupsext.c 2012-08-04 09:18:18.388330038 +0200
-+++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-08-04 09:18:27.855181327 +0200
-@@ -87,6 +87,46 @@
- #define PY_SSIZE_T_MIN INT_MIN
- #endif
-
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetCount(attr) attr->num_values
-+#define ippGetGroupTag(attr) attr->group_tag
-+#define ippGetValueTag(attr) attr->value_tag
-+#define ippGetName(attr) attr->name
-+#define ippGetBoolean(attr, element) attr->values[element].boolean
-+#define ippGetInteger(attr, element) attr->values[element].integer
-+#define ippGetStatusCode(ipp) ipp->request.status.status_code
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
-+{
-+ if (!ipp)
-+ return (NULL);
-+ return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
-+{
-+ if (!ipp || !ipp->current)
-+ return (NULL);
-+ return (ipp->current = ipp->current->next);
-+}
-+
-+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
-+{
-+ ipp->request.op.operation_id = op;
-+ return (1);
-+}
-+
-+static int ippSetRequestId( ipp_t *ipp, int request_id )
-+{
-+ ipp->request.any.request_id = request_id;
-+ return (1);
-+}
-+#endif
-
- int g_num_options = 0;
- cups_option_t * g_options;
-@@ -333,8 +373,8 @@
- request = ippNew();
- language = cupsLangDefault();
-
-- request->request.op.operation_id = CUPS_GET_PRINTERS;
-- request->request.any.request_id = 1;
-+ ippSetOperation( request, CUPS_GET_PRINTERS );
-+ ippSetRequestId ( request, 1);
-
- ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
- "attributes-charset", NULL, cupsLangEncoding( language ) );
-@@ -378,10 +418,10 @@
- ipp_pstate_t state;
- int i = 0;
-
-- for ( attr = response->attrs; attr != NULL; attr = attr->next )
-+ for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) )
- {
-- while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER )
-- attr = attr->next;
-+ while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER )
-+ attr = ippNextAttribute( response );
-
- if ( attr == NULL )
- break;
-@@ -390,41 +430,41 @@
- state = IPP_PRINTER_IDLE;
- accepting = 0;
-
-- while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER )
-+ while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER )
- {
-- if ( strcmp( attr->name, "printer-name" ) == 0 &&
-- attr->value_tag == IPP_TAG_NAME )
-- name = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "device-uri" ) == 0 &&
-- attr->value_tag == IPP_TAG_URI )
-- device_uri = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 &&
-- attr->value_tag == IPP_TAG_URI )
-- printer_uri = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-info" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- info = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-location" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- location = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 &&
-- attr->value_tag == IPP_TAG_TEXT )
-- make_model = attr->values[ 0 ].string.text;
--
-- else if ( strcmp( attr->name, "printer-state" ) == 0 &&
-- attr->value_tag == IPP_TAG_ENUM )
-- state = ( ipp_pstate_t ) attr->values[ 0 ].integer;
--
-- else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
-- attr->value_tag == IPP_TAG_BOOLEAN)
-- accepting = attr->values[ 0 ].boolean;
-+ if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_NAME )
-+ name = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_URI )
-+ device_uri = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_URI )
-+ printer_uri = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ info = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ location = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_TEXT )
-+ make_model = ippGetString( attr, 0, NULL );
-+
-+ else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 &&
-+ ippGetValueTag( attr ) == IPP_TAG_ENUM )
-+ state = ( ipp_pstate_t ) ippGetInteger( attr, 0 );
-+
-+ else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") &&
-+ ippGetValueTag( attr ) == IPP_TAG_BOOLEAN)
-+ accepting = ippGetBoolean( attr, 0 );
-
-- attr = attr->next;
-+ attr = ippNextAttribute( response );
- }
-
- if ( device_uri == NULL )
-@@ -522,8 +562,8 @@
- request = ippNew();
- language = cupsLangDefault();
-
-- request->request.op.operation_id = CUPS_ADD_PRINTER;
-- request->request.any.request_id = 1;
-+ ippSetOperation( request, CUPS_ADD_PRINTER );
-+ ippSetRequestId ( request, 1 );
-
- ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
- "attributes-charset", NULL, cupsLangEncoding( language ) );
-@@ -568,7 +608,7 @@
- }
- else
- {
-- status = response->request.status.status_code;
-+ status = ippGetStatusCode( response );
- //ippDelete( response );
- r = 1;
- }
-@@ -631,8 +671,8 @@
- */
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_DELETE_PRINTER;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_DELETE_PRINTER );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -650,7 +690,7 @@
- */
- response = cupsDoRequest( http, request, "/admin/" );
-
-- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
-+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
- {
- r = 1;
- }
-@@ -721,8 +761,8 @@
-
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_SET_DEFAULT;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_SET_DEFAULT );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -743,7 +783,7 @@
-
- response = cupsDoRequest( http, request, "/admin/" );
-
-- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) )
-+ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) )
- {
- r = 1;
- }
-@@ -797,8 +837,8 @@
-
- request = ippNew();
-
-- request->request.op.operation_id = op;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, op );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -822,7 +862,7 @@
-
- response = cupsDoRequest(http, request, "/admin/");
-
-- if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT))
-+ if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT))
- {
- r = 1;
- }
-@@ -837,7 +877,7 @@
- if ( response != NULL )
- ippDelete( response );
-
-- return Py_BuildValue( "i", r );;
-+ return Py_BuildValue( "i", r );
- }
-
-
-@@ -1116,8 +1156,8 @@
-
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_GET_PPDS;
-- request->request.op.request_id = 1;
-+ ippSetOperation( request, CUPS_GET_PPDS );
-+ ippSetRequestId ( request, 1 );
-
- language = cupsLangDefault();
-
-@@ -1143,43 +1183,43 @@
- if ((response = cupsDoRequest(http, request, "/")) != NULL)
- {
-
-- for (attr = response->attrs; attr; attr = attr->next)
-+ for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response ))
- {
- PyObject *dict;
- char *ppdname = NULL;
-
-- while (attr && attr->group_tag != IPP_TAG_PRINTER)
-- attr = attr->next;
-+ while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
-+ attr = ippNextAttribute( response );
-
- if (!attr)
- break;
-
- dict = PyDict_New ();
-
-- for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
-+ for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response ))
- {
- PyObject *val = NULL;
-
-- if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME)
-+ if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME)
- {
-- ppdname = attr->values[0].string.text;
-+ ppdname = ippGetString( attr, 0, NULL );
-
- //sprintf( buf, "print '%s'", ppdname);
- //PyRun_SimpleString( buf );
- }
-
-- else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD)
-- //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) ||
-- // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) ||
-- // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) ||
-- // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT))
-+ else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD)
-+ //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) ||
-+ // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT))
- {
-- val = PyObj_from_UTF8(attr->values[0].string.text);
-+ val = PyObj_from_UTF8(ippGetString( attr, 0, NULL ));
- }
-
- if (val)
- {
-- PyDict_SetItemString (dict, attr->name, val);
-+ PyDict_SetItemString (dict, ippGetName( attr ), val);
- Py_DECREF (val);
- }
- }
-diff -Naur hplip-3.12.6_old/scan/sane/hpaio.c hplip-3.12.6/scan/sane/hpaio.c
---- hplip-3.12.6_old/scan/sane/hpaio.c 2012-08-04 09:18:21.458389913 +0200
-+++ hplip-3.12.6/scan/sane/hpaio.c 2012-08-04 09:18:27.875181720 +0200
-@@ -47,6 +47,43 @@
- #define DEBUG_DECLARE_ONLY
- #include "sanei_debug.h"
-
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
-+#ifndef HAVE_CUPS_1_6
-+#define ippGetGroupTag(attr) attr->group_tag
-+#define ippGetValueTag(attr) attr->value_tag
-+#define ippGetName(attr) attr->name
-+#define ippGetString(attr, element, language) attr->values[element].string.text
-+
-+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp )
-+{
-+ if (!ipp)
-+ return (NULL);
-+ return (ipp->current = ipp->attrs);
-+}
-+
-+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp )
-+{
-+ if (!ipp || !ipp->current)
-+ return (NULL);
-+ return (ipp->current = ipp->current->next);
-+}
-+
-+static int ippSetOperation( ipp_t *ipp, ipp_op_t op )
-+{
-+ ipp->request.op.operation_id = op;
-+ return (1);
-+}
-+
-+static int ippSetRequestId( ipp_t *ipp, int request_id )
-+{
-+ ipp->request.any.request_id = request_id;
-+ return (1);
-+}
-+#endif
-+
- static SANE_Device **DeviceList = NULL;
-
- static int AddDeviceList(char *uri, char *model, SANE_Device ***pd)
-@@ -186,8 +223,8 @@
- /* Assemble the IPP request */
- request = ippNew();
-
-- request->request.op.operation_id = CUPS_GET_PRINTERS;
-- request->request.any.request_id = 1;
-+ ippSetOperation( request, CUPS_GET_PRINTERS );
-+ ippSetRequestId( request, 1 );
-
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
-@@ -197,20 +234,20 @@
- if ((response = cupsDoRequest(http, request, "/")) == NULL)
- goto bugout;
-
-- for (attr = response->attrs; attr != NULL; attr = attr->next)
-+ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response ))
- {
- /* Skip leading attributes until we hit a printer. */
-- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
-- attr = attr->next;
-+ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER)
-+ attr = ippNextAttribute( response );
-
- if (attr == NULL)
- break;
-
-- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
-+ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER)
- {
-- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0)
-+ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0)
- cnt++;
-- attr = attr->next;
-+ attr = ippNextAttribute( response );
- }
-
- if (attr == NULL)
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch
deleted file mode 100644
index b347f831cb..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/fix-libusb-paths.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -rupN hplip-3.12.6_orig/configure.in hplip-3.12.6/configure.in
---- hplip-3.12.6_orig/configure.in 2012-06-18 20:44:24.000000000 +1000
-+++ hplip-3.12.6/configure.in 2012-08-16 13:40:07.259927650 +1000
-@@ -524,6 +524,8 @@ if test "$hpijs_only_build" = "no"; then
- AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
- else
- AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
-+ LIBUSBINCLUDEROOT?="/usr/include/"
-+ AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder])
- AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
- fi
- fi
-diff -rupN hplip-3.12.6_orig/Makefile.am hplip-3.12.6/Makefile.am
---- hplip-3.12.6_orig/Makefile.am 2012-06-18 20:44:13.000000000 +1000
-+++ hplip-3.12.6/Makefile.am 2012-08-16 13:41:12.307932822 +1000
-@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i
- io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
- io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c
- else
--libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
-+libhpmud_la_CFLAGS = -I/$(LIBUSBINCLUDEROOT)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
- libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \
- io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
- io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c
-@@ -286,7 +286,7 @@ hpmudext_la_LIBADD = libhpmud.la
- if LIBUSB01_BUILD
- hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
- else
--hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR)
-+hpmudext_la_CFLAGS =-I$(LIBUSBINCLUDEROOT)/libusb-1.0 -I$(PYTHONINCLUDEDIR)
- endif
-
- # ui (qt3)
diff --git a/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch b/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch
deleted file mode 100644
index 0e1b6c4ed3..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip-3.12.6/setup-add-sleep-after-cups-reset.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- hplip-3.11.10/setup.py.orig 2011-10-02 14:06:19.000000000 +1100
-+++ hplip-3.11.10/setup.py 2012-02-29 08:21:39.167999938 +1100
-@@ -573,6 +573,7 @@
-
- log.debug("Restarting CUPS...")
- status, output = utils.run(restart_cups())
-+ time.sleep(3)
- log.debug("Restart CUPS returned: exit=%d output=%s" % (status, output))
-
- cups.setPasswordPrompt("You do not have permission to add a printer.")
diff --git a/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch b/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch
new file mode 100644
index 0000000000..2babb2b67a
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/030-replace_unsafe_memcpy_with_memmove.patch
@@ -0,0 +1,15 @@
+https://bugs.launchpad.net/hplip/+bug/1672256
+
+memcpy should never be used with overlapping memory regions
+
+--- a/io/hpmud/musb.c
++++ b/io/hpmud/musb.c
+@@ -775,7 +775,7 @@ static int device_id(int fd, unsigned ch
+ len = size-1; /* leave byte for zero termination */
+ if (len > 2)
+ len -= 2;
+- memcpy(buffer, buffer+2, len); /* remove length */
++ memmove(buffer, buffer+2, len); /* remove length */
+ buffer[len]=0;
+ DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
+
diff --git a/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch
new file mode 100644
index 0000000000..e020bd4642
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/050-fix-glibcisms.patch
@@ -0,0 +1,17 @@
+diff --git a/scan/sane/OrbliteScan/LinuxCommon.h b/scan/sane/OrbliteScan/LinuxCommon.h
+index 6605dd9..55c7110 100644
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -18,10 +18,8 @@ typedef u_int32_t UInt32;
+ typedef int32_t SInt32;
+ //typedef unsigned long UInt32;
+ //typedef signed long SInt32;
+-typedef __S64_TYPE SInt64;
+-typedef __U64_TYPE UInt64;
+-typedef __S64_TYPE int64_t;
+-typedef __U64_TYPE uint64_t;
++typedef int64_t SInt64;
++typedef uint64_t UInt64;
+
+ //typedef unsigned long ULONG;
+ //typedef void* LPVOID;
diff --git a/meta-oe/recipes-extended/hplip/hplip/600-fix.patch b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch
new file mode 100644
index 0000000000..91a5035ae9
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/600-fix.patch
@@ -0,0 +1,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -254,7 +254,6 @@ if test "$class_driver" = "yes"; then
+ test `sh ./createPPD.sh -f` == 0
+ else
+ AC_MSG_RESULT(no)
+- test `sh ./createPPD.sh -q` == 0
+ fi
+ AM_CONDITIONAL(HPLIP_CLASS_DRIVER, test x$class_driver = xyes)
+
diff --git a/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch b/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch
new file mode 100644
index 0000000000..aee4ac50cc
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/999-remove-lImageProcessor.patch
@@ -0,0 +1,69 @@
+# ../bin/ld: cannot find -lImageProcessor
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -590,11 +590,10 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte
+ prnt/hpcups/flate_colorspace.h prnt/hpcups/RunLenEncoding.h prnt/hpcups/common_defines.h \
+ prnt/hpcups/genPCLm.h \
+ common/utils.c common/utils.h prnt/hpcups/Hbpl1_Wrapper.cpp prnt/hpcups/genPCLm.cpp \
+- prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp \
+- prnt/hpcups/ImageProcessor.h
++ prnt/hpcups/genJPEGStrips.cpp prnt/hpcups/RunLenEncoding.cpp
+
+ hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
+-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+ #else
+ #hpcupsdir = $(cupsfilterdir)
+ #hpcups_PROGRAMS = hpcups
+--- a/prnt/hpcups/HPCupsFilter.cpp
++++ b/prnt/hpcups/HPCupsFilter.cpp
+@@ -637,16 +637,10 @@ int HPCupsFilter::processRasterData(cups
+
+
+ sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+- image_processor_t* imageProcessor = imageProcessorCreate();
+
+ while (cupsRasterReadHeader2(cups_raster, &cups_header))
+ {
+
+- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
+- }
+-
+ current_page_number++;
+
+ if (current_page_number == 1) {
+@@ -745,11 +739,6 @@ int HPCupsFilter::processRasterData(cups
+ color_raster = rgbRaster;
+ black_raster = kRaster;
+
+- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
+- }
+-
+
+ if ((y == 0) && !is_ljmono) {
+ //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
+@@ -780,11 +769,6 @@ int HPCupsFilter::processRasterData(cups
+ }
+ } // for() loop end
+
+- result = imageProcessorEndPage(imageProcessor);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
+- }
+-
+
+ m_Job.NewPage();
+ if (err != NO_ERROR) {
+@@ -800,8 +784,6 @@ int HPCupsFilter::processRasterData(cups
+ rgbRaster = NULL;
+ }
+
+- imageProcessorDestroy(imageProcessor);
+-
+ unlink(hpPreProcessedRasterFile);
+ return ret_status;
+ }
diff --git a/meta-oe/recipes-extended/hplip/hplip/configure.patch b/meta-oe/recipes-extended/hplip/hplip/configure.patch
new file mode 100644
index 0000000000..8fe77c5edf
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/configure.patch
@@ -0,0 +1,12 @@
+--- a/configure.in
++++ b/configure.in
+@@ -27,8 +27,7 @@
+
+ #AC_PREREQ(2.59)
+ AC_INIT([HP Linux Imaging and Printing], [3.19.12], [3.19.12], [hplip])
+-#AM_INIT_AUTOMAKE([1.9 foreign])
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+ AC_DISABLE_STATIC
+
+ # Checks for programs.
diff --git a/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
new file mode 100644
index 0000000000..6aa1de0a8a
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/fix-libusb-paths.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [configuration]
+
+--- a/configure.in
++++ b/configure.in
+@@ -599,6 +599,8 @@ if test "$class_driver" = "no" && test "
+ AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
+ else
+ AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
++ LIBUSBINCLUDEROOT?="/usr/include/"
++ AC_ARG_VAR(LIBUSBINCLUDEROOT, [path to libusb-1.0 folder])
+ AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
+ fi
+ fi
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -109,7 +109,7 @@ libhpmud_la_SOURCES += io/hpmud/musb_lib
+ libhpmud_la_LDFLAGS += -lusb
+ else
+ libhpmud_la_SOURCES += io/hpmud/musb.c
+-libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0
++libhpmud_la_CFLAGS += -I$(LIBUSBINCLUDEROOT)/libusb-1.0
+ libhpmud_la_LDFLAGS += -lusb-1.0
+ endif
+
+@@ -362,7 +362,7 @@ hpmudext_la_CFLAGS += -Iprotocol/discove
+ endif
+
+ if !LIBUSB01_BUILD
+-hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0
++hpmudext_la_CFLAGS +=-I$(LIBUSBINCLUDEROOT)/libusb-1.0
+ endif
+ endif #!HPLIP_CLASS_DRIVER
+ # ui (qt3)
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb b/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
deleted file mode 100644
index 765a84643e..0000000000
--- a/meta-oe/recipes-extended/hplip/hplip_3.12.6.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "HP Linux Imaging and Printing"
-LICENSE="GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=442bb3cbbeeb60643a87325718b8a8ee"
-
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
- file://setup-add-sleep-after-cups-reset.patch \
- file://fix-libusb-paths.patch \
- file://cups-1.6.patch \
- file://configure.patch \
- file://0001-include-cups-ppd.h-for-missing-ppd-definitions.patch \
-"
-
-DEPENDS += "cups python libusb"
-
-inherit autotools-brokensep python3-dir python3native pkgconfig
-
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-EXTRA_OECONF += "\
- LIBUSBINCLUDEROOT=${STAGING_INCDIR} \
- --disable-network-build \
- --disable-doc-build \
- --disable-pp-build \
- --disable-scan-build \
- --disable-gui-build \
- --disable-fax-build \
- --disable-policykit \
- --disable-qt4 \
- --disable-qt3 \
- --disable-dbus-build \
- --disable-foomatic-drv-install \
- --enable-foomatic-ppd-install \
- --enable-foomatic-rip-hplip-install \
- --with-cupsbackenddir=${libdir}/cups/backend \
- --with-cupsfilterdir=${libdir}/cups/filter \
-"
-
-PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal"
-
-RDEPENDS_${PN} += " \
- python \
- python-syslog \
- python-pprint \
- python-compression \
- python-shell \
- python-xml \
- python-unixadmin \
- python-html \
- python-resource \
- python-terminal \
- python-subprocess\
-"
-RDEPENDS_${PN}-filter += "perl"
-
-# need to snag the debug file or OE will fail on backend package
-FILES_${PN}-dbg += "\
- ${libdir}/cups/backend/.debug \
- ${PYTHON_SITEPACKAGES_DIR}/.debug \
- ${libdir}/cups/filter/.debug "
-
-FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
-FILES_${PN}-ppd = "${datadir}/ppd"
-FILES_${PN}-cups = "${datadir}/cups"
-FILES_${PN}-backend = "${libdir}/cups/backend"
-FILES_${PN}-filter = "${libdir}/cups/filter"
-FILES_${PN}-hal = "${datadir}/hal"
-
-FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so"
-
-SRC_URI[md5sum] = "5303938e8630775ea6fb383af85775e5"
-SRC_URI[sha256sum] = "54578000792969adb583e75efeacb9c46ab69659ec7e9424de390613f3595775"
-
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb b/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb
new file mode 100644
index 0000000000..834bcbc734
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip_3.19.12.bb
@@ -0,0 +1,87 @@
+SUMMARY = "HP Linux Imaging and Printing"
+LICENSE="GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://configure.patch \
+ file://fix-libusb-paths.patch \
+ file://999-remove-lImageProcessor.patch \
+ file://600-fix.patch \
+ file://030-replace_unsafe_memcpy_with_memmove.patch \
+ file://050-fix-glibcisms.patch \
+"
+SRC_URI[md5sum] = "d72bc77d791c150c2c22b84e9553bab3"
+SRC_URI[sha256sum] = "b7f398502fb659e0de8e54976237e3c6a64fec0b3c36054a515876f7b006b255"
+
+DEPENDS += "cups python3 libusb"
+
+inherit autotools-brokensep python3-dir python3native pkgconfig systemd
+
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}"
+
+EXTRA_OECONF += "\
+ LIBUSBINCLUDEROOT=${STAGING_INCDIR} \
+ --enable-cups-ppd-install \
+ --disable-network-build \
+ --disable-doc-build \
+ --disable-pp-build \
+ --disable-scan-build \
+ --disable-gui-build \
+ --disable-fax-build \
+ --disable-policykit \
+ --disable-qt4 \
+ --disable-qt3 \
+ --disable-dbus-build \
+ --enable-foomatic-drv-install \
+ --disable-foomatic-ppd-install \
+ --disable-foomatic-rip-hplip-install \
+ --with-cupsbackenddir=${libdir}/cups/backend \
+ --with-cupsfilterdir=${libdir}/cups/filter \
+"
+
+EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/"
+
+do_install_append() {
+ rm -rf ${D}${datadir}/hplip/upgrade.py
+ rm -rf ${D}${datadir}/hplip/uninstall.py
+ sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py
+ sed -i -e "s|/usr/bin/python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py
+}
+
+PACKAGES += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal"
+
+RDEPENDS_${PN} += " \
+ python3\
+ python3-syslog \
+ python3-pprint \
+ python3-compression \
+ python3-shell \
+ python3-xml \
+ python3-unixadmin \
+ python3-html \
+ python3-resource \
+ python3-terminal \
+"
+RDEPENDS_${PN}-filter += "perl"
+
+# need to snag the debug file or OE will fail on backend package
+FILES_${PN}-dbg += "\
+ ${libdir}/cups/backend/.debug \
+ ${PYTHON_SITEPACKAGES_DIR}/.debug \
+ ${libdir}/cups/filter/.debug "
+
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
+FILES_${PN}-ppd = "${datadir}/ppd"
+FILES_${PN}-cups = "${datadir}/cups"
+FILES_${PN}-backend = "${libdir}/cups/backend"
+FILES_${PN}-filter = "${libdir}/cups/filter"
+FILES_${PN}-hal = "${datadir}/hal"
+
+FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so"
+
+SYSTEMD_SERVICE_${PN} = "hplip-printer@.service"
+
+CLEANBROKEN = "1"
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 09/12] fontforge: Link with libpython3
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (6 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 08/12] hplip: Upgrade to 3.19.12 Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 10/12] nodejs: Build only when meta-py2 is included Khem Raj
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Helps building with python3
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb b/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
index c12d01e2d6..1863f95f0f 100644
--- a/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
+++ b/meta-oe/recipes-graphics/fontforge/fontforge_20190801.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \
file://LICENSE;md5=d042f3d2a8fd7208b704a499168e3c89 \
"
-DEPENDS = "glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native"
+DEPENDS = "python3 glib-2.0 pango giflib tiff libxml2 jpeg libtool uthash gettext-native"
DEPENDS_append_class-target = " libxi"
inherit autotools pkgconfig python3native features_check gettext gtk-icon-cache mime mime-xdg
@@ -20,9 +20,12 @@ SRC_URI = "git://github.com/${BPN}/${BPN}.git \
"
S = "${WORKDIR}/git"
-EXTRA_OECONF += "--without-libuninameslist"
+EXTRA_OECONF += "--without-libuninameslist --enable-python-scripting --enable-python-extension"
EXTRA_OECONF_append_class-native = " with_x=no"
+LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
+BUILD_LDFLAGS += "-lpython${PYTHON_BASEVERSION}${PYTHON_ABI}"
+
#do_configure_prepend() {
# uthash sources are expected in uthash/src
# mkdir -p ${S}/uthash/src
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 10/12] nodejs: Build only when meta-py2 is included
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (7 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 09/12] fontforge: Link with libpython3 Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-webserver][PATCH 11/12] cherokee: Only build with meta-py2 is in layermix Khem Raj
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 3 ++-
meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 6dda3005e7..60276468fd 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -113,13 +113,14 @@ RDEPENDS_packagegroup-meta-oe-devtools ="\
giflib icon-slicer iptraf-ng jq jsoncpp jsonrpc json-spirit \
kconfig-frontends lemon libedit libgee libsombok3 \
libubox log4cplus lshw ltrace lua mcpp memstat mercurial \
- mpich msgpack-c nlohmann-json nodejs openocd pax-utils \
+ mpich msgpack-c nlohmann-json openocd pax-utils \
ipc-run libdbd-mysql-perl libdbi-perl libio-pty-perl php \
protobuf protobuf-c python3-distutils-extra \
python-cpuset python-distutils-extra python-futures python-pygobject \
rapidjson serialcheck sip3 sip tclap uftrace uw-imap valijson \
xmlrpc-c yajl yasm \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "geany geany-plugins glade tk", "", d)} \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "nodejs", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-devtools_remove_armv5 = "uftrace nodejs"
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb
index 5c50187253..d87a7513da 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=be4d5107c64dc3d7c57e3797e1a0674b"
DEPENDS = "openssl"
DEPENDS_append_class-target = " nodejs-native"
-inherit pkgconfig python3native
+inherit pkgconfig pythonnative
COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
@@ -150,3 +150,8 @@ FILES_${PN}-systemtap = "${datadir}/systemtap"
BBCLASSEXTEND = "native"
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-webserver][PATCH 11/12] cherokee: Only build with meta-py2 is in layermix
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (8 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 10/12] nodejs: Build only when meta-py2 is included Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 12/12] sip: Delete python2 version Khem Raj
2020-01-22 14:15 ` [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Tim Orling
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../packagesgroups/packagegroup-meta-webserver.bb | 3 ++-
meta-webserver/recipes-httpd/cherokee/cherokee_git.bb | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-webserver/recipes-core/packagesgroups/packagegroup-meta-webserver.bb b/meta-webserver/recipes-core/packagesgroups/packagegroup-meta-webserver.bb
index fc117850b4..089c325252 100644
--- a/meta-webserver/recipes-core/packagesgroups/packagegroup-meta-webserver.bb
+++ b/meta-webserver/recipes-core/packagesgroups/packagegroup-meta-webserver.bb
@@ -19,8 +19,9 @@ RDEPENDS_packagegroup-meta-webserver = "\
"
RDEPENDS_packagegroup-meta-webserver-http = "\
- nginx monkey cherokee hiawatha nostromo apache-websocket \
+ nginx monkey hiawatha nostromo apache-websocket \
apache2 sthttpd \
+ ${@bb.utils.contains("BBPATH", "meta-python2", "cherokee", "", d)} \
"
RDEPENDS_packagegroup-meta-webserver-php = "\
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
index d16e04e6b1..81805891a4 100644
--- a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/cherokee/webserver \
S = "${WORKDIR}/git"
-inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd python3native
+inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd pythonnative
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
@@ -70,3 +70,8 @@ RPROVIDES_${PN} += "${PN}-systemd"
RREPLACES_${PN} += "${PN}-systemd"
RCONFLICTS_${PN} += "${PN}-systemd"
SYSTEMD_SERVICE_${PN} = "cherokee.service"
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][PATCH 12/12] sip: Delete python2 version
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (9 preceding siblings ...)
2020-01-22 6:38 ` [meta-webserver][PATCH 11/12] cherokee: Only build with meta-py2 is in layermix Khem Raj
@ 2020-01-22 6:38 ` Khem Raj
2020-01-22 14:15 ` [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Tim Orling
11 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 6:38 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../packagegroups/packagegroup-meta-oe.bb | 2 +-
meta-oe/recipes-devtools/sip/sip_4.19.19.bb | 11 -----------
2 files changed, 1 insertion(+), 12 deletions(-)
delete mode 100644 meta-oe/recipes-devtools/sip/sip_4.19.19.bb
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 60276468fd..e5001c3974 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -117,7 +117,7 @@ RDEPENDS_packagegroup-meta-oe-devtools ="\
ipc-run libdbd-mysql-perl libdbi-perl libio-pty-perl php \
protobuf protobuf-c python3-distutils-extra \
python-cpuset python-distutils-extra python-futures python-pygobject \
- rapidjson serialcheck sip3 sip tclap uftrace uw-imap valijson \
+ rapidjson serialcheck sip3 tclap uftrace uw-imap valijson \
xmlrpc-c yajl yasm \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "geany geany-plugins glade tk", "", d)} \
${@bb.utils.contains("BBPATH", "meta-python2", "nodejs", "", d)} \
diff --git a/meta-oe/recipes-devtools/sip/sip_4.19.19.bb b/meta-oe/recipes-devtools/sip/sip_4.19.19.bb
deleted file mode 100644
index 6299de4874..0000000000
--- a/meta-oe/recipes-devtools/sip/sip_4.19.19.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require sip.inc
-
-DEPENDS = "python"
-
-inherit python3-dir python3native
-
-PACKAGES += "python-sip"
-
-FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/.debug"
-
--
2.25.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
` (10 preceding siblings ...)
2020-01-22 6:38 ` [meta-oe][PATCH 12/12] sip: Delete python2 version Khem Raj
@ 2020-01-22 14:15 ` Tim Orling
2020-01-22 22:49 ` Khem Raj
11 siblings, 1 reply; 14+ messages in thread
From: Tim Orling @ 2020-01-22 14:15 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-devel
We should start merging the inc and bb files now that we do not need to
support more than one python version.
On Tue, Jan 21, 2020 at 10:38 PM Khem Raj <raj.khem@gmail.com> wrote:
> Lets this inc file become usable for py3 module as well
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-python/recipes-devtools/python/python-m2crypto.inc
> b/meta-python/recipes-devtools/python/python-m2crypto.inc
> index 5f5444f37e..76dd58ce04 100644
> --- a/meta-python/recipes-devtools/python/python-m2crypto.inc
> +++ b/meta-python/recipes-devtools/python/python-m2crypto.inc
> @@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
> inherit pypi siteinfo
>
> DEPENDS += "openssl swig-native"
> -RDEPENDS_${PN} += "python-typing"
> +RDEPENDS_${PN} += "${PYTHON_PN}-typing"
>
> DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}
> -I${STAGING_INCDIR}"
> DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
> --
> 2.25.0
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name
2020-01-22 14:15 ` [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Tim Orling
@ 2020-01-22 22:49 ` Khem Raj
0 siblings, 0 replies; 14+ messages in thread
From: Khem Raj @ 2020-01-22 22:49 UTC (permalink / raw)
To: Tim Orling; +Cc: openembeded-devel
On Wed, Jan 22, 2020 at 6:15 AM Tim Orling <ticotimo@gmail.com> wrote:
>
> We should start merging the inc and bb files now that we do not need to support more than one python version.
>
certainly, a good idea, before they decide to do py4 :), I am knee
deep in ensuring py2 is not needed on meta-openembedded layers but if
you are cooking patches for this cleanup thats good.
> On Tue, Jan 21, 2020 at 10:38 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> Lets this inc file become usable for py3 module as well
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> meta-python/recipes-devtools/python/python-m2crypto.inc | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-python/recipes-devtools/python/python-m2crypto.inc b/meta-python/recipes-devtools/python/python-m2crypto.inc
>> index 5f5444f37e..76dd58ce04 100644
>> --- a/meta-python/recipes-devtools/python/python-m2crypto.inc
>> +++ b/meta-python/recipes-devtools/python/python-m2crypto.inc
>> @@ -17,7 +17,7 @@ PYPI_PACKAGE = "M2Crypto"
>> inherit pypi siteinfo
>>
>> DEPENDS += "openssl swig-native"
>> -RDEPENDS_${PN} += "python-typing"
>> +RDEPENDS_${PN} += "${PYTHON_PN}-typing"
>>
>> DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
>> DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
>> --
>> 2.25.0
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-01-22 22:50 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 6:38 [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Khem Raj
2020-01-22 6:38 ` [meta-networking][PATCH 02/12] crda: Fix build with python3 Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 03/12] lio-utils: Make it visible only with meta-py2 in BBFILE_COLLECTIONS Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 04/12] openlmi: Make it visible when meta-py2 is in layermix Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 05/12] rrdtool: Disable python packageconfig by default Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 06/12] telepathy-idle: Disable when meta-py2 is not present Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 07/12] mysql-python: Enable only when meta-py2 is present Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 08/12] hplip: Upgrade to 3.19.12 Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 09/12] fontforge: Link with libpython3 Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 10/12] nodejs: Build only when meta-py2 is included Khem Raj
2020-01-22 6:38 ` [meta-webserver][PATCH 11/12] cherokee: Only build with meta-py2 is in layermix Khem Raj
2020-01-22 6:38 ` [meta-oe][PATCH 12/12] sip: Delete python2 version Khem Raj
2020-01-22 14:15 ` [meta-python][PATCH 01/12] python-m2crypto: Use PYTHON_PN instead of hardcoding python name Tim Orling
2020-01-22 22:49 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.