mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-07-29 12:50:10 +00:00
Updated build for libcanberra
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# libcanberra 0.30
|
||||
# source: http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz
|
||||
|
||||
cp -v ../files/config.guess-musl build-aux/config.guess &&
|
||||
cp -v ../files/config.sub-musl build-aux/config.sub &&
|
||||
|
||||
./configure --prefix=/usr --disable-oss --enable-vala $BUILDTRUPLE &&
|
||||
read -p "Compile? " && make -j4 &&
|
||||
read -p "Install? " && sudo -S porg -lD "make docdir=/usr/share/doc/libcanberra-0.30 install"
|
47
build-scripts/libcanberra.build
Normal file
47
build-scripts/libcanberra.build
Normal file
@ -0,0 +1,47 @@
|
||||
#! /bin/bash
|
||||
|
||||
# libcanberra
|
||||
# Source: http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz
|
||||
#
|
||||
# $BUILD = Directory to temporarily install
|
||||
# $PKGS = Directory to store built packages
|
||||
#
|
||||
# DEPS
|
||||
# Required: libvorbis
|
||||
# Recommended: alsa-lib, gstreamer, GTK+3
|
||||
# Optional: GTK+2, Pulseaudio, tdb
|
||||
|
||||
patch -Np1 -i ../patches/libcanberra-lfs/wayland-1.patch &&
|
||||
cp -vf ../files/config.sub-musl build-aux/config.sub &&
|
||||
cp -vf ../files/config.guess-musl build-aux/config.guess &&
|
||||
|
||||
./configure --prefix=/usr --disable-oss $BUILDTRUPLE &&
|
||||
read -p "Compile?" && make -j2 &&
|
||||
|
||||
sudo -S make DESTDIR=$BUILD docdir=/usr/share/doc/libcanberra-0.30 install &&
|
||||
|
||||
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
|
||||
cat > /tmp/slack-desc << "EOF"
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
libcanberra: libcanberra (XDG Sound Theme and Name Spec implementation)
|
||||
libcanberra:
|
||||
libcanberra: libcanberra is an implementation of the XDG Sound Theme and Name
|
||||
libcanberra: Specifications, for generating event sounds on free desktops.
|
||||
libcanberra: It comes with several backends for several audio systems and is
|
||||
libcanberra: designed to be portable.
|
||||
libcanberra:
|
||||
libcanberra: Homepage: http://0pointer.de/lennart/projects/libcanberra/
|
||||
libcanberra:
|
||||
libcanberra:
|
||||
libcanberra:
|
||||
EOF
|
||||
sudo -S mv -v /tmp/slack-desc install/ &&
|
||||
sudo -S makepkg -l y -c n $PKGS/libcanberra-0.30-$(uname -m)-mlfs.txz &&
|
||||
sudo -S rm -rf ${BUILD}/*
|
77
patches/libcanberra-lfs/wayland-1.patch
Normal file
77
patches/libcanberra-lfs/wayland-1.patch
Normal file
@ -0,0 +1,77 @@
|
||||
Submitted by: Xi Ruoyao <xry111 at mengyan1223 dot wang>
|
||||
Date: 2020-09-21
|
||||
Initial Package Version: 0.30
|
||||
Upstream Status: Commited
|
||||
Origin: Upstream Git Repository
|
||||
Description: Fix a bug crashing some applications in Wayland desktops.
|
||||
|
||||
From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Meeks <michael.meeks@suse.com>
|
||||
Date: Fri, 9 Nov 2012 16:16:40 +0000
|
||||
Subject: gtk: Don't assume all GdkDisplays are GdkX11Displays:
|
||||
broadway/wayland
|
||||
|
||||
---
|
||||
src/canberra-gtk-module.c | 15 +++++++++++++++
|
||||
src/canberra-gtk.c | 5 +++++
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
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 v1.2.1
|
||||
|
Reference in New Issue
Block a user