| 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/gstreamer/gstreamer@1.24.11?repository_url=https%3A%2F%2Fgitlab.freedesktop.org", | |
| ) | |
| license_kind( | |
| name = "license_kind", | |
| full_name = "GStreamer Composite License", | |
| identifier = " AND ".join([ | |
| "Apache-2.0", | |
| "BSD-2-Clause", | |
| "BSD-3-Clause", | |
| "BSL-1.0", | |
| "DOC", | |
| "HPND", | |
| "ISC", | |
| "LGPL-2.0", | |
| "LGPL-2.1", | |
| "MIT", | |
| "MIT-Festival", | |
| "MPL-1.1", | |
| "MPL-2.0", | |
| ]), | |
| ) | |
| license( | |
| name = "license", | |
| kind = ":license_kind", | |
| text = ":LICENSE.txt", | |
| ) | |
| mirror_url( | |
| name = "mirror_url", | |
| url = "https://third-party-mirror.googlesource.com/gstreamer", | |
| ) | |
| concat_package_licenses( | |
| name = "concat_licenses", | |
| ) | |
| write_source_file( | |
| name = "write_license", | |
| in_file = ":concat_licenses", | |
| out_file = "LICENSE.txt", | |
| ) | |
| filegroup( | |
| name = "all_srcs", | |
| srcs = glob(["**"]), | |
| ) | |
| meson( | |
| name = "gstreamer", | |
| build_data = [ | |
| "@flex//:flex_exe", | |
| "@bison//:bison_exe", | |
| "@bison//:bison_share", | |
| "@m4//:m4_exe", | |
| "//third_party/glib:gen_dir", | |
| "//third_party/zlib:zlib_pc", | |
| ], | |
| env = { | |
| "M4": "$(execpath @m4//:m4_exe)", | |
| "PATH": ":".join([ | |
| "$(execpath //third_party/glib:gen_dir)/bin", | |
| "$$(dirname $(execpath @flex//:flex_exe))", | |
| "$$(dirname $(execpath @bison//:bison_exe))", | |
| "$$PATH", | |
| ]), | |
| "BISON_PKGDATADIR": "$$EXT_BUILD_ROOT$$/$(execpath @bison//:bison_share)/bison", | |
| "PKG_CONFIG_PATH": "$$(dirname $(execpath //third_party/zlib:zlib_pc))", | |
| }, | |
| lib_source = ":all_srcs", | |
| options = { | |
| "devtools": "disabled", | |
| "ges": "disabled", | |
| "introspection": "disabled", | |
| "tests": "disabled", | |
| "examples": "disabled", | |
| "nls": "disabled", | |
| # Keep the host python from leaking gi/overrides/GES.py into the | |
| # rootfs. | |
| "python": "disabled", | |
| "gstreamer:introspection": "disabled", | |
| "gstreamer:tests": "disabled", | |
| "gstreamer:examples": "disabled", | |
| "gstreamer:nls": "disabled", | |
| "gstreamer:check": "disabled", | |
| "gstreamer:benchmarks": "disabled", | |
| "gstreamer:libunwind": "disabled", | |
| "gstreamer:libdw": "disabled", | |
| "gst-plugins-bad:androidmedia": "disabled", | |
| "gst-plugins-bad:examples": "disabled", | |
| "gst-plugins-bad:mpegpsmux": "disabled", | |
| "gst-plugins-bad:rtmp": "disabled", | |
| "gst-plugins-bad:shm": "disabled", | |
| "gst-plugins-bad:tests": "disabled", | |
| "gst-plugins-bad:v4l2codecs": "disabled", | |
| "gst-plugins-bad:zbar": "disabled", | |
| "gst-plugins-bad:webp": "disabled", | |
| "gst-plugins-bad:vulkan": "disabled", | |
| # Do not use libnettle to avoid complication in license. | |
| "gst-plugins-bad:hls-crypto": "openssl", | |
| "gst-plugins-base:introspection": "disabled", | |
| "gst-plugins-base:tests": "disabled", | |
| "gst-plugins-base:examples": "disabled", | |
| "gst-plugins-base:pango": "disabled", | |
| "gst-plugins-base:tools": "disabled", | |
| "gst-plugins-base:glib-asserts": "disabled", | |
| "gst-plugins-base:glib-checks": "disabled", | |
| "gst-plugins-good:cairo": "disabled", | |
| "gst-plugins-good:examples": "disabled", | |
| "gst-plugins-good:gdk-pixbuf": "disabled", | |
| # Do not use libnettle to avoid complication in license. | |
| "gst-plugins-good:hls-crypto": "openssl", | |
| "gst-plugins-good:oss": "disabled", | |
| "gst-plugins-good:oss4": "disabled", | |
| "gst-plugins-good:tests": "disabled", | |
| "gst-plugins-good:v4l2": "disabled", | |
| "gst-plugins-good:aalib": "disabled", | |
| "gst-plugins-ugly:tests": "disabled", | |
| "gst-libav:doc": "disabled", | |
| "gst-libav:tests": "disabled", | |
| "base": "enabled", | |
| "good": "enabled", | |
| "bad": "enabled", | |
| "ugly": "enabled", | |
| "libav": "enabled", | |
| }, | |
| out_data_dirs = [ | |
| "lib/pkgconfig", | |
| "lib/gstreamer-1.0", | |
| ], | |
| out_shared_libs = [ | |
| # Core | |
| "libgstreamer-1.0.so", | |
| "libgstbase-1.0.so", | |
| "libgstnet-1.0.so", | |
| "libgstcontroller-1.0.so", | |
| # plugins-base | |
| "libgstallocators-1.0.so", | |
| "libgstapp-1.0.so", | |
| "libgstaudio-1.0.so", | |
| "libgstfft-1.0.so", | |
| "libgstgl-1.0.so", | |
| "libgstpbutils-1.0.so", | |
| "libgstriff-1.0.so", | |
| "libgstrtp-1.0.so", | |
| "libgstrtsp-1.0.so", | |
| "libgstsdp-1.0.so", | |
| "libgsttag-1.0.so", | |
| "libgstvideo-1.0.so", | |
| ], | |
| resource_size = "enormous", | |
| target_args = {"setup": ["--wrap-mode=nodownload"]}, | |
| visibility = ["//visibility:public"], | |
| # Do not depend on libnettle to avoid complication in license. | |
| deps = [ | |
| "//third_party/ffmpeg", | |
| "//third_party/gettext-tiny:intl", | |
| "//third_party/glib", | |
| "//third_party/graphene", | |
| "//third_party/libX11", | |
| "//third_party/libdrm", | |
| "//third_party/libpng", | |
| "//third_party/libsndfile", | |
| "//third_party/openssl", | |
| "//third_party/opus", | |
| "//third_party/zlib", | |
| ], | |
| ) |