file: moved to 5.05
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Sat, 19 Feb 2011 12:43:50 +0000 (13:43 +0100)
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Sat, 19 Feb 2011 12:54:03 +0000 (13:54 +0100)
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
recipes/file/file-5.05/reloc.patch [moved from recipes/file/file-5.04/reloc.patch with 96% similarity]
recipes/file/file_5.04.bb [deleted file]
recipes/file/file_5.05.bb [new file with mode: 0644]

similarity index 96%
rename from recipes/file/file-5.04/reloc.patch
rename to recipes/file/file-5.05/reloc.patch
index c643b5c..576d4e3 100644 (file)
@@ -5,8 +5,10 @@
  src/magic.c     |   27 +
  4 files changed, 891 insertions(+), 10 deletions(-)
 
+Index: file-5.05/src/binreloc.c
+===================================================================
 --- /dev/null
-+++ file-5.04/src/binreloc.c
++++ file-5.05/src/binreloc.c
 @@ -0,0 +1,791 @@
 +/*
 + * BinReloc - a library for creating relocatable executables
 +#endif /* __cplusplus */
 +
 +#endif /* __BINRELOC_C__ */
+Index: file-5.05/src/binreloc.h
+===================================================================
 --- /dev/null
-+++ file-5.04/src/binreloc.h
++++ file-5.05/src/binreloc.h
 @@ -0,0 +1,81 @@
 +/*
 + * BinReloc - a library for creating relocatable executables
 +#endif /* __cplusplus */
 +
 +#endif /* __BINRELOC_H__ */
---- file-5.04.orig/src/magic.c
-+++ file-5.04/src/magic.c
-@@ -32,6 +32,7 @@ FILE_RCSID("@(#)$File: magic.c,v 1.65 20
+Index: file-5.05/src/magic.c
+===================================================================
+--- file-5.05.orig/src/magic.c
++++ file-5.05/src/magic.c
+@@ -37,6 +37,7 @@ FILE_RCSID("@(#)$File: magic.c,v 1.69 20
  #endif        /* lint */
  
  #include "magic.h"
  
  #include <stdlib.h>
  #include <unistd.h>
-@@ -89,18 +90,24 @@ get_default_magic(void)
-       char *home;
-       char hmagicpath[MAXPATHLEN + 1];
+@@ -113,16 +114,25 @@ get_default_magic(void)
+       char hmagicpath[MAXPATHLEN + 1] = { 0 };
  
+ #ifndef WIN32
 -      if ((home = getenv("HOME")) == NULL)
 -              return MAGIC;
--
++      BrInitError error;
 -      (void)snprintf(hmagicpath, sizeof(hmagicpath), "%s%s", home, hmagic);
--
--      if (access(hmagicpath, R_OK) == -1)
--              return MAGIC;
 +      if ((home = getenv("HOME")) != NULL) {
 +              (void)snprintf(hmagicpath, sizeof(hmagicpath), "%s%s", home, hmagic);
  
+-      if (access(hmagicpath, R_OK) == -1)
+-              return MAGIC;
+-
 -      (void)snprintf(default_magic, sizeof(default_magic), "%s:%s",
 -          hmagicpath, MAGIC);
 +              if (access(hmagicpath, R_OK) != -1) {
 +                      return default_magic;
 +              }
 +      }
--      return default_magic;
-+      BrInitError error;
++
 +      if (br_init_lib(&error) == 1) {
 +              char *etcdir = br_find_etc_dir(NULL);
 +              (void)snprintf(default_magic, sizeof(default_magic), "%s/magic", etcdir);
 +              return default_magic;
 +      }
 +      return MAGIC;
- }
- public const char *
---- file-5.04.orig/src/Makefile.am
-+++ file-5.04/src/Makefile.am
-@@ -10,9 +10,11 @@ AM_CFLAGS = @WARNINGS@
+ #else
+       char *hmagicp = hmagicpath;
+       char tmppath[MAXPATHLEN + 1] = { 0 };
+Index: file-5.05/src/Makefile.am
+===================================================================
+--- file-5.05.orig/src/Makefile.am
++++ file-5.05/src/Makefile.am
+@@ -10,6 +10,7 @@ AM_CFLAGS = @WARNINGS@
  libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \
        encoding.c compress.c is_tar.c readelf.c print.c fsmagic.c \
        funcs.c file.h names.h patchlevel.h readelf.h tar.h apptype.c \
 +      binreloc.c binreloc.h \
        file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h
  libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0
- libmagic_la_LIBADD = $(LTLIBOBJS)
+ if MINGW
+@@ -21,3 +22,5 @@ libmagic_la_LIBADD = $(LTLIBOBJS) $(MING
  
  file_SOURCES = file.c
  file_LDADD = libmagic.la
 +file_LDFLAGS = -rpath \\\$$ORIGIN/../lib
++
diff --git a/recipes/file/file_5.04.bb b/recipes/file/file_5.04.bb
deleted file mode 100644 (file)
index c1c0f3c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-require file.inc
-DEPENDS_virtclass-native += "zlib-native"
-PR = "${INCPR}.2"
-
-SRC_URI += "file://reloc.patch"
-SRC_URI[md5sum] = "accade81ff1cc774904b47c72c8aeea0"
-SRC_URI[sha256sum] = "4c9e6e7994e74cb3386374ae91b055d26ac96b9d3e82fd157ae2d62e87a4260c"
diff --git a/recipes/file/file_5.05.bb b/recipes/file/file_5.05.bb
new file mode 100644 (file)
index 0000000..04fa3e6
--- /dev/null
@@ -0,0 +1,9 @@
+require file.inc
+DEPENDS_virtclass-native += "zlib-native"
+PR = "${INCPR}.0"
+
+SRC_URI += "file://reloc.patch"
+
+SRC_URI[md5sum] = "0b429063710457be2bd17a18389cb018"
+SRC_URI[sha256sum] = "5cb47845d91848e2b8eb58935766f93d8a2ecf665b33be7317f1849d3c46e1b7"
+