blob: 9515e133687808be0d2040097eb255584b86b093 (
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
56
57
58
59
60
61
62
|
# Maintainer: gigas002 <gigas002@pm.me>
# Contributor: Raziel23 <venom23 at runbox dot com>
# Contributor: Sandy Carter <bwrsandman@gmail.com>
pkgname=vcmi
pkgver=1.5.7
pkgrel=2
pkgdesc="Open-source engine for Heroes of Might and Magic III"
arch=('i686' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
url="http://vcmi.eu"
license=('GPL-2.0-or-later AND CC-BY-SA-4.0')
depends=('boost-libs' 'ffmpeg' 'sdl2_image' 'sdl2_mixer' 'sdl2_ttf' 'qt6-base' 'libxkbcommon-x11'
'hicolor-icon-theme' 'onetbb' 'fuzzylite' 'luajit')
makedepends=('boost' 'cmake' 'git' 'ccache' 'qt6-tools' 'minizip')
optdepends=('innoextract: required by vcmibuilder' 'unshield: required by vcmibuilder' 'unzip: required by vcmibuilder')
provides=('vcmi')
conflicts=('vcmi')
install="${pkgname}.install"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/VCMI-Sources.tar.gz")
patch="boost.patch"
sha256sums=('aab79529e06613c90f627a92a8ee46bd9941ea542e76e9d2f1f19d10bfe667fd')
# workaround
prepare() {
# VCMI-Sources.tar.gz contains sources, not folder like GitHub releases
# so we first need to move it to a proper folder
if [ ! -d "$srcdir/$pkgname-$pkgver" ]; then
mkdir -p "${startdir}/${pkgname}-${pkgver}"
mv "$srcdir"/* "${startdir}/${pkgname}-${pkgver}/"
mv "${startdir}/${pkgname}-${pkgver}/" "${srcdir}/${pkgname}-${pkgver}/"
fi
cd $srcdir/${pkgname}-${pkgver}
patch -p1 -i $startdir/$patch
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# force qt6
sed -i 's/find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network)/find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Network)/' CMakeLists.txt
mkdir -p build && cd build
cmake -B. -H.. \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_INSTALL_RPATH='/usr/lib/vcmi' \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \
-DCMAKE_SKIP_RPATH='FALSE' \
-DENABLE_TEST=OFF \
-DFORCE_BUNDLED_FL=OFF \
-DENABLE_INNOEXTRACT=OFF \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_CXX_COMPILER_LAUNCHER='ccache' \
-DCMAKE_C_COMPILER_LAUNCHER='ccache' \
-Wno-dev
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}/build"
make DESTDIR="$pkgdir" install
}
# vim:set ts=2 sw=2 et:
|