Contribs: enable ass for WinRT without fontconfig
[vlc.git] / contrib / src / ass / rules.mak
blob507064a9fc4e81fc8e0a52a98427e124fb631f7b
1 # ASS
2 ASS_VERSION := 0.10.2
3 ASS_URL := http://libass.googlecode.com/files/libass-$(ASS_VERSION).tar.gz
5 PKGS += ass
6 ifeq ($(call need_pkg,"libass"),)
7 PKGS_FOUND += ass
8 endif
10 ifdef HAVE_ANDROID
11 WITH_FONTCONFIG = 0
12 WITH_HARFBUZZ = 0
13 else
14 ifdef HAVE_IOS
15 WITH_FONTCONFIG = 0
16 WITH_HARFBUZZ = 1
17 else
18 ifdef HAVE_WINRT
19 WITH_FONTCONFIG = 0
20 WITH_HARFBUZZ = 1
21 else
22 WITH_FONTCONFIG = 1
23 WITH_HARFBUZZ = 1
24 endif
25 endif
26 endif
28 $(TARBALLS)/libass-$(ASS_VERSION).tar.gz:
29 $(call download,$(ASS_URL))
31 .sum-ass: libass-$(ASS_VERSION).tar.gz
33 libass: libass-$(ASS_VERSION).tar.gz .sum-ass
34 $(UNPACK)
35 ifdef HAVE_MACOSX
36 $(APPLY) $(SRC)/ass/ass-macosx.patch
37 endif
38 $(MOVE)
40 DEPS_ass = freetype2 $(DEPS_freetype2) fribidi
42 ASS_CONF=--disable-enca
44 ifneq ($(WITH_FONTCONFIG), 0)
45 DEPS_ass += fontconfig $(DEPS_fontconfig)
46 else
47 ASS_CONF += --disable-fontconfig
48 endif
50 ifneq ($(WITH_HARFBUZZ), 0)
51 DEPS_ass += harfbuzz $(DEPS_harfbuzz)
52 else
53 ASS_CONF += --disable-harfbuzz
54 endif
56 .ass: libass
57 $(UPDATE_AUTOCONFIG)
58 cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) $(ASS_CONF)
59 cd $< && $(MAKE) install
60 touch $@