-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathPKGBUILD_MSYS2_git
79 lines (72 loc) · 2.71 KB
/
PKGBUILD_MSYS2_git
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Maintainer: Valentin Bruch <[email protected]>
# Recipe file for building BeamerPresenter in Windows using MSYS2.
: ${_qt_version_major:=6} # 5 or 6
: ${_use_mupdf:=ON} # ON or OFF
: ${_use_poppler:=OFF} # ON or OFF
_renderer=''
if [ "${_use_mupdf}" == 'ON' ]
then
_renderer="${_renderer}-mupdf"
fi
if [ "${_use_poppler}" == 'ON' ]
then
_renderer="${_renderer}-poppler"
fi
_basename='beamerpresenter'
_pkgname="${_basename}${_renderer}-qt${_qt_version_major}-git"
pkgname="${MINGW_PACKAGE_PREFIX}-${_pkgname}"
pkgver=0.2.6_1009.2000c05
pkgrel=1
pkgdesc="Modular multi-screen pdf presenter (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/stiglers-eponym/BeamerPresenter"
license=('spdx:GPL-3.0-or-later')
makedepends=('git' "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-qt${_qt_version_major}-tools")
depends=("${MINGW_PACKAGE_PREFIX}-qt${_qt_version_major}-multimedia" "${MINGW_PACKAGE_PREFIX}-qt${_qt_version_major}-svg")
provides=("beamerpresenter=${pkgver}")
conflicts=('beamerpresenter')
backup=("etc/xdg/beamerpresenter/beamerpresenter.conf" "etc/xdg/beamerpresenter/gui.json")
source=("git+${url}.git")
sha256sums=('SKIP')
if [ "${_use_mupdf}" == 'ON' ]
then
makedepends+=("${MINGW_PACKAGE_PREFIX}-mupdf-libmupdf")
depends+=("${MINGW_PACKAGE_PREFIX}-jbig2dec" "${MINGW_PACKAGE_PREFIX}-openjpeg2" "${MINGW_PACKAGE_PREFIX}-gumbo-parser" )
license=('spdx:GPL-3.0-or-later AND AGPL-3.0')
fi
if [ "${_use_poppler}" == 'ON' ]
then
depends+=("${MINGW_PACKAGE_PREFIX}-poppler-qt${_qt_version_major}")
fi
pkgver() {
printf "0.2.6_%s.%s" \
"$(git -C "${srcdir}/BeamerPresenter" rev-list --count HEAD)" \
"$(git -C "${srcdir}/BeamerPresenter" rev-parse --short HEAD)"
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL='-DCMAKE_INSTALL_PREFIX=;-DCMAKE_INSTALL_SYSCONFDIR=;' \
"${MINGW_PREFIX}/bin/cmake.exe" \
-B "${srcdir}/build-${MSYSTEM}" \
-S "${srcdir}/BeamerPresenter" \
-G Ninja \
-DCMAKE_BUILD_TYPE='Release' \
-DGIT_VERSION=ON \
-DUSE_POPPLER="${_use_poppler}" \
-DUSE_MUPDF="${_use_mupdf}" \
-DUSE_QTPDF=OFF \
-DUSE_EXTERNAL_RENDERER=OFF \
-DUSE_TRANSLATIONS=ON \
-DINSTALL_LICENSE=ON \
-DLINK_MUPDF_THIRD=ON \
-DLINK_MUJS=OFF \
-DLINK_GUMBO=ON \
-DQT_VERSION_MAJOR="${_qt_version_major}" \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DCMAKE_INSTALL_SYSCONFDIR="/etc"
"${MINGW_PREFIX}/bin/cmake.exe" --build "${srcdir}/build-${MSYSTEM}"
}
package() {
DESTDIR="${pkgdir}" "${MINGW_PREFIX}/bin/cmake.exe" --install "${srcdir}/build-${MSYSTEM}"
}