-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
63 lines (59 loc) · 2.4 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
# Maintainer: raa0121 <[email protected]>
pkgname="${MINGW_PACKAGE_PREFIX}-gvim-transparency"
pkgver=9.1.0891
pkgrel=1
pkgdesc="Vi Improved, a highly configurable, improved version of the vi text editor."
arch=('any')
url="http://www.vim.org"
license=('vim')
groups=('edior')
depends=("${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-lua")
makedepends=("patch" "${MINGW_PACKAGE_PREFIX}-make" "${MINGW_PACKAGE_PREFIX}-pkgconf")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("https://github.com/vim/vim/archive/v$pkgver.tar.gz"
"2002-windows_transparency.diff"
"Makefile")
md5sums=('3e0041f0d068f3f13fd82336a714dee0'
'1076c0dd5c9cf8f1a916c5bd6c3602dc'
'0c87e86d155b9272ee52979e5478fc37')
noextract=()
validpgpkeys=()
_pkgname=vim
prepare() {
cd "$_pkgname-$pkgver"
patch -p1 -i "$srcdir/2002-windows_transparency.diff"
sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
}
build() {
cd "$_pkgname-$pkgver/src"
[ "$MINGW_PREFIX" == "/mingw64" ] && MINGW_ARCH=64 TARGET_ARCH="x86-64" || MINGW_ARCH=32 TARGET_ARCH="i686"
export PATH=$MINGW_PREFIX/bin:$PATH
python_ver=$(pkgconf --modversion python3)
mingw32-make -f Make_ming.mak \
GUI=yes IME=yes MBYTE=yes ICONV=yes \
PYTHON3=$MINGW_PREFIX DYNAMIC_PYTHON3=yes PYTHON3_VER=$(echo $python_ver | tr -d .) \
PYTHON3INC=$(pkgconf --cflags python3) \
DYNAMIC_PYTHON3_DLL=libpython${python_ver}.dll \
LUA=$MINGW_PREFIX DYNAMIC_LUA=yes \
CSCOPE=yes NETBEANS=yes ARCH=$TARGET_ARCH DIRECTX=yes \
STATIC_STDCPLUS=yes DEBUG=no TERMINAL=yes \
VIMRCLOC=$MINGW_PREFIX/etc VIMRUNTIMEDIR=$MINGW_PREFIX/share/$_pkgname/runtime
}
package() {
# FIXME: after install VIMRUNTIMEDIR is setting to $MINGW_PREFIX/bin
cd "$_pkgname-$pkgver"
install -Dm 755 src/gvim.exe $pkgdir$MINGW_PREFIX/bin/gvim.exe
install -Dm 755 src/vimrun.exe $pkgdir$MINGW_PREFIX/bin/vimrun.exe
make -f $srcdir/Makefile SRCDIR=$srcdir/$_pkgname-$pkgver DISTDIR=$pkgdir$MINGW_PREFIX/share/$_pkgname install
install -Dm 644 runtime/doc/uganda.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${pkgname}/license.txt
}