diff options
3 files changed, 73 insertions, 12 deletions
diff --git a/meta-oe/conf/include/non-repro-meta-oe.inc b/meta-oe/conf/include/non-repro-meta-oe.inc index 7961d851f9..3441cb119a 100755 --- a/meta-oe/conf/include/non-repro-meta-oe.inc +++ b/meta-oe/conf/include/non-repro-meta-oe.inc | |||
@@ -33,8 +33,6 @@ KNOWN_NON_REPRO_META_OE = " \ | |||
33 | hdf5-dbg \ | 33 | hdf5-dbg \ |
34 | hdf5-src \ | 34 | hdf5-src \ |
35 | hdf5-staticdev \ | 35 | hdf5-staticdev \ |
36 | hplip \ | ||
37 | hplip-dbg \ | ||
38 | jpnevulator-doc \ | 36 | jpnevulator-doc \ |
39 | jsonrpc-dev \ | 37 | jsonrpc-dev \ |
40 | kpatch-build \ | 38 | kpatch-build \ |
diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-Fix-upstream-CFLAGS-override.patch b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-upstream-CFLAGS-override.patch new file mode 100644 index 0000000000..c8c892c5e1 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-upstream-CFLAGS-override.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 297e517d302469fa27dd96c091021b53f9ac2254 Mon Sep 17 00:00:00 2001 | ||
2 | From: Zdenek Dohnal <zdohnal@redhat.com> | ||
3 | Date: Fri, 26 Apr 2024 14:17:54 -0600 | ||
4 | Subject: [PATCH] Fix upstream CFLAGS override | ||
5 | |||
6 | Upstream check for python clears OS build system CFLAGS | ||
7 | |||
8 | Upstream-Status: Submitted [https://bugs.launchpad.net/hplip/+bug/1879445] | ||
9 | --- | ||
10 | configure.in | 36 +++++++++++++++++++++++------------- | ||
11 | 1 file changed, 23 insertions(+), 13 deletions(-) | ||
12 | |||
13 | diff --git a/configure.in b/configure.in | ||
14 | index ebea052..80c4618 100644 | ||
15 | --- a/configure.in | ||
16 | +++ b/configure.in | ||
17 | @@ -628,20 +628,31 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcu | ||
18 | fi | ||
19 | fi | ||
20 | |||
21 | -SAVE_CPPFLAGS="$CPPFLAGS" | ||
22 | -CFLAGS=`python-config --includes` | ||
23 | -if [ $? -eq 0 ] | ||
24 | -then | ||
25 | - echo $FLAGS | ||
26 | -else | ||
27 | -CFLAGS=`python3-config --includes` | ||
28 | - if [ $? -eq 0 ] | ||
29 | - then | ||
30 | - echo $FLAGS | ||
31 | - fi | ||
32 | +AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)]) | ||
33 | + | ||
34 | +PYTHON_INCLUDES=`$python3_config_path --includes` | ||
35 | +if test "X$PYTHON_INCLUDES" == "X" ; then | ||
36 | + AC_MSG_ERROR([Cannot get Python includes via python3-config], 6) | ||
37 | +fi | ||
38 | + | ||
39 | +PYTHON_LIBS=`$python3_config_path --libs` | ||
40 | +if test "X$PYTHON_LIBS" == "X" ; then | ||
41 | + AC_MSG_ERROR([Cannot get Python libs via python3-config], 6) | ||
42 | +fi | ||
43 | + | ||
44 | +SAVE_CFLAGS=$CFLAGS | ||
45 | +SAVE_LIBS=$LIBS | ||
46 | + | ||
47 | +CFLAGS="$CFLAGS $PYTHON_INCLUDES" | ||
48 | +LIBS="$LIBS $PYTHON_LIBS" | ||
49 | + | ||
50 | +AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6)) | ||
51 | + | ||
52 | +if test "X$python_includes" != "Xok" ; then | ||
53 | + CFLAGS="$SAVE_CFLAGS" | ||
54 | + LIBS="$SAVE_LIBS" | ||
55 | fi | ||
56 | |||
57 | -#CFLAGS=`(python-config --includes)` | ||
58 | if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite_build" = "no" && test "$hpcups_only_build" = "no"; then | ||
59 | AC_ARG_VAR([PYTHON], [Python interpreter/compiler command]) | ||
60 | AC_CHECK_PROGS(PYTHON,[python python3 python2]) | ||
61 | @@ -664,7 +675,6 @@ if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$lite | ||
62 | AS_IF([test "x$FOUND_HEADER" != "xyes"], | ||
63 | [AC_MSG_ERROR([cannot find python-devel support], 6)]) | ||
64 | fi | ||
65 | -CFLAGS="$save_CFLAGS" | ||
66 | |||
67 | if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then | ||
68 | AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)]) | ||
diff --git a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb index c54b2e0d88..4ee333de33 100644 --- a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb +++ b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb | |||
@@ -16,7 +16,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
16 | file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ | 16 | file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ |
17 | file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ | 17 | file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ |
18 | file://0001-Fix-installing-ipp-usb-quirk.patch \ | 18 | file://0001-Fix-installing-ipp-usb-quirk.patch \ |
19 | file://0001-Drop-using-register-storage-classifier.patch" | 19 | file://0001-Drop-using-register-storage-classifier.patch \ |
20 | file://0001-Fix-upstream-CFLAGS-override.patch" | ||
20 | SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" | 21 | SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" |
21 | 22 | ||
22 | UPSTREAM_CHECK_URI = "https://sourceforge.net/p/hplip/activity" | 23 | UPSTREAM_CHECK_URI = "https://sourceforge.net/p/hplip/activity" |
@@ -25,11 +26,6 @@ DEPENDS += "cups python3 libusb1 python3-setuptools-native" | |||
25 | 26 | ||
26 | inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd | 27 | inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd |
27 | 28 | ||
28 | export STAGING_INCDIR | ||
29 | export STAGING_LIBDIR | ||
30 | |||
31 | CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" | ||
32 | |||
33 | EXTRA_OECONF += "\ | 29 | EXTRA_OECONF += "\ |
34 | --enable-cups-drv-install \ | 30 | --enable-cups-drv-install \ |
35 | --enable-cups-ppd-install \ | 31 | --enable-cups-ppd-install \ |
@@ -51,7 +47,7 @@ EXTRA_OECONF += "\ | |||
51 | --with-cupsfilterdir=${libexecdir}/cups/filter \ | 47 | --with-cupsfilterdir=${libexecdir}/cups/filter \ |
52 | " | 48 | " |
53 | 49 | ||
54 | EXTRA_OEMAKE = "CPPFLAGS='${CFLAGS}' rulessystemdir=${systemd_unitdir}/system/" | 50 | EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" |
55 | 51 | ||
56 | do_install:append() { | 52 | do_install:append() { |
57 | rm -rf ${D}${datadir}/hplip/upgrade.py | 53 | rm -rf ${D}${datadir}/hplip/upgrade.py |
@@ -76,7 +72,8 @@ RDEPENDS:${PN} += " \ | |||
76 | " | 72 | " |
77 | RDEPENDS:${PN}-filter += "perl ghostscript" | 73 | RDEPENDS:${PN}-filter += "perl ghostscript" |
78 | 74 | ||
79 | FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf" | 75 | FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf \ |
76 | ${systemd_system_unitdir}/hplip-printer@.service" | ||
80 | FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" | 77 | FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" |
81 | FILES:${PN}-ppd = "${datadir}/ppd" | 78 | FILES:${PN}-ppd = "${datadir}/ppd" |
82 | FILES:${PN}-cups = "${datadir}/cups" | 79 | FILES:${PN}-cups = "${datadir}/cups" |
@@ -86,6 +83,4 @@ FILES:${PN}-hal = "${datadir}/hal" | |||
86 | 83 | ||
87 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" | 84 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" |
88 | 85 | ||
89 | SYSTEMD_SERVICE:${PN} = "hplip-printer@.service" | ||
90 | |||
91 | CLEANBROKEN = "1" | 86 | CLEANBROKEN = "1" |