forked from git-for-windows/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
68 lines (64 loc) · 2.59 KB
/
PKGBUILD
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
# Maintainer: Alexey Pavlov <[email protected]>
_realname=allegro
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=5.2.3
pkgrel=1
pkgdesc="Portable library mainly aimed at video game and multimedia programming (mingw-w64)"
arch=(any)
url="http://liballeg.org/"
license=("ZLIB")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-dumb"
"${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-flac"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo"
"${MINGW_PACKAGE_PREFIX}-libpng"
"${MINGW_PACKAGE_PREFIX}-libvorbis"
"${MINGW_PACKAGE_PREFIX}-openal"
"${MINGW_PACKAGE_PREFIX}-opusfile"
"${MINGW_PACKAGE_PREFIX}-physfs"
"${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
optdepends=("${MINGW_PACKAGE_PREFIX}-dumb: allegro_audio"
"${MINGW_PACKAGE_PREFIX}-flac: allegro_audio"
"${MINGW_PACKAGE_PREFIX}-opusfile: allegro_audio"
"${MINGW_PACKAGE_PREFIX}-freetype: allegro_font"
"${MINGW_PACKAGE_PREFIX}-libjpeg-turbo: allegro_image"
"${MINGW_PACKAGE_PREFIX}-libpng: allegro_image"
"${MINGW_PACKAGE_PREFIX}-libvorbis: allegro_audio"
"${MINGW_PACKAGE_PREFIX}-openal: allegro_audio"
"${MINGW_PACKAGE_PREFIX}-physfs: allegro_physfs")
options=('strip' 'staticlibs')
source=(${_realname}-${pkgver}.tar.gz::https://github.com/liballeg/allegro5/archive/${pkgver}.tar.gz)
conflicts=("${MINGW_PACKAGE_PREFIX}-allegro-static")
provides=("${MINGW_PACKAGE_PREFIX}-allegro-static")
noextract=(${_realname}-${pkgver}.tar.gz)
sha256sums=('fafac5f16ca9fe8c97c4197d62102214493561af4b2d033602e1a48916c0963f')
prepare() {
cd ${srcdir}
rm -rf ${_realname}5-${pkgver}
tar -xzvf ${_realname}-${pkgver}.tar.gz || true
cd "${srcdir}/${_realname}5-${pkgver}"
sed -i "s,DS3DALG_DEFAULT,GUID_NULL,g" "addons/audio/dsound.cpp"
}
build() {
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DWANT_DEMO=OFF \
-DWANT_DOCS=OFF \
-DWANT_EXAMPLES=OFF \
-DINSTALL_PKG_CONFIG_FILES=ON \
../${_realname}5-${pkgver}
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR=${pkgdir} install
}