-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request xbmc#22546 from quietvoid/libdovi
[depends][Android] Add base dependencies setup for libdovi
- Loading branch information
Showing
17 changed files
with
312 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# FindDovi | ||
# ------- | ||
# Finds the libdovi library | ||
# | ||
# This will define the following variables:: | ||
# | ||
# LIBDOVI_FOUND - system has libdovi | ||
# LIBDOVI_INCLUDE_DIRS - the libdovi include directories | ||
# LIBDOVI_LIBRARIES - the libdovi libraries | ||
# LIBDOVI_DEFINITIONS - the libdovi compile definitions | ||
|
||
if(PKG_CONFIG_FOUND) | ||
pkg_check_modules(PC_LIBDOVI libdovi QUIET) | ||
endif() | ||
|
||
find_library(LIBDOVI_LIBRARY NAMES dovi libdovi | ||
PATHS ${PC_LIBDOVI_LIBDIR} | ||
) | ||
find_path(LIBDOVI_INCLUDE_DIR NAMES libdovi/rpu_parser.h | ||
PATHS ${PC_LIBDOVI_INCLUDEDIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(LibDovi | ||
REQUIRED_VARS LIBDOVI_LIBRARY LIBDOVI_INCLUDE_DIR) | ||
|
||
if(LIBDOVI_FOUND) | ||
set(LIBDOVI_INCLUDE_DIRS ${LIBDOVI_INCLUDE_DIR}) | ||
set(LIBDOVI_LIBRARIES ${LIBDOVI_LIBRARY}) | ||
set(LIBDOVI_DEFINITIONS -DHAVE_LIBDOVI=1) | ||
endif() | ||
|
||
mark_as_advanced(LIBDOVI_INCLUDE_DIR LIBDOVI_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APPNAME=cargo-c | ||
VERSION=0.9.21 | ||
SOURCE=$(APPNAME)-$(VERSION) | ||
ARCHIVE=$(SOURCE).tar.gz | ||
SHA512=855391c29843f8e5f204f889cab16d5d569ebb2174367a8be0d4be3d87141133f98fb7a6750ed0030783a1ff29f358d60c6ca79ed5bb65f61196c726f9c1a0ec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
include ../../Makefile.include CARGO-C-VERSION ../../download-files.include | ||
DEPS = ../../Makefile.include Makefile CARGO-C-VERSION ../../download-files.include | ||
|
||
PREFIX=$(NATIVEPREFIX) | ||
PLATFORM=$(NATIVEPLATFORM) | ||
|
||
export PKG_CONFIG_PATH=$(PREFIX)/lib/pkgconfig | ||
|
||
APP=$(PLATFORM)/target/release/$(APPNAME) | ||
|
||
CARGO_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \ | ||
CARGO_HOME=$(PREFIX)/.cargo | ||
CARGO = $(CARGO_ENV_VARS) $(PREFIX)/bin/cargo | ||
|
||
CLEANUP_CMD = [ -e $(PREFIX)/bin/cargo ] \ | ||
&& $(CARGO) uninstall cargo-c || true | ||
|
||
all: .installed-$(PLATFORM) | ||
|
||
$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) | ||
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) | ||
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) | ||
|
||
$(APP): $(PLATFORM) | ||
$(CARGO) build --release --manifest-path $(PLATFORM)/Cargo.toml | ||
|
||
.installed-$(PLATFORM): $(APP) | ||
$(CARGO) install --profile release --path $(PLATFORM) | ||
|
||
touch $@ | ||
|
||
clean: | ||
$(CLEANUP_CMD) | ||
rm -f .installed-$(PLATFORM) | ||
|
||
distclean:: | ||
$(CLEANUP_CMD) | ||
rm -rf $(PLATFORM) .installed-$(PLATFORM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
include ../../Makefile.include RUSTUP-VERSION ../../download-files.include | ||
DEPS = ../../Makefile.include Makefile RUSTUP-VERSION ../../download-files.include | ||
|
||
PREFIX=$(NATIVEPREFIX) | ||
PLATFORM=$(NATIVEPLATFORM) | ||
|
||
APP=$(PLATFORM)/bin/$(APPNAME) | ||
|
||
export RUSTUP_HOME=$(PREFIX)/.rustup | ||
export CARGO_HOME=$(PREFIX)/.cargo | ||
|
||
RUST_TOOLCHAIN_VERSION=1.71.0 | ||
RUSTUP_ENV_VARS = RUSTUP_HOME=$(PREFIX)/.rustup \ | ||
CARGO_HOME=$(PREFIX)/.cargo | ||
RUSTUP = $(RUSTUP_ENV_VARS) $(PREFIX)/bin/rustup | ||
|
||
CLEANUP_CMD=[ -e $(PREFIX)/bin/rustup ] \ | ||
&& $(RUSTUP) self uninstall -y \ | ||
&& rm -f $(PREFIX)/bin/rustup \ | ||
&& rm -f $(PREFIX)/bin/cargo || true | ||
|
||
all: .installed-$(PLATFORM) | ||
|
||
$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) | ||
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) | ||
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) | ||
|
||
$(APP): $(PLATFORM) | ||
bash $(PLATFORM)/rustup-init.sh -y --no-modify-path \ | ||
--profile minimal \ | ||
--default-toolchain=$(RUST_TOOLCHAIN_VERSION) | ||
|
||
.installed-$(PLATFORM): $(APP) | ||
ln -sf $(CARGO_HOME)/bin/rustup $(PREFIX)/bin/rustup | ||
ln -sf $(CARGO_HOME)/bin/cargo $(PREFIX)/bin/cargo | ||
|
||
$(RUSTUP) default $(RUST_TOOLCHAIN_VERSION) | ||
|
||
ifeq ($(CROSS_COMPILING),yes) | ||
$(RUSTUP) target add $(HOST) | ||
endif | ||
|
||
touch $@ | ||
|
||
clean: | ||
$(CLEANUP_CMD) | ||
rm -f .installed-$(PLATFORM) | ||
|
||
distclean:: | ||
$(CLEANUP_CMD) | ||
rm -rf $(PLATFORM) .installed-$(PLATFORM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
APPNAME=rustup | ||
VERSION=1.26.0 | ||
SOURCE=$(APPNAME)-$(VERSION) | ||
ARCHIVE=$(SOURCE).tar.gz | ||
SHA512=bc7cb580640248a601dbafb87c3a9e908b6c687377b4e0f88280576af15527f5837d9463f7831c14b0c274cd3170449e634cd851e0d03ea4ff1d0461d4a941be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
LIBNAME=libdovi | ||
VERSION=3.1.2 | ||
SOURCE=$(LIBNAME)-$(VERSION) | ||
ARCHIVE=$(SOURCE).tar.gz | ||
SHA512=577d5a5916dedbf222150ddb76219325e0e9a7ae91c5978b1b1fd65048d1f548e29aa8ebbbdc836380ec399e2bc105a722515f783be70837dc6403cb34586bb2 | ||
BYPRODUCT=libdovi.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
include ../../Makefile.include LIBDOVI-VERSION ../../download-files.include | ||
DEPS = ../../Makefile.include Makefile LIBDOVI-VERSION ../../download-files.include | ||
|
||
LIBDYLIB=$(PLATFORM)/target/$(HOST)/release/$(BYPRODUCT) | ||
|
||
CARGO_ENV_VARS = RUSTUP_HOME=$(NATIVEPREFIX)/.rustup \ | ||
CARGO_HOME=$(NATIVEPREFIX)/.cargo | ||
CARGO = $(CARGO_ENV_VARS) $(NATIVEPREFIX)/bin/cargo | ||
|
||
CARGO_BASE_OPTS = --manifest-path $(PLATFORM)/dolby_vision/Cargo.toml | ||
ifeq ($(CROSS_COMPILING),yes) | ||
CARGO_BASE_OPTS += --target $(HOST) | ||
endif | ||
|
||
CARGO_BUILD_OPTS = --offline \ | ||
--frozen \ | ||
--library-type staticlib \ | ||
--profile release \ | ||
--prefix $(PREFIX) \ | ||
$(CARGO_BASE_OPTS) | ||
|
||
all: .installed-$(PLATFORM) | ||
|
||
$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) | ||
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) | ||
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) | ||
cd $(PLATFORM); | ||
$(CARGO) fetch $(CARGO_BASE_OPTS) | ||
|
||
$(LIBDYLIB): $(PLATFORM) | ||
$(CARGO) cbuild $(CARGO_BUILD_OPTS) | ||
|
||
.installed-$(PLATFORM): $(LIBDYLIB) | ||
$(CARGO) cinstall $(CARGO_BUILD_OPTS) | ||
|
||
touch $@ | ||
|
||
clean: | ||
cd $(PLATFORM); $(CARGO) clean | ||
rm -f .installed-$(PLATFORM) | ||
|
||
distclean:: | ||
rm -rf $(PLATFORM) .installed-$(PLATFORM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.