1 # Contributor: Alexander 'hatred' Drozdoff <adrozdoff@gmail.com>
8 pkgdesc="A GTK text editor"
10 url="http://medit.bitbucket.org"
11 options=('!emptydirs')
13 depends=('pygtk' 'libxml2' 'pcre' 'libsm' 'python2' 'gtk2' 'gcc-libs' 'hicolor-icon-theme')
14 makedepends=('pkgconfig'
26 __hgroot="https://medit@bitbucket.org/medit/medit"
32 msg "Connecting to Mercurial server...."
34 if [ -d $__hgrepo ] ; then
36 hg pull -u || return 1
37 msg "The local files are updated."
39 hg clone $__hgroot $__hgrepo || return 1
42 msg "Mercurial checkout done or server timeout"
43 msg "Starting make..."
45 rm -rf "$srcdir/$__hgrepo-build"
46 cp -r "$srcdir/$__hgrepo" "$srcdir/$__hgrepo-build"
47 cd "$srcdir/$__hgrepo-build"
49 alias python='python2'
50 find . -name '*.py' | xargs sed -i 's|python|python2|'
54 export PYTHON_VERSION=2.7
55 export PYTHON_INCLUDES=`python2-config --includes`
56 export PYTHON_LIBS=`python2-config --libs`
59 ./configure --prefix=/usr --enable-dev-mode
61 #find . -name Makefile | xargs sed -i 's/PYTHON = python/PYTHON = python2/'
62 find . -name Makefile | xargs sed -i 's/-Werror//g'
65 make DESTDIR=$startdir/pkg install
67 rm -rf $startdir/pkg/usr/share/mime && \
68 rm -rf $startdir/pkg/usr/share/icons/hicolor/icon-theme.cache