summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kdesvn
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/applications/kdesvn')
-rw-r--r--redhat/applications/kdesvn/kdesvn-3.5.13-fix_not_a_string_literal_error.patch127
-rw-r--r--redhat/applications/kdesvn/trinity-kdesvn.spec42
2 files changed, 155 insertions, 14 deletions
diff --git a/redhat/applications/kdesvn/kdesvn-3.5.13-fix_not_a_string_literal_error.patch b/redhat/applications/kdesvn/kdesvn-3.5.13-fix_not_a_string_literal_error.patch
new file mode 100644
index 000000000..c912db32b
--- /dev/null
+++ b/redhat/applications/kdesvn/kdesvn-3.5.13-fix_not_a_string_literal_error.patch
@@ -0,0 +1,127 @@
+--- kdesvn/src/svnqt/cache/LogCache.cpp.stringliteral 2011-08-17 23:41:23.000000000 +0200
++++ kdesvn/src/svnqt/cache/LogCache.cpp 2012-08-05 12:44:59.038119225 +0200
+@@ -187,7 +187,7 @@
+ TQDataBase db = TQSqlDatabase::addDatabase(SQLTYPE,_key);
+ db->setDatabaseName(m_BasePath+"/maindb.db");
+ if (!db->open()) {
+- qWarning("Failed to open main database: " + db->lastError().text());
++ qWarning("%s", (TQString("Failed to open main database: " + db->lastError().text())).ascii());
+ } else {
+ m_mainDB.setLocalData(new ThreadDBStore);
+ m_mainDB.localData()->key = _key;
+@@ -269,12 +269,12 @@
+ #endif
+ TQDataBase mainDB = m_CacheData->getMainDB();
+ if (!mainDB || !mainDB->open()) {
+- qWarning("Failed to open main database: " + (mainDB?mainDB->lastError().text():"No database object."));
++ qWarning("%s", ("Failed to open main database: " + (mainDB?mainDB->lastError().text():"No database object.")).ascii());
+ } else {
+ TQSqlQuery q(TQString(), mainDB);
+ mainDB->transaction();
+ if (!q.exec("CREATE TABLE IF NOT EXISTS \""+TQString(SQLMAINTABLE)+"\" (\"reposroot\" TEXT,\"id\" INTEGER PRIMARY KEY NOT NULL);")) {
+- qWarning("Failed create main database: " + mainDB->lastError().text());
++ qWarning("%s", ("Failed create main database: " + mainDB->lastError().text()).ascii());
+ }
+ mainDB->commit();
+ }
+@@ -321,7 +321,7 @@
+ TQSqlQuery cur(TQString(),mainDB);
+ cur.prepare(s_q);
+ if (!cur.exec()) {
+- qDebug(cur.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(cur.lastError().text().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text());
+ return _res;
+ }
+--- kdesvn/src/svnqt/cache/ReposLog.cpp.ORI 2012-08-05 12:50:50.352685697 +0200
++++ kdesvn/src/svnqt/cache/ReposLog.cpp 2012-08-05 12:55:39.515888432 +0200
+@@ -68,7 +68,7 @@
+ TQString q("select revision from 'logentries' order by revision DESC limit 1");
+ TQSqlQuery _q(TQString(), m_Database);
+ if (!_q.exec(q)) {
+- qDebug(_q.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(_q.lastError().text().TOUTF8().data())).ascii());
+ return svn::Revision::UNDEFINED;
+ }
+ int _r;
+@@ -76,7 +76,7 @@
+ //qDebug("Sel result: %s",_q.value(0).toString().TOUTF8().data());
+ _r = _q.value(0).toInt();
+ } else {
+- qDebug(_q.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(_q.lastError().text().TOUTF8().data())).ascii());
+ return svn::Revision::UNDEFINED;
+ }
+ return _r;
+@@ -197,7 +197,7 @@
+ bcount.bindValue(0,TQ_LLONG(end.revnum()));
+ bcount.bindValue(1,TQ_LLONG(start.revnum()));
+ if (!bcount.exec()) {
+- qDebug(bcount.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(bcount.lastError().text().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve count: ")+bcount.lastError().text());
+ return false;
+ }
+@@ -211,7 +211,7 @@
+ bcur.bindValue(1,TQ_LLONG(start.revnum()));
+
+ if (!bcur.exec()) {
+- qDebug(bcur.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(bcur.lastError().text().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+bcur.lastError().text());
+ return false;
+ }
+@@ -220,7 +220,7 @@
+ revision = bcur.value(0).toLongLong();
+ cur.bindValue(0,revision);
+ if (!cur.exec()) {
+- qDebug(cur.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(cur.lastError().text().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not retrieve values: ")+cur.lastError().text()
+ ,cur.lastError().number());
+ return false;
+@@ -264,7 +264,7 @@
+ TQSqlQuery query("select revision,date from logentries order by revision desc limit 1",m_Database);
+
+ if (query.lastError().type()!=TQSqlError::None) {
+- qDebug(query.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(query.lastError().text().TOUTF8().data())).ascii());
+ }
+ bool must_remote=!noNetwork;
+ if (query.next()) {
+@@ -283,7 +283,7 @@
+ query.bindValue(0,TQ_LLONG(aRev.date()));
+ query.exec();
+ if (query.lastError().type()!=TQSqlError::None) {
+- qDebug(query.lastError().text().TOUTF8().data());
++ qDebug("%s", (TQString(query.lastError().text().TOUTF8().data())).ascii());
+ }
+ if (query.next()) {
+ return query.value(0).toInt();
+@@ -320,7 +320,7 @@
+ if (!_q.exec()) {
+ m_Database->rollback();
+ qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
+- qDebug(_q.lastQuery().TOUTF8().data());
++ qDebug("%s", (TQString(_q.lastQuery().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
+ }
+ _q.prepare(qPathes);
+@@ -334,7 +334,7 @@
+ if (!_q.exec()) {
+ m_Database->rollback();
+ qDebug("Could not insert values: %s",_q.lastError().text().TOUTF8().data());
+- qDebug(_q.lastQuery().TOUTF8().data());
++ qDebug("%s", (TQString(_q.lastQuery().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not insert values: ")+_q.lastError().text(),_q.lastError().number());
+ }
+ }
+@@ -375,7 +375,7 @@
+ _q.prepare(query_string);
+ if (!_q.exec()) {
+ qDebug("Could not select values: %s",_q.lastError().text().TOUTF8().data());
+- qDebug(_q.lastQuery().TOUTF8().data());
++ qDebug("%s", (TQString(_q.lastQuery().TOUTF8().data())).ascii());
+ throw svn::cache::DatabaseException(TQString("Could not select values: ")+_q.lastError().text(),_q.lastError().number());
+ }
+ while(_q.next()) {
diff --git a/redhat/applications/kdesvn/trinity-kdesvn.spec b/redhat/applications/kdesvn/trinity-kdesvn.spec
index 8e7f0c065..ce67e8923 100644
--- a/redhat/applications/kdesvn/trinity-kdesvn.spec
+++ b/redhat/applications/kdesvn/trinity-kdesvn.spec
@@ -2,24 +2,27 @@
%define kdecomp kdesvn
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
-%if "%{?_prefix}" != "/usr"
+%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif
# TDE 3.5.13 specific building variables
-BuildRequires: autoconf automake libtool m4
-%define tde_bindir %{_prefix}/bin
-%define tde_datadir %{_prefix}/share
+%define tde_bindir %{tde_prefix}/bin
+%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
-%define tde_includedir %{_prefix}/include
-%define tde_libdir %{_prefix}/%{_lib}
+%define tde_includedir %{tde_prefix}/include
+%define tde_libdir %{tde_prefix}/%{_lib}
%define tde_mandir %{tde_datadir}/man
+%define tde_appdir %{tde_datadir}/applications
-%define tde_tdeappdir %{tde_datadir}/applications/kde
+%define tde_tdeappdir %{tde_appdir}/kde
%define tde_tdedocdir %{tde_docdir}/kde
%define tde_tdeincludedir %{tde_includedir}/kde
%define tde_tdelibdir %{tde_libdir}/trinity
+%define _docdir %{tde_docdir}
+
+
Name: trinity-%{kdecomp}
Summary: subversion client with tight KDE integration [Trinity]
Version: 1.0.4
@@ -39,6 +42,8 @@ Source0: %{kdecomp}-3.5.13.tar.gz
# [kdesvn] Fix compilation with GCC 4.7
Patch1: kdesvn-3.5.13-fix_gcc47_compilation.patch
+# [kdesvn] Fix "not a string literal" error
+Patch2: kdesvn-3.5.13-fix_not_a_string_literal_error.patch
BuildRequires: tqtinterface-devel
BuildRequires: trinity-tdelibs-devel
@@ -98,18 +103,19 @@ This package is part of tdesvn-trinity.
%prep
%setup -q -n applications/%{kdecomp}
%patch1 -p1
+%patch2 -p1 -b .stringliteral
# Ugly hack to modify TQT include directory inside autoconf files.
# If TQT detection fails, it fallbacks to TQT4 instead of TQT3 !
find . -name CMakeLists.txt -exec %__sed -i {} \
- -e "s,/usr/include/tqt,%{_includedir}/tqt,g" \
- -e "s,/usr/bin/tmoc,%{_bindir}/tmoc,g" \
- -e "s,/usr/bin/uic-tqt,%{_bindir}/uic-tqt,g" \
+ -e "s,/usr/include/tqt,%{tde_includedir}/tqt,g" \
+ -e "s,/usr/bin/tmoc,%{tde_bindir}/tmoc,g" \
+ -e "s,/usr/bin/uic-tqt,%{tde_bindir}/uic-tqt,g" \
\;
# More ugly hack to add TQT include directory in CMakeLists.txt
%__sed -i CMakeLists.txt \
- -e "s,^\(INCLUDE_DIRECTORIES (\)$,\1\n%{_includedir}/tqt,"
+ -e "s,^\(INCLUDE_DIRECTORIES (\)$,\1\n%{tde_includedir}/tqt,"
# Moves HTML files to the correect location
find . -name "*.cmake" -exec %__sed -i {} \
@@ -118,15 +124,23 @@ find . -name "*.cmake" -exec %__sed -i {} \
%build
unset QTDIR; . /etc/profile.d/qt.sh
-export PATH="%{_bindir}:${QTDIR}/bin:${PATH}"
-export LDFLAGS="-L%{_libdir} -I%{_includedir}"
+export PATH="%{tde_bindir}:${QTDIR}/bin:${PATH}"
+export LDFLAGS="-L%{tde_libdir} -I%{tde_includedir}"
+
+export CMAKE_INCLUDE_PATH="%{tde_tdeincludedir}"
+
+%if 0%{?rhel} || 0%{?fedora}
+%__mkdir_p build
+cd build
+%endif
-%{?!mgaversion:%__mkdir build; cd build}
%cmake \
+ -DCMAKE_INSTALL_PREFIX=%{tde_prefix} \
-DBIN_INSTALL_DIR=%{tde_bindir} \
-DINCLUDE_INSTALL_DIR=%{tde_includedir} \
-DLIB_INSTALL_DIR=%{tde_libdir} \
-DMAN_INSTALL_DIR=%{tde_mandir}/man1 \
+ -DDATA_INSTALL_DIR=%{tde_datadir} \
-DPKGCONFIG_INSTALL_DIR=%{tde_tdelibdir}/pkgconfig \
-DSHARE_INSTALL_PREFIX=%{tde_datadir} \
-DCMAKE_SKIP_RPATH="OFF" \