Add Brewfile and local formula for KDSingleApplication-qt6

This commit introduces a Brewfile for managing dependencies required by the Strawberry Music Player on macOS, including build tools and runtime dependencies. Additionally, a local Homebrew formula for KDSingleApplication-qt6 is added to facilitate its installation, as it is not consistently available in Homebrew core. A README is also included to guide users on installation and usage.
This commit is contained in:
2026-01-22 13:51:14 +09:00
parent 1994c367c9
commit 40fadd640f
3 changed files with 121 additions and 0 deletions

45
Brewfile Normal file
View File

@@ -0,0 +1,45 @@
# Strawberry Music Player (macOS) - Homebrew Bundle
#
# Usage:
# brew bundle --file Brewfile
#
# Notes:
# - This is intended for macOS (Apple Silicon or Intel).
# - Some Strawberry features are optional and will auto-disable if deps are missing.
# Build tooling
brew "cmake"
brew "pkg-config"
brew "ninja"
# Core runtime/build dependencies (required by CMakeLists.txt)
brew "qt" # Qt 6 (Core/Gui/Widgets/Network/Sql/Concurrent)
brew "boost"
brew "icu4c"
brew "glib" # provides glib-2.0 + gobject-2.0 (via pkg-config)
brew "glib-networking" # TLS + GIO modules (helps macOS bundling via dist/macos/macgstcopy.sh)
brew "glib-openssl" # alternative TLS backend for GIO
brew "sqlite"
brew "taglib"
brew "gstreamer"
# Strawberry requires KDAB's KDSingleApplication (CMake package name: KDSingleApplication-qt6).
# Homebrew core doesn't consistently provide it, so this repo includes a local formula.
# Homebrew requires formulae to be installed from a tap; `brew bundle` will tap *this repo*
# using the current working directory (run `brew bundle` from the repo root).
tap "strawberry/local", "file://#{Dir.pwd}"
brew "strawberry/local/kdsingleapplication-qt6"
# Recommended GStreamer plugin sets for broad codec support (matches README guidance)
brew "gst-plugins-base"
brew "gst-plugins-good"
brew "gst-plugins-bad"
brew "gst-plugins-ugly"
brew "gst-libav"
# Helpful for Strawberry's macOS "deploy" target (GStreamer dynamically loads libsoup)
brew "libsoup"
# Optional: enable building the CMake "dmg" target (cmake/Dmg.cmake)
brew "create-dmg"

View File

@@ -0,0 +1,51 @@
class KdsingleapplicationQt6 < Formula
desc "Helper class for single-instance Qt applications (Qt 6 build)"
homepage "https://github.com/KDAB/KDSingleApplication"
url "https://github.com/KDAB/KDSingleApplication/archive/refs/tags/v1.1.0.tar.gz"
sha256 "1f19124c0aa5c6fffee3da174f7d2e091fab6dca1e123da70bb0fe615bfbe3e8"
license "MIT"
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "qt"
def install
args = std_cmake_args + %W[
-GNinja
-DKDSingleApplication_QT6=ON
-DKDSingleApplication_TESTS=OFF
-DKDSingleApplication_EXAMPLES=OFF
-DKDSingleApplication_DOCS=OFF
-DKDSingleApplication_DEVELOPER_MODE=OFF
-DKDSingleApplication_STATIC=OFF
]
system "cmake", "-S", ".", "-B", "build", *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
test do
# Verify CMake package is usable via find_package(KDSingleApplication-qt6 CONFIG REQUIRED)
(testpath/"CMakeLists.txt").write <<~CMAKE
cmake_minimum_required(VERSION 3.16)
project(kdsa_test LANGUAGES CXX)
find_package(KDSingleApplication-qt6 CONFIG REQUIRED)
add_executable(test_kdsa main.cpp)
target_link_libraries(test_kdsa PRIVATE KDAB::kdsingleapplication)
CMAKE
(testpath/"main.cpp").write <<~CPP
#include <QCoreApplication>
int main(int argc, char** argv) {
QCoreApplication app(argc, argv);
return 0;
}
CPP
system "cmake", "-S", ".", "-B", "build",
"-DCMAKE_PREFIX_PATH=#{opt_prefix}"
system "cmake", "--build", "build"
end
end

View File

@@ -0,0 +1,25 @@
# kdsingleapplication-qt6 (local Homebrew formula)
This directory exists to keep any supporting files for the local Homebrew formula
next to it (e.g. patches or notes).
## Install (from this Strawberry repo)
From the repo root:
```bash
brew tap strawberry/local "file://$PWD"
brew install strawberry/local/kdsingleapplication-qt6
```
## Why it exists
Strawberrys build requires the CMake package `KDSingleApplication-qt6`, but it is
not consistently available via Homebrew core. Shipping a local formula makes the
dependency easy to install for anyone building this repo on macOS.
## Note for local development
Homebrew taps are Git clones, so the formula must be committed (or pushed to a remote)
to be visible to `brew tap`.