summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a38f644711b39e65d870d7eb1f629bd686a6caaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: speps <speps at aur dot archlinux dot org>

_plugins_ver=3.16
pkgname=nomacs
pkgver=3.22.0
pkgrel=1
epoch=1
pkgdesc="A Qt image viewer"
arch=(x86_64)
url="https://github.com/nomacs/nomacs"
license=(GPL-3.0-only)
depends=(exiv2 gcc-libs glibc libraw libtiff opencv qt6-base qt6-svg quazip-qt6)
#depends+=(libopencv_imgproc.so)
makedepends=(cmake git git-lfs qt6-tools python)
optdepends=('qt6-imageformats: support additional image formats'
            'kimageformats: support QOI (Quite OK Image Format)')
source=("git+https://github.com/nomacs/nomacs.git#tag=${pkgver}"
        #"nomacs-plugins-qt6_01.patch::https://github.com/nomacs/nomacs-plugins/pull/40/commits/1b87f615ce0e7125ec739bc3e40d8ff7f6783587.patch"
        #"nomacs-plugins-qt6_02.patch::https://github.com/nomacs/nomacs-plugins/pull/40/commits/a869962f051504dd2c1dedeb3bc3d266c17070c1.patch"
        #"nomacs-plugins-${_plugins_ver}.tar.gz::https://github.com/nomacs/nomacs-plugins/archive/${_plugins_ver}.tar.gz"
        )
b2sums=('d70c2147d2de758e5ff7a5652c17bb9ec6c42756ba52df2601e505139b035a53f30812659a60df378a66f0ab5c9a1449f7a14e797de1937ea39bad6d4bb93e0c')

export GIT_LFS_SKIP_SMUDGE=1

prepare() {
  #cd "nomacs-plugins-${_plugins_ver}"
  #patch -Np1 -i ../nomacs-plugins-qt6_01.patch
  #patch -Np1 -i ../nomacs-plugins-qt6_02.patch

  cd "${srcdir}/nomacs"
  # copy plugin sources into place
  #cp -av "${srcdir}/nomacs-plugins-${_plugins_ver}/"* "ImageLounge/plugins"
}

build() {
  cd nomacs
  cmake -B build -S ImageLounge -Wno-dev \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DQT_VERSION_MAJOR=6 \
    -DUSE_SYSTEM_QUAZIP=ON \
    -DENABLE_AVIF=ON \
    -DENABLE_QUAZIP=ON \
    -DENABLE_TRANSLATIONS=ON

  cmake --build build
}

package() {
  cd nomacs
  DESTDIR="$pkgdir" cmake --install build
}