From aca67913f2ef36916691261c0f6fd647fbd145bf Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 30 Jan 2020 16:04:01 +0100 Subject: [PATCH] New package: openbsd-file-6.2 --- srcpkgs/openbsd-file/patches/musl.patch | 10 +++++++ .../openbsd-file/patches/no-x86-seccomp.patch | 19 ++++++++++++++ srcpkgs/openbsd-file/template | 26 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 srcpkgs/openbsd-file/patches/musl.patch create mode 100644 srcpkgs/openbsd-file/patches/no-x86-seccomp.patch create mode 100644 srcpkgs/openbsd-file/template diff --git a/srcpkgs/openbsd-file/patches/musl.patch b/srcpkgs/openbsd-file/patches/musl.patch new file mode 100644 index 0000000000..8b485a3f60 --- /dev/null +++ b/srcpkgs/openbsd-file/patches/musl.patch @@ -0,0 +1,10 @@ +--- file.c.orig 2020-01-30 15:16:15.402746181 +0100 ++++ file.c 2020-01-30 15:16:29.514898212 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/srcpkgs/openbsd-file/patches/no-x86-seccomp.patch b/srcpkgs/openbsd-file/patches/no-x86-seccomp.patch new file mode 100644 index 0000000000..7c055b84b2 --- /dev/null +++ b/srcpkgs/openbsd-file/patches/no-x86-seccomp.patch @@ -0,0 +1,19 @@ +--- seccomp-sandbox.c.orig 2020-01-30 15:59:29.517540311 +0100 ++++ seccomp-sandbox.c 2020-01-30 16:03:43.046273793 +0100 +@@ -40,6 +40,16 @@ + #define SECCOMP_AUDIT_ARCH AUDIT_ARCH_I386 + #elif defined __x86_64__ || defined __amd64__ + #define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 ++#elif defined __aarch64__ ++#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64 ++#elif defined __arm__ ++#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM ++#elif defined __powerpc64__ && defined __LITTLE_ENDIAN__ ++#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64LE ++#elif defined __powerpc64__ ++#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC64 ++#elif defined __powerpc__ ++#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_PPC + #endif + #endif /* SECCOMP_AUDIT_ARCH */ + diff --git a/srcpkgs/openbsd-file/template b/srcpkgs/openbsd-file/template new file mode 100644 index 0000000000..13532c02fe --- /dev/null +++ b/srcpkgs/openbsd-file/template @@ -0,0 +1,26 @@ +# Template file for 'openbsd-file' +pkgname=openbsd-file +version=6.2 +revision=1 +wrksrc="file-${version}" +build_style=gnu-configure +configure_args="--program-prefix=openbsd-" +hostmakedepends="automake libtool" +short_desc="Portable version of OpenBSD's privsep/sandboxed file(1) utility" +maintainer="Juan RP " +license="ISC" +homepage="https://github.com/brynet/file/" +distfiles="https://github.com/brynet/file/archive/v${version}.tar.gz" +checksum=f6bf601f513bd83038e343bbd93b7982f373669a2ffa76dc52d48fa7251515b2 + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + CFLAGS="-DREG_STARTEND=0" + makedepends+=" musl-legacy-compat" +fi + +pre_configure() { + autoreconf -fi +} +post_install() { + vlicense LICENSE +}