diff --git a/packages/mediacenter/xbmc/build b/packages/mediacenter/xbmc/build index 6687d74c8b..645fd71252 100755 --- a/packages/mediacenter/xbmc/build +++ b/packages/mediacenter/xbmc/build @@ -52,6 +52,12 @@ else XBMC_AVAHI="--disable-avahi" fi +if [ "$SAMBA_CLIENT" = yes ]; then + XBMC_SAMBA="--enable-samba" +else + XBMC_SAMBA="--disable-samba" +fi + if [ "$WEBSERVER" = yes ]; then XBMC_WEBSERVER="--enable-webserver" else @@ -141,6 +147,7 @@ do_autoreconf xbmc/lib/libid3tag/libid3tag $XBMC_DVDCSS \ --disable-mid \ $XBMC_AVAHI \ + $XBMC_SAMBA \ --disable-hal \ $XBMC_NONFREE \ --disable-asap-codec \ diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index f0be056f09..7e52dedca9 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.xbmc.org" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack lame libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc xbmc-addon-settings" -PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack lame libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba" +PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack lame libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql alsa bc xbmc-addon-settings" +PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack lame libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql" PKG_PRIORITY="optional" PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc: XBMC Mediacenter" @@ -45,6 +45,11 @@ if [ "$AVAHI_DAEMON" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS avahi" fi +if [ "$SAMBA_CLIENT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS samba" + PKG_DEPENDS="$PKG_DEPENDS samba" +fi + if [ "$WEBSERVER" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libmicrohttpd" PKG_DEPENDS="$PKG_DEPENDS libmicrohttpd" diff --git a/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-203-let_select_Samba-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-203-let_select_Samba-0.1.patch new file mode 100644 index 0000000000..84d7562de5 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-203-let_select_Samba-0.1.patch @@ -0,0 +1,147 @@ +diff -Naur xbmc-10.1-Dharma/configure.in xbmc-10.1-Dharma.patch/configure.in +--- xbmc-10.1-Dharma/configure.in 2011-09-14 15:17:03.499574627 +0200 ++++ xbmc-10.1-Dharma.patch/configure.in 2011-09-14 15:20:45.627527971 +0200 +@@ -92,6 +92,8 @@ + openmax_not_found="== Could not find libnvomx. OpenMax support disabled. ==" + libass_using_internal="== External Libass not found, using internal. ==" + ssh_not_found="== Could not find libssh. SSH FTP VFS support disabled. ==" ++samba_not_found="== Could not find libsmbclient. SAMBA support disabled. ==" ++samba_disabled="== SAMBA support disabled. ==" + librtmp_not_found="== Could not find libRTMP. RTMP support disabled. ==" + librtmp_disabled="== RTMP support disabled. ==" + +@@ -274,6 +276,12 @@ + [use_avahi=$enableval], + [use_avahi=yes]) + ++AC_ARG_ENABLE([samba], ++ [AS_HELP_STRING([--disable-samba], ++ [disable SAMBA support (default is enabled if libsmbclient is found)])], ++ [use_samba=$enableval], ++ [use_samba=yes]) ++ + AC_ARG_ENABLE([non-free], + [AS_HELP_STRING([--disable-non-free], + [disable componentents with non-compliant licenses])], +@@ -625,7 +633,6 @@ + if test "$host_vendor" = "apple" ; then + AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library)) +- AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library)) + PKG_CHECK_MODULES([VORBISFILE], [vorbisfile], + [INCLUDES="$INCLUDES $VORBISFILE_CFLAGS"; LIBS="$LIBS $VORBISFILE_LIBS"], + AC_MSG_ERROR($missing_library)) +@@ -643,7 +650,6 @@ + AC_CHECK_LIB([mysqlclient],[main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([faad], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library)) +- AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library)) +@@ -786,6 +792,18 @@ + fi + fi + ++# samba ++if test "$use_samba" = "yes"; then ++ AC_CHECK_LIB([smbclient], [main],, ++ use_samba=no;AC_MSG_RESULT($samba_not_found)) ++else ++ AC_MSG_RESULT($samba_disabled) ++fi ++ ++if test "$use_samba" = "yes"; then ++ AC_DEFINE([HAVE_LIBSMBCLIENT], [1], [Define to 1 if you have Samba installed]) ++fi ++ + # XRandR + if test "$host_vendor" = "apple" ; then + use_xrandr="no" +@@ -1312,6 +1330,12 @@ + final_message="$final_message\n Avahi:\tNo" + fi + ++if test "$use_samba" = "yes"; then ++ final_message="$final_message\n Samba:\tYes" ++else ++ final_message="$final_message\n Samba:\tNo" ++fi ++ + if test "$host_vendor" = "apple"; then + echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h + else +diff -Naur xbmc-10.1-Dharma/guilib/system.h xbmc-10.1-Dharma.patch/guilib/system.h +--- xbmc-10.1-Dharma/guilib/system.h 2011-03-08 02:49:13.000000000 +0100 ++++ xbmc-10.1-Dharma.patch/guilib/system.h 2011-09-14 15:19:35.257592410 +0200 +@@ -58,7 +58,6 @@ + #endif + + #define HAS_FILESYSTEM +-#define HAS_FILESYSTEM_SMB + #define HAS_FILESYSTEM_CDDA + #define HAS_FILESYSTEM_RTV + #define HAS_FILESYSTEM_DAAP +@@ -67,6 +66,10 @@ + #define HAS_FILESYSTEM_HTSP + #define HAS_FILESYSTEM_MMS + ++#ifdef HAVE_LIBSMBCLIENT ++#define HAS_FILESYSTEM_SMB ++#endif ++ + /********************** + * Non-free Components + **********************/ +diff -Naur xbmc-10.1-Dharma/xbmc/GUIDialogMediaSource.cpp xbmc-10.1-Dharma.patch/xbmc/GUIDialogMediaSource.cpp +--- xbmc-10.1-Dharma/xbmc/GUIDialogMediaSource.cpp 2011-03-08 02:49:14.000000000 +0100 ++++ xbmc-10.1-Dharma.patch/xbmc/GUIDialogMediaSource.cpp 2011-09-14 17:13:07.080677066 +0200 +@@ -240,9 +240,11 @@ + share1.m_ignore = true; + extraShares.push_back(share1); + ++#ifdef HAS_FILESYSTEM_SMB + share1.strPath = "smb://"; + share1.strName = g_localizeStrings.Get(20171); + extraShares.push_back(share1); ++#endif + + share1.strPath = "upnp://"; + share1.strName = "UPnP Devices"; +@@ -282,9 +284,11 @@ + share1.strName = "ReplayTV Devices"; + extraShares.push_back(share1); + ++#ifdef HAS_FILESYSTEM_SMB + share1.strPath = "smb://"; + share1.strName = g_localizeStrings.Get(20171); + extraShares.push_back(share1); ++#endif + + share1.strPath = "hdhomerun://"; + share1.strName = "HDHomerun Devices"; +@@ -313,9 +317,11 @@ + extraShares.push_back(share1); + } + ++#ifdef HAS_FILESYSTEM_SMB + share1.strPath = "smb://"; + share1.strName = g_localizeStrings.Get(20171); + extraShares.push_back(share1); ++#endif + + share1.strPath = "upnp://"; + share1.strName = "UPnP Devices"; +diff -Naur xbmc-10.1-Dharma/xbmc/GUIDialogNetworkSetup.cpp xbmc-10.1-Dharma.patch/xbmc/GUIDialogNetworkSetup.cpp +--- xbmc-10.1-Dharma/xbmc/GUIDialogNetworkSetup.cpp 2011-03-08 02:49:14.000000000 +0100 ++++ xbmc-10.1-Dharma.patch/xbmc/GUIDialogNetworkSetup.cpp 2011-09-14 16:49:00.902517185 +0200 +@@ -128,7 +128,9 @@ + return; + + pSpin->Clear(); ++#ifdef HAS_FILESYSTEM_SMB + pSpin->AddLabel(g_localizeStrings.Get(20171), NET_PROTOCOL_SMB); ++#endif + pSpin->AddLabel(g_localizeStrings.Get(20256), NET_PROTOCOL_HTSP); + pSpin->AddLabel(g_localizeStrings.Get(20257), NET_PROTOCOL_VTP); + pSpin->AddLabel(g_localizeStrings.Get(21331), NET_PROTOCOL_TUXBOX); diff --git a/projects/ATV/options b/projects/ATV/options index 66eda69311..96d2b776d3 100644 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes" diff --git a/projects/Fusion/options b/projects/Fusion/options index 762fdf092c..66d8106597 100644 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes" diff --git a/projects/Generic/options b/projects/Generic/options index be640c8c6b..f0cdcc4b66 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 00d141fd9a..0937025cfb 100644 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes" diff --git a/projects/ION/options b/projects/ION/options index 3246e8fca7..fb482ffbc1 100644 --- a/projects/ION/options +++ b/projects/ION/options @@ -149,8 +149,11 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) - SAMBA_SERVER="yes" + SAMBA_SERVER="no" # build and install SFTP Server (yes / no) SFTP_SERVER="yes" diff --git a/projects/Intel/options b/projects/Intel/options index 0efa4debc7..fc7b98766a 100644 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes" diff --git a/projects/Ultra/options b/projects/Ultra/options index 73a151bf8f..004327fb18 100644 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -149,6 +149,9 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" +# build and install Samba Client support (yes / no) + SAMBA_CLIENT="yes" + # build and install Samba Server (yes / no) SAMBA_SERVER="yes"