diff options
-rw-r--r-- | make/file.mk | 19 | ||||
-rw-r--r-- | sources/file.patch | 30 |
2 files changed, 38 insertions, 11 deletions
diff --git a/make/file.mk b/make/file.mk index eea380ae2..3eb4829d3 100644 --- a/make/file.mk +++ b/make/file.mk @@ -3,11 +3,11 @@ # file # ############################################################# -FILE_SOURCE:=file-3.41.tar.gz +FILE_SOURCE:=file-4.04.tar.gz FILE_SITE:=ftp://ftp.astron.com/pub/file -FILE_DIR:=$(BUILD_DIR)/file-3.41 +FILE_DIR:=$(BUILD_DIR)/file-4.04 FILE_CAT:=zcat -FILE_BINARY:=file +FILE_BINARY:=src/file FILE_TARGET_BINARY:=usr/bin/file $(DL_DIR)/$(FILE_SOURCE): @@ -17,11 +17,8 @@ file-source: $(DL_DIR)/$(FILE_SOURCE) $(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE) $(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf - - # Use the system file utility, not the one we just built - perl -pi -e "s,\./file,file,g" $(FILE_DIR)/Makefile.in $(FILE_DIR)/Makefile.am - touch $(FILE_DIR)/config.guess - touch $(FILE_DIR)/config.sub - touch $(FILE_DIR)/.unpacked + cat $(SOURCE_DIR)/file.patch | patch -p1 -d $(FILE_DIR) + touch $(FILE_DIR)/.unpacked $(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked (cd $(FILE_DIR); rm -rf config.cache; \ @@ -41,15 +38,15 @@ $(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked --mandir=/usr/man \ --infodir=/usr/info \ $(DISABLE_NLS) \ - --enable-fsect-man5 \ + --disable-fsect-man5 \ ); touch $(FILE_DIR)/.configured $(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) -C $(FILE_DIR) + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FILE_DIR) $(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY) - $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) install + $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc diff --git a/sources/file.patch b/sources/file.patch new file mode 100644 index 000000000..4b7775137 --- /dev/null +++ b/sources/file.patch @@ -0,0 +1,30 @@ +--- file-4.04/magic/Makefile.am.orig 2003-10-02 13:46:41.000000000 -0600 ++++ file-4.04/magic/Makefile.am 2003-10-02 13:47:38.000000000 -0600 +@@ -16,10 +16,10 @@ + done >> $@ + + magic.mgc: magic +- $(top_builddir)/src/file -C -m magic ++ /usr/bin/file -C -m magic + + magic.mime.mgc: magic.mime +- $(top_builddir)/src/file -C -m magic.mime ++ /usr/bin/file -C -m magic.mime + + magic_FRAGMENTS = \ + Magdir/acorn \ +--- file-4.04/magic/Makefile.in.orig 2003-10-02 13:52:23.000000000 -0600 ++++ file-4.04/magic/Makefile.in 2003-10-02 13:52:53.000000000 -0600 +@@ -477,10 +477,10 @@ + done >> $@ + + magic.mgc: magic +- $(top_builddir)/src/file -C -m magic ++ /usr/bin/file -C -m magic + + magic.mime.mgc: magic.mime +- $(top_builddir)/src/file -C -m magic.mime ++ /usr/bin/file -C -m magic.mime + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: |