You are not logged in.

#1 2026-07-12 13:31:44

jansalleine
Member
Registered: 2026-03-29
Posts: 4

[SOLVED] How to handle depends that are met by multiple packages

Hi,

I'm trying to figure out how to make a PKGBUILD for my fork of GoatTracker.
ldd output is:

        linux-vdso.so.1 (0x00007f55355bc000)
	libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007f5535515000)
	libjack.so.0 => /usr/lib/libjack.so.0 (0x00007f55354d8000)
	libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f55353df000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f5533e00000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f5533ccd000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f55341d3000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f5533a00000)
	libpipewire-0.3.so.0 => /usr/lib/libpipewire-0.3.so.0 (0x00007f5534103000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f55355be000)

You need Jack2 and ALSA, but it doesn't matter if you use pipewire for everything (like on my system) or pulseaudio + Jack2 or just have plain ALSA and Jack2 installed.
How would this translate into a depends array of the PKGBUILD?
I read something about using SONAME in the Arch Wiki, but didn't really get how to use that.

EDIT:
solution

depends=(
    'sdl2-compat'
    'alsa-lib'
    'jack'
)

Thank you!

Last edited by jansalleine (2026-07-13 09:31:59)

Offline

#2 2026-07-12 14:11:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,958

Re: [SOLVED] How to handle depends that are met by multiple packages

Eg https://archlinux.org/packages/extra/x86_64/jack2/ and https://archlinux.org/packages/extra/x8 … wire-jack/ both provide jack and jack2, so you can just depend on that and allow the user to match that provision as they see fit.

Offline

#3 2026-07-12 15:03:19

jansalleine
Member
Registered: 2026-03-29
Posts: 4

Re: [SOLVED] How to handle depends that are met by multiple packages

seth wrote:

Eg https://archlinux.org/packages/extra/x86_64/jack2/ and https://archlinux.org/packages/extra/x8 … wire-jack/ both provide jack and jack2, so you can just depend on that and allow the user to match that provision as they see fit.

I know. That's the point of my question.
But how do I put that in the depends array? Just add both?

depends=(
    'jack2'
    'pipewire-jack'
)

?!?

Offline

#4 2026-07-12 15:05:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,958

Re: [SOLVED] How to handle depends that are met by multiple packages

Just depending on jack2 will do, pipewire-jack does provide that dependency.

Offline

#5 2026-07-12 16:11:15

jansalleine
Member
Registered: 2026-03-29
Posts: 4

Re: [SOLVED] How to handle depends that are met by multiple packages

Thanks. I got it working.

Offline

#6 2026-07-12 18:45:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,958

Re: [SOLVED] How to handle depends that are met by multiple packages

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#7 2026-07-13 09:29:46

jansalleine
Member
Registered: 2026-03-29
Posts: 4

Re: [SOLVED] How to handle depends that are met by multiple packages

Okay, solution was to just put 'jack' not 'jack2' or 'pipewire-jack' into the dependencies array.

depends=(
    'sdl2-compat'
    'alsa-lib'
    'jack'
)

Offline

#8 2026-07-13 12:22:45

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,242

Re: [SOLVED] How to handle depends that are met by multiple packages

Since jack is an existing aur package, you should verify if your application does work with jack installed.

https://wiki.archlinux.org/title/JACK_A … mentations may also be helphul.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2026-07-13 14:27:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,491
Website

Re: [SOLVED] How to handle depends that are met by multiple packages

It looks to me like you should depend on libjack.so, that provides the most options / flexibility for the user.  Explicitly depending on a package name that only exists in the AUR seems odd to me unless you specifically require that AUR package (though this may be a moot point as jack2 provides jack ... but really libjack.so is what is needed and all of the options provide this).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2026-07-14 14:52:12

tekstryder
Member
Registered: 2013-02-14
Posts: 583

Re: [SOLVED] How to handle depends that are met by multiple packages

Trilby wrote:

It looks to me like you should depend on libjack.so

If you take that route, consider following this packaging guidance.

David Runge wrote:

To not match sonames of a wrong ELF architecture, we need to apply the best practices outlined in the specification's example section on "depending on a soname": https://alpm.archlinux.page/specificati … n-a-soname

Effectively, this usually means to remove the soname dependency from the global `depends` array (it should also not be present in `makedepends` or `optdepends`) and instead add it in an override in the `package` function to the `depends` array, e.g.:

```
package() {
depends+=(example libexample.so)
}
```

Offline

Board footer

Powered by FluxBB