Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] build-helper/qmake: fix {C,CXX,LD}FLAGS
@ 2021-04-08  1:46 sgn
  2021-04-08  1:49 ` [PR PATCH] [Updated] " sgn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sgn @ 2021-04-08  1:46 UTC (permalink / raw)
  To: ml

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

There is a new 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 another PR, 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: 7535 bytes --]

From 9896ccb24336394c645c750bab5a037d4c29be36 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/6] 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 6b63456970f0c9259617ebc90840514501a39171 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/6] djview: fix dbg package

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

diff --git a/srcpkgs/djview/template b/srcpkgs/djview/template
index a6af3f0188d1..ae458216723c 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"
@@ -14,6 +14,7 @@ license="GPL-2.0-or-later"
 homepage="http://djvu.sourceforge.net/djview4.html"
 distfiles="${SOURCEFORGE_SITE}/djvu/${pkgname}-${version}.tar.gz"
 checksum=5673c6a8b7e195b91a1720b24091915b8145de34879db1158bc936b100eaf3e3
+make_build_args=V=1
 
 post_extract() {
 	vsed -i -e '/Exec/s/djview4/djview/' \

From 8c5ea1f02b1d7782c42a82db7c6c91efdeebdbd6 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 21:17:09 +0700
Subject: [PATCH 3/6] gmic: update to 2.9.6.

---
 srcpkgs/gmic/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gmic/template b/srcpkgs/gmic/template
index 6d6f4ec13ba2..ab98227b5e6b 100644
--- a/srcpkgs/gmic/template
+++ b/srcpkgs/gmic/template
@@ -1,6 +1,6 @@
 # Template file for 'gmic'
 pkgname=gmic
-version=2.8.0
+version=2.9.6
 revision=1
 build_wrksrc="src"
 build_style=gnu-makefile
@@ -14,8 +14,9 @@ maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
 license="CECILL-2.1"
 homepage="http://gmic.eu/"
 distfiles="http://gmic.eu/files/source/gmic_${version}.tar.gz"
-checksum=d1ca5c726f7570af3a6f0bca27eeb66ef1e6a1b6a17bdaeaf0d59be40b9cd075
+checksum=d22fe8515af16dcd050d09a0bc7127ec29f4795ce732a0c6c3eaf839356bc11a
 disable_parallel_build="yes"
+export NOSTRIP=yes
 
 post_patch() {
 	vsed -i -e "s,-I[\$](USR),-I$XBPS_CROSS_BASE/usr,g" Makefile

From 315e37951a8b994ee31df45afabb4d1ea7398ed7 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 4/6] 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 5d14e589b4c0196f8d7ddce246dcae5d889d68e3 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 5/6] 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 3e2a7916a2437f2228fdb9c8d4341f6aee9d5f47 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 6/6] 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"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-09 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  1:46 [PR PATCH] build-helper/qmake: fix {C,CXX,LD}FLAGS sgn
2021-04-08  1:49 ` [PR PATCH] [Updated] " sgn
2021-04-09  0:17 ` [PR PATCH] [Closed]: " sgn
2021-04-09 11:06 ` [PR PATCH] [Merged]: " sgn

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).