[packages/graphviz] fix php ext installation
glen
glen at pld-linux.org
Sun Mar 20 12:32:28 CET 2016
commit a47c3e85f18acae427838d1f0aa36785bb64c9ea
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Mar 20 13:32:06 2016 +0200
fix php ext installation
graphviz.spec | 9 +++++----
php-dir.patch | 11 +++++++++++
2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/graphviz.spec b/graphviz.spec
index f5e499c..d9e4626 100644
--- a/graphviz.spec
+++ b/graphviz.spec
@@ -63,6 +63,7 @@ Patch12: %{name}-webp.patch
Patch13: %{name}-format.patch
Patch14: python-paths.patch
Patch15: ghostscript918.patch
+Patch16: php-dir.patch
URL: http://www.graphviz.org/
%{?with_devil:BuildRequires: DevIL-devel}
%{?with_r:BuildRequires: R}
@@ -462,6 +463,7 @@ Wiązania graphviza dla języka R.
%patch13 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%{__sed} '1s@/usr/bin/lua$@/usr/bin/lua5.1@' -i tclpkg/gv/demo/modgraph.lua
@@ -495,6 +497,7 @@ export CPPFLAGS
%ifarch x32
LIBPOSTFIX="x32" \
%endif
+ PHP=%{__php} \
LUA=/usr/bin/lua5.1 \
lua_suffix=51 \
%{!?with_devil:--disable-devil} \
@@ -524,9 +527,7 @@ export CPPFLAGS
%install
rm -rf $RPM_BUILD_ROOT
-
%{__make} install \
- PHP_INSTALL_DIR=%{php_extensiondir} \
DESTDIR=$RPM_BUILD_ROOT
%if %{with php}
@@ -537,9 +538,9 @@ extension=gv.so
EOF
# drop the symlinks and install to php dirs directly
-install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{_examplesdir}/%{php_name}-%{name}-%{version}}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{php_name}-%{name}-%{version}
mv $RPM_BUILD_ROOT{%{_libdir}/%{name}/php,%{php_data_dir}}/gv.php
-mv $RPM_BUILD_ROOT{%{_libdir}/%{name}/php/libgv_php.so,%{php_extensiondir}/gv.so}
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/php/libgv_php.so
rm $RPM_BUILD_ROOT%{_libdir}/%{name}/php/gv.so
mv $RPM_BUILD_ROOT{%{_datadir}/%{name}/demo,%{_examplesdir}/%{php_name}-%{name}-%{version}}/modgraph.php
%endif
diff --git a/php-dir.patch b/php-dir.patch
new file mode 100644
index 0000000..768c568
--- /dev/null
+++ b/php-dir.patch
@@ -0,0 +1,11 @@
+--- graphviz-2.38.0/configure.ac~ 2016-03-20 11:59:28.000000000 +0200
++++ graphviz-2.38.0/configure.ac 2016-03-20 13:10:36.077403508 +0200
+@@ -1110,7 +1110,7 @@
+ else
+ PHP_INCLUDES="-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM"
+ fi
+- PHP_INSTALL_DIR="/usr/lib${LIBPOSTFIX}/php"
++ PHP_INSTALL_DIR=$(php-config --extension-dir)
+ PHP_INSTALL_DATADIR="/usr/share/php"
+ PHP_LIBS=
+ save_CPPFLAGS=$CPPFLAGS
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/graphviz.git/commitdiff/a47c3e85f18acae427838d1f0aa36785bb64c9ea
More information about the pld-cvs-commit
mailing list