GIR: Add Flatpak application library path to defaults
Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
- commit
- 661c03063af6690ea5f3fa8f9cb0150c0630d504
- author
- Felicitas Pojtinger · · 2025-11-27 05:48 UTC
- committer
- Jeroen Wijenbergh · · 2025-12-01 16:09 UTC
- parent
- eae1610
- signature
- unsigned
1 file · +4 -2
M internal/core/core.go +4 -2
| @@ -29,14 +29,16 @@ func PuregoSafeRegister(fptr interface{}, libs []uintptr, name string) { | |||
| 29 | 29 | // paths to where the shared object files should be located | |
| 30 | 30 | // this is unique per architecture | |
| 31 | 31 | // Debian/Ubuntu has it split into specific arch folder, Fedora is just /usr/lib64 | |
| 32 | + | // Flatpak uses /app/lib for application libraries and runtimes don't vendor `pkg-config` as the fallback | |
| 32 | 33 | // see: | |
| 33 | 34 | // https://fedora.pkgs.org/38/fedora-x86_64/gtk4-4.10.1-1.fc38.x86_64.rpm.html | |
| 34 | 35 | // https://fedora.pkgs.org/38/fedora-aarch64/gtk4-4.10.1-1.fc38.aarch64.rpm.html | |
| 35 | 36 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-amd64/libgtk-4-1_4.10.1+ds-2ubuntu1_amd64.deb.html | |
| 36 | 37 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-arm64/libgtk-4-1_4.10.1+ds-2ubuntu1_arm64.deb.html | |
| 38 | + | // https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html (see --libdir) | |
| 37 | 39 | var paths = map[string][]string{ | |
| 38 | - | "amd64": {"/usr/lib/x86_64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | |
| 39 | - | "arm64": {"/usr/lib/aarch64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | |
| 40 | + | "amd64": {"/app/lib/", "/usr/lib/x86_64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | |
| 41 | + | "arm64": {"/app/lib/", "/usr/lib/aarch64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | |
| 40 | 42 | } | |
| 41 | 43 | ||
| 42 | 44 | // names is a lookup from library names to shared object filenames | |
| @@ -29,14 +29,16 @@ func PuregoSafeRegister(fptr interface{}, libs []uintptr, name string) { | |||||
| 29 | // paths to where the shared object files should be located | 29 | // paths to where the shared object files should be located | ||
| 30 | // this is unique per architecture | 30 | // this is unique per architecture | ||
| 31 | // Debian/Ubuntu has it split into specific arch folder, Fedora is just /usr/lib64 | 31 | // Debian/Ubuntu has it split into specific arch folder, Fedora is just /usr/lib64 | ||
| 32 | + | // Flatpak uses /app/lib for application libraries and runtimes don't vendor `pkg-config` as the fallback | |||
| 32 | // see: | 33 | // see: | ||
| 33 | // https://fedora.pkgs.org/38/fedora-x86_64/gtk4-4.10.1-1.fc38.x86_64.rpm.html | 34 | // https://fedora.pkgs.org/38/fedora-x86_64/gtk4-4.10.1-1.fc38.x86_64.rpm.html | ||
| 34 | // https://fedora.pkgs.org/38/fedora-aarch64/gtk4-4.10.1-1.fc38.aarch64.rpm.html | 35 | // https://fedora.pkgs.org/38/fedora-aarch64/gtk4-4.10.1-1.fc38.aarch64.rpm.html | ||
| 35 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-amd64/libgtk-4-1_4.10.1+ds-2ubuntu1_amd64.deb.html | 36 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-amd64/libgtk-4-1_4.10.1+ds-2ubuntu1_amd64.deb.html | ||
| 36 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-arm64/libgtk-4-1_4.10.1+ds-2ubuntu1_arm64.deb.html | 37 | // https://ubuntu.pkgs.org/23.04/ubuntu-main-arm64/libgtk-4-1_4.10.1+ds-2ubuntu1_arm64.deb.html | ||
| 38 | + | // https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html (see --libdir) | |||
| 37 | var paths = map[string][]string{ | 39 | var paths = map[string][]string{ | ||
| 38 | - | "amd64": {"/usr/lib/x86_64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | 40 | + | "amd64": {"/app/lib/", "/usr/lib/x86_64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, |
| 39 | - | "arm64": {"/usr/lib/aarch64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, | 41 | + | "arm64": {"/app/lib/", "/usr/lib/aarch64-linux-gnu/", "/usr/lib64/", "/usr/lib/"}, |
| 40 | } | 42 | } | ||
| 41 | 43 | ||||
| 42 | // names is a lookup from library names to shared object filenames | 44 | // names is a lookup from library names to shared object filenames | ||