Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] build-helper/qmake: disable rpath
Date: Wed, 10 Feb 2021 14:43:49 +0100	[thread overview]
Message-ID: <20210210134349.CpsBBw-Ok_Zs1v3ss8L5tb6Hu7q4o7DUYdTtkf5aER4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28581@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages qmake-build-helper-disable-rpath
https://github.com/void-linux/void-packages/pull/28581

build-helper/qmake: disable rpath
@st3r4g Please test qjackctl.

A patch file from https://github.com/void-linux/void-packages/pull/28581.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qmake-build-helper-disable-rpath-28581.patch --]
[-- Type: text/x-diff, Size: 7523 bytes --]

From 4f90debca40c76c05f9228d5b05cf7cc2fba333f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 8 Feb 2021 18:50:56 +0700
Subject: [PATCH 1/3] build-helper/qmake: sync with qmake build-style

- create pseudo target for cross compile in order to not include host
  specific headers
- look for modules inside target
- ignore rpath
---
 common/build-helper/qmake.sh | 49 +++++++++++++++++++++++++++++-------
 1 file changed, 40 insertions(+), 9 deletions(-)

diff --git a/common/build-helper/qmake.sh b/common/build-helper/qmake.sh
index 62581557aec..9603cf5baae 100644
--- a/common/build-helper/qmake.sh
+++ b/common/build-helper/qmake.sh
@@ -5,6 +5,37 @@
 # respectively.
 
 if [ "$CROSS_BUILD" ]; then
+	mkdir -p "${XBPS_WRAPPERDIR}/target-spec/linux-g++"
+	cat > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qmake.conf" <<_EOF
+MAKEFILE_GENERATOR      = UNIX
+CONFIG                 += incremental no_qt_rpath
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(/usr/lib/qt5/mkspecs/common/linux.conf)
+include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf)
+include(/usr/lib/qt5/mkspecs/common/g++-unix.conf)
+
+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}
+QMAKE_LINK_C            = ${CC}
+QMAKE_LINK_SHLIB        = ${CXX}
+
+QMAKE_AR                = ${XBPS_CROSS_TRIPLET}-gcc-ar cqs
+QMAKE_OBJCOPY           = ${OBJCOPY}
+QMAKE_NM                = ${NM} -P
+QMAKE_STRIP             = ${STRIP}
+
+QMAKE_CFLAGS            = ${CFLAGS}
+QMAKE_CXXFLAGS          = ${CXXFLAGS}
+QMAKE_LFLAGS            = ${LDFLAGS}
+load(qt_config)
+_EOF
+	echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h\"" > "${XBPS_WRAPPERDIR}/target-spec/linux-g++/qplatformdefs.h"
+
 	cat > "${XBPS_WRAPPERDIR}/qt.conf" <<_EOF
 [Paths]
 Sysroot=${XBPS_CROSS_BASE}
@@ -28,7 +59,7 @@ HostData=/usr/lib/qt5
 HostBinaries=/usr/lib/qt5/bin
 HostLibraries=/usr/lib
 Spec=linux-g++
-TargetSpec=linux-g++
+TargetSpec=$XBPS_WRAPPERDIR/target-spec/linux-g++
 _EOF
 
 	# create the qmake-wrapper here because it only
@@ -36,13 +67,13 @@ _EOF
 	# and not to interfere with e.g. the qmake build-style
         cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
 #!/bin/sh
-exec /usr/lib/qt5/bin/qmake "\$@" \
-	QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \
-	QMAKE_CFLAGS+="${CFLAGS}" QMAKE_CXXFLAGS+="${CXXFLAGS}" \
-	QMAKE_LFLAGS+="${LDFLAGS}" \
-	-qtconf "${XBPS_WRAPPERDIR}/qt.conf"
+exec /usr/lib/qt5/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf"
+_EOF
+else
+        cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
+#!/bin/sh
+exec /usr/lib/qt5/bin/qmake "\$@" CONFIG+=no_qt_rpath
 _EOF
-
-	chmod 755 ${XBPS_WRAPPERDIR}/qmake
-	cp -p ${XBPS_WRAPPERDIR}/qmake{,-qt5}
 fi
+chmod 755 ${XBPS_WRAPPERDIR}/qmake
+cp -p ${XBPS_WRAPPERDIR}/qmake{,-qt5}

From 87c46651d49750c1d183c6ba2ac18eb148ceec0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 8 Feb 2021 18:53:26 +0700
Subject: [PATCH 2/3] qjackctl: remove rpath

---
 srcpkgs/qjackctl/template | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/qjackctl/template b/srcpkgs/qjackctl/template
index f47da62e887..e4a482e63cc 100644
--- a/srcpkgs/qjackctl/template
+++ b/srcpkgs/qjackctl/template
@@ -1,11 +1,12 @@
 # Template file for 'qjackctl'
 pkgname=qjackctl
 version=0.9.0
-revision=1
+revision=2
 build_style=gnu-configure
 build_helper=qmake
-configure_args="$(vopt_enable jack_session jack-session)"
-hostmakedepends="pkg-config"
+configure_args="$(vopt_enable jack_session jack-session)
+ ac_cv_path_ac_cv_qmake=${XBPS_WRAPPERDIR}/qmake"
+hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
 makedepends="alsa-lib-devel qt5-devel jack-devel qt5-x11extras-devel"
 depends="desktop-file-utils hicolor-icon-theme jack"
 short_desc="JACK Audio Connection Kit - Qt GUI Interface"
@@ -18,8 +19,3 @@ checksum=5196c5c01b7948c1a8ca37cd3198a7f0fe095a99a34a67086abd3466855b4abd
 build_options="jack_session"
 build_options_default="jack_session"
 desc_option_jack_session="Enable support for the deprecated Jack Session API"
-
-if [ "${CROSS_BUILD}" ]; then
-	hostmakedepends+=" qt5-host-tools qt5-devel qt5-x11extras-devel"
-	configure_args+=" ac_cv_path_ac_cv_qmake=${XBPS_WRAPPERDIR}/qmake"
-fi

From 78495ba3a5740df88c2625d4b30bea96ff15c060 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 8 Feb 2021 18:56:29 +0700
Subject: [PATCH 3/3] djview: remove rpath

---
 srcpkgs/djview/patches/sane-qmake-query.patch | 26 +++++++++++++++++++
 srcpkgs/djview/template                       |  8 ++----
 2 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100644 srcpkgs/djview/patches/sane-qmake-query.patch

diff --git a/srcpkgs/djview/patches/sane-qmake-query.patch b/srcpkgs/djview/patches/sane-qmake-query.patch
new file mode 100644
index 00000000000..09df531f62d
--- /dev/null
+++ b/srcpkgs/djview/patches/sane-qmake-query.patch
@@ -0,0 +1,26 @@
+Index: config/acinclude.m4
+===================================================================
+--- config/acinclude.m4.orig
++++ config/acinclude.m4
+@@ -302,19 +302,8 @@ Please define variable QMAKE and possibl
+ Defining QTDIR can help although it is deprecated.])
+   fi
+   mkdir conftest.d
+-  cat > conftest.d/conftest.pro <<\EOF
+-changequote(<<, >>)dnl
+-message(QMAKE_UIC="$$QMAKE_UIC")dnl qt4 only
+-message(QMAKE_MOC="$$QMAKE_MOC")dnl qt4 only
+-message(QT_VERSION="$$[QT_VERSION]")
+-message(QT_INSTALL_PREFIX="$$[QT_INSTALL_PREFIX]")
+-message(QT_INSTALL_DATA="$$[QT_INSTALL_DATA]")
+-message(QT_INSTALL_HEADERS="$$[QT_INSTALL_HEADERS]")
+-message(QT_INSTALL_BINS="$$[QT_INSTALL_BINS]")
+-changequote([, ])dnl
+-EOF
+-  if ( cd conftest.d && $QMAKE > conftest.out 2>&1 ) ; then
+-    sed -e 's/^.*: *//' < conftest.d/conftest.out > conftest.d/conftest.sh
++  if ( cd conftest.d && $QMAKE -query > conftest.out 2>/dev/null ) ; then
++    sed -e 's/:/=/' < conftest.d/conftest.out > conftest.d/conftest.sh
+     . conftest.d/conftest.sh
+     rm -rf conftest.d
+   else
diff --git a/srcpkgs/djview/template b/srcpkgs/djview/template
index 136bcced9fb..a6af3f0188d 100644
--- a/srcpkgs/djview/template
+++ b/srcpkgs/djview/template
@@ -1,11 +1,11 @@
 # Template file for 'djview'
 pkgname=djview
 version=4.12
-revision=1
+revision=2
 wrksrc="djview4-${version}"
 build_style=gnu-configure
 build_helper=qmake
-configure_args="QMAKE=qmake-qt5"
+configure_args="QMAKE=qmake-qt5 ac_cv_path_QMAKE=${XBPS_WRAPPERDIR}/qmake-qt5"
 hostmakedepends="automake pkg-config qt5-host-tools qt5-qmake libtool"
 makedepends="qt5-devel djvulibre-devel libxkbcommon-devel libSM-devel libXt-devel"
 short_desc="Portable DjVu viewer and browser plugin"
@@ -15,10 +15,6 @@ homepage="http://djvu.sourceforge.net/djview4.html"
 distfiles="${SOURCEFORGE_SITE}/djvu/${pkgname}-${version}.tar.gz"
 checksum=5673c6a8b7e195b91a1720b24091915b8145de34879db1158bc936b100eaf3e3
 
-if [ "${CROSS_BUILD}" ]; then
-	configure_args+=" ac_cv_path_QMAKE=${XBPS_WRAPPERDIR}/qmake-qt5"
-fi
-
 post_extract() {
 	vsed -i -e '/Exec/s/djview4/djview/' \
 		-e '/StartupWMClass/s/Djview4/DjView/' \

  parent reply	other threads:[~2021-02-10 13:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 12:58 [PR PATCH] " sgn
2021-02-08 13:08 ` [PR PATCH] [Updated] " sgn
2021-02-08 13:08 ` st3r4g
2021-02-08 13:17 ` ericonr
2021-02-08 13:23 ` sgn
2021-02-08 13:25 ` [PR PATCH] [Updated] " sgn
2021-02-08 13:26 ` sgn
2021-02-08 15:19 ` st3r4g
2021-02-08 15:23 ` st3r4g
2021-02-08 15:31 ` st3r4g
2021-02-10 13:15 ` [PR PATCH] [Updated] " sgn
2021-02-10 13:43 ` sgn [this message]
2021-02-11  2:01 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210210134349.CpsBBw-Ok_Zs1v3ss8L5tb6Hu7q4o7DUYdTtkf5aER4@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).