[vlc-devel] [PATCH 3/4] Add rav1e to contribs
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 21 13:07:54 CEST 2020
On 2020-07-21 11:34, rustyc wrote:
> ---
> contrib/src/main.mak | 6 +++---
> contrib/src/rav1e/SHA512SUMS | 1 +
> contrib/src/rav1e/rules.mak | 23 +++++++++++++++++++++++
> 3 files changed, 27 insertions(+), 3 deletions(-)
> create mode 100644 contrib/src/rav1e/SHA512SUMS
> create mode 100644 contrib/src/rav1e/rules.mak
>
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index c8d7df4202..4d00cfda4d 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -440,10 +440,10 @@ else
> MESON = meson $(MESONFLAGS)
> endif
>
> -ifdef HAVE_WIN32
> -RUST_TARGET = i686-pc-windows-gnu
> -else ifdef HAVE_WIN64
> +ifdef HAVE_WIN64
> RUST_TARGET = x86_64-pc-windows-gnu
> +else ifdef HAVE_WIN32
> +RUST_TARGET = i686-pc-windows-gnu
This should go in patch [2/4].
> else ifdef HAVE_BSD
> RUST_TARGET = x86_64-unknown-freebsd
> else ifdef HAVE_ANDROID
> diff --git a/contrib/src/rav1e/SHA512SUMS b/contrib/src/rav1e/SHA512SUMS
> new file mode 100644
> index 0000000000..73d8e9feb8
> --- /dev/null
> +++ b/contrib/src/rav1e/SHA512SUMS
> @@ -0,0 +1 @@
> +140995820053e4ac8de5f31fcd430e991e47642c34b9433abea618ed6262ec593b777e9334e5f138aa34854e0bdd044d1d2dadc3c917394641193643b4e92e0c rav1e-0.3.2.tar.gz
> diff --git a/contrib/src/rav1e/rules.mak b/contrib/src/rav1e/rules.mak
> new file mode 100644
> index 0000000000..f4515adad8
> --- /dev/null
> +++ b/contrib/src/rav1e/rules.mak
> @@ -0,0 +1,23 @@
> +# rav1e
> +
> +RAV1E_VERSION := 0.3.2
> +RAV1E_URL := https://github.com/xiph/rav1e/archive/v$(RAV1E_VERSION).tar.gz
> +
> +ifeq ($(call need_pkg,"rav1e"),)
> +# PKGS_FOUND += rav1e
> +endif
> +
> +$(TARBALLS)/rav1e-$(RAV1E_VERSION).tar.gz:
> + $(call download_pkg,$(RAV1E_URL),rav1e)
> +
> +.sum-rav1e: rav1e-$(RAV1E_VERSION).tar.gz
> +
> +rav1e: rav1e-$(RAV1E_VERSION).tar.gz .sum-rav1e
> + $(UNPACK)
> + $(MOVE)
> +
> +.rav1e: rav1e
> + cd $< && RUSTFLAGS="-C lto -C panic=abort -C opt-level=z" cargo cinstall \
> + --no-default-features --features asm --prefix=$(PREFIX) \
> + --target=$(RUST_TARGET) --library-type staticlib --release
Should the --release only be set for release builds ?
You should create a CARGO variable in main.mak similar to CMAKE to put
all the common stuff passed to cargo. So it can be reused by other modules.
> + touch $@
> \ No newline at end of file
You should add a new line to make git happy.
> --
> 2.25.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list