* Remove Fontconfig on Windows
Let libass use its DirectWrite font provider backend instead of Fontconfig.
This eliminates Fontconfig's font cache generation delay that occurred
at the start of an encode after a system font was (un)installed or when
HandBrake was installed and used to burn text subtitles for the first time.
* Remove LibHB's dependency on Fontconfig when it's not used
(cherry picked from commit
bd78a82b032a48d9f382c56ddc72529a047c0893)
__deps__ := YASM FREETYPE FRIBIDI HARFBUZZ
-ifneq ($(BUILD.system),darwin)
+ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
__deps__ += FONTCONFIG
endif
FREETYPE_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lfreetype" \
FREETYPE_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
-ifneq ($(BUILD.system),darwin)
+ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
# Tell configure where to find our version of fontconfig
LIBASS.CONFIGURE.extra += \
--enable-fontconfig \
LIBASS.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
endif
endif
-
-ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
- LIBASS.CONFIGURE.extra += --disable-directwrite
-endif
-__deps__ := A52DEC BZIP2 LIBVPX FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
+__deps__ := A52DEC BZIP2 LIBVPX FFMPEG FREETYPE LAME LIBASS LIBDCA \
LIBDVDREAD LIBDVDNAV LIBICONV LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBOGG \
LIBXML2 PTHREADW32 X264 X265 ZLIB LIBBLURAY FDKAAC LIBMFX LIBGNURX JANSSON \
HARFBUZZ LIBOPUS
+ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
+ __deps__ += FONTCONFIG
+endif
+
$(eval $(call import.MODULE.defs,LIBHB,libhb,$(__deps__)))
$(eval $(call import.GCC,LIBHB))
LIBHB.lib = $(LIBHB.build/)hb.lib
LIBHB.dll.libs = $(foreach n, \
- ass avcodec avformat avfilter avutil avresample dvdnav dvdread fontconfig \
+ ass avcodec avformat avfilter avutil avresample dvdnav dvdread \
freetype mp3lame samplerate swscale vpx theora vorbis vorbisenc ogg \
x264 xml2 bluray jansson harfbuzz opus, \
$(CONTRIB.build/)lib/lib$(n).a )
endif
endif
-ifneq (,$(filter $(BUILD.system),cygwin mingw))
- MODULES += contrib/fontconfig
-endif
-
ifneq (,$(filter $(BUILD.system),darwin cygwin mingw))
MODULES += contrib/freetype
MODULES += contrib/fribidi
samplerate swscale vpx theoraenc theoradec vorbis vorbisenc ogg x264 \
bluray freetype xml2 bz2 z jansson harfbuzz opus
-ifneq ($(BUILD.system),darwin)
+ifeq (,$(filter $(BUILD.system),darwin cygwin mingw))
TEST.GCC.l += fontconfig
endif