Skip to content

libmakepkg/autodep: add support for optional autodeps

This allows to specify paths for binaries in a new optbinaries=() array in PKGBUILD, which are not essential for the package and their dependencies can be considered optional. If a libdepend is needed only by optional binaries, then it's added to opdepends with a cumulated comment.

E.g. adding the followings to the PKGBUILD of libcanberra:

optbinaries=('usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so: GTK2 module'
             'usr/lib/libcanberra-gtk3.so.0.1.9'
             'usr/bin/canberra-gtk-play: canberra-gtk-play'
             'usr/lib/gtk-3.0/modules/libcanberra-gtk3-module.so: GTK3 module'
             'usr/lib/libcanberra-gtk.so.0.1.9')

Will procedures the following .PKGINFO during the build:

depend = lib:libltdl.so.7
depend = lib:libc.so.6
depend = lib:libvorbisfile.so.3
depend = lib:libudev.so.1
depend = lib:libasound.so.2
depend = lib:libtdb.so.1
depend = lib:libpulse.so.0
optdepend = lib:libgdk-3.so.0: GTK3 module
optdepend = lib:libglib-2.0.so.0: GTK2 module; GTK3 module; canberra-gtk-play
optdepend = lib:libgdk-x11-2.0.so.0: GTK2 module
optdepend = lib:libgobject-2.0.so.0: GTK2 module; GTK3 module; canberra-gtk-play
optdepend = lib:libgtk-x11-2.0.so.0: GTK2 module
optdepend = lib:libgtk-3.so.0: GTK3 module; canberra-gtk-play
optdepend = lib:libX11.so.6: GTK2 module; GTK3 module

Merge request reports

Loading