From bcf5fc0c8dde006f89d3a6f0ca8c6bceea1ff30a Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Fri, 10 Jun 2022 07:10:00 +0200 Subject: [PATCH] Draft: macOS: Add M1/arm64 support --- .github/workflows/build-linux.yml | 97 ------------------- .github/workflows/build-macos.yml | 12 ++- .gitlab-ci.yml | 60 ------------ CMakePresets.json | 28 +++++- appveyor.yml | 57 ----------- docs/build-source-code.rst | 2 +- src/platform/mac/macplatform.cmake | 4 +- utils/appveyor/before_build.sh | 2 +- utils/github/bundle-macos.sh | 4 +- .../homebrew/Formula/extra-cmake-modules.rb | 6 +- .../homebrew/Formula/kf5-kcoreaddons.rb | 36 ------- .../homebrew/Formula/kf5-knotifications.rb | 40 -------- .../{kf5-kconfig.rb => kf6-kconfig.rb} | 16 +-- .../homebrew/Formula/kf6-knotifications.rb | 38 ++++++++ .../Formula/kf6-kstatusnotifieritem.rb | 38 ++++++++ ...-kwindowsystem.rb => kf6-kwindowsystem.rb} | 16 +-- utils/github/install-macos.sh | 2 +- 17 files changed, 135 insertions(+), 323 deletions(-) delete mode 100644 .github/workflows/build-linux.yml delete mode 100644 .gitlab-ci.yml delete mode 100644 appveyor.yml delete mode 100644 utils/github/homebrew/Formula/kf5-kcoreaddons.rb delete mode 100644 utils/github/homebrew/Formula/kf5-knotifications.rb rename utils/github/homebrew/Formula/{kf5-kconfig.rb => kf6-kconfig.rb} (61%) create mode 100644 utils/github/homebrew/Formula/kf6-knotifications.rb create mode 100644 utils/github/homebrew/Formula/kf6-kstatusnotifieritem.rb rename utils/github/homebrew/Formula/{kf5-kwindowsystem.rb => kf6-kwindowsystem.rb} (59%) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml deleted file mode 100644 index 6d9bd57d92..0000000000 --- a/.github/workflows/build-linux.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -name: Linux Build - -# yamllint disable-line rule:truthy -on: - - push - -jobs: - build: - name: ${{matrix.buildname}} - runs-on: ${{matrix.os}} - strategy: - matrix: - include: - - os: ubuntu-20.04 - buildname: Linux-GCC - compiler: g++ - compiler_package: g++ - with_qt6: false - with_native_notifications: true - - - os: ubuntu-20.04 - buildname: Linux-Clang - compiler: clang++ - compiler_package: clang - with_qt6: false - with_native_notifications: true - - - os: ubuntu-latest - buildname: Qt 6 - compiler: g++ - compiler_package: g++ - with_qt6: true - with_native_notifications: false - coverage: true - compiler_flags: >- - --coverage - -fprofile-arcs - -ftest-coverage - -fprofile-abs-path - - steps: - - name: Checkout source code - uses: actions/checkout@v4 - with: - submodules: false - fetch-depth: 1 - - - name: Enable ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.job }}-${{ matrix.os }} - - - name: Set up ccache - run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - - - name: Install dependencies - uses: nick-invision/retry@v2 - env: - WITH_QT6: '${{matrix.with_qt6}}' - with: - timeout_minutes: 10 - retry_wait_seconds: 30 - max_attempts: 3 - command: >- - '${{github.workspace}}/utils/github/install-linux.sh' - '${{matrix.compiler_package}}' - - - name: Build with CMake - uses: lukka/run-cmake@v10 - with: - configurePreset: Debug - buildPreset: Debug - configurePresetAdditionalArgs: >- - [ - '-DCMAKE_CXX_COMPILER=${{matrix.compiler}}', - '-DCMAKE_CXX_FLAGS=${{matrix.compiler_flags}}', - '-DCMAKE_C_FLAGS=${{matrix.compiler_flags}}', - '-DWITH_QT6=${{matrix.with_qt6}}', - '-DWITH_NATIVE_NOTIFICATIONS=${{matrix.with_native_notifications}}' - ] - - - name: Create gnupg directory for tests - run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg - - - name: Run tests - working-directory: '${{runner.workspace}}/install/bin' - run: '${{github.workspace}}/utils/github/test-linux.sh' - - - name: Update coverage - if: matrix.coverage - env: - COVERALLS_REPO_TOKEN: '${{secrets.COVERALLS_REPO_TOKEN}}' - run: >- - '${{github.workspace}}/utils/github/coverage-linux.sh' - '${{runner.workspace}}/build' diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 65575bc4b5..819e9bdcce 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -12,9 +12,11 @@ jobs: strategy: matrix: include: - - os: macos-12 - buildname: macOS 10.15 + - os: macos-14 + buildname: macOS 12 M1 create_bundle: true + bundle_suffix: '-macos-12-m1' + cmake_preset: macOS-12-m1 steps: - name: Checkout source code @@ -42,8 +44,8 @@ jobs: - name: Build with CMake uses: lukka/run-cmake@v10 with: - configurePreset: macOS - buildPreset: macOS + configurePreset: '${{ matrix.cmake_preset }}' + buildPreset: '${{ matrix.cmake_preset }}' - name: Create gnupg directory for tests run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg @@ -57,5 +59,5 @@ jobs: if: matrix.create_bundle uses: actions/upload-artifact@v4 with: - name: CopyQ.dmg + name: 'CopyQ${{ matrix.bundle_suffix }}.dmg' path: '${{runner.workspace}}/build/CopyQ.dmg' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 56b059efcb..0000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -image: ubuntu:20.04 - -variables: - BUILD_DIR: "build" - INSTALL_PREFIX: "copyq" - SCREENSHOT_DIR: "screenshots" - TESTS_LOG_DIR: "logs" - DEBIAN_FRONTEND: "noninteractive" - -build: - stage: build - - before_script: - - utils/gitlab/build-before_script.sh - - script: - - utils/gitlab/build-script.sh - - # Upload installed application. - artifacts: - paths: - - "$INSTALL_PREFIX" - - cache: - paths: - - build - -# Run simple tests (doesn't require GUI) -test: - stage: test - - before_script: - - utils/gitlab/test-before_script.sh - - script: - - utils/gitlab/test-script.sh - - dependencies: - - build - -# GUI tests (requires X11) -test_gui: - stage: test - - before_script: - - utils/gitlab/test_gui-before_script.sh - - script: - - utils/gitlab/test_gui-script.sh - - # Upload screenshots on failure. - artifacts: - when: on_failure - paths: - - "$SCREENSHOT_DIR" - - "$TESTS_LOG_DIR" - - dependencies: - - build diff --git a/CMakePresets.json b/CMakePresets.json index c469af786c..a3d16fb675 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -14,7 +14,7 @@ } }, { - "name": "macOS", + "name": "macOS-10", "generator": "Ninja", "binaryDir": "${sourceParentDir}/build", "installDir": "${sourceParentDir}/build", @@ -26,6 +26,22 @@ "CMAKE_CXX_COMPILER_LAUNCHER": "ccache", "CMAKE_CXX_FLAGS": "-Wno-deprecated-declarations" } + }, + { + "name": "macOS-12-m1", + "generator": "Ninja", + "binaryDir": "${sourceParentDir}/build", + "installDir": "${sourceParentDir}/build", + "cacheVariables": { + "WITH_QT6": "TRUE", + "WITH_TESTS": "TRUE", + "CMAKE_PREFIX_PATH": "/usr/local/opt/qt6/lib/cmake", + "CMAKE_OSX_DEPLOYMENT_TARGET": "12", + "CMAKE_OSX_ARCHITECTURES": "x86_64;arm64", + "CMAKE_C_COMPILER_LAUNCHER": "ccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache", + "CMAKE_CXX_FLAGS": "-Wno-deprecated-declarations" + } } ], "buildPresets": [ @@ -36,8 +52,14 @@ "targets": "install" }, { - "name": "macOS", - "configurePreset": "macOS", + "name": "macOS-10", + "configurePreset": "macOS-10", + "configuration": "Release", + "targets": "install" + }, + { + "name": "macOS-12-m1", + "configurePreset": "macOS-12-m1", "configuration": "Release", "targets": "install" } diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 94a16bf295..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -configuration: Release - -image: - - Visual Studio 2019 - -cache: - - usr - - downloads - -# Build and test only once for a pull request. -skip_branch_with_pr: true - -environment: - APPVEYOR_SAVE_CACHE_ON_ERROR: true - - KF5_VERSION: 5.109 - KF5_PATCH: 0 - SNORETOAST_VERSION: 0.9.0 - - matrix: - - QTDIR: /c/Qt/5.15/msvc2019_64 - CMAKE_GENERATOR: Visual Studio 16 2019 - CMAKE_GENERATOR_ARCH: x64 - BUILD_SUB_DIR: Release - # https://wiki.qt.io/Qt_5.15_Tools_and_Versions - # https://www.appveyor.com/docs/windows-images-software/#tools - OPENSSL_PATH: /c/OpenSSL-v111-Win64/bin - LIBSSL: libssl-1_1-x64.dll - LIBCRYPTO: libcrypto-1_1-x64.dll - WITH_NATIVE_NOTIFICATIONS: "ON" - GPGPATH: /c/Program Files/Git/usr/bin - -# Parameters for default build commands (build_script is used instead). -build: - -install: - - ps: $env:Path = "C:\Program Files\Git\bin;$env:Path" - - bash utils/appveyor/install.sh - -before_build: - - bash utils/appveyor/before_build.sh - -build_script: - - bash utils/appveyor/build_script.sh - -after_build: - - bash utils/appveyor/after_build.sh - -# Upload test log files. -on_finish: - - ps: >- - Get-ChildItem -recurse -include copyq*.log* - | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - -matrix: - fast_finish: true diff --git a/docs/build-source-code.rst b/docs/build-source-code.rst index a3c7adc1f6..5c4c00c58b 100644 --- a/docs/build-source-code.rst +++ b/docs/build-source-code.rst @@ -158,7 +158,7 @@ On OS X, required Qt 5 libraries and utilities can be easily installed with `Hom # brew untap --force copyq/kde # and re-run the above "brew tap" command - brew install qt5 copyq/kde/kf5-knotifications + brew install qt6 copyq/kde/kf6-knotifications copyq/kde/kf6-kstatusnotifieritem Build with the following commands: diff --git a/src/platform/mac/macplatform.cmake b/src/platform/mac/macplatform.cmake index 37b1dfdfd7..1baa8f7a01 100644 --- a/src/platform/mac/macplatform.cmake +++ b/src/platform/mac/macplatform.cmake @@ -8,4 +8,6 @@ file(GLOB copyq_SOURCES ${copyq_SOURCES} set(USE_QXT TRUE) -list(APPEND copyq_qt_modules MacExtras) +if (NOT WITH_QT6) + list(APPEND copyq_qt_modules MacExtras) +endif() diff --git a/utils/appveyor/before_build.sh b/utils/appveyor/before_build.sh index 83e26c2335..2c5df98f5b 100644 --- a/utils/appveyor/before_build.sh +++ b/utils/appveyor/before_build.sh @@ -21,8 +21,8 @@ if [[ $WITH_NATIVE_NOTIFICATIONS == ON ]]; then "$build" extra-cmake-modules "$build" kconfig "" "" "-DKCONFIG_USE_DBUS=OFF" "-DKCONFIG_USE_GUI=OFF" "$build" kwindowsystem - "$build" kcoreaddons "$build" knotifications + "$build" kstatusnotifieritem # Create and upload dependencies zip file. 7z a "$APP-dependencies.zip" -r "$INSTALL_PREFIX" diff --git a/utils/github/bundle-macos.sh b/utils/github/bundle-macos.sh index 95728f4d3f..870bec79fb 100755 --- a/utils/github/bundle-macos.sh +++ b/utils/github/bundle-macos.sh @@ -6,7 +6,7 @@ app_bundle_path="CopyQ.app" executable="${PWD}/${app_bundle_path}/Contents/MacOS/CopyQ" plugins=("$app_bundle_path/Contents/PlugIns/copyq/"*.so) -qt_bin="$(brew --prefix qt@5)/bin" +qt_bin="$(brew --prefix qt@6)/bin" rm -rf "$app_bundle_path/Contents/PlugIns/"{platforminputcontexts,printsupport,qmltooling} @@ -28,7 +28,7 @@ test "$("$executable" info has-global-shortcuts)" -eq "1" # Uninstall local Qt to make sure we only use libraries from the bundle brew remove --ignore-dependencies --force \ - qt@5 copyq/kde/kf5-knotifications freetype + qt@6 copyq/kde/kf6-knotifications copyq/kde/kf6-kstatusnotifieritem freetype ( export LD_LIBRARY_PATH="" diff --git a/utils/github/homebrew/Formula/extra-cmake-modules.rb b/utils/github/homebrew/Formula/extra-cmake-modules.rb index 69a6753bbd..1539564ee3 100644 --- a/utils/github/homebrew/Formula/extra-cmake-modules.rb +++ b/utils/github/homebrew/Formula/extra-cmake-modules.rb @@ -1,15 +1,15 @@ class ExtraCmakeModules < Formula desc "Extra modules and scripts for CMake" homepage "https://api.kde.org/frameworks/extra-cmake-modules/html/index.html" - url "https://download.kde.org/stable/frameworks/5.109/extra-cmake-modules-5.109.0.tar.xz" - sha256 "1526b557cf9718e4d3bf31ff241578178d1ee60bdfb863110c97d43d478b7fb7" + url "https://download.kde.org/unstable/frameworks/5.249.0/extra-cmake-modules-5.249.0.tar.xz" + sha256 "800fbb24496980604886b6f9dbf9c9f44693c73cc924abbe4bab21274ff4379b" license all_of: ["BSD-2-Clause", "BSD-3-Clause", "MIT"] head "https://invent.kde.org/frameworks/extra-cmake-modules.git" depends_on "cmake" => [:build, :test] depends_on "ninja" => :build - depends_on "qt@5" => :build + depends_on "qt" => :build def install args = std_cmake_args diff --git a/utils/github/homebrew/Formula/kf5-kcoreaddons.rb b/utils/github/homebrew/Formula/kf5-kcoreaddons.rb deleted file mode 100644 index 78c22d313b..0000000000 --- a/utils/github/homebrew/Formula/kf5-kcoreaddons.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Kf5Kcoreaddons < Formula - desc "Addons to QtCore" - homepage "https://www.kde.org" - url "https://download.kde.org/stable/frameworks/5.109/kcoreaddons-5.109.0.tar.xz" - sha256 "ff647fc1d4dd62370f261854af0870f2a1c7ba7abe7e276e5a4c42d923f15300" - head "https://invent.kde.org/frameworks/kcoreaddons.git" - - depends_on "cmake" => [:build, :test] - depends_on "ninja" => :build - - depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] - - depends_on "qt@5" - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=OFF" - args << "-DKDE_INSTALL_QMLDIR=lib/qt5/qml" - args << "-DKDE_INSTALL_PLUGINDIR=lib/qt5/plugins" - args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt5/plugins" - args << "-DUPDATE_MIME_DATABASE_EXECUTABLE=OFF" - - mkdir "build" do - system "cmake", "-G", "Ninja", "..", *args - system "ninja" - system "ninja", "install" - prefix.install "install_manifest.txt" - end - end - - test do - (testpath/"CMakeLists.txt").write("find_package(KF5CoreAddons REQUIRED)") - system "cmake", ".", "-Wno-dev" - end -end diff --git a/utils/github/homebrew/Formula/kf5-knotifications.rb b/utils/github/homebrew/Formula/kf5-knotifications.rb deleted file mode 100644 index 73f4fbf04b..0000000000 --- a/utils/github/homebrew/Formula/kf5-knotifications.rb +++ /dev/null @@ -1,40 +0,0 @@ -class Kf5Knotifications < Formula - desc "Abstraction for system notifications" - homepage "https://www.kde.org" - url "https://download.kde.org/stable/frameworks/5.109/knotifications-5.109.0.tar.xz" - sha256 "12b1b41c80739dcdda0cff1d81288323b8b5cb8249da45ecee4b785c604dc13d" - head "https://invent.kde.org/frameworks/knotifications.git" - - depends_on "cmake" => [:build, :test] - depends_on "ninja" => :build - - depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] - depends_on "copyq/kde/kf5-kconfig" - depends_on "copyq/kde/kf5-kcoreaddons" - depends_on "copyq/kde/kf5-kwindowsystem" - depends_on "libcanberra" - - def install - args = std_cmake_args - args << "-DBUILD_TESTING=OFF" - args << "-DBUILD_QCH=OFF" - args << "-DKDE_INSTALL_QMLDIR=lib/qt5/qml" - args << "-DKDE_INSTALL_PLUGINDIR=lib/qt5/plugins" - args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt5/plugins" - # setBadgeLabelText method is deprecated since 5.12 - args << "-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DQT_DISABLE_DEPRECATED_BEFORE=0x050b00" - args << "-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DQT_DISABLE_DEPRECATED_BEFORE=0x050b00" - - mkdir "build" do - system "cmake", "-G", "Ninja", "..", *args - system "ninja" - system "ninja", "install" - prefix.install "install_manifest.txt" - end - end - - test do - (testpath/"CMakeLists.txt").write("find_package(KF5Notifications REQUIRED)") - system "cmake", ".", "-Wno-dev" - end -end diff --git a/utils/github/homebrew/Formula/kf5-kconfig.rb b/utils/github/homebrew/Formula/kf6-kconfig.rb similarity index 61% rename from utils/github/homebrew/Formula/kf5-kconfig.rb rename to utils/github/homebrew/Formula/kf6-kconfig.rb index 3c3aa9d72e..2f0e42c899 100644 --- a/utils/github/homebrew/Formula/kf5-kconfig.rb +++ b/utils/github/homebrew/Formula/kf6-kconfig.rb @@ -1,8 +1,8 @@ -class Kf5Kconfig < Formula +class Kf6Kconfig < Formula desc "Configuration system" homepage "https://www.kde.org" - url "https://download.kde.org/stable/frameworks/5.109/kconfig-5.109.0.tar.xz" - sha256 "5ba91551fb682d3e1d536bc3735b56cecaa57bb698ab32dd8f662e1cc78f7ad8" + url "https://download.kde.org/unstable/frameworks/5.249.0/kconfig-5.249.0.tar.xz" + sha256 "7d24cbc6c12dd8cb25959fd4ffc232efb14719ebb8a3a9eefd40673a57ff4d0d" head "https://invent.kde.org/frameworks/kconfig.git" depends_on "cmake" => [:build, :test] @@ -10,15 +10,15 @@ class Kf5Kconfig < Formula depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] - depends_on "qt@5" + depends_on "qt" def install args = std_cmake_args args << "-DBUILD_TESTING=OFF" args << "-DBUILD_QCH=OFF" - args << "-DKDE_INSTALL_QMLDIR=lib/qt5/qml" - args << "-DKDE_INSTALL_PLUGINDIR=lib/qt5/plugins" - args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt5/plugins" + args << "-DKDE_INSTALL_QMLDIR=lib/qt6/qml" + args << "-DKDE_INSTALL_PLUGINDIR=lib/qt6/plugins" + args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" args << "-DKCONFIG_USE_GUI=OFF" args << "-DKCONFIG_USE_DBUS=OFF" @@ -32,7 +32,7 @@ def install end test do - (testpath/"CMakeLists.txt").write("find_package(KF5Config REQUIRED)") + (testpath/"CMakeLists.txt").write("find_package(KF6Config REQUIRED)") system "cmake", ".", "-Wno-dev" end end diff --git a/utils/github/homebrew/Formula/kf6-knotifications.rb b/utils/github/homebrew/Formula/kf6-knotifications.rb new file mode 100644 index 0000000000..52e6345c33 --- /dev/null +++ b/utils/github/homebrew/Formula/kf6-knotifications.rb @@ -0,0 +1,38 @@ +class Kf6Knotifications < Formula + desc "Abstraction for system notifications" + homepage "https://www.kde.org" + url "https://download.kde.org/unstable/frameworks/5.249.0/knotifications-5.249.0.tar.xz" + sha256 "66b945919d0b9a8354be229969c7af20a01f27b0739fa1093f99ffe5e27f4a81" + head "https://invent.kde.org/frameworks/knotifications.git" + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + + depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] + depends_on "copyq/kde/kf6-kconfig" + depends_on "libcanberra" + + def install + args = std_cmake_args + + args << "-DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0" + + args << "-DBUILD_TESTING=OFF" + args << "-DBUILD_QCH=OFF" + args << "-DKDE_INSTALL_QMLDIR=lib/qt6/qml" + args << "-DKDE_INSTALL_PLUGINDIR=lib/qt6/plugins" + args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" + + mkdir "build" do + system "cmake", "-G", "Ninja", "..", *args + system "ninja" + system "ninja", "install" + prefix.install "install_manifest.txt" + end + end + + test do + (testpath/"CMakeLists.txt").write("find_package(KF6Notifications REQUIRED)") + system "cmake", ".", "-Wno-dev" + end +end diff --git a/utils/github/homebrew/Formula/kf6-kstatusnotifieritem.rb b/utils/github/homebrew/Formula/kf6-kstatusnotifieritem.rb new file mode 100644 index 0000000000..7cbf07e87b --- /dev/null +++ b/utils/github/homebrew/Formula/kf6-kstatusnotifieritem.rb @@ -0,0 +1,38 @@ +class Kf6Kstatusnotifieritem < Formula + desc "Abstraction for status/tray" + homepage "https://www.kde.org" + url "https://download.kde.org/unstable/frameworks/5.249.0/kstatusnotifieritem-5.249.0.tar.xz" + sha256 "b4485d37226758b4b43c4ebd7fe344b65e2408334f778a3deecef71315451f40" + head "https://invent.kde.org/frameworks/kstatusnotifieritem.git" + + depends_on "cmake" => [:build, :test] + depends_on "ninja" => :build + + depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] + depends_on "copyq/kde/kf6-kconfig" + depends_on "copyq/kde/kf6-kwindowsystem" + + def install + args = std_cmake_args + + args << "-DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0" + + args << "-DBUILD_TESTING=OFF" + args << "-DBUILD_QCH=OFF" + args << "-DKDE_INSTALL_QMLDIR=lib/qt6/qml" + args << "-DKDE_INSTALL_PLUGINDIR=lib/qt6/plugins" + args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" + + mkdir "build" do + system "cmake", "-G", "Ninja", "..", *args + system "ninja" + system "ninja", "install" + prefix.install "install_manifest.txt" + end + end + + test do + (testpath/"CMakeLists.txt").write("find_package(KF6Statusnotifieritem REQUIRED)") + system "cmake", ".", "-Wno-dev" + end +end diff --git a/utils/github/homebrew/Formula/kf5-kwindowsystem.rb b/utils/github/homebrew/Formula/kf6-kwindowsystem.rb similarity index 59% rename from utils/github/homebrew/Formula/kf5-kwindowsystem.rb rename to utils/github/homebrew/Formula/kf6-kwindowsystem.rb index db909569c0..a95d14fbd3 100644 --- a/utils/github/homebrew/Formula/kf5-kwindowsystem.rb +++ b/utils/github/homebrew/Formula/kf6-kwindowsystem.rb @@ -1,8 +1,8 @@ -class Kf5Kwindowsystem < Formula +class Kf6Kwindowsystem < Formula desc "Access to the windowing system" homepage "https://www.kde.org" - url "https://download.kde.org/stable/frameworks/5.109/kwindowsystem-5.109.0.tar.xz" - sha256 "088075c9ff367b5b53b6ecdd34dcf8a47a4cf47458ef02fd9d8df3266679c1a2" + url "https://download.kde.org/unstable/frameworks/5.249.0/kwindowsystem-5.249.0.tar.xz" + sha256 "cc5e62380e1ef354a3088ddeb1db93d0e018e47e9ec0869a4b493ab737e81508" head "https://invent.kde.org/frameworks/kwindowsystem.git" depends_on "cmake" => [:build, :test] @@ -10,15 +10,15 @@ class Kf5Kwindowsystem < Formula depends_on "copyq/kde/extra-cmake-modules" => [:build, :test] - depends_on "qt@5" + depends_on "qt" def install args = std_cmake_args args << "-DBUILD_TESTING=OFF" args << "-DBUILD_QCH=OFF" - args << "-DKDE_INSTALL_QMLDIR=lib/qt5/qml" - args << "-DKDE_INSTALL_PLUGINDIR=lib/qt5/plugins" - args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt5/plugins" + args << "-DKDE_INSTALL_QMLDIR=lib/qt6/qml" + args << "-DKDE_INSTALL_PLUGINDIR=lib/qt6/plugins" + args << "-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins" mkdir "build" do system "cmake", "-G", "Ninja", "..", *args @@ -29,7 +29,7 @@ def install end test do - (testpath/"CMakeLists.txt").write("find_package(KF5WindowSystem REQUIRED)") + (testpath/"CMakeLists.txt").write("find_package(KF6WindowSystem REQUIRED)") system "cmake", ".", "-Wno-dev" end end diff --git a/utils/github/install-macos.sh b/utils/github/install-macos.sh index 79e1276a96..42fd7d07db 100755 --- a/utils/github/install-macos.sh +++ b/utils/github/install-macos.sh @@ -23,4 +23,4 @@ rm -rf \ brew tap copyq/kde utils/github/homebrew/ -brew install qt@5 copyq/kde/kf5-knotifications +brew install qt@6 copyq/kde/kf6-knotifications copyq/kde/kf6-kstatusnotifieritem