Upstream patch to fix FTBFS.

This commit is contained in:
Gwyn Ciesla 2024-01-31 11:23:48 -06:00
parent 0c143225cc
commit 46de693104
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 1f87c35bc2a36fdca760a4577761d30d9cc876e2 Mon Sep 17 00:00:00 2001
From: Bo Anderson <mail@boanderson.me>
Date: Tue, 27 Jun 2023 04:07:35 +0100
Subject: [PATCH] Fix missing includes on macOS
---
src/extra/gd/gd.c | 1 +
src/extra/gd/gd_gd2.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/extra/gd/gd.c b/src/extra/gd/gd.c
index dc6a9a7..a3395d6 100644
--- a/src/extra/gd/gd.c
+++ b/src/extra/gd/gd.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <limits.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/extra/gd/gd_gd2.c b/src/extra/gd/gd_gd2.c
index 05d8dcb..e5c5d32 100644
--- a/src/extra/gd/gd_gd2.c
+++ b/src/extra/gd/gd_gd2.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <errno.h>
+#include <limits.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

View File

@ -1,7 +1,7 @@
Summary: Windows MetaFile Library
Name: libwmf
Version: 0.2.13
Release: 4%{?dist}
Release: 5%{?dist}
#libwmf is under the LGPLv2+, however...
#1. The tarball contains an old version of the urw-fonts under GPL+.
# Those fonts are not installed
@ -11,6 +11,8 @@ License: LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-1.0-or-later
Source: https://github.com/caolanm/libwmf/archive/v%{version}.tar.gz
URL: https://github.com/caolanm/libwmf
Patch0: 1f87c35bc2a36fdca760a4577761d30d9cc876e2.patch
Provides: bundled(gd) = 2.0.0
Requires: urw-fonts
@ -45,6 +47,8 @@ using libwmf.
%setup -q
f=README ; iconv -f iso-8859-2 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
%patch -P 0 -p1
%build
autoreconf -i -f -Ipatches
%configure --with-libxml2 --disable-static --disable-dependency-tracking --with-gsfontdir=/usr/share/fonts/urw-base35
@ -94,6 +98,9 @@ sed -i $RPM_BUILD_ROOT%{_datadir}/libwmf/fonts/fontmap -e 's#libwmf/fonts#fonts/
%changelog
* Wed Jan 31 2024 Gwyn Ciesla <gwync@protonmail.com> - 0.2.13-5
- Upstream patch to fix FTBFS.
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild