Files
pmaports-rtwo/device/testing/soc-qcom-msm8916/APKBUILD
T
Pablo Correa Gómez dee2c0a1a0 device/*: make forked alsa-ucm-conf packages provide a versioned alsa-ucm-conf
Non-versioned provides with a provider priority as used before this
commit are only useful for virtual packages. That is, packages which
can be installed concurrently to each other. Therefore, having non-version
provider signals that the forked package is intended to be allowed to be
installed alongside the main package. Not only this is not the case (we don't
wanted forked alsa-ucm-conf and the upstream one installed together), but
in addition, doing so is impossible. That is because the main alsa-ucm-conf
package provides by default a versioned provider of itself, making the
concurrent installation not allowed. Therefore, using non-versioned provides,
although harmless in practice, represents a packaging bug that makes
understaning and reasoning about the fork harder.

Instead of doing that, make the providers versioned, and remove the
provider_priority. Now, it is clear that the forked alsa-ucm-conf packages
must replace the upstream one. To avoid installations that do not need a
forked alsa-ucm-conf, we must make sure that the version which the forked
packages provide is lower than the version of the upstream package. We do
so by prepending a 0. to the version, and adding an explanatory comment.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9397>
2026-08-24 12:16:54 +00:00

87 lines
3.2 KiB
Bash

maintainer="Nikita Travkin <nikita@trvn.ru>"
pkgname=soc-qcom-msm8916
pkgdesc="Common package for Qualcomm MSM8916 devices"
pkgver=27
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64 armv7"
options="!check !archcheck !tracedeps pmb:cross-native"
depends="$pkgname-ucm swclock-offset"
subpackages="
$pkgname-gpu
$pkgname-ucm
$pkgname-rproc
$pkgname-rproc-openrc:rproc_openrc
soc-samsung-msm8916-modem-workaround:samsung_modem_workaround
"
_ucm_commit="3deea2860ab680c3e790442dbdf578fef152e639"
source="$pkgname-$_ucm_commit.tar.gz::https://github.com/msm8916-mainline/alsa-ucm-conf/archive/$_ucm_commit.tar.gz
q6voiced.conf
77-modem-samsung-msm8916.rules
adreno-a306-quirks.sh
wireplumber-msm8916-s16le.conf
"
package() {
mkdir -p "$pkgdir"
install -Dm644 "$srcdir"/wireplumber-msm8916-s16le.conf "$pkgdir"/usr/share/wireplumber/wireplumber.conf.d/msm8916-s16le.conf
}
# Upstream keeps making breaking changes to UCM in patch releases.
# My last upstreaming efforts failed without ever getting a reply,
# since then UCM was entirely reworked like 3 times already...
# I don't want to fix this up every few months, so let's package a stable
# version for now. Once all the UCM refactoring upstream has settled down a bit
# we can investigate how to integrate it properly for upstreaming.
ucm() {
provides="alsa-ucm-conf=0.$pkgver-r$pkgrel" # versioned provides need to be below default version
cd "$srcdir/alsa-ucm-conf-$_ucm_commit"
mkdir -p "$subpkgdir"/usr/share/alsa
cp -r ucm2 "$subpkgdir"/usr/share/alsa
}
rproc() {
pkgdesc="Enable all remote processors (WiFi/BT/modem)"
depends="msm-modem msm-modem-uim-selection q6voiced"
replaces="$pkgname-modem $pkgname-rproc_none $pkgname-rproc_no_modem $pkgname-rproc_all"
install -Dm644 "$srcdir"/q6voiced.conf \
-t "$subpkgdir"/usr/share/q6voiced/
}
rproc_openrc() {
install_if="$pkgname-rproc=$pkgver-r$pkgrel openrc"
install="$subpkgname.post-install"
replaces="$pkgname-rproc_all_openrc"
mkdir -p "$subpkgdir"
}
samsung_modem_workaround() {
pkgdesc="Workaround for modem facility lock issue on some Samsung devices"
depends=""
install -Dm644 "$srcdir"/77-modem-samsung-msm8916.rules \
"$subpkgdir"/usr/lib/udev/rules.d/77-modem-samsung-msm8916.rules
}
gpu() {
pkgdesc="Various GPU workaround for Adreno a306"
install_if="$pkgname=$pkgver-r$pkgrel mesa-dri-gallium"
install -Dm755 "$srcdir"/adreno-a306-quirks.sh \
"$subpkgdir"/etc/profile.d/adreno-a306-quirks.sh
}
sha512sums="
eee73ae7895fb6772b35a190956d17642d08af47a0fa5dfd022052c5b30c99cf9649215aef161ddcc21fac236f2a1435ab906462c7458b4e99e405b6cb6ef5f8 soc-qcom-msm8916-3deea2860ab680c3e790442dbdf578fef152e639.tar.gz
3a4a9322839d4b3ef9d79668a37840a9f444954759ae3c512e694051d2f9a2573db42ad6c4c1a5c75eeb861232a27ba1a8cef9b503decd54ead25a96e3dd6f98 q6voiced.conf
bcebc36ec62140f4620d462be2b95858adae380e5d74f6b9c9b956fb76a6541f39749f4dcec6ac3c39b868dbfed6fac7a34ba357510532a3df2d39f7ea818d55 77-modem-samsung-msm8916.rules
de35a32f697247e4a8419647b9c9fece9bc7f41c0e2377d01659ad0dc1ba21b08d3227193053d7cd1ec5006370db574472516f0d0061fb9d2d9509f27f6212d3 adreno-a306-quirks.sh
56c348696a36111c35999bf52871c7dd7829d482ae006893b99c36cc54c8ef6d7b184bb526b8361ae9b93dc4e195c6efe643fc94e77d9f4c078ae9368812c98f wireplumber-msm8916-s16le.conf
"