media-sound/a2jmidid: Fix a2jmidid-8 build

Use direct python2-waf invocations, as gentoo eclasses have deprecated py2
This commit is contained in:
Nedko Arnaudov 2023-05-04 20:34:49 +03:00
parent e32905cd5c
commit e880b01185
5 changed files with 87 additions and 46 deletions

View File

@ -0,0 +1 @@
DIST a2jmidid-8.tar.bz2 162764 BLAKE2B 4c173d458bc9bf393496bc53dcd92e796826386f3d2704f6d1fc108dd7e4fb660271cc2befec655b516dd669189fb01c23576fdd39c1c23b485346390edfb0a7 SHA512 6182a295462ae587461ca395d85c956523bfecd113d031d0ae8a9f304fc3d41f6a5097b3a1a9fc06bd0eef7fe08a4b3c116a3361ff9e63468c3e40b736215592

View File

@ -1,46 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='threads(+)'
NO_WAF_LIBDIR=1
inherit python-single-r1 toolchain-funcs waf-utils eutils
DESCRIPTION="Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system"
HOMEPAGE="https://repo.or.cz/a2jmidid.git"
SRC_URI="http://download.gna.org/a2jmidid/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="dbus"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="media-libs/alsa-lib
virtual/jack
dbus? ( sys-apps/dbus )
${PYTHON_DEPS}"
DEPEND="${RDEPEND}
virtual/pkgconfig"
DOCS=(AUTHORS README NEWS internals.txt)
src_prepare() {
# Bug 518382
epatch "${FILESDIR}"/${PN}-link.patch
}
src_configure() {
if use dbus ; then
waf-utils_src_configure
else
waf-utils_src_configure --disable-dbus
fi
}
src_install() {
waf-utils_src_install
python_fix_shebang "${ED}"
}

View File

@ -0,0 +1,43 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Exposing ALSA sequencer applications in JACK MIDI system"
HOMEPAGE="https://github.com/LADI/a2jmidid"
SRC_URI="https://web.archive.org/web/20170203210903/http://download.gna.org/a2jmidid/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="dbus"
RDEPEND="media-libs/alsa-lib
virtual/jack
dbus? ( sys-apps/dbus )
dev-lang/python:2.7"
DEPEND="${RDEPEND}
virtual/pkgconfig"
DOCS=(AUTHORS README NEWS internals.txt)
PATCHES=(
"${FILESDIR}"/a2jmidid-8.nosigsegv.patch
"${FILESDIR}"/a2jmidid-8.py2shebang.patch
)
src_configure() {
if use dbus ; then
python2 ./waf configure --prefix=/usr
else
python2 ./waf configure --prefix=/usr --disable-dbus
fi
}
src_compile() {
python2 ./waf
}
src_install() {
python2 ./waf install --destdir="${D}"
}

View File

@ -0,0 +1,33 @@
diff --git a/a2jmidid.c b/a2jmidid.c
index 7d46e87..fabe851 100644
--- a/a2jmidid.c
+++ b/a2jmidid.c
@@ -513,11 +513,11 @@ main(
a2j_info("");
}
- /* setup our SIGSEGV magic that prints nice stack in our logfile */
- if (dbus)
- {
- setup_sigsegv();
- }
+ /* setup our SIGSEGV magic that prints nice stack in our logfile */
+ /* if (dbus) */
+ /* { */
+ /* setup_sigsegv(); */
+ /* } */
signal(SIGINT, &a2j_sigint_handler);
signal(SIGTERM, &a2j_sigint_handler);
diff --git a/wscript b/wscript
index 664625b..8b53a46 100644
--- a/wscript
+++ b/wscript
@@ -148,7 +148,6 @@ def build(bld):
prog.source.append('dbus.c')
prog.source.append('dbus_iface_introspectable.c')
prog.source.append('dbus_iface_control.c')
- prog.source.append('sigsegv.c')
prog.includes = '.' # make waf dependency tracking work
prog.target = 'a2jmidid'

View File

@ -0,0 +1,10 @@
diff --git a/a2j_control b/a2j_control
index 10b2db7..f86c17c 100755
--- a/a2j_control
+++ b/a2j_control
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
name_base = 'org.gna.home.a2jmidid'
control_interface_name = name_base + '.control'