diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-08-29 13:02:17 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-08-29 20:59:15 -0700 |
| commit | 80f5d0bb8054a2c6469b667e6b81ead03f51fead (patch) | |
| tree | 9a4487763f7e6765d2f06b8e967175c4ece7b2b9 | |
| parent | deca9342abf136db4bbac921ca28a98c0cf032cd (diff) | |
| download | meta-openembedded-80f5d0bb8054a2c6469b667e6b81ead03f51fead.tar.gz | |
e2tools: Fix build with automake 1.17
Replace the do_configure hack with aid to configure
detection logic via commandline
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-filesystems/recipes-utils/e2tools/e2tools_git.bb | 44 | ||||
| -rw-r--r-- | meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch | 34 |
2 files changed, 43 insertions, 35 deletions
diff --git a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb index a0d194cae0..459c7058e1 100644 --- a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb +++ b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb | |||
| @@ -15,6 +15,7 @@ PV = "0.1.0+git" | |||
| 15 | 15 | ||
| 16 | SRC_URI = " \ | 16 | SRC_URI = " \ |
| 17 | git://github.com/e2tools/e2tools;protocol=https;branch=master \ | 17 | git://github.com/e2tools/e2tools;protocol=https;branch=master \ |
| 18 | file://0001-Disable-portability-warning-as-error.patch \ | ||
| 18 | file://run-ptest \ | 19 | file://run-ptest \ |
| 19 | " | 20 | " |
| 20 | 21 | ||
| @@ -24,41 +25,14 @@ S = "${WORKDIR}/git" | |||
| 24 | 25 | ||
| 25 | inherit autotools pkgconfig ptest | 26 | inherit autotools pkgconfig ptest |
| 26 | 27 | ||
| 27 | do_configure:prepend() { | 28 | # Otherwise these tools will be detected from build host and |
| 28 | git -C "${WORKDIR}/git" reset --hard HEAD | 29 | # assumptions will go wrong, Fun of cross compiling |
| 29 | 30 | EXTRA_OECONF += "\ | |
| 30 | # To install ptest for this package, special configuration needs to be | 31 | ac_cv_path_MKE2FS=${base_sbindir}/mke2fs \ |
| 31 | # done before do_configure(). So, do_configure_ptest() which is scheduled | 32 | ac_cv_path_CHMOD=${base_bindir}/chmod \ |
| 32 | # after do_configure() cannot be used. | 33 | ac_cv_path_DD=${base_bindir}/dd \ |
| 33 | 34 | ac_cv_path_GREP=${base_bindir}/grep \ | |
| 34 | # We only do special configuration if we are installing ptest for this | 35 | " |
| 35 | # package. | ||
| 36 | if [ "${@d.getVar('PTEST_ENABLED')}" -eq "1" ]; then | ||
| 37 | # Since we guarantee run-time dependency when installing the ptest for | ||
| 38 | # this package, we do not need the check macros under section "checks | ||
| 39 | # for programs" in "configure.ac". Plus, these check macros set the | ||
| 40 | # ouput variables to incorrect values as these checks are performed on | ||
| 41 | # the host environment. Still, we need these variables outputted from | ||
| 42 | # these check macros. So, we insert the following lines to manually | ||
| 43 | # set these output variables to the correct value in "configure.ac". | ||
| 44 | |||
| 45 | # Note that HAVE_DD_COMMAND and HAVE_MKE2FS_COMMAND are only ever used | ||
| 46 | # in tests/Makefile-files which determines whether to include the test | ||
| 47 | # cases. As for output variables CHMOD, DD, and MKE2FS, they only | ||
| 48 | # point to the programs which test cases need to run. Since these | ||
| 49 | # commands are guaranteed to be present due to RDEPENDS and are | ||
| 50 | # guaranteed to be accessible under PATH environment variable on the | ||
| 51 | # target, we only need to specify the name of these programs. | ||
| 52 | |||
| 53 | perl -i -0777 -pe 's/(^dnl\s*=+\s*^dnl\s*Checks for compiler flags\s*^dnl\s*=+)/ | ||
| 54 | AC_SUBST([CHMOD], 'chmod') | ||
| 55 | AC_SUBST([DD], 'dd') | ||
| 56 | AC_SUBST([MKE2FS], 'mke2fs') | ||
| 57 | AM_CONDITIONAL([HAVE_DD_COMMAND], [true]) | ||
| 58 | AM_CONDITIONAL([HAVE_MKE2FS_COMMAND], [true]) | ||
| 59 | \1/ms' "${WORKDIR}/git/configure.ac" | ||
| 60 | fi | ||
| 61 | } | ||
| 62 | 36 | ||
| 63 | do_install_ptest() { | 37 | do_install_ptest() { |
| 64 | rm -rf "${D}${PTEST_PATH}/*" | 38 | rm -rf "${D}${PTEST_PATH}/*" |
diff --git a/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch b/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch new file mode 100644 index 0000000000..dec793f373 --- /dev/null +++ b/meta-filesystems/recipes-utils/e2tools/files/0001-Disable-portability-warning-as-error.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From e0aaedea30483bf5b9bb085e12fff79144fa1174 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 29 Aug 2024 11:12:57 -0700 | ||
| 4 | Subject: [PATCH] Disable portability warning as error | ||
| 5 | |||
| 6 | With latest automake 1.17 its warning about escape hash | ||
| 7 | mark [1] and since configure.ac uses -werror to call automake | ||
| 8 | this becomes an error and reconfigure fails. | ||
| 9 | |||
| 10 | escape hash mark is non-portable as discussed here [2] | ||
| 11 | |||
| 12 | Fow now let it be a warning, it should be fixed in a portable way | ||
| 13 | |||
| 14 | [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7610 | ||
| 15 | [2] https://lists.gnu.org/archive/html/automake/2011-08/msg00023.html | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [https://github.com/e2tools/e2tools/pull/31] | ||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | --- | ||
| 20 | configure.ac | 1 + | ||
| 21 | 1 file changed, 1 insertion(+) | ||
| 22 | |||
| 23 | diff --git a/configure.ac b/configure.ac | ||
| 24 | index dd32c4d..9f37591 100644 | ||
| 25 | --- a/configure.ac | ||
| 26 | +++ b/configure.ac | ||
| 27 | @@ -14,6 +14,7 @@ AC_CONFIG_MACRO_DIR([m4]) | ||
| 28 | AM_INIT_AUTOMAKE([ | ||
| 29 | -Wall | ||
| 30 | -Werror | ||
| 31 | +-Wno-portability | ||
| 32 | 1.9.6 | ||
| 33 | foreign | ||
| 34 | subdir-objects | ||
