Support both Qt3 and Qt4

epel8
Ding-Yi Chen 17 years ago
parent 6eeb2b56fa
commit f58faf6c99

@ -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:

@ -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 <dchen@redhat.com> - 2.86-3
* Wed Mar 12 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-4
- Support both Qt3 for F8 and earlier, and Qt4 for F9
* Tue Mar 11 2008 Ding-Yi Chen <dchen@redhat.com> - 2.86-0

Loading…
Cancel
Save