[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libredwg] missing issue tracker? non-POSIX code in

From: Greg Troxel
Subject: [libredwg] missing issue tracker? non-POSIX code in
Date: Thu, 02 Dec 2021 20:05:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix)

Greetings libdredwg people,

By way of introduction, I maintain packaging entries for a number of geo
software packages in pkgsrc, a multi-OS multi-CPU portable packaging
system, and contribute to some of the upstream packges.

I was trying to help someone look at data in a dwg in qgis, and after
avoiding a bunch of recommendations to use proprietary tools was really
glad to find libredwg, and as a bonus it was already in pkgsrc, but at
0.12.0.  I went to update the package, and configure failed.  The
relevant code was introduced in in 0.12.4, and the issue is
using the substitution ${A:2:1}, which is I believe not defined by
POSIX, and thus not implemented by many shells.

I'm guessing this substitution is a bash extensions, but many system,
including some GNU/Linux systems have non-bash /bin/sh.  NetBSD also has
a non-bash /bin/sh, which is where I noticed it.  As I understand it,
configure scripts should not only stick to POSIX but try extra hard to
be portable.

My really hacky patch to get the package to build is at the end.  It's
obviously not ok to commit upstream, but for now I know that gperf will
be 3.1, because that's how gperf in pkgsrc is.  But it shows the
problematic construct.

I tried to report this in an issue tracker, but the bug link from the
savannah project page got me a 404.

Thanks for having worked on libredwg, and thanks for listening


-      1.*) GPERF_VERSION=$((100+${GPERF_VERSION:2:1})) ;;
-      2.*) GPERF_VERSION=$((200+${GPERF_VERSION:2:1})) ;;
-      3.*) GPERF_VERSION=$((300+${GPERF_VERSION:2:1})) ;;
-      4.*) GPERF_VERSION=$((400+${GPERF_VERSION:2:1})) ;;
+      3.0) GPERF_VERSION=300 ;;
+      3.1) GPERF_VERSION=301 ;;
+      4.*) GPERF_VERSION=400 ;;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]