add patch to support biarch configuration [release 1.36.8-3mamba;Tue Mar 31 2015]

This commit is contained in:
Silvan Calarco 2024-01-06 05:19:47 +01:00
parent 3ad78f2ee9
commit d400b3bafb
2 changed files with 77 additions and 18 deletions

View File

@ -0,0 +1,44 @@
From c41144ce0d72cb19d347a46ef9386f257f14fb58 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Sun, 28 Oct 2012 23:19:39 +0100
Subject: [PATCH] Add multilib support
pango.modules list modules specific to a host architecture.
Add host triplet in path so that machine able to run multiple
triplet have a proper file per pango library.
---
pango/Makefile.am | 1 +
pango/pango-utils.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pango/Makefile.am b/pango/Makefile.am
index ab092c9..558108b 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -17,6 +17,7 @@ INCLUDES = \
-DPANGO_ENABLE_BACKEND \
-DPANGO_ENABLE_ENGINE \
-DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DHOST=\"$(host_triplet)\" \
-DLIBDIR=\"$(libdir)\" \
-I$(top_srcdir) \
-I$(top_builddir) \
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 18ffa26..3b88f15 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -738,9 +738,9 @@ pango_get_sysconf_subdirectory (void)
#else
const char *sysconfdir = g_getenv ("PANGO_SYSCONFDIR");
if (sysconfdir != NULL)
- tmp_result = g_build_filename (sysconfdir, "pango", NULL);
+ tmp_result = g_build_filename (sysconfdir, "pango", HOST, NULL);
else
- tmp_result = SYSCONFDIR "/pango";
+ tmp_result = SYSCONFDIR "/pango/" HOST;
#endif
g_once_init_leave((gsize*)&result, (gsize)tmp_result);
}
--
1.7.12.4

View File

@ -2,9 +2,15 @@
%define libver 1.0
%define modulesver 1.8.0
%ifarch x86_64
%define arch_suffix -64
%else
%define arch_suffix -32
%endif
Name: libpango
Version: 1.36.8
Release: 2mamba
Release: 3mamba
Summary: System for layout and rendering of internationalized text
Group: System/Internationalization
Vendor: openmamba
@ -13,6 +19,7 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.pango.org
# bugfixes: http://ftp.acc.umu.se/pub/GNOME/sources/%{pkgname}
Source: http://ftp.gnome.org/pub/GNOME/sources/pango/%{majver}/pango-%{version}.tar.xz
Patch0: libpango-1.36.8-lib64.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -75,10 +82,13 @@ Requires: gtk-doc
%prep
%setup -q -n pango-%{version}
%patch0 -p1
%build
# for patch0
autoreconf -f -i
%configure \
--program-suffix=-%{_target_cpu} \
--program-suffix=%{arch_suffix} \
%if "%{stage1}" == "1"
--enable-introspection=no
%endif
@ -99,27 +109,29 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/pango
%postun -p /sbin/ldconfig
%posttrans
/sbin/ldconfig
%ifarch %{ix86}
if [ -e %{_bindir}/pango-querymodules-x86_64 ]; then
mkdir %{_sysconfdir}/pango/i686-pc-linux-gnu
%{_bindir}/pango-querymodules-%{_target_cpu} > %{_sysconfdir}/pango/i686-pc-linux-gnu/pango.modules
else
if [ $1 -ge 1 ]; then
mkdir -p %{_sysconfdir}/pango/%{_target_platform}
%{_bindir}/pango-querymodules%{arch_suffix} > %{_sysconfdir}/pango/%{_target_platform}/pango.modules
%ifnarch x86_64
if [ ! -e /usr/bin/pango-querymodules-64 ]; then
%endif
%{_bindir}/pango-querymodules-%{_target_cpu} > %{_sysconfdir}/pango/pango.modules
ln -snf pango-querymodules-%{_target_cpu} %{_bindir}/pango-querymodules
ln -snf pango-view-%{_target_cpu} %{_bindir}/pango-view
%ifarch %{ix86}
ln -snf pango-querymodules%{arch_suffix} %{_bindir}/pango-querymodules
ln -snf pango-view%{arch_suffix} %{_bindir}/pango-view
%ifnarch x86_64
fi
%else
%endif
fi
# legacy cleanups
rm -f /etc/pango/pango.modules
rm -f /etc/pango/i686-pc-linux-gnu/pango.modules
rmdir /etc/pango/i686-pc-linux-gnu
exit 0
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/pango
%{_bindir}/pango-querymodules-%{_target_cpu}
%{_bindir}/pango-view-%{_target_cpu}
%{_bindir}/pango-querymodules%{arch_suffix}
%{_bindir}/pango-view%{arch_suffix}
%{_libdir}/libpango-%{libver}.so.*
%{_libdir}/libpangocairo-%{libver}.so.*
%{_libdir}/libpangoft2-%{libver}.so.*
@ -130,8 +142,8 @@ exit 0
%if "%{stage1}" != "1"
%{_libdir}/girepository-1.0/Pango*.typelib
%endif
%{_mandir}/man1/pango-querymodules-%{_target_cpu}.1*
%{_mandir}/man1/pango-view-%{_target_cpu}.1*
%{_mandir}/man1/pango-querymodules%{arch_suffix}.1*
%{_mandir}/man1/pango-view%{arch_suffix}.1*
#%{_mandir}/man1/preload.1.gz
%doc AUTHORS ChangeLog
@ -156,6 +168,9 @@ exit 0
%{_datadir}/gtk-doc/html/pango/*
%changelog
* Tue Mar 31 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.36.8-3mamba
- add patch to support biarch configuration
* Thu Mar 26 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.36.8-2mamba
- executable and configuration support for biarch environment