-
Notifications
You must be signed in to change notification settings - Fork 493
/
Copy pathPKGBUILD
59 lines (49 loc) · 1.5 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
# Maintainer: Alexey Pavlov <[email protected]>
pkgname="msys2-w32api-headers"
pkgver=12.0.0.r0.g819a6ec2e
pkgrel=2
pkgdesc="Win32 API headers for MSYS2 32bit toolchain"
arch=('i686' 'x86_64')
url="https://mingw-w64.sourceforge.io/"
license=('custom')
depends=()
makedepends=('git' 'autotools')
if [[ "${CARCH}" == 'i686' ]]; then
makedepends+=('mingw-w64-cross-mingw32-gcc')
else
makedepends+=('mingw-w64-cross-mingw64-gcc')
fi
options=('staticlibs' '!buildflags')
_commit='819a6ec2ea87c19814b287e21d65e0dc7f05abba'
source=("mingw-w64"::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit"
"0001-Work-around-Warray-bounds-warning-for-__readfsdword-.patch")
sha256sums=('41878f44fe3b6c347fc99ab8a90d384f61bd3ae25cfb2a62a7e24d4f0d14f720'
'189dd0f614caae1428e1d3a06bc3ac436d26afd9cbdbd1a7ce58b1ee6478ff3f')
msys2_references=(
'cygwin: w32api-runtime'
'cpe: cpe:/a:mingw-w64:mingw-w64'
)
pkgver() {
cd "${srcdir}/mingw-w64"
git describe --long ${_commit} | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}
prepare() {
cd ${srcdir}/mingw-w64
patch -Np1 -i "${srcdir}"/0001-Work-around-Warray-bounds-warning-for-__readfsdword-.patch
}
build() {
cd ${srcdir}/mingw-w64/mingw-w64-headers
unset CC CXX
./configure \
--build=${CHOST} \
--host=${CARCH}-w64-mingw32 \
--prefix=/usr \
--enable-sdk=all \
--enable-w32api \
--with-default-win32-winnt=0x601
make
}
package() {
cd ${srcdir}/mingw-w64/mingw-w64-headers
make DESTDIR=${pkgdir} install
}