diff options
-rw-r--r-- | phpMyAdmin-mariadb.patch | 11 | ||||
-rw-r--r-- | phpMyAdmin-vendor.patch | 41 | ||||
-rw-r--r-- | phpMyAdmin.spec | 24 | ||||
-rw-r--r-- | pma-php54.patch | 11 |
4 files changed, 58 insertions, 29 deletions
diff --git a/phpMyAdmin-mariadb.patch b/phpMyAdmin-mariadb.patch deleted file mode 100644 index c730f4d..0000000 --- a/phpMyAdmin-mariadb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- phpMyAdmin-3.5.7-all-languages/libraries/common.lib.php~ 2013-02-15 14:20:13.675872709 +0100 -+++ phpMyAdmin-3.5.7-all-languages/libraries/common.lib.php 2013-02-15 14:20:34.185961593 +0100 -@@ -3752,7 +3752,7 @@ - $server_type = 'MySQL'; - if (PMA_DRIZZLE) { - $server_type = 'Drizzle'; -- } else if (strpos(PMA_MYSQL_STR_VERSION, 'mariadb') !== false) { -+ } else if (strpos(strtolower(PMA_MYSQL_STR_VERSION), 'mariadb') !== false) { - $server_type = 'MariaDB'; - } else if (stripos(PMA_MYSQL_VERSION_COMMENT, 'percona') !== false) { - $server_type = 'Percona Server'; diff --git a/phpMyAdmin-vendor.patch b/phpMyAdmin-vendor.patch new file mode 100644 index 0000000..284e75d --- /dev/null +++ b/phpMyAdmin-vendor.patch @@ -0,0 +1,41 @@ +--- libraries/vendor_config.php~ 2013-05-03 14:16:36.000000000 +0200 ++++ libraries/vendor_config.php 2013-05-09 17:29:11.847767792 +0200 +@@ -68,4 +68,9 @@ + * eg. /usr/share/php/gettext/gettext.inc. + */ + define('GETTEXT_INC', './libraries/php-gettext/gettext.inc'); ++/** ++ * Path to tcpdf.php file. Useful when you want to use system tcpdf, ++ * eg. /usr/share/php/tcpdf/tcpdf.php. ++ */ ++define('TCPDF_INC', './libraries/tcpdf/tcpdf.php'); + ?> +--- libraries/PDF.class.php~ 2013-05-03 14:16:36.000000000 +0200 ++++ libraries/PDF.class.php 2013-05-09 17:29:10.904764535 +0200 +@@ -9,7 +9,7 @@ + exit; + } + +-require_once './libraries/tcpdf/tcpdf.php'; ++require_once TCPDF_INC; + + /** + * PDF font to use. +@@ -45,13 +45,16 @@ + ) { + parent::__construct(); + $this->SetAuthor('phpMyAdmin ' . PMA_VERSION); +- $this->AliasNbPages(); + $this->AddFont('DejaVuSans', '', 'dejavusans.php'); + $this->AddFont('DejaVuSans', 'B', 'dejavusansb.php'); + $this->SetFont(PMA_PDF_FONT, '', 14); + $this->setFooterFont(array(PMA_PDF_FONT, '', 14)); + } + ++ public function empty_string($str) { ++ return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); ++ } ++ + /** + * This function must be named "Footer" to work with the TCPDF library + * diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index 97689d4..2100c86 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -1,6 +1,6 @@ Name: phpMyAdmin Version: 4.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Web based MySQL browser written in php Group: Applications/Internet @@ -9,6 +9,9 @@ URL: http://www.phpmyadmin.net/ Source0: http://downloads.sourceforge.net/sourceforge/phpmyadmin/%{name}-%{version}%{?prever:-%prever}-all-languages.tar.bz2 Source2: phpMyAdmin.htaccess +# https://github.com/phpmyadmin/phpmyadmin/pull/357 +Patch0: %{name}-vendor.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: unzip @@ -22,28 +25,25 @@ Requires: php-curl Requires: php-date Requires: php-filter Requires: php-gd -Requires: php-gettext Requires: php-gmp Requires: php-hash Requires: php-iconv -Requires: php-pecl(imagick) Requires: php-json Requires: php-libxml Requires: php-mbstring Requires: php-mcrypt Requires: php-mysqli -Requires: php-openssl Requires: php-pcre Requires: php-recode Requires: php-session Requires: php-simplexml Requires: php-spl -Requires: php-tidy -Requires: php-xml Requires: php-xmlwriter Requires: php-zip Requires: php-zlib Requires: php-php-gettext +Requires: php-tcpdf + Provides: phpmyadmin = %{version}-%{release} Obsoletes: phpMyAdmin3 @@ -59,6 +59,8 @@ is available in 50 languages %prep %setup -qn phpMyAdmin-%{version}%{?prever:-%prever}-all-languages +%patch0 -p0 + # Minimal configuration file sed -e "/'extension'/s@'mysql'@'mysqli'@" \ -e "/'blowfish_secret'/s@''@'MUSTBECHANGEDONINSTALL'@" \ @@ -72,6 +74,7 @@ sed -e "/'CHANGELOG_FILE'/s@./ChangeLog@%{_datadir}/doc/%{name}-%{version}/Chang -e "/'CONFIG_DIR'/s@'./'@'%{_sysconfdir}/%{name}/'@" \ -e "/'SETUP_CONFIG_FILE'/s@./config/config.inc.php@%{_localstatedir}/lib/%{name}/config/config.inc.php@" \ -e "/'GETTEXT_INC'/s@./libraries/php-gettext/gettext.inc@%{_datadir}/php/gettext/gettext.inc@" \ + -e "/'TCPDF_INC'/s@./libraries/tcpdf/tcpdf.php@%{_datadir}/php/tcpdf/tcpdf.php@" \ -i libraries/vendor_config.php # For debug @@ -85,6 +88,10 @@ find . -name \*.php -exec chmod -x {} \; # %{__unzip} -q $archive -d themes #done +# Remove bundled libraries +rm -rf libraries/php-gettext +rm -rf libraries/tcpdf + %build # Nothing to do @@ -107,8 +114,8 @@ rm -f %{buildroot}/%{_datadir}/%{name}/setup/frames/.htaccess rm -rf %{buildroot}/%{_datadir}/%{name}/contrib mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/{upload,save,config} - rm -rf %{buildroot}%{_datadir}/%{pkgname}/libraries/php-gettext +rm -rf %{buildroot}%{_datadir}/%{pkgname}/libraries/tcpdf %clean @@ -140,6 +147,9 @@ sed -i -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$RANDOM$RANDOM$RANDOM$RAN %changelog +* Thu May 9 2013 Remi Collet <rpms@famillecollet.com> 4.0.0-2 +- use system tcpdf library + * Fri May 3 2013 Remi Collet <rpms@famillecollet.com> 4.0.0-1 - update to 4.0.0 finale diff --git a/pma-php54.patch b/pma-php54.patch deleted file mode 100644 index 65cea87..0000000 --- a/pma-php54.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libraries/Error.class.php.orig 2011-11-13 18:40:23.860385540 +0100 -+++ libraries/Error.class.php 2011-11-13 18:42:40.538840132 +0100 -@@ -175,7 +175,7 @@ - $this->getMessage() . - $this->getFile() . - $this->getLine() . -- $this->getBacktrace() -+ serialize($this->getBacktrace()) - ); - } - |