mirror of
https://codeberg.org/armin/gelyk.git
synced 2026-10-11 17:01:53 +02:00
Keep the Linux build free of curl, WebKitGTK and extra X11 packages
JUCE_USE_CURL defaults to 1 on Linux, so juce_core compiled juce_Network_curl.cpp and included <curl/curl.h>. Nothing linked libcurl (NEEDS_CURL was off), but its development headers were still a hard build requirement. Set JUCE_USE_CURL=0 and pin NEEDS_CURL/NEEDS_WEB_BROWSER to FALSE alongside the existing JUCE_WEB_BROWSER=0. X11's Xrandr/Xinerama/Xshm/Xcursor headers are only dlsym()ed at runtime, but live in separate -dev packages on Arch/Artix. Probe each with check_include_file_cxx and define the JUCE_USE_* flags accordingly, so a distro carrying just libX11 still builds. Also check alsa/freetype2/fontconfig up front with a distro-specific hint instead of letting JUCE's raw pkg-config error surface, and expand the README's Linux section to cover all of it.
This commit is contained in:
parent
49eb039050
commit
48f9f7c190
2 changed files with 107 additions and 12 deletions
50
README.md
50
README.md
|
|
@ -138,22 +138,50 @@ make # configure + build
|
|||
make install # copy into ~/Library/Audio/Plug-Ins and codesign
|
||||
```
|
||||
|
||||
### Linux / Artix note (no GTK or WebKitGTK headers required)
|
||||
### Linux / Artix note (no GTK, WebKitGTK, curl or GTK file selector needed)
|
||||
|
||||
The plugin **does not depend on GTK or WebKitGTK developer headers**, so it
|
||||
builds cleanly on minimal/headless-flavored distros such as **Artix** - no
|
||||
`webkit2gtk`, `gtk3`-devel, `libsoup` or `jsc` packages needed.
|
||||
|
||||
This is guaranteed in `CMakeLists.txt`:
|
||||
Gelyk builds on minimal/headless-flavored distros such as **Artix** without any
|
||||
of the usual JUCE baggage: no `webkit2gtk`, `gtk3`, `libsoup`, `jsc`, `libcurl`
|
||||
or file-selector development packages. This is pinned in `CMakeLists.txt`:
|
||||
|
||||
```cmake
|
||||
target_compile_definitions(GelykEQ PRIVATE JUCE_WEB_BROWSER=0)
|
||||
NEEDS_CURL FALSE # juce_add_plugin: never link libcurl
|
||||
NEEDS_WEB_BROWSER FALSE # juce_add_plugin: never link WebKitGTK
|
||||
|
||||
target_compile_definitions(GelykEQ PRIVATE
|
||||
JUCE_WEB_BROWSER=0
|
||||
JUCE_USE_CURL=0
|
||||
)
|
||||
```
|
||||
|
||||
JUCE's Linux `FileChooser` in JUCE 8 no longer links GTK either - it shells out
|
||||
to `zenity`/`kdialog` at runtime, and Gelyk never opens a native file dialog.
|
||||
Disabling `JUCE_WEB_BROWSER` removes the WebKitGTK-backed `WebBrowserComponent`
|
||||
(which Gelyk does not use), eliminating the entire GTK/WebKit include chain.
|
||||
- **`JUCE_WEB_BROWSER=0`** removes `WebBrowserComponent` from the compile, which
|
||||
is the only thing in `juce_gui_extra` that `#include`s `<gtk/gtk.h>`,
|
||||
`<webkit2/webkit2.h>`, `<jsc/jsc.h>` and `<libsoup/soup.h>`.
|
||||
- **`JUCE_USE_CURL=0`** matters just as much. JUCE's Linux default is `1`, which
|
||||
makes `juce_core` `#include <curl/curl.h>` and compile `juce_Network_curl.cpp`.
|
||||
Nothing would *link* libcurl (`NEEDS_CURL` is `FALSE`), but its **headers**
|
||||
would still be a hard requirement. Gelyk never touches `URL`/`WebInputStream`,
|
||||
so nothing is lost.
|
||||
- **File dialogs are not a GTK dependency.** JUCE 8's Linux `FileChooser` shells
|
||||
out to `zenity`/`kdialog` at runtime, and Gelyk never opens a native file
|
||||
dialog anyway.
|
||||
- X11's multi-monitor/DPI extensions (`Xrandr`, `Xinerama`, `Xshm`, `Xcursor`)
|
||||
are `dlsym()`ed at runtime by JUCE, so their headers are treated as optional:
|
||||
`CMakeLists.txt` probes for each and sets `JUCE_USE_XRANDR` / `JUCE_USE_XINERAMA`
|
||||
/ `JUCE_USE_XSHM` / `JUCE_USE_XCURSOR` accordingly. A distro carrying just
|
||||
`libX11` still builds, minus multi-monitor reporting.
|
||||
|
||||
What *is* still required is JUCE's own Linux baseline, checked at configure time
|
||||
with a helpful error instead of a raw pkg-config failure:
|
||||
|
||||
| pkg-config | Arch / Artix | Debian / Ubuntu |
|
||||
|------------|-------------------------|--------------------------------|
|
||||
| `alsa` | `alsa-lib` | `libasound2-dev` |
|
||||
| `freetype2`| `freetype2` | `libfreetype6-dev` |
|
||||
| `fontconfig` | `fontconfig` | `libfontconfig1-dev` |
|
||||
| X11 headers| `libx11` (`libxext` for `Xshm`) | `libx11-dev` (`libxext-dev`) |
|
||||
|
||||
None of them drag in GTK.
|
||||
|
||||
> If you ever do need native file dialogs at runtime (outside Gelyk), install
|
||||
> `zenity` or `kdialog`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue