summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD31
-rw-r--r--configure.local3
-rw-r--r--fix-tbl-segfault.patch20
4 files changed, 49 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8461c469f616..83cf5b2cc7d9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mandoc
pkgdesc = A suite of tools compiling mdoc from the OpenBSD project
- pkgver = 1.14.4
+ pkgver = 1.14.5
pkgrel = 3
url = https://mdocml.bsd.lv/
arch = i686
@@ -9,14 +9,16 @@ pkgbase = mandoc
depends = zlib
provides = man
conflicts = man
- source = https://mdocml.bsd.lv/snapshots/mandoc-1.14.4.tar.gz
+ source = https://mdocml.bsd.lv/snapshots/mandoc-1.14.5.tar.gz
source = configure.local
source = mandoc.service
source = mandoc.timer
- sha256sums = 24eb72103768987dcc63b53d27fdc085796330782f44b3b40c4660b1e1ee9b9c
- sha256sums = f0e8ddb61d063bec02a6a1f73f5d979bb548e7aabcf0a27c0d5c29c4194bfc8e
+ source = fix-tbl-segfault.patch
+ sha256sums = 8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7
+ sha256sums = 383772d5dd7c51319588ac4b63d4e7c452490568f6a3e905d118fdd6c4aa8a68
sha256sums = 2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6
sha256sums = 74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4
+ sha256sums = 12e6138be6ec2e8a34373876d8a5fce387a1d2b51a461ae20e1d98637af1d15c
pkgname = mandoc
diff --git a/PKGBUILD b/PKGBUILD
index 036ca38d2800..5101395d4a38 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Matheus de Alcantara <matheus.de.alcantara@gmail.com>
pkgname=mandoc
-pkgver=1.14.4
+pkgver=1.14.5
pkgrel=3
pkgdesc='A suite of tools compiling mdoc from the OpenBSD project'
arch=('i686' 'x86_64')
@@ -14,24 +14,39 @@ conflicts=('man')
source=("https://mdocml.bsd.lv/snapshots/$pkgname-$pkgver.tar.gz"
'configure.local'
'mandoc.service'
- 'mandoc.timer')
-sha256sums=('24eb72103768987dcc63b53d27fdc085796330782f44b3b40c4660b1e1ee9b9c'
- 'f0e8ddb61d063bec02a6a1f73f5d979bb548e7aabcf0a27c0d5c29c4194bfc8e'
+ 'mandoc.timer'
+ 'fix-tbl-segfault.patch')
+sha256sums=('8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7'
+ '383772d5dd7c51319588ac4b63d4e7c452490568f6a3e905d118fdd6c4aa8a68'
'2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6'
- '74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4')
+ '74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4'
+ '12e6138be6ec2e8a34373876d8a5fce387a1d2b51a461ae20e1d98637af1d15c')
prepare() {
- cp "$srcdir"/configure.local $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
+ cp "$srcdir"/configure.local .
+
+ # fix configure script - see https://aur.archlinux.org/packages/mandoc/#comment-739085
+ sed -i -e 's/^CC=.*/CC=cc/' ./configure
+ # apply CFLAGS and LDFLAGS from makepkg.conf
+ sed -i -e "s/^CFLAGS=.*/CFLAGS=\"$CFLAGS\"/" ./configure
+ sed -i -e "s/^LDFLAGS=.*/LDFLAGS=\"$LDFLAGS\"/" ./configure
+
+ # fix segfault when formatting tables on some man pages
+ patch -Np0 -i ../fix-tbl-segfault.patch
+
+ # remove useless duplicate global variables
+ sed -i -e '/^int dummy;$/d' ./compat_*.c
}
build() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
./configure
make
}
package() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver"
DESTDIR="$pkgdir" make install
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
diff --git a/configure.local b/configure.local
index 8abc16b1b840..8228e5407a33 100644
--- a/configure.local
+++ b/configure.local
@@ -16,6 +16,3 @@ MANM_ROFF=mandoc_roff
# catman(8) is disabled by default.
BUILD_CATMAN=1
-
-# _FORTIFY_SOURCE doesn't work unless an optimisation level is specified.
-CFLAGS="$CFLAGS -O2"
diff --git a/fix-tbl-segfault.patch b/fix-tbl-segfault.patch
new file mode 100644
index 000000000000..b3147c760e37
--- /dev/null
+++ b/fix-tbl-segfault.patch
@@ -0,0 +1,20 @@
+--- tbl_term.c 2020-08-18 12:35:27.290953791 +0200
++++ tbl_term.c 2020-08-18 12:35:23.450952148 +0200
+@@ -626,7 +626,7 @@
+
+ lw = cpp == NULL || cpn == NULL ||
+ (cpn->pos != TBL_CELL_DOWN &&
+- (dpn == NULL || strcmp(dpn->string, "\\^") != 0))
++ (dpn == NULL || dpn->pos == TBL_DATA_NONE || strcmp(dpn->string, "\\^") != 0))
+ ? hw : 0;
+ tbl_direct_border(tp, BHORIZ * lw,
+ col->width + col->spacing / 2);
+@@ -670,7 +670,7 @@
+
+ rw = cpp == NULL || cpn == NULL ||
+ (cpn->pos != TBL_CELL_DOWN &&
+- (dpn == NULL || strcmp(dpn->string, "\\^") != 0))
++ (dpn == NULL || dpn->pos == TBL_DATA_NONE || strcmp(dpn->string, "\\^") != 0))
+ ? hw : 0;
+
+ /* The line crossing at the end of this column. */