Skip to content

Commit

Permalink
media-tv/kodi: Adding cross-compilation support
Browse files Browse the repository at this point in the history
Gentoo-bugs: https://bugs.gentoo.org/show_bug.cgi?id=560196

Package-Manager: portage-2.2.28
Closes: gentoo#2392

Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
g-braeunlich authored and SoapGentoo committed Nov 17, 2016
1 parent 1fba466 commit 13f6601
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
24 changes: 23 additions & 1 deletion media-tv/kodi/kodi-16.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,29 @@ src_prepare() {
multijob_finish
elibtoolize

if [[ ${PV} == "9999" ]] || use java ; then #558798
# Cross-compiler support
# We need JsonSchemaBuilder and TexturePacker binaries for the host system
# Later we need libsquish for the target system
if tc-is-cross-compiler ; then
mkdir "${WORKDIR}"/${CBUILD} || die
pushd "${WORKDIR}"/${CBUILD} >/dev/null || die
einfo "Building host tools"
cp -a "$S"/{tools,xbmc} ./ || die
local tools=( JsonSchemaBuilder )
use texturepacker && tools+=( TexturePacker )
for tool in "${tools[@]}" ; do
tc-env_build emake -C tools/depends/native/$tool
mkdir "$S"/tools/depends/native/$tool/bin || die
ln -s "${WORKDIR}"/${CBUILD}/tools/depends/native/$tool/bin/$tool "$S"/tools/depends/native/$tool/bin/$tool || die
done
popd >/dev/null || die

emake -f codegenerator.mk

# Binary kodi.bin links against libsquish,
# so we need libsquish compiled for the target system
emake -C tools/depends/native/libsquish-native/ CXX=$(tc-getCXX)
elif [[ ${PV} == "9999" ]] || use java ; then #558798
tc-env_build emake -f codegenerator.mk
fi

Expand Down
24 changes: 23 additions & 1 deletion media-tv/kodi/kodi-16.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,29 @@ src_prepare() {
multijob_finish
elibtoolize

if [[ ${PV} == "9999" ]] || use java ; then #558798
# Cross-compiler support
# We need JsonSchemaBuilder and TexturePacker binaries for the host system
# Later we need libsquish for the target system
if tc-is-cross-compiler ; then
mkdir "${WORKDIR}"/${CBUILD} || die
pushd "${WORKDIR}"/${CBUILD} >/dev/null || die
einfo "Building host tools"
cp -a "$S"/{tools,xbmc} ./ || die
local tools=( JsonSchemaBuilder )
use texturepacker && tools+=( TexturePacker )
for tool in "${tools[@]}" ; do
tc-env_build emake -C tools/depends/native/$tool
mkdir "$S"/tools/depends/native/$tool/bin || die
ln -s "${WORKDIR}"/${CBUILD}/tools/depends/native/$tool/bin/$tool "$S"/tools/depends/native/$tool/bin/$tool || die
done
popd >/dev/null || die

emake -f codegenerator.mk

# Binary kodi.bin links against libsquish,
# so we need libsquish compiled for the target system
emake -C tools/depends/native/libsquish-native/ CXX=$(tc-getCXX)
elif [[ ${PV} == "9999" ]] || use java ; then #558798
tc-env_build emake -f codegenerator.mk
fi

Expand Down
24 changes: 23 additions & 1 deletion media-tv/kodi/kodi-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,29 @@ src_prepare() {
multijob_finish
elibtoolize

if [[ ${PV} == "9999" ]] || use java ; then #558798
# Cross-compiler support
# We need JsonSchemaBuilder and TexturePacker binaries for the host system
# Later we need libsquish for the target system
if tc-is-cross-compiler ; then
mkdir "${WORKDIR}"/${CBUILD} || die
pushd "${WORKDIR}"/${CBUILD} >/dev/null || die
einfo "Building host tools"
cp -a "$S"/{tools,xbmc} ./ || die
local tools=( JsonSchemaBuilder )
use texturepacker && tools+=( TexturePacker )
for tool in "${tools[@]}" ; do
tc-env_build emake -C tools/depends/native/$tool
mkdir "$S"/tools/depends/native/$tool/bin || die
ln -s "${WORKDIR}"/${CBUILD}/tools/depends/native/$tool/bin/$tool "$S"/tools/depends/native/$tool/bin/$tool || die
done
popd >/dev/null || die

emake -f codegenerator.mk

# Binary kodi.bin links against libsquish,
# so we need libsquish compiled for the target system
emake -C tools/depends/native/libsquish-native/ CXX=$(tc-getCXX)
elif [[ ${PV} == "9999" ]] || use java ; then #558798
tc-env_build emake -f codegenerator.mk
fi

Expand Down

0 comments on commit 13f6601

Please sign in to comment.