2013-12-13 22:35:59 +08:00
|
|
|
pkgbase=pyqt4
|
|
|
|
pkgname=('python-pyqt4-common' 'python3-pyqt4' 'python2-pyqt4')
|
2017-03-10 08:08:01 +08:00
|
|
|
pkgver=4.12
|
|
|
|
pkgrel=1
|
2012-11-05 11:30:13 +08:00
|
|
|
arch=('x86_64')
|
2013-09-23 23:56:08 +08:00
|
|
|
url='http://riverbankcomputing.co.uk/software/pyqt/intro'
|
2010-03-14 23:48:48 +08:00
|
|
|
license=('GPL')
|
2013-10-19 22:57:14 +08:00
|
|
|
makedepends=('python2-dbus'
|
|
|
|
'python3-dbus'
|
2013-09-23 23:56:08 +08:00
|
|
|
'mesa'
|
|
|
|
'phonon'
|
2015-03-08 22:20:42 +08:00
|
|
|
'python2-opengl'
|
2013-09-23 23:56:08 +08:00
|
|
|
'qt-assistant-compat'
|
2017-03-10 08:08:01 +08:00
|
|
|
'python2-sip'
|
2014-09-03 06:11:03 +08:00
|
|
|
'python3-sip')
|
2017-03-10 08:08:01 +08:00
|
|
|
source=("http://downloads.sourceforge.net/pyqt/PyQt4_gpl_x11-${pkgver}.tar.gz")
|
|
|
|
md5sums=('eb8c338f2d8842aa7655e8e1aa840bed')
|
2010-03-14 23:48:48 +08:00
|
|
|
|
|
|
|
build() {
|
2017-03-10 08:08:01 +08:00
|
|
|
cp -a PyQt4_gpl_x11-${pkgver}{,-py2}
|
2013-09-23 23:56:08 +08:00
|
|
|
|
2017-03-10 08:08:01 +08:00
|
|
|
cd PyQt4_gpl_x11-${pkgver}
|
2015-03-27 06:00:02 +08:00
|
|
|
msg "Configuring the Python 3 version"
|
2017-03-10 08:08:01 +08:00
|
|
|
python3 configure-ng.py \
|
2015-03-27 06:00:02 +08:00
|
|
|
--confirm-license \
|
|
|
|
--no-sip-files \
|
2017-03-10 08:08:01 +08:00
|
|
|
--qsci-api
|
|
|
|
|
2015-03-27 06:00:02 +08:00
|
|
|
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
|
|
|
|
msg "Making the Python 3 version"
|
|
|
|
make
|
2013-09-23 23:56:08 +08:00
|
|
|
|
2015-03-27 06:00:02 +08:00
|
|
|
# Python 2 version
|
2017-03-10 08:08:01 +08:00
|
|
|
cd ../PyQt4_gpl_x11-${pkgver}-py2
|
2015-03-27 06:00:02 +08:00
|
|
|
msg "Configuring the Python 2 version"
|
2017-03-10 08:08:01 +08:00
|
|
|
python2 configure-ng.py \
|
2015-03-27 06:00:02 +08:00
|
|
|
--confirm-license \
|
|
|
|
--no-sip-files \
|
|
|
|
--qsci-api \
|
2017-03-10 08:08:01 +08:00
|
|
|
|
2015-03-27 06:00:02 +08:00
|
|
|
find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
|
|
|
|
msg "Making the Python 2 version"
|
|
|
|
make
|
2010-03-14 23:48:48 +08:00
|
|
|
}
|
|
|
|
|
2013-10-10 22:00:37 +08:00
|
|
|
package_python-pyqt4-common() {
|
2013-12-13 22:35:59 +08:00
|
|
|
pkgdesc="Common PyQt files shared between python3-pyqt4 and python2-pyqt4"
|
2013-09-23 23:56:08 +08:00
|
|
|
depends=('qt')
|
2013-10-12 01:40:40 +08:00
|
|
|
conflicts=('pyqt4-common' 'pyqt-common')
|
|
|
|
replaces=('pyqt4-common' 'pyqt-common')
|
2013-04-02 05:16:57 +08:00
|
|
|
|
2017-03-10 08:08:01 +08:00
|
|
|
cd PyQt4_gpl_x11-${pkgver}
|
2013-10-10 22:00:37 +08:00
|
|
|
msg "Packaging python-pyqt4-common"
|
2013-09-23 23:56:08 +08:00
|
|
|
make -C pyrcc DESTDIR="${pkgdir}" install
|
|
|
|
make -C pylupdate DESTDIR="${pkgdir}" install
|
2015-03-08 22:20:42 +08:00
|
|
|
|
2013-09-23 23:56:08 +08:00
|
|
|
install -Dm644 PyQt4.api "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api
|
2015-03-08 22:20:42 +08:00
|
|
|
|
|
|
|
install -d "${pkgdir}"/usr/share/sip/PyQt4
|
|
|
|
cp -r sip/* "${pkgdir}"/usr/share/sip/PyQt4
|
2013-04-02 01:34:04 +08:00
|
|
|
}
|
|
|
|
|
2013-10-10 22:00:37 +08:00
|
|
|
package_python3-pyqt4() {
|
2013-09-23 23:56:08 +08:00
|
|
|
pkgdesc="A set of Python 3 bindings for the Qt toolkit"
|
2013-12-13 22:35:59 +08:00
|
|
|
depends=('python-pyqt4-common'
|
2013-09-23 23:56:08 +08:00
|
|
|
'python3'
|
2013-12-13 22:35:59 +08:00
|
|
|
'python3-dbus'
|
2017-03-10 08:08:01 +08:00
|
|
|
'python3-sip>=4.15')
|
2013-09-23 23:56:08 +08:00
|
|
|
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')
|
2013-10-12 01:40:40 +08:00
|
|
|
conflicts=('pyqt4-python3' 'pyqt')
|
|
|
|
replaces=('pyqt4-python3' 'pyqt')
|
2013-10-12 21:05:11 +08:00
|
|
|
provides=("pyqt=${pkgver}")
|
2013-09-23 23:56:08 +08:00
|
|
|
|
2017-03-10 08:08:01 +08:00
|
|
|
cd PyQt4_gpl_x11-${pkgver}
|
2013-10-10 22:00:37 +08:00
|
|
|
msg "Packaging python3-pyqt4"
|
2013-09-23 23:56:08 +08:00
|
|
|
|
|
|
|
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR
|
|
|
|
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
|
|
|
|
|
2013-12-13 22:35:59 +08:00
|
|
|
# Fix naming conflict with python2-pyqt4
|
2017-03-10 08:08:01 +08:00
|
|
|
mv "${pkgdir}"/usr/bin/{,python3-}pyuic4
|
2013-10-19 04:56:18 +08:00
|
|
|
|
2013-10-10 22:00:37 +08:00
|
|
|
# Provided by python-pyqt4-common
|
2013-09-23 23:56:08 +08:00
|
|
|
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
|
|
|
|
rm -r "${pkgdir}"/usr/share/qt
|
|
|
|
}
|
|
|
|
|
2013-10-10 22:00:37 +08:00
|
|
|
package_python2-pyqt4() {
|
2013-09-23 23:56:08 +08:00
|
|
|
pkgdesc="A set of Python 2 bindings for the Qt toolkit"
|
2013-12-13 22:35:59 +08:00
|
|
|
depends=('python-pyqt4-common'
|
2013-09-23 23:56:08 +08:00
|
|
|
'python2'
|
2013-12-13 22:35:59 +08:00
|
|
|
'python2-dbus'
|
|
|
|
'python2-sip>=4.15'
|
|
|
|
'qtwebkit')
|
2013-09-23 23:56:08 +08:00
|
|
|
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')
|
2013-12-13 22:35:59 +08:00
|
|
|
conflicts=('pyqt4-python2'
|
|
|
|
'pyqt-python2')
|
|
|
|
replaces=('pyqt4-python2'
|
|
|
|
'pyqt-python2')
|
2013-10-12 21:05:11 +08:00
|
|
|
provides=("pyqt4-python2=${pkgver}")
|
2013-09-23 23:56:08 +08:00
|
|
|
|
2017-03-10 08:08:01 +08:00
|
|
|
cd PyQt4_gpl_x11-${pkgver}-py2
|
2013-09-24 05:16:10 +08:00
|
|
|
msg "Packaging pyqt4-python2"
|
2013-09-23 23:56:08 +08:00
|
|
|
|
|
|
|
# INSTALL_ROOT is needed for the QtDesigner module, the other Makefiles use DESTDIR
|
|
|
|
make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
|
|
|
|
|
2013-12-13 22:35:59 +08:00
|
|
|
# Fix naming conflict with python3-pyqt4
|
2017-03-10 08:08:01 +08:00
|
|
|
mv "${pkgdir}"/usr/bin/{,python2-}pyuic4
|
2013-10-19 04:56:18 +08:00
|
|
|
|
|
|
|
# Default /usr/bin/pyuic4
|
2017-03-10 08:08:01 +08:00
|
|
|
ln -s /usr/bin/python2-pyuic4 "${pkgdir}"/usr/bin/pyuic4
|
2013-09-23 23:56:08 +08:00
|
|
|
|
2013-10-10 22:00:37 +08:00
|
|
|
# Provided by python-pyqt4-common
|
2013-09-23 23:56:08 +08:00
|
|
|
rm "${pkgdir}"/usr/bin/{pylupdate4,pyrcc4}
|
2017-03-10 08:08:01 +08:00
|
|
|
rm -r "${pkgdir}"/usr/lib/qt/plugins/designer/libpyqt4.so
|
|
|
|
rm -r "${pkgdir}"/usr/share/qt/qsci/api/python/PyQt4.api
|
2010-12-14 14:44:01 +08:00
|
|
|
}
|