Skip to content

Commit

Permalink
fix qmake build with apple-clang 15
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Sep 24, 2023
1 parent 1ede4d1 commit 42130b2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
20 changes: 20 additions & 0 deletions recipes/qt/5.x.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ patches:
"patch_file": "patches/android-openssl.diff"

Check warning on line 78 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtbase ^ (line: 77)
- "base_path": "qt5/qtbase"
"patch_file": "patches/android-new-ndk.diff"
- patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch"
base_path: "qt5/qtbase"

Check notice on line 82 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml v2 migration suggestion

'base_path' should not be required once a recipe has been upgraded to take advantage of layouts (see https://docs.conan.io/en/latest/reference/conanfile/tools/layout.html) and the new helper (see https://docs.conan.io/en/latest/reference/conanfile/tools/files/patches.html#conan-tools-files-apply-conandata-patches)
patch_description: "Fix qmake build with apple-clang>=15"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916"
"5.15.9":
- "base_path": "qt5/qtbase"
"patch_file": "patches/aa2a39dea5.diff"
Expand All @@ -101,6 +106,11 @@ patches:
"patch_file": "patches/android-openssl.diff"
- "base_path": "qt5/qtbase"
"patch_file": "patches/android-new-ndk.diff"
- patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch"
base_path: "qt5/qtbase"

Check notice on line 110 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml v2 migration suggestion

'base_path' should not be required once a recipe has been upgraded to take advantage of layouts (see https://docs.conan.io/en/latest/reference/conanfile/tools/layout.html) and the new helper (see https://docs.conan.io/en/latest/reference/conanfile/tools/files/patches.html#conan-tools-files-apply-conandata-patches)
patch_description: "Fix build with apple-clang 15"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916"
"5.15.8":
- patch_file: "patches/aa2a39dea5.diff"
base_path: "qt5/qtbase"
Expand All @@ -124,6 +134,11 @@ patches:
base_path: "qt5/qtbase"
- patch_file: "patches/android-new-ndk.diff"
base_path: "qt5/qtbase"
- patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch"
base_path: "qt5/qtbase"

Check notice on line 138 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml v2 migration suggestion

'base_path' should not be required once a recipe has been upgraded to take advantage of layouts (see https://docs.conan.io/en/latest/reference/conanfile/tools/layout.html) and the new helper (see https://docs.conan.io/en/latest/reference/conanfile/tools/files/patches.html#conan-tools-files-apply-conandata-patches)
patch_description: "Fix build with apple-clang 15"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916"
"5.15.7":
- patch_file: "patches/337f28c9ab.patch"
base_path: "qt5/qtbase"
Expand Down Expand Up @@ -155,3 +170,8 @@ patches:
base_path: "qt5/qtbase"
- patch_file: "patches/android-new-ndk.diff"
base_path: "qt5/qtbase"
- patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch"
base_path: "qt5/qtbase"

Check notice on line 174 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml v2 migration suggestion

'base_path' should not be required once a recipe has been upgraded to take advantage of layouts (see https://docs.conan.io/en/latest/reference/conanfile/tools/layout.html) and the new helper (see https://docs.conan.io/en/latest/reference/conanfile/tools/files/patches.html#conan-tools-files-apply-conandata-patches)
patch_description: "Fix build with apple-clang 15"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916"
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) {
}
}
}
- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \
+ isEmpty(QMAKE_DEFAULT_INCDIRS): \
!integrity: \
- error("failed to parse default search paths from compiler output")
+ error("failed to parse default include paths from compiler output")
+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \
+ !integrity:!darwin: \
+ error("failed to parse default library paths from compiler output")
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
} else: ghs {
cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp
@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) {
QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
}

- unix:if(!cross_compile|host_build) {
+ unix:!darwin:if(!cross_compile|host_build) {
isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
}

0 comments on commit 42130b2

Please sign in to comment.