summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-24 02:45:07 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-24 02:45:07 +0000
commit59d7af8172b9517b8afaea3633a62cd246e1b1a2 (patch)
tree85b7976f0b3c9e7e0478f647d99787dcdb6114c1 /media-tv
parentVersion bump for stable channel release. (diff)
downloadgentoo-2-59d7af8172b9517b8afaea3633a62cd246e1b1a2.tar.gz
gentoo-2-59d7af8172b9517b8afaea3633a62cd246e1b1a2.tar.bz2
gentoo-2-59d7af8172b9517b8afaea3633a62cd246e1b1a2.zip
Make mysql support optional.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/xbmc/ChangeLog8
-rw-r--r--media-tv/xbmc/files/xbmc-9999-nomythtv.patch177
-rw-r--r--media-tv/xbmc/metadata.xml1
-rw-r--r--media-tv/xbmc/xbmc-9999.ebuild11
4 files changed, 191 insertions, 6 deletions
diff --git a/media-tv/xbmc/ChangeLog b/media-tv/xbmc/ChangeLog
index 3352ca866c65..9e6e1f6e61f5 100644
--- a/media-tv/xbmc/ChangeLog
+++ b/media-tv/xbmc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-tv/xbmc
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.105 2011/12/21 03:42:04 vapier Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.106 2012/01/24 02:45:06 vapier Exp $
+
+ 24 Jan 2012; Mike Frysinger <vapier@gentoo.org> xbmc-9999.ebuild,
+ +files/xbmc-9999-nomythtv.patch, metadata.xml:
+ Make mysql support optional.
21 Dec 2011; Mike Frysinger <vapier@gentoo.org> xbmc-9999.ebuild:
Require simplejson for the weather plugin #395365 by Pertti Kosunen.
diff --git a/media-tv/xbmc/files/xbmc-9999-nomythtv.patch b/media-tv/xbmc/files/xbmc-9999-nomythtv.patch
new file mode 100644
index 000000000000..6cd769d154d8
--- /dev/null
+++ b/media-tv/xbmc/files/xbmc-9999-nomythtv.patch
@@ -0,0 +1,177 @@
+http://trac.xbmc.org/attachment/ticket/11775
+
+make mysql support optional
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -127,13 +127,17 @@ endif
+ LIB_DIRS=\
+ lib/cximage-6.0 \
+ lib/libexif \
+- lib/cmyth \
+ lib/libhdhomerun \
+ lib/libid3tag \
+ lib/libapetag \
+ lib/cpluff \
+ lib/xbmc-dll-symbols
+
++ifeq (@BUILD_MYTHTV@,1)
++LIB_DIRS+=\
++ lib/cmyth
++endif
++
+ SS_DIRS=
+ ifeq (@USE_OPENGL@,1)
+ SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
+@@ -418,7 +422,10 @@ imagelib: dllloader
+ $(MAKE) -C lib/cximage-6.0
+
+ codecs: papcodecs dvdpcodecs
+-libs: cmyth libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so
++libs: libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so
++ifeq (@BUILD_MYTHTV@,1)
++libs: cmyth
++endif
+ externals: codecs libs visualizations screensavers
+
+ xcode_depends: \
+--- a/configure.in
++++ b/configure.in
+@@ -68,6 +68,8 @@ goom_enabled="== GOOM enabled. =="
+ goom_disabled="== GOOM disabled. =="
+ pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
+ pulse_disabled="== PulseAudio support manually disabled. =="
++mysql_not_found="Could not find required library libmysqlclient for MythTV."
++mythtv_disabled="== MythTV support disabled. =="
+ dvdcss_enabled="== DVDCSS support enabled. =="
+ dvdcss_disabled="== DVDCSS support disabled. =="
+ hal_not_found="== Could not find hal. HAL support disabled. =="
+@@ -238,6 +240,12 @@ AC_ARG_ENABLE([ffmpeg_libvorbis],
+ [use_ffmpeg_libvorbis=$enableval],
+ [use_ffmpeg_libvorbis=no])
+
++AC_ARG_ENABLE([mythtv],
++ [AS_HELP_STRING([--enable-mythtv],
++ [enable MythTV support (default is yes)])],
++ [use_mythtv=$enableval],
++ [use_mythtv=yes])
++
+ AC_ARG_ENABLE([dvdcss],
+ [AS_HELP_STRING([--enable-dvdcss],
+ [enable DVDCSS support (default is yes)])],
+@@ -563,14 +571,21 @@ else
+ fi
+
+ # platform common libraries
+-AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
+-if test $MYSQL_CONFIG = "yes"; then
+- INCLUDES="$INCLUDES `mysql_config --include`"
+- MYSQL_LIBS=`mysql_config --libs`
+- LIBS="$LIBS $MYSQL_LIBS"
+- AC_SUBST(MYSQL_LIBS)
++if test "$use_mythtv" = "yes"; then
++ AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
++ if test $MYSQL_CONFIG = "yes"; then
++ INCLUDES="$INCLUDES `mysql_config --include`"
++ MYSQL_LIBS=`mysql_config --libs`
++ LIBS="$LIBS $MYSQL_LIBS"
++ AC_SUBST(MYSQL_LIBS)
++ else
++ AC_MSG_ERROR($missing_program)
++ fi
++ AC_CHECK_LIB([mysqlclient], [main],
++ AC_DEFINE([BUILD_MYTHTV], [1], [Define to 1 to build mythtv.]),
++ AC_MSG_ERROR($mysql_not_found))
+ else
+- AC_MSG_ERROR($missing_program)
++ AC_MSG_RESULT($mythtv_disabled)
+ fi
+ AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
+@@ -594,7 +609,6 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
+-AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
+ AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
+@@ -1319,6 +1333,12 @@ else
+ final_message="$final_message\n HAL Support:\tNo"
+ fi
+
++if test "$use_mythtv" = "yes"; then
++ final_message="$final_message\n MythTV:\tYes"
++else
++ final_message="$final_message\n MythTV:\tNo"
++fi
++
+ # DVDCSS
+ if test "$use_dvdcss" = "yes"; then
+ AC_MSG_NOTICE($dvdcss_enabled)
+@@ -1490,6 +1510,7 @@ AC_SUBST(USE_EXTERNAL_FFMPEG)
+ AC_SUBST(PYTHON_VERSION)
+ AC_SUBST(OUTPUT_FILES)
+ AC_SUBST(HAVE_XBMC_NONFREE)
++AC_SUBST(BUILD_MYTHTV)
+ AC_SUBST(USE_ASAP_CODEC)
+ AC_SUBST(LIBCURL_BASENAME)
+ AC_SUBST(LIBFLAC_BASENAME)
+--- a/xbmc/dbwrappers/Database.cpp
++++ b/xbmc/dbwrappers/Database.cpp
+@@ -29,7 +29,9 @@
+ #include "utils/AutoPtrHandle.h"
+ #include "utils/log.h"
+ #include "utils/URIUtils.h"
++#ifdef BUILD_MYTHTV
+ #include "mysqldataset.h"
++#endif /* BUILD_MYTHTV */
+ #include "sqlitedataset.h"
+
+
+@@ -265,6 +267,7 @@ bool CDatabase::Open(const DatabaseSettings &settings)
+
+ m_sqlite = true;
+
++#ifdef BUILD_MYTHTV
+ if ( dbSettings.type.Equals("mysql") )
+ {
+ // check we have all information before we cancel the fallback
+@@ -274,6 +277,7 @@ bool CDatabase::Open(const DatabaseSettings &settings)
+ else
+ CLog::Log(LOGINFO, "essential mysql database information is missing (eg. host, name, user, pass)");
+ }
++#endif /* BUILD_MYTHTV */
+
+ // always safely fallback to sqlite3, and use separate, versioned database
+ if (m_sqlite)
+@@ -339,10 +343,12 @@ bool CDatabase::Connect(const DatabaseSettings &dbSettings, bool create)
+ {
+ m_pDB.reset( new SqliteDatabase() ) ;
+ }
++#ifdef BUILD_MYTHTV
+ else if (dbSettings.type.Equals("mysql"))
+ {
+ m_pDB.reset( new MysqlDatabase() ) ;
+ }
++#endif /* BUILD_MYTHTV */
+ else
+ {
+ CLog::Log(LOGERROR, "Unable to determine database type: %s", dbSettings.type.c_str());
+--- a/xbmc/dbwrappers/Makefile
++++ b/xbmc/dbwrappers/Makefile
+@@ -1,9 +1,13 @@
+ SRCS=Database.cpp \
+ dataset.cpp \
+- mysqldataset.cpp \
+ qry_dat.cpp \
+ sqlitedataset.cpp \
+
++ifeq (@BUILD_MYTHTV@,1)
++SRCS+=\
++ mysqldataset.cpp
++endif
++
+ LIB=dbwrappers.a
+
+ include ../../Makefile.include
diff --git a/media-tv/xbmc/metadata.xml b/media-tv/xbmc/metadata.xml
index 035500e5d94d..313797b64da7 100644
--- a/media-tv/xbmc/metadata.xml
+++ b/media-tv/xbmc/metadata.xml
@@ -8,6 +8,7 @@
<flag name='goom'>Enable GOOM visualization plugin</flag>
<flag name='midi'>Support MIDI files</flag>
<flag name='projectm'>Enable projectM visualization plugin</flag>
+ <flag name='pvr'>Enable MythTV support</flag>
<flag name="rtmp">Enable Real Time Messaging Protocol using librtmp</flag>
<flag name='rsxs'>Enable really slick X screensavers</flag>
<flag name='vaapi'>Enables VAAPI (Video Acceleration API) for hardware decoding</flag>
diff --git a/media-tv/xbmc/xbmc-9999.ebuild b/media-tv/xbmc/xbmc-9999.ebuild
index ee7f7819cd5b..781b2c556a65 100644
--- a/media-tv/xbmc/xbmc-9999.ebuild
+++ b/media-tv/xbmc/xbmc-9999.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-9999.ebuild,v 1.94 2011/12/21 03:42:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-9999.ebuild,v 1.95 2012/01/24 02:45:07 vapier Exp $
EAPI="2"
@@ -22,7 +22,7 @@ HOMEPAGE="http://xbmc.org/"
LICENSE="GPL-2"
SLOT="0"
-IUSE="airplay alsa altivec avahi bluray css debug goom joystick midi profile +projectm pulseaudio +rsxs rtmp +samba sse sse2 udev vaapi vdpau webserver +xrandr"
+IUSE="airplay alsa altivec avahi bluray css debug goom joystick midi profile +projectm pulseaudio pvr +rsxs rtmp +samba sse sse2 udev vaapi vdpau webserver +xrandr"
COMMON_DEPEND="virtual/opengl
app-arch/bzip2
@@ -75,7 +75,7 @@ COMMON_DEPEND="virtual/opengl
samba? ( >=net-fs/samba-3.4.6[smbclient] )
sys-apps/dbus
sys-libs/zlib
- virtual/mysql
+ pvr? ( virtual/mysql )
x11-apps/xdpyinfo
x11-apps/mesa-progs
vaapi? ( x11-libs/libva )
@@ -110,6 +110,8 @@ src_unpack() {
}
src_prepare() {
+ epatch "${FILESDIR}"/${PN}-9999-nomysql.patch
+
# some dirs ship generated autotools, some dont
local d
for d in \
@@ -178,6 +180,7 @@ src_configure() {
$(use_enable profile profiling) \
$(use_enable projectm) \
$(use_enable pulseaudio pulse) \
+ $(use_enable pvr mythtv) \
$(use_enable rsxs) \
$(use_enable rtmp) \
$(use_enable samba) \