From 67ceb4475d54d648708831ec1331877a7b7d036f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 31 Jan 2010 19:50:02 +0100 Subject: fix cross-compile. compile host file statically, so that it uses the correct libmagic while generating the magic file. --- package/file/Makefile | 12 ++++---- package/file/patches/patch-magic_Magdir_audio | 11 -------- package/file/patches/patch-magic_Magdir_compress | 15 ---------- package/file/patches/patch-magic_Magdir_images | 11 -------- package/file/patches/patch-magic_Magdir_jpeg | 15 ---------- package/file/patches/patch-magic_Magdir_macintosh | 27 ------------------ package/file/patches/patch-magic_Magdir_printer | 34 ----------------------- package/file/patches/patch-magic_Makefile_in | 11 ++++++++ 8 files changed, 18 insertions(+), 118 deletions(-) delete mode 100644 package/file/patches/patch-magic_Magdir_audio delete mode 100644 package/file/patches/patch-magic_Magdir_compress delete mode 100644 package/file/patches/patch-magic_Magdir_images delete mode 100644 package/file/patches/patch-magic_Magdir_jpeg delete mode 100644 package/file/patches/patch-magic_Magdir_macintosh delete mode 100644 package/file/patches/patch-magic_Magdir_printer create mode 100644 package/file/patches/patch-magic_Makefile_in diff --git a/package/file/Makefile b/package/file/Makefile index 58650bb0f..c535ee35b 100644 --- a/package/file/Makefile +++ b/package/file/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= file -PKG_VERSION:= 5.03 +PKG_VERSION:= 5.04 PKG_RELEASE:= 1 -PKG_MD5SUM:= d05f08a53e5c2f51f8ee6a4758c0cc53 +PKG_MD5SUM:= accade81ff1cc774904b47c72c8aeea0 PKG_DESCR:= a file type guesser PKG_SECTION:= utils PKG_URL:= http://www.darwinsys.com/file @@ -23,14 +23,16 @@ INSTALL_STYLE:= auto pre-configure: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ - ./configure \ + CFLAGS="-static" \ + ./configure --enable-static --disable-shared \ ); ${MAKE} -C ${WRKBUILD} - ${INSTALL_BIN} ${WRKBUILD}/src/.libs/file ${STAGING_TOOLS}/bin + ${INSTALL_BIN} ${WRKBUILD}/src/file ${WRKBUILD}/magic ${MAKE} -C ${WRKBUILD} clean post-install: - ${INSTALL_DIR} ${IDIR_FILE}/usr/bin ${IDIR_FILE}/usr/lib ${IDIR_FILE}/usr/share/misc + ${INSTALL_DIR} ${IDIR_FILE}/usr/bin ${IDIR_FILE}/usr/lib \ + ${IDIR_FILE}/usr/share/misc ${INSTALL_BIN} ${WRKINST}/usr/bin/file ${IDIR_FILE}/usr/bin ${INSTALL_DATA} ${WRKINST}/usr/share/misc/magic.mgc \ ${IDIR_FILE}/usr/share/misc diff --git a/package/file/patches/patch-magic_Magdir_audio b/package/file/patches/patch-magic_Magdir_audio deleted file mode 100644 index e5e0c9849..000000000 --- a/package/file/patches/patch-magic_Magdir_audio +++ /dev/null @@ -1,11 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/audio 2008-11-07 16:44:13.000000000 +0100 -+++ file-5.03/magic/Magdir/audio 2009-05-31 03:53:54.000000000 +0200 -@@ -293,7 +293,6 @@ - >>5 byte &0x40 \b, extended header - >>5 byte &0x20 \b, experimental - >>5 byte &0x10 \b, footer present -->(6.I) indirect x \b, contains: - - # NSF (NES sound file) magic - 0 string NESM\x1a NES Sound File diff --git a/package/file/patches/patch-magic_Magdir_compress b/package/file/patches/patch-magic_Magdir_compress deleted file mode 100644 index cee99739b..000000000 --- a/package/file/patches/patch-magic_Magdir_compress +++ /dev/null @@ -1,15 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/compress 2009-04-22 15:07:35.000000000 +0200 -+++ file-5.03/magic/Magdir/compress 2009-05-31 04:09:09.000000000 +0200 -@@ -9,11 +9,6 @@ - # because it tries to uncompress it to figure out what's inside. - - # standard unix compress --0 string \037\235 compress'd data --!:mime application/x-compress --!:apple LZIVZIVU -->2 byte&0x80 >0 block compressed -->2 byte&0x1f x %d bits - - # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) - # Edited by Chris Chittleborough , March 2002 diff --git a/package/file/patches/patch-magic_Magdir_images b/package/file/patches/patch-magic_Magdir_images deleted file mode 100644 index f0fe16223..000000000 --- a/package/file/patches/patch-magic_Magdir_images +++ /dev/null @@ -1,11 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/images 2009-02-02 16:55:49.000000000 +0100 -+++ file-5.03/magic/Magdir/images 2009-05-31 03:58:58.000000000 +0200 -@@ -110,7 +110,6 @@ - # GIF - 0 string GIF8 GIF image data - !:mime image/gif --!:apple 8BIMGIFf - >4 string 7a \b, version 8%s, - >4 string 9a \b, version 8%s, - >6 leshort >0 %hd x diff --git a/package/file/patches/patch-magic_Magdir_jpeg b/package/file/patches/patch-magic_Magdir_jpeg deleted file mode 100644 index 6f5ae068d..000000000 --- a/package/file/patches/patch-magic_Magdir_jpeg +++ /dev/null @@ -1,15 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/jpeg 2008-10-20 19:20:03.000000000 +0200 -+++ file-5.03/magic/Magdir/jpeg 2009-05-31 04:10:19.000000000 +0200 -@@ -8,11 +8,6 @@ - # - # both of which turn into "JPEG image data" here. - # --0 beshort 0xffd8 JPEG image data --!:mime image/jpeg --!:apple 8BIMJPEG --!:strength +1 -->6 string JFIF \b, JFIF standard - # The following added by Erik Rossen 1999-09-06 - # in a vain attempt to add image size reporting for JFIF. Note that these - # tests are not fool-proof since some perfectly valid JPEGs are currently diff --git a/package/file/patches/patch-magic_Magdir_macintosh b/package/file/patches/patch-magic_Magdir_macintosh deleted file mode 100644 index 9333a1643..000000000 --- a/package/file/patches/patch-magic_Magdir_macintosh +++ /dev/null @@ -1,27 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/macintosh 2008-10-20 19:20:23.000000000 +0200 -+++ file-5.03/magic/Magdir/macintosh 2009-05-31 04:08:05.000000000 +0200 -@@ -8,23 +8,6 @@ - !:mime application/mac-binhex40 - >41 string x \b, version %.3s - --# Stuffit archives are the de facto standard of compression for Macintosh --# files obtained from most archives. (franklsm@tuns.ca) --0 string SIT! StuffIt Archive (data) --!:mime application/x-stuffit --!:apple SIT!SIT! -->2 string x : %s --0 string SITD StuffIt Deluxe (data) -->2 string x : %s --0 string Seg StuffIt Deluxe Segment (data) -->2 string x : %s -- --# Newer StuffIt archives (grant@netbsd.org) --0 string StuffIt StuffIt Archive --!:mime application/x-stuffit --!:apple SIT!SIT! --#>162 string >0 : %s -- - # Macintosh Applications and Installation binaries (franklsm@tuns.ca) - # GRR: Too weak - #0 string APPL Macintosh Application (data) diff --git a/package/file/patches/patch-magic_Magdir_printer b/package/file/patches/patch-magic_Magdir_printer deleted file mode 100644 index a7db0e8e7..000000000 --- a/package/file/patches/patch-magic_Magdir_printer +++ /dev/null @@ -1,34 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- file-5.03.orig/magic/Magdir/printer 2008-10-20 19:20:03.000000000 +0200 -+++ file-5.03/magic/Magdir/printer 2009-05-31 04:05:40.000000000 +0200 -@@ -3,30 +3,6 @@ - # printer: file(1) magic for printer-formatted files - # - --# PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com) --0 string %! PostScript document text --!:mime application/postscript --!:apple ASPSTEXT -->2 string PS-Adobe- conforming -->>11 string >\0 DSC level %.3s -->>>15 string EPS \b, type %s -->>>15 string Query \b, type %s -->>>15 string ExitServer \b, type %s -->>>15 search/1000 %%LanguageLevel:\ -->>>>&0 string >\0 \b, Level %s --# Some PCs have the annoying habit of adding a ^D as a document separator --0 string \004%! PostScript document text --!:mime application/postscript --!:apple ASPSTEXT -->3 string PS-Adobe- conforming -->>12 string >\0 DSC level %.3s -->>>16 string EPS \b, type %s -->>>16 string Query \b, type %s -->>>16 string ExitServer \b, type %s -->>>16 search/1000 %%LanguageLevel:\ -->>>>&0 string >\0 \b, Level %s --0 string \033%-12345X%!PS PostScript document -- - # DOS EPS Binary File Header - # From: Ed Sznyter - 0 belong 0xC5D0D3C6 DOS EPS Binary File diff --git a/package/file/patches/patch-magic_Makefile_in b/package/file/patches/patch-magic_Makefile_in new file mode 100644 index 000000000..82f15d16c --- /dev/null +++ b/package/file/patches/patch-magic_Makefile_in @@ -0,0 +1,11 @@ +--- file-5.04.orig/magic/Makefile.in 2010-01-22 22:44:34.000000000 +0100 ++++ file-5.04/magic/Makefile.in 2010-01-31 19:18:37.000000000 +0100 +@@ -394,7 +394,7 @@ CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_D + + # FIXME: Build file natively as well so that it can be used to compile + # the target's magic file +-@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file ++@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = ./file + @IS_CROSS_COMPILE_FALSE@FILE_COMPILE_DEP = $(FILE_COMPILE) + @IS_CROSS_COMPILE_TRUE@FILE_COMPILE_DEP = + all: all-am -- cgit v1.2.3