Browse Source

clearsilver-0.10.5-11,php-ext-clearsilver-0.4-1


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11287 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 6 years ago
parent
commit
7b322747fc
2 changed files with 57 additions and 33 deletions
  1. 30 10
      c/clearsilver/clearsilver-vl.spec
  2. 27 23
      p/php-ext-clearsilver/php-ext-clearsilver-vl.spec

+ 30 - 10
c/clearsilver/clearsilver-vl.spec

@@ -1,6 +1,8 @@
+%bcond_with ruby
+
 %define name clearsilver
 %define version 0.10.5
-%define release 10%{_dist_release}
+%define release 11%{_dist_release}
 
 Summary: A fast, powerful, and language-neutral HTML template system.
 Summary(ja): 高速、パワフルで言語中立なHTMLテンプレートシステム
@@ -18,12 +20,16 @@ Patch1: clearsilver-0.10.5-regression.patch
 Patch2: clearsilver-0.10.5-CVE-2011-4357.patch
 Patch3: clearsilver-ruby-1.9.patch
 Patch4: clearsilver-ruby-2.2.patch
+# GCC 5 compatibility, bug #1190760
+Patch5: clearsilver-0.10.5-gcc5.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: perl
 BuildRequires: python-devel
+%if %{with ruby}
 BuildRequires: ruby
 BuildRequires: ruby-devel >= 1.9.3
+%endif
 BuildRequires: zlib-devel
 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Provides: ruby(clearsilver)
@@ -46,17 +52,25 @@ Clearsilver は高速、強力で言語中立なテンプレートシステム
 %patch0 -p1 -b .conf
 %patch1 -p1
 %patch2 -p1
+%if %{with ruby}
 %patch3 -p1
 %patch4 -p1
+%endif
+%patch5 -p2
+
 touch configure
 perl -pi -e 's/python_versions="2\.5/python_versions="2.7 2.6 2.5/' configure
 sed -i 's|/neo/opt/bin/python|%{__python}|' python/examples/*/*.py
 sed -i 's|PYTHON_SITE = @PYTHON_SITE@|PYTHON_SITE = %{python_sitearch}|' rules.mk.in
+sed -i -r 's|(\$\(RUBY\) install.rb config) (--.*)|\1 --rb-dir="$(DESTDIR)%{ruby_vendorlibdir}" --so-dir="$(DESTDIR)%{ruby_vendorarchdir}" \2|' ruby/Makefile
 find python/examples -type f | xargs chmod -x
 
-
 %build
-%configure --disable-csharp
+%configure \
+%if ! %{with ruby}
+ --disable-ruby \
+%endif
+ --disable-csharp
 
 %ifarch x86_64
 perl -pi -e 's/^(TARGETS =.+) test/$1/' cs/Makefile
@@ -66,14 +80,14 @@ perl -pi -e 's/^(TARGETS =.+) test/$1/' cs/Makefile
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd ruby
-%ruby install.rb config --rb-dir=${RPM_BUILD_ROOT}%{ruby_vendorlibdir} --so-dir=${RPM_BUILD_ROOT}%{ruby_vendorarchdir}
-cd ..
 make DESTDIR=${RPM_BUILD_ROOT} install
 
-find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
-find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
+find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
+find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
+find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
+chmod -R u+w $RPM_BUILD_ROOT/*
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -85,13 +99,19 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/ClearSilver/
 %{perl_sitearch}/*.pm
 %{perl_sitearch}/auto/ClearSilver/
+%{python_sitearch}/*.so
+%if %{with ruby}
 %{ruby_vendorarchdir}/*.so
 %{ruby_vendorlibdir}/*.rb
-%{python_sitearch}/*.so
+%endif
 %{_libdir}/*.a
 %{_mandir}/man*/*.gz
 
 %changelog
+* Tue Dec 19 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.10.5-11
+- added Patch5 for gcc5.
+- disabled ruby stuff.
+
 * Sat Sep 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.5-10
 - rebuild with ruby-2.2.3
 - add Patch4 (clearsilver-ruby-2.2.patch) from fedora

+ 27 - 23
p/php-ext-clearsilver/php-ext-clearsilver-vl.spec

@@ -1,5 +1,5 @@
 %bcond_without php5
-%bcond_without php71
+%bcond_without php72
 
 %define modname clearsilver
 
@@ -7,7 +7,7 @@ Summary: ClearSilver extension for PHP
 Summary(ja): PHP用ClearSilverモジュール
 Name: php-ext-%{modname}
 Version: 0.4
-Release: 9%{_dist_release}
+Release: 10%{_dist_release}
 URL: http://www.geodata.soton.ac.uk/software/php_clearsilver/
 Source: php-%{modname}-%{version}.tar.gz
 Patch0: php-clearsilver-0.4-php5.5.0.patch
@@ -22,8 +22,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: php5-devel
 %endif
 
-%if %{with php71}
-BuildRequires: php71-devel
+%if %{with php72}
+BuildRequires: php72-devel
 %endif
 
 Vendor: Project Vine
@@ -54,19 +54,19 @@ This module adds ClearSilver functions to PHP.
 
 %endif
 
-%if %{with php71}
-%package -n php71-ext-%{modname}
+%if %{with php72}
+%package -n php72-ext-%{modname}
 Summary: ClearSilver extension for PHP-7.0.x
 Summary(ja): PHP-7.0.x用ClearSilverモジュール
 Group: Development/Languages
-%if "%{?req_php71_api}" != ""
-Requires: %{req_php71_api}
+%if "%{?req_php72_api}" != ""
+Requires: %{req_php72_api}
 %endif
 
-%description -n php71-ext-%{modname}
+%description -n php72-ext-%{modname}
 This module adds ClearSilver functions to PHP.
 
-%description -n php71-ext-%{modname} -l ja
+%description -n php72-ext-%{modname} -l ja
 このモジュールはPHPにClearSilverテンプレート機能を追加します。
 
 %endif
@@ -84,7 +84,7 @@ pushd php-clearsilver-%{version}-php5
 popd
 %endif
 
-%if %{with php71}
+%if %{with php72}
 cp -a php-clearsilver-%{version} php-clearsilver-%{version}-php7
 pushd php-clearsilver-%{version}-php7
 %patch0 -p1 -b .php55
@@ -105,13 +105,13 @@ libtoolize --copy --force
 popd
 %endif
 
-%if %{with php71}
+%if %{with php72}
 pushd php-clearsilver-%{version}-php7
 aclocal
 autoconf
-phpize71
+phpize72
 libtoolize --copy --force
-%configure --with-php-config=/usr/bin/php-config71
+%configure --with-php-config=/usr/bin/php-config72
 %__make %{_smp_mflags}
 popd
 %endif
@@ -132,14 +132,14 @@ EOF
 popd
 %endif
 
-%if %{with php71}
+%if %{with php72}
 pushd php-clearsilver-%{version}-php7
-mkdir -p %{buildroot}%{_libdir}/php71/
-mkdir -p %{buildroot}%{_sysconfdir}/php71/php.d
+mkdir -p %{buildroot}%{_libdir}/php72/
+mkdir -p %{buildroot}%{_sysconfdir}/php72/php.d
 
-install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php71/
+install -m644 modules/%{modname}.so %{buildroot}%{_libdir}/php72/
 
-cat > %{buildroot}%{_sysconfdir}/php71/php.d/%{modname}.ini <<EOF
+cat > %{buildroot}%{_sysconfdir}/php72/php.d/%{modname}.ini <<EOF
 ; Enable %{modname} extension module
 extension=%{modname}.so
 EOF
@@ -157,15 +157,19 @@ rm -rf %{buildroot}
 %{_sysconfdir}/php5/php.d/*
 %endif
 
-%if %{with php71}
-%files -n php71-ext-%{modname}
+%if %{with php72}
+%files -n php72-ext-%{modname}
 %defattr(-,root,root)
 %doc CREDITS INSTALL LICENSE README doc
-%{_libdir}/php71/*
-%{_sysconfdir}/php71/php.d/*
+%{_libdir}/php72/*
+%{_sysconfdir}/php72/php.d/*
 %endif
 
 %changelog
+* Tue Dec 19 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-10
+- dropped support for php71.
+- added support for php72.
+
 * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.4-9
 - added support for php71.