contrib: bluray: Fix the path to the local patch
[vlc.git] / contrib / src / bluray / rules.mak
1 # LIBBLURAY
2
3 BLURAY_VERSION := 1.0.2
4 BLURAY_URL := $(VIDEOLAN)/libbluray/$(BLURAY_VERSION)/libbluray-$(BLURAY_VERSION).tar.bz2
5
6 ifdef BUILD_DISCS
7 PKGS += bluray
8 endif
9 ifeq ($(call need_pkg,"libbluray >= 0.7.0"),)
10 PKGS_FOUND += bluray
11 endif
12
13 ifdef HAVE_ANDROID
14 WITH_FONTCONFIG = 0
15 else
16 ifdef HAVE_DARWIN_OS
17 WITH_FONTCONFIG = 0
18 else
19 ifdef HAVE_WIN32
20 WITH_FONTCONFIG = 0
21 else
22 WITH_FONTCONFIG = 1
23 endif
24 endif
25 endif
26
27 DEPS_bluray = libxml2 $(DEPS_libxml2) freetype2 $(DEPS_freetype2)
28
29 BLURAY_CONF = --disable-examples  \
30               --with-libxml2      \
31               --enable-udf        \
32               --enable-bdjava
33
34 ifneq ($(WITH_FONTCONFIG), 0)
35 DEPS_bluray += fontconfig $(DEPS_fontconfig)
36 else
37 BLURAY_CONF += --without-fontconfig
38 endif
39
40 ifndef WITH_OPTIMIZATION
41 BLURAY_CONF += --disable-optimizations
42 endif
43
44 $(TARBALLS)/libbluray-$(BLURAY_VERSION).tar.bz2:
45         $(call download,$(BLURAY_URL))
46
47 .sum-bluray: libbluray-$(BLURAY_VERSION).tar.bz2
48
49 bluray: libbluray-$(BLURAY_VERSION).tar.bz2 .sum-bluray
50         $(UNPACK)
51         $(APPLY) $(SRC)/bluray/0001-Implement-dl_get_path-for-darwin-macOS.patch
52         $(call pkg_static,"src/libbluray.pc.in")
53         $(MOVE)
54
55 .bluray: bluray
56         rm -rf $(PREFIX)/share/java/libbluray*.jar
57         cd $< && ./bootstrap
58         cd $< && $(HOSTVARS) ./configure $(BLURAY_CONF) $(HOSTCONF)
59         cd $< && $(MAKE) install
60         touch $@