Package Details: mscgen 0.20-4

Git Clone URL: https://aur.archlinux.org/mscgen.git (read-only, click to copy)
Package Base: mscgen
Description: Message Sequence Chart Generator
Upstream URL: http://www.mcternan.me.uk/mscgen/
Licenses: GPL
Submitter: Stebalien
Maintainer: Stebalien
Last Packager: Stebalien
Votes: 3
Popularity: 0.000000
First Submitted: 2016-02-03 14:34 (UTC)
Last Updated: 2023-03-28 15:33 (UTC)

Latest Comments

Stebalien commented on 2023-03-28 15:33 (UTC)

Done, thanks!

lynxis commented on 2023-03-28 15:12 (UTC)

Please add

makedepends=('gsfonts')

to allow the build to succeed.

I would also recommend adding configure argument --with-png, since it automatic use this, but having it explicit will fail when gd become incompatible.

Currently this fails in a clean chroot environment:

Making check in test
make[1]: Entering directory '/build/mscgen/src/mscgen-0.20/test'
make  check-TESTS
make[2]: Entering directory '/build/mscgen/src/mscgen-0.20/test'
testinput0.msc
Error: gdoTextHeight: fontconfig: Couldn't find font. (GDFONTPATH=)
FAIL: renderercheck.sh
====================================================
1 of 1 test failed
Please report to Michael.McTernan.2001@cs.bris.ac.uk
====================================================
make[2]: *** [Makefile:201: check-TESTS] Error 1
make[2]: Leaving directory '/build/mscgen/src/mscgen-0.20/test'
make[1]: *** [Makefile:323: check-am] Error 2
make[1]: Leaving directory '/build/mscgen/src/mscgen-0.20/test'
make: *** [Makefile:312: check-recursive] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
==> ERROR: Build failed

Stebalien commented on 2021-02-23 17:26 (UTC)

Applied, thanks!

cholin commented on 2021-02-23 14:36 (UTC) (edited on 2021-02-23 14:37 (UTC) by cholin)

For me this doesn't build anymore as tests are failing:

(..)
make[2]: Entering directory '/tmp/msggen/src/mscgen-0.20/test'
testinput0.msc
testinput10.msc
testinput11.msc
testinput12.msc
testinput13.msc
testinput14.msc
testinput15.msc
testinput16.msc
testinput17.msc
realloc(): invalid next size
./renderercheck.sh: line 28: 127095 Aborted                 (core dumped) $VALGRIND $top_builddir/src/mscgen -T png -i $srcdir/$F -o $F.png
FAIL: renderercheck.sh
====================================================
1 of 1 test failed
Please report to Michael.McTernan.2001@cs.bris.ac.uk
====================================================
make[2]: *** [Makefile:201: check-TESTS] Error 1
make[2]: Leaving directory '/tmp/msggen/src/mscgen-0.20/test'
make[1]: *** [Makefile:323: check-am] Error 2
make[1]: Leaving directory '/tmp/msggen/src/mscgen-0.20/test'
make: *** [Makefile:312: check-recursive] Error 1
==> ERROR: A failure occurred in check().

Seems Debian already has a patch for this: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1745182.html

Using the following PKGBUILD+patch works for me:

--- PKGBUILD.old    2021-02-23 15:33:04.000000000 +0100
+++ PKGBUILD    2021-02-23 15:25:25.322341205 +0100
@@ -11,8 +11,14 @@
 depends=('gd')
 makedepends=()
 options=()
-source=( "http://www.mcternan.me.uk/mscgen/software/$pkgname-src-$pkgver.tar.gz" )
-sha256sums=('3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23')
+source=( "http://www.mcternan.me.uk/mscgen/software/$pkgname-src-$pkgver.tar.gz" "debian-width-never-less-than-zero.patch" )
+sha256sums=('3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23'
+            'a3dec8aa28f21daf6642a0075c41dd6d15b03d5f01378d071902784654a0c692')
+
+prepare() {
+    cd "$pkgname-$pkgver"
+    patch --forward --strip=1 --input="${srcdir}/debian-width-never-less-than-zero.patch"
+}

 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"

--

debian-width-never-less-than-zero.patch

Description: don't make width < 0 with an off-by-one fix-up
 gdoTextWidth() tries to correct an off-by-one error in the calculated width
 of a text bounding box; but doesn't account for the possibility that the
 bounding box has a size of zero (which is the case in latest libgd for
 zero-width text).  Account for this so we aren't accidentally returning
 -1 where we mean 0.
Author: Steve Langasek <steve.langa...@ubuntu.com>
Bug-Debian: https://bugs.debian.org/960405
Last-Update: 2020-05-15
--- mscgen-0.20/src/gd_out.c    2011-03-05 11:51:50.000000000 +0100
+++ mscgen-0.20/src/gd_out2.c   2021-02-23 15:23:00.434133429 +0100
@@ -212,7 +212,7 @@
      *  the right of the last character for the fixed width
      *  font.
      */
-    return rect[2] - 1;
+    return rect[2] ? rect[2] - 1 : 0;
 #endif
 }