From f58faf6c993efec789e1735b2c320b447170fd71 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Wed, 2 Apr 2008 05:31:16 +0000 Subject: [PATCH] Support both Qt3 and Qt4 --- libsvm-2.86.patch | 6 +++--- libsvm.spec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libsvm-2.86.patch b/libsvm-2.86.patch index a33b271..9a3e6b0 100644 --- a/libsvm-2.86.patch +++ b/libsvm-2.86.patch @@ -371,7 +371,7 @@ diff -up ./FAQ.html.orig ./FAQ.html diff -up ./svm-predict.c.orig ./svm-predict.c diff -up ./svm-toy/qt/Makefile.orig ./svm-toy/qt/Makefile --- ./svm-toy/qt/Makefile.orig 2007-10-14 16:29:12.000000000 +1000 -+++ ./svm-toy/qt/Makefile 2008-04-02 14:46:28.000000000 +1000 ++++ ./svm-toy/qt/Makefile 2008-04-02 15:27:24.000000000 +1000 @@ -1,19 +1,46 @@ CXX? = g++ -CFLAGS = -Wall -O3 -DQT_THREAD_SUPPORT @@ -390,7 +390,7 @@ diff -up ./svm-toy/qt/Makefile.orig ./svm-toy/qt/Makefile -svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o - $(CXX) -I$(INCLUDE) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy -L$(LIB) -lqt-mt +ifdef QT4_DIR -+ QTDIR=${QT4_DIR} ++ QTDIR=/usr/lib/qt4 + BIN = ${QTDIR}/bin + FLAGS=${CFLAGS} -I/usr/include/Qt -DQT3_SUPPORT `pkg-config --cflags --libs Qt3Support QtGui` +else @@ -427,7 +427,7 @@ diff -up ./svm-toy/qt/Makefile.orig ./svm-toy/qt/Makefile + echo "FLAGS=${FLAGS}" + cp svm-toy.cpp svm-toy.new.cpp +ifdef QT4_DIR -+ ${BIN}/qt3to4 -alwaysOverwrite svm-toy.new.cpp ++ /usr/lib/qt4/bin/qt3to4 -alwaysOverwrite svm-toy.new.cpp +endif + clean: diff --git a/libsvm.spec b/libsvm.spec index 24c6ddf..9838ae4 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,6 +1,6 @@ Name: libsvm Version: 2.86 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -203,7 +203,7 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Wed Mar 12 2008 Ding-Yi Chen - 2.86-3 +* Wed Mar 12 2008 Ding-Yi Chen - 2.86-4 - Support both Qt3 for F8 and earlier, and Qt4 for F9 * Tue Mar 11 2008 Ding-Yi Chen - 2.86-0