summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Devlamynck2015-06-12 21:34:00 +0200
committerMatthias Devlamynck2015-06-12 21:34:37 +0200
commit25fa7564fce25bcd30389c8c7caba1944ac87715 (patch)
treea66b50d1a4c14a66117f13375826b27e315d01cb
downloadaur-vim-gdbmgr.tar.gz
Initial Commit, import package
-rw-r--r--.SRCINFO18
-rwxr-xr-x.gitignore6
-rwxr-xr-xPKGBUILD52
-rwxr-xr-xgdbmgr.diff28
-rwxr-xr-xvimdoc.install32
5 files changed, 136 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..87e4de382d3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = vim-gdbmgr
+ pkgdesc = GDB (Gnu Debugger) Manager for Vim
+ pkgver = 1.0
+ pkgrel = 1
+ url = http://www.vim.org/scripts/script.php?script_id=4104
+ install = vimdoc.install
+ arch = any
+ groups = vim-plugins
+ license = custom
+ depends = vim
+ depends = gdb
+ source = gdbmgr.tar.gz::http://www.vim.org/scripts/download_script.php?src_id=18153
+ source = gdbmgr.diff
+ md5sums = f5f537f59f064be7d858c37cba8f2bcb
+ md5sums = 74068b491216c9eb81e6544144663d88
+
+pkgname = vim-gdbmgr
+
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 00000000000..e48ce49417d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!gdbmgr.diff
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!vimdoc.install
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..a63ee40a359
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: mdevlamynck <matthias.devlamynck@mailoo.fr>
+
+pkgname=vim-gdbmgr
+pkgver=1.0
+pkgrel=1
+pkgdesc="GDB (Gnu Debugger) Manager for Vim"
+arch=('any')
+url="http://www.vim.org/scripts/script.php?script_id=4104"
+license=('custom')
+groups=('vim-plugins')
+depends=('vim' 'gdb')
+install=vimdoc.install
+source=("gdbmgr.tar.gz::http://www.vim.org/scripts/download_script.php?src_id=18153"
+ "gdbmgr.diff"
+)
+
+build() {
+ rm $srcdir/gdbmgr.tar.gz
+
+ # There may be a bug on current version.
+ # By following the EXAMPLE 1 in gdbmgr-tutorial,
+ # you probably would get blank in source window.
+ # It seems that the author used a specific vimrc,
+ # He must add '.' to PATH and set autochdir.
+ # So the current edit file is always in the PATH.
+ # I have a unofficial patch to fix this issue.
+ # However, If the author updates some files,
+ # This patch may not works correctly.
+ patch -p1 < gdbmgr.diff
+ rm gdbmgr.diff
+
+ cd $srcdir/gdbmgr/src
+ make
+}
+
+package() {
+ install -Dm644 $srcdir/gdbmgr/src/gdbmgr.so $pkgdir/usr/lib/gdbmgr.so
+ cd $srcdir/gdbmgr/src/
+ make clean
+
+ # In the previous version, package will conflict with vim-align.
+ # (IT IS NOT MY FAAAAAUUUUUULT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
+ # So just put everything in after-directory to avoid this issue.
+ _vimdir=$pkgdir/usr/share/vim/vimfiles/
+ mkdir -p $_vimdir/{after,doc}
+
+ mv $srcdir/doc/* $_vimdir/doc
+ rm $srcdir/doc -r
+ mv $srcdir/* $_vimdir/after
+}
+md5sums=('f5f537f59f064be7d858c37cba8f2bcb'
+ '74068b491216c9eb81e6544144663d88')
diff --git a/gdbmgr.diff b/gdbmgr.diff
new file mode 100755
index 00000000000..f7b7b7a24cd
--- /dev/null
+++ b/gdbmgr.diff
@@ -0,0 +1,28 @@
+diff -Nru gdbmgr/autoload/gdbmgr.vim gdbmgr-fix//autoload/gdbmgr.vim
+--- gdbmgr/autoload/gdbmgr.vim 2010-11-24 01:16:17.000000000 +0800
++++ gdbmgr-fix//autoload/gdbmgr.vim 2011-08-16 13:54:40.259742496 +0800
+@@ -3322,9 +3322,9 @@
+ " save user's options and maps
+ call s:GdbMgrOptionSave()
+ if a:0 > 0
+- let curfile= expand(a:1)
++ let curfile= getcwd()."/".expand(a:1)
+ else
+- let curfile= expand("%")
++ let curfile= expand("%:p")
+ endif
+
+ " examine the command line arguments, if any
+@@ -3333,10 +3333,10 @@
+ " :DI pgmname core... :DI winctrl pgmname core...
+ if curfile != '--attaching--'
+ " call Decho("initialization: is curfile<".curfile."> executable? ------------------")
+- if executable(substitute(curfile,'\.[^.]\+$','','')) && !isdirectory(curfile)
++ if executable(substitute(curfile,'\.[^./]\+$','','')) && !isdirectory(curfile)
+ " if current file, less its suffix, is executable, assume that the "curfile" is the program to be debugged
+ " call Decho("case: curfile<".curfile."> is executable")
+- let gdbcmd= substitute(curfile,'\.[^.]\+$','','')
++ let gdbcmd= substitute(curfile,'\.[^./]\+$','','')
+ " call Decho("curfile<".curfile."> is executable, assuming its the pgm to be debugged")
+ else
+ " call Decho("case: curfile<".curfile."> is not executable")
diff --git a/vimdoc.install b/vimdoc.install
new file mode 100755
index 00000000000..3b69deb088e
--- /dev/null
+++ b/vimdoc.install
@@ -0,0 +1,32 @@
+update_doc() {
+ echo -n "Updating vim help tags..."
+ /usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+post_install() {
+ update_doc
+
+/bin/cat << EOF
+===>
+===> Shared library has already been put in /usr/lib
+===> There is no need to change LD_LIBRARY_PATH.
+===> run cmd: [vim -c "tab h gdbmgr.txt | tabn | q"]
+===> for more information
+===>
+===>
+===> WARNING: This vim plugin has not been released yet,
+===> It is not stable enough. Use at your own RISK!
+===>
+EOF
+
+}
+
+post_upgrade() {
+ update_doc
+}
+
+post_remove() {
+ update_doc
+}