Skip to content

Instantly share code, notes, and snippets.

@whitelynx
Last active December 14, 2015 09:38
Show Gist options
  • Save whitelynx/5066328 to your computer and use it in GitHub Desktop.
Save whitelynx/5066328 to your computer and use it in GitHub Desktop.
Updated PKGBUILD for vim-qt-git - fixed icon URL, Python configuration, and build error running 'rcc'
# 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')
@whitelynx
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment