summaryrefslogtreecommitdiffstats
path: root/src/libbluray.mk
blob: d5fdf521ca033ebb14f5e54012482d59565635e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This file is part of MXE.
# See index.html for further information.

PKG             := libbluray
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 0.5.0
$(PKG)_CHECKSUM := 1a9c61daefc31438f9165e7681c563d0524b2d3e
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $($(PKG)_SUBDIR).tar.bz2
$(PKG)_URL      := ftp://ftp.videolan.org/pub/videolan/libbluray/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc freetype libxml2

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://www.videolan.org/developers/libbluray.html' | \
    $(SED) -n 's,.*libbluray-\([0-9][^<]*\)\.tar.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)' && ./configure \
        --host='$(TARGET)' \
        --build="`config.guess`" \
        --prefix='$(PREFIX)/$(TARGET)' \
        --disable-shared \
        --disable-examples \
        --with-freetype \
        --with-libxml2 \
        --disable-bdjava
    $(MAKE) -C '$(1)' -j '$(JOBS)'

    # Since libbluray doesn't export its symbols, we can't create a shared
    # build on Windows. So we mangle the pkg-config to fool ffmpegs detection
    # to work... In a static build, this fixes transitive dependencies of xml2
    # and freetype...
    $(SED) -i '/Libs:/ s,$$, -lxml2 -lfreetype,; s,^Libs.private:.*$$,Requires.private: libxml-2.0 freetype2,' '$(1)/src/libbluray.pc'

    $(MAKE) -C '$(1)' -j 1 install
endef