blob: 3aa3dd927332595a6d272ff9dc8a3ba8b7b6d8d4 [file] [edit]
load("@bazel_lib//lib:write_source_files.bzl", "write_source_file")
load("@package_metadata//licenses/rules:license.bzl", "license")
load("@package_metadata//licenses/rules:license_kind.bzl", "license_kind")
load("@package_metadata//rules:package_metadata.bzl", "package_metadata")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "meson")
load("@stardust_build_package_metadata_mirror_url//:mirror_url.bzl", "mirror_url")
load(":license.bzl", "concat_package_licenses")
package(
default_package_metadata = [":package_metadata"],
)
package_metadata(
name = "package_metadata",
attributes = [
":license",
":mirror_url",
],
purl = "pkg:gitlab/pulseaudio/pulseaudio@v17.0?repository_url=https://gitlab.freedesktop.org",
)
concat_package_licenses(
name = "concat_licenses",
)
write_source_file(
name = "write_license",
in_file = ":concat_licenses",
out_file = "LICENSE.txt",
)
license_kind(
name = "license_kind",
full_name = "PulseAudio Composite License",
identifier = " AND ".join([
"BSD-3-Clause",
"HPND",
"ICU",
"LGPL-2.1",
"LicenseRef-adrian",
"LicenseRef-sun-source",
"MIT",
]),
)
license(
name = "license",
kind = ":license_kind",
text = ":LICENSE.txt",
)
mirror_url(
name = "mirror_url",
url = "https://third-party-mirror.googlesource.com/pulseaudio",
)
filegroup(
name = "all_srcs",
srcs = glob(
["**"],
exclude = ["src/modules/alsa/mixer/samples/**"],
),
)
meson(
name = "pulseaudio",
build_data = [
"@m4//:m4_exe",
],
env = {
"PATH": ":".join([
"$$(dirname $$EXT_BUILD_ROOT$$/$(location @m4//:m4_exe))",
"$$PATH",
]),
},
lib_source = ":all_srcs",
linkopts = [
"-Wl,--undefined-version",
],
options = {
"alsa": "disabled",
"bashcompletiondir": "no",
"database": "simple",
"doxygen": "false",
"glib": "disabled",
"gsettings": "disabled",
"gstreamer": "disabled",
"gtk": "disabled",
"man": "false",
"openssl": "disabled",
"systemd": "disabled",
"tests": "false",
"udev": "disabled",
"x11": "disabled",
"zshcompletiondir": "no",
},
out_shared_libs = ["libpulse.so"],
target_args = {"setup": ["--wrap-mode=nodownload"]},
visibility = ["//visibility:public"],
deps = [
"//third_party/gettext-tiny:intl",
"//third_party/libsndfile",
"//third_party/libtool:libltdl",
],
)