* [PR PATCH] vim: add options for different build variants.
@ 2021-07-09 14:23 leahneukirchen
2021-07-09 14:24 ` [PR PATCH] [Updated] " leahneukirchen
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 14:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is a new pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages vim-nox
https://github.com/void-linux/void-packages/pull/31871
vim: add options for different build variants.
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
A patch file from https://github.com/void-linux/void-packages/pull/31871.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vim-nox-31871.patch --]
[-- Type: text/x-diff, Size: 4860 bytes --]
From ffe1262e28f0cf3db42255b82ac1db073e7d980f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Jul 2021 16:19:36 +0200
Subject: [PATCH] vim: add options for different build variants.
---
srcpkgs/vim/template | 72 +++++++++++++++++++++++++++-----------------
1 file changed, 44 insertions(+), 28 deletions(-)
diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template
index ebb5779e02f4..081ee02119fd 100644
--- a/srcpkgs/vim/template
+++ b/srcpkgs/vim/template
@@ -1,10 +1,12 @@
# Template file for 'vim'
pkgname=vim
version=8.2.2874
-revision=1
+revision=2
hostmakedepends="gettext glib-devel pkg-config"
-makedepends="acl-devel gtk+3-devel libXt-devel lua53-devel ncurses-devel
- perl python3-devel ruby-devel"
+makedepends="acl-devel ncurses-devel
+ $(vopt_if x11 libXt-devel)
+ $(vopt_if gtk3 gtk+3-devel)
+ $(vopt_if huge 'lua53-devel perl python3-devel ruby-devel')"
depends="vim-common>=${version}"
short_desc="Vim editor (vi clone)"
maintainer="Neel Chotai <neel@chot.ai>"
@@ -14,12 +16,17 @@ distfiles="https://github.com/vim/vim/archive/v${version}.tar.gz"
checksum=c15f933fbebb283ef2debab2a730af9dc95a65c0d684f19e2a4340eeebad1ca8
python_version=3
-subpackages="xxd vim-common vim-x11 gvim"
+build_options="x11 gtk3 huge"
+desc_option_huge="Enable support for many language interpreters"
+build_options_default="x11 gtk3"
# XXX vim-huge cannot be cross compiled for now.
if [ -z "$CROSS_BUILD" ]; then
- subpackages+=" vim-huge vim-huge-python3 gvim-huge"
+ build_options_default+=" huge"
fi
+subpackages="xxd vim-common $(vopt_if x11 vim-x11) $(vopt_if gtk3 gvim)
+ $(vopt_if huge "vim-huge vim-huge-python3 $(vopt_if gtk3 gvim-huge)")"
+
alternatives="vim:vim:/usr/bin/vim-normal"
pre_configure() {
@@ -31,13 +38,13 @@ pre_configure() {
}
do_configure() {
+echo "BUILD_OPTIONS_DEFAULT is ${build_options_default}"
+echo "SUBPKGS is ${subpackages}"
args="--enable-cscope --enable-multibyte --with-tlib=ncursesw
--with-ex-name=vim-ex --with-view-name=vim-view"
nohuge_args="--disable-perlinterp --disable-pythoninterp
- --disable-rubyinterp --disable-workshop
- --disable-netbeans --disable-gpm
- --disable-hangulinput"
+ --disable-rubyinterp --disable-netbeans --disable-gpm"
if [ "$CROSS_BUILD" ]; then
configure_args+="
@@ -55,25 +62,33 @@ do_configure() {
./configure ${configure_args} ${args} ${nohuge_args} --disable-xim --enable-gui=no --with-x=no
# X11 version.
- cd $wrksrc/vim-x11
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ if [ "$build_option_x11" ]; then
+ cd $wrksrc/vim-x11
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ fi
# GTK+ version.
- cd $wrksrc/gvim
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ if [ "$build_option_gtk3" ]; then
+ cd $wrksrc/gvim
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ fi
# Huge versions
- if [ -z "$CROSS_BUILD" ]; then
+ if [ "$build_option_huge" ]; then
cd $wrksrc/vim-huge
./configure ${configure_args} ${args} --with-x=yes --enable-gui=no \
--with-features=huge --enable-perlinterp --enable-python3interp \
--enable-rubyinterp --enable-luainterp --enable-terminal
-
- cd $wrksrc/gvim-huge
- ./configure ${configure_args} ${args} \
- --enable-gui=gtk3 --with-x --with-vim-name=gvim-huge \
- --with-features=huge --enable-perlinterp --enable-python3interp \
- --enable-rubyinterp --enable-luainterp --enable-terminal
+ if [ "$build_option_gtk3" ]; then
+
+ cd $wrksrc/gvim-huge
+ ./configure ${configure_args} ${args} \
+ --enable-gui=gtk3 --with-x \
+ --with-vim-name=gvim-huge --with-features=huge \
+ --enable-perlinterp --enable-python3interp \
+ --enable-rubyinterp --enable-luainterp \
+ --enable-terminal
+ fi
fi
}
@@ -100,13 +115,15 @@ do_install() {
rm -f ${DESTDIR}/usr/bin/{ex,view}
# install gvim icons
- cd ${wrksrc}/gvim
- sed -i "s|/locolor|/hicolor|g" src/Makefile
- for d in 16 32 48; do
- vmkdir usr/share/icons/hicolor/${d}x${d}/apps
- done
- make -C src DESTDIR=${DESTDIR} install-icons
- rm -rf $DESTDIR/usr/share/applications
+ if [ "$build_option_gtk3" ]; then
+ cd ${wrksrc}/gvim
+ sed -i "s|/locolor|/hicolor|g" src/Makefile
+ for d in 16 32 48; do
+ vmkdir usr/share/icons/hicolor/${d}x${d}/apps
+ done
+ make -C src DESTDIR=${DESTDIR} install-icons
+ rm -rf $DESTDIR/usr/share/applications
+ fi
}
vim-common_package() {
@@ -179,9 +196,8 @@ vim-huge_package() {
}
vim-huge-python3_package() {
depends="vim-huge"
- short_desc+=" - transitional packages"
+ short_desc+=" - transitional package"
build_style=meta
- provides="vim-${version}_${revision}"
}
xxd_package() {
short_desc="Make a hexdump or do the reverse"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
@ 2021-07-09 14:24 ` leahneukirchen
2021-07-09 14:29 ` ericonr
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 14:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
There is an updated pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages vim-nox
https://github.com/void-linux/void-packages/pull/31871
vim: add options for different build variants.
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
A patch file from https://github.com/void-linux/void-packages/pull/31871.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vim-nox-31871.patch --]
[-- Type: text/x-diff, Size: 4678 bytes --]
From bb7b010bf8d260d8277a3f325c655a429cbc97f0 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Jul 2021 16:19:36 +0200
Subject: [PATCH] vim: add options for different build variants.
---
srcpkgs/vim/template | 70 ++++++++++++++++++++++++++------------------
1 file changed, 42 insertions(+), 28 deletions(-)
diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template
index ebb5779e02f4..08cddeef3900 100644
--- a/srcpkgs/vim/template
+++ b/srcpkgs/vim/template
@@ -1,10 +1,12 @@
# Template file for 'vim'
pkgname=vim
version=8.2.2874
-revision=1
+revision=2
hostmakedepends="gettext glib-devel pkg-config"
-makedepends="acl-devel gtk+3-devel libXt-devel lua53-devel ncurses-devel
- perl python3-devel ruby-devel"
+makedepends="acl-devel ncurses-devel
+ $(vopt_if x11 libXt-devel)
+ $(vopt_if gtk3 gtk+3-devel)
+ $(vopt_if huge 'lua53-devel perl python3-devel ruby-devel')"
depends="vim-common>=${version}"
short_desc="Vim editor (vi clone)"
maintainer="Neel Chotai <neel@chot.ai>"
@@ -14,12 +16,17 @@ distfiles="https://github.com/vim/vim/archive/v${version}.tar.gz"
checksum=c15f933fbebb283ef2debab2a730af9dc95a65c0d684f19e2a4340eeebad1ca8
python_version=3
-subpackages="xxd vim-common vim-x11 gvim"
+build_options="x11 gtk3 huge"
+desc_option_huge="Enable support for many language interpreters"
+build_options_default="x11 gtk3"
# XXX vim-huge cannot be cross compiled for now.
if [ -z "$CROSS_BUILD" ]; then
- subpackages+=" vim-huge vim-huge-python3 gvim-huge"
+ build_options_default+=" huge"
fi
+subpackages="xxd vim-common $(vopt_if x11 vim-x11) $(vopt_if gtk3 gvim)
+ $(vopt_if huge "vim-huge vim-huge-python3 $(vopt_if gtk3 gvim-huge)")"
+
alternatives="vim:vim:/usr/bin/vim-normal"
pre_configure() {
@@ -35,9 +42,7 @@ do_configure() {
--with-ex-name=vim-ex --with-view-name=vim-view"
nohuge_args="--disable-perlinterp --disable-pythoninterp
- --disable-rubyinterp --disable-workshop
- --disable-netbeans --disable-gpm
- --disable-hangulinput"
+ --disable-rubyinterp --disable-netbeans --disable-gpm"
if [ "$CROSS_BUILD" ]; then
configure_args+="
@@ -55,25 +60,33 @@ do_configure() {
./configure ${configure_args} ${args} ${nohuge_args} --disable-xim --enable-gui=no --with-x=no
# X11 version.
- cd $wrksrc/vim-x11
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ if [ "$build_option_x11" ]; then
+ cd $wrksrc/vim-x11
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ fi
# GTK+ version.
- cd $wrksrc/gvim
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ if [ "$build_option_gtk3" ]; then
+ cd $wrksrc/gvim
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ fi
# Huge versions
- if [ -z "$CROSS_BUILD" ]; then
+ if [ "$build_option_huge" ]; then
cd $wrksrc/vim-huge
./configure ${configure_args} ${args} --with-x=yes --enable-gui=no \
--with-features=huge --enable-perlinterp --enable-python3interp \
--enable-rubyinterp --enable-luainterp --enable-terminal
-
- cd $wrksrc/gvim-huge
- ./configure ${configure_args} ${args} \
- --enable-gui=gtk3 --with-x --with-vim-name=gvim-huge \
- --with-features=huge --enable-perlinterp --enable-python3interp \
- --enable-rubyinterp --enable-luainterp --enable-terminal
+ if [ "$build_option_gtk3" ]; then
+
+ cd $wrksrc/gvim-huge
+ ./configure ${configure_args} ${args} \
+ --enable-gui=gtk3 --with-x \
+ --with-vim-name=gvim-huge --with-features=huge \
+ --enable-perlinterp --enable-python3interp \
+ --enable-rubyinterp --enable-luainterp \
+ --enable-terminal
+ fi
fi
}
@@ -100,13 +113,15 @@ do_install() {
rm -f ${DESTDIR}/usr/bin/{ex,view}
# install gvim icons
- cd ${wrksrc}/gvim
- sed -i "s|/locolor|/hicolor|g" src/Makefile
- for d in 16 32 48; do
- vmkdir usr/share/icons/hicolor/${d}x${d}/apps
- done
- make -C src DESTDIR=${DESTDIR} install-icons
- rm -rf $DESTDIR/usr/share/applications
+ if [ "$build_option_gtk3" ]; then
+ cd ${wrksrc}/gvim
+ sed -i "s|/locolor|/hicolor|g" src/Makefile
+ for d in 16 32 48; do
+ vmkdir usr/share/icons/hicolor/${d}x${d}/apps
+ done
+ make -C src DESTDIR=${DESTDIR} install-icons
+ rm -rf $DESTDIR/usr/share/applications
+ fi
}
vim-common_package() {
@@ -179,9 +194,8 @@ vim-huge_package() {
}
vim-huge-python3_package() {
depends="vim-huge"
- short_desc+=" - transitional packages"
+ short_desc+=" - transitional package"
build_style=meta
- provides="vim-${version}_${revision}"
}
xxd_package() {
short_desc="Make a hexdump or do the reverse"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
2021-07-09 14:24 ` [PR PATCH] [Updated] " leahneukirchen
@ 2021-07-09 14:29 ` ericonr
2021-07-09 14:45 ` leahneukirchen
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-07-09 14:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/31871#issuecomment-877230792
Comment:
I would argue build options can even decrease the maintenance burden :)
I haven't build tested or anything, but from a quick look seems fine. Have you tried cross building huge? We have managed to ship neovim with Lua for cross, at least.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
2021-07-09 14:24 ` [PR PATCH] [Updated] " leahneukirchen
2021-07-09 14:29 ` ericonr
@ 2021-07-09 14:45 ` leahneukirchen
2021-07-09 15:43 ` [PR PATCH] [Updated] " leahneukirchen
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 14:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/31871#issuecomment-877241704
Comment:
I tried builds with all flags, no flags, just huge, and cross versions.
cross with huge seems to work with a few touch ups:
```
=> vim-huge-8.2.2874_2: running pre-pkg hook: 04-generate-runtime-deps ...
SONAME: libSM.so.6 <-> libSM>=1.1.0_1
SONAME: libICE.so.6 <-> libICE>=1.0.5_1
SONAME: libXt.so.6 <-> libXt>=1.0.5_1
SONAME: libX11.so.6 <-> libX11>=1.2_1
SONAME: libm.so.6 <-> glibc>=2.32_1
SONAME: libncursesw.so.6 <-> ncurses-libs>=5.8_1
SONAME: libacl.so.1 <-> acl>=2.2.47_1
SONAME: libdl.so.2 <-> glibc>=2.32_1
SONAME: liblua5.3.so.5.3 <-> lua53>=5.3.5_4
SONAME: libperl.so.5.32 <-> perl>=5.32.0_1
SONAME: libpthread.so.0 <-> glibc>=2.32_1
SONAME: libpython3.9.so.1.0 <-> python3>=3.9.2_2
SONAME: libruby.so.2.7 <-> ruby>=2.7.2_3
SONAME: libc.so.6 <-> glibc>=2.32_1
SONAME: ld-linux-aarch64.so.1 <-> glibc>=2.32_1
```
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (2 preceding siblings ...)
2021-07-09 14:45 ` leahneukirchen
@ 2021-07-09 15:43 ` leahneukirchen
2021-07-09 15:43 ` [PR PATCH] [Closed]: " leahneukirchen
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 15:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
There is an updated pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages vim-nox
https://github.com/void-linux/void-packages/pull/31871
vim: add options for different build variants.
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
A patch file from https://github.com/void-linux/void-packages/pull/31871.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vim-nox-31871.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Closed]: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (3 preceding siblings ...)
2021-07-09 15:43 ` [PR PATCH] [Updated] " leahneukirchen
@ 2021-07-09 15:43 ` leahneukirchen
2021-07-09 15:45 ` [PR PATCH] [Updated] " leahneukirchen
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 15:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
There's a closed pull request on the void-packages repository
vim: add options for different build variants.
https://github.com/void-linux/void-packages/pull/31871
Description:
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (4 preceding siblings ...)
2021-07-09 15:43 ` [PR PATCH] [Closed]: " leahneukirchen
@ 2021-07-09 15:45 ` leahneukirchen
2021-07-09 15:46 ` leahneukirchen
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 15:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
There is an updated pull request by leahneukirchen against master on the void-packages repository
https://github.com/leahneukirchen/void-packages vim-nox
https://github.com/void-linux/void-packages/pull/31871
vim: add options for different build variants.
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
A patch file from https://github.com/void-linux/void-packages/pull/31871.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vim-nox-31871.patch --]
[-- Type: text/x-diff, Size: 5124 bytes --]
From 6cab761ad9b04cf524c8d6b46d382c8f4bc87028 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 9 Jul 2021 16:19:36 +0200
Subject: [PATCH] vim: add options for different build variants.
---
srcpkgs/vim/template | 76 +++++++++++++++++++++++++++-----------------
1 file changed, 46 insertions(+), 30 deletions(-)
diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template
index ebb5779e02f4..25a5f66ff366 100644
--- a/srcpkgs/vim/template
+++ b/srcpkgs/vim/template
@@ -1,10 +1,12 @@
# Template file for 'vim'
pkgname=vim
version=8.2.2874
-revision=1
+revision=2
hostmakedepends="gettext glib-devel pkg-config"
-makedepends="acl-devel gtk+3-devel libXt-devel lua53-devel ncurses-devel
- perl python3-devel ruby-devel"
+makedepends="acl-devel ncurses-devel
+ $(vopt_if x11 libXt-devel)
+ $(vopt_if gtk3 gtk+3-devel)
+ $(vopt_if huge 'lua53-devel perl python3-devel ruby-devel')"
depends="vim-common>=${version}"
short_desc="Vim editor (vi clone)"
maintainer="Neel Chotai <neel@chot.ai>"
@@ -14,16 +16,23 @@ distfiles="https://github.com/vim/vim/archive/v${version}.tar.gz"
checksum=c15f933fbebb283ef2debab2a730af9dc95a65c0d684f19e2a4340eeebad1ca8
python_version=3
-subpackages="xxd vim-common vim-x11 gvim"
+build_options="x11 gtk3 huge"
+desc_option_huge="Enable support for many language interpreters"
+build_options_default="x11 gtk3"
# XXX vim-huge cannot be cross compiled for now.
if [ -z "$CROSS_BUILD" ]; then
- subpackages+=" vim-huge vim-huge-python3 gvim-huge"
+ build_options_default+=" huge"
fi
+subpackages="xxd vim-common $(vopt_if x11 vim-x11) $(vopt_if gtk3 gvim)
+ $(vopt_if huge "vim-huge vim-huge-python3 $(vopt_if gtk3 gvim-huge)")"
+_subdirs="$(vopt_if x11 vim-x11) $(vopt_if gtk3 gvim)
+ $(vopt_if huge "vim-huge $(vopt_if gtk3 gvim-huge)")"
+
alternatives="vim:vim:/usr/bin/vim-normal"
pre_configure() {
- for f in ${subpackages/xxd vim-common/}; do
+ for f in ${_subdirs}; do
mkdir -p /tmp/${f}
cp -a $wrksrc/* /tmp/${f}
mv /tmp/${f} $wrksrc/${f}
@@ -35,9 +44,7 @@ do_configure() {
--with-ex-name=vim-ex --with-view-name=vim-view"
nohuge_args="--disable-perlinterp --disable-pythoninterp
- --disable-rubyinterp --disable-workshop
- --disable-netbeans --disable-gpm
- --disable-hangulinput"
+ --disable-rubyinterp --disable-netbeans --disable-gpm"
if [ "$CROSS_BUILD" ]; then
configure_args+="
@@ -55,25 +62,33 @@ do_configure() {
./configure ${configure_args} ${args} ${nohuge_args} --disable-xim --enable-gui=no --with-x=no
# X11 version.
- cd $wrksrc/vim-x11
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ if [ "$build_option_x11" ]; then
+ cd $wrksrc/vim-x11
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=no --with-x
+ fi
# GTK+ version.
- cd $wrksrc/gvim
- ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ if [ "$build_option_gtk3" ]; then
+ cd $wrksrc/gvim
+ ./configure ${configure_args} ${args} ${nohuge_args} --enable-gui=gtk3 --with-x --with-vim-name=gvim
+ fi
# Huge versions
- if [ -z "$CROSS_BUILD" ]; then
+ if [ "$build_option_huge" ]; then
cd $wrksrc/vim-huge
./configure ${configure_args} ${args} --with-x=yes --enable-gui=no \
--with-features=huge --enable-perlinterp --enable-python3interp \
--enable-rubyinterp --enable-luainterp --enable-terminal
-
- cd $wrksrc/gvim-huge
- ./configure ${configure_args} ${args} \
- --enable-gui=gtk3 --with-x --with-vim-name=gvim-huge \
- --with-features=huge --enable-perlinterp --enable-python3interp \
- --enable-rubyinterp --enable-luainterp --enable-terminal
+ if [ "$build_option_gtk3" ]; then
+
+ cd $wrksrc/gvim-huge
+ ./configure ${configure_args} ${args} \
+ --enable-gui=gtk3 --with-x \
+ --with-vim-name=gvim-huge --with-features=huge \
+ --enable-perlinterp --enable-python3interp \
+ --enable-rubyinterp --enable-luainterp \
+ --enable-terminal
+ fi
fi
}
@@ -81,7 +96,7 @@ do_build() {
cd $wrksrc
make ${makejobs}
- for f in ${subpackages/xxd vim-common/}; do
+ for f in ${_subdirs}; do
cd $wrksrc/$f
make ${makejobs}
done
@@ -100,13 +115,15 @@ do_install() {
rm -f ${DESTDIR}/usr/bin/{ex,view}
# install gvim icons
- cd ${wrksrc}/gvim
- sed -i "s|/locolor|/hicolor|g" src/Makefile
- for d in 16 32 48; do
- vmkdir usr/share/icons/hicolor/${d}x${d}/apps
- done
- make -C src DESTDIR=${DESTDIR} install-icons
- rm -rf $DESTDIR/usr/share/applications
+ if [ "$build_option_gtk3" ]; then
+ cd ${wrksrc}/gvim
+ sed -i "s|/locolor|/hicolor|g" src/Makefile
+ for d in 16 32 48; do
+ vmkdir usr/share/icons/hicolor/${d}x${d}/apps
+ done
+ make -C src DESTDIR=${DESTDIR} install-icons
+ rm -rf $DESTDIR/usr/share/applications
+ fi
}
vim-common_package() {
@@ -179,9 +196,8 @@ vim-huge_package() {
}
vim-huge-python3_package() {
depends="vim-huge"
- short_desc+=" - transitional packages"
+ short_desc+=" - transitional package"
build_style=meta
- provides="vim-${version}_${revision}"
}
xxd_package() {
short_desc="Make a hexdump or do the reverse"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (5 preceding siblings ...)
2021-07-09 15:45 ` [PR PATCH] [Updated] " leahneukirchen
@ 2021-07-09 15:46 ` leahneukirchen
2021-07-09 20:43 ` Piraty
2021-07-16 19:15 ` [PR PATCH] [Merged]: " leahneukirchen
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-09 15:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/31871#issuecomment-877280433
Comment:
Yeah, cross compiling is still broken by Ruby and Perl, let's not touch this here.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (6 preceding siblings ...)
2021-07-09 15:46 ` leahneukirchen
@ 2021-07-09 20:43 ` Piraty
2021-07-16 19:15 ` [PR PATCH] [Merged]: " leahneukirchen
8 siblings, 0 replies; 10+ messages in thread
From: Piraty @ 2021-07-09 20:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
New comment by Piraty on void-packages repository
https://github.com/void-linux/void-packages/pull/31871#issuecomment-877445869
Comment:
yeah vim spoiled by bootstrap too lately ;)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Merged]: vim: add options for different build variants.
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
` (7 preceding siblings ...)
2021-07-09 20:43 ` Piraty
@ 2021-07-16 19:15 ` leahneukirchen
8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2021-07-16 19:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
There's a merged pull request on the void-packages repository
vim: add options for different build variants.
https://github.com/void-linux/void-packages/pull/31871
Description:
Our vim build support different configurations, but the template builds all of them by default. This is a problem if one just wants a "small" vim as the dependency chain is huge (featuring LLVM, MozJS, Rust, ...).
Add three options to configure the builds:
- x11 enables the X11-clipboard build
- gtk3 enables gvim
- huge enables language interpreters (disabled for cross)
Should have no functional difference, maintenance overhead is neglegible.
I cleaned up some flags that got removed in 2019.
cc @NeelChotai
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-07-16 19:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 14:23 [PR PATCH] vim: add options for different build variants leahneukirchen
2021-07-09 14:24 ` [PR PATCH] [Updated] " leahneukirchen
2021-07-09 14:29 ` ericonr
2021-07-09 14:45 ` leahneukirchen
2021-07-09 15:43 ` [PR PATCH] [Updated] " leahneukirchen
2021-07-09 15:43 ` [PR PATCH] [Closed]: " leahneukirchen
2021-07-09 15:45 ` [PR PATCH] [Updated] " leahneukirchen
2021-07-09 15:46 ` leahneukirchen
2021-07-09 20:43 ` Piraty
2021-07-16 19:15 ` [PR PATCH] [Merged]: " leahneukirchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).