pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/ncmpcpp



Module Name:    pkgsrc
Committed By:   pho
Date:           Mon Nov 29 13:54:30 UTC 2021

Modified Files:
        pkgsrc/audio/ncmpcpp: Makefile
Added Files:
        pkgsrc/audio/ncmpcpp: hacks.mk

Log Message:
Add a hack for NetBSD to make it start without crashing


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/audio/ncmpcpp/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ncmpcpp/hacks.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/ncmpcpp/Makefile
diff -u pkgsrc/audio/ncmpcpp/Makefile:1.8 pkgsrc/audio/ncmpcpp/Makefile:1.9
--- pkgsrc/audio/ncmpcpp/Makefile:1.8   Wed Sep 29 19:00:19 2021
+++ pkgsrc/audio/ncmpcpp/Makefile       Mon Nov 29 13:54:29 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2021/09/29 19:00:19 adam Exp $
+# $NetBSD: Makefile,v 1.9 2021/11/29 13:54:29 pho Exp $
 
 DISTNAME=      ncmpcpp-0.9.2
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    audio
 MASTER_SITES=  https://rybczak.net/ncmpcpp/stable/
 EXTRACT_SUFX=  .tar.bz2

Added files:

Index: pkgsrc/audio/ncmpcpp/hacks.mk
diff -u /dev/null pkgsrc/audio/ncmpcpp/hacks.mk:1.1
--- /dev/null   Mon Nov 29 13:54:30 2021
+++ pkgsrc/audio/ncmpcpp/hacks.mk       Mon Nov 29 13:54:29 2021
@@ -0,0 +1,37 @@
+# $NetBSD: hacks.mk,v 1.1 2021/11/29 13:54:29 pho Exp $
+
+### [Mon Nov 29 21:58:26 JST 2021 : pho]
+### ncmpcpp is an unusual program which wants to use readline and ncursesw at
+### the same time, and it crashes on startup without this hack. Things get
+### really complicated in this scenario:
+###
+### * devel/readline is linked against native libterminfo.so because it is the
+###   default termcap library (see mk/termcap.buildlink3.mk). Yes, termcap. It
+###   has both termcap and terminfo implementations in a single library!
+###
+### * /usr/lib/libtermcap.so is actually a symlink to /usr/lib/libterminfo.so.
+###
+### * devel/ncursesw has its own terminfo implementation and wants to use it.
+###
+### * Since ncmpcpp is linked with -lreadline, -ltermcap, and -lncursesw at the
+###   same time, the resulting executable ends up having DT_NEEDED for both
+###   libterminfo.so and libncursesw.so.
+###
+### * But these two libraries aren't ABI compatible. When libncursesw calls a
+###   function like, say, tigetnum(), it will actually call tigetnum() in native
+###   libterminfo and then segfaults.
+###
+### * I don't know if NetBSD ld.elf_so creates a separate namespace of symbols
+###   for each library DT_NEEDED'ed. I mean, I don't know what happens if the
+###   main executable of ncmpcpp didn't have a DT_NEEDED for libterminfo. Will
+###   libreadline use symbols in libterminfo and libncursesw use symbols in
+###   itself? A quick test indicates it's plausible. ncmpcpp at least doesn't
+###   crash when this hack is applied.
+###
+### * The situation is supposedly the same for devel/tig. It too uses readline
+###   and ncursesw at the same time. But for some reason it doesn't crash. I
+###   have absolutely no idea why it doesn't.
+.if ${OPSYS} == "NetBSD"
+PKG_HACKS+=            libtermcap-removal
+BUILDLINK_TRANSFORM+=  rm:-ltermcap
+.endif



Home | Main Index | Thread Index | Old Index