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: fix {C,CXX,LD}FLAGS
Date: Thu, 08 Apr 2021 03:49:00 +0200	[thread overview]
Message-ID: <20210408014900.C0__WXpIJotP0K3F9vZGXy5K5O_8qSrZ_5z3xWBkmmg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30085@inbox.vuxu.org>

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

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

https://github.com/sgn/void-packages build-helper-qmake-fix
https://github.com/void-linux/void-packages/pull/30085

build-helper/qmake: fix {C,CXX,LD}FLAGS
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->
- recoll will be submitted in #30086, together with libxslt
- PyQt5 will be updated soon.
- gmic build is broken, even with latest version, with or without this change.

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

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

From 61936a0694aba0fb66d0c2efd5332e64bcb13fec 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: Tue, 6 Apr 2021 08:14:42 +0700
Subject: [PATCH 1/5] build-helper/qmake: respect {C,CXX,LD}FLAGS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

As of it's now, package built with build-helper/qmake natively won't
pick our CFLAGS CXXFLAGS and LDFLAGS. The result could be seen in no
debug symbol in djview.

Furthermore, cross build won't pick our hardening flags.

Let's force qmake pick our flags by using the same method as
build-style/qmake.
---
 common/build-helper/qmake.sh | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/common/build-helper/qmake.sh b/common/build-helper/qmake.sh
index 9603cf5baae9..d2a38703b300 100644
--- a/common/build-helper/qmake.sh
+++ b/common/build-helper/qmake.sh
@@ -65,14 +65,36 @@ _EOF
 	# create the qmake-wrapper here because it only
 	# makes sense together with the qmake build-helper
 	# and not to interfere with e.g. the qmake build-style
+	#
+	# XXX: Intentionally quote {C,CXX,LD}FLAGS here but not in native.
+	# - Cross Build:
+	#   + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
+	#   + hardening flags will be picked up from environment variables
+	# - Native Build:
+	#   + hardening flags will be picked up first (Makefile, qt.conf?)
+	#   + base flags will be picked up from QMAKE_{C,CXX,LD}FLAGS
+	# Maybe there're better workaround, I don't know.
         cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
 #!/bin/sh
-exec /usr/lib/qt5/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf"
+exec /usr/lib/qt5/bin/qmake "\$@" -qtconf "${XBPS_WRAPPERDIR}/qt.conf" \\
+	QMAKE_CFLAGS+="\${CFLAGS}" \\
+	QMAKE_CXXFLAGS+="\${CXXFLAGS}" \\
+	QMAKE_LFLAGS+="\${LDFLAGS}"
 _EOF
 else
         cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF
 #!/bin/sh
-exec /usr/lib/qt5/bin/qmake "\$@" CONFIG+=no_qt_rpath
+exec /usr/lib/qt5/bin/qmake \
+	"\$@" \
+	PREFIX=/usr \
+	QT_INSTALL_PREFIX=/usr \
+	LIB=/usr/lib \
+	QMAKE_CC=$CC QMAKE_CXX=$CXX \
+	QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \
+	QMAKE_CFLAGS+="${CFLAGS}" \
+	QMAKE_CXXFLAGS+="${CXXFLAGS}" \
+	QMAKE_LFLAGS+="${LDFLAGS}" \
+	CONFIG+=no_qt_rpath
 _EOF
 fi
 chmod 755 ${XBPS_WRAPPERDIR}/qmake

From ad469c340a3640880b538e4487c5459557bfde16 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: Tue, 6 Apr 2021 08:17:30 +0700
Subject: [PATCH 2/5] djview: fix dbg package

---
 srcpkgs/djview/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/djview/template b/srcpkgs/djview/template
index a6af3f0188d1..76a0d1cc4103 100644
--- a/srcpkgs/djview/template
+++ b/srcpkgs/djview/template
@@ -1,11 +1,11 @@
 # Template file for 'djview'
 pkgname=djview
 version=4.12
-revision=2
+revision=3
 wrksrc="djview4-${version}"
 build_style=gnu-configure
 build_helper=qmake
-configure_args="QMAKE=qmake-qt5 ac_cv_path_QMAKE=${XBPS_WRAPPERDIR}/qmake-qt5"
+configure_args="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"

From d225ba989b2dc9e3851cab31f27d2aba191513a2 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: Tue, 6 Apr 2021 22:31:49 +0700
Subject: [PATCH 3/5] abGate: clean up template

- qt5-devel isn't required in hostmakedepends
- Don't rename distfiles
---
 srcpkgs/abGate/template | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/srcpkgs/abGate/template b/srcpkgs/abGate/template
index f772f49e796a..d4fff83840b1 100644
--- a/srcpkgs/abGate/template
+++ b/srcpkgs/abGate/template
@@ -11,10 +11,6 @@ short_desc="LV2 Noise Gate plugin"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-3.0-or-later"
 homepage="http://abgate.sourceforge.net/"
-distfiles="https://github.com/antanasbruzas/abGate/archive/v${version}.tar.gz>${pkgname}-${versiont}.tar.gz"
+distfiles="https://github.com/antanasbruzas/abGate/archive/v${version}.tar.gz"
 checksum=ebee1cc545b088bf6e5989c114e7e34fa9f21ac7fdb1eee3fd067bcf98703b86
-
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
-fi
 CXXFLAGS="-fPIC"

From 77cd90485973251dc8d2c848fc4af0d4769ce5d6 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: Tue, 6 Apr 2021 22:48:56 +0700
Subject: [PATCH 4/5] smplayer: fix dbg package

---
 srcpkgs/smplayer/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/smplayer/template b/srcpkgs/smplayer/template
index a92e285d3c92..564da633cc17 100644
--- a/srcpkgs/smplayer/template
+++ b/srcpkgs/smplayer/template
@@ -1,7 +1,7 @@
 # Template file for 'smplayer'
 pkgname=smplayer
 version=21.1.0
-revision=1
+revision=2
 build_style=gnu-makefile
 build_helper=qmake
 hostmakedepends="qt5-host-tools qt5-tools qt5-script-devel tar"

From 5a15d287dd52f4273c042204ed8ee07ec0f6e5fe 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, 5 Apr 2021 23:01:55 +0700
Subject: [PATCH 5/5] qjackctl: update checksum

---
 srcpkgs/qjackctl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qjackctl/template b/srcpkgs/qjackctl/template
index 688de6749167..8bcba9039fd7 100644
--- a/srcpkgs/qjackctl/template
+++ b/srcpkgs/qjackctl/template
@@ -14,7 +14,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://qjackctl.sourceforge.net"
 distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=ca443646daae21c13a6bec11160fe15639ea19c919d4a5607b1d1918dddd60bc
+checksum=867c088ed819f61d2eb1e550d4bb8f6330d8f247ab99843a584d81825f1a5d24
 
 build_options="jack_session"
 build_options_default="jack_session"

  reply	other threads:[~2021-04-08  1:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  1:46 [PR PATCH] " sgn
2021-04-08  1:49 ` sgn [this message]
2021-04-09  0:17 ` [PR PATCH] [Closed]: " sgn
2021-04-09 11:06 ` [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=20210408014900.C0__WXpIJotP0K3F9vZGXy5K5O_8qSrZ_5z3xWBkmmg@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).