summaryrefslogtreecommitdiffstats
path: root/abs/extra/gvim
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/gvim')
-rw-r--r--abs/extra/gvim/PKGBUILD84
-rw-r--r--abs/extra/gvim/fetch_patches.sh61
-rw-r--r--abs/extra/gvim/gvim.desktop42
-rw-r--r--abs/extra/gvim/gvim.install24
4 files changed, 211 insertions, 0 deletions
diff --git a/abs/extra/gvim/PKGBUILD b/abs/extra/gvim/PKGBUILD
new file mode 100644
index 0000000..63c901a
--- /dev/null
+++ b/abs/extra/gvim/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 17439 2008-10-29 19:05:16Z tobias $
+# Maintainer: tobias [ tobias at archlinux org ]
+
+pkgname=gvim
+_srcver=7.2
+_patchlevel=132
+pkgver=${_srcver}.${_patchlevel}
+pkgrel=1
+pkgdesc="the vim text editor with advanced features enabled, such as a gui mode"
+arch=(i686 x86_64)
+license=('custom:vim')
+url="http://www.vim.org"
+depends=("vim>=${pkgver}" 'perl' 'python' 'acl' 'libxt' 'gtk2' )
+makedepends=('pkgconfig')
+backup=(etc/gvimrc)
+conflicts=('gvim-devel')
+provides=('gvim-devel')
+install=${pkgname}.install
+source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
+ ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
+ ${pkgname}.desktop fetch_patches.sh)
+
+build()
+{
+ # patch party
+ # pull in patches from vim.org (or the src cache alternatively)
+ . ${startdir}/src/fetch_patches.sh
+ get_patches || return 1
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ # define the place for the global (g)vimrc file (set to /etc/vimrc)
+ sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
+ ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
+ --with-compiledby=ArchLinux --with-features=big \
+ --with-x=yes --disable-gpm --with-x=yes --enable-gui=gtk2 \
+ --with-global-runtime=/usr/share/vim --with-vim-name=gvim \
+ --enable-multibyte --enable-cscope \
+ --enable-perlinterp --enable-pythoninterp
+ make || return 1
+ # install everything first ...
+ make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
+
+ # ... and clean up what vim already has for us
+ # move the binary and fix the (g)* related symlinks
+ find ${startdir}/pkg/usr/bin -type l 2> /dev/null | while read symlink; do
+ rm ${symlink}
+ done
+ cd ${startdir}/pkg/usr/bin
+ rm -f gvimtutor xxd
+ ln -s gvim evim
+ ln -s gvim egview
+ ln -s gvim gview
+ ln -s gvim gvimdiff
+ ln -s gvim rgview
+ ln -s gvim rgvim
+
+ # delete the manpages/symlinks provided by vi package
+ find ${startdir}/pkg/usr/share/man -type d -name 'man1' 2> /dev/null | \
+ while read mandir; do
+ cd ${mandir}
+ rm -f *.1
+ ln -s evi.1.gz evim.1.gz
+ ln -s vi.1.gz egview.1.gz
+ ln -s vi.1.gz gview.1.gz
+ ln -s vi.1.gz gvim.1.gz
+ ln -s vimdiff.1.gz gvimdiff.1.gz
+ ln -s vi.1.gz rgvim.1.gz
+ ln -s vi.1.gz rgview.1.gz
+ done
+
+ install -Dm644 ${startdir}/pkg/usr/share/vim/gvimrc_example.vim \
+ ${startdir}/pkg/etc/gvimrc
+ # clean all settings and controls - served by vi package
+ rm -rf ${startdir}/pkg/usr/share/vim
+ # freedesktop links
+ install -D -m644 ${startdir}/src/${pkgname}.desktop \
+ ${startdir}/pkg/usr/share/applications/gvim.desktop
+ install -D -m644 ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")/runtime/vim48x48.png \
+ ${startdir}/pkg/usr/share/pixmaps/gvim.png
+
+ ##############################################################
+ sed -i "s/mouse=a/mouse-=a/g" $startdir/pkg/etc/gvimrc
+ #################################################################
+}
diff --git a/abs/extra/gvim/fetch_patches.sh b/abs/extra/gvim/fetch_patches.sh
new file mode 100644
index 0000000..2ce1019
--- /dev/null
+++ b/abs/extra/gvim/fetch_patches.sh
@@ -0,0 +1,61 @@
+# the external logic for pulling in patches
+
+get_patches() {
+ _patchdir=${startdir}/src/patches
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ if [ -d ${_patchdir} ]; then
+ rm -rf ${_patchdir}
+ echo -e "\tremove patches from old build"
+ fi
+ mkdir ${_patchdir} && cd ${_patchdir}
+ _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
+
+ # change IFS to loop line-by-line
+ _OLDIFS=$IFS
+ IFS="
+"
+ echo -e "\tfetching checksumfile for patches"
+ wget ${_rpath}/MD5SUMS >/dev/null 2>&1
+
+ downloads=-1
+ for _line in $(/bin/cat MD5SUMS); do
+ downloads=$((${downloads} + 1))
+ _md5=$(echo $_line | cut -d ' ' -f1)
+ _file=$(echo $_line | cut -d ' ' -f3)
+ if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
+ echo -e "\thaving patch file:${_file}"
+ cp ${SRCDEST}/vim-${_srcver}/${_file} ./
+ else
+ echo -n -e "\t... fetching patch file: ${_file} ..."
+ wget ${_rpath}/${_file} >/dev/null 2>&1
+ if [ -w ${SRCDEST} ]; then
+ if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
+ mkdir -p ${SRCDEST}/vim-${_srcver}
+ fi
+ cp ${_file} ${SRCDEST}/vim-${_srcver}/
+ echo " done!"
+ fi
+ fi
+
+ if [ $(echo "${_md5} ${_file}" | md5sum --status -c -) ]; then
+ echo ${_file} md5sums do not match
+ return 1
+ fi
+ done
+ cd $startdir/src/patches
+ rm 7.2.001-100.gz
+ ########
+
+ if [ ${downloads} != ${_patchlevel} ]; then
+ echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!"
+ return 1
+ fi
+ IFS=$_OLDIFS
+ rm MD5SUMS
+ cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
+ for _patch in $(/bin/ls ${_patchdir}); do
+ patch -Np0 -i ${_patchdir}/${_patch} || return 1
+ done
+ rm -rf ${_patchdir}
+ return 0
+}
diff --git a/abs/extra/gvim/gvim.desktop b/abs/extra/gvim/gvim.desktop
new file mode 100644
index 0000000..8c99660
--- /dev/null
+++ b/abs/extra/gvim/gvim.desktop
@@ -0,0 +1,42 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=gVim
+Name[eo]=VIM-fasado
+Name[sv]=gVim
+Name[xx]=xx
+Comment=GTK2 enhanced vim text editor
+Comment[ar]=محرر نصوص
+Comment[bg]=Текст Редактор
+Comment[de]=Texteditor
+Comment[el]=Διορθωτής Κειμένου
+Comment[eo]=Tekstredaktilo
+Comment[et]=Tekstiredaktor
+Comment[eu]=Testu Editorea
+Comment[fi]=Tekstieditori
+Comment[he]=עורך טקסט
+Comment[is]=Textaritill
+Comment[ja]=テキストエディタ
+Comment[lt]=Teksto redaktorius
+Comment[mt]=Editur tat-test
+Comment[pt_BR]=Editor de Texto
+Comment[ro]=Editor de text
+Comment[ru]=редактор
+Comment[sk]=Textový editor
+Comment[sl]=Urejevalnik besedil
+Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
+Comment[tr]=Metin Düzenleyici
+Comment[uk]=Редактор текстів
+Comment[vi]=Trình soạn văn bản
+Comment[xx]=xx
+Comment[zh_CN]=文本编辑器
+Comment[zh_TW]=文字編輯器
+GenericName=Text Editor
+Type=Application
+TryExec=gvim
+Exec=gvim
+Icon=gvim
+Terminal=false
+X-MultipleArgs=false
+Categories=GTK;Application;Utility;TextEditor;
+MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-c;text/x-objc;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-php;text/x-php-source;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt;
diff --git a/abs/extra/gvim/gvim.install b/abs/extra/gvim/gvim.install
new file mode 100644
index 0000000..f49c345
--- /dev/null
+++ b/abs/extra/gvim/gvim.install
@@ -0,0 +1,24 @@
+post_install() {
+ echo "Updating desktop and mime database..."
+ update-desktop-database -q
+ echo -n "Updating vim help tags..."
+ usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ echo -n "Updating desktop and mime database..."
+ update-desktop-database
+ echo "done."
+}
+
+op=$1
+shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
+
+# vim:set ts=2 sw=2 et ft=sh: