From f83f5e14fab7a06a31bb430bff363c36e1c7fa91 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 10:19:58 -0500 Subject: [PATCH] Addon library paths added to LD_LIBRARY_PATH so they need not be defined in every script. --- packages/mediacenter/xbmc-pvr/init.d/93_xbmc | 3 ++ packages/mediacenter/xbmc/init.d/93_xbmc | 3 ++ .../busybox/profile.d/librarypath.conf | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 packages/sysutils/busybox/profile.d/librarypath.conf diff --git a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc index c50c56068e..9f4c1e8586 100644 --- a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc +++ b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc @@ -36,6 +36,9 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 +# hack: make addon-libs executable + chmod +x /storage/.xbmc/addons/*/lib/* > /dev/null 2>&1 + # hack to support user installed fonts SUBFONTS="/storage/.xbmc/userdata/fonts" if [ -d "$SUBFONTS" ]; then diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index 6863ca604f..c7f1ed57b5 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -36,6 +36,9 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 +# hack: make addon-libs executable + chmod +x /storage/.xbmc/addons/*/lib/* > /dev/null 2>&1 + # hack to support user installed fonts SUBFONTS="/storage/.xbmc/userdata/fonts" if [ -d "$SUBFONTS" ]; then diff --git a/packages/sysutils/busybox/profile.d/librarypath.conf b/packages/sysutils/busybox/profile.d/librarypath.conf new file mode 100644 index 0000000000..1bf913b61a --- /dev/null +++ b/packages/sysutils/busybox/profile.d/librarypath.conf @@ -0,0 +1,33 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# Added by Adam Boeglin: adamrb@gmail.com +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ +# Core (PATH) environment variables. +# +# This file contains non-OpenELEC evironment variables as well as OpenELEC +# evironment variables that are not user defined. +################################################################################ + +# hack: add addons to $PATH + for i in `find /storage/.xbmc/addons/* -name lib -type d`; do + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$i" + done + +export LD_LIBRARY_PATH