[packages/freetype1] - more autotools and spec cleaning

qboosh qboosh at pld-linux.org
Thu Mar 26 22:33:22 CET 2026


commit 976273153858d1321cc6076c57500fef3126df32
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Mar 26 22:33:37 2026 +0100

    - more autotools and spec cleaning

 freetype-autoconf.patch | 29 ++++++++++++++++++++-----
 freetype1-link.patch    |  2 +-
 freetype1.spec          | 58 ++++++++++++++++++++++++-------------------------
 3 files changed, 54 insertions(+), 35 deletions(-)
---
diff --git a/freetype1.spec b/freetype1.spec
index 526f1ce..8e73d10 100644
--- a/freetype1.spec
+++ b/freetype1.spec
@@ -1,8 +1,6 @@
-# TODO:
-# - fix build with libtool-2
 #
 # Conditional build:
-%bcond_without	static_libs	# don't build static libraries
+%bcond_without	static_libs	# static library
 #
 Summary:	Truetype font rasterizer
 Summary(pl.UTF-8):	Rasteryzer fontów Truetype
@@ -28,7 +26,7 @@ URL:		http://freetype.sourceforge.net/freetype1/index.html
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	gettext-tools
-BuildRequires:	libtool
+BuildRequires:	libtool >= 2:2
 BuildRequires:	xorg-lib-libX11-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -90,8 +88,8 @@ Summary(pl.UTF-8):	Programy użytkowe freetype
 Group:		Applications
 Requires:	%{name} = %{version}-%{release}
 Provides:	freetype-progs = %{version}
-Obsoletes:	freetype-utils
-Obsoletes:	freetype-tools
+Obsoletes:	freetype-utils < 2
+Obsoletes:	freetype-tools < 2
 
 %description progs
 Freetype library utilites:
@@ -133,24 +131,15 @@ Przykładowe aplikacje wykorzystujące freetype:
 %patch -P8 -p1
 
 %build
-install /usr/share/automake/missing .
 %{__gettextize}
-# gettextize stupidity (doesn't see intl/Makefile in next lines after AC_OUTPUT)
-sed -e 's@\(AC_OUTPUT.*\) intl/Makefile@\1@' \
-	-e 's at AM_GNU_GETTEXT.*@AM_GNU_GETTEXT([external])@' \
-	-e 's at intl/Makefile@@' \
-		configure.in > configure.in.tmp
-mv -f configure.in.tmp configure.in
-echo 'cs de es fr nl' > po/LINGUAS
+# not done by gettextize when no Makefile.am
+install -d m4
+cp -p /usr/share/gettext/m4/*.m4 m4/
 %{__libtoolize}
-%{__aclocal} -I %{_datadir}/gettext/m4
+%{__aclocal} -I m4
 %{__autoconf}
-# Ugly hack to avoid error:
-# configure: error: cannot find required auxiliary files: compile missing
-#
-# Proper way would be to use automake which creates these files,
-# but then it fails complaining that no Makefile.am exists
-touch compile missing
+# automake is not used, so need to copy manually
+cp -p /usr/share/automake/{compile,missing} .
 %configure \
 	%{?with_static_libs:--enable-static} \
         --with-gnu-ld
@@ -177,10 +166,10 @@ rm -rf $RPM_BUILD_ROOT
 %find_lang freetype
 
 # resolve conflict with freetype-demos-2.*
-mv -f $RPM_BUILD_ROOT%{_bindir}/{ftdump,ft1dump}
-mv -f $RPM_BUILD_ROOT%{_bindir}/{ftlint,ft1lint}
-mv -f $RPM_BUILD_ROOT%{_bindir}/{ftview,ft1view}
-mv -f $RPM_BUILD_ROOT%{_bindir}/{fttimer,ft1timer}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{ftdump,ft1dump}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{ftlint,ft1lint}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{ftview,ft1view}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{fttimer,ft1timer}
 
 for bdir in ttf2bdf ttfbanner; do
 	%{__make} install -C contrib/$bdir \
@@ -203,16 +192,27 @@ rm -rf $RPM_BUILD_ROOT
 %doc howto/unix.txt README announce docs/{*.txt,FAQ,TODO,credits}
 %{_libdir}/libttf.so
 %{_libdir}/libttf.la
-%{_includedir}/*
+%{_includedir}/freetype
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libttf.a
 %endif
 
 %files progs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/f*
-%attr(755,root,root) %{_bindir}/ttf*
+%attr(755,root,root) %{_bindir}/ft1dump
+%attr(755,root,root) %{_bindir}/ft1lint
+%attr(755,root,root) %{_bindir}/ft1timer
+%attr(755,root,root) %{_bindir}/ft1view
+%attr(755,root,root) %{_bindir}/fterror
+%attr(755,root,root) %{_bindir}/ftmetric
+%attr(755,root,root) %{_bindir}/ftsbit
+%attr(755,root,root) %{_bindir}/ftstring
+%attr(755,root,root) %{_bindir}/ftstrpnm
+%attr(755,root,root) %{_bindir}/ftstrtto
+%attr(755,root,root) %{_bindir}/ftzoom
+%attr(755,root,root) %{_bindir}/ttf2bdf
+%attr(755,root,root) %{_bindir}/ttfbanner
 %{_mandir}/man1/ttf2bdf.1*
diff --git a/freetype-autoconf.patch b/freetype-autoconf.patch
index 5f37d3c..100cb6b 100644
--- a/freetype-autoconf.patch
+++ b/freetype-autoconf.patch
@@ -1,12 +1,13 @@
 diff -urN freetype-1.3.1.org/configure.in freetype-1.3.1/configure.in
 --- freetype-1.3.1.org/configure.in	1999-09-03 15:09:55.000000000 +0200
 +++ freetype-1.3.1/configure.in	2023-12-03 15:53:38.966698165 +0100
-@@ -2,14 +2,16 @@
+@@ -2,14 +2,17 @@
  dnl
  dnl Process this file with autoconf to produce a configure script.
  
 -AC_INIT(lib/freetype.h)
 +AC_INIT([freetype],[1.3.1])
++AC_CONFIG_MACRO_DIR([m4])
 +
 +AM_INIT_AUTOMAKE
  
@@ -21,7 +22,7 @@ diff -urN freetype-1.3.1.org/configure.in freetype-1.3.1/configure.in
  
  dnl FreeType version
  freetype_version='1.2.0'
-@@ -17,14 +19,6 @@
+@@ -17,14 +20,6 @@
  dnl libttf.so version
  version_info='4:0:2'
  
@@ -36,7 +37,7 @@ diff -urN freetype-1.3.1.org/configure.in freetype-1.3.1/configure.in
  dnl Checks for programs.
  AC_PROG_CC
  AC_PROG_CPP
-@@ -44,6 +38,7 @@
+@@ -44,6 +39,7 @@
    esac
  fi
  AC_SUBST(XX_CFLAGS)
@@ -44,7 +45,7 @@ diff -urN freetype-1.3.1.org/configure.in freetype-1.3.1/configure.in
  
  dnl at least Digital UNIX 4.0d needs this due to a strange make program
  
-@@ -57,100 +52,8 @@
+@@ -57,100 +53,7 @@
  AC_SUBST(freetype_version)
  AC_SUBST(version_info)
  
@@ -142,7 +143,6 @@ diff -urN freetype-1.3.1.org/configure.in freetype-1.3.1/configure.in
 -  USE_NLS=no
 -fi
 -
-+ALL_LINGUAS="cs de es fr nl"
 +AM_GNU_GETTEXT([external])
  
  AC_CHECK_PROG(RM, rm, rm)
@@ -291,3 +291,22 @@ diff -urN freetype-1.3.1.org/lib/arch/unix/Makefile.in freetype-1.3.1/lib/arch/u
  
  
  all: do_link
+--- freetype-1.3.1/po/LINGUAS.orig	1970-01-01 01:00:00.000000000 +0100
++++ freetype-1.3.1/po/LINGUAS	1970-01-01 01:00:00.000000000 +0100
+@@ -0,0 +1,5 @@
++cs
++de
++es
++fr
++nl
+--- freetype-1.3.1/test/arch/unix/Makefile.in.orig	2026-03-26 22:02:27.812786265 +0100
++++ freetype-1.3.1/test/arch/unix/Makefile.in	2026-03-26 22:02:57.732624176 +0100
+@@ -30,7 +30,7 @@ INCDIRS = -I. -I$(srcdir) -I$(top_buildd
+ 
+ CFLAGS = @CFLAGS@ @X_CFLAGS@ @XX_CFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+-FT_CFLAGS = $(INCDIRS) $(CFLAGS) $(CPPFLAGS) -DX11 -DLOCALEDIR='"@LOCALEDIR@"'
++FT_CFLAGS = $(INCDIRS) $(CFLAGS) $(CPPFLAGS) -DX11 -DLOCALEDIR='"@datadir@/locale"'
+ 
+ FT_LIBS = @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ @LIBS@
+ 
diff --git a/freetype1-link.patch b/freetype1-link.patch
index d9a2b79..04c6320 100644
--- a/freetype1-link.patch
+++ b/freetype1-link.patch
@@ -24,7 +24,7 @@
  CFLAGS = @CFLAGS@ @X_CFLAGS@ @XX_CFLAGS@
  CPPFLAGS = @CPPFLAGS@
 +LDFLAGS = @LDFLAGS@
- FT_CFLAGS = $(INCDIRS) $(CFLAGS) $(CPPFLAGS) -DX11 -DLOCALEDIR='"@LOCALEDIR@"'
+ FT_CFLAGS = $(INCDIRS) $(CFLAGS) $(CPPFLAGS) -DX11 -DLOCALEDIR='"@datadir@/locale"'
  
 -FT_LIBS = @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ @LIBS@
 +FT_LIBS = @X_LIBS@ @X_EXTRA_LIBS@ @LIBS@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/freetype1.git/commitdiff/976273153858d1321cc6076c57500fef3126df32



More information about the pld-cvs-commit mailing list