mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 15:37:14 +08:00
172 lines
5.6 KiB
Bash
172 lines
5.6 KiB
Bash
#
|
|
# Platform Packages for Chakra, part of www.chakra-project.org
|
|
#
|
|
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
|
|
# Contributors: A Boersma (abveritas) <abveritas@chakra-project.org>
|
|
# F Kosmale (Inkane) <inkane@chakra-project.org>
|
|
# A Scarpino (ascarpino) <andrea@archlinux.org>
|
|
# D S de Andrade (dsa) <douglas@archlinux.org>
|
|
# riai <riai@bigfoot.com>
|
|
# Ben <ben@benmazer.net>
|
|
# Gerardo
|
|
# NOTE: PyQt5 supports Qt v5. PyQt4 supports Qt v4 and will build against Qt v5.
|
|
|
|
pkgbase=pyqt
|
|
pkgname=('pyqt4-common' 'pyqt4-python2' 'pyqt4-python3')
|
|
pkgver=4.10.3
|
|
pkgrel=1
|
|
pkgdesc="A set of Python bindings for the Qt toolkit"
|
|
arch=('x86_64')
|
|
url='http://riverbankcomputing.co.uk/software/pyqt/intro'
|
|
license=('GPL')
|
|
makedepends=('dbus-python2'
|
|
'dbus-python3'
|
|
'mesa'
|
|
'phonon'
|
|
'python-opengl'
|
|
'qt-assistant-compat'
|
|
'qtwebkit'
|
|
'sip-python2>=4.15'
|
|
'sip-python3>=4.15')
|
|
source=("http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-${pkgver}/PyQt-x11-gpl-${pkgver}.tar.gz")
|
|
sha1sums=('2866ea9bdb1c30337fb326ca3442c61e3c3e3396')
|
|
|
|
build() {
|
|
cp -r ${srcdir}/PyQt-x11-gpl-${pkgver} ${srcdir}/python2-PyQt-x11-gpl-${pkgver}
|
|
|
|
# Python 3 version
|
|
cd ${srcdir}/PyQt-x11-gpl-${pkgver}
|
|
msg "Configuring the Python 3 version"
|
|
python3 configure.py \
|
|
--confirm-license \
|
|
--qsci-api \
|
|
--verbose \
|
|
--enable QtAssistant \
|
|
--enable QtCore \
|
|
--enable QtDBus \
|
|
--enable QtDeclarative \
|
|
--enable QtDesigner \
|
|
--enable QtGui \
|
|
--enable QtHelp \
|
|
--enable QtMultimedia \
|
|
--enable QtNetwork \
|
|
--enable QtOpenGL \
|
|
--enable QtScript \
|
|
--enable QtScriptTools \
|
|
--enable QtSql \
|
|
--enable QtSvg \
|
|
--enable QtTest \
|
|
--enable QtWebkit \
|
|
--enable QtXml \
|
|
--enable QtXmlPatterns \
|
|
--enable dbus \
|
|
--enable phonon
|
|
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
|
|
msg "Making the Python 3 version"
|
|
make
|
|
|
|
# Python 2 version
|
|
cd ${srcdir}/python2-PyQt-x11-gpl-${pkgver}
|
|
msg "Configuring the Python 2 version"
|
|
python2 configure.py \
|
|
--confirm-license \
|
|
-v /usr/share/sip \
|
|
--qsci-api \
|
|
--verbose \
|
|
--enable QtAssistant \
|
|
--enable QtCore \
|
|
--enable QtDBus \
|
|
--enable QtDeclarative \
|
|
--enable QtDesigner \
|
|
--enable QtGui \
|
|
--enable QtHelp \
|
|
--enable QtMultimedia \
|
|
--enable QtNetwork \
|
|
--enable QtOpenGL \
|
|
--enable QtScript \
|
|
--enable QtScriptTools \
|
|
--enable QtSql \
|
|
--enable QtSvg \
|
|
--enable QtTest \
|
|
--enable QtWebkit \
|
|
--enable QtXml \
|
|
--enable QtXmlPatterns \
|
|
--enable dbus \
|
|
--enable phonon
|
|
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
|
|
msg "Making the Python 2 version"
|
|
make
|
|
}
|
|
|
|
package_pyqt4-common() {
|
|
pkgdesc="Parts of PyQt for Qt4 shared between pyqt4-python3 and pyqt4-python2"
|
|
depends=('qt')
|
|
provides=('pyqt-common=$pkgver')
|
|
conflicts=('pyqt-common<${pkgver}')
|
|
replaces=('pyqt-common<${pkgver}')
|
|
|
|
cd ${srcdir}/PyQt-x11-gpl-${pkgver}
|
|
msg "Packaging pyqt4-common"
|
|
make -C pyrcc DESTDIR="${pkgdir}" install
|
|
make -C pylupdate DESTDIR="${pkgdir}" install
|
|
install -Dm644 PyQt4.api "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api
|
|
}
|
|
|
|
package_pyqt4-python3() {
|
|
pkgdesc="A set of Python 3 bindings for the Qt toolkit"
|
|
depends=('dbus-python3'
|
|
'pyqt4-common'
|
|
'python3'
|
|
'qtwebkit'
|
|
'sip-python3>=4.15')
|
|
optdepends=('phonon: enable audio and video in PyQt applications'
|
|
'python-opengl: enable OpenGL 3D graphics in PyQt applications'
|
|
'qscintilla-python3: QScintilla API'
|
|
'qt-assistant-compat: add PyQt online help in Qt Assistant')
|
|
provides=('pyqt=$pkgver')
|
|
conflicts=('pyqt<${pkgver}')
|
|
replaces=('pyqt<${pkgver}')
|
|
|
|
cd "${srcdir}/PyQt-x11-gpl-${pkgver}"
|
|
msg "Packaging pyqt4-python3"
|
|
|
|
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR
|
|
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
|
|
|
|
# Provided by pyqt-common
|
|
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
|
|
rm -r "${pkgdir}"/usr/share/qt
|
|
}
|
|
|
|
package_pyqt4-python2() {
|
|
pkgdesc="A set of Python 2 bindings for the Qt toolkit"
|
|
depends=('dbus-python2'
|
|
'pyqt4-common'
|
|
'python2'
|
|
'qtwebkit'
|
|
'sip-python2>=4.15')
|
|
optdepends=('phonon: enable audio and video in PyQt applications'
|
|
'python-opengl: enable OpenGL 3D graphics in PyQt applications'
|
|
'qscintilla-python2: QScintilla API'
|
|
'qt-assistant-compat: add PyQt online help in Qt Assistant')
|
|
provides=('pyqt-python2=$pkgver')
|
|
conflicts=('pyqt-python2<${pkgver}')
|
|
replaces=('pyqt-python2<${pkgver}')
|
|
|
|
cd "${srcdir}/python2-PyQt-x11-gpl-${pkgver}"
|
|
msg "Packaging pyqt4-python2"
|
|
|
|
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR
|
|
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
|
|
|
|
# Fix naming conflict with pyqt4-python3
|
|
mv "${pkgdir}"/usr/bin/{,python2-}pyuic4
|
|
|
|
# Provided by pyqt4-common
|
|
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
|
|
rm -r "${pkgdir}"/usr/share/qt
|
|
|
|
# Provided by pyqt4-python3
|
|
rm -r "${pkgdir}"/usr/lib/qt
|
|
}
|