diff options
author | Jakob Linskeseder <jakob.linskeseder@gmail.com> | 2019-11-18 20:46:00 +0100 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2020-03-03 17:03:19 -0800 |
commit | 2998537d5f048245c5bf5089d241edbb259c6d2f (patch) | |
tree | 73980a28048661929f9f7c5b0f11c5feddcbc8d4 /tools/depends | |
parent | 7bb56196e41327a46f7b5781b4b9d59fb71d7100 (diff) |
[cmake] ffmpeg: add support for libdav1d
Diffstat (limited to 'tools/depends')
-rw-r--r-- | tools/depends/native/Makefile | 9 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 7 | ||||
-rw-r--r-- | tools/depends/target/dav1d/DAV1D-VERSION | 3 | ||||
-rw-r--r-- | tools/depends/target/dav1d/Makefile | 56 | ||||
-rw-r--r-- | tools/depends/target/ffmpeg/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tools/depends/target/ffmpeg/Makefile | 1 | ||||
-rwxr-xr-x | tools/depends/target/ffmpeg/autobuild.sh | 1 |
7 files changed, 73 insertions, 13 deletions
diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile index dea6d8be17..4e012d9b22 100644 --- a/tools/depends/native/Makefile +++ b/tools/depends/native/Makefile @@ -10,19 +10,14 @@ NATIVE= m4 gettext heimdal autoconf automake \ pcre swig \ libpng libjpeg-turbo liblzo2 giflib \ setuptools distutilscross JsonSchemaBuilder TexturePacker \ - flatbuffers + flatbuffers \ + meson ninja ifeq ($(OS),darwin_embedded) NATIVE += dpkg xz tar gen_entitlements ldid endif -ifeq ($(OS),linux) - ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),raspberry-pi gbm)) - NATIVE += meson ninja - endif -endif - ifeq ($(TARGET_PLATFORM),wayland) NATIVE += expat wayland-scanner waylandpp-scanner EXPAT = expat diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 835ad6d8e5..840c1a7111 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -15,10 +15,7 @@ DEPENDS = \ taglib libusb libnfs meson-cross-file \ pythonmodule-pil pythonmodule-pycryptodome pythonmodule-setuptools \ libxslt ffmpeg crossguid \ - libdvdread libdvdnav libdvdcss p8-platform flatbuffers - - -FFMPEG_DEPENDS = gnutls + libdvdread libdvdnav libdvdcss p8-platform flatbuffers dav1d ifeq ($(ENABLE_GPLV3),yes) DEPENDS+=samba-gplv3 libcdio-gplv3 @@ -107,7 +104,7 @@ pythonmodule-pycryptodome: $(PYMODULE_DEPS) python3 pythonmodule-setuptools pythonmodule-pil: bzip2 $(PYMODULE_DEPS) $(ZLIB) libjpeg-turbo libpng freetype2 python3 pythonmodule-setuptools pythonmodule-setuptools: $(PYMODULE_DEPS) python3 libxslt: libgcrypt libxml2 -ffmpeg: $(ICONV) $(ZLIB) bzip2 $(FFMPEG_DEPENDS) +ffmpeg: $(ICONV) $(ZLIB) bzip2 gnutls dav1d libcec: p8-platform crossguid: $(LIBUUID) libdvdnav: libdvdread diff --git a/tools/depends/target/dav1d/DAV1D-VERSION b/tools/depends/target/dav1d/DAV1D-VERSION new file mode 100644 index 0000000000..7e40a1e953 --- /dev/null +++ b/tools/depends/target/dav1d/DAV1D-VERSION @@ -0,0 +1,3 @@ +LIBNAME=dav1d +VERSION=0.5.2 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz diff --git a/tools/depends/target/dav1d/Makefile b/tools/depends/target/dav1d/Makefile new file mode 100644 index 0000000000..19808bba21 --- /dev/null +++ b/tools/depends/target/dav1d/Makefile @@ -0,0 +1,56 @@ +include ../../Makefile.include +include DAV1D-VERSION +DEPS = ../../Makefile.include Makefile DAV1D-VERSION + +MESON_BUILD_TYPE=release + +ifeq ($(DEBUG_BUILD), yes) + MESON_BUILD_TYPE=debug +endif + +# configuration settings +CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \ + --buildtype=$(MESON_BUILD_TYPE) \ + --default-library=static \ + -Denable_asm=true \ + -Denable_tools=false \ + -Denable_examples=false \ + -Denable_tests=false + +ifeq ($(CROSS_COMPILING), yes) +CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson +export CC=$(CC_FOR_BUILD) +export CXX=$(CXX_FOR_BUILD) +export CFLAGS=$(CFLAGS_FOR_BUILD) +export CXXFLAGS=$(CXXFLAGS_FOR_BUILD) +else +export CC CXX CFLAGS CXXFLAGS +endif +export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig + +LIBDYLIB=$(PLATFORM)/lib/lib$(LIBNAME).a + +all: .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); rm -rf build; mkdir -p build + cd $(PLATFORM); $(CONFIGURE) . build + +$(LIBDYLIB): $(PLATFORM) + cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v + +.installed-$(PLATFORM): $(LIBDYLIB) + cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v install + touch $@ + +clean: + $(MAKE) -C $(PLATFORM) clean + rm -f .installed-$(PLATFORM) + +distclean: + rm -rf $(PLATFORM) .installed-$(PLATFORM) diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index f3959f9bb7..cc3086e15a 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -86,12 +86,19 @@ if(GNUTLS_FOUND) list(APPEND ffmpeg_conf --enable-gnutls) endif() +if(ENABLE_DAV1D) + list(APPEND ffmpeg_conf --enable-libdav1d) + set(pkgconf_path "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}") +else() + list(APPEND ffmpeg_conf --disable-libdav1d) +endif() + message(STATUS "FFMPEG_CONF: ${ffmpeg_conf}") include(ExternalProject) externalproject_add(ffmpeg SOURCE_DIR ${CMAKE_SOURCE_DIR} - CONFIGURE_COMMAND ${pkgconf} <SOURCE_DIR>/configure + CONFIGURE_COMMAND ${pkgconf} ${pkgconf_path} <SOURCE_DIR>/configure --prefix=${CMAKE_INSTALL_PREFIX} --extra-version="kodi-${FFMPEG_VER}" --disable-devices diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile index d3ce41fe36..848db2cdb1 100644 --- a/tools/depends/target/ffmpeg/Makefile +++ b/tools/depends/target/ffmpeg/Makefile @@ -21,6 +21,7 @@ ffmpg_config += --enable-encoder=ac3 --enable-encoder=aac ffmpg_config += --enable-encoder=wmav2 --enable-protocol=http ffmpg_config += --enable-gnutls ffmpg_config += --enable-encoder=png --enable-encoder=mjpeg +ffmpg_config += --enable-libdav1d ffmpg_config += $(FFMPEG_CONFIGURE_OPTIONS) ifeq ($(CROSS_COMPILING), yes) diff --git a/tools/depends/target/ffmpeg/autobuild.sh b/tools/depends/target/ffmpeg/autobuild.sh index dc990b8ab0..fcbc8fa452 100755 --- a/tools/depends/target/ffmpeg/autobuild.sh +++ b/tools/depends/target/ffmpeg/autobuild.sh @@ -161,6 +161,7 @@ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \ --enable-pthreads \ --enable-pic \ --enable-zlib \ + --enable-libdav1d \ --disable-mipsdsp \ --disable-mipsdspr2 \ ${FLAGS} |