[liblinear] 19/26: Update patch 0001-Properly-build-shared-and-static-libraries-programs

Christian Kastner ckk at moszumanska.debian.org
Sun Sep 6 13:33:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

ckk pushed a commit to branch master
in repository liblinear.

commit d0dd1cbc423528c417615af1ff11cb16a67cb012
Author: Christian Kastner <ckk at kvr.at>
Date:   Sat Sep 5 23:08:34 2015 +0200

    Update patch 0001-Properly-build-shared-and-static-libraries-programs
---
 ...uild-shared-and-static-libraries-programs.patch | 74 ++++++++++++----------
 1 file changed, 42 insertions(+), 32 deletions(-)

diff --git a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
index 4fae3cd..c49dc7e 100644
--- a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
+++ b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
@@ -7,56 +7,66 @@ and link upstream's programs to the shared libraries. Furthermore, provide
 and install target.
 
 Forwarded: not-needed
-Last-Update: 2014-07-26
+Last-Update: 2015-09-05
 ---
  Makefile | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
  1 file changed, 43 insertions(+), 16 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 503a760..929d2e6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,27 +1,54 @@
+Index: liblinear-2.01.orig/Makefile
+===================================================================
+--- liblinear-2.01.orig.orig/Makefile
++++ liblinear-2.01.orig/Makefile
+@@ -1,32 +1,54 @@
  CXX ?= g++
  CC ?= gcc
 -CFLAGS = -Wall -Wconversion -O3 -fPIC
 -LIBS =
--SHVER = 1
 +CFLAGS +=
 +LDFLAGS += -L.
 +LIBS +=
+ SHVER = 3
+-OS = $(shell uname)
  
 -all: train predict
+-
+-lib: linear.o tron.o
+-	if [ "$(OS)" = "Darwin" ]; then \
+-		SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,liblinear.so.$(SHVER)"; \
+-	else \
+-		SHARED_LIB_FLAG="-shared -Wl,-soname,liblinear.so.$(SHVER)"; \
+-	fi; \
+-	$(CXX) $${SHARED_LIB_FLAG} linear.o tron.o -o liblinear.so.$(SHVER)
+-
+-train: tron.o linear.o train.c
+-	$(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS)
+-
+-predict: tron.o linear.o predict.c
+-	$(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS)
+-
+-tron.o: tron.cpp tron.h
+-	$(CXX) $(CFLAGS) -c -o tron.o tron.cpp
+-
+-linear.o: linear.cpp linear.h
+-	$(CXX) $(CFLAGS) -c -o linear.o linear.cpp
 +LIB_CFLAGS += $(CFLAGS) -fPIC
 +LIB_LDFLAGS += $(LDFLAGS)
 +LIB_LIBS += $(LIBS) -lblas
- 
--lib: linear.o tron.o
--	$(CXX) -shared -dynamiclib linear.o tron.o -o liblinear.so.$(SHVER)
++
 +PROG_CFLAGS += $(CFLAGS)
 +PROG_LDFLAGS += $(LDFLAGS)
 +PROG_LIBS += $(LIBS) -llinear
- 
--train: tron.o linear.o train.c
--	$(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS)
-+LVER ?= 0
-+LSUBVER ?= 0
-+LIBFILE = liblinear.so.$(LVER).$(LSUBVER)
- 
--predict: tron.o linear.o predict.c
--	$(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS)
++
++UPVER ?= 0.0
++LIBFILE = liblinear.so.$(SHVER).$(UPVER)
++
 +bindir ?= /usr/bin/
 +libdir ?= /usr/lib/
 +bindest = $(DESTDIR)$(bindir)
 +libdest = $(DESTDIR)$(libdir)
- 
--tron.o: tron.cpp tron.h
--	$(CXX) $(CFLAGS) -c -o tron.o tron.cpp
- 
--linear.o: linear.cpp linear.h
--	$(CXX) $(CFLAGS) -c -o linear.o linear.cpp
++
++
 +all: liblinear-train liblinear-predict liblinear.a
- 
++
 +liblinear-train: train.c $(LIBFILE)
 +	$(CXX) $(CPPFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) -o $@ train.c $(PROG_LIBS)
 +
@@ -65,10 +75,10 @@ index 503a760..929d2e6 100644
 +
 +$(LIBFILE): linear.cpp linear.h tron.cpp tron.h
 +	$(CXX) $(CPPFLAGS) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared \
-+		-Wl,-soname,liblinear.so.$(LVER) \
++		-Wl,-soname,liblinear.so.$(SHVER) \
 +		-o $@ linear.cpp tron.cpp $(LIB_LIBS)
-+	ln -s $@ liblinear.so.$(LVER)
-+	ln -s liblinear.so.$(LVER) liblinear.so
++	ln -s $@ liblinear.so.$(SHVER)
++	ln -s liblinear.so.$(SHVER) liblinear.so
 +
 +liblinear.a:
 +	$(CXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o linear-static.o linear.cpp
@@ -80,10 +90,10 @@ index 503a760..929d2e6 100644
 +	install liblinear-train liblinear-predict -m 755 $(bindest)
 +	install liblinear.a -m 644 $(libdest)
 +	install $(LIBFILE) -m 644 $(libdest)
-+	cd $(libdest) && ln -s $(LIBFILE) liblinear.so.$(LVER)
-+	cd $(libdest) && ln -s liblinear.so.$(LVER) liblinear.so
++	cd $(libdest) && ln -s $(LIBFILE) liblinear.so.$(SHVER)
++	cd $(libdest) && ln -s liblinear.so.$(SHVER) liblinear.so
  
  clean:
--	cd matlab;	make clean
+-	make -C matlab clean
 -	rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER)
 +	rm -f *~ *.o *.a *.so* liblinear-train liblinear-predict

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblinear.git



More information about the debian-science-commits mailing list