pmaports/temp/upower/APKBUILD
Clayton Craft 81e374c3c6
temp/upower: add patch for supporting usb chargers (MR 1986)
This patch is in purism's fork and it removes messages like this when
starting upower on the librem5 by properly detecting/setting the type:

    TI:15:11:12     did not recognise USB path /sys/devices/platform/soc@0/30800000.bus/30a20000.i2c/i2c-0/0-003f/power_supply/tps6598x-source-psy-0-003f, please report
    ...
    TI:15:11:12     did not recognise USB path /sys/devices/platform/soc@0/30800000.bus/30a50000.i2c/i2c-3/3-006a/power_supply/bq25890-charger, please report
2021-03-02 11:34:42 +03:00

59 lines
1.8 KiB
Text

# Forked from Alpine to apply Purism's torch patch
pkgname=upower
pkgver=9999
_pkgver=0.99.11
_distver="UPOWER_${_pkgver//./_}"
pkgrel=1
pkgdesc="Power Management Services"
url="https://upower.freedesktop.org"
arch="aarch64 armv7"
license="GPL-2.0-or-later"
subpackages="$pkgname-dev $pkgname-lang"
makedepends="linux-headers gtk+-dev libgudev-dev libusb-dev polkit-dev gtk-doc
dbus-glib-dev libxslt gobject-introspection-dev docbook-xsl autoconf automake"
checkdepends="py3-dbus py3-gobject3"
options="!check" # need unpackaged umockdev
source="https://gitlab.freedesktop.org/upower/upower/-/archive/$_distver/upower-$_distver.tar.bz2
0001-Add-torch-support.patch
0002-Detect-USB-Type-C-port-controller-and-other-chargers.patch
"
builddir="$srcdir/$pkgname-$_distver"
prepare() {
default_prepare
NOCONFIGURE=1 ./autogen.sh
}
build() {
# pmOS workarounds for qemu hanging:
# --disable-dependency-tracking
# --disable-man-pages
# --disable-tests
# -j1
DATADIRNAME=share ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib/upower \
--disable-static \
--with-udevrulesdir=/lib/udev/rules.d \
--disable-dependency-tracking \
--disable-man-pages \
--disable-tests
make -j1
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" install
}
sha512sums="918fdba13df7ba85fd276daae68228554e71df95011b48dc42b006a059cf2996f906ce08e98f6d1da07c8f2a4235bc9622992fa42eaaf05a08f1a3650f4ae4b6 upower-UPOWER_0_99_11.tar.bz2
c6c8a557f8ca650e6e2b8b1f64f70744dc610f86f71d88602014b6c241c96821b5662f48ab63da6a2da9e52017b8d9f7a87655f8f640e87b5d17417577079b0b 0001-Add-torch-support.patch
0673d32e8c3d313e21437e7d431068b4a0c51a4d63acf414fc93430c461ab5acbcc2ae8740d6614ed9487fadb8ae2c685e02fb7ad3623b71a20ccb90c1a0bd28 0002-Detect-USB-Type-C-port-controller-and-other-chargers.patch"