1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
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/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
--- a/configure.in 2012-01-21 00:52:52.000000000 +0000
+++ b/configure.in 2012-01-29 18:46:09.544462430 +0000
@@ -85,6 +85,8 @@
x11_disabled="== X11 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. =="
@@ -325,6 +327,12 @@
[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)])],
@@ -675,6 +683,7 @@
fi
# platform common libraries
+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`"
@@ -684,6 +693,12 @@
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_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))
AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
@@ -718,7 +733,6 @@
AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ssl], [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([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
AC_CHECK_LIB([yajl], [main],, AC_MSG_ERROR($missing_library))
@@ -1704,6 +1718,12 @@
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)
@@ -1926,6 +1946,7 @@
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)
|