forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
81 lines (68 loc) · 2.96 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
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer: Ivy Foster <[email protected]>
# Contributor: Alex Szczuczko <alex at szc dot ca>
# Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
# Contributor: Imanol Celaya <[email protected]>
# Windows port: Timofey Denisov <[email protected]>
_realname=bmake
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=20181221
pkgrel=7
pkgdesc='Portable version of the NetBSD make build tool'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
url='https://www.crufty.net/help/sjg/bmake.html'
license=(BSD)
# upstream recommends using python for improved meta2deps script
depends=("${MINGW_PACKAGE_PREFIX}-binutils"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-libiconv")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-make"
"${MINGW_PACKAGE_PREFIX}-libiconv")
source=("https://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz"
0001-first-version-mingw-patch.patch
0002-enable-debug-output-on-test.patch
0003-print-pwd-on-fail-install.patch
0004-add-windows-draft-configs.patch
0005-fallback-open-file-through-native-windows-path.patch
)
# checksum source: https://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz.sha1
sha256sums=('fc0948b4eb0cf21fcec4f89660c0295150c55bf070d4b7445858947f84f7e67e'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
prepare() {
cd "${srcdir}"/bmake
patch -p1 -l -i "${srcdir}"/0001-first-version-mingw-patch.patch
patch -p1 -l -i "${srcdir}"/0002-enable-debug-output-on-test.patch
patch -p1 -l -i "${srcdir}"/0003-print-pwd-on-fail-install.patch
patch -p1 -l -i "${srcdir}"/0004-add-windows-draft-configs.patch
patch -p1 -l -i "${srcdir}"/0005-fallback-open-file-through-native-windows-path.patch
}
build() {
cd "${srcdir}"/bmake
export SYSROOTWINDOWSPATH=$(cygpath -w /)
aclocal --verbose || die "aclocal failed"
autoreconf --verbose || die "autoreconf failed"
bash -x ./boot-strap --prefix=${MINGW_PREFIX} op=build
}
# op=build also runs unit tests; thus no check()
package() {
cd "${srcdir}"/bmake
export SYSROOTWINDOWSPATH=$(cygpath -w /)
# Fix directory permissions on install
# install -Dm644 "${pkgdir}${MINGW_PREFIX}/bin" "${pkgdir}${MINGW_PREFIX}/share/licenses/$pkgname"
bash -x ./boot-strap --install-destdir="${pkgdir}" --prefix=${MINGW_PREFIX} op=install
rm -rf "${pkgdir}${MINGW_PREFIX}/share/man/cat1"
install -Dm644 bmake.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/bmake.1"
mkdir -p "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}"
head -n70 main.c > "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
# install profile script
mkdir -p "${pkgdir}${MINGW_PREFIX}"/etc/profile.d
echo "export SYSROOTWINDOWSPATH=$(cygpath -w /); export MAKESYSPATH=${MINGW_PREFIX}/share/mk" > "${pkgdir}${MINGW_PREFIX}"/etc/profile.d/bmake.sh
cp "${pkgdir}${MINGW_PREFIX}"/etc/profile.d/bmake.{sh,zsh}
}