aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes/file/file-5.05/reloc.patch16
-rw-r--r--recipes/file/file_5.05.bb4
2 files changed, 13 insertions, 7 deletions
diff --git a/recipes/file/file-5.05/reloc.patch b/recipes/file/file-5.05/reloc.patch
index 576d4e3acd..3633117438 100644
--- a/recipes/file/file-5.05/reloc.patch
+++ b/recipes/file/file-5.05/reloc.patch
@@ -1,9 +1,13 @@
+Make use of BinReloc (http://autopackage.org/docs/binreloc/) for both
+finding libmagic as well as the 'magic' file that's used to determie
+what a file really is.
+
---
- src/Makefile.am | 2
+ src/Makefile.am | 3
src/binreloc.c | 791 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/binreloc.h | 81 +++++
- src/magic.c | 27 +
- 4 files changed, 891 insertions(+), 10 deletions(-)
+ src/magic.c | 26 +
+ 4 files changed, 893 insertions(+), 8 deletions(-)
Index: file-5.05/src/binreloc.c
===================================================================
@@ -924,9 +928,9 @@ Index: file-5.05/src/magic.c
+ }
+
+ if (br_init_lib(&error) == 1) {
-+ char *etcdir = br_find_etc_dir(NULL);
-+ (void)snprintf(default_magic, sizeof(default_magic), "%s/magic", etcdir);
-+ free(etcdir);
++ char *datadir = br_find_data_dir(NULL);
++ (void)snprintf(default_magic, sizeof(default_magic), "%s/misc/magic", datadir);
++ free(datadir);
+ return default_magic;
+ }
+ return MAGIC;
diff --git a/recipes/file/file_5.05.bb b/recipes/file/file_5.05.bb
index 04fa3e6d3d..b23c32006e 100644
--- a/recipes/file/file_5.05.bb
+++ b/recipes/file/file_5.05.bb
@@ -1,9 +1,11 @@
require file.inc
DEPENDS_virtclass-native += "zlib-native"
-PR = "${INCPR}.0"
+PR = "${INCPR}.1"
SRC_URI += "file://reloc.patch"
+BUILD_CFLAGS += "-DENABLE_BINRELOC"
+
SRC_URI[md5sum] = "0b429063710457be2bd17a18389cb018"
SRC_URI[sha256sum] = "5cb47845d91848e2b8eb58935766f93d8a2ecf665b33be7317f1849d3c46e1b7"