Commit Graph

255 Commits

Author SHA1 Message Date
Vladimír Čunát
336bc8283b
Re-Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
This reverts commit c778945806.

I believe this is exactly what brings the staging branch into
the right shape after the last merge from master (through staging-next);
otherwise part of staging changes would be lost
(due to being already reachable from master but reverted).
2020-10-26 08:19:17 +01:00
Vladimír Čunát
c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
John Ericson
5235a1e1fc Merge remote-tracking branch 'obsidian/cmake-nativeBuildInputs' into cmake-optional-openssl 2020-10-13 19:23:14 -04:00
John Ericson
e6294cfb7e cmake: Tighten deps
- OpenSSL is evidentally an optional dep. I guess pkg-config found it
   before because it was a transitive dep?

 - `zstd` and cross-built CMake can get by with a `cmakeMinimal that we
   use during bootstrapping, so let's restrict to that.
2020-10-02 15:52:11 +00:00
John Ericson
54b7d5266b cmake: Don't be target sensative
pkg-config now has a target-sensative wrapper. We shouldn't rebuild
CMake because that wrapper changes. The setup hook should also be a
build time dep.

Fix #99325
2020-10-02 15:02:58 +00:00
Nikolay Korotkiy
3106c30903 cmake: fix CMAKE_FIND_FRAMEWORK 2020-08-29 13:37:56 +02:00
Michael Weiss
b730ef35f1 cmake: 3.18.1 -> 3.18.2 2020-08-27 08:48:09 +02:00
R. RyanTM
4005fe7f55 cmake: 3.18.0 -> 3.18.1 2020-08-15 08:33:21 +02:00
Michael Weiss
57f0574595
cmake: Add a patch to fix a regression since CMake 3.18
This fixes all CMake builds that use target_precompile_headers() and
as a result fail since CMake 3.18 with e.g.:
g++: error: unrecognized command line option '-Xarch_x86_64'; did you mean '-march=x86-64'?

Fix #94905.

CMake references:
- https://gitlab.kitware.com/cmake/cmake/-/issues/21072
- https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5118
2020-08-13 12:50:12 +02:00
Alyssa Ross
cec26d6391
cmake: fix grep in setupHook
This produced a warning:

> grep: Invalid range end

In a [], - has to come last.

Reported-by: Daniël de Kok <me@danieldk.eu>
Fixes: 75fdc1ced6
2020-08-08 15:12:12 +00:00
Frederik Rietdijk
cee7df4846 Merge staging-next into staging 2020-07-30 18:28:15 +02:00
Matthew Bauer
1a3b07cf8e Merge commit 'b53902f535f2c63d71e916b9de22dbcfeec9d99e' into staging 2020-07-29 18:24:08 -05:00
Nikolay Korotkiy
b53902f535
cmake: fix CMAKE_FIND_FRAMEWORK 2020-07-28 19:05:43 +03:00
Ryan Burns
3a57356721 cmake: 3.17.3 -> 3.18.0 2020-07-26 18:57:06 +02:00
Jan Tojnar
75fdc1ced6
cmake.setupHook: define shareDocName
The docdir flag needs to include `PROJECT_NAME` according to [GNU guidelines]. We are passing
`-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName}` but `$shareDocName` was unset.

The `multiple-outputs.sh` setup hook actually only defines `shareDocName` as a local variable
so it was not available for cmake setup hook. Making it global would be of limited usability,
since it primarily tries to extract the project name from configure script.
Additionally, it would not be set because the setup hook defines `setOutputFlags=`,
preventing the function defining `shareDocName` from running. And lastly, the function
would not run for single-output derivations.

Previously, we tried [not disabling `setOutputFlags`] and passing the directory flags
only for multi-output derivations that do not disable `setOutputFlags` but that meant having
two different branches of code, making it harder to check correctness. The multi-output
one did in fact not work due to aforementioned undefined `shareDocName`. It also broke
derivations that set `setOutputFlags=` like [`qtModule` function does] (probably
because some Qt modules have configure scripts incompatible with `configureFlags` defined
by `multiple-outputs.sh` setup hook). For that reason, it was [reverted], putting us back to start.

Let’s try to extract the project name from CMake in the cmake setup hook.

CMake has a `-L` flag for dumping variables but `PROJECT_NAME` did not seem to be among them
when I tested, so I had to resort to parsing the `CMakeLists.txt` file.

The extraction function is limited, it does not deal with

* project name on different line from the `project(` command opening
    - that will just not get matched so we will fall back to
      using the derivation name
* variable interpolation
    - we will just fall back to using derivation name when the extracted
      `project_name` contains a dollar character
* multiple [`project`] commands
    - The command sets `PROJECT_NAME` variable anew with each call, so the
      last `project` call before `include(GNUInstallDirs)` command will be used
      when the included module would [cache the `CMAKE_INSTALL_DOCDIR` variable].
      We will just take the first discovered `project` command for simplicity.
      Hopefully, there are not many projects that use multiple `project` calls
      before including `GNUInstallDirs`.

In either case, we will have some subdirectory so the conflicts will be minimized.

[GNU guidelines]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#index-docdir
[not disabling `setOutputFlags`]: be1b22538a
[`qtModule` function  does]: https://github.com/NixOS/nixpkgs/pull/12740
[reverted]: https://github.com/NixOS/nixpkgs/pull/92298
[`PROJECT_NAME`]: https://cmake.org/cmake/help/v3.18/variable/PROJECT_NAME.html
[`project`]: https://cmake.org/cmake/help/v3.18/command/project.html
[cache the `CMAKE_INSTALL_DOCDIR` variable]: 92e30d576d/Modules/GNUInstallDirs.cmake (L298-L299)
2020-07-16 04:38:07 +02:00
Jan Tojnar
cfe7e12d38
Revert "cmake: only set output paths with multiple outputs"
This reverts commit be1b22538a.

The commit broke Qt modules using CMake because they disable setOutputFlags.

There is no need to have these flags limited to multiple output derivations since it
should just work. If it does not, it is a bug that should be fixed as per
https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path
Likewise, having a variable to disable passing the flags is also unnecessary,
since CMake, unlike some configure scripts, ignores unknown flags. And if a person
does not like the values, they can just override them by passing the offending
flag with a different value to cmakeFlags.
2020-07-05 19:01:53 +02:00
Alyssa Ross
be1b22538a cmake: only set output paths with multiple outputs
This brings cmake inline with the behaviour used for configure
scripts, defined in multiple-outputs.sh.  It's important because
that setup hook will only set shareDocName if multiple outputs are in
use (and setOutputFlags hasn't been disabled).  So previously,
CMAKE_INSTALL_DOCDIR would be set to $out/share/doc for single-output
derivations, instead of $out/share/doc/$shareDocName, which would
result in collisions.

Since this hook now uses the setOutputFlags variable, I had to remove
the empty assignment of it added in
a714284d8b.

Fixes: https://github.com/NixOS/nixpkgs/issues/82304
2020-06-29 13:56:27 +00:00
R. RyanTM
9757111825 cmake: 3.17.2 -> 3.17.3 2020-06-19 10:54:01 +02:00
Orivej Desh
16d7f7edae Merge branch 'master' into staging 2020-05-22 09:13:23 +00:00
Thomas Tuegel
694d80b170
Merge pull request #87704 from veprbl/pr/cmake_32bit_workaround
pkgsi686Linux.cmake: compile with _FILE_OFFSET_BITS=64 for 32-bit targets
2020-05-19 06:13:58 -05:00
Dmitry Kalinkin
467a87ba1d
cmake: compile with _FILE_OFFSET_BITS=64 for 32-bit targets 2020-05-12 18:16:03 -04:00
John Ericson
1ac5398589 *-wrapper; Switch from infixSalt to suffixSalt
I hate the thing too even though I made it, and rather just get rid of
it. But we can't do that yet. In the meantime, this brings us more
inline with autoconf and will make it slightly easier for me to write a
pkg-config wrapper, which we need.
2020-05-12 00:44:44 -04:00
R. RyanTM
27752d41e6 cmake: 3.17.0 -> 3.17.2 2020-05-08 06:56:59 +02:00
Jan Tojnar
a04625379a
Merge branch 'master' into staging-next 2020-04-13 18:50:35 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Daniel Șerbănescu
b18e7e5b6a
cmake: 3.16.5 -> 3.17.0 2020-04-01 11:00:43 -05:00
R. RyanTM
b3793e1181 cmake: 3.16.4 -> 3.16.5 2020-03-06 06:14:36 +00:00
Konrad Borowski
4bad7d67cd cmake_2_8: fix build 2020-02-20 16:09:14 +01:00
R. RyanTM
f00bda0148 cmake: 3.16.3 -> 3.16.4 2020-02-12 09:07:49 +01:00
Daiderd Jordan
68513e4071
cmake: move CMAKE_OSX_ARCHITECTURES out of the stdenv
This was initially introduced in 92188d9d17,
not clear how relevant this still is but i686 isn't supported anymore so
disable it explicitly.
2020-01-31 21:52:13 +01:00
Daiderd Jordan
b984c227d2
cmake: remove CMAKE_OSX_DEPLOYMENT_TARGET overrides
We _do_ want minimum versions in our packages.
2020-01-31 21:52:12 +01:00
R. RyanTM
6e6615dfcc cmake: 3.16.2 -> 3.16.3 2020-01-29 08:57:00 +01:00
Tobias Mayer
dfee92cd2e cmake: 3.15.4 -> 3.16.2 2019-12-20 15:59:32 +01:00
Dima
fea6b5f3e0 cmake: patching for harfbuzz location
a patch to cmake to correctly locate harfbuzz:
https://gitlab.kitware.com/cmake/cmake/issues/19531,
needed for more recent pango.
2019-12-02 02:30:04 +01:00
R. RyanTM
40a357a67e cmakeWithGui: 3.15.4 -> 3.15.5 2019-12-01 18:27:33 +01:00
John Ericson
5132cc822a
Merge pull request #72812 from NixOS/bash-no-undef-vars
cc-wrapper, bintools-wrapper: Remove now unneeded `set {+,-}u`
2019-11-08 15:26:14 -05:00
John Ericson
42ffaf5290 cmake: NIX_CFLAGS_COMPILE NIX_LDFLAG could be undefined 2019-11-08 13:24:20 -05:00
John Ericson
cdbbaa91ed cmake: CMAKE_*_PATH can be undefined 2019-11-05 14:21:27 -05:00
John Ericson
acd2d19484
Merge pull request #72347 from NixOS/bash-no-undef-vars
treewide: `set -u` everywhere
2019-11-04 19:52:33 -05:00
R. RyanTM
60024b53d7 cmakeWithGui: 3.15.1 -> 3.15.4
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/cmake-cursesui-qt5ui/versions
2019-11-03 10:42:27 +01:00
John Ericson
b7f4bda282 treewide: *Phase(s)? variables are optional
If these aren't defined, the stdenv defaults are used in the `*Phase`
case, or no extra phases are done, in the `*Phases` case.
2019-11-01 14:44:44 -04:00
John Ericson
1290e532ea treewide: Make more dont* variables OK to be undefined in setup hooks 2019-11-01 14:44:44 -04:00
Dmitry Kalinkin
c8041d97a5
cmake: process -iframework in setup-hook
This fixes a regression in #26197

Fixes: f496357585 ('cc-wrapper: use -iframework instead of -F')
2019-10-11 18:48:16 -04:00
R. RyanTM
5c0cdcfad2 cmakeWithGui: 3.14.5 -> 3.15.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/cmake-cursesui-qt5ui/versions
2019-08-03 20:19:16 -07:00
worldofpeace
883a1dffcf
Merge pull request #52859 from jtojnar/cmake-gid
cmake: use multiple outputs for GNUInstallDirs
2019-07-25 16:05:10 -04:00
Daiderd Jordan
ed27ba064c
cmake: update ApplicationServices patch 2019-07-08 21:48:19 +02:00
Tobias Mayer
d87c843b6f Integrate review suggestions 2019-07-03 08:50:18 +02:00
Tobias Mayer
2608669904 cmake: 3.13.4 -> 3.14.5 2019-07-03 08:50:18 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
eaadbdf1c3 cmake: don’t use cf-private
cf-private is not necessary here. cmake just needs the CoreFoundation
framework to be used. swift-corefoundation seems to work fine in this case.

/cc @lnl7
2019-04-26 21:54:49 -04:00