Skip to content

Commit

Permalink
liblinear: updated to v2.45
Browse files Browse the repository at this point in the history
  • Loading branch information
os-rss committed Jan 12, 2023
1 parent 8e7a9c4 commit 0053178
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
10 changes: 6 additions & 4 deletions L/liblinear/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
using BinaryBuilder, Pkg

name = "liblinear"
version = v"2.30.0"
version = v"2.45.0"

julia_compat = "1.6"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/cjlin1/liblinear/archive/v230.tar.gz", "9b57710078206d4dbbe75e9015d4cf7fabe4464013fe0e89b8a2fe40038f8f51"),
ArchiveSource("https://github.com/cjlin1/liblinear/archive/refs/tags/v245.tar.gz", "ce29f42c2c0d10e4627ac50a953fe3c130d2802868e6a2dc9a396356b96e8abc"),
DirectorySource("./bundled")
]

Expand All @@ -17,7 +19,7 @@ cd $WORKSPACE/srcdir
for f in ${WORKSPACE}/srcdir/patches/*.patch; do
atomic_patch -p1 ${f}
done
cd liblinear-230/
cd liblinear-245/
mkdir -p ${prefix}/bin
mkdir -p ${prefix}/lib
if [[ "${target}" == *-freebsd* ]] || [[ "${target}" == *-apple-* ]]; then
Expand Down Expand Up @@ -47,4 +49,4 @@ dependencies = Dependency[
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat=julia_compat)
31 changes: 14 additions & 17 deletions L/liblinear/bundled/patches/makefile.patch
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
diff --git before/liblinear-230/Makefile after/liblinear-230/Makefile
index 0534f2b..f7c1bb8 100644
--- before/liblinear-230/Makefile
+++ after/liblinear-230/Makefile
diff --git before/liblinear-245/Makefile after/liblinear-245/Makefile
@@ -10,17 +10,17 @@ all: train predict

lib: linear.o tron.o blas/blas.a
lib: linear.o newton.o blas/blas.a
if [ "$(OS)" = "Darwin" ]; then \
- SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \
+ SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.${dlext}"; \
else \
- SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \
+ SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.${dlext}"; \
fi; \
- $(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER)
+ $(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.${dlext}
- $(CXX) $${SHARED_LIB_FLAG} linear.o newton.o blas/blas.a -o liblinear.so.$(SHVER)
+ $(CXX) $${SHARED_LIB_FLAG} linear.o newton.o blas/blas.a -o liblinear.${dlext}

train: tron.o linear.o train.c blas/blas.a
- $(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS)
+ $(CXX) $(CFLAGS) -o train${exeext} train.c tron.o linear.o $(LIBS)
train: newton.o linear.o train.c blas/blas.a
- $(CXX) $(CFLAGS) -o train train.c newton.o linear.o $(LIBS)
+ $(CXX) $(CFLAGS) -o train${exeext} train.c newton.o linear.o $(LIBS)

predict: tron.o linear.o predict.c blas/blas.a
- $(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS)
+ $(CXX) $(CFLAGS) -o predict${exeext} predict.c tron.o linear.o $(LIBS)
predict: newton.o linear.o predict.c blas/blas.a
- $(CXX) $(CFLAGS) -o predict predict.c newton.o linear.o $(LIBS)
+ $(CXX) $(CFLAGS) -o predict${exeext} predict.c newton.o linear.o $(LIBS)

tron.o: tron.cpp tron.h
$(CXX) $(CFLAGS) -c -o tron.o tron.cpp
newton.o: newton.cpp newton.h
$(CXX) $(CFLAGS) -c -o newton.o newton.cpp
@@ -34,4 +34,4 @@ blas/blas.a: blas/*.c blas/*.h
clean:
make -C blas clean
make -C matlab clean
- rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER)
+ rm -f *~ tron.o linear.o train predict liblinear.${dlext}
- rm -f *~ newton.o linear.o train predict liblinear.so.$(SHVER)
+ rm -f *~ newton.o linear.o train predict liblinear.${dlext}

0 comments on commit 0053178

Please sign in to comment.