diff options
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | libcamera-rpi-0.3.2-arch.patch | 11 |
2 files changed, 24 insertions, 17 deletions
@@ -2,7 +2,6 @@ # based on the archlinux libcamera package by David Runge <dvzrv@archlinux.org> # # TODO -# - use release tarball instead of GIT # - create a separate libpisp package pkgbase=libcamera-rpi @@ -13,8 +12,7 @@ pkgname=( libcamera-rpi-tools gst-plugin-libcamera-rpi ) -pkgver=0.2.0+rpt20240215 -_commit=075b54d5229d0894109e7cbb4bb890bc48bb37e8 # refs/tags/v0.2.0+rpt20240215 +pkgver=0.3.2+rpt20240927 pkgrel=1 pkgdesc="A complex camera support library for Linux, Android, and ChromeOS (RPi Foundation fork)" arch=(aarch64) @@ -22,7 +20,6 @@ url="https://github.com/raspberrypi/libcamera" _url="https://github.com/raspberrypi/libcamera.git" makedepends=( doxygen - git glib2 graphviz gst-plugins-base @@ -36,19 +33,21 @@ makedepends=( python-ply python-sphinx python-pyyaml - qt5-base - qt5-tools + qt6-base + qt6-tools sdl2 systemd texlive-core texlive-latex ) source=( - "git+$_url#tag=$_commit" + "https://github.com/raspberrypi/libcamera/releases/download/v${pkgver}/libcamera-${pkgver}.tar.xz" + "libcamera-rpi-0.3.2-arch.patch" +) +sha256sums=( + '4d6502a2371204f3a54955f4a25f806be88fcc469167f655afbe9b398f827392' + '5c8f66b75a3d470101bb69c572de93e1d14e29c614dcb0391f3ea526781c260e' ) -sha512sums=('SKIP') -b2sums=('SKIP') - _pick() { local p="$1" f d; shift for f; do @@ -59,15 +58,12 @@ _pick() { done } -pkgver() { - cd $pkgbase - git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' -} - prepare() { - mv libcamera $pkgbase + mv libcamera-0.3.2 $pkgbase cd $pkgbase + patch -Np1 -i ../libcamera-rpi-0.3.2-arch.patch + # add version, so that utils/gen-version.sh may rely on it printf "%s\n" "$pkgver" > .tarball-version } @@ -144,7 +140,7 @@ package_libcamera-rpi-docs() { conflicts=(libcamera-docs) mv -v $pkgname/* "$pkgdir" - mv -v "$pkgdir/usr/share/doc/libcamera-0.2.0/" "$pkgdir/usr/share/doc/$pkgbase/" + mv -v "$pkgdir/usr/share/doc/libcamera-0.3.2/" "$pkgdir/usr/share/doc/$pkgbase/" rm -frv "$pkgdir/usr/share/doc/$pkgbase/html/.buildinfo" } diff --git a/libcamera-rpi-0.3.2-arch.patch b/libcamera-rpi-0.3.2-arch.patch new file mode 100644 index 0000000..108dc9d --- /dev/null +++ b/libcamera-rpi-0.3.2-arch.patch @@ -0,0 +1,11 @@ +--- libcamera-rpi-0.3.2/src/ipa/rpi/cam_helper/cam_helper_imx500.cpp 2024-10-20 21:38:58.492510656 +0200 ++++ libcamera-rpi-0.3.2-arch/src/ipa/rpi/cam_helper/cam_helper_imx500.cpp 2024-10-20 21:23:25.628222018 +0200 +@@ -257,7 +257,7 @@ + exported.height = inputTensorInfo.height; + exported.numChannels = inputTensorInfo.channels; + strncpy(exported.networkName, inputTensorInfo.networkName.c_str(), +- sizeof(exported.networkName)); ++ sizeof(exported.networkName) - 1); + exported.networkName[sizeof(exported.networkName) - 1] = '\0'; + metadata.set("cnn.input_tensor_info", exported); + metadata.set("cnn.input_tensor", std::move(inputTensorInfo.data)); |