diff options
Diffstat (limited to 'meta/recipes-extended/findutils')
5 files changed, 114 insertions, 17 deletions
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc index 9aa7239825..03cf2a8d72 100644 --- a/meta/recipes-extended/findutils/findutils.inc +++ b/meta/recipes-extended/findutils/findutils.inc @@ -6,11 +6,14 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/" BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" SECTION = "console/utils" -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz" +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \ + file://autoconf-2.73.patch \ + file://run-ptest \ + " -inherit autotools gettext texinfo update-alternatives +inherit autotools gettext texinfo update-alternatives ptest -ALTERNATIVE_${PN} = "find xargs" +ALTERNATIVE:${PN} = "find xargs" ALTERNATIVE_PRIORITY = "100" BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/findutils/findutils/autoconf-2.73.patch b/meta/recipes-extended/findutils/findutils/autoconf-2.73.patch new file mode 100644 index 0000000000..63728b5f91 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils/autoconf-2.73.patch @@ -0,0 +1,24 @@ +The gnulib largefile macro needs updating to work with autoconf 2.73. Rather +than the full code: + +https://git.savannah.gnu.org/cgit/gnulib.git/commit/m4/largefile.m4?id=f91f633858cf132e50924224c50d6264a92caabb + +Just tweak the exiting code to work with 2.73. The next findutils upgrade should +update to new gnulib + +Upstream-Status: Inappropriate +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: findutils-4.9.0/gl/m4/largefile.m4 +=================================================================== +--- findutils-4.9.0.orig/gl/m4/largefile.m4 ++++ findutils-4.9.0/gl/m4/largefile.m4 +@@ -26,7 +26,7 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE], + # with _TIME_BITS. Also, work around a problem in autoconf <= 2.69: + # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, + # or configures them incorrectly in some cases. +-m4_version_prereq([2.70], [], [ ++m4_version_prereq([2.73], [], [ + + # _AC_SYS_LARGEFILE_TEST_INCLUDES + # ------------------------------- diff --git a/meta/recipes-extended/findutils/findutils/run-ptest b/meta/recipes-extended/findutils/findutils/run-ptest new file mode 100644 index 0000000000..ec71583c51 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils/run-ptest @@ -0,0 +1,57 @@ +#!/bin/bash + +# create temporary symlink to workaround missing oldfind +ln -s /usr/bin/find /tmp/oldfind +# make oldfind visible +export PATH="/tmp:${PATH}" + +export built_programs="find xargs locate updatedb" + +# this gets substituted by sed during build +export VERSION="__run_ptest_version__" + +# define missing functions for tests/init.sh +fu_path_prepend_ () { + path_prepend_ $@ +} + +print_ver_ () { + : +} + +skip_if_root_ () { + [ $(id -u) = 0 ] && exit 77; +} + +require_root_ () { + [ $(id -u) = 0 ] || exit 77; +} + +expensive_ () { + : +} + +export -f fu_path_prepend_ +export -f print_ver_ +export -f skip_if_root_ +export -f require_root_ +export -f expensive_ + + +for f in tests/*/*.sh; do + bash $f ; + case $? in + 0 ) + echo -n "PASS";; + 77 ) + echo -n "SKIP";; + * ) + echo -n "FAIL";; + esac + echo ": $f" +done + +#remove symlink +rm -f /tmp/oldfind + +echo diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb b/meta/recipes-extended/findutils/findutils_4.8.0.bb deleted file mode 100644 index 675e53c0da..0000000000 --- a/meta/recipes-extended/findutils/findutils_4.8.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -require findutils.inc - -# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32) -LICENSE = "GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" - -DEPENDS = "bison-native" - -SRC_URI[sha256sum] = "57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1387164" - -# http://savannah.gnu.org/bugs/?27299 -CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" - -EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" diff --git a/meta/recipes-extended/findutils/findutils_4.9.0.bb b/meta/recipes-extended/findutils/findutils_4.9.0.bb new file mode 100644 index 0000000000..074817df27 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils_4.9.0.bb @@ -0,0 +1,27 @@ +require findutils.inc + +# GPL-2.0-or-later (<< 4.2.32), GPL-3.0-or-later (>= 4.2.32) +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" + +DEPENDS = "bison-native" + +SRC_URI[sha256sum] = "a2bfb8c09d436770edc59f50fa483e785b161a3b7b9d547573cb08065fd462fe" + +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" +# http://savannah.gnu.org/bugs/?27299 +CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" + +EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" + +# need od from coreutils for -t option +RDEPENDS:${PN}-ptest += "bash sed grep coreutils" + +do_install_ptest:class-target() { + mkdir -p ${D}${PTEST_PATH}/tests/ + cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ + + # substitute value in run-ptest with actual version + sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest + +} |