summaryrefslogtreecommitdiff
path: root/extra/qscintilla/PKGBUILD
blob: 30703ad59d1f755d5f8c8fa8fba7e55d6c67df6a (plain)
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
# $Id: PKGBUILD 199276 2013-11-09 07:16:28Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>

pkgbase=qscintilla
pkgname=('qscintilla' 'python-qscintilla' 'python2-qscintilla'
         'python-qscintilla-common')
pkgver=2.8
pkgrel=1
license=('GPL')
arch=('i686' 'x86_64' 'mips64el')
url="http://www.riverbankcomputing.co.uk/software/qscintilla/intro"
makedepends=('python2-pyqt4' 'python-pyqt4' 'chrpath')
source=("http://downloads.sourceforge.net/pyqt/QScintilla-gpl-${pkgver}.tar.gz"
        'configure.py-objdir-support.diff')
md5sums=('02c406d8cd5db661f127303e91775c0b'
         'eae1bd23117c5f1f7f172a1c1e11f600')

prepare() {
    cd QScintilla-gpl-${pkgver}
    patch -Np1 -i "${srcdir}/configure.py-objdir-support.diff"
}

build() {
    cd QScintilla-gpl-${pkgver}/Qt4Qt5
    qmake-qt4 qscintilla.pro
    make

    cd ../designer-Qt4Qt5
    qmake-qt4 designer.pro INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5
    make

    cd ../
    cp -rf Python Python2
    cd Python
    python3 configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --qmake /usr/bin/qmake-qt4
    make

    cd ../Python2
    python2 configure.py -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c --qmake /usr/bin/qmake-qt4
    make
}

package_qscintilla() {
    pkgdesc="A port to Qt4 of Neil Hodgson's Scintilla C++ editor class"
    depends=('qt4')

    cd QScintilla-gpl-${pkgver}/Qt4Qt5
    make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install

    cd ../designer-Qt4Qt5
    make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
}

package_python-qscintilla-common() {
    pkgdesc="Common python qscintilla bindings files shared between python-qscintilla and python2-qscintilla"
    depends=('qscintilla')

    cd QScintilla-gpl-${pkgver}/Python
    make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install

    # Provided by python-qscintilla
    rm "${pkgdir}"/usr/lib/python3.3/site-packages/PyQt4/Qsci.so
}

package_python-qscintilla() {
    pkgdesc="Python 3.x bindings for QScintilla2"
    depends=('python-qscintilla-common' 'python-pyqt4')

    cd QScintilla-gpl-${pkgver}/Python
    install -Dm755 Qsci.so \
      "${pkgdir}"/usr/lib/python3.3/site-packages/PyQt4/Qsci.so
}

package_python2-qscintilla() {
    pkgdesc="Python 2.x bindings for QScintilla2"
    depends=('python-qscintilla-common' 'python2-pyqt4')

    cd QScintilla-gpl-${pkgver}/Python2
    install -Dm755 Qsci.so \
      "${pkgdir}"/usr/lib/python2.7/site-packages/PyQt4/Qsci.so
}