summaryrefslogtreecommitdiffstats
path: root/meta-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia')
-rw-r--r--meta-multimedia/recipes-mkv/libebml/libebml/ldflags.patch57
-rw-r--r--meta-multimedia/recipes-mkv/libebml/libebml/override-uname.patch42
-rw-r--r--meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb44
3 files changed, 138 insertions, 5 deletions
diff --git a/meta-multimedia/recipes-mkv/libebml/libebml/ldflags.patch b/meta-multimedia/recipes-mkv/libebml/libebml/ldflags.patch
new file mode 100644
index 000000000..a01c7544b
--- /dev/null
+++ b/meta-multimedia/recipes-mkv/libebml/libebml/ldflags.patch
@@ -0,0 +1,57 @@
1Use LD and obey LDFLAGS
2
3Signed-off-by: Christopher Larson <chris_larson@mentor.com>
4Upstream-Status: Pending
5
6diff --git a/make/linux/Makefile b/make/linux/Makefile
7index 391b6e3..a2ac13e 100644
8--- a/make/linux/Makefile
9+++ b/make/linux/Makefile
10@@ -64,6 +64,7 @@ objects_so:=$(patsubst %$(EXTENSION),%.lo,$(sources))
11 WARNINGFLAGS=-Wall -Wextra -Wno-unknown-pragmas -ansi -fno-gnu-keywords -Wshadow
12 COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
13 DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
14+LINKFLAGS=$(LDFLAGS)
15
16 ifeq (Darwin,$(shell uname -s))
17 all: staticlib
18@@ -91,7 +92,7 @@ $(LIBRARY): $(objects)
19 $(RANLIB) $@
20
21 $(LIBRARY_SO): $(objects_so)
22- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
23+ $(LD) $(LINKFLAGS) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
24 rm -f $(LIBRARY_SO)
25 ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
26
27diff --git a/make/mingw32/Makefile b/make/mingw32/Makefile
28index e5986ef..6ca16aa 100644
29--- a/make/mingw32/Makefile
30+++ b/make/mingw32/Makefile
31@@ -18,6 +18,7 @@ DEBUGFLAGS=-g -DDEBUG
32 endif
33 CROSS =
34 CXX = $(CROSS)g++
35+LD = $(CXX)
36 CC = $(CROSS)gcc
37 WINDRES = $(CROSS)windres
38 RANLIB = $(CROSS)ranlib
39@@ -33,6 +34,7 @@ LIBS = libebml.a
40 endif
41 INCS = -I"$(shell pwd)/../.."
42 COMPILEFLAGS = $(DEBUGFLAGS) $(INCS) $(DLLFLAGS) $(CXXFLAGS)
43+LINKFLAGS = $(LDFLAGS)
44
45 .PHONY: all all-before all-after clean clean-custom
46
47@@ -54,7 +56,7 @@ libebml.a: $(OBJ)
48 $(RANLIB) $@
49
50 libebml.dll: $(OBJ)
51- $(CXX) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ)
52+ $(LD) $(LINKFLAGS) -shared -Wl,--export-all -Wl,--out-implib=$@.a -o $@ $(OBJ)
53
54 depend:
55 @echo Calculating dependecies:
56--
572.8.0
diff --git a/meta-multimedia/recipes-mkv/libebml/libebml/override-uname.patch b/meta-multimedia/recipes-mkv/libebml/libebml/override-uname.patch
new file mode 100644
index 000000000..57eb3450d
--- /dev/null
+++ b/meta-multimedia/recipes-mkv/libebml/libebml/override-uname.patch
@@ -0,0 +1,42 @@
1Allow override of the 'uname -s' for cross-compilation
2
3Signed-off-by: Christopher Larson <chris_larson@mentor.com>
4Upstream-Status: Pending
5
6diff --git a/make/linux/Makefile b/make/linux/Makefile
7index a2ac13e..4188bee 100644
8--- a/make/linux/Makefile
9+++ b/make/linux/Makefile
10@@ -9,9 +9,11 @@
11 # 'make DEBUG=yes'.
12 #
13
14+TARGET_OS ?= $(shell uname -s)
15+
16 # Paths
17 # BeOS wants the libs and headers in /boot/home/config
18-ifeq (BeOS,$(shell uname -s))
19+ifeq (BeOS,$(TARGET_OS))
20 prefix=/boot/home/config
21 else
22 prefix=/usr/local
23@@ -66,7 +68,7 @@ COMPILEFLAGS=$(WARNINGFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) $(INCLUDE)
24 DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)
25 LINKFLAGS=$(LDFLAGS)
26
27-ifeq (Darwin,$(shell uname -s))
28+ifeq (Darwin,$(TARGET_OS))
29 all: staticlib
30 else
31 all: staticlib sharedlib
32@@ -116,7 +118,7 @@ depend:
33 $(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \
34 done
35
36-ifeq (Darwin,$(shell uname -s))
37+ifeq (Darwin,$(TARGET_OS))
38 install: install_staticlib install_headers
39 else
40 install: install_staticlib install_sharedlib install_headers
41--
422.8.0
diff --git a/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb b/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
index 71e2bfc56..b756a3924 100644
--- a/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
+++ b/meta-multimedia/recipes-mkv/libebml/libebml_1.3.0.bb
@@ -2,15 +2,49 @@ SUMMARY = "libebml is a C++ libary to parse EBML files"
2LICENSE = "LGPLv2.1" 2LICENSE = "LGPLv2.1"
3LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=f14599a2f089f6ff8c97e2baa4e3d575" 3LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=f14599a2f089f6ff8c97e2baa4e3d575"
4 4
5SRC_URI = "http://dl.matroska.org/downloads/libebml/libebml-${PV}.tar.bz2" 5SRC_URI = "\
6 http://dl.matroska.org/downloads/libebml/libebml-${PV}.tar.bz2 \
7 file://ldflags.patch \
8 file://override-uname.patch \
9"
6SRC_URI[md5sum] = "efec729bf5a51e649e1d9d1f61c0ae7a" 10SRC_URI[md5sum] = "efec729bf5a51e649e1d9d1f61c0ae7a"
7SRC_URI[sha256sum] = "83b074d6b62715aa0080406ea84d33df2e44b5d874096640233a4db49b8096de" 11SRC_URI[sha256sum] = "83b074d6b62715aa0080406ea84d33df2e44b5d874096640233a4db49b8096de"
8 12
9EXTRA_OEMAKE = "-e MAKEFLAGS=" 13do_unpack[postfuncs] += "dos2unix"
10 14
11do_compile() { 15dos2unix () {
12 cd ${S}/make/linux 16 cr="$(printf '\r')"
13 oe_runmake CROSS="${TARGET_PREFIX}" 17 for f in make/*/Makefile; do
18 tr -d "$cr" <"$f" >"$f.new" && \
19 mv "$f.new" "$f"
20 done
21}
22
23LIBEBML_OS = "Unknown"
24LIBEBML_OS_linux = "Linux"
25LIBEBML_OS_darwin = "Darwin"
26LIBEBML_OS_mingw32 = "Windows"
27
28EXTRA_OEMAKE = "\
29 'TARGET_OS=${LIBEBML_OS}' \
30 \
31 'CXX=${CXX}' \
32 'LD=${CXX}' \
33 'AR=${AR}' \
34 'RANLIB=${RANLIB}' \
35 \
36 'DEBUGFLAGS=' \
37 'CPPFLAGS=${CPPFLAGS}' \
38 'CXXFLAGS=${CXXFLAGS}' \
39 'LDFLAGS=${LDFLAGS}' \
40 \
41 'prefix=${prefix}' \
42 'libdir=${libdir}' \
43 'includedir=${includedir}/ebml' \
44"
45
46do_compile () {
47 oe_runmake -C make/linux
14} 48}
15 49
16do_install() { 50do_install() {