diff options
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/file')
3 files changed, 94 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch b/yocto-poky/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch new file mode 100644 index 000000000..8a16b2cf7 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/file/file/0001-Add-P-prompt-into-Usage-info.patch @@ -0,0 +1,39 @@ +From 08abf944b2bff27b6dd325dd15b4861cebef113a Mon Sep 17 00:00:00 2001 +From: Junling Zheng <zhengjunling@huawei.com> +Date: Wed, 8 Apr 2015 03:26:57 +0000 +Subject: [PATCH] Add -P prompt into Usage info + +Currently, Usage info doesn't include -P prompt, add it: + +root@arma9el:~# file +Usage: file [-bcEhikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type] + [-e testname] [-F separator] [-f namefile] [-m magicfiles] + [-P parameter=limits] file ... + file -C [-m magicfiles] + file [--help] + +Upstream-Status: Submitted + +Signed-off-by: Junling Zheng <zhengjunling@huawei.com> +--- + src/file.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/file.c b/src/file.c +index 2b15e21..e5a957b 100644 +--- a/src/file.c ++++ b/src/file.c +@@ -76,8 +76,8 @@ int getopt_long(int argc, char * const *argv, const char *optstring, const struc + # define USAGE \ + "Usage: %s [" FILE_FLAGS \ + "] [--apple] [--extension] [--mime-encoding] [--mime-type]\n" \ +- " [-e testname] [-F separator] [-f namefile] [-m magicfiles] " \ +- "file ...\n" \ ++ " [-e testname] [-F separator] [-f namefile] [-m magicfiles]\n " \ ++ " [-P parameter=limits] file ...\n" \ + " %s -C [-m magicfiles]\n" \ + " %s [--help]\n" + +-- +1.8.3.4 + diff --git a/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch b/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch new file mode 100644 index 000000000..1ef485e93 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/file/file/debian-742262.patch @@ -0,0 +1,19 @@ +The awk pattern was checked *before* the Perl pattern, so the perl +script with BEGIN{...} would be reported as awk, this patch fixes it. + +Upstream-Status: Backport [debian] + +Signed-off-by: Christoph Biedl <debian.axhn@manchmal.in-ulm.de> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- +diff --git a/magic/Magdir/commands b/magic/Magdir/commands +--- a/magic/Magdir/commands ++++ b/magic/Magdir/commands +@@ -57,6 +57,7 @@ + 0 string/wt #!\ /usr/bin/awk awk script text executable + !:mime text/x-awk + 0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text ++!:strength - 12 + + # AT&T Bell Labs' Plan 9 shell + 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable diff --git a/yocto-poky/meta/recipes-devtools/file/file_5.24.bb b/yocto-poky/meta/recipes-devtools/file/file_5.24.bb new file mode 100644 index 000000000..08b95d7b6 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/file/file_5.24.bb @@ -0,0 +1,36 @@ +SUMMARY = "File classification tool" +DESCRIPTION = "File attempts to classify files depending \ +on their contents and prints a description if a match is found." +HOMEPAGE = "http://www.darwinsys.com/file/" +SECTION = "console/utils" + +# two clause BSD +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188" + +DEPENDS = "zlib file-native" +DEPENDS_class-native = "zlib-native" + +SRC_URI = "git://github.com/file/file.git \ + file://debian-742262.patch \ + file://0001-Add-P-prompt-into-Usage-info.patch \ + " + +SRCREV = "3c0874be4d3232d672b20f513451a39cfd7c585a" +S = "${WORKDIR}/git" + +inherit autotools + +FILES_${PN} += "${datadir}/misc/*.mgc" + +do_install_append_class-native() { + create_cmdline_wrapper ${D}/${bindir}/file \ + --magic-file ${datadir}/misc/magic.mgc +} + +do_install_append_class-nativesdk() { + create_cmdline_wrapper ${D}/${bindir}/file \ + --magic-file ${datadir}/misc/magic.mgc +} + +BBCLASSEXTEND = "native nativesdk" |