diff --git a/packages/mediacenter/kodi/libdvd/libdvd-makefile.in b/packages/mediacenter/kodi/libdvd/libdvd-makefile.in
new file mode 100644
index 0000000000..e99b746177
--- /dev/null
+++ b/packages/mediacenter/kodi/libdvd/libdvd-makefile.in
@@ -0,0 +1,34 @@
+ARCH=@ARCH@
+CC=@CC@
+CXX=@CXX@
+
+DVDNAV_A = $(DVD_PREFIX)/usr/lib/libdvdnav.a
+DVDREAD_A = $(DVD_PREFIX)/usr/lib/libdvdread.a
+DVDCSS_A = $(DVD_PREFIX)/usr/lib/libdvdcss.a
+
+WRAPPER = @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
+WRAPPER_DEF = @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def
+
+SO_LDFLAGS = $(LDFLAGS) -shared -fPIC -rdynamic
+
+SYSDIR = @abs_top_srcdir@/system/players/VideoPlayer
+SOS = libdvdcss-$(ARCH).so libdvdnav-$(ARCH).so
+SLIB = $(addprefix $(SYSDIR)/, $(SOS))
+
+all: $(SLIB)
+
+$(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) $(WRAPPER_DEF) $(DVDCSS_A)
+ mkdir -p libdvdcss; cd libdvdcss; $(AR) x $(DVDCSS_A)
+ $(CC) -o $@ $(SO_LDFLAGS) -Wl,--soname,$@ libdvdcss/*.o -Wl,--unresolved-symbols=ignore-all -lm \
+ `cat $(WRAPPER_DEF)` $(WRAPPER)
+
+$(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(WRAPPER_DEF) $(DVDNAV_A) $(DVDREAD_A) $(DVDCSS_A)
+ mkdir -p libdvdread; cd libdvdread; $(AR) x $(DVDREAD_A)
+ mkdir -p libdvdnav; cd libdvdnav; $(AR) x $(DVDNAV_A)
+ mkdir -p libdvdcss; cd libdvdcss; $(AR) x $(DVDCSS_A)
+ $(CC) -o $@ $(SO_LDFLAGS) -Wl,--soname,$@ libdvdread/*.o libdvdnav/*.o libdvdcss/*.o -lm -Wl,--unresolved-symbols=ignore-all \
+ `cat $(WRAPPER_DEF)` $(WRAPPER)
+
+$(WRAPPER_DEF):
+ $(MAKE) -C @abs_top_srcdir@/xbmc/cores/DllLoader/exports wrapper.def
+
diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk
index 30c97b2af3..bfe6fc4fae 100644
--- a/packages/mediacenter/kodi/package.mk
+++ b/packages/mediacenter/kodi/package.mk
@@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
-PKG_DEPENDS_TARGET="toolchain kodi:host xmlstarlet:host Python zlib systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt yajl sqlite ffmpeg crossguid giflib"
+PKG_DEPENDS_TARGET="toolchain kodi:host xmlstarlet:host Python zlib systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt yajl sqlite ffmpeg crossguid giflib libdvdnav"
PKG_DEPENDS_HOST="lzo:host libpng:host libjpeg-turbo:host giflib:host"
PKG_PRIORITY="optional"
PKG_SECTION="mediacenter"
@@ -324,6 +324,10 @@ pre_configure_target() {
export JSON_BUILDER=$ROOT/$TOOLCHAIN/bin/JsonSchemaBuilder
+# libdvd
+ cp -P $PKG_DIR/libdvd/libdvd-makefile.in $ROOT/$PKG_BUILD/lib/libdvd/Makefile.in
+ export DVD_PREFIX="$SYSROOT_PREFIX"
+
# autoreconf
BOOTSTRAP_STANDALONE=1 make -f $ROOT/$PKG_BUILD/bootstrap.mk
}
diff --git a/packages/mediacenter/kodi/patches/kodi-100.30-fix-libdvd.patch b/packages/mediacenter/kodi/patches/kodi-100.30-fix-libdvd.patch
deleted file mode 100644
index 0098ba0ec0..0000000000
--- a/packages/mediacenter/kodi/patches/kodi-100.30-fix-libdvd.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -Naur a/Makefile.in b/Makefile.in
---- a/Makefile.in 2016-02-25 15:54:54.305799646 +0000
-+++ b/Makefile.in 2016-02-25 15:55:30.609990228 +0000
-@@ -11,7 +11,6 @@
-
- DVDPCODECS_DIRS= \
- lib \
-- lib/libdvd
-
- VideoPlayer_ARCHIVES=xbmc/cores/VideoPlayer/VideoPlayer.a \
- xbmc/cores/VideoPlayer/DVDCodecs/DVDCodecs.a \
-@@ -332,7 +331,6 @@
- $(MAKE) -C lib/addons/library.kodi.peripheral
- $(MAKE) -C lib/addons/library.xbmc.pvr
- dvdpcodecs: dllloader
-- $(MAKE) -C lib/libdvd
-
- dvdpextcodecs:
-
diff --git a/packages/multimedia/libdvdcss/package.mk b/packages/multimedia/libdvdcss/package.mk
new file mode 100644
index 0000000000..0184aa1dbc
--- /dev/null
+++ b/packages/multimedia/libdvdcss/package.mk
@@ -0,0 +1,35 @@
+################################################################################
+# This file is part of LibreELEC - http://www.libreelec.tv
+# Copyright (C) 2009-2016 Team LibreELEC (team@libreelec.tv)
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="libdvdcss"
+PKG_VERSION="2f12236"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="https://github.com/xbmc/libdvdcss"
+PKG_URL="https://github.com/xbmc/libdvdcss/archive/$PKG_VERSION.tar.gz"
+PKG_DEPENDS_TARGET="toolchain"
+PKG_PRIORITY="optional"
+PKG_SECTION="multimedia"
+PKG_SHORTDESC="libdvdcss: a simple library designed for accessing DVDs as a block device without having to bother about the decryption."
+PKG_LONGDESC="libdvdcss is a simple library designed for accessing DVDs as a block device without having to bother about the decryption."
+
+PKG_IS_ADDON="no"
+PKG_AUTORECONF="yes"
+
+PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared --with-pic"
diff --git a/packages/multimedia/libdvdnav/package.mk b/packages/multimedia/libdvdnav/package.mk
new file mode 100644
index 0000000000..e9f6872d14
--- /dev/null
+++ b/packages/multimedia/libdvdnav/package.mk
@@ -0,0 +1,39 @@
+################################################################################
+# This file is part of LibreELEC - http://www.libreelec.tv
+# Copyright (C) 2009-2016 Team LibreELEC (team@libreelec.tv)
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="libdvdnav"
+PKG_VERSION="43b5f81"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="https://github.com/xbmc/libdvdnav"
+PKG_URL="https://github.com/xbmc/libdvdnav/archive/$PKG_VERSION.tar.gz"
+PKG_DEPENDS_TARGET="toolchain libdvdread"
+PKG_PRIORITY="optional"
+PKG_SECTION="multimedia"
+PKG_SHORTDESC="libdvdnav: a library that allows easy use of sophisticated DVD navigation features such as DVD menus, multiangle playback and even interactive DVD games."
+PKG_LONGDESC="libdvdnav is a library that allows easy use of sophisticated DVD navigation features such as DVD menus, multiangle playback and even interactive DVD games."
+
+PKG_IS_ADDON="no"
+PKG_AUTORECONF="yes"
+
+PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared --with-pic"
+
+pre_configure_target() {
+ export CFLAGS="$CFLAGS -D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
+}
diff --git a/packages/multimedia/libdvdread/package.mk b/packages/multimedia/libdvdread/package.mk
new file mode 100644
index 0000000000..99d742179a
--- /dev/null
+++ b/packages/multimedia/libdvdread/package.mk
@@ -0,0 +1,39 @@
+################################################################################
+# This file is part of LibreELEC - http://www.libreelec.tv
+# Copyright (C) 2009-2016 Team LibreELEC (team@libreelec.tv)
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="libdvdread"
+PKG_VERSION="17d99db"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="https://github.com/xbmc/libdvdread"
+PKG_URL="https://github.com/xbmc/libdvdread/archive/$PKG_VERSION.tar.gz"
+PKG_DEPENDS_TARGET="toolchain libdvdcss"
+PKG_PRIORITY="optional"
+PKG_SECTION="multimedia"
+PKG_SHORTDESC="libdvdread: a library which provides a simple foundation for reading DVDs."
+PKG_LONGDESC="libdvdread is a library which provides a simple foundation for reading DVDs."
+
+PKG_IS_ADDON="no"
+PKG_AUTORECONF="yes"
+
+PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared --with-libdvdcss --with-pic"
+
+pre_configure_target() {
+ export CFLAGS="$CFLAGS -D_XBMC -DHAVE_DVDCSS_DVDCSS_H"
+}