- Install homebrew from https://brew.sh/ (follow the instructions there)
- tap the https://invent.kde.org/packaging/homebrew-kde/ repo,
brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git brew edit okular, workaround now is to comment out or delete the linedepends_on "chmlib"(won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first pressito insert/type, when saving then<esc>then:wqthen<enter>.brew install okular, wait for stuff to compile and/or install- It may ask for keychain credentials (to sign the binaries? because of mac arm64 security policy https://eclecticlight.co/2021/01/26/when-you-dont-have-permission-to-run-an-app-on-an-m1-mac/)
$(brew --repo kde-mac/kde)/tools/do-caveats.sh- Now okular is in your
$HOME/Applications/KDEfolder, and will show up in Launchpad! You can view pdf, djvu, etc documents.
Edit: as of 2025 there is now a precompiled nightly binary available for download at https://okular.kde.org/download/, or at https://cdn.kde.org/ci-builds/graphics/okular/master/macos-arm64/. It is unsigned so use sudo xattr -rd com.apple.quarantine /Applications/okular.app to bypass quarantine after install.
/opt/homebrew/lib/cmake//Qt6BuildInternals/StandaloneTests/Qt5CompatTestsConfig.cmakeis what is obtained byfind -L /opt/homebrew/lib/cmake/ -name 'Qt5*.cmake'. It says% cat /opt/homebrew/lib/cmake//Qt6BuildInternals/StandaloneTests/Qt5CompatTestsConfig.cmake# Copyright (C) 2024 The Qt Company Ltd.# SPDX-License-Identifier: BSD-3-Clause# TODO: Ideally this should look for each Qt module separately, with each module's specific version,# bypassing the Qt6 Config file, aka find_package(Qt6SpecificFoo) repated x times. But it's not# critical.find_package(Qt6 6.8.2COMPONENTS Core5Compat).The qt5/6 is as follows:
lrwxr-xr-x 1 sakuraim admin 20 3 20 17:50 qt -> ../Cellar/qt/6.8.2_1lrwxr-xr-x 1 sakuraim admin 24 3 21 04:47 qt5 -> ../Cellar/qt@5/5.15.16_1lrwxr-xr-x 1 sakuraim admin 20 3 20 17:50 qt6 -> ../Cellar/qt/6.8.2_1lrwxr-xr-x 1 sakuraim admin 24 3 21 04:41 qt@5 -> ../Cellar/qt@5/5.15.16_1lrwxr-xr-x 1 sakuraim admin 20 3 20 17:50 qt@6 -> ../Cellar/qt/6.8.2_1by
% ls -la /opt/homebrew/opt/. The qt5 is introduced for2c1970eb750 qt@5: update 5.15.16_1 bottleat/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/q. I guess it is/opt/homebrew/Cellar/qt@5/5.15.16_1since it says% brew uninstall --ignore-dependencies qt@5Uninstalling /opt/homebrew/Cellar/qt@5/5.15.16_1... (10,849 files, 341.7MB)ls says
% ls /opt/homebrew/Cellar/qt@5/5.15.16_1Frameworks docINSTALL_RECEIPT.json includeLICENSE.FDL libLICENSE.GPL3-EXCEPT libexecLICENSE.GPLv2 mkspecsLICENSE.GPLv3 phrasebooksLICENSE.LGPLv21 pluginsLICENSE.LGPLv3 qmlLICENSE.QT-LICENSE-AGREEMENT sbom.spdx.jsonREADME sharebin translationsHope it works.