]> git.pld-linux.org Git - packages/php.git/commitdiff
as fileinfo extension embeds magic database, rebuild it during build
authorElan Ruusamäe <glen@delfi.ee>
Wed, 16 Jan 2013 19:45:01 +0000 (21:45 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 16 Jan 2013 19:48:48 +0000 (21:48 +0200)
file-magic.patch [new file with mode: 0644]
php.spec

diff --git a/file-magic.patch b/file-magic.patch
new file mode 100644 (file)
index 0000000..3320726
--- /dev/null
@@ -0,0 +1,11 @@
+somewhy php devs have embedded magic database into php extension. yuck!
+
+rebuild data file for now
+--- php-5.3.20/ext/fileinfo/Makefile.frag      2012-12-19 08:55:19.000000000 +0200
++++ php-5.3.20/ext/fileinfo/Makefile.frag      2013-01-16 11:11:51.444547648 +0200
+@@ -1,2 +1,5 @@
+ $(builddir)/libmagic/apprentice.lo: $(srcdir)/data_file.c
++MIME_MAGIC_DB ?= /usr/share/misc/magic.mgc
++$(srcdir)/data_file.c: $(MIME_MAGIC_DB) $(SAPI_CLI_PATH)
++      $(SAPI_CLI_PATH) $(srcdir)/create_data_file.php $< > $@
index 03a1c553532eda4b70a63def5456fa14cbe32677..e0be8405850252b03ba4689d8d2a2d3af625b1b8 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -202,6 +202,7 @@ Patch64:    %{orgname}-m4.patch
 Patch65:       system-libzip.patch
 Patch66:       %{orgname}-db.patch
 Patch67:       php-litespeed.patch
+Patch68:       file-magic.patch
 URL:           http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -215,6 +216,7 @@ BuildRequires:      db-devel >= 4.0
 BuildRequires: elfutils-devel
 %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3}
 #BuildRequires:        fcgi-devel
+BuildRequires: file
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 %{?with_system_libzip:BuildRequires:   libzip-devel >= 0.10-3}
 BuildRequires: mysql-devel
@@ -1958,9 +1960,14 @@ cp -p php.ini-production php.ini
 %{__rm} -r sapi/litespeed
 gzip -dc %{SOURCE15} | tar xf - -C sapi/
 %patch67 -p1
+%patch68 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
+# somewhy php devs have embedded magic database into php extension. yuck!
+# rebuild data file for now
+mv ext/fileinfo/data_file.c{,.php-src}
+
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
This page took 1.280208 seconds and 4 git commands to generate.