summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--1.patch22
-rw-r--r--2.patch35
-rw-r--r--3.patch68
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION2
-rw-r--r--fastchart-rpm.patch19
-rw-r--r--php-iliaal-fastchart.spec31
7 files changed, 43 insertions, 140 deletions
diff --git a/1.patch b/1.patch
deleted file mode 100644
index 92acbbb..0000000
--- a/1.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From ca34b40f74e21be488a3e243f360743008eec13e Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Sat, 16 May 2026 14:38:09 +0200
-Subject: [PATCH] fix test, ensure searching in the right place
-
----
- tests/134_minfo_and_optional_libs.phpt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/134_minfo_and_optional_libs.phpt b/tests/134_minfo_and_optional_libs.phpt
-index ee18275..53d6d01 100644
---- a/tests/134_minfo_and_optional_libs.phpt
-+++ b/tests/134_minfo_and_optional_libs.phpt
-@@ -22,7 +22,7 @@ ob_start();
- phpinfo(INFO_MODULES);
- $info = ob_get_clean();
-
--$section_start = strpos($info, 'fastchart');
-+$section_start = strpos($info, 'fastchart support');
- $section = substr($info, $section_start, 800);
-
- echo "has_version_row: ",
diff --git a/2.patch b/2.patch
deleted file mode 100644
index 63f4652..0000000
--- a/2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 19a83ee7a605ffd82816ff6c990d9e4ff5d1da5c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Sat, 16 May 2026 14:42:49 +0200
-Subject: [PATCH] Fix undefined $ext_builddir
-
----
- config.m4 | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/config.m4 b/config.m4
-index 4e2be0a..b4985c2 100644
---- a/config.m4
-+++ b/config.m4
-@@ -193,6 +193,11 @@ if test "$PHP_FASTCHART" != "no"; then
- FASTCHART_CFLAGS="$FASTCHART_CFLAGS -Werror -Wstrict-prototypes"
- fi
-
-+ PHP_NEW_EXTENSION(fastchart,
-+ $WRAPPER_SOURCES,
-+ $ext_shared,,
-+ $FASTCHART_CFLAGS)
-+
- PHP_ADD_INCLUDE([$ext_srcdir])
- dnl Vendor include paths. Uses $abs_srcdir (autoconf-standard, always
- dnl populated before this macro fires) so VPATH / out-of-tree builds
-@@ -208,9 +213,4 @@ if test "$PHP_FASTCHART" != "no"; then
- PHP_ADD_BUILD_DIR([$ext_builddir/vendor/qrcodegen])
- PHP_ADD_BUILD_DIR([$ext_builddir/vendor/plutovg/source])
- PHP_ADD_BUILD_DIR([$ext_builddir/vendor/plutosvg/source])
--
-- PHP_NEW_EXTENSION(fastchart,
-- $WRAPPER_SOURCES,
-- $ext_shared,,
-- $FASTCHART_CFLAGS)
- fi
diff --git a/3.patch b/3.patch
deleted file mode 100644
index 806e0c5..0000000
--- a/3.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From f6886b20c95a185bf7497830aaa026cc72cbb169 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Sat, 16 May 2026 15:32:49 +0200
-Subject: [PATCH] fix tests, more font paths for RPM dsitro
-
----
- tests/089_font_cache_open_basedir.phpt | 2 ++
- tests/129_svg_text_modes.phpt | 1 +
- tests/131_raster_formats_per_family.phpt | 14 ++++++++++----
- 3 files changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/tests/089_font_cache_open_basedir.phpt b/tests/089_font_cache_open_basedir.phpt
-index b92c95b..c19055c 100644
---- a/tests/089_font_cache_open_basedir.phpt
-+++ b/tests/089_font_cache_open_basedir.phpt
-@@ -12,6 +12,7 @@ $cands = [
- '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf',
- '/usr/share/fonts/dejavu/DejaVuSans.ttf',
- '/usr/share/fonts/TTF/DejaVuSans.ttf',
-+ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf',
- ];
- $ok = false;
- foreach ($cands as $c) { if (file_exists($c)) { $ok = true; break; } }
-@@ -34,6 +35,7 @@ $font_candidates = [
- '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf',
- '/usr/share/fonts/dejavu/DejaVuSans.ttf',
- '/usr/share/fonts/TTF/DejaVuSans.ttf',
-+ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf',
- ];
- $font = null;
- foreach ($font_candidates as $cand) {
-diff --git a/tests/129_svg_text_modes.phpt b/tests/129_svg_text_modes.phpt
-index 1ce6ed5..295c207 100644
---- a/tests/129_svg_text_modes.phpt
-+++ b/tests/129_svg_text_modes.phpt
-@@ -12,6 +12,7 @@ $candidates = [
- '/usr/share/fonts/truetype/lato/Lato-Regular.ttf',
- '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf',
- '/usr/share/fonts/dejavu/DejaVuSans.ttf',
-+ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf',
- ];
- $font = '';
- foreach ($candidates as $p) { if (is_readable($p)) { $font = $p; break; } }
-diff --git a/tests/131_raster_formats_per_family.phpt b/tests/131_raster_formats_per_family.phpt
-index f8272f1..13082b9 100644
---- a/tests/131_raster_formats_per_family.phpt
-+++ b/tests/131_raster_formats_per_family.phpt
-@@ -12,10 +12,16 @@ gd
- * instance of every chart family and asserts the four output
- * formats each produce magic-byte-correct bytes at non-trivial size. */
-
--$lato = '/usr/share/fonts/truetype/lato/Lato-Regular.ttf';
--$font = is_readable($lato) ? $lato
-- : '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf';
--if (!is_readable($font)) die("skip no system font available\n");
-+// Pick a system font; fall back across distros.
-+$candidates = [
-+ '/usr/share/fonts/truetype/lato/Lato-Regular.ttf',
-+ '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf',
-+ '/usr/share/fonts/dejavu/DejaVuSans.ttf',
-+ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf',
-+];
-+$font = '';
-+foreach ($candidates as $p) { if (is_readable($p)) { $font = $p; break; } }
-+if ($font === '') die("skip no system font found\n");
-
- $ohlcv = [];
- for ($i = 0; $i < 8; $i++) {
diff --git a/PHPINFO b/PHPINFO
index 8ae7ed1..0442820 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,11 +2,11 @@
fastchart
fastchart support => enabled
-fastchart version => 1.1.0
+fastchart version => 1.1.1
FreeType => 2.13.3
libpng => 1.6.56
libjpeg => 3.1.3 (turbo)
libwebp => 1.6.0
-plutovg => 1.3.2
-plutosvg => 0.0.7
+plutovg => 1.3.3
+plutosvg => 0.0.8
Default font => /usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf
diff --git a/REFLECTION b/REFLECTION
index f57d622..99c1bd7 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #83 fastchart version 1.1.0 ] {
+Extension [ <persistent> extension #83 fastchart version 1.1.1 ] {
- Classes [31] {
Class [ <internal:fastchart> abstract class FastChart\Chart ] {
diff --git a/fastchart-rpm.patch b/fastchart-rpm.patch
new file mode 100644
index 0000000..431ad19
--- /dev/null
+++ b/fastchart-rpm.patch
@@ -0,0 +1,19 @@
+diff -up ./fastchart.c.rpm ./fastchart.c
+--- ./fastchart.c.rpm 2026-05-21 16:46:56.682594380 +0200
++++ ./fastchart.c 2026-05-21 16:47:36.271977657 +0200
+@@ -1961,14 +1961,10 @@ FASTCHART_DEFINE_LIFECYCLE(vector, fa
+ * NULL, so without a Windows entry every
+ * chart renders blank text. */
+ static const char *FASTCHART_DEFAULT_FONT_CANDIDATES[] = {
++ "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf", /* RPM case first */
+ "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
+- "/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf",
+ "/usr/share/fonts/TTF/DejaVuSans.ttf",
+ "/usr/share/fonts/dejavu/DejaVuSans.ttf",
+- "/Library/Fonts/Arial.ttf",
+- "/System/Library/Fonts/Helvetica.ttc",
+- "C:\\Windows\\Fonts\\arial.ttf",
+- "C:\\Windows\\Fonts\\segoeui.ttf",
+ NULL,
+ };
+
diff --git a/php-iliaal-fastchart.spec b/php-iliaal-fastchart.spec
index 0370fcf..9d7b085 100644
--- a/php-iliaal-fastchart.spec
+++ b/php-iliaal-fastchart.spec
@@ -30,15 +30,14 @@ Summary: Native C PHP extension for fast chart rendering
# Extension is BSD-3-Clause
# Libraries are MIT
License: BSD-3-Clause AND MIT
-Version: 1.1.0
+Version: 1.1.1
Release: 1%{?dist}
%forgemeta
-URL: %{forgeurl}
-Source0: %{forgesource}
+URL: %{forgeurl}
+Source0: %{forgesource}
-Patch0: https://patch-diff.githubusercontent.com/raw/iliaal/fastchart/pull/1.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/iliaal/fastchart/pull/2.patch
-Patch2: https://patch-diff.githubusercontent.com/raw/iliaal/fastchart/pull/3.patch
+# RPM font path first and remove Windows fonts
+Patch0: %{pie_proj}-rpm.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -48,17 +47,21 @@ BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libwebp)
# for tests
+# See list in tests/_font_candidates.inc.php
+# /usr/share/fonts/lato-fonts/Lato-Regular.ttf
# /usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf
+BuildRequires: lato-fonts
BuildRequires: dejavu-sans-fonts
BuildRequires: %{?scl_prefix}php-gd
BuildRequires: %{?scl_prefix}php-simplexml
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+# See FASTCHART_DEFAULT_FONT_CANDIDATES in fastchart.c
Requires: dejavu-sans-fonts
-Provides: bundled(plutovg) = 1.3.2
-Provides: bundled(plutosvg) = 0.0.7
+Provides: bundled(plutovg) = 1.3.3
+Provides: bundled(plutosvg) = 0.0.8
Provides: bundled(qrcodegen)
# Extension
@@ -91,9 +94,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%forgesetup
-%patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
+%patch -P0 -p1 -b .rpm
cp vendor/qrcodegen/LICENSE qrcodegen_LICENSE
cp vendor/plutovg/LICENSE plutovg_LICENSE
@@ -164,6 +165,14 @@ TEST_PHP_ARGS="-n -d extension=gd -d extension=simplexml -d extension=%{buildroo
%changelog
+* Thu May 21 2026 Remi Collet <remi@remirepo.net> - 1.1.1-1
+- update to 1.1.1
+- drop patches merged upstream
+
+* Sun May 17 2026 Remi Collet <remi@remirepo.net> - 1.1.0-2
+- test build with upstream patch
+- open https://github.com/iliaal/fastchart/pull/4 fix font path
+
* Sat May 16 2026 Remi Collet <remi@remirepo.net> - 1.1.0-1
- new package
- open https://github.com/iliaal/fastchart/pull/1 fix test, ensure searching in the right place