aboutsummaryrefslogtreecommitdiffstats
path: root/community/libcamera/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/libcamera/APKBUILD')
-rw-r--r--community/libcamera/APKBUILD94
1 files changed, 61 insertions, 33 deletions
diff --git a/community/libcamera/APKBUILD b/community/libcamera/APKBUILD
index 169dbbc2cc1..443b423c565 100644
--- a/community/libcamera/APKBUILD
+++ b/community/libcamera/APKBUILD
@@ -1,15 +1,13 @@
# Contributor: Luca Weiss <luca@z3ntu.xyz>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=libcamera
-pkgver=0_git20211109
-pkgrel=5
-_commit="f2a1817275db8fb77acb5f2771b7577be8642194"
+pkgver=0.2.0
+pkgrel=0
pkgdesc="Linux camera framework"
url="https://libcamera.org/"
arch="all"
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
depends_dev="
- boost-dev
eudev-dev
glib-dev
gnutls-dev
@@ -23,6 +21,7 @@ makedepends="$depends_dev
graphviz
gtest-dev
libevent-dev
+ libunwind-dev
linux-headers
meson
py3-jinja2
@@ -30,45 +29,47 @@ makedepends="$depends_dev
py3-sphinx
py3-yaml
qt5-qttools-dev
+ yaml-dev
"
subpackages="
+ $pkgname-dbg
$pkgname-dev
$pkgname-doc
qcam
$pkgname-gstreamer
$pkgname-v4l2
- $pkgname-raspberrypi
$pkgname-tools
"
-source="https://dev.alpinelinux.org/archive/libcamera/libcamera-$_commit.tar.gz
- 0001-fix-unit-tests-build.patch
- 0002-use-sensor-s-controls.patch
- 0003-smaller-resolutions.patch
- build.patch
- gtest.patch
+source="$pkgname-$pkgver.tar.gz::https://github.com/libcamera-org/libcamera/archive/refs/tags/v$pkgver.tar.gz
+ 0001-qcam-Decrease-minimum-width-of-selector-dialog.patch
qcam.desktop
"
-options="!check" # gstreamer tests fail
-builddir="$srcdir/libcamera"
+# gstreamer tests fail
+# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
+options="!strip !check"
-_disturl="dev.alpinelinux.org:/archive/$pkgname/"
+case "$CARCH" in
+arm*|aarch64)
+ subpackages="$subpackages $pkgname-raspberrypi"
+ ;;
+esac
-snapshot() {
- clean
- deps
- mkdir -p "$srcdir" && cd "$srcdir"
- git clone https://git.libcamera.org/libcamera/libcamera.git --recursive
- cd libcamera && git checkout $_commit && cd -
- tar czvf $SRCDEST/$pkgname-$_commit.tar.gz libcamera
- rsync --progress -La $SRCDEST/$pkgname-$_commit.tar.gz $_disturl
-}
+case "$CARCH" in
+ppc64le|s390x|riscv64)
+ # doesn't install any ipa
+ ;;
+*)
+ depends="$pkgname-ipa=$pkgver-r$pkgrel"
+ subpackages="$subpackages $pkgname-ipa"
+ ;;
+esac
build() {
abuild-meson \
-Dv4l2=true \
-Dwerror=false \
. output
- meson compile ${JOBS:+-j ${JOBS}} -C output
+ meson compile -C output
}
check() {
@@ -77,38 +78,65 @@ check() {
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
+ install -Dm644 -t "$pkgdir"/usr/share/applications "$srcdir"/qcam.desktop
+
+ # manual strip first..
+ scanelf --recursive \
+ --nobanner \
+ --etype "ET_DYN,ET_EXEC" \
+ --format "%F" \
+ "$pkgdir" \
+ | while read -r file; do
+ strip "$file"
+ done
+}
+
+ipa() {
+ depends=""
+ amove usr/lib/libcamera
+ # then sign ipa's
+ local ipa
+ for ipa in "$subpkgdir"/usr/lib/libcamera/ipa*.so; do
+ msg "signing $ipa"
+ "$builddir"/src/ipa/ipa-sign.sh \
+ "$(find "$builddir"/output -type f -iname "*ipa-priv-key.pem")" \
+ "$ipa" \
+ "$ipa".sign
+ done
}
qcam() {
+ depends=""
amove usr/bin/qcam
- install -Dm644 -t "$subpkgdir"/usr/share/applications "$srcdir"/qcam.desktop
+ amove usr/share/applications/qcam.desktop
}
gstreamer() {
+ depends=""
amove usr/lib/gstreamer-1.0
}
v4l2() {
- amove usr/lib/v4l2-compat.so
+ depends=""
+ amove usr/libexec/libcamera/v4l2-compat.so
}
raspberrypi() {
- amove usr/share/libcamera/ipa/raspberrypi
+ depends=""
+ amove usr/share/libcamera/ipa/rpi
amove usr/libexec/libcamera/raspberrypi_ipa_proxy
+ amove usr/share/libcamera/pipeline/rpi/vc4
}
tools() {
+ depends=""
amove usr/bin/cam
amove usr/bin/lc-compliance
}
sha512sums="
-a3dd355eee982f8baec1a537ed022b8aabba0c6ea3f31053d70b23a1e92fb8327113c794c77c9a318943f12f46045b779fe736e09514f3663b47443c7396a399 libcamera-f2a1817275db8fb77acb5f2771b7577be8642194.tar.gz
-869447f535f486a3a6d4b49631a628843fe9fd892e7d69df2d3afb9ee5eda43027504364b3abe5aea070a7ddb9bf6b5bb9c10b9aa8a9cbf9c19e4a3da5735b6b 0001-fix-unit-tests-build.patch
-c1ebd6f3c46a252021cd52796a281a84b390a77609459697ebdbaf1489b6f7bacd71ad29951446af7e6d7e40054ec6b21b90375ae7c52e9f30d2fb9926fe1e20 0002-use-sensor-s-controls.patch
-d396b15ff02ce1eacc15fa55f069c0c84ef8adf65fb9f391352025a7f3bd7076b70144e408a4eef61c56372988d1765b800a8290686df3d37aa89fc9cd4d0ac7 0003-smaller-resolutions.patch
-aab9ac6dd029d5cf661931f22c548b9dc0e692b98e7ba4827da7f54f996856df5f16ac372a17daac68b8d875f1f7d427a6826eb7dfba17222255a32323fc6200 build.patch
-1c260217bc88cca8a64bfbcc658ea21c3941c711240475ac7a53c5b1e0fd951e910ba180989f9785c6dd240a4a21919af23158503f3d3e8e6556f32af6439b65 gtest.patch
+f01afcbf615d6c1a7f6c3f2b89043094a737376a3f3cb3f4e4f72f8366acf0bbf099b1f1b1b306c489a43f92eaf723779f0e49bb047c233367a0d69555b74def libcamera-0.2.0.tar.gz
+69d6e29d764f752feed453b9c0f61c81cdb506eb14893d0d99d0d6834f369f1e816c2381dfab5ad1a744a3d11211af02d75dc041ecc87c7e4f73e2bd34c666c2 0001-qcam-Decrease-minimum-width-of-selector-dialog.patch
22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop
"