alsa_lib@1.2.9.bcr.3 (#6064)
diff --git a/modules/alsa_lib/1.2.9.bcr.3/MODULE.bazel b/modules/alsa_lib/1.2.9.bcr.3/MODULE.bazel
new file mode 100644
index 0000000..4710dc3
--- /dev/null
+++ b/modules/alsa_lib/1.2.9.bcr.3/MODULE.bazel
@@ -0,0 +1,12 @@
+"""https://www.alsa-project.org/"""
+
+module(
+ name = "alsa_lib",
+ version = "1.2.9.bcr.3",
+ bazel_compatibility = [">=7.2.1"],
+)
+
+bazel_dep(name = "bazel_skylib", version = "1.8.2")
+bazel_dep(name = "ncurses", version = "6.4.20221231.bcr.9")
+bazel_dep(name = "platforms", version = "1.0.0")
+bazel_dep(name = "rules_cc", version = "0.2.4")
diff --git a/modules/alsa_lib/1.2.9.bcr.3/overlay/BUILD.bazel b/modules/alsa_lib/1.2.9.bcr.3/overlay/BUILD.bazel
new file mode 100644
index 0000000..9629701
--- /dev/null
+++ b/modules/alsa_lib/1.2.9.bcr.3/overlay/BUILD.bazel
@@ -0,0 +1,367 @@
+load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
+load("@bazel_skylib//rules:write_file.bzl", "write_file")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
+write_file(
+ name = "include/config_h",
+ out = "include/config.h",
+ content = ["""\
+/* include/config.h. Generated from config.h.in by configure. */
+/* include/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Directory with aload* device files */
+#define ALOAD_DEVICE_DIRECTORY "/dev/"
+
+/* directory containing ALSA configuration database */
+#define ALSA_CONFIG_DIR "/usr/share/alsa"
+
+/* Enable assert at error message handler */
+/* #undef ALSA_DEBUG_ASSERT */
+
+/* Directory with ALSA device files */
+#define ALSA_DEVICE_DIRECTORY "/dev/snd/"
+
+/* directory containing pkgconfig files */
+#define ALSA_PKGCONF_DIR "/usr/lib/pkgconfig"
+
+/* directory containing ALSA add-on modules */
+#define ALSA_PLUGIN_DIR "/usr/lib/alsa-lib"
+
+/* Build hwdep component */
+#define BUILD_HWDEP "1"
+
+/* Build mixer component */
+#define BUILD_MIXER "1"
+
+/* Build PCM component */
+#define BUILD_PCM "1"
+
+/* Build PCM adpcm plugin */
+#define BUILD_PCM_PLUGIN_ADPCM "1"
+
+/* Build PCM alaw plugin */
+#define BUILD_PCM_PLUGIN_ALAW "1"
+
+/* Build PCM lfloat plugin */
+#define BUILD_PCM_PLUGIN_LFLOAT "1"
+
+/* Build PCM mmap-emul plugin */
+#define BUILD_PCM_PLUGIN_MMAP_EMUL "1"
+
+/* Build PCM mulaw plugin */
+#define BUILD_PCM_PLUGIN_MULAW "1"
+
+/* Build PCM rate plugin */
+#define BUILD_PCM_PLUGIN_RATE "1"
+
+/* Build PCM route plugin */
+#define BUILD_PCM_PLUGIN_ROUTE "1"
+
+/* Build raw MIDI component */
+#define BUILD_RAWMIDI "1"
+
+/* Build sequencer component */
+#define BUILD_SEQ "1"
+
+/* Build DSP Topology component */
+#define BUILD_TOPOLOGY "1"
+
+/* Build UCM component */
+#define BUILD_UCM "1"
+
+/* Have clock gettime */
+#define HAVE_CLOCK_GETTIME 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `eaccess' function. */
+#define HAVE_EACCESS 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define HAVE_ENDIAN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Have LFS */
+#define HAVE_LFS 1
+
+/* Have libdl */
+#define HAVE_LIBDL 1
+
+/* Have libpthread */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the `resmgr' library (-lresmgr). */
+/* #undef HAVE_LIBRESMGR */
+
+/* Have librt */
+#define HAVE_LIBRT 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* MMX technology is enabled */
+/* #undef HAVE_MMX */
+
+/* Define if your pthreads implementation have PTHREAD_MUTEX_RECURSIVE */
+#define HAVE_PTHREAD_MUTEX_RECURSIVE /**/
+
+/* Avoid calculation in float */
+/* #undef HAVE_SOFT_FLOAT */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+/* #undef HAVE_SYS_ENDIAN_H */
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#define HAVE_SYS_SHM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `uselocale' function. */
+#define HAVE_USELOCALE 1
+
+/* Enable use of wordexp */
+/* #undef HAVE_WORDEXP */
+
+/* Define to 1 if compiler supports __thread */
+#define HAVE___THREAD 1
+
+/* Lockless dmix as default */
+/* #undef LOCKLESS_DMIX_DEFAULT */
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* No assert debug */
+/* #undef NDEBUG */
+
+/* Name of package */
+#define PACKAGE "alsa-lib"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "alsa-lib"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "alsa-lib 1.2.9"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "alsa-lib"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.2.9"
+
+/* Max number of cards */
+#define SND_MAX_CARDS 32
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Support /dev/aload* access for auto-loading */
+#define SUPPORT_ALOAD "1"
+
+/* Support resmgr with alsa-lib */
+/* #undef SUPPORT_RESMGR */
+
+/* Disable thread-safe API functions */
+#define THREAD_SAFE_API "1"
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* directory to put tmp socket files */
+#define TMPDIR "/tmp"
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* sound library version string */
+#define VERSION "1.2.9"
+
+/* compiled with versioned symbols */
+#define VERSIONED_SYMBOLS /**/
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Toolchain Symbol Prefix */
+#define __SYMBOL_PREFIX ""
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+"""],
+ newline = "unix",
+)
+
+INCLUDE = [
+ "include/config.h",
+] + glob([
+ "include/*.h",
+ "include/sound/**/*.h",
+])
+
+ALSA_INCLUDE = {
+ src: "include/alsa/{}".format(src[len("include/"):])
+ for src in INCLUDE
+}
+
+# To avoid cyclic includes, the `alsa` directory is simply generated by the
+# contents of `include` ignoring that symlink.
+[
+ copy_file(
+ name = "{}_h".format(out[:-len(".h")]),
+ src = src,
+ out = out,
+ )
+ for src, out in ALSA_INCLUDE.items()
+]
+
+write_file(
+ name = "src/control/ctl_symbols_list_c",
+ out = "src/control/ctl_symbols_list.c",
+ content = ["""\
+&_snd_module_control_remap,
+&_snd_module_control_shm,
+&_snd_module_control_ext,
+"""],
+ newline = "unix",
+)
+
+write_file(
+ name = "src/pcm/pcm_symbols_list_c",
+ out = "src/pcm/pcm_symbols_list.c",
+ content = ["""\
+&_snd_module_pcm_copy,
+&_snd_module_pcm_linear,
+&_snd_module_pcm_route,
+&_snd_module_pcm_mulaw,
+&_snd_module_pcm_alaw,
+&_snd_module_pcm_adpcm,
+&_snd_module_pcm_rate,
+&_snd_module_pcm_plug,
+&_snd_module_pcm_multi,
+&_snd_module_pcm_shm,
+&_snd_module_pcm_file,
+&_snd_module_pcm_null,
+&_snd_module_pcm_empty,
+&_snd_module_pcm_share,
+&_snd_module_pcm_meter,
+&_snd_module_pcm_hooks,
+&_snd_module_pcm_lfloat,
+&_snd_module_pcm_ladspa,
+&_snd_module_pcm_dmix,
+&_snd_module_pcm_dshare,
+&_snd_module_pcm_dsnoop,
+&_snd_module_pcm_asym,
+&_snd_module_pcm_iec958,
+&_snd_module_pcm_softvol,
+&_snd_module_pcm_extplug,
+&_snd_module_pcm_ioplug,
+&_snd_module_pcm_mmap_emul,
+"""],
+ newline = "unix",
+)
+
+TEXTUAL_SRC_HDRS = [
+ "src/pcm/pcm_dmix_i386.c",
+ "src/pcm/pcm_dmix_x86_64.c",
+ "src/control/ctl_symbols_list.c",
+ "src/alisp/alisp_snd.c",
+ "src/pcm/pcm_dmix_generic.c",
+ "src/pcm/pcm_symbols_list.c",
+]
+
+cc_library(
+ name = "asound",
+ srcs = glob(
+ include = [
+ "src/**/*.c",
+ ],
+ exclude = TEXTUAL_SRC_HDRS,
+ ),
+ hdrs = INCLUDE + ALSA_INCLUDE.values(),
+ copts = [
+ "-w",
+ ],
+ includes = [
+ "include",
+ "src",
+ "src/alisp",
+ "src/control",
+ "src/pcm",
+ ],
+ textual_hdrs = TEXTUAL_SRC_HDRS + glob([
+ "src/**/*.h",
+ ]),
+ visibility = ["//visibility:public"],
+ deps = [
+ "@ncurses",
+ ],
+)
+
+alias(
+ name = "alsa_lib",
+ actual = ":asound",
+ visibility = ["//visibility:public"],
+)
diff --git a/modules/alsa_lib/1.2.9.bcr.3/overlay/MODULE.bazel b/modules/alsa_lib/1.2.9.bcr.3/overlay/MODULE.bazel
new file mode 120000
index 0000000..9b599e3
--- /dev/null
+++ b/modules/alsa_lib/1.2.9.bcr.3/overlay/MODULE.bazel
@@ -0,0 +1 @@
+../MODULE.bazel
\ No newline at end of file
diff --git a/modules/alsa_lib/1.2.9.bcr.3/presubmit.yml b/modules/alsa_lib/1.2.9.bcr.3/presubmit.yml
new file mode 100644
index 0000000..a330522
--- /dev/null
+++ b/modules/alsa_lib/1.2.9.bcr.3/presubmit.yml
@@ -0,0 +1,10 @@
+matrix:
+ platform: ["debian10", "ubuntu2004", "ubuntu2004_arm64"]
+ bazel: ["7.x", "8.x"]
+tasks:
+ verify_targets:
+ name: Verify build targets
+ platform: ${{ platform }}
+ bazel: ${{ bazel }}
+ build_targets:
+ - '@alsa_lib//:asound'
diff --git a/modules/alsa_lib/1.2.9.bcr.3/source.json b/modules/alsa_lib/1.2.9.bcr.3/source.json
new file mode 100644
index 0000000..fad8113
--- /dev/null
+++ b/modules/alsa_lib/1.2.9.bcr.3/source.json
@@ -0,0 +1,9 @@
+{
+ "url": "https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.9.tar.bz2",
+ "strip_prefix": "alsa-lib-1.2.9",
+ "integrity": "sha256-3JxkP9xMz9BXLMaFhY3UHgivtYPzBGCzF+QYgnX2FbI=",
+ "overlay": {
+ "BUILD.bazel": "sha256-n3K9ugfXkJeRegNT3p7UUkYD+kC0jrQUPk9KAIBAzNA=",
+ "MODULE.bazel": "sha256-46reS2en9Qr8P+53TW1xv2UXOdCUmpkvwIL4pu4mY0g="
+ }
+}
diff --git a/modules/alsa_lib/metadata.json b/modules/alsa_lib/metadata.json
index d555d4a..7ba5351 100644
--- a/modules/alsa_lib/metadata.json
+++ b/modules/alsa_lib/metadata.json
@@ -14,7 +14,8 @@
"versions": [
"1.2.9",
"1.2.9.bcr.1",
- "1.2.9.bcr.2"
+ "1.2.9.bcr.2",
+ "1.2.9.bcr.3"
],
"yanked_versions": {}
}