On Tue, Oct 17, 2023 at 01:35:14PM +0200, Alexander Dahl wrote:
> Hello everyone,
> 
> I currently have some kind of weird requirement: building a target
> package with qmake, but not linking against Qt.  It's a fork of RTKlib
> which is itself a university project (with hand written makefiles, but
> not for the part I'm interested in):
> 
> https://github.com/rtklibexplorer/RTKLIB/releases/tag/b34h
> 
> I actually achieved building it with the attached make rule.  Note it
> has a dependency to QT5, but I had to manually add the Qt mkspec file
> ptxdist creates as an option to the _CONF_OPT variable.
> 
> Two things are bad about this:
> 
> 1.) I don't think it should be necessary to let the make rule set the
> correct mkspec file.  There is only one and IMHO ptxdist should handle
> this internally if CONF_TOOL is qmake?

I'm pretty sure you're calling the wrong qmake here. You need to modify
PATH the same way e.g. rules/qwt5.make does.

> 2.) rather large Qt libraries are installed to the target now.  I guess
> I might be able to avoid this by setting 'select QT5 if BUILDTIME' in
> the in rule, but I would have expected HOST_QT5 to be sufficient.  This
> does not work however for two reasons: a) ptxdist complains it needs QT5
> if CONF_TOOL is qmake and b) if I only select HOST_QT5 that mkspec is
> not generated.

Do you need qmake from qt5 or would qt6 work as well? We already have a
host-qt6 package and if we build the binary there and split out the qmake
config stuff from qt6 into a new cross-qmake package.
It would need to copy the mkspecs from the host package I think before
adding the custom mkspecs stuff.

Michael

> I saw ptxdist having nearly zero packages selecting QT5, and none
> requiring HOST_QT5 (?) so it's difficult to learn from examples here.
> Maybe this usecase is quite esoteric?  Don't know.
> 
> In the end I would only need qmake, nothing more.  That one generates a
> Makefile which is then used to compile the package.
> 
> Would take directions to improve ptxdist for qmake based packages.
> 
> Greets
> Alex
> 
> Alexander Dahl (1):
>   WIP: rtklib-demo5: Add new package
> 
>  rules/rtklib-demo5.in   | 23 ++++++++++++++++
>  rules/rtklib-demo5.make | 58 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 81 insertions(+)
>  create mode 100644 rules/rtklib-demo5.in
>  create mode 100644 rules/rtklib-demo5.make
> 
> 
> base-commit: 90875f8af4f6f1dd9f8eda71df8e8a90866f9839
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to