On 01/24/2018 10:05 PM, Rex Dieter wrote:
Rex Dieter wrote:
Florian Weimer wrote:
Oh, *indirectly* calls qmake, that may be trickier. Which package?
...
I don't want to copy this solution in the dozen or so packages which need this (and I probably would have missed QMAKE_STRIP). Surely it would make sense to provide a generic solution?
If something is needed more broadly, I agree. I'll take a closer look at pcp and see if I can come up with a better generic solution.
This is the best I've come up with so far:
- Qt packaging providing a qmake wrapper. first horriblish iteration:
https://src.fedoraproject.org/rpms/qt5/c/d9172949ad3ad54908de9ecfd41bf125f8f...
Thanks for working on this.
I'm not sure if the use of eval is correct. I would have expected something like this instead:
exec $QMAKE $QMAKE_FLAGS "$@"
- Adapt packages to use the wrapper. this can take the form of explicitly
setting QMAKE (or equivalent), adjusting PATH to prefer the qt5 wrapper dir, or patching, or some combination of the above.
In the specific case of pcp, it supports QMAKE, so it's a one liner, something like this appears to achieve what we want:
diff --git a/pcp.spec b/pcp.spec index 72a7583..71d59a6 100644 --- a/pcp.spec +++ b/pcp.spec @@ -2089,6 +2089,7 @@ updated policy package. rm -Rf $RPM_BUILD_ROOT
%build +export QMAKE=%{qmake_qt5_wrapper} %if !%{disable_python2} && 0%{?default_python} != 3 export PYTHON=python%{?default_python} %endif
I doubt that this will work for pcp because it fails building with -z defs and therefore has to use:
%undefine _strict_symbol_defs_build
But the qmake wrapper will not see this directive in the spec file and pass the full set of linker flags. At least that's what I expect, I haven't tried it.
I suspect we need something that captures the contents of CFLAGS etc. which is called from %build in different environment variables, and also sets QMAKE.
Thanks, Florian