1 |
vapier 12/02/04 19:50:24 |
2 |
|
3 |
Modified: xbmc-9999-nomythtv.patch |
4 |
Log: |
5 |
Split mysql/mythtv support #401653. |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 media-tv/xbmc/files/xbmc-9999-nomythtv.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-9999-nomythtv.patch?rev=1.3&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-9999-nomythtv.patch?rev=1.3&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-9999-nomythtv.patch?r1=1.2&r2=1.3 |
13 |
|
14 |
Index: xbmc-9999-nomythtv.patch |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/media-tv/xbmc/files/xbmc-9999-nomythtv.patch,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- xbmc-9999-nomythtv.patch 27 Jan 2012 22:49:50 -0000 1.2 |
21 |
+++ xbmc-9999-nomythtv.patch 4 Feb 2012 19:50:24 -0000 1.3 |
22 |
@@ -1,6 +1,6 @@ |
23 |
-http://trac.xbmc.org/attachment/ticket/11775 |
24 |
+http://trac.xbmc.org/ticket/11775 |
25 |
|
26 |
-make mysql support optional |
27 |
+make mysql/mythtv support optional |
28 |
|
29 |
--- a/Makefile.in |
30 |
+++ b/Makefile.in |
31 |
@@ -37,29 +37,36 @@ |
32 |
xcode_depends: \ |
33 |
--- a/configure.in |
34 |
+++ b/configure.in |
35 |
-@@ -68,6 +68,8 @@ goom_enabled="== GOOM enabled. ==" |
36 |
+@@ -68,6 +68,9 @@ goom_enabled="== GOOM enabled. ==" |
37 |
goom_disabled="== GOOM disabled. ==" |
38 |
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. ==" |
39 |
pulse_disabled="== PulseAudio support manually disabled. ==" |
40 |
-+mysql_not_found="Could not find required library libmysqlclient for MythTV." |
41 |
++mysql_not_found="Could not find libmysqlclient. MySQL (and MythTV) support disabled. ==" |
42 |
++mysql_disabled="== MySQL support disabled. ==" |
43 |
+mythtv_disabled="== MythTV support disabled. ==" |
44 |
dvdcss_enabled="== DVDCSS support enabled. ==" |
45 |
dvdcss_disabled="== DVDCSS support disabled. ==" |
46 |
hal_not_found="== Could not find hal. HAL support disabled. ==" |
47 |
-@@ -238,6 +240,12 @@ AC_ARG_ENABLE([ffmpeg_libvorbis], |
48 |
+@@ -238,6 +241,18 @@ AC_ARG_ENABLE([ffmpeg_libvorbis], |
49 |
[use_ffmpeg_libvorbis=$enableval], |
50 |
[use_ffmpeg_libvorbis=no]) |
51 |
|
52 |
++AC_ARG_ENABLE([mysql], |
53 |
++ [AS_HELP_STRING([--enable-mysql], |
54 |
++ [enable MySQL support (default is auto)])], |
55 |
++ [use_mysql=$enableval], |
56 |
++ [use_mysql=auto]) |
57 |
++ |
58 |
+AC_ARG_ENABLE([mythtv], |
59 |
+ [AS_HELP_STRING([--enable-mythtv], |
60 |
-+ [enable MythTV support (default is yes)])], |
61 |
++ [enable MythTV support (default is auto)])], |
62 |
+ [use_mythtv=$enableval], |
63 |
-+ [use_mythtv=yes]) |
64 |
++ [use_mythtv=auto]) |
65 |
+ |
66 |
AC_ARG_ENABLE([dvdcss], |
67 |
[AS_HELP_STRING([--enable-dvdcss], |
68 |
[enable DVDCSS support (default is yes)])], |
69 |
-@@ -563,14 +571,21 @@ else |
70 |
+@@ -563,14 +578,30 @@ else |
71 |
fi |
72 |
|
73 |
# platform common libraries |
74 |
@@ -69,26 +76,36 @@ |
75 |
- MYSQL_LIBS=`mysql_config --libs` |
76 |
- LIBS="$LIBS $MYSQL_LIBS" |
77 |
- AC_SUBST(MYSQL_LIBS) |
78 |
-+if test "$use_mythtv" = "yes"; then |
79 |
+-else |
80 |
+- AC_MSG_ERROR($missing_program) |
81 |
++have_mysql=no |
82 |
++if test "$use_mysql" != "no"; then |
83 |
+ AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no") |
84 |
+ if test $MYSQL_CONFIG = "yes"; then |
85 |
+ INCLUDES="$INCLUDES `mysql_config --include`" |
86 |
+ MYSQL_LIBS=`mysql_config --libs` |
87 |
+ LIBS="$LIBS $MYSQL_LIBS" |
88 |
+ AC_SUBST(MYSQL_LIBS) |
89 |
-+ else |
90 |
-+ AC_MSG_ERROR($missing_program) |
91 |
++ AC_CHECK_LIB([mysqlclient], [main], have_mysql=yes) |
92 |
+ fi |
93 |
-+ AC_CHECK_LIB([mysqlclient], [main], |
94 |
++fi |
95 |
++if test "$have_mysql" = "yes"; then |
96 |
++ AC_DEFINE([BUILD_MYSQL], [1], [Define to 1 to build MySQL.]) |
97 |
++ AC |
98 |
++ if test "$use_mysql" != "no"; then |
99 |
+ AC_DEFINE([BUILD_MYTHTV], [1], [Define to 1 to build mythtv.]), |
100 |
-+ AC_MSG_ERROR($mysql_not_found)) |
101 |
- else |
102 |
-- AC_MSG_ERROR($missing_program) |
103 |
-+ AC_MSG_RESULT($mythtv_disabled) |
104 |
++ fi |
105 |
++elif test "$use_mysql" = "yes" || test "$use_mythtv" = "yes"; then |
106 |
++ AC_MSG_ERROR([$mysql_not_found]) |
107 |
++else |
108 |
++ use_mysql=no |
109 |
++ AC_MSG_NOTICE($mysql_disabled) |
110 |
++ use_mythtv=no |
111 |
++ AC_MSG_NOTICE($mythtv_disabled) |
112 |
fi |
113 |
AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library)) |
114 |
AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library)) |
115 |
-@@ -594,7 +609,6 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library)) |
116 |
+@@ -594,7 +625,6 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library)) |
117 |
AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library)) |
118 |
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library)) |
119 |
AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library)) |
120 |
@@ -96,10 +113,16 @@ |
121 |
AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh])) |
122 |
AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library)) |
123 |
AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth])) |
124 |
-@@ -1319,6 +1333,12 @@ else |
125 |
+@@ -1319,6 +1349,18 @@ else |
126 |
final_message="$final_message\n HAL Support:\tNo" |
127 |
fi |
128 |
|
129 |
++if test "$use_mysql" = "yes"; then |
130 |
++ final_message="$final_message\n MySQL:\tYes" |
131 |
++else |
132 |
++ final_message="$final_message\n MySQL:\tNo" |
133 |
++fi |
134 |
++ |
135 |
+if test "$use_mythtv" = "yes"; then |
136 |
+ final_message="$final_message\n MythTV:\tYes" |
137 |
+else |
138 |
@@ -109,10 +132,11 @@ |
139 |
# DVDCSS |
140 |
if test "$use_dvdcss" = "yes"; then |
141 |
AC_MSG_NOTICE($dvdcss_enabled) |
142 |
-@@ -1490,6 +1510,7 @@ AC_SUBST(USE_EXTERNAL_FFMPEG) |
143 |
+@@ -1490,6 +1532,8 @@ AC_SUBST(USE_EXTERNAL_FFMPEG) |
144 |
AC_SUBST(PYTHON_VERSION) |
145 |
AC_SUBST(OUTPUT_FILES) |
146 |
AC_SUBST(HAVE_XBMC_NONFREE) |
147 |
++AC_SUBST(BUILD_MYSQL) |
148 |
+AC_SUBST(BUILD_MYTHTV) |
149 |
AC_SUBST(USE_ASAP_CODEC) |
150 |
AC_SUBST(LIBCURL_BASENAME) |
151 |
@@ -123,38 +147,39 @@ |
152 |
#include "utils/AutoPtrHandle.h" |
153 |
#include "utils/log.h" |
154 |
#include "utils/URIUtils.h" |
155 |
-+#ifdef BUILD_MYTHTV |
156 |
++#ifdef BUILD_MYSQL |
157 |
#include "mysqldataset.h" |
158 |
-+#endif /* BUILD_MYTHTV */ |
159 |
++#endif /* BUILD_MYSQL */ |
160 |
#include "sqlitedataset.h" |
161 |
|
162 |
|
163 |
-@@ -265,6 +267,7 @@ bool CDatabase::Open(const DatabaseSettings &settings) |
164 |
+@@ -266,6 +268,7 @@ |
165 |
|
166 |
m_sqlite = true; |
167 |
|
168 |
-+#ifdef BUILD_MYTHTV |
169 |
++#ifdef BUILD_MYSQL |
170 |
if ( dbSettings.type.Equals("mysql") ) |
171 |
{ |
172 |
// check we have all information before we cancel the fallback |
173 |
-@@ -274,6 +277,7 @@ bool CDatabase::Open(const DatabaseSettings &settings) |
174 |
- else |
175 |
- CLog::Log(LOGINFO, "essential mysql database information is missing (eg. host, name, user, pass)"); |
176 |
+@@ -276,7 +279,8 @@ |
177 |
+ CLog::Log(LOGINFO, "Essential mysql database information is missing. Require at least host, user and pass defined."); |
178 |
} |
179 |
-+#endif /* BUILD_MYTHTV */ |
180 |
- |
181 |
- // always safely fallback to sqlite3, and use separate, versioned database |
182 |
- if (m_sqlite) |
183 |
-@@ -339,10 +343,12 @@ bool CDatabase::Connect(const DatabaseSettings &dbSettings, bool create) |
184 |
+ else |
185 |
++#endif /* BUILD_MYSQL */ |
186 |
+ { |
187 |
+ dbSettings.type = "sqlite3"; |
188 |
+ dbSettings.host = _P(g_settings.GetDatabaseFolder()); |
189 |
+ dbSettings.name = GetBaseDBName(); |
190 |
+@@ -369,10 +373,12 @@ |
191 |
{ |
192 |
m_pDB.reset( new SqliteDatabase() ) ; |
193 |
} |
194 |
-+#ifdef BUILD_MYTHTV |
195 |
++#ifdef BUILD_MYSQL |
196 |
else if (dbSettings.type.Equals("mysql")) |
197 |
{ |
198 |
m_pDB.reset( new MysqlDatabase() ) ; |
199 |
} |
200 |
-+#endif /* BUILD_MYTHTV */ |
201 |
++#endif /* BUILD_MYSQL */ |
202 |
else |
203 |
{ |
204 |
CLog::Log(LOGERROR, "Unable to determine database type: %s", dbSettings.type.c_str()); |
205 |
@@ -167,7 +192,7 @@ |
206 |
qry_dat.cpp \ |
207 |
sqlitedataset.cpp \ |
208 |
|
209 |
-+ifeq (@BUILD_MYTHTV@,1) |
210 |
++ifeq (@BUILD_MYSQL@,1) |
211 |
+SRCS+=\ |
212 |
+ mysqldataset.cpp |
213 |
+endif |