summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9554748ec926b2507c5025786c49384bdc1d1626 (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.19.1
pkgrel=3
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=('e2d840fd94fec6fd9f800a530d7514261646f12297330e656f5f511b0d2872d6877693e88e43bee8698c79b0ec29bedbc33971afde50827eafa7e5edea3bc7b9')

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
}