summaryrefslogtreecommitdiff
path: root/media-libs/libcanberra-gtk3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-05 03:03:37 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-05 03:03:37 +0000
commit564cd64dc5f2727c4df6aeb1bb51327503c84e78 (patch)
tree44f51d1887abfcdb7df61a570c2ffa0d6841d7db /media-libs/libcanberra-gtk3
parent3cc82055be7dba177f4aea15af9f5414b532da7e (diff)
gentoo auto-resync : 05:11:2024 - 03:03:37
Diffstat (limited to 'media-libs/libcanberra-gtk3')
-rw-r--r--media-libs/libcanberra-gtk3/Manifest5
-rw-r--r--media-libs/libcanberra-gtk3/files/libcanberra-0.30-wayland.patch64
-rw-r--r--media-libs/libcanberra-gtk3/files/libcanberra-gtk-module.sh16
-rw-r--r--media-libs/libcanberra-gtk3/libcanberra-gtk3-0.30.ebuild88
-rw-r--r--media-libs/libcanberra-gtk3/metadata.xml12
5 files changed, 185 insertions, 0 deletions
diff --git a/media-libs/libcanberra-gtk3/Manifest b/media-libs/libcanberra-gtk3/Manifest
new file mode 100644
index 000000000000..59fe7787d6e5
--- /dev/null
+++ b/media-libs/libcanberra-gtk3/Manifest
@@ -0,0 +1,5 @@
+AUX libcanberra-0.30-wayland.patch 2382 BLAKE2B bc2be1eb32541c80483538b8e3105f281023cee22a2a0f67c8210b8cfc97273f5323cf31e3b7955e8b944af1a414b30554c9dff7d2de97cb1bcfb13f4cd56baa SHA512 9822e67dea1b541fedb0fa9779cfcb101ba8bd24d9ff238af59920b937cb1f5fbe5854ee5e642ff53e65f8d2d0996f2c46be67a51a211d2e76ae89ae98ec553a
+AUX libcanberra-gtk-module.sh 275 BLAKE2B d7f863f77983d4144035eefc7ce3abb4eb411ecc3aac5f5737b7ce0f44e42cf713b963a17c6a6afdaa95833eedaa510ccd9371056c2c6f0e805febf16c245e36 SHA512 6c945211ad9d461e5bdac209c83e0fc0c714eb194f6d57e4f18db1d904528fe845cd628572d0ab9eb4d53005c00073b376b6d718bcd0cddaeee83dc90042643d
+DIST libcanberra-0.30.tar.xz 318960 BLAKE2B c90c6863738b103c256eeb0907060a0f74b73ef50ac0728d2114aa558a7a1ad7cbae4184860573d3fac0032eba77327a4de94c459b99a81c3dc19da0e98adfda SHA512 f7543582122256826cd01d0f5673e1e58d979941a93906400182305463d6166855cb51f35c56d807a56dc20b7a64f7ce4391368d24990c1b70782a7d0b4429c2
+EBUILD libcanberra-gtk3-0.30.ebuild 2212 BLAKE2B c15369eec11e2e6a8aaa0ebe485995f2876544fef605e42857889bada5b30ec72312a240aaccac5656174b12649476079f996547124c4c8ade5475e2a6bbbaa6 SHA512 9e001687ad7f73dffd7249661c7ca566884ac9c61999b98541d96fe1318bd83cb6d6289d757fe73d93a11c9498f98eb44996ad04995ee343b820a7a36342a953
+MISC metadata.xml 368 BLAKE2B 191cf45377c726b49548737b12f971668c0e735f5226ee54fa9dde31c5575e29c9a5cb9d54bf9bc2f1aff6a565c4c7931928f5b6edb291781477464858edda39 SHA512 d227c9f4b6956e4e6c20004cfc93e54643fb94eaef0da7abc20e0489248747dae47eb7ceb0551c70c7c0cd3c5291b305b0a103fa2769144b6b6484212ed2bca0
diff --git a/media-libs/libcanberra-gtk3/files/libcanberra-0.30-wayland.patch b/media-libs/libcanberra-gtk3/files/libcanberra-0.30-wayland.patch
new file mode 100644
index 000000000000..e51cfe00c0df
--- /dev/null
+++ b/media-libs/libcanberra-gtk3/files/libcanberra-0.30-wayland.patch
@@ -0,0 +1,64 @@
+From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
+From: Michael Meeks <michael.meeks@suse.com>
+Date: Fri, 09 Nov 2012 16:16:40 +0000
+Subject: gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland
+
+---
+diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c
+index 67791f0..c1532ab 100644
+--- a/src/canberra-gtk-module.c
++++ b/src/canberra-gtk-module.c
+@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
+ gboolean ret = FALSE;
+ Atom xembed;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return FALSE;
++#endif
++
+ /* Gnome Panel applets are XEMBED windows. We need to make sure we
+ * ignore them */
+
+diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c
+index 34446f5..08cb668 100644
+--- a/src/canberra-gtk.c
++++ b/src/canberra-gtk.c
+@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+--
+cgit v0.9.2
diff --git a/media-libs/libcanberra-gtk3/files/libcanberra-gtk-module.sh b/media-libs/libcanberra-gtk3/files/libcanberra-gtk-module.sh
new file mode 100644
index 000000000000..63c16af71861
--- /dev/null
+++ b/media-libs/libcanberra-gtk3/files/libcanberra-gtk-module.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# to be sourced
+
+case "$SESSION" in
+ GNOME)
+ # Done by gnome-settings-daemon
+ ;;
+ *)
+ if [ -z "$GTK_MODULES" ] ; then
+ GTK_MODULES="canberra-gtk-module"
+ else
+ GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
+ fi
+ export GTK_MODULES
+ ;;
+esac
diff --git a/media-libs/libcanberra-gtk3/libcanberra-gtk3-0.30.ebuild b/media-libs/libcanberra-gtk3/libcanberra-gtk3-0.30.ebuild
new file mode 100644
index 000000000000..ec20d28ae8db
--- /dev/null
+++ b/media-libs/libcanberra-gtk3/libcanberra-gtk3-0.30.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="libcanberra"
+MY_P="libcanberra-${PV}"
+inherit libtool multilib-minimal
+
+DESCRIPTION="GTK3 bindings for libcanberra, the portable sound event library"
+HOMEPAGE="https://0pointer.de/lennart/projects/libcanberra/"
+SRC_URI="https://0pointer.de/lennart/projects/${MY_PN}/${MY_P}.tar.xz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="gnome"
+
+COMMON_DEPEND="
+ ~media-libs/libcanberra-${PV}[${MULTILIB_USEDEP}]
+ >=dev-libs/glib-2.32:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[X,${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}]
+"
+DEPEND="${COMMON_DEPEND}
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ media-libs/libvorbis[${MULTILIB_USEDEP}]
+"
+RDEPEND="${COMMON_DEPEND}
+ !<media-libs/libcanberra-0.30-r8[gtk3(-)]
+ gnome? (
+ gnome-base/dconf
+ gnome-base/gsettings-desktop-schemas )
+"
+BDEPEND="
+ app-arch/xz-utils
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ # gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland (from 'master')
+ "${FILESDIR}/${MY_P}-wayland.patch"
+)
+
+src_prepare() {
+ default
+ elibtoolize
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --disable-alsa
+ --disable-oss
+ --disable-pulse
+ --disable-gstreamer
+ --disable-gtk
+ --enable-gtk3
+ --disable-tdb
+ --disable-udev
+ --disable-lynx
+ --disable-gtk-doc
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install() {
+ # Disable parallel installation until bug #253862 is solved
+ emake DESTDIR="${D}" -j1 install
+
+ rm "${D}"/usr/include/canberra.h \
+ "${D}"/usr/lib64/libcanberra-0.30/libcanberra-{multi,null}.so \
+ "${D}"/usr/lib64/libcanberra.so{,.0,.0.2.5} \
+ "${D}"/usr/lib64/pkgconfig/libcanberra.pc \
+ "${D}"/usr/share/vala/vapi/libcanberra.vapi \
+ || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ # This is needed for desktops different than GNOME, bug #520550
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/${MY_PN}-gtk-module.sh 40-${MY_PN}-gtk-module
+}
diff --git a/media-libs/libcanberra-gtk3/metadata.xml b/media-libs/libcanberra-gtk3/metadata.xml
new file mode 100644
index 000000000000..1db67d7ed56f
--- /dev/null
+++ b/media-libs/libcanberra-gtk3/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sound@gentoo.org</email>
+ <name>Gentoo Sound project</name>
+ </maintainer>
+</pkgmetadata>