Merge pull request #424 from MilhouseVH/seodvd

kodi: Restore DVD support
This commit is contained in:
Christian Hewitt 2016-06-06 09:44:32 +04:00
commit 1aa0fdd9e6
6 changed files with 152 additions and 20 deletions

View File

@ -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

View File

@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv" PKG_SITE="http://www.kodi.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" 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_DEPENDS_HOST="lzo:host libpng:host libjpeg-turbo:host giflib:host"
PKG_PRIORITY="optional" PKG_PRIORITY="optional"
PKG_SECTION="mediacenter" PKG_SECTION="mediacenter"
@ -324,6 +324,10 @@ pre_configure_target() {
export JSON_BUILDER=$ROOT/$TOOLCHAIN/bin/JsonSchemaBuilder 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 # autoreconf
BOOTSTRAP_STANDALONE=1 make -f $ROOT/$PKG_BUILD/bootstrap.mk BOOTSTRAP_STANDALONE=1 make -f $ROOT/$PKG_BUILD/bootstrap.mk
} }

View File

@ -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:

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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"

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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"
}

View File

@ -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 <http://www.gnu.org/licenses/>.
################################################################################
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"
}