public
Last active

Updated PKGBUILD for vim-qt-git - fixed icon URL, Python configuration, and build error running 'rcc'

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
# Maintainer Jekyll Wu<adaptee [at] gmail [dot] com>
# Basically, stolen shamelessly from http://chakra-probject.org/ccr
 
pkgname=vim-qt-git
pkgver=20130301
pkgrel=1
pkgdesc="A Qt powered vim GUI"
arch=("i686" "x86_64")
url="https://bitbucket.org/equalsraf/vim-qt/wiki/Home"
license=('custom:vim')
depends=('qt4' 'vim-runtime' 'gpm' 'perl' 'python2' 'ruby' 'libxt')
makedepends=( 'desktop-file-utils' 'gettext' 'pkgconfig' 'rsync' 'sed' 'git')
source=(qvim.desktop
"https://raw.github.com/adaptee/PKGBUILD/master/vim-qt-git/qvim.svg")
options=(!strip)
install="${pkgname}.install"
 
_gitroot="https://bitbucket.org/equalsraf/vim-qt.git"
_gitname="vim-qt"
 
_builddir=vim-qt-build
_versiondir=vim73
 
build() {
cd ${srcdir}
msg "Connecting to GIT server...."
 
if [ -d ${_gitname}/.git ] ; then
cd ${_gitname}
 
# Change remote url to anongit
if [ -z $( git branch -v | grep anongit ) ] ; then
git remote set-url origin ${_gitroot}
fi
 
git pull origin master
msg "The local files are updated."
else
git clone ${_gitroot} ${_gitname}
fi
 
msg "GIT checkout done or server timeout"
msg "Starting make..."
 
cd ${srcdir}
rm -rf vim-qt-build
rsync -a --exclude='.git/' ${_gitname}/ vim-qt-build
 
msg2 'Patching...'
 
# define the place for the global (g)vimrc file (set to /etc/vimrc)
sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
vim-qt-build/src/feature.h
sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
vim-qt-build/src/feature.h
sed -i 's|\brcc\b|rcc-qt4|' \
vim-qt-build/src/Toolchain-mingw32.cmake \
vim-qt-build/src/Makefile
(cd vim-qt-build/src && autoconf)
 
msg2 'Building...'
 
cd ${srcdir}/${_builddir}
 
export CFLAGS="-g -O0"
export CXXFLAGS="-g -O0"
 
./configure \
--prefix=/usr \
--localstatedir=/var/lib/vim \
--mandir=/usr/share/man \
--with-compiledby=Archlinux \
--with-features=big \
--enable-gpm \
--enable-acl \
--with-x=yes \
--with-tlib=ncurses \
--enable-gui=qt \
--enable-multibyte \
--enable-cscope \
--enable-netbeans \
--enable-perlinterp \
--enable-pythoninterp \
--enable-rubyinterp
 
# temporary workaround; need to contact upstream
sed -i 's/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1/g' src/auto/config.mk
 
make
}
 
package(){
cd ${srcdir}/${_builddir}
 
# Yes, I know gvim stands for `graphical vim`, not `gtk vim`
# Whatever, jut name it as qvim.
install -D src/vim ${pkgdir}/usr/bin/qvim
 
# desktop entry
install -Dm644 ${srcdir}/qvim.desktop \
${pkgdir}/usr/share/applications/qvim.desktop
 
# and the nice icon!
install -Dm644 "${srcdir}/qvim.svg" \
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/qvim.svg"
}
 
# vim: set sw=2:
 
md5sums=('bf0a2b39f308b1db61eaae92bf00b080'
'58c3f5ca063bd624b9feb5942e4f2adf')

I have no idea why the md5sum for qvim.svg changed; I didn't run 'makepkg -g' or anything...

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.