Permalink
Browse files

BD-J fixes to also build libbluray .jar file

needs separate addon with jre only
few libraries needs to be build shared and not static (or maybe both)
  • Loading branch information...
vpeter4 committed Mar 15, 2018
1 parent 035d69e commit f326abddb738fe6ce8454e344a898ffa443fb598
@@ -23,7 +23,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://www.videolan.org/developers/libbluray.html"
PKG_URL="https://ftp.videolan.org/pub/videolan/libbluray/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_TARGET="toolchain fontconfig freetype libxml2"
PKG_DEPENDS_TARGET="toolchain fontconfig freetype libxml2 apache-ant:host"
PKG_SECTION="multimedia"
PKG_SHORTDESC="libbluray: A Blu-Ray Discs playback library"
PKG_LONGDESC="libbluray is an open-source library designed for Blu-Ray Discs playback for media players, like VLC or MPlayer."
@@ -41,7 +41,7 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-werror \
--disable-extra-warnings \
--disable-optimizations \
--disable-examples \
--disable-bdjava-jar \
--enable-bdjava-jar \
--disable-doxygen-doc \
--disable-doxygen-dot \
--disable-doxygen-man \
@@ -56,3 +56,9 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-werror \
--with-fontconfig \
--with-libxml2 \
--with-gnu-ld"

post_unpack() {
local ANT_EXE="$(get_build_dir apache-ant)/bin/ant"
local JAVA_HOME="$(get_build_dir jdk)"
sed -e "s|ant -f|JAVA_HOME=$JAVA_HOME $ANT_EXE -f|g" -i $PKG_BUILD/Makefile.am
}
@@ -0,0 +1,31 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
#
# 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="apache-ant"
PKG_VERSION="1.10.2"
PKG_SHA256="361c8ad2ed8341416e323e7c28af10a8297170a80fdffba294a5c2031527bb6c"
PKG_ARCH="any"
PKG_LICENSE="Apache License 2.0"
PKG_SITE="https://ant.apache.org/"
PKG_URL="http://www.apache.si/ant/binaries/$PKG_NAME-$PKG_VERSION-bin.tar.xz"
PKG_DEPENDS_HOST="jdk:host"
PKG_DEPENDS_TARGET=""
PKG_SECTION="lang"
PKG_SHORTDESC="Apache Ant is a Java library and command-line tool ..."
PKG_LONGDESC="$PKG_SHORTDESC"
PKG_TOOLCHAIN="manual"
@@ -0,0 +1,37 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
#
# 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="jdk"
PKG_VERSION="8u162"
PKG_VERSION_BUILD="b12"
PKG_SHA256="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"
PKG_ARCH="any"
PKG_LICENSE="probably"
PKG_SITE="http://www.oracle.com/"
PKG_URL="http://download.oracle.com/otn-pub/java/${PKG_NAME}/${PKG_VERSION}-${PKG_VERSION_BUILD}/0da788060d494f5095bf8624735fa2f1/${PKG_NAME}-${PKG_VERSION}-linux-x64.tar.gz"
PKG_SOURCE_NAME="${PKG_NAME}-${PKG_VERSION}-${PKG_VERSION_BUILD}.tar.gz"
PKG_SOURCE_DIR="${PKG_NAME}1.8.0_${PKG_VERSION##*u}"
PKG_DEPENDS_TARGET=""
PKG_SECTION="lang"
PKG_SHORTDESC="Java SE Development Kit 8 ..."
PKG_LONGDESC="$PKG_SHORTDESC"
PKG_TOOLCHAIN="manual"

# hack to set some wget parameters
export VERBOSE="yes"
export WGET_OPT="--no-cookies --header=Cookie:oraclelicense=accept-securebackup-cookie"
Binary file not shown.
@@ -0,0 +1,58 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
#
# 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="jre"
PKG_VERSION="8u162"
PKG_VERSION_BUILD="b12"
PKG_SHA256="dfa25ebd1f90bf74ad7ba2dacb0e08d884594e733c9a522b58256778031341a4"
PKG_ARCH="any"
PKG_LICENSE="probably"
PKG_SITE="http://www.oracle.com/"
PKG_URL="http://download.oracle.com/otn-pub/java/jdk/${PKG_VERSION}-${PKG_VERSION_BUILD}/0da788060d494f5095bf8624735fa2f1/${PKG_NAME}-${PKG_VERSION}-linux-x64.tar.gz"
PKG_SOURCE_NAME="${PKG_NAME}-${PKG_VERSION}-${PKG_VERSION_BUILD}.tar.gz"
PKG_SOURCE_DIR="${PKG_NAME}1.8.0_${PKG_VERSION##*u}"
PKG_DEPENDS_TARGET=""
PKG_SECTION="program"
PKG_SHORTDESC="Java SE Runtime Environment 8 ..."
PKG_LONGDESC="$PKG_SHORTDESC"
PKG_TOOLCHAIN="manual"

PKG_IS_ADDON="yes"
PKG_ADDON_NAME="Java Runtime Environment"
PKG_ADDON_TYPE="xbmc.python.script"

# hack to set some wget parameters
export VERBOSE="yes"
export WGET_OPT="--no-cookies --header=Cookie:oraclelicense=accept-securebackup-cookie"

unpack() {
echo $ADDON_BUILD/$PKG_ADDON_ID
mkdir -p $PKG_BUILD
tar --strip-components=1 -xf $SOURCES/$PKG_NAME/$PKG_SOURCE_NAME -C $PKG_BUILD
}

make_target() {
:
}

addon() {
echo $ADDON_BUILD/$PKG_ADDON_ID
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
cp -a $PKG_DIR/profile.d $ADDON_BUILD/$PKG_ADDON_ID
ln -s $PKG_BUILD $ADDON_BUILD/$PKG_ADDON_ID/jre
}
@@ -0,0 +1,8 @@
# needs to point where jre folder is set
export JAVA_HOME=/storage/.kodi/addons/program.jre/

# look for libbluray-*.jar in this folder (with / at the end)
export LIBBLURAY_CP=/storage/.kodi/addons/program.jre/
# or set file directly
# export LIBBLURAY_CP=/storage/.kodi/addons/program.jre/libbluray-j2se-1.0.1.jar

0 comments on commit f326abd

Please sign in to comment.