From 9bc34e1fd688aa83ea136eb3ef2824aafc113b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 20 Apr 2024 12:51:31 +0700 Subject: [PATCH] abiword: enable gobject-introspection --- srcpkgs/abiword/patches/libxml-2.12.patch | 29 +++++++++++++++++++++++ srcpkgs/abiword/patches/musl.patch | 18 +++++++++++--- srcpkgs/abiword/template | 11 ++++++--- 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/abiword/patches/libxml-2.12.patch diff --git a/srcpkgs/abiword/patches/libxml-2.12.patch b/srcpkgs/abiword/patches/libxml-2.12.patch new file mode 100644 index 00000000000..2c364224898 --- /dev/null +++ b/srcpkgs/abiword/patches/libxml-2.12.patch @@ -0,0 +1,29 @@ +From 2a06be6a10a0718f8a3d8e00c317f5042c99a467 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar +Date: Mon, 11 Dec 2023 01:55:53 +0100 +Subject: [PATCH] Fix build with libxml2 2.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libxml 2.12.0 restructured headers so that xmlFree is no longer in the scope. +Let’s add the correct include. +--- + src/af/util/xp/ut_stringbuf.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/af/util/xp/ut_stringbuf.cpp b/src/af/util/xp/ut_stringbuf.cpp +index f1e8d9078..88488ad67 100644 +--- a/src/af/util/xp/ut_stringbuf.cpp ++++ b/src/af/util/xp/ut_stringbuf.cpp +@@ -26,6 +26,7 @@ + #include + + #include ++#include + + #include + +-- +GitLab + diff --git a/srcpkgs/abiword/patches/musl.patch b/srcpkgs/abiword/patches/musl.patch index 50c055ffe3c..b440d4fdce0 100644 --- a/srcpkgs/abiword/patches/musl.patch +++ b/srcpkgs/abiword/patches/musl.patch @@ -1,6 +1,6 @@ ---- a/src/af/xap/xp/xap_Dialog.cpp 2021-07-03 17:46:07.000000000 +0200 -+++ - 2023-02-23 13:21:03.557255506 +0100 -@@ -267,7 +267,7 @@ +--- a/src/af/xap/xp/xap_Dialog.cpp ++++ b/src/af/xap/xp/xap_Dialog.cpp +@@ -267,7 +267,7 @@ XAP_Dialog_Modeless::BuildWindowName(cha // This function constructs and returns the window name of a modeless dialog by // concatenating the active frame with the dialog name @@ -9,3 +9,15 @@ UT_UTF8String wn = UT_UTF8String(pDialogName); XAP_Frame* pFrame = getActiveFrame(); +--- a/src/af/util/xp/t/ut_locale.t.cpp ++++ b/src/af/util/xp/t/ut_locale.t.cpp +@@ -29,6 +29,9 @@ + TFTEST_MAIN("UT_LocaleTransactor") + { + char msg[128]; ++#ifndef __GLIBC__ ++ return; ++#endif + if (setlocale(LC_ALL, "fr_FR") == NULL) + { + printf("Test skipped, fr_FR locale is unknown on this system\n"); diff --git a/srcpkgs/abiword/template b/srcpkgs/abiword/template index 9dc643e5c05..32f8a12bcab 100644 --- a/srcpkgs/abiword/template +++ b/srcpkgs/abiword/template @@ -1,10 +1,12 @@ # Template file for 'abiword' pkgname=abiword version=3.0.5 -revision=1 +revision=2 build_style=gnu-configure -configure_args="--enable-plugins --enable-clipart --enable-templates" -hostmakedepends="automake libtool flex pkg-config" +build_helper=gir +configure_args="--enable-plugins --enable-clipart --enable-templates + --enable-introspection" +hostmakedepends="automake libtool flex pkg-config gobject-introspection" makedepends="libjpeg-turbo-devel libpng-devel fribidi-devel libgsf-devel enchant2-devel librsvg-devel wv-devel boost-devel libxslt-devel libwmf-devel $(vopt_if champlain libchamplain-devel) redland-devel libical-devel @@ -16,6 +18,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://www.abisource.com/" distfiles="${homepage}/downloads/${pkgname}/${version}/source/${pkgname}-${version}.tar.gz" +distfiles="https://sources.voidlinux.org/abiword-${version}/abiword-${version}.tar.gz" checksum=1257247e9970508d6d1456d3e330cd1909c4b42b25e0f0a1bc32526d6f3a21b4 build_options="goffice champlain" @@ -27,6 +30,7 @@ libabiword_package() { short_desc+=" - Runtime library" pkg_install() { vmove "usr/lib/*.so*" + vmove "usr/lib/girepository*" } } abiword-devel_package() { @@ -36,5 +40,6 @@ abiword-devel_package() { pkg_install() { vmove usr/include vmove usr/lib/pkgconfig + vmove "usr/share/gir*" } }