diff options
author | John Stebbins <[email protected]> | 2018-05-29 12:50:22 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2018-05-29 14:29:29 -0700 |
commit | e52abd8813732080752eff10e4762e47ddca037c (patch) | |
tree | 9a5ee6381db0b113fe29d72ad12840135086a619 | |
parent | f314b7673fcd0d95a30d10e5f1e5b32bebbad092 (diff) |
contrib: add lzma support
lzma may be used by the ffmpeg tiff decoder which can be used in
matroska files.
-rw-r--r-- | contrib/ffmpeg/module.defs | 3 | ||||
-rw-r--r-- | contrib/xz/module.defs | 15 | ||||
-rw-r--r-- | contrib/xz/module.rules | 2 | ||||
-rw-r--r-- | gtk/configure.ac | 2 | ||||
-rw-r--r-- | libhb/module.defs | 6 | ||||
-rw-r--r-- | make/configure.py | 14 | ||||
-rw-r--r-- | make/include/contrib.defs | 2 | ||||
-rw-r--r-- | make/include/main.defs | 3 | ||||
-rw-r--r-- | test/module.defs | 2 |
9 files changed, 45 insertions, 4 deletions
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 173bc3459..d671dbe81 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -1,4 +1,4 @@ -__deps__ := YASM FDKAAC LIBVPX LAME LIBOPUS LIBSPEEX +__deps__ := YASM FDKAAC LIBVPX LAME LIBOPUS LIBSPEEX XZ ifeq (1,$(FEATURE.qsv)) __deps__ += LIBMFX endif @@ -63,6 +63,7 @@ FFMPEG.CONFIGURE.extra = \ --disable-decoder=wmv3_crystalhd \ --disable-bzlib \ --disable-zlib \ + --enable-lzma \ --cc="$(FFMPEG.GCC.gcc)" \ --extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)" diff --git a/contrib/xz/module.defs b/contrib/xz/module.defs new file mode 100644 index 000000000..eeeb286c4 --- /dev/null +++ b/contrib/xz/module.defs @@ -0,0 +1,15 @@ +$(eval $(call import.MODULE.defs,XZ,xz)) +$(eval $(call import.CONTRIB.defs,XZ)) + +XZ.FETCH.url = https://download.handbrake.fr/handbrake/contrib/xz-5.2.4.tar.bz2 +XZ.FETCH.url += https://tukaani.org/xz/xz-5.2.4.tar.bz2 +XZ.FETCH.sha256 = 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf + +XZ.CONFIGURE.extra = \ + --disable-xz \ + --disable-xzdec \ + --disable-lzmadec \ + --disable-lzmainfo \ + --disable-scripts \ + --disable-doc + diff --git a/contrib/xz/module.rules b/contrib/xz/module.rules new file mode 100644 index 000000000..af55a9033 --- /dev/null +++ b/contrib/xz/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,XZ)) +$(eval $(call import.CONTRIB.rules,XZ)) diff --git a/gtk/configure.ac b/gtk/configure.ac index e287bfdcc..3d4cd4879 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -177,7 +177,7 @@ PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES]) GHB_CFLAGS="$HBINC $GHB_CFLAGS" -HB_LIBS="-lhandbrake -lavresample -lavformat -lavfilter -lavcodec -lavutil -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex" +HB_LIBS="-lhandbrake -lavresample -lavformat -lavfilter -lavcodec -lavutil -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -llzma" case $host in *-*-mingw*) diff --git a/libhb/module.defs b/libhb/module.defs index fae0be2ad..cded5806d 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -185,6 +185,12 @@ else LIBHB.GCC.l += z endif +ifneq ($(HAS.xz),1) +LIBHB.dll.libs += $(CONTRIB.build/)lib/liblzma.a +else + LIBHB.GCC.l += lzma +endif + LIBHB.GCC.args.extra.dylib++ += -Wl,--out-implib,$(LIBHB.lib) LIBHB.GCC.l += bcrypt ws2_32 uuid ole32 ifeq ($(HAS.dlfcn),1) diff --git a/make/configure.py b/make/configure.py index 99c9a5f49..532c9ee1a 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1686,6 +1686,18 @@ int main () libz = LDProbe( 'static zlib', '%s -static' % Tools.gcc.pathname, '-lz', libz_test ) libz.run() + xz_test = """ +#include <stdio.h> +#include <lzma.h> +int main () +{ + lzma_stream_decoder(NULL, 0, 0); + return 0; +} +""" + xz = LDProbe( 'static xz', '%s -static' % Tools.gcc.pathname, '-llzma', xz_test ) + xz.run() + iconv_test = """ #include <stdio.h> #include <iconv.h> @@ -1893,6 +1905,8 @@ int main() doc.add( 'HAS.bz2', 1 ) if not libz.fail: doc.add( 'HAS.libz', 1 ) + if not xz.fail: + doc.add( 'HAS.xz', 1 ) if not iconv.fail: doc.add( 'HAS.iconv', 1 ) if not regex.fail: diff --git a/make/include/contrib.defs b/make/include/contrib.defs index 26c2248da..5223fb45e 100644 --- a/make/include/contrib.defs +++ b/make/include/contrib.defs @@ -118,7 +118,7 @@ define import.CONTRIB.defs $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?c_std ?extra *D)" $(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?cxx_std ?extra *D)" endif - $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" + $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver *D)" $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="-L$$(call fn.ABSOLUTE,$(CONTRIB.build/))lib $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe *D)" $(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig" diff --git a/make/include/main.defs b/make/include/main.defs index 7bbab9bce..b7719ff74 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -102,6 +102,9 @@ ifneq (,$(filter $(BUILD.system),cygwin mingw)) ifneq ($(HAS.iconv),1) MODULES += contrib/libiconv endif +ifneq ($(HAS.xz),1) + MODULES += contrib/xz +endif ifneq ($(HAS.libz),1) MODULES += contrib/zlib endif diff --git a/test/module.defs b/test/module.defs index cc2d048bf..f8c382386 100644 --- a/test/module.defs +++ b/test/module.defs @@ -17,7 +17,7 @@ TEST.GCC.l = \ ass avresample avformat avfilter avcodec avutil swresample postproc mp3lame dvdnav \ dvdread fribidi \ samplerate swscale vpx theoraenc theoradec vorbis vorbisenc ogg x264 \ - bluray freetype xml2 bz2 z jansson harfbuzz opus speex + bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma ifeq (,$(filter $(BUILD.system),darwin cygwin mingw)) TEST.GCC.l += fontconfig |