New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt58: enable darwin compatibility #24139
qt58: enable darwin compatibility #24139
Conversation
@@ -15,7 +17,8 @@ | |||
cups ? null, mysql ? null, postgresql ? null, | |||
|
|||
# options | |||
mesaSupported, mesa, | |||
mesaSupported ? (!stdenv.isDarwin), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would the default value have any difference when mesaSupported
is defined in all-packages.nix
? And why would you want to disable mesa on Darwin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik, mesa is supported for darwin, but the corresponding mkspecs-libgl.path
has to be ported for darwin, too. I assume that the following defs in `mkspecs/common/mac.conf' have to be substituted by the mesa-buildInput:
QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \
/System/Library/Frameworks/OpenGL.framework/Headers \
/System/Library/Frameworks/AGL.framework/Headers/
Since this is an issue with all qt-5 releases, i would like to suggest a separate PR. What is your opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mesaSupported
and mesaPlatforms
are just bad names. On Darwin we do not support mesa itself, but there's the libGL* from the OS that we do support, provided at the same mesa_noglu
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the insights @vcunat . I still propose to re-enable mesa/libGL support in a separate PR for the series of currently maintained qt-5 release. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems OK to go without mesa support here for now.
./mkspecs/common/clang-mac.conf | ||
''; | ||
# Note on the above: \x27 is a way if including a single-quote | ||
# character in the sed string arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in a way if including
, but a patch (plus some substituteInPlace
s) would be much easier to review and maintain for future Qt releases than this sequence of sed
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, i adopted for the start the sed-way, because of it was the natural regex-replace strategy. Does substituteInPlace know regex?
@@ -102,7 +125,7 @@ stdenv.mkDerivation { | |||
-shared | |||
${lib.optionalString developerBuild "-developer-build"} | |||
-accessibility | |||
-rpath | |||
-optimized-qmake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this -optimized-qmake
come from and what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik this configure option is for cross-compilation, e.g. raspeberry-pi, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect following reasoning
Shrink the temp directory used for building with qmake.
according to 7a9400d
@@ -155,40 +164,75 @@ stdenv.mkDerivation { | |||
-${lib.optionalString (buildExamples == false) "no"}make examples | |||
-${lib.optionalString (buildTests == false) "no"}make tests | |||
-v | |||
''; | |||
'' + lib.optionalString (!stdenv.isDarwin) '' | |||
-no-rpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You replaced -rpath
with -no-rpath
.
|
||
# Don't move .prl files on darwin because they end up in | ||
# "dev/lib/Foo.framework/Foo.prl" which interferes with subsequent | ||
# use of lndir in the qtbase setup-hook. On Linux, the .prl files | ||
# are in lib, and so do not cause a subsequent recreation of deep | ||
# framework directory trees. | ||
+ lib.optionalString stdenv.isDarwin '' | ||
'' + lib.optionalString stdenv.isDarwin '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move the quotes around here and 9 lines above?
@@ -266,7 +307,7 @@ stdenv.mkDerivation { | |||
description = "A cross-platform application framework for C++"; | |||
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; | |||
maintainers = with maintainers; [ bbenoist qknight ttuegel ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you like to ensure being notified of future proposed changes to qtbase
by listing yourself as a maintainer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
5bf2678
to
3181a05
Compare
fyi, qt 5.8 does not build with system-libpng anymore, further info QT-Wiki |
c6b135f
to
89fd0a8
Compare
89fd0a8
to
b97dd5f
Compare
I can't test on macOS myself, but this since this is just a copy of the Qt 5.7 Darwin patches, it looks good enough! |
@ttuegel i am building this for |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)