diff options
author | Damiano Galassi <[email protected]> | 2021-01-23 18:56:10 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2021-01-23 19:00:27 +0100 |
commit | 581f60136ad0c68b8849cd0b6f9331cf1283cb5c (patch) | |
tree | 6f744caebd526953e17b6d6418d0d5009234193a | |
parent | 00beb1c9b8decd7c58cafc95cd7a99a707d66a2c (diff) |
contrib: add zimg.
-rw-r--r-- | contrib/ffmpeg/module.defs | 13 | ||||
-rw-r--r-- | contrib/zimg/module.defs | 18 | ||||
-rw-r--r-- | contrib/zimg/module.rules | 2 | ||||
-rw-r--r-- | gtk/configure.ac | 2 | ||||
-rw-r--r-- | libhb/module.defs | 2 | ||||
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | make/include/main.defs | 1 | ||||
-rw-r--r-- | test/module.defs | 2 |
8 files changed, 42 insertions, 6 deletions
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index ebddcf19a..4bee8a574 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -1,4 +1,4 @@ -__deps__ := BZIP2 ZLIB FDKAAC LIBDAV1D LIBVPX LAME LIBOPUS LIBSPEEX XZ +__deps__ := BZIP2 ZLIB FDKAAC LIBDAV1D LIBVPX LAME LIBOPUS LIBSPEEX XZ ZIMG ifeq (1,$(FEATURE.qsv)) __deps__ += LIBMFX endif @@ -34,6 +34,7 @@ FFMPEG.CONFIGURE.extra = \ --disable-avdevice \ --disable-muxers \ --disable-network \ + --enable-libzimg \ --disable-hwaccels \ --disable-vdpau \ --disable-encoders \ @@ -58,7 +59,7 @@ FFMPEG.CONFIGURE.extra = \ --enable-libdav1d \ --enable-decoder=libdav1d \ --cc="$(FFMPEG.GCC.gcc)" \ - --extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)" + --extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib) $(FFMPEG.GCC.args.extra-ldflags)" ifeq (size-aggressive,$(GCC.O)) FFMPEG.CONFIGURE.extra += \ @@ -111,8 +112,14 @@ else ifeq (1-mingw,$(HOST.cross)-$(HOST.system)) --target-os=mingw32 \ --arch=$(HOST.machine) \ --cross-prefix=$(HOST.cross.prefix) \ - --pkg-config=$(PKGCONFIG.exe) + --pkg-config=$(PKGCONFIG.exe) \ + --pkg-config-flags="--static" FFMPEG.GCC.args.extra += -fno-common + FFMPEG.GCC.args.extra-ldflags = -static-libgcc -static-libstdc++ -static +else ifeq (darwin,$(HOST.system)) + FFMPEG.GCC.args.extra-ldflags = -lc++ +else + FFMPEG.CONFIGURE.extra += --extra-libs="-lm -lstdc++" endif ifneq (none,$(FFMPEG.GCC.g)) diff --git a/contrib/zimg/module.defs b/contrib/zimg/module.defs new file mode 100644 index 000000000..7ff1b6d58 --- /dev/null +++ b/contrib/zimg/module.defs @@ -0,0 +1,18 @@ +$(eval $(call import.MODULE.defs,ZIMG,zimg)) +$(eval $(call import.CONTRIB.defs,ZIMG)) + +ZIMG.FETCH.url = https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/zimg-3.0.1.tar.gz +ZIMG.FETCH.url += https://github.com/sekrit-twc/zimg/archive/release-3.0.1.tar.gz +ZIMG.FETCH.sha256 = c50a0922f4adac4efad77427d13520ed89b8366eef0ef2fa379572951afcc73f +ZIMG.EXTRACT.tarbase = zimg-release-3.0.1 + +ZIMG.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache configure; autoreconf -fiv; + +ZIMG.CONFIGURE.extra += --enable-static --disable-shared + +ifeq (darwin,$(HOST.system)) + ifneq ($(HOST.machine),$(BUILD.machine)) + ZIMG.CONFIGURE.args.host = --host=$(HOST.machine:arm64=aarch64)-$(HOST.vendor)-$(HOST.system) + ZIMG.CONFIGURE.args.build = --build=$(BUILD.machine:arm64=aarch64)-$(BUILD.vendor)-$(BUILD.system) + endif +endif diff --git a/contrib/zimg/module.rules b/contrib/zimg/module.rules new file mode 100644 index 000000000..64614686c --- /dev/null +++ b/contrib/zimg/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,ZIMG)) +$(eval $(call import.CONTRIB.rules,ZIMG)) diff --git a/gtk/configure.ac b/gtk/configure.ac index 06435c4fc..d336d8d66 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -199,7 +199,7 @@ AM_CONDITIONAL([GHB_GTK_3_16], [test "$HAVE_GTK_316" -eq 1]) AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"]) -HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma" +HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg" HB_CPPFLAGS="$HB_CPPFLAGS $HBINC" PKG_CHECK_MODULES([x264], [x264], sys_x264=yes, sys_x264=no) diff --git a/libhb/module.defs b/libhb/module.defs index a6aec9702..e04d3ecfb 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -114,7 +114,7 @@ LIBHB.lib = $(LIBHB.build/)hb.lib LIBHB.dll.libs = $(foreach n, \ ass avformat avfilter avcodec avutil swresample postproc dvdnav dvdread \ freetype mp3lame swscale vpx theora vorbis vorbisenc ogg x264 xml2 \ - bluray jansson harfbuzz opus speex dav1d turbojpeg, \ + bluray jansson harfbuzz opus speex dav1d turbojpeg zimg, \ $(CONTRIB.build/)lib/lib$(n).a ) ifeq (1,$(FEATURE.fdk_aac)) diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 5ffdc5f6d..6ba1436e8 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -259,6 +259,8 @@ A98C29C41977B10600AF5DED /* HBLanguagesSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = A98C29C31977B10600AF5DED /* HBLanguagesSelection.m */; }; A9906B2C1A710920001D82D5 /* HBQueueController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9906B2B1A710920001D82D5 /* HBQueueController.m */; }; A990C55322FF4FBA00E07CE2 /* HandBrakeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9736F021C7DA5FE008F1D18 /* HandBrakeKit.framework */; }; + A9935865256C346F00A6875E /* libzimg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9935852256C346F00A6875E /* libzimg.a */; }; + A9935866256C347800A6875E /* libzimg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9935852256C346F00A6875E /* libzimg.a */; }; A99F40CF1B624E7E00750170 /* HBPictureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A99F40CD1B624E7E00750170 /* HBPictureViewController.m */; }; A9A0CBE81CCEA3670045B3DF /* HBPlayerTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A0CBE61CCEA1D10045B3DF /* HBPlayerTrack.m */; }; A9A25D9C21182741005A8A0F /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A25D9B21182741005A8A0F /* CoreMedia.framework */; }; @@ -899,6 +901,8 @@ A990C55222FF4EBA00E07CE2 /* HandBrakeXPCService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HandBrakeXPCService.entitlements; sourceTree = "<group>"; }; A990D9051A64562200139032 /* HBJob+HBJobConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HBJob+HBJobConversion.h"; sourceTree = "<group>"; }; A990D9061A64562200139032 /* HBJob+HBJobConversion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HBJob+HBJobConversion.m"; sourceTree = "<group>"; }; + A9935852256C346F00A6875E /* libzimg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzimg.a; path = external/contrib/lib/libzimg.a; sourceTree = "<group>"; }; + A9935867256C349B00A6875E /* libzimg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzimg.a; path = external/contrib/lib/libzimg.a; sourceTree = BUILT_PRODUCTS_DIR; }; A99422DE1B1887B000DDB077 /* NSJSONSerialization+HBAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSJSONSerialization+HBAdditions.h"; sourceTree = "<group>"; }; A99422DF1B1887B000DDB077 /* NSJSONSerialization+HBAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSJSONSerialization+HBAdditions.m"; sourceTree = "<group>"; }; A997D8EB1A4ABB0900E19B6F /* HBPresetCoding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HBPresetCoding.h; sourceTree = "<group>"; }; @@ -1156,6 +1160,7 @@ 27D6C77314B102DA00B785E4 /* libxml2.a in Frameworks */, A955128B1A320B02001BFC6F /* libjansson.a in Frameworks */, 1C6D76551CD7733300F5B943 /* libharfbuzz.a in Frameworks */, + A9935865256C346F00A6875E /* libzimg.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1246,6 +1251,7 @@ A91CE2C81C7DABBC0068F46F /* libx264.a in Frameworks */, A91CE2C91C7DABBC0068F46F /* libx265.a in Frameworks */, A91CE2CA1C7DABBC0068F46F /* libxml2.a in Frameworks */, + A9935866256C347800A6875E /* libzimg.a in Frameworks */, A91CE2B11C7DAA530068F46F /* libhandbrake.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1293,6 +1299,7 @@ A95512881A320A12001BFC6F /* libjansson.a */, A9E165511C523016003EF30E /* libavfilter.a */, 1C15C82B1CD7722500368223 /* libharfbuzz.a */, + A9935867256C349B00A6875E /* libzimg.a */, ); name = "Static Libraries"; sourceTree = "<group>"; @@ -1350,6 +1357,7 @@ 273F203414ADBAC30021BE6D /* Frameworks */ = { isa = PBXGroup; children = ( + A9935852256C346F00A6875E /* libzimg.a */, A9442CDD24DABFED005EDF62 /* Sparkle.xcodeproj */, A9A25D9B21182741005A8A0F /* CoreMedia.framework */, A9AB9AA721181CC700BB3C7E /* CoreVideo.framework */, diff --git a/make/include/main.defs b/make/include/main.defs index 40be197b0..04ab85aa8 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -48,6 +48,7 @@ ifeq (1,$(FEATURE.x265)) endif MODULES += contrib/libdav1d +MODULES += contrib/zimg MODULES += contrib/ffmpeg MODULES += contrib/libdvdread MODULES += contrib/libdvdnav diff --git a/test/module.defs b/test/module.defs index 33bee3111..01a322207 100644 --- a/test/module.defs +++ b/test/module.defs @@ -17,7 +17,7 @@ TEST.GCC.l = \ ass avformat avfilter avcodec avutil swresample postproc mp3lame dvdnav \ dvdread fribidi swscale vpx theoraenc theoradec vorbis vorbisenc ogg \ x264 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma dav1d \ - turbojpeg + turbojpeg zimg ifeq (,$(filter $(HOST.system),darwin cygwin mingw)) TEST.GCC.l += fontconfig |