summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-08-10 17:33:42 +0800
committerMike Frysinger <vapier@gentoo.org>2016-08-10 17:47:47 +0800
commitba55f110bf9831afca12c51ea503e5f5293d28fe (patch)
tree1dc948b08771f5b982b520fee0dd5bb84b84687a /sys-apps
parentsys-apps/file: switch to the new zlib configure flag (diff)
downloadgentoo-ba55f110bf9831afca12c51ea503e5f5293d28fe.tar.gz
gentoo-ba55f110bf9831afca12c51ea503e5f5293d28fe.tar.bz2
gentoo-ba55f110bf9831afca12c51ea503e5f5293d28fe.zip
sys-apps/file: add upstream fix for mingw builds
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/file-5.28.ebuild2
-rw-r--r--sys-apps/file/files/file-5.28-der-mmap.patch36
2 files changed, 38 insertions, 0 deletions
diff --git a/sys-apps/file/file-5.28.ebuild b/sys-apps/file/file-5.28.ebuild
index 298edaf48f83..fefe087b54f4 100644
--- a/sys-apps/file/file-5.28.ebuild
+++ b/sys-apps/file/file-5.28.ebuild
@@ -37,6 +37,8 @@ src_prepare() {
[[ ${PV} == "9999" ]] && eautoreconf
elibtoolize
+ epatch "${FILESDIR}"/${P}-der-mmap.patch
+
# don't let python README kill main README #60043
mv python/README{,.python}
}
diff --git a/sys-apps/file/files/file-5.28-der-mmap.patch b/sys-apps/file/files/file-5.28-der-mmap.patch
new file mode 100644
index 000000000000..50542a6c4822
--- /dev/null
+++ b/sys-apps/file/files/file-5.28-der-mmap.patch
@@ -0,0 +1,36 @@
+fix from upstream for building on systems w/out mmap (e.g. mingw)
+
+From 6f1fbff8114ec2319dd874f3552105b378931eb9 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Fri, 15 Jul 2016 00:56:04 +0000
+Subject: [PATCH] we only need mman for testing.
+
+---
+ src/der.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/der.c b/src/der.c
+index fcdeb6c79814..fd093d29ee89 100644
+--- a/src/der.c
++++ b/src/der.c
+@@ -35,8 +35,6 @@
+ #endif
+
+ #include <sys/types.h>
+-#include <sys/stat.h>
+-#include <sys/mman.h>
+
+ #include <stdio.h>
+ #include <fcntl.h>
+@@ -53,6 +51,8 @@
+ #include "magic.h"
+ #include "der.h"
+ #else
++#include <sys/mman.h>
++#include <sys/stat.h>
+ #include <err.h>
+ #endif
+
+--
+2.9.0
+