diff options
Diffstat (limited to 'meta/recipes-devtools/file/file_5.46.bb')
-rw-r--r-- | meta/recipes-devtools/file/file_5.46.bb | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/file/file_5.46.bb b/meta/recipes-devtools/file/file_5.46.bb new file mode 100644 index 0000000000..c035e0b11d --- /dev/null +++ b/meta/recipes-devtools/file/file_5.46.bb | |||
@@ -0,0 +1,61 @@ | |||
1 | SUMMARY = "File classification tool" | ||
2 | DESCRIPTION = "File attempts to classify files depending \ | ||
3 | on their contents and prints a description if a match is found." | ||
4 | HOMEPAGE = "http://www.darwinsys.com/file/" | ||
5 | SECTION = "console/utils" | ||
6 | |||
7 | # two clause BSD | ||
8 | LICENSE = "BSD-2-Clause" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdda1b" | ||
10 | |||
11 | DEPENDS = "file-replacement-native" | ||
12 | DEPENDS:class-native = "bzip2-replacement-native" | ||
13 | |||
14 | SRC_URI = "git://github.com/file/file.git;branch=master;protocol=https \ | ||
15 | file://0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch \ | ||
16 | file://0001-PR-579-net147-Fix-stack-overrun.patch \ | ||
17 | " | ||
18 | |||
19 | SRCREV = "c5aa4f7f8d5063fb3c37ad57bf54bb67ec641a09" | ||
20 | |||
21 | inherit autotools update-alternatives | ||
22 | |||
23 | PACKAGECONFIG ??= "bz2 lzma zlib zstdlib lzlib" | ||
24 | PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2" | ||
25 | PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz" | ||
26 | PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib" | ||
27 | PACKAGECONFIG[zstdlib] = "--enable-zstdlib, --disable-zstdlib, zstd" | ||
28 | PACKAGECONFIG[lzlib] = "--enable-lzlib, --disable-lzlib, lzlib" | ||
29 | PACKAGECONFIG[seccomp] = "--enable-libseccomp, --disable-libseccomp, libseccomp" | ||
30 | |||
31 | ALTERNATIVE:${PN} = "file" | ||
32 | ALTERNATIVE_LINK_NAME[file] = "${bindir}/file" | ||
33 | |||
34 | EXTRA_OEMAKE:append:class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" | ||
35 | EXTRA_OEMAKE:append:class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" | ||
36 | |||
37 | FILES:${PN} += "${datadir}/misc/*.mgc" | ||
38 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/file.sh" | ||
39 | |||
40 | do_compile:append:class-native() { | ||
41 | oe_runmake check | ||
42 | } | ||
43 | |||
44 | do_install:append:class-native() { | ||
45 | create_cmdline_wrapper ${D}/${bindir}/file \ | ||
46 | --magic-file ${datadir}/misc/magic.mgc | ||
47 | } | ||
48 | |||
49 | do_install:append:class-nativesdk() { | ||
50 | create_wrapper ${D}/${bindir}/file MAGIC=${datadir}/misc/magic.mgc | ||
51 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
52 | cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/file.sh | ||
53 | export MAGIC="${datadir}/misc/magic.mgc" | ||
54 | EOF | ||
55 | } | ||
56 | |||
57 | BBCLASSEXTEND = "native nativesdk" | ||
58 | PROVIDES:append:class-native = " file-replacement-native" | ||
59 | # Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who | ||
60 | # depends on file-replacement-native. | ||
61 | bindir:append:class-native = "/file-native" | ||