aboutsummaryrefslogtreecommitdiff
path: root/neovim/abuild
blob: 77228d659f09be8665de05c7d3c621af8a997fd1 (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
name=neovim
version=0.12.2
release=1
source=https://github.com/$name/$name/archive/refs/tags/v$version.tar.gz

build() {
	cmake -S cmake.deps -B .deps \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_C_FLAGS_RELEASE="$CFLAGS" \
		-DUSE_BUNDLED=ON \
		-DUSE_BUNDLED_LUAJIT=OFF

	# apkg set the DESTDIR variable to $PKG by default. That will harm
	# Neovim bundled packages. So we need to unset DESTDIR before proceding
	(unset DESTDIR; cmake --build .deps)
	# This "installs" bundles inside .deps

	cmake -B build \
		-DCMAKE_BUILD_TYPE=Release \
		-DENABLE_LTO=ON \
		-DCMAKE_INSTALL_PREFIX=/usr \
                -DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_C_FLAGS_RELEASE="$CFLAGS"
	cmake --build build
	DESTDIR=$PKG cmake --install build
}