From: leahneukirchen <leahneukirchen@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vim: add options for different build variants.
Date: Fri, 09 Jul 2021 16:24:17 +0200 [thread overview]
Message-ID: <20210709142417.mlounEepTkvNk_zxobtaTbLrAM1Eifvqnzn7VgAxM8Q@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31871@inbox.vuxu.org>
[-- 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"
next prev parent reply other threads:[~2021-07-09 14:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 14:23 [PR PATCH] " leahneukirchen
2021-07-09 14:24 ` leahneukirchen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210709142417.mlounEepTkvNk_zxobtaTbLrAM1Eifvqnzn7VgAxM8Q@z \
--to=leahneukirchen@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).