From a5205db2cb63dfff3acc2f67dd55e7b2387959a3 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Thu, 30 Aug 2007 06:09:57 +0000 Subject: [PATCH] /tmp/python.ver issue. --- libsvm-2.84-2.patch => libsvm-2.84-4.patch | 31 +++++++++------------- libsvm.spec | 9 ++++--- 2 files changed, 17 insertions(+), 23 deletions(-) rename libsvm-2.84-2.patch => libsvm-2.84-4.patch (82%) diff --git a/libsvm-2.84-2.patch b/libsvm-2.84-4.patch similarity index 82% rename from libsvm-2.84-2.patch rename to libsvm-2.84-4.patch index b5062e3..895770a 100644 --- a/libsvm-2.84-2.patch +++ b/libsvm-2.84-4.patch @@ -1,6 +1,6 @@ diff -up ./Makefile.orig ./Makefile ---- ./Makefile.orig 2007-08-22 15:23:34.000000000 +1000 -+++ ./Makefile 2007-08-27 15:48:58.000000000 +1000 +--- ./Makefile.orig 2007-08-30 15:29:42.000000000 +1000 ++++ ./Makefile 2007-08-30 15:30:25.000000000 +1000 @@ -1,7 +1,31 @@ CXXC = g++ CFLAGS = -Wall -O3 @@ -81,15 +81,15 @@ diff -up ./Makefile.orig ./Makefile + ${MAKE} -C python clean + diff -up ./python/Makefile.orig ./python/Makefile ---- ./python/Makefile.orig 2007-08-27 11:11:38.000000000 +1000 -+++ ./python/Makefile 2007-08-29 17:38:14.000000000 +1000 -@@ -2,13 +2,19 @@ CC = g++ +--- ./python/Makefile.orig 2007-08-30 15:29:49.000000000 +1000 ++++ ./python/Makefile 2007-08-30 16:03:46.000000000 +1000 +@@ -2,7 +2,14 @@ CC = g++ SWIG ?= swig #Windows: see ../README ../Makefile.win -PYTHON_INCLUDEDIR ?= /usr/include/python2.4 -+PYTHON_VERSION=${shell python -V 2> /tmp/python.ver ; cat /tmp/python.ver | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$$2,$$3)}'; rm -f /tmp/python.ver} -+ ++PYTHON_TEMP:=${shell mktemp} ++PYTHON_VERSION:=${shell python -V 2> ${PYTHON_TEMP} ; cat ${PYTHON_TEMP} | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$$2,$$3)}'; rm -f ${PYTHON_TEMP}} +ifndef PYTHON_INCLUDEDIR + +PYTHON_INCLUDEDIR?= /usr/include/python${PYTHON_VERSION} @@ -99,13 +99,7 @@ diff -up ./python/Makefile.orig ./python/Makefile CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I.. LDFLAGS = -shared - # Mac OS - # LDFLAGS = -framework Python -bundle -- - all: svmc.so - - svmc.so: svmc_wrap.o svm.o -@@ -28,3 +34,19 @@ clean: +@@ -28,3 +35,19 @@ clean: moreclean: clean rm -f svmc_wrap.c @@ -126,8 +120,8 @@ diff -up ./python/Makefile.orig ./python/Makefile + + diff -up ./tools/grid.py.orig ./tools/grid.py ---- ./tools/grid.py.orig 2007-08-28 11:48:03.000000000 +1000 -+++ ./tools/grid.py 2007-08-28 11:58:22.000000000 +1000 +--- ./tools/grid.py.orig 2007-08-30 15:30:17.000000000 +1000 ++++ ./tools/grid.py 2007-08-30 15:30:25.000000000 +1000 @@ -11,7 +11,7 @@ from string import find, split, join, at is_win32 = (sys.platform == 'win32') @@ -138,8 +132,8 @@ diff -up ./tools/grid.py.orig ./tools/grid.py else: # example for windows diff -up ./tools/easy.py.orig ./tools/easy.py ---- ./tools/easy.py.orig 2007-08-28 11:47:53.000000000 +1000 -+++ ./tools/easy.py 2007-08-28 12:13:58.000000000 +1000 +--- ./tools/easy.py.orig 2007-08-30 15:30:04.000000000 +1000 ++++ ./tools/easy.py 2007-08-30 15:30:25.000000000 +1000 @@ -11,10 +11,10 @@ if len(sys.argv) <= 1: is_win32 = (sys.platform == 'win32') @@ -155,4 +149,3 @@ diff -up ./tools/easy.py.orig ./tools/easy.py gnuplot_exe = "/usr/bin/gnuplot" else: # example for windows -diff -up ./tools/subset.py.orig ./tools/subset.py diff --git a/libsvm.spec b/libsvm.spec index 02925e6..e32609a 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,6 +1,6 @@ Name: libsvm Version: 2.84 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -10,7 +10,7 @@ Source0: %{name}-%{version}.tar.gz #Source0: http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/%{name}+tar.gz Source1: ChangeLog #Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log -Patch0: libsvm-2.84-2.patch +Patch0: libsvm-2.84-4.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibc-devel dos2unix @@ -88,8 +88,9 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Aug 30 2007 Ding-Yi Chen - 2.84-3 -- Refined description. +* Thu Aug 30 2007 Ding-Yi Chen - 2.84-4 +- Refined description. +- Fix the /tmp/python.ver problem * Mon Aug 27 2007 Ding-Yi Chen - 2.84-3 - Fix dependency problem