diff options
author | WorMzy Tykashi | 2021-05-01 13:05:02 +0100 |
---|---|---|
committer | WorMzy Tykashi | 2021-05-01 13:05:53 +0100 |
commit | c7f25bbad87adf86c40e07eb28f2b5f02422294a (patch) | |
tree | 7b23fab96d527401244c67c1685d59b678499610 | |
parent | c27814ded10daf93ebae5b05d6f236a2f4083aa8 (diff) | |
download | aur-c7f25bbad87adf86c40e07eb28f2b5f02422294a.tar.gz |
Add fix for segfaults
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | glib2-segfault-fix.patch | 16 |
3 files changed, 28 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = abiword-gtk2 pkgdesc = Fully-featured word processor, GTk2, No plugins, Lite version pkgver = 3.0.4 - pkgrel = 1 + pkgrel = 2 url = https://www.abisource.com arch = i686 arch = x86_64 @@ -18,8 +18,10 @@ pkgbase = abiword-gtk2 conflicts = abiword-plugins source = abiword-3.0.4.tar.gz::https://abisource.com/downloads/abiword/3.0.4/source/abiword-3.0.4.tar.gz source = enchant-2.patch + source = glib2-segfault-fix.patch sha256sums = e93096cb192e5bc19d62e180fc5eda643206465315a710113ae5036bc2a1a5d7 sha256sums = f510f4df2cf597f5493f52ce855b4209628d7622b03532c2ef221f8b7032a349 + sha256sums = 8a4d873309b5cec444b0cf88141f190a35d8225ea143a57cca6366275788c175 pkgname = abiword-gtk2 @@ -1,10 +1,11 @@ # Maintainer: WorMzy Tykashi <wormzy.tykashi@gmail.com> +# Contributor: zootboy # Contributor: FadeMind <fademind@gmail.com> # Contributor: Richard Jackson <rj@iinet.net.au> pkgname=abiword-gtk2 _pkgname=abiword pkgver=3.0.4 -pkgrel=1 +pkgrel=2 pkgdesc='Fully-featured word processor, GTk2, No plugins, Lite version' arch=('i686' 'x86_64') license=('GPL') @@ -12,19 +13,21 @@ depends=('fribidi' 'wv' 'librsvg' 'enchant' 'desktop-file-utils' 'gtk2' 'libxslt makedepends=('boost') conflicts=('abiword' 'abiword-plugins') url='https://www.abisource.com' -# At time of writing, the abiword website has broken https (but redirects http->https) -# Download manually with: -# curl -O -L -k https://abisource.com/downloads/abiword/3.0.4/source/abiword-3.0.4.tar.gz source=("$_pkgname-$pkgver.tar.gz::https://abisource.com/downloads/$_pkgname/$pkgver/source/$_pkgname-$pkgver.tar.gz" - enchant-2.patch) + enchant-2.patch + glib2-segfault-fix.patch) sha256sums=('e93096cb192e5bc19d62e180fc5eda643206465315a710113ae5036bc2a1a5d7' - 'f510f4df2cf597f5493f52ce855b4209628d7622b03532c2ef221f8b7032a349') + 'f510f4df2cf597f5493f52ce855b4209628d7622b03532c2ef221f8b7032a349' + '8a4d873309b5cec444b0cf88141f190a35d8225ea143a57cca6366275788c175') prepare() { cd $_pkgname-$pkgver # Replace deprecated enchant functions patch -Np1 -i ../enchant-2.patch + + # Fix for segfault when selecting/copying text + patch -Np1 -i ../glib2-segfault-fix.patch } build() { diff --git a/glib2-segfault-fix.patch b/glib2-segfault-fix.patch new file mode 100644 index 000000000000..040ead5d88a9 --- /dev/null +++ b/glib2-segfault-fix.patch @@ -0,0 +1,16 @@ +--- abiword-3.0.4/src/af/util/xp/ut_go_file.cpp 2021-04-29 13:06:35.196255120 -0700 ++++ abiword-3.0.4/src/af/util/xp/ut_go_file.cpp 2021-04-29 13:08:07.790716736 -0700 +@@ -1002,6 +1002,12 @@ + GFile *f = g_file_new_for_uri (uri); + char *basename = g_file_get_basename (f); + g_object_unref (G_OBJECT (f)); ++ if (!basename) // Try again since the "uri" might just be a plain path. ++ { ++ f = g_file_new_for_path (uri); ++ basename = g_file_get_basename (f); ++ g_object_unref (G_OBJECT (f)); ++ } + #elif defined(GOFFICE_WITH_GNOME) + char *raw_uri = gnome_vfs_unescape_string (uri, G_DIR_SEPARATOR_S); + char *basename = raw_uri ? g_path_get_basename (raw_uri) : NULL; + |