aboutsummaryrefslogtreecommitdiffstats
path: root/community/vim-editorconfig
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-10-23 19:11:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-10-23 19:11:50 +0200
commit777b9125829ffc29a1d50428a5059350d5053132 (patch)
tree5044129424824ed7aa57f9371b37d907dafd530a /community/vim-editorconfig
parent7536f303a4826647868a57542d67d625db7b9c1d (diff)
downloadaports-777b9125829ffc29a1d50428a5059350d5053132.tar.bz2
aports-777b9125829ffc29a1d50428a5059350d5053132.tar.xz
community/editorconfig: move from testing
Diffstat (limited to 'community/vim-editorconfig')
-rw-r--r--community/vim-editorconfig/APKBUILD25
-rw-r--r--community/vim-editorconfig/fix-config-parsing.patch46
2 files changed, 71 insertions, 0 deletions
diff --git a/community/vim-editorconfig/APKBUILD b/community/vim-editorconfig/APKBUILD
new file mode 100644
index 0000000000..937d779373
--- /dev/null
+++ b/community/vim-editorconfig/APKBUILD
@@ -0,0 +1,25 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=vim-editorconfig
+pkgver=0_git20170721
+_gitrev=14ad5ced8b9daad219f1e48b121dbbd66c20d3a6
+pkgrel=0
+pkgdesc="EditorConfig plugin for vim written in vimscript only"
+url="https://github.com/sgur/vim-editorconfig"
+arch="noarch"
+license="MIT"
+source="$pkgname-$pkgver.tar.gz::https://github.com/sgur/$pkgname/archive/$_gitrev.tar.gz
+ fix-config-parsing.patch"
+builddir="$srcdir/$pkgname-$_gitrev"
+options="!check" # there are no tests
+
+package() {
+ local destdir="$pkgdir/usr/share/vim/vimfiles"
+ cd "$builddir"
+
+ mkdir -p "$destdir"
+ cp -r autoload doc ftdetect ftplugin plugin "$destdir"/
+}
+
+sha512sums="61deaedcb6034f6de2cb8bb28e23a1aba2ca74fdf482421078f50c832d2128663bb89279534e7b2e37a00ba7b2cd5dd1d080c452975761fcac7a29a07ce69576 vim-editorconfig-0_git20170721.tar.gz
+d2b17733aa77d50326807d033cacffb74eb4fdf91721255ff58c1821e3488cb46f0014f73afc5630dc75c2a6ea3ee91c37699433326bf4ee9eed80a2ed709620 fix-config-parsing.patch"
diff --git a/community/vim-editorconfig/fix-config-parsing.patch b/community/vim-editorconfig/fix-config-parsing.patch
new file mode 100644
index 0000000000..806407d405
--- /dev/null
+++ b/community/vim-editorconfig/fix-config-parsing.patch
@@ -0,0 +1,46 @@
+From 69f86d1077b226a7535b1dec06d5bbf0fb2a89cd Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Mon, 23 Oct 2017 18:23:33 +0200
+Subject: [PATCH] Fix trimming of empty comments
+
+For example this .editorconfig:
+
+```
+; Lorem ipsum
+;
+; dolor sit amet
+
+root = true
+```
+
+is parsed incorrectly:
+
+s:parse_properties(...) -> [], {}
+ s:trim(...) -> [';', 'root = true']
+ s:remove_comment(';') -> ';'
+
+This commit fixes this issue.
+
+Patch-Source: https://github.com/sgur/vim-editorconfig/pull/15
+---
+ autoload/editorconfig.vim | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/autoload/editorconfig.vim b/autoload/editorconfig.vim
+index b0e4240..469172d 100644
+--- a/autoload/editorconfig.vim
++++ b/autoload/editorconfig.vim
+@@ -203,9 +203,11 @@ endfunction "}}}
+ "
+ " >>> echo s:remove_comment('bar')
+ " bar
++" >>> echo s:remove_comment('#')
++"
+
+ function! s:remove_comment(line) abort "{{{
+- let pos = match(a:line, '\s*[;#].\+')
++ let pos = match(a:line, '\s*[;#].*')
+ return pos == -1 ? a:line : pos == 0 ? '' : a:line[: pos-1]
+ endfunction "}}}
+
+--