summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2020-03-16 01:22:00 -0400
committerBradley Sepos <[email protected]>2020-06-15 17:18:42 -0400
commit5f53243424b4f9bead50079982556caaad31476e (patch)
treec8967458e603e8e856ea30594e48d28954beb4bf
parented54f307f8f139a6bcc02274c7c2b01ae35c0502 (diff)
contrib: gtk: libhb: macosx: make: test: Add libjpeg-turbo.
-rw-r--r--contrib/libjpeg-turbo/module.defs48
-rw-r--r--contrib/libjpeg-turbo/module.rules2
-rw-r--r--gtk/configure.ac2
-rw-r--r--libhb/module.defs6
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj12
-rw-r--r--make/include/main.defs1
-rw-r--r--test/module.defs6
7 files changed, 70 insertions, 7 deletions
diff --git a/contrib/libjpeg-turbo/module.defs b/contrib/libjpeg-turbo/module.defs
new file mode 100644
index 000000000..9e8a85a76
--- /dev/null
+++ b/contrib/libjpeg-turbo/module.defs
@@ -0,0 +1,48 @@
+$(eval $(call import.MODULE.defs,LIBJPEGTURBO,libjpeg-turbo))
+$(eval $(call import.CONTRIB.defs,LIBJPEGTURBO))
+
+LIBJPEGTURBO.FETCH.url = https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/libjpeg-turbo-2.0.4.tar.gz
+LIBJPEGTURBO.FETCH.url += https://sourceforge.net/projects/libjpeg-turbo/files/2.0.4/libjpeg-turbo-2.0.4.tar.gz
+LIBJPEGTURBO.FETCH.sha256 = 33dd8547efd5543639e890efbf2ef52d5a21df81faf41bb940657af916a23406
+
+LIBJPEGTURBO.build_dir = build
+LIBJPEGTURBO.CONFIGURE.exe = cmake
+LIBJPEGTURBO.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(LIBJPEGTURBO.CONFIGURE.prefix)"
+LIBJPEGTURBO.CONFIGURE.deps =
+LIBJPEGTURBO.CONFIGURE.static =
+LIBJPEGTURBO.CONFIGURE.shared = -DENABLE_SHARED=OFF
+
+ifeq (size-aggressive,$(GCC.O))
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG" -DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG"
+endif
+
+ifeq ($(GCC.O),$(filter $(GCC.O),size size-aggressive))
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=MinSizeRel
+else
+ ifneq (none,$(LIBJPEGTURBO.GCC.g))
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
+ else
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
+ endif
+endif
+
+ifeq (1,$(HOST.cross))
+ ifeq (mingw,$(HOST.system))
+ LIBJPEGTURBO.CONFIGURE.extra += -DWIN32=ON -DMINGW=ON
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_SYSTEM_PROCESSOR=$(HOST.machine)
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(LIBJPEGTURBO.GCC.gcc)
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_C_FLAGS="-static-libgcc -static-libstdc++ -static"
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="-static-libgcc -static-libstdc++ -static"
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(LIBJPEGTURBO.GCC.gxx)
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
+ LIBJPEGTURBO.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
+ endif
+ LIBJPEGTURBO.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(LIBJPEGTURBO.CONFIGURE.host)"
+ LIBJPEGTURBO.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(LIBJPEGTURBO.CONFIGURE.build)"
+else
+ LIBJPEGTURBO.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(LIBJPEGTURBO.CONFIGURE.host)"
+endif
+
+## find CMakeLists.txt
+LIBJPEGTURBO.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(LIBJPEGTURBO.EXTRACT.dir/))"
diff --git a/contrib/libjpeg-turbo/module.rules b/contrib/libjpeg-turbo/module.rules
new file mode 100644
index 000000000..bdff7ccfd
--- /dev/null
+++ b/contrib/libjpeg-turbo/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,LIBJPEGTURBO))
+$(eval $(call import.CONTRIB.rules,LIBJPEGTURBO))
diff --git a/gtk/configure.ac b/gtk/configure.ac
index 3455a582f..a2de5fb4c 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 -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 -ljpeg -lopus -lspeex -lturbojpeg -llzma"
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 6ed28d299..4fe726eb5 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -1,7 +1,7 @@
__deps__ := A52DEC BZIP2 LIBVPX FFMPEG FREETYPE LAME LIBASS LIBDCA \
LIBDVDREAD LIBDVDNAV LIBICONV LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBOGG \
LIBXML2 X264 X265 ZLIB LIBBLURAY FDKAAC LIBMFX LIBGNURX JANSSON \
- HARFBUZZ LIBOPUS LIBSPEEX LIBDAV1D
+ HARFBUZZ LIBOPUS LIBSPEEX LIBDAV1D LIBJPEGTURBO
ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
__deps__ += FONTCONFIG
@@ -113,8 +113,8 @@ 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, \
+ freetype mp3lame swscale vpx theora vorbis vorbisenc ogg x264 xml2 \
+ bluray jansson harfbuzz opus speex dav1d jpeg turbojpeg, \
$(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 fcc1df125..a63a87b31 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -34,6 +34,10 @@
1C7776A5202301D5001C31EB /* HBRenamePresetController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1C7776A3202301D5001C31EB /* HBRenamePresetController.xib */; };
1CBC683420BE014800A26CC2 /* liblzma.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CBC683320BE014800A26CC2 /* liblzma.a */; };
1CBC683520BE014800A26CC2 /* liblzma.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CBC683320BE014800A26CC2 /* liblzma.a */; };
+ 1CDCF0C3241F28D400FB62C6 /* libturbojpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CDCF0C1241F28D400FB62C6 /* libturbojpeg.a */; };
+ 1CDCF0C4241F28D400FB62C6 /* libturbojpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CDCF0C1241F28D400FB62C6 /* libturbojpeg.a */; };
+ 1CDCF0C5241F28D400FB62C6 /* libjpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CDCF0C2241F28D400FB62C6 /* libjpeg.a */; };
+ 1CDCF0C6241F28D400FB62C6 /* libjpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CDCF0C2241F28D400FB62C6 /* libjpeg.a */; };
22DD2C4B177B95DA00EF50D3 /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22DD2C49177B94DB00EF50D3 /* libvpx.a */; };
273F202314ADB8650021BE6D /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F202214ADB8650021BE6D /* IOKit.framework */; };
273F202614ADB8A40021BE6D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F202514ADB8A40021BE6D /* libz.dylib */; };
@@ -447,6 +451,8 @@
1C7776A0202300DC001C31EB /* HBRenamePresetController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HBRenamePresetController.m; sourceTree = "<group>"; };
1C7776A1202300DC001C31EB /* HBRenamePresetController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HBRenamePresetController.h; sourceTree = "<group>"; };
1CBC683320BE014800A26CC2 /* liblzma.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblzma.a; path = external/contrib/lib/liblzma.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1CDCF0C1241F28D400FB62C6 /* libturbojpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libturbojpeg.a; path = external/contrib/lib/libturbojpeg.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1CDCF0C2241F28D400FB62C6 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = external/contrib/lib/libjpeg.a; sourceTree = BUILT_PRODUCTS_DIR; };
22CC9E74191EBEA500C69D81 /* libx265.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx265.a; path = external/contrib/lib/libx265.a; sourceTree = BUILT_PRODUCTS_DIR; };
22DD2C49177B94DB00EF50D3 /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = external/contrib/lib/libvpx.a; sourceTree = BUILT_PRODUCTS_DIR; };
271BA4C014B119F800BC1D2C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = external/macosx/Info.plist; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -934,6 +940,8 @@
27D6C75014B102DA00B785E4 /* libdvdnav.a in Frameworks */,
27D6C75214B102DA00B785E4 /* libdvdread.a in Frameworks */,
1C53DE8C20BD598D006BBCA8 /* libspeex.a in Frameworks */,
+ 1CDCF0C5241F28D400FB62C6 /* libjpeg.a in Frameworks */,
+ 1CDCF0C3241F28D400FB62C6 /* libturbojpeg.a in Frameworks */,
27D6C75814B102DA00B785E4 /* libfreetype.a in Frameworks */,
27D6C75A14B102DA00B785E4 /* libfribidi.a in Frameworks */,
27D6C75F14B102DA00B785E4 /* libmp3lame.a in Frameworks */,
@@ -1024,6 +1032,8 @@
A91CE2B91C7DABBC0068F46F /* libbluray.a in Frameworks */,
D0DC8F69233159C700C12A24 /* libdav1d.a in Frameworks */,
A91CE2BA1C7DABBC0068F46F /* libdvdnav.a in Frameworks */,
+ 1CDCF0C6241F28D400FB62C6 /* libjpeg.a in Frameworks */,
+ 1CDCF0C4241F28D400FB62C6 /* libturbojpeg.a in Frameworks */,
A91CE2BB1C7DABBC0068F46F /* libdvdread.a in Frameworks */,
1C6D76561CD7733400F5B943 /* libharfbuzz.a in Frameworks */,
A91CE2BD1C7DABBC0068F46F /* libfreetype.a in Frameworks */,
@@ -1058,6 +1068,8 @@
271BA4C714B1236D00BC1D2C /* Static Libraries */ = {
isa = PBXGroup;
children = (
+ 1CDCF0C2241F28D400FB62C6 /* libjpeg.a */,
+ 1CDCF0C1241F28D400FB62C6 /* libturbojpeg.a */,
1C280BF320BD58DD00D5ECC2 /* libspeex.a */,
1CBC683320BE014800A26CC2 /* liblzma.a */,
1C0695AA20BD193D001543DA /* libpostproc.a */,
diff --git a/make/include/main.defs b/make/include/main.defs
index c3a5951fc..40be197b0 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -28,6 +28,7 @@ ifneq (,$(filter $(HOST.system),darwin cygwin mingw))
MODULES += contrib/x264
MODULES += contrib/jansson
MODULES += contrib/libvpx
+ MODULES += contrib/libjpeg-turbo
endif
ifeq (1,$(FEATURE.flatpak))
diff --git a/test/module.defs b/test/module.defs
index 121de22dc..3418abf0d 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -15,9 +15,9 @@ TEST.libs = $(LIBHB.a)
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
+ dvdread fribidi swscale vpx theoraenc theoradec vorbis vorbisenc ogg \
+ x264 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma dav1d \
+ jpeg turbojpeg
ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
TEST.GCC.l += fontconfig