Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/vim-gtk: new aport

From: Mark White <mark_at_celos.net>
Date: Sun, 14 Feb 2016 11:03:11 +0000

Provides alternative to main/vim including gvim with gtk2.
---
Not sure if this is a reasonable way to do an alternative build of a
mainstream package, or whether I've described the "provides"
relationship with main/vim sensibly: comments appreciated. Everything
other than the GUI is equivalent to main/vim, including pkgrel.
 testing/vim-gtk/APKBUILD |   73 ++++++++++++++++++++++++++++++++++++++++++++++
 testing/vim-gtk/vimrc    |   15 ++++++++++
 2 files changed, 88 insertions(+)
 create mode 100644 testing/vim-gtk/APKBUILD
 create mode 100644 testing/vim-gtk/vimrc
diff --git a/testing/vim-gtk/APKBUILD b/testing/vim-gtk/APKBUILD
new file mode 100644
index 0000000..73f98e7
--- /dev/null
+++ b/testing/vim-gtk/APKBUILD
_at_@ -0,0 +1,73 @@
+# Contributor: Mark White <mark_at_celos.net>
+# Maintainer: 
+pkgname=vim-gtk
+pkgver=7.4.1225
+pkgrel=1
+pkgdesc="advanced text editor (with gtk2)"
+url="http://www.vim.org"
+arch="all"
+license="custom"
+provides="vim"
+depends=""
+makedepends="ncurses-dev lua5.2-dev python3-dev gtk+2.0-dev libx11-dev libxt-dev"
+subpackages="$pkgname-doc:vim_gtk_doc vimdiff-gtk:vimdiff_gtk"
+source="vim-$pkgver.tar.gz::https://github.com/vim/vim/archive/v$pkgver.tar.gz
+	vimrc
+	"
+
+_builddir="$srcdir"/vim-$pkgver
+prepare() {
+	cd "$_builddir"
+	# Read vimrc from /etc/vim
+	echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> src/feature.h
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--enable-luainterp \
+		--enable-python3interp=dynamic \
+		--with-x \
+                --enable-gui=gtk2 \
+		--disable-nls \
+		--enable-multibyte \
+		--with-lua-prefix=/usr/lua5.2 \
+		--with-compiledby="Alpine Linux" \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make -j1 DESTDIR="$pkgdir/" install
+
+	install -Dm644 runtime/doc/uganda.txt \
+		"$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
+	install -D "$srcdir"/vimrc "$pkgdir"/etc/vim/vimrc || return 1
+}
+
+vim_gtk_doc() {
+	provides="vim-doc"
+        default_doc
+}
+
+vimdiff_gtk() {
+	pkgdesc="view file diffs in vim"
+	arch="noarch"
+	depends="diffutils"
+	provides="vimdiff"
+
+	install -d "$subpkgdir"/usr/bin || return 1
+	mv "$pkgdir"/usr/bin/vimdiff "$subpkgdir"/usr/bin
+	mv "$pkgdir"/usr/bin/gvimdiff "$subpkgdir"/usr/bin
+}
+
+md5sums="722723948a78473dcc912ae6a8e83111  vim-7.4.1225.tar.gz
+97aecde2ab504e543a96bec84b3b5638  vimrc"
+sha256sums="dfc2e0c37156b0f819db77c951e1222b1abaee12a880d4d850815632ed979b88  vim-7.4.1225.tar.gz
+7ac7e5fd75fe315fd8b3ca4172056ebb9f06df0b5985d3ff88133dfcdd87076b  vimrc"
+sha512sums="9bcf2042b510aebb60ae10f41272ec01f058d54e14a629a47c4e5da66bbd4a3340e7e778c2130a165b3eee55244312f19ddb1ae47ace1821ed9cee592ebe142c  vim-7.4.1225.tar.gz
+d9586b777881973cb5e48e18750336a522ed72c3127b2d6b6991e2b943468ca5b694476e7fa39ab469178c1375fc8f52627484e0fe377aea5811a513e35a7b02  vimrc"
diff --git a/testing/vim-gtk/vimrc b/testing/vim-gtk/vimrc
new file mode 100644
index 0000000..e301734
--- /dev/null
+++ b/testing/vim-gtk/vimrc
_at_@ -0,0 +1,15 @@
+set nocompatible        " Use Vim defaults (much better!)
+set bs=2                " Allow backspacing over everything in insert mode
+set ai                  " Always set auto-indenting on
+set history=50          " keep 50 lines of command history
+set ruler               " Show the cursor position all the time
+
+" Don't use Ex mode, use Q for formatting
+map Q gq
+
+" When doing tab completion, give the following files lower priority.
+set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo
+
+set nomodeline
+syntax on
+autocmd BufRead APKBUILD set filetype=sh
-- 
1.7.10.4
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Feb 14 2016 - 11:03:11 GMT