diff options
author | Remi Collet <remi@remirepo.net> | 2018-02-20 07:54:27 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-02-20 07:54:27 +0100 |
commit | 7c420b2ee004bd6bb8d56ded62cd7b2fd3d99a9e (patch) | |
tree | 32df5465dca75369e53edc46723a70516e824e80 | |
parent | c1ead769a3431bfd2353973ec8eda829058bb225 (diff) |
v6.2.16
-rw-r--r-- | 74.patch | 50 | ||||
-rw-r--r-- | composer.json | 83 | ||||
-rw-r--r-- | php-tcpdf.spec | 61 |
3 files changed, 53 insertions, 141 deletions
diff --git a/74.patch b/74.patch deleted file mode 100644 index 76b8d60..0000000 --- a/74.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 487465117861fa9711a0281b8b9eabfed53ce9b0 Mon Sep 17 00:00:00 2001 -From: Emiel Molenaar <emiel.molenaar@gmail.com> -Date: Thu, 21 Sep 2017 12:10:50 +0200 -Subject: [PATCH] Refactor deprecated each() calls to foreach() - ---- - tcpdf.php | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tcpdf.php b/tcpdf.php -index 65196e74..f3dc2314 100644 ---- a/tcpdf.php -+++ b/tcpdf.php -@@ -12582,7 +12582,7 @@ protected function _addfield($type, $name, $x, $y, $w, $h, $prop) { - $k = $this->k; - $this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%u,[%F,%F,%F,%F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n"; - $this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n"; -- while (list($key, $val) = each($prop)) { -+ foreach($prop as $key => $val) { - if (strcmp(substr($key, -5), 'Color') == 0) { - $val = TCPDF_COLORS::_JScolor($val); - } else { -@@ -16545,9 +16545,9 @@ protected function getHtmlDomArray($html) { - // get attributes - preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER); - $dom[$key]['attribute'] = array(); // reset attribute array -- while (list($id, $name) = each($attr_array[1])) { -- $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id]; -- } -+ foreach($attr_array[1] as $id => $name) { -+ $dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id]; -+ } - if (!empty($css)) { - // merge CSS style to current style - list($dom[$key]['csssel'], $dom[$key]['cssdata']) = TCPDF_STATIC::getCSSdataArray($dom, $key, $css); -@@ -16558,10 +16558,10 @@ protected function getHtmlDomArray($html) { - // get style attributes - preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER); - $dom[$key]['style'] = array(); // reset style attribute array -- while (list($id, $name) = each($style_array[1])) { -- // in case of duplicate attribute the last replace the previous -- $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]); -- } -+ foreach($style_array[1] as $id => $name) { -+ // in case of duplicate attribute the last replace the previous -+ $dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]); -+ } - // --- get some style attributes --- - // text direction - if (isset($dom[$key]['style']['direction'])) { diff --git a/composer.json b/composer.json index beab509..84eaa34 100644 --- a/composer.json +++ b/composer.json @@ -1,40 +1,47 @@ { - "name": "tecnickcom/tcpdf", - "version": "6.2.12", - "homepage": "http://www.tcpdf.org/", - "type": "library", - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"], - "license": "LGPLv3", - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "homepage": "http://nicolaasuni.tecnick.com" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "classmap": [ - "fonts", - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - } + "name": "tecnickcom/tcpdf", + "version": "6.2.16", + "homepage": "http://www.tcpdf.org/", + "type": "library", + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", + "keywords": [ + "PDF", + "tcpdf", + "PDFD32000-2008", + "qrcode", + "datamatrix", + "pdf417", + "barcodes" + ], + "license": "LGPL-3.0", + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "role": "lead" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "classmap": [ + "config", + "include", + "tcpdf.php", + "tcpdf_parser.php", + "tcpdf_import.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + } } diff --git a/php-tcpdf.spec b/php-tcpdf.spec index 04ce011..d61d2f5 100644 --- a/php-tcpdf.spec +++ b/php-tcpdf.spec @@ -1,13 +1,13 @@ # remirepo/Fedora spec file for php-tcpdf # -# Copyright (c) 2013-2017 Remi Collet, Johan Cwiklinski +# Copyright (c) 2013-2018 Remi Collet, Johan Cwiklinski # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # see https://github.com/tecnickcom/TCPDF/releases -%global gh_commit 009f2304c3a9c8152b89a5321a8825f250911dc3 +%global gh_commit 3527098537e6061b752fc261a44563489c927889 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner tecnickcom %global gh_project TCPDF @@ -15,20 +15,16 @@ Name: php-tcpdf Summary: PHP class for generating PDF documents and barcodes -Version: 6.2.13 -Release: 4%{?dist} +Version: 6.2.16 +Release: 1%{?dist} URL: http://www.tcpdf.org License: LGPLv3+ -Group: Development/Libraries Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz # Disable opcache cahing for font metadata which may consume up to 90MB Source1: %{name}.blacklist -Patch0: https://patch-diff.githubusercontent.com/raw/tecnickcom/TCPDF/pull/74.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php-cli BuildRequires: php-fedora-autoloader-devel @@ -103,7 +99,6 @@ solution. You can optionally install php-pecl-imagick; TCPDF will use it. %package dejavu-lgc-sans-fonts Summary: DejaVu LGC sans-serif fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-lgc-sans-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-lgc-sans-fonts @@ -114,7 +109,6 @@ font faces in TCPDF. %package dejavu-lgc-sans-mono-fonts Summary: DejaVu LGC mono-spaced fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-lgc-sans-mono-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-lgc-sans-mono-fonts @@ -125,7 +119,6 @@ font faces in TCPDF. %package dejavu-lgc-serif-fonts Summary: DejaVu LGC serif fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-lgc-serif-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-lgc-serif-fonts @@ -136,7 +129,6 @@ font faces in TCPDF. %package dejavu-sans-fonts Summary: DejaVu sans-serif fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-sans-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-sans-fonts @@ -151,7 +143,6 @@ font faces in TCPDF. %package dejavu-sans-mono-fonts Summary: DejaVu mono-spaced fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-sans-mono-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-sans-mono-fonts @@ -162,7 +153,6 @@ font faces in TCPDF. %package dejavu-serif-fonts Summary: DejaVu serif fonts for tcpdf -Group: Development/Libraries BuildRequires: dejavu-serif-fonts Requires: %{name} = %{version}-%{release} Requires: dejavu-serif-fonts @@ -173,14 +163,8 @@ font faces in TCPDF. %package gnu-free-mono-fonts Summary: GNU FreeFonts mono-spaced for tcpdf -Group: Development/Libraries -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 BuildRequires: gnu-free-mono-fonts Requires: gnu-free-mono-fonts -%else -BuildRequires: freefont -Requires: freefont -%endif Requires: %{name} = %{version}-%{release} %description gnu-free-mono-fonts @@ -188,14 +172,8 @@ This package allow to use system GNU FreeFonts mono-spaced font faces in TCPDF. %package gnu-free-sans-fonts Summary: GNU FreeFonts sans-serif for tcpdf -Group: Development/Libraries -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 BuildRequires: gnu-free-sans-fonts Requires: gnu-free-sans-fonts -%else -BuildRequires: freefont -Requires: freefont -%endif Requires: %{name} = %{version}-%{release} # remirepo:3 # previous metapackage @@ -207,14 +185,8 @@ This package allow to use system GNU FreeFont sans-serif font faces in TCPDF. %package gnu-free-serif-fonts Summary: GNU FreeFonts serif for tcpdf -Group: Development/Libraries -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 BuildRequires: gnu-free-serif-fonts Requires: gnu-free-serif-fonts -%else -BuildRequires: freefont -Requires: freefont -%endif Requires: %{name} = %{version}-%{release} %description gnu-free-serif-fonts @@ -223,7 +195,6 @@ This package allow to use system GNU FreeFont serif font faces in TCPDF. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 : remove bundled fonts rm -rf fonts/dejavu-fonts-ttf* fonts/freefont-* fonts/ae_fonts_* @@ -239,7 +210,6 @@ ls fonts | sed -e 's|^|%{_datadir}/php/%{real_name}/fonts/|' >corefonts.lst %install -rm -rf %{buildroot} : Library install -d %{buildroot}%{_datadir}/php/%{real_name} cp -a *.php %{buildroot}%{_datadir}/php/%{real_name}/ @@ -273,15 +243,11 @@ install -m 0755 tools/%{real_name}_addfont.php \ list="" for ttf in \ /usr/share/fonts/dejavu/*ttf \ -%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 /usr/share/fonts/gnu-free/*ttf \ -%else - /usr/share/fonts/freefont/*ttf \ -%endif ; do list=$ttf${list:+,${list}} done -php tools/tcpdf_addfont.php \ +php -d memory_limit=1G tools/tcpdf_addfont.php \ --addcbbox \ --flags 32 \ --fonts $list \ @@ -296,12 +262,7 @@ php -r 'require "%{buildroot}%{_datadir}/php/%{real_name}/autoload.php"; ' -%clean -rm -rf %{buildroot} - - %files -f corefonts.lst -%defattr(-,root,root,-) %doc README.md CHANGELOG.TXT examples %doc composer.json %{!?_licensedir:%global license %%doc} @@ -318,45 +279,39 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/php-zts.d/opcache-%{name}.blacklist %files dejavu-lgc-sans-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavulgcsans* %exclude %{_datadir}/php/%{real_name}/fonts/dejavulgcsansmono* %files dejavu-lgc-sans-mono-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavulgcsansmono* %files dejavu-lgc-serif-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavulgcserif* %files dejavu-sans-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavusans* %exclude %{_datadir}/php/%{real_name}/fonts/dejavusansmono* %files dejavu-sans-mono-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavusansmono* %files dejavu-serif-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/dejavuserif* %files gnu-free-mono-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/freemono* %files gnu-free-sans-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/freesans* %files gnu-free-serif-fonts -%defattr(-,root,root,-) %{_datadir}/php/%{real_name}/fonts/freeserif* %changelog +* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 6.2.16-1 +- Update to 6.2.16 + * Thu Dec 21 2017 Remi Collet <remi@fedoraproject.org> - 6.2.13-4 - add patch for PHP 7.2 from https://github.com/tecnickcom/TCPDF/pull/74/files |