Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (b07740ff83a31ada8a3a9238196e91fb82f9351f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (b07740ff83a31ada8a3a9238196e91fb82f9351f)
  • Date: Sun, 29 Aug 2021 23:37:06 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog | 3
libs/libexecinfo/BUILD | 2
libs/libexecinfo/CONFLICTS | 1
libs/libexecinfo/DETAILS | 18 +++++
libs/libexecinfo/HISTORY | 3
libs/libexecinfo/PRE_BUILD | 3
libs/libexecinfo/patches/01-execinfo.patch | 67 ++++++++++++++++++++++
libs/libexecinfo/patches/buildsystem.patch | 88
+++++++++++++++++++++++++++++
8 files changed, 185 insertions(+)

New commits:
commit b07740ff83a31ada8a3a9238196e91fb82f9351f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libexecinfo: new spell, Library for backtracing

diff --git a/ChangeLog b/ChangeLog
index 9875088..7476271 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2021-08-29 Ismael Luceno <ismael AT sourcemage.org>
+ * libs/libexecinfo: new spell, Library for backtracing
+
2021-08-28 Ismael Luceno <ismael AT sourcemage.org>
* doc/pdfcrack: new spell, A Password Recovery Tool for PDF-files

diff --git a/libs/libexecinfo/BUILD b/libs/libexecinfo/BUILD
new file mode 100755
index 0000000..d002e24
--- /dev/null
+++ b/libs/libexecinfo/BUILD
@@ -0,0 +1,2 @@
+OPTS+=' disable-static=1' &&
+"${MAKE:-make}" -j"${MAKE_NJOBS}" CC="$CC" $OPTS
diff --git a/libs/libexecinfo/CONFLICTS b/libs/libexecinfo/CONFLICTS
new file mode 100755
index 0000000..5894a8b
--- /dev/null
+++ b/libs/libexecinfo/CONFLICTS
@@ -0,0 +1 @@
+conflicts glibc n
diff --git a/libs/libexecinfo/DETAILS b/libs/libexecinfo/DETAILS
new file mode 100755
index 0000000..855ee37
--- /dev/null
+++ b/libs/libexecinfo/DETAILS
@@ -0,0 +1,18 @@
+ SPELL=libexecinfo
+ VERSION=1.1
+ SOURCE="$SPELL-$VERSION.tar.bz2"
+
SOURCE_URL[0]="http://distcache.freebsd.org/local-distfiles/itetcu/$SOURCE";
+
SOURCE_HASH=sha512:51fea7910ef6873061a25c22434ce4da724e9d8e37616a069ad0a58c0463755be4c6c7da88cd747484c2f3373909d7be4678b32a4bd91b6d9e0f74526094e92c
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ WEB_SITE=""
+ LICENSE[0]="BSD-2-Clause"
+ ENTERED=20210829
+ KEYWORDS=""
+ SHORT="Library for backtracing"
+cat << EOF
+This is a quick-n-dirty BSD licensed clone of backtrace facility found in
+the GNU libc, mainly intended for porting Linuxish code to BSD platforms,
+however it can be used at any platform which has a gcc compiler.
+
+See <http://www.gnu.org/software/libc/manual/html_node/Backtraces.html>.
+EOF
diff --git a/libs/libexecinfo/HISTORY b/libs/libexecinfo/HISTORY
new file mode 100644
index 0000000..6feb1f1
--- /dev/null
+++ b/libs/libexecinfo/HISTORY
@@ -0,0 +1,3 @@
+2021-08-29 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, CONFLICTS, DETAILS, PRE_BUILD,
+ patches/01-execinfo.patch, patches/buildsystem.patch: spell created
diff --git a/libs/libexecinfo/PRE_BUILD b/libs/libexecinfo/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/libs/libexecinfo/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/libs/libexecinfo/patches/01-execinfo.patch
b/libs/libexecinfo/patches/01-execinfo.patch
new file mode 100644
index 0000000..ed8127a
--- /dev/null
+++ b/libs/libexecinfo/patches/01-execinfo.patch
@@ -0,0 +1,67 @@
+Origin: Void Linux
+
+--- a/execinfo.c
++++ b/execinfo.c
+@@ -69,7 +69,8 @@
+ char **
+ backtrace_symbols(void *const *buffer, int size)
+ {
+- int i, clen, alen, offset;
++ size_t clen, alen;
++ int i, offset;
+ char **rval;
+ char *cp;
+ Dl_info info;
+@@ -78,7 +79,6 @@
+ rval = malloc(clen);
+ if (rval == NULL)
+ return NULL;
+- (char **)cp = &(rval[size]);
+ for (i = 0; i < size; i++) {
+ if (dladdr(buffer[i], &info) != 0) {
+ if (info.dli_sname == NULL)
+@@ -92,14 +92,14 @@
+ 2 + /* " <" */
+ strlen(info.dli_sname) + /* "function" */
+ 1 + /* "+" */
+- D10(offset) + /* "offset */
++ 10 + /* "offset */
+ 5 + /* "> at " */
+ strlen(info.dli_fname) + /* "filename" */
+ 1; /* "\0" */
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p <%s+%d> at %s",
++ snprintf((char *) rval + clen, alen, "%p <%s+%d> at %s",
+ buffer[i], info.dli_sname, offset, info.dli_fname);
+ } else {
+ alen = 2 + /* "0x" */
+@@ -108,12 +108,15 @@
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p", buffer[i]);
++ snprintf((char *) rval + clen, alen, "%p", buffer[i]);
+ }
+- rval[i] = cp;
+- cp += alen;
++ rval[i] = (char *) clen;
++ clen += alen;
+ }
+
++ for (i = 0; i < size; i++)
++ rval[i] += (long) rval;
++
+ return rval;
+ }
+
+@@ -155,6 +158,6 @@
+ return;
+ snprintf(buf, len, "%p\n", buffer[i]);
+ }
+- write(fd, buf, len - 1);
++ write(fd, buf, strlen(buf));
+ }
+ }
+
diff --git a/libs/libexecinfo/patches/buildsystem.patch
b/libs/libexecinfo/patches/buildsystem.patch
new file mode 100644
index 0000000..bea2f68
--- /dev/null
+++ b/libs/libexecinfo/patches/buildsystem.patch
@@ -0,0 +1,88 @@
+From: Ismael Luceno <ismael AT iodev.co.uk>
+
+--- a/Makefile
++++ b/Makefile
+@@ -43,4 +43,69 @@
+ #stacktraverse.c: gen.py
+ # ./gen.py > stacktraverse.c
+
+-.include <bsd.lib.mk>
++DEST =
++prefix = /usr
++exec_prefix = ${prefix}
++includedir = ${prefix}/include
++libdir = ${exec_prefix}/lib
++
++SED = sed
++CFLAGS += -D_BSD_SOURCE
++CC += -std=c99
++
++all: config.mk
++-include config.mk
++config.mk:
++ @echo "GEN $@"
++ @echo disable-static="${disable-static}" > $@
++ @echo disable-shared="${disable-shared}" >> $@
++ @echo prefix="${prefix}" >> $@
++ @echo exec_prefix="${exec_prefix}" >> $@
++ @echo includedir="${includedir}" >> $@
++ @echo libdir="${libdir}" >> $@
++
++lib-shared := lib${LIB}.so.${SHLIB_MAJOR}
++lib-static := lib${LIB}.a
++lib-pc := lib${LIB}.pc
++
++all${disable-static}: ${lib-static}
++all${disable-shared}: ${lib-shared}
++all: ${lib-pc}
++OBJS = stacktraverse.o execinfo.o
++
++${lib-shared}: ${OBJS}
++ ${CC} -shared -Wl,-soname,$@ -o $@ ${OBJS}
++
++${lib-static}: ${OBJS}
++ ${AR} rcs $@ ${OBJS}
++
++${lib-pc}: ${lib-pc}.in
++ ${SED} -e 's|@prefix@|${prefix}|g' \
++ -e 's|@exec_prefix@|${exec_prefix}|g' \
++ -e 's|@includedir@|${includedir}|g' \
++ -e 's|@libdir@|${libdir}|g' \
++ -e 's|@VERSION@|${SHLIB_MAJOR}.${SHLIB_MINOR}|g' \
++ ${lib-pc}.in > ${lib-pc}.tmp
++ mv ${lib-pc}.tmp ${lib-pc}
++
++install-headers:
++ install -d ${DEST}${includedir}
++ install -m644 execinfo.h stacktraverse.h ${DEST}${includedir}/
++
++install-static: ${lib-static}
++ install -d ${DEST}${libdir}
++ install -m444 ${lib-static} ${DEST}${libdir}/
++
++install-shared: ${lib-shared}
++ install -d ${DEST}${libdir}
++ install -m555 ${lib-shared} ${DEST}${libdir}/
++ ln -sf ${lib-shared} ${DEST}${libdir}/${lib-shared:.${SHLIB_MAJOR}=}
++
++install-pc: ${lib-pc}
++ install -d ${DEST}${libdir}/pkgconfig
++ install -m444 ${lib-pc} ${DEST}${libdir}/pkgconfig/
++
++.PHONY: all install install-shared install-static install-headers install-pc
++install${disable-static}: install-static
++install${disable-shared}: install-shared
++install-static install-shared: install-headers install-pc
+--- /dev/null
++++ b/libexecinfo.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++includedir=@includedir@
++libdir=@libdir@
++
++Name: libexecinfo
++Description: libexecinfo library
++Version: @VERSION@
++CFlags: -I${includedir}
++Libs: -L${libdir} -lexecinfo



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (b07740ff83a31ada8a3a9238196e91fb82f9351f), Ismael Luceno, 08/29/2021

Archive powered by MHonArc 2.6.24.

Top of Page