summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbionade242020-01-08 19:46:46 +0100
committerbionade242020-01-08 19:46:46 +0100
commit886969858ca3dd68908b3fdd1ae897c2814649a8 (patch)
tree00dad35bf4168d6fbf9ef3cd9be02ca353ebd364
parent8c9f8ffded6854470799ec1bdab0214286132b14 (diff)
downloadaur-886969858ca3dd68908b3fdd1ae897c2814649a8.tar.gz
Patch path of PyQt in sip_configure.py
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD14
-rw-r--r--sip_path.patch22
3 files changed, 31 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4b6d53fe1fd..4c259a4efea0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ros-melodic-python-qt-binding
pkgdesc = ROS - This stack provides Python bindings for Qt.
pkgver = 0.3.6
- pkgrel = 2
+ pkgrel = 3
url = https://wiki.ros.org/python_qt_binding
arch = any
license = BSD
@@ -14,8 +14,10 @@ pkgbase = ros-melodic-python-qt-binding
depends = python-pyqt5
source = ros-melodic-python-qt-binding-0.3.6.tar.gz::https://github.com/ros-visualization/python_qt_binding/archive/0.3.6.tar.gz
source = 69-shiboken-cmake.patch::https://github.com/ros-visualization/python_qt_binding/commit/274b1c775daa97ac040d01779d7bd89f5d4ee771.diff
+ source = sip_path.patch
sha256sums = b56b8b35f72b8543aab7903eb4e9d456991994a06032a08ba72ba627c6652e12
sha256sums = 0aff7f07a1cdb9b09bbf792c4d79e431c8f4a5ccdd2d5a34168dd0a81ad4beb7
+ sha256sums = d80b1e8fb25b557e3508772a388a5f2362b46311e7d8b71d677b2500e6608ff7
pkgname = ros-melodic-python-qt-binding
diff --git a/PKGBUILD b/PKGBUILD
index 74ddc486ff26..5b3f145f4f80 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,10 @@
-# Script generated with import_catkin_packages.py.
-# For more information: https://github.com/bchretien/arch-ros-stacks.
pkgdesc="ROS - This stack provides Python bindings for Qt."
url='https://wiki.ros.org/python_qt_binding'
pkgname='ros-melodic-python-qt-binding'
pkgver='0.3.6'
arch=('any')
-pkgrel=2
+pkgrel=3
license=('BSD')
ros_makedepends=(
@@ -32,13 +30,16 @@ depends=(
_dir="python_qt_binding-${pkgver}"
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/ros-visualization/python_qt_binding/archive/${pkgver}.tar.gz"
- "69-shiboken-cmake.patch"::"https://github.com/ros-visualization/python_qt_binding/commit/274b1c775daa97ac040d01779d7bd89f5d4ee771.diff")
+ "69-shiboken-cmake.patch"::"https://github.com/ros-visualization/python_qt_binding/commit/274b1c775daa97ac040d01779d7bd89f5d4ee771.diff"
+ "sip_path.patch")
sha256sums=('b56b8b35f72b8543aab7903eb4e9d456991994a06032a08ba72ba627c6652e12'
- '0aff7f07a1cdb9b09bbf792c4d79e431c8f4a5ccdd2d5a34168dd0a81ad4beb7')
+ '0aff7f07a1cdb9b09bbf792c4d79e431c8f4a5ccdd2d5a34168dd0a81ad4beb7'
+ 'd80b1e8fb25b557e3508772a388a5f2362b46311e7d8b71d677b2500e6608ff7')
prepare() {
cd ${srcdir}/${_dir}
patch -p1 < "../69-shiboken-cmake.patch"
+ patch --strip=1 --input="${srcdir}/sip_path.patch"
}
build() {
@@ -59,9 +60,6 @@ build() {
-DCATKIN_BUILD_BINARY_PACKAGE=ON \
-DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
- -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m \
- -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so \
- -DPYTHON_BASENAME=.cpython-37m \
-DSETUPTOOLS_DEB_LAYOUT=OFF
make
}
diff --git a/sip_path.patch b/sip_path.patch
new file mode 100644
index 000000000000..9f3c76bcbefe
--- /dev/null
+++ b/sip_path.patch
@@ -0,0 +1,22 @@
+diff '--color=auto' --unified --recursive --text python_qt_binding-0.3.6.orig/cmake/sip_configure.py python_qt_binding-0.3.6/cmake/sip_configure.py
+--- python_qt_binding-0.3.6.orig/cmake/sip_configure.py 2020-01-08 15:48:04.071751480 +0100
++++ python_qt_binding-0.3.6/cmake/sip_configure.py 2020-01-08 15:54:28.764128505 +0100
+@@ -54,16 +54,11 @@
+ # sipconfig.Configuration does not have a pyqt_sip_dir or pyqt_sip_flags AttributeError
+ sip_flags = QtCore.PYQT_CONFIGURATION['sip_flags']
+
+- default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'PyQt5')
++ # arch python3 pkg uses /usr/lib/python3.8/site-packages/PyQt5/bindings directory
++ default_sip_dir = os.path.join(sipconfig._pkg_config['default_mod_dir'], 'PyQt5', 'bindings')
+ if os.path.exists(default_sip_dir):
+ return default_sip_dir, sip_flags
+
+- # Homebrew installs sip files here by default
+- default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'Qt5')
+- if os.path.exists(default_sip_dir):
+- return default_sip_dir, sip_flags
+- raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' +
+- ' that PyQt5 is installed')
+
+
+ if len(sys.argv) != 8: