[packages/t1lib] - rel 12, build fixes for modern gcc

baggins baggins at pld-linux.org
Thu May 14 19:13:20 CEST 2026


commit 41398bc77b18271af1fa118c6fbb4fef639a2771
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu May 14 21:13:04 2026 +0200

    - rel 12, build fixes for modern gcc

 ac-gcc.patch | 11 +++++++++++
 c99.patch    | 14 ++++++++++++++
 t1lib.spec   |  9 ++++++++-
 3 files changed, 33 insertions(+), 1 deletion(-)
---
diff --git a/t1lib.spec b/t1lib.spec
index 6d2e6d7..6c837ec 100644
--- a/t1lib.spec
+++ b/t1lib.spec
@@ -9,7 +9,7 @@ Summary(ru.UTF-8):	Растеризатор шрифтов Type 1
 Summary(uk.UTF-8):	Растеризатор шрифтів Type 1
 Name:		t1lib
 Version:	5.1.2
-Release:	11
+Release:	12
 License:	GPL v2
 Group:		Libraries
 Source0:	http://sunsite.unc.edu/pub/Linux/libs/graphics/%{name}-%{version}.tar.gz
@@ -29,6 +29,8 @@ Patch7:		format-security.patch
 Patch8:		t1lib-5.1.2-CVE-2010-2642_2011-0433_2011-5244.patch
 Patch9:		t1lib-5.1.2-CVE-2011-0764.patch
 Patch10:	t1lib-5.1.2-CVE-2011-1552_1553_1554.patch
+Patch11:	ac-gcc.patch
+Patch12:	c99.patch
 URL:		http://www.t1lib.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -276,6 +278,8 @@ Program testowy dla t1lib z interfejsem X11.
 %patch -P8 -p1
 %patch -P9 -p1
 %patch -P10 -p1
+%patch -P11 -p1
+%patch -P12 -p1
 
 rm -f ac-tools/aclocal.m4
 
@@ -283,6 +287,9 @@ rm -f ac-tools/aclocal.m4
 %{__libtoolize}
 %{__aclocal} -I ac-tools
 %{__autoconf}
+
+export CFLAGS="%{rpmcflags} -std=gnu17"
+export CXXFLAGS="%{rpmcflags} -std=gnu17"
 %configure
 
 %{__make} %{!?with_doc:without_doc}
diff --git a/ac-gcc.patch b/ac-gcc.patch
new file mode 100644
index 0000000..a901b97
--- /dev/null
+++ b/ac-gcc.patch
@@ -0,0 +1,11 @@
+--- t1lib-5.1.2/configure.in.orig	2026-05-14 17:29:47.000000000 +0200
++++ t1lib-5.1.2/configure.in	2026-05-14 21:04:48.326664367 +0200
+@@ -147,7 +147,7 @@
+   unsigned int B = 3;
+   int i;
+   for(i=0; i<B; i++) Array[[i]] = i - 3;
+-  exit( Array[[1]] != -2 );
++  return Array[[1]] != -2;
+ }],
+     ac_cv_c_gcc_strength_bug="no",
+     ac_cv_c_gcc_strength_bug="yes",
diff --git a/c99.patch b/c99.patch
new file mode 100644
index 0000000..92bae5a
--- /dev/null
+++ b/c99.patch
@@ -0,0 +1,14 @@
+Add missing parameter types for improved C99 compatibility: implicit
+ints are not part of C99.
+
+diff -ur t1lib-5.1.2.orig/lib/type1/regions.c t1lib-5.1.2/lib/type1/regions.c
+--- t1lib-5.1.2.orig/lib/type1/regions.c	2007-12-23 16:49:42.000000000 +0100
++++ t1lib-5.1.2/lib/type1/regions.c	2023-01-18 13:24:18.670386804 +0100
+@@ -604,6 +604,7 @@
+        register struct region *R;  /* region in which we are changing direction */
+        fractpel x,y;         /* current beginning x,y                        */
+        fractpel dy;          /* direction and magnitude of change in y       */
++       int x2, y2;
+ {
+        register fractpel ymin,ymax;  /* minimum and maximum Y since last call */
+        register fractpel x_at_ymin,x_at_ymax;  /* their respective X's       */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/t1lib.git/commitdiff/41398bc77b18271af1fa118c6fbb4fef639a2771



More information about the pld-cvs-commit mailing list