diff options
author | Thomas Beierlein <tomjbe@gentoo.org> | 2022-02-25 06:54:02 +0100 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2022-02-25 06:54:02 +0100 |
commit | 5ffa7558b47964913a0c88edb85c0eca3020d7bc (patch) | |
tree | 7bc95d126a69456917d6226b90ccdc02cd38c596 /sci-electronics | |
parent | dev-cpp/rapidyaml: add 0.4.0 (diff) | |
download | gentoo-5ffa7558b47964913a0c88edb85c0eca3020d7bc.tar.gz gentoo-5ffa7558b47964913a0c88edb85c0eca3020d7bc.tar.bz2 gentoo-5ffa7558b47964913a0c88edb85c0eca3020d7bc.zip |
sci-electronics/xnec2c: Fix musl related compile problems
After discussion with upstream drop left overs from experiments with
handling of some dynamic libraries. That fixes the problems with the use
of dlinfo() and backtrack_symbols().
Closes: https://bugs.gentoo.org/832744
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'sci-electronics')
-rw-r--r-- | sci-electronics/xnec2c/files/xnec2c-4.4.5-musl.patch | 63 | ||||
-rw-r--r-- | sci-electronics/xnec2c/xnec2c-4.4.5.ebuild | 3 |
2 files changed, 66 insertions, 0 deletions
diff --git a/sci-electronics/xnec2c/files/xnec2c-4.4.5-musl.patch b/sci-electronics/xnec2c/files/xnec2c-4.4.5-musl.patch new file mode 100644 index 000000000000..a995463224b0 --- /dev/null +++ b/sci-electronics/xnec2c/files/xnec2c-4.4.5-musl.patch @@ -0,0 +1,63 @@ +diff --git a/src/mathlib.c b/src/mathlib.c +index 5354240..b28033e 100644 +--- a/src/mathlib.c ++++ b/src/mathlib.c +@@ -155,9 +155,6 @@ int open_mathlib(mathlib_t *lib) + return 0; + } + +- if (dlinfo(lib->handle, RTLD_DI_LMID, &lib->lmid) == -1) +- printf("dlinfo: %s: %s\n", lib->lib, dlerror()); +- + // Call the init() function if configured + if (lib->init != NULL) + lib->init(lib); +@@ -217,14 +214,7 @@ void init_mathlib() + mathlibs[libidx].available = 1; + + // At this point the library load was successful, provide detail: +- if (mathlibs[libidx].handle != NULL) +- { +- char lpath[PATH_MAX]; +- dlinfo(mathlibs[libidx].handle, RTLD_DI_ORIGIN, lpath); +- printf(" loaded ok: %s/%s\n", lpath, mathlibs[libidx].lib); +- } +- else +- printf(" loaded ok.\n"); ++ printf(" loaded ok.\n"); + + // Set the default to the first one we find: + if (current_mathlib == NULL) +diff --git a/src/utils.c b/src/utils.c +index b803402..1462df2 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -17,7 +17,7 @@ + * https://www.xnec2c.org/ + */ + +-#include <execinfo.h> ++//#include <execinfo.h> + + #include "utils.h" + #include "shared.h" +@@ -736,18 +736,7 @@ void _print_backtrace(char **strings) + // Return an array of backtrace strings. The value returned must be free()'ed. + char **_get_backtrace() + { +- void *array[10]; +- char **strings; +- int size; +- +- size = backtrace(array, 10); +- strings = backtrace_symbols(array, size); +- +- // This wastes an array entry, but allows _print_backtrace() to find +- // the end of the list without realloc'ing space for a NULL: +- strings[size-1] = NULL; +- +- return strings; ++ return NULL; + } + + void print_backtrace(char *msg) diff --git a/sci-electronics/xnec2c/xnec2c-4.4.5.ebuild b/sci-electronics/xnec2c/xnec2c-4.4.5.ebuild index d305cccd2dda..6c495a7c80f8 100644 --- a/sci-electronics/xnec2c/xnec2c-4.4.5.ebuild +++ b/sci-electronics/xnec2c/xnec2c-4.4.5.ebuild @@ -21,10 +21,13 @@ RDEPEND="dev-libs/glib:2 DEPEND="${RDEPEND} sys-devel/gettext" +PATCHES=( "${FILESDIR}/$PN-4.4.5-musl.patch" ) + S="${WORKDIR}/${MY_P}" src_prepare() { eapply_user + eapply ${PATCHES[@]} eautoreconf } |