Skip to content

Commit

Permalink
package/libcanberra: new package
Browse files Browse the repository at this point in the history
This package defines a simple abstract interface for playing event sounds.
It is mainly used by desktop applications such as GDM and GNOME Session.

http://0pointer.de/lennart/projects/libcanberra/

Signed-off-by: Takumi Takahashi <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
takumin authored and tpetazzoni committed Nov 4, 2023
1 parent 3cc1b53 commit a9ceaba
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEVELOPERS
Original file line number Diff line number Diff line change
Expand Up @@ -2837,6 +2837,7 @@ F: package/tl-expected/

N: Takumi Takahashi <[email protected]>
F: package/gsettings-desktop-schemas/
F: package/libcanberra/

N: Tan En De <[email protected]>
F: package/libkcapi/
Expand Down
1 change: 1 addition & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,7 @@ menu "Audio/Sound"
source "package/fdk-aac/Config.in"
source "package/libao/Config.in"
source "package/libbroadvoice/Config.in"
source "package/libcanberra/Config.in"
source "package/libcdaudio/Config.in"
source "package/libcddb/Config.in"
source "package/libcdio/Config.in"
Expand Down
21 changes: 21 additions & 0 deletions package/libcanberra/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
comment "libcanberra needs a toolchain w/ wchar, threads, dynamic library"
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
BR2_STATIC_LIBS

config BR2_PACKAGE_LIBCANBERRA
bool "libcanberra"
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
# We need at least one audio backend
select BR2_PACKAGE_ALSA_LIB if \
!BR2_PACKAGE_PULSEAUDIO && \
!BR2_PACKAGE_GSTREAMER1
# We need libltdl
select BR2_PACKAGE_LIBTOOL
select BR2_PACKAGE_LIBVORBIS
help
libcanberra defines a simple abstract interface for playing
event sounds.

http://0pointer.de/lennart/projects/libcanberra/
3 changes: 3 additions & 0 deletions package/libcanberra/libcanberra.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Locally calculated
sha256 c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72 libcanberra-0.30.tar.xz
sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 LGPL
59 changes: 59 additions & 0 deletions package/libcanberra/libcanberra.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
################################################################################
#
# libcanberra
#
################################################################################

LIBCANBERRA_VERSION = 0.30
LIBCANBERRA_SOURCE = libcanberra-$(LIBCANBERRA_VERSION).tar.xz
LIBCANBERRA_SITE = http://0pointer.de/lennart/projects/libcanberra
LIBCANBERRA_LICENSE = LGPL-2.1+
LIBCANBERRA_LICENSE_FILES = LICENSE
LIBCANBERRA_INSTALL_STAGING = YES

LIBCANBERRA_DEPENDENCIES = host-pkgconf libtool libvorbis
LIBCANBERRA_CONF_OPTS = --disable-oss --disable-null --disable-tdb --disable-lynx

ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
LIBCANBERRA_CONF_OPTS += --enable-udev
LIBCANBERRA_DEPENDENCIES += udev
else
LIBCANBERRA_CONF_OPTS += --disable-udev
endif

ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
LIBCANBERRA_CONF_OPTS += --enable-alsa
LIBCANBERRA_DEPENDENCIES += alsa-lib
else
LIBCANBERRA_CONF_OPTS += --disable-alsa
endif

ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
LIBCANBERRA_CONF_OPTS += --enable-pulse
LIBCANBERRA_DEPENDENCIES += pulseaudio
else
LIBCANBERRA_CONF_OPTS += --disable-pulse
endif

ifeq ($(BR2_PACKAGE_GSTREAMER1),y)
LIBCANBERRA_CONF_OPTS += --enable-gstreamer
LIBCANBERRA_DEPENDENCIES += gstreamer1
else
LIBCANBERRA_CONF_OPTS += --disable-gstreamer
endif

ifeq ($(BR2_PACKAGE_LIBGTK2),y)
LIBCANBERRA_CONF_OPTS += --enable-gtk
LIBCANBERRA_DEPENDENCIES += libgtk2
else
LIBCANBERRA_CONF_OPTS += --disable-gtk
endif

ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
LIBCANBERRA_CONF_OPTS += --enable-gtk3
LIBCANBERRA_DEPENDENCIES += libgtk3
else
LIBCANBERRA_CONF_OPTS += --disable-gtk3
endif

$(eval $(autotools-package))

0 comments on commit a9ceaba

Please sign in to comment.