python3-PyQt5: remove rpath

This commit is contained in:
Đoàn Trần Công Danh 2021-02-07 17:31:27 +07:00
parent 666ee6e3ea
commit d2a262b640
1 changed files with 15 additions and 12 deletions

View File

@ -1,18 +1,18 @@
# Template file for 'python3-PyQt5'
pkgname=python3-PyQt5
version=5.15.2
revision=2
revision=3
_sipver=12.8.0
wrksrc="PyQt5-${version}"
build_helper=qemu
hostmakedepends="pkg-config qscintilla-qt5-devel python3-sip-PyQt5
hostmakedepends="pkg-config python3-PyQt-builder qt5-host-tools qt5-qmake
python3-dbus"
makedepends="qscintilla-qt5-devel python3-sip-PyQt5
python3-devel python-dbus-devel qt5 qt5-devel qt5-tools-devel
python3-PyQt-builder
qt5-connectivity-devel qt5-declarative-devel qt5-location-devel
qt5-multimedia-devel qt5-qmake qt5-sensors-devel qt5-serialport-devel
qt5-svg-devel qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel
qt5-x11extras-devel qt5-xmlpatterns-devel qt5-networkauth-devel pulseaudio-devel"
makedepends="${hostmakedepends/pkg-config/}"
depends="python3-sip-PyQt5>=${_sipver}"
short_desc="Python 3 bindings for the Qt5 toolkit"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
@ -32,7 +32,7 @@ _cross_configure() {
mkdir -p "${wrksrc}/.target-spec/linux-g++"
cat >"${wrksrc}/.target-spec/linux-g++/qmake.conf" <<-_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
include(/usr/lib/qt5/mkspecs/common/linux.conf)
@ -41,6 +41,7 @@ _cross_configure() {
QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri
QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri
QMAKEMODULES = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/modules
QMAKE_CC = ${CC}
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
@ -55,6 +56,7 @@ _cross_configure() {
QMAKE_CFLAGS = ${CFLAGS}
QMAKE_CXXFLAGS = ${CXXFLAGS}
QMAKE_LFLAGS = ${LDFLAGS}
INCPATH = $XBPS_CROSS_BASE/usr/include/python$py3_ver
load(qt_config)
_EOF
ln -sf ${XBPS_CROSS_BASE}$qplatformdefs ${wrksrc}/.target-spec/linux-g++/
@ -62,7 +64,7 @@ _cross_configure() {
mkdir -p "${wrksrc}/.host-spec/linux-g++"
cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<-_EOF
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
CONFIG += incremental no_qt_rpath
QMAKE_INCREMENTAL_STYLE = sublib
include(/usr/lib/qt5/mkspecs/common/linux.conf)
@ -138,13 +140,18 @@ case " \$* " in
exec /usr/lib/qt5/bin/qmake -qtconf $wrksrc/qt.conf "\$@" ;;
esac
_EOF
chmod +x $XBPS_WRAPPERDIR/qmake
}
do_configure() {
if [ "$CROSS_BUILD" ]; then
_cross_configure
else
cat >$XBPS_WRAPPERDIR/qmake <<-'_EOF'
#!/bin/sh
exec /usr/lib/qt5/bin/qmake "$@" CONFIG+=no_qt_rpath
_EOF
fi
chmod +x $XBPS_WRAPPERDIR/qmake
mkdir -p build
sip-build --confirm-license --no-make \
@ -152,14 +159,10 @@ do_configure() {
--build-dir build
if [ "$CROSS_BUILD" ]; then
# Fix location of libraries
# -I/usr/include/python$py3_ver is set by sip-build :(
find build -name Makefile |
xargs sed -i "
s, \\(/usr/lib/libQt\\), $XBPS_CROSS_BASE\\1,g
s,-L\\(/usr/lib\\),-L$XBPS_CROSS_BASE\\1,g
/INSTALL_ROOT/s,$XBPS_CROSS_BASE,,g
s,-I\\(/usr/include\\),-I$XBPS_CROSS_BASE\\1,g
s,-I\\(/usr/lib\\),-I$XBPS_CROSS_BASE\\1,g
"
fi
}