Files
macports-ports/math/libsvm/files/patch-tools.diff
nilasonandPerry E. Metzger a9e549e1e0 libsvm: update to version 3.32
The version update follows a general overhaul of the port and:
- python subports replaces the python variants
- the tools variant is not included by default
- the java variant has been dropped
2023-10-22 21:42:17 -04:00

36 lines
1.2 KiB
Diff

--- tools/grid.py.orig
+++ tools/grid.py
@@ -18,8 +18,8 @@
def __init__(self, dataset_pathname, options):
dirname = os.path.dirname(__file__)
if sys.platform != 'win32':
- self.svmtrain_pathname = os.path.join(dirname, '../svm-train')
- self.gnuplot_pathname = '/usr/bin/gnuplot'
+ self.svmtrain_pathname = '@PREFIX@/bin/svm-train'
+ self.gnuplot_pathname = '@PREFIX@/bin/gnuplot'
else:
# example for windows
self.svmtrain_pathname = os.path.join(dirname, r'..\windows\svm-train.exe')
--- tools/easy.py.orig
+++ tools/easy.py
@@ -12,11 +12,11 @@
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmscale_exe = "../svm-scale"
- svmtrain_exe = "../svm-train"
- svmpredict_exe = "../svm-predict"
- grid_py = "./grid.py"
- gnuplot_exe = "/usr/bin/gnuplot"
+ svmscale_exe = "@PREFIX@/bin/svm-scale"
+ svmtrain_exe = "@PREFIX@/bin/svm-train"
+ svmpredict_exe = "@PREFIX@/bin/svm-predict"
+ grid_py = "@PREFIX@/bin/snm-grid.py"
+ gnuplot_exe = "@PREFIX@/bin/gnuplot"
else:
# example for windows
svmscale_exe = r"..\windows\svm-scale.exe"