# mtdev 1.1.6 — VARIANTE incoming-kde (override) para la campaña KDE. Igual que la canónica pero con
# PYTHON=python3 + symlink `python`→python3: el configure de mtdev usa AM_PATH_PYTHON que busca un
# ejecutable `python` (>=2.6); el toolchain sólo tiene `python3` ⇒ "no suitable Python interpreter".
# Dep de build de libinput (que kwin exige ≥1.28). Autotools.
name    = "mtdev"
version = "1.1.6"

[source]
tarball = "https://bitmath.org/code/mtdev/mtdev-1.1.6.tar.gz"
sha256  = "1325f389a2f25cd5f5a8ea4d29aad24aa7c3ec30401d679400dd79eb9c0a8dbb"

[build]
compiler = "gcc"
target   = "x86_64-linux-musl"
link     = "dynamic"
flags    = []

[build.phases]
# config.sub viejo (no conoce *-musl) → reemplazado. PYTHON=python3 + symlink python→python3 en PATH
# para AM_PATH_PYTHON (mtdev sólo usa python para scripts de test, irrelevante para libmtdev.so).
configure = '''
cp /usr/share/autoconf/build-aux/config.sub config-aux/config.sub
cp /usr/share/autoconf/build-aux/config.guess config-aux/config.guess
mkdir -p /tmp/pybin && ln -sf "$(command -v python3)" /tmp/pybin/python
PATH="/tmp/pybin:$PATH" PYTHON=python3 ./configure --build=$CBUILD --host=$CHOST --prefix=/usr
'''
compile   = 'make'
install   = 'make DESTDIR=/out install'

[deps]
build = ["pkgconf", "python3"]
