liblinear: updated to 2.41 Version 2.41 released on July 29, 2020 (some bug fixes of version 2.40). Version 2.40 released on July 22, 2020. A new solver: dual coordinate descent method for linear one-class SVM; see the paper The Newton solver is updated to have faster training speed; see the release note A new option -R to allow users not to regularize bias (when -B 1 is used)diff -r1.6 -r1.7 pkgsrc/math/liblinear/Makefile
(adam)
@@ -1,32 +1,33 @@ | @@ -1,32 +1,33 @@ | |||
1 | # $NetBSD: Makefile,v 1.6 2017/11/15 22:12:56 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.7 2020/10/28 19:32:32 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= liblinear-2.11 | 3 | DISTNAME= liblinear-2.41 | |
4 | PKGREVISION= 1 | |||
5 | CATEGORIES= math | 4 | CATEGORIES= math | |
6 | MASTER_SITES= https://www.csie.ntu.edu.tw/~cjlin/liblinear/ | 5 | MASTER_SITES= https://www.csie.ntu.edu.tw/~cjlin/liblinear/ | |
7 | 6 | |||
8 | MAINTAINER= cheusov@NetBSD.org | 7 | MAINTAINER= cheusov@NetBSD.org | |
9 | HOMEPAGE= https://www.csie.ntu.edu.tw/~cjlin/liblinear/ | 8 | HOMEPAGE= https://www.csie.ntu.edu.tw/~cjlin/liblinear/ | |
10 | COMMENT= Library for large linear classification | 9 | COMMENT= Library for large linear classification | |
11 | LICENSE= modified-bsd | 10 | LICENSE= modified-bsd | |
12 | 11 | |||
13 | USE_LANGUAGES= c c++ | 12 | USE_LANGUAGES= c c++ | |
14 | USE_LIBTOOL= yes | 13 | USE_LIBTOOL= yes | |
15 | 14 | |||
16 | BUILD_TARGET= all lib | 15 | BUILD_TARGET= all lib | |
17 | AUTO_MKDIRS= yes | |||
18 | 16 | |||
19 | MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} | 17 | MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} | |
20 | MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} | 18 | MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} | |
21 | 19 | |||
20 | INSTALLATION_DIRS+= bin include lib share/doc/${PKGBASE} share/examples/${PKGBASE} | |||
21 | ||||
22 | do-install: | 22 | do-install: | |
23 | ${INSTALL_PROGRAM} ${WRKSRC}/predict ${DESTDIR}${PREFIX}/bin/liblinear-predict | 23 | ${INSTALL_PROGRAM} ${WRKSRC}/predict ${DESTDIR}${PREFIX}/bin/liblinear-predict | |
24 | ${INSTALL_PROGRAM} ${WRKSRC}/train ${DESTDIR}${PREFIX}/bin/liblinear-train | 24 | ${INSTALL_PROGRAM} ${WRKSRC}/train ${DESTDIR}${PREFIX}/bin/liblinear-train | |
25 | ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/liblinear.la ${DESTDIR}${PREFIX}/lib | 25 | ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/liblinear.la ${DESTDIR}${PREFIX}/lib | |
26 | ${INSTALL_DATA} ${WRKSRC}/linear.h ${DESTDIR}${PREFIX}/include | 26 | ${INSTALL_DATA} ${WRKSRC}/linear.h ${DESTDIR}${PREFIX}/include | |
27 | ${INSTALL_DATA} ${WRKSRC}/README \ | 27 | ${INSTALL_DATA} ${WRKSRC}/README \ | |
28 | ${DESTDIR}${PREFIX}/share/doc/${PKGBASE} | 28 | ${DESTDIR}${PREFIX}/share/doc/${PKGBASE} | |
29 | ${INSTALL_DATA} ${WRKSRC}/heart_scale \ | 29 | ${INSTALL_DATA} ${WRKSRC}/heart_scale \ | |
30 | ${DESTDIR}${PREFIX}/share/examples/${PKGBASE} | 30 | ${DESTDIR}${PREFIX}/share/examples/${PKGBASE} | |
31 | 31 | |||
32 | .include "../../math/blas/buildlink3.mk" | |||
32 | .include "../../mk/bsd.pkg.mk" | 33 | .include "../../mk/bsd.pkg.mk" |
@@ -1,8 +1,8 @@ | @@ -1,8 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.6 2017/11/10 16:18:47 khorben Exp $ | 1 | $NetBSD: distinfo,v 1.7 2020/10/28 19:32:32 adam Exp $ | |
2 | 2 | |||
3 | SHA1 (liblinear-2.11.tar.gz) = 6c306d0d0b7ea5281ee2b587adc89745ee0d74fa | 3 | SHA1 (liblinear-2.41.tar.gz) = 2b50ecfab5dc64245cd338dc59d7dc495af56970 | |
4 | RMD160 (liblinear-2.11.tar.gz) = c80d051e8b354de03da3e41bd1bea096ef4076f3 | 4 | RMD160 (liblinear-2.41.tar.gz) = b65416689d7af97858b7448b1b8bb2c5acb5f7cf | |
5 | SHA512 (liblinear-2.11.tar.gz) = c5a33e98ae3c792173d38060b6002cf63af4571b42cdf313f6e5fd8ee5ac7b86caa99d123a028a6ecb3843aac0f839c9ff655f5fb28cfdf26ca7a6cb5f3f359d | 5 | SHA512 (liblinear-2.41.tar.gz) = f2ce99b675382ff6e7a8e5baee433ba12ddd1042e67ac74dfa72efc3b75ed4c3b088f280a07e001d038777e4637b3eed7a1b584de6d2c90afc2fad4df0b129c9 | |
6 | Size (liblinear-2.11.tar.gz) = 506509 bytes | 6 | Size (liblinear-2.41.tar.gz) = 559241 bytes | |
7 | SHA1 (patch-Makefile) = 1f10259764b0ca07874da35d35b76d4054e92117 | 7 | SHA1 (patch-Makefile) = e0e5171d00b484830dc3dcd8134fa9aa0c144701 | |
8 | SHA1 (patch-blas_Makefile) = d829bdf80671d1eb95e78e4a7592f6fd3ffb7c46 | 8 | SHA1 (patch-blas_Makefile) = d829bdf80671d1eb95e78e4a7592f6fd3ffb7c46 |
@@ -1,61 +1,54 @@ | @@ -1,61 +1,54 @@ | |||
1 | $NetBSD: patch-Makefile,v 1.3 2017/11/10 16:18:47 khorben Exp $ | 1 | $NetBSD: patch-Makefile,v 1.4 2020/10/28 19:32:33 adam Exp $ | |
2 | 2 | |||
3 | Use LIBTOOL. | 3 | Use LIBTOOL. | |
4 | Add support for LDFLAGS. | 4 | Add support for LDFLAGS. | |
5 | 5 | |||
6 | --- Makefile.orig 2017-03-28 22:22:33.000000000 +0000 | 6 | --- Makefile.orig 2020-07-29 09:11:00.000000000 +0000 | |
7 | +++ Makefile | 7 | +++ Makefile | |
8 | @@ -1,37 +1,30 @@ | 8 | @@ -1,34 +1,29 @@ | |
9 | CXX ?= g++ | 9 | CXX ?= g++ | |
10 | CC ?= gcc | 10 | CC ?= gcc | |
11 | -CFLAGS = -Wall -Wconversion -O3 -fPIC | 11 | -CFLAGS = -Wall -Wconversion -O3 -fPIC | |
12 | -LIBS = blas/blas.a | 12 | -LIBS = blas/blas.a | |
13 | +LIBS = blas/libblas.la | 13 | +LIBS = blas/libblas.la | |
14 | SHVER = 3 | 14 | SHVER = 4 | |
15 | -OS = $(shell uname) | 15 | -OS = $(shell uname) | |
16 | #LIBS = -lblas | 16 | #LIBS = -lblas | |
17 | 17 | |||
18 | all: train predict | 18 | all: train predict | |
19 | 19 | |||
20 | -lib: linear.o tron.o blas/blas.a | 20 | -lib: linear.o newton.o blas/blas.a | |
21 | - if [ "$(OS)" = "Darwin" ]; then \ | 21 | - if [ "$(OS)" = "Darwin" ]; then \ | |
22 | - SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \ | 22 | - SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \ | |
23 | - else \ | 23 | - else \ | |
24 | - SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \ | 24 | - SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \ | |
25 | - fi; \ | 25 | - fi; \ | |
26 | - $(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER) | 26 | - $(CXX) $${SHARED_LIB_FLAG} linear.o newton.o blas/blas.a -o liblinear.so.$(SHVER) | |
27 | - | 27 | +lib: linear.lo newton.lo $(LIBS) | |
28 | -train: tron.o linear.o train.c blas/blas.a | |||
29 | - $(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS) | |||
30 | - | |||
31 | -predict: tron.o linear.o predict.c blas/blas.a | |||
32 | - $(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS) | |||
33 | +lib: linear.lo tron.lo $(LIBS) | |||
34 | + ${LIBTOOL} --mode=link $(CXX) -o liblinear.la $(LDFLAGS) $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0 | 28 | + ${LIBTOOL} --mode=link $(CXX) -o liblinear.la $(LDFLAGS) $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0 | |
35 | 29 | |||
36 | -tron.o: tron.cpp tron.h | 30 | -train: newton.o linear.o train.c blas/blas.a | |
37 | - $(CXX) $(CFLAGS) -c -o tron.o tron.cpp | 31 | - $(CXX) $(CFLAGS) -o train train.c newton.o linear.o $(LIBS) | |
38 | +train: tron.lo linear.lo train.c $(LIBS) | 32 | +train: newton.lo linear.lo train.c $(LIBS) | |
39 | + ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o train $(LDFLAGS) $> | 33 | + ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o train $(LDFLAGS) $> | |
40 | 34 | |||
41 | -linear.o: linear.cpp linear.h | 35 | -predict: newton.o linear.o predict.c blas/blas.a | |
42 | - $(CXX) $(CFLAGS) -c -o linear.o linear.cpp | 36 | - $(CXX) $(CFLAGS) -o predict predict.c newton.o linear.o $(LIBS) | |
43 | +predict: tron.lo linear.lo predict.c $(LIBS) | 37 | +predict: newton.lo linear.lo predict.c $(LIBS) | |
44 | + ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o predict $(LDFLAGS) $> | 38 | + ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o predict $(LDFLAGS) $> | |
45 | 39 | |||
46 | -blas/blas.a: blas/*.c blas/*.h | 40 | -newton.o: newton.cpp newton.h | |
47 | +tron.lo: tron.cpp tron.h | 41 | +newton.lo: newton.cpp newton.h | |
48 | + ${LIBTOOL} --mode=compile $(CXX) $(CFLAGS) -c -o tron.o tron.cpp | 42 | + ${LIBTOOL} --mode=compile \ | |
49 | + | 43 | $(CXX) $(CFLAGS) -c -o newton.o newton.cpp | |
44 | ||||
45 | -linear.o: linear.cpp linear.h | |||
50 | +linear.lo: linear.cpp linear.h | 46 | +linear.lo: linear.cpp linear.h | |
51 | + ${LIBTOOL} --mode=compile $(CXX) $(CFLAGS) -c -o linear.o linear.cpp | 47 | + ${LIBTOOL} --mode=compile \ | |
52 | + | 48 | $(CXX) $(CFLAGS) -c -o linear.o linear.cpp | |
49 | ||||
50 | -blas/blas.a: blas/*.c blas/*.h | |||
53 | +$(LIBS): blas/*.c blas/*.h | 51 | +$(LIBS): blas/*.c blas/*.h | |
54 | make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)'; | 52 | make -C blas OPTFLAGS='$(CFLAGS)' CC='$(CC)'; | |
55 | 53 | |||
56 | clean: | 54 | clean: | |
57 | - make -C blas clean | |||
58 | - make -C matlab clean | |||
59 | + $(MAKE) -C blas clean | |||
60 | + $(MAKE) -C matlab clean | |||
61 | rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER) |