diff options
Diffstat (limited to 'meta/recipes-devtools/file/file_5.46.bb')
| -rw-r--r-- | meta/recipes-devtools/file/file_5.46.bb | 62 |
1 files changed, 62 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..e97fac99f2 --- /dev/null +++ b/meta/recipes-devtools/file/file_5.46.bb | |||
| @@ -0,0 +1,62 @@ | |||
| 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 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | inherit autotools update-alternatives | ||
| 23 | |||
| 24 | PACKAGECONFIG ??= "bz2 lzma zlib zstdlib lzlib" | ||
| 25 | PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2" | ||
| 26 | PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz" | ||
| 27 | PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib" | ||
| 28 | PACKAGECONFIG[zstdlib] = "--enable-zstdlib, --disable-zstdlib, zstd" | ||
| 29 | PACKAGECONFIG[lzlib] = "--enable-lzlib, --disable-lzlib, lzlib" | ||
| 30 | PACKAGECONFIG[seccomp] = "--enable-libseccomp, --disable-libseccomp, libseccomp" | ||
| 31 | |||
| 32 | ALTERNATIVE:${PN} = "file" | ||
| 33 | ALTERNATIVE_LINK_NAME[file] = "${bindir}/file" | ||
| 34 | |||
| 35 | EXTRA_OEMAKE:append:class-target = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" | ||
| 36 | EXTRA_OEMAKE:append:class-nativesdk = " -e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" | ||
| 37 | |||
| 38 | FILES:${PN} += "${datadir}/misc/*.mgc" | ||
| 39 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/file.sh" | ||
| 40 | |||
| 41 | do_compile:append:class-native() { | ||
| 42 | oe_runmake check | ||
| 43 | } | ||
| 44 | |||
| 45 | do_install:append:class-native() { | ||
| 46 | create_cmdline_wrapper ${D}/${bindir}/file \ | ||
| 47 | --magic-file ${datadir}/misc/magic.mgc | ||
| 48 | } | ||
| 49 | |||
| 50 | do_install:append:class-nativesdk() { | ||
| 51 | create_wrapper ${D}/${bindir}/file MAGIC=${datadir}/misc/magic.mgc | ||
| 52 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
| 53 | cat <<- EOF > ${D}${SDKPATHNATIVE}/environment-setup.d/file.sh | ||
| 54 | export MAGIC="${datadir}/misc/magic.mgc" | ||
| 55 | EOF | ||
| 56 | } | ||
| 57 | |||
| 58 | BBCLASSEXTEND = "native nativesdk" | ||
| 59 | PROVIDES:append:class-native = " file-replacement-native" | ||
| 60 | # Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who | ||
| 61 | # depends on file-replacement-native. | ||
| 62 | bindir:append:class-native = "/file-native" | ||
