[arch-commits] Commit in libsvm/repos/community-x86_64 (8 files)
Daniel Bermond
dbermond at archlinux.org
Sat Jun 26 00:49:46 UTC 2021
Date: Saturday, June 26, 2021 @ 00:49:45
Author: dbermond
Revision: 967506
archrelease: copy trunk to community-x86_64
Added:
libsvm/repos/community-x86_64/010-libsvm-fix-qt-headers-path.patch
(from rev 967505, libsvm/trunk/010-libsvm-fix-qt-headers-path.patch)
libsvm/repos/community-x86_64/020-libsvm-use-archlinux-flags.patch
(from rev 967505, libsvm/trunk/020-libsvm-use-archlinux-flags.patch)
libsvm/repos/community-x86_64/030-libsvm-fix-tools-path.patch
(from rev 967505, libsvm/trunk/030-libsvm-fix-tools-path.patch)
libsvm/repos/community-x86_64/PKGBUILD
(from rev 967505, libsvm/trunk/PKGBUILD)
Deleted:
libsvm/repos/community-x86_64/010-libsvm-fix-qt-headers-path.patch
libsvm/repos/community-x86_64/020-libsvm-use-archlinux-flags.patch
libsvm/repos/community-x86_64/030-libsvm-fix-tools-path.patch
libsvm/repos/community-x86_64/PKGBUILD
--------------------------------------+
010-libsvm-fix-qt-headers-path.patch | 23 ++--
020-libsvm-use-archlinux-flags.patch | 94 +++++++++----------
030-libsvm-fix-tools-path.patch | 63 ++++++-------
PKGBUILD | 159 ++++++++++++++-------------------
4 files changed, 163 insertions(+), 176 deletions(-)
Deleted: 010-libsvm-fix-qt-headers-path.patch
===================================================================
--- 010-libsvm-fix-qt-headers-path.patch 2021-06-26 00:49:07 UTC (rev 967505)
+++ 010-libsvm-fix-qt-headers-path.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -1,12 +0,0 @@
-diff -Naurp a/svm-toy/qt/Makefile b/svm-toy/qt/Makefile
---- a/svm-toy/qt/Makefile 2018-12-04 18:34:40.715220500 +0000
-+++ b/svm-toy/qt/Makefile 2018-12-04 18:45:00.689709128 +0000
-@@ -1,7 +1,7 @@
- # use ``export QT_SELECT=qt5'' in a command window for using qt5
- # may need to adjust the path of header files
- CXX? = g++
--INCLUDE = /usr/include/x86_64-linux-gnu/qt5
-+INCLUDE = /usr/include/qt
- CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
- LIB = -lQt5Widgets -lQt5Gui -lQt5Core
- MOC = /usr/bin/moc
Copied: libsvm/repos/community-x86_64/010-libsvm-fix-qt-headers-path.patch (from rev 967505, libsvm/trunk/010-libsvm-fix-qt-headers-path.patch)
===================================================================
--- 010-libsvm-fix-qt-headers-path.patch (rev 0)
+++ 010-libsvm-fix-qt-headers-path.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -0,0 +1,11 @@
+--- a/svm-toy/qt/Makefile
++++ b/svm-toy/qt/Makefile
+@@ -1,7 +1,7 @@
+ # use ``export QT_SELECT=qt5'' in a command window for using qt5
+ # may need to adjust the path of header files
+ CXX? = g++
+-INCLUDE = /usr/include/x86_64-linux-gnu/qt5
++INCLUDE = /usr/include/qt
+ CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
+ LIB = -lQt5Widgets -lQt5Gui -lQt5Core
+ MOC = /usr/bin/moc
Deleted: 020-libsvm-use-archlinux-flags.patch
===================================================================
--- 020-libsvm-use-archlinux-flags.patch 2021-06-26 00:49:07 UTC (rev 967505)
+++ 020-libsvm-use-archlinux-flags.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -1,47 +0,0 @@
-diff -Naurp a/Makefile b/Makefile
---- a/Makefile 2018-07-15 14:15:32.000000000 +0000
-+++ b/Makefile 2018-12-04 18:32:24.627133671 +0000
-@@ -1,5 +1,5 @@
- CXX ?= g++
--CFLAGS = -Wall -Wconversion -O3 -fPIC
-+CFLAGS += -Wall -Wconversion -fPIC
- SHVER = 2
- OS = $(shell uname)
-
-@@ -11,14 +11,14 @@ lib: svm.o
- else \
- SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \
- fi; \
-- $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
-+ $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) $(LDFLAGS)
-
- svm-predict: svm-predict.c svm.o
-- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
-+ $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm $(LDFLAGS)
- svm-train: svm-train.c svm.o
-- $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm
-+ $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm $(LDFLAGS)
- svm-scale: svm-scale.c
-- $(CXX) $(CFLAGS) svm-scale.c -o svm-scale
-+ $(CXX) $(CFLAGS) svm-scale.c -o svm-scale $(LDFLAGS)
- svm.o: svm.cpp svm.h
- $(CXX) $(CFLAGS) -c svm.cpp
- clean:
-diff -Naurp a/svm-toy/qt/Makefile b/svm-toy/qt/Makefile
---- a/svm-toy/qt/Makefile 2018-12-04 18:34:40.715220500 +0000
-+++ b/svm-toy/qt/Makefile 2018-12-04 18:40:33.446873531 +0000
-@@ -2,12 +2,12 @@
- # may need to adjust the path of header files
- CXX? = g++
- INCLUDE = /usr/include/qt
--CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
-+CFLAGS += -Wall -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
- LIB = -lQt5Widgets -lQt5Gui -lQt5Core
- MOC = /usr/bin/moc
-
- svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
-- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
-+ $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB) $(LDFLAGS)
-
- svm-toy.moc: svm-toy.cpp
- $(MOC) svm-toy.cpp -o svm-toy.moc
Copied: libsvm/repos/community-x86_64/020-libsvm-use-archlinux-flags.patch (from rev 967505, libsvm/trunk/020-libsvm-use-archlinux-flags.patch)
===================================================================
--- 020-libsvm-use-archlinux-flags.patch (rev 0)
+++ 020-libsvm-use-archlinux-flags.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -0,0 +1,47 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ CXX ?= g++
+-CFLAGS = -Wall -Wconversion -O3 -fPIC
++CFLAGS += -Wall -Wconversion -fPIC
+ SHVER = 2
+ OS = $(shell uname)
+
+@@ -11,15 +11,15 @@ lib: svm.o
+ else \
+ SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \
+ fi; \
+- $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
++ $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) $(LDFLAGS)
+
+ svm-predict: svm-predict.c svm.o
+- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
++ $(CXX) $(CPPFLAGS) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm $(LDFLAGS)
+ svm-train: svm-train.c svm.o
+- $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm
++ $(CXX) $(CPPFLAGS) $(CFLAGS) svm-train.c svm.o -o svm-train -lm $(LDFLAGS)
+ svm-scale: svm-scale.c
+- $(CXX) $(CFLAGS) svm-scale.c -o svm-scale
++ $(CXX) $(CPPFLAGS) $(CFLAGS) svm-scale.c -o svm-scale $(LDFLAGS)
+ svm.o: svm.cpp svm.h
+- $(CXX) $(CFLAGS) -c svm.cpp
++ $(CXX) $(CPPFLAGS) $(CFLAGS) -c svm.cpp
+ clean:
+ rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
+--- a/svm-toy/qt/Makefile
++++ b/svm-toy/qt/Makefile
+@@ -2,12 +2,12 @@
+ # may need to adjust the path of header files
+ CXX? = g++
+ INCLUDE = /usr/include/qt
+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
++CFLAGS += -Wall -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
+ LIB = -lQt5Widgets -lQt5Gui -lQt5Core
+ MOC = /usr/bin/moc
+
+ svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
+- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
++ $(CXX) $(CPPFLAGS) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB) $(LDFLAGS)
+
+ svm-toy.moc: svm-toy.cpp
+ $(MOC) svm-toy.cpp -o svm-toy.moc
Deleted: 030-libsvm-fix-tools-path.patch
===================================================================
--- 030-libsvm-fix-tools-path.patch 2021-06-26 00:49:07 UTC (rev 967505)
+++ 030-libsvm-fix-tools-path.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -1,30 +0,0 @@
-diff -up ./tools/easy.py.toolsDir ./tools/easy.py
---- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000
-+++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000
-@@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
-
- 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"
-+ svmscale_exe = "/usr/bin/svm-scale"
-+ svmtrain_exe = "/usr/bin/svm-train"
-+ svmpredict_exe = "/usr/bin/svm-predict"
-+ grid_py = "/usr/bin/svm-grid.py"
- gnuplot_exe = "/usr/bin/gnuplot"
- else:
- # example for windows
-diff -up ./tools/grid.py.toolsDir ./tools/grid.py
---- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000
-+++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000
-@@ -18,7 +18,7 @@ class GridOption:
- 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.svmtrain_pathname = '/usr/bin/svm-train'
- self.gnuplot_pathname = '/usr/bin/gnuplot'
- else:
- # example for windows
Copied: libsvm/repos/community-x86_64/030-libsvm-fix-tools-path.patch (from rev 967505, libsvm/trunk/030-libsvm-fix-tools-path.patch)
===================================================================
--- 030-libsvm-fix-tools-path.patch (rev 0)
+++ 030-libsvm-fix-tools-path.patch 2021-06-26 00:49:45 UTC (rev 967506)
@@ -0,0 +1,33 @@
+--- a/tools/easy.py
++++ b/tools/easy.py
+@@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
+
+ 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"
++ svmscale_exe = "/usr/bin/svm-scale"
++ svmtrain_exe = "/usr/bin/svm-train"
++ svmpredict_exe = "/usr/bin/svm-predict"
++ grid_py = "/usr/bin/svm-grid.py"
+ gnuplot_exe = "/usr/bin/gnuplot"
+ else:
+ # example for windows
+--- a/tools/grid.py
++++ b/tools/grid.py
+@@ -1,3 +1,4 @@
++
+ #!/usr/bin/env python
+ __all__ = ['find_parameters']
+
+@@ -18,7 +19,7 @@ class GridOption:
+ 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.svmtrain_pathname = '/usr/bin/svm-train'
+ self.gnuplot_pathname = '/usr/bin/gnuplot'
+ else:
+ # example for windows
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-06-26 00:49:07 UTC (rev 967505)
+++ PKGBUILD 2021-06-26 00:49:45 UTC (rev 967506)
@@ -1,87 +0,0 @@
-# Maintainer : Daniel Bermond <dbermond at archlinux.org>
-# Contributor: saxonbeta <saxonbeta at gmail>
-# Contributor: Pierre Gueth <pierre.gueth at gmail>
-# Contributor: Daniel YC Lin <dlin.tw at gmail>
-# Contributor: Tim Huetz <tim at huetz biz>
-
-pkgname=libsvm
-pkgver=3.24
-_srcver="${pkgver/./}"
-pkgrel=3
-pkgdesc='A library for Support Vector Machines classification (includes binaries and bindings for python and java)'
-arch=('x86_64')
-url='https://www.csie.ntu.edu.tw/~cjlin/libsvm/'
-license=('BSD')
-depends=('gcc-libs')
-makedepends=('qt5-base' 'python')
-optdepends=('qt5-base: for Qt5 interface with svm-toy'
- 'python: for python modules and python CLI tools'
- 'gnuplot: for using svm-easy.py'
- 'java-runtime: for java bindings')
-source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/cjlin1/libsvm/archive/v${_srcver}.tar.gz"
- '010-libsvm-fix-qt-headers-path.patch'
- '020-libsvm-use-archlinux-flags.patch'
- '030-libsvm-fix-tools-path.patch')
-sha256sums=('3ba1ac74ee08c4dd57d3a9e4a861ffb57dab88c6a33fd53eac472fc84fbb2a8f'
- '01d28d48ca955921cff3ee39e6235fbcbe6f13587c056b05797388afc0c45432'
- 'ba986c03199445ec0a9d1d113f54753e61f691ad4c66cad80b1f7d6ccf0c2d17'
- '58338a8eac252459c665eb6f1f03f4b86cd541b2c6942357329be022f3bb6fce')
-
-prepare() {
- patch -d "${pkgname}-${_srcver}" -Np1 -i "${srcdir}/010-libsvm-fix-qt-headers-path.patch"
- patch -d "${pkgname}-${_srcver}" -Np1 -i "${srcdir}/020-libsvm-use-archlinux-flags.patch"
- patch -d "${pkgname}-${_srcver}" -Np1 -i "${srcdir}/030-libsvm-fix-tools-path.patch"
-}
-
-build() {
- cd "${pkgname}-${_srcver}"
-
- printf '%s\n' ' -> Building library and CLI binaries...'
- make lib all
-
- printf '%s\n' ' -> Building Qt5 interface...'
- make -C svm-toy/qt
-}
-
-package() {
- cd "${pkgname}-${_srcver}"
-
- local _pyver
- local _sover
- _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
- _sover="$(find . -maxdepth 1 -type f -regextype posix-basic -regex '.*/libsvm.so.[0-9]*$' | awk -F'.' '{ print $NF }')"
-
- # binaries
- install -D -m755 svm-predict -t "${pkgdir}/usr/bin"
- install -D -m755 svm-scale -t "${pkgdir}/usr/bin"
- install -D -m755 svm-train -t "${pkgdir}/usr/bin"
- install -D -m755 svm-toy/qt/svm-toy -t "${pkgdir}/usr/bin"
-
- # library
- install -D -m755 "libsvm.so.${_sover}" -t "${pkgdir}/usr/lib"
- ln -s "libsvm.so.${_sover}" "${pkgdir}/usr/lib/libsvm.so"
-
- # header
- install -D -m644 svm.h -t "${pkgdir}/usr/include/libsvm"
-
- # python modules
- ## NOTE: 'grid.py' can be used either as a python module or a CLI/tool
- ## https://github.com/cjlin1/libsvm/blob/v324/tools/README#L163-L164
- install -D -m644 python/commonutil.py -t "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm"
- install -D -m644 python/svm.py -t "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm"
- install -D -m644 python/svmutil.py -t "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm"
- ln -s ../../../../bin/svm-grid.py "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm/grid.py"
- printf '' | install -D -m644 /dev/stdin "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm/__init__.py"
-
- # python CLI/tools
- install -D -m755 tools/checkdata.py "${pkgdir}/usr/bin/svm-checkdata.py"
- install -D -m755 tools/easy.py "${pkgdir}/usr/bin/svm-easy.py"
- install -D -m755 tools/grid.py "${pkgdir}/usr/bin/svm-grid.py"
- install -D -m755 tools/subset.py "${pkgdir}/usr/bin/svm-subset.py"
-
- # java
- install -D -m644 java/libsvm.jar -t "${pkgdir}/usr/share/java"
-
- # license
- install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: libsvm/repos/community-x86_64/PKGBUILD (from rev 967505, libsvm/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-06-26 00:49:45 UTC (rev 967506)
@@ -0,0 +1,72 @@
+# Maintainer : Daniel Bermond <dbermond at archlinux.org>
+# Contributor: saxonbeta <saxonbeta at gmail>
+# Contributor: Pierre Gueth <pierre.gueth at gmail>
+# Contributor: Daniel YC Lin <dlin.tw at gmail>
+# Contributor: Tim Huetz <tim at huetz biz>
+
+pkgname=libsvm
+pkgver=3.25
+pkgrel=1
+pkgdesc='A library for Support Vector Machines classification (includes binaries and bindings for python and java)'
+arch=('x86_64')
+url='https://www.csie.ntu.edu.tw/~cjlin/libsvm/'
+license=('BSD')
+depends=('gcc-libs')
+makedepends=('qt5-base' 'python')
+optdepends=('qt5-base: for Qt5 interface with svm-toy'
+ 'python: for python modules and python CLI tools'
+ 'gnuplot: for using svm-easy.py'
+ 'java-runtime: for java bindings')
+source=("https://github.com/cjlin1/libsvm/archive/v${pkgver/./}/${pkgname}-${pkgver}.tar.gz"
+ '010-libsvm-fix-qt-headers-path.patch'
+ '020-libsvm-use-archlinux-flags.patch'
+ '030-libsvm-fix-tools-path.patch')
+sha256sums=('1f587ec0df6fd422dfe50f942f8836ac179b0723b768fe9d2fabdfd1601a0963'
+ '07bc50e50c3e34823e1669fec1be84a50fcea2307dcf33b00300135e08d2de4d'
+ '6891fcbedf246c6b73d43551ce2476678dc473cee45d12d9fcaf124a1aac0d92'
+ '17c54ef795209112f2e1c8f15aaf74bb0214681df09a8abca16b5bfb2506e193')
+
+prepare() {
+ patch -d "${pkgname}-${pkgver/./}" -Np1 -i "${srcdir}/010-libsvm-fix-qt-headers-path.patch"
+ patch -d "${pkgname}-${pkgver/./}" -Np1 -i "${srcdir}/020-libsvm-use-archlinux-flags.patch"
+ patch -d "${pkgname}-${pkgver/./}" -Np1 -i "${srcdir}/030-libsvm-fix-tools-path.patch"
+}
+
+build() {
+ make -C "${pkgname}-${pkgver/./}" lib all
+ make -C "${pkgname}-${pkgver/./}/svm-toy/qt"
+}
+
+package() {
+ cd "${pkgname}-${pkgver/./}"
+
+ # binaries
+ install -D -m755 svm-{{predict,scale,train},toy/qt/svm-toy} -t "${pkgdir}/usr/bin"
+
+ # library
+ install -D -m755 libsvm.so.* -t "${pkgdir}/usr/lib"
+ ln -s "$(find "${pkgdir}/usr/lib" -regex '.*libsvm.so.[0-9]*' -exec basename '{}' ';')" "${pkgdir}/usr/lib/libsvm.so"
+
+ # header
+ install -D -m644 svm.h -t "${pkgdir}/usr/include/libsvm"
+
+ # python modules
+ # NOTE: 'grid.py' can be used either as a python module or a CLI/tool
+ # https://github.com/cjlin1/libsvm/blob/v325/tools/README#L163-L164
+ local _pyver
+ _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
+ install -D -m644 python/libsvm/{{common,svm}util,svm,__init__}.py -t "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm"
+ ln -s ../../../../bin/svm-grid.py "${pkgdir}/usr/lib/python${_pyver}/site-packages/libsvm/grid.py"
+
+ # python CLI/tools
+ install -D -m755 tools/checkdata.py "${pkgdir}/usr/bin/svm-checkdata.py"
+ install -D -m755 tools/easy.py "${pkgdir}/usr/bin/svm-easy.py"
+ install -D -m755 tools/grid.py "${pkgdir}/usr/bin/svm-grid.py"
+ install -D -m755 tools/subset.py "${pkgdir}/usr/bin/svm-subset.py"
+
+ # java
+ install -D -m644 java/libsvm.jar -t "${pkgdir}/usr/share/java"
+
+ # license
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
More information about the arch-commits
mailing list