[libocas] 05/60: Add patch for upstream's Makefile

Christian Kastner chrisk-guest at moszumanska.debian.org
Mon Aug 25 03:34:41 UTC 2014


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

chrisk-guest pushed a commit to branch master
in repository libocas.

commit 9014241ad789b877367b4a86ae0182b65c593bb4
Author: Christian Kastner <debian at kvr.at>
Date:   Thu Jun 17 15:50:10 2010 +0200

    Add patch for upstream's Makefile
    
    Properly build shared and static libraries, programs
---
 debian/changelog                                   |  2 +
 ...uild-shared-and-static-libraries-programs.patch | 86 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 89 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e4c1b5f..6f010e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 libocas (0.93-1) unstable; urgency=low
 
   * Initial release (Closes: #585788)
+  * debian/patches:
+    - 0001-Properly-build-shared-and-static-libraries-programs
 
  -- Christian Kastner <debian at kvr.at>  Sun, 13 Jun 2010 00:00:30 +0200
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
new file mode 100644
index 0000000..8a91681
--- /dev/null
+++ b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
@@ -0,0 +1,86 @@
+From: Christian Kastner <debian at kvr.at>
+Date: Thu, 17 Jun 2010 15:39:15 +0200
+Subject: [PATCH] Properly build shared and static libraries, programs
+
+Modify upstream's Makefile to properly build shared and static libraries, and
+link upstream's programs to the shared libraries.
+
+Forwarded: no
+Last-Update: 2010-06-17
+---
+ Makefile |   48 +++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 35 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2ed4145..ff2d7e9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,10 +3,23 @@ MEX := mex
+ MEXFLAGS := $(shell if uname -m | grep -q x86_64 ; then echo -largeArrayDims ; fi)
+ MEXSUFFIX := $(shell if uname -m | grep -q x86_64 ; then echo mexa64 ; else echo mexglx ; fi)
+ CC := gcc
+-#CFLAGS := -g -lm -Wall -pthread
+-CFLAGS := -lm -msse -O3 -fPIC -fstrict-aliasing -fomit-frame-pointer -Wall -pthread
+-#CFLAGS := -lm -msse -O3 -fPIC -fstrict-aliasing -fomit-frame-pointer -Wall
+-#CFLAGS := -lm -msse -O3 -fPIC -fopenmp -fstrict-aliasing -fomit-frame-pointer -Wall
++
++CFLAGS +=
++LDFLAGS +=
++LIBS += -lm
++
++LIB_CFLAGS = $(CFLAGS) -fPIC
++LIB_LDFLAGS = $(LDFLAGS)
++LIB_LIBS = $(LIBS)
++
++PROG_CFLAGS = $(CFLAGS)
++PROG_LDFLAGS = $(LDFLAGS) -L.
++PROG_LIBS = $(LIBS) -lpthread -locas
++
++# The real LVER/LSUBVER should be passed on by debian/rules
++LVER ?= 0
++LSUBVER ?= 0
++LIBFILE = libocas.so.$(LVER).$(LSUBVER)
+ 
+ 
+ ifeq (yes,$(MEXDETECTED))
+@@ -43,21 +56,30 @@ lbpfilter.$(MEXSUFFIX): lbpfilter_mex.c
+ 
+ 
+ else 
+-all: libocas.so svmocas msvmocas
++all: $(LIBFILE) svmocas msvmocas linclass
+ endif
+ 
+-svmocas:	svmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c ocas_helper.h libocas.h sparse_mat.h libocas.c
+-		$(CC) $(CFLAGS) -o $@ svmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c libocas.c libqp_splx.c
++svmocas:	svmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c ocas_helper.h libocas.h sparse_mat.h $(LIBFILE)
++		$(CC) $(PROG_CFLAGS) $(PROG_LDFLAGS) -o $@ svmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c $(PROG_LIBS)
+ 
+-msvmocas:	msvmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c ocas_helper.h libocas.h sparse_mat.h libocas.c
+-		$(CC) $(CFLAGS) -o $@ msvmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c libocas.c libqp_splx.c
++msvmocas:	msvmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c ocas_helper.h libocas.h sparse_mat.h $(LIBFILE)
++		$(CC) $(PROG_CFLAGS) $(PROG_LDFLAGS) -o $@ msvmocas.c lib_svmlight_format.c sparse_mat.c ocas_helper.c $(PROG_LIBS)
+ 
+ linclass:	linclass.c lib_svmlight_format.c libocas.h 
+-		$(CC) $(CFLAGS) -o $@ linclass.c lib_svmlight_format.c  
++		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ linclass.c lib_svmlight_format.c $(LIBS)
++
+ 
++$(LIBFILE):	libocas.c libocas.h libqp_splx.c libqp.h
++		$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared \
++			-Wl,-soname,libocas.so.$(LVER) \
++			-o $@ libocas.c libqp_splx.c $(LIB_LIBS)
++		ln -s $@ libocas.so.$(LVER)
++		ln -s libocas.so.$(LVER) libocas.so
+ 
+-libocas.so:	libocas.c libocas.h libqp_splx.c libqp.h 
+-		$(CC) $(CFLAGS) -shared -o $@ libocas.c libqp_splx.c
++libocas.a:
++	$(CXX) $(CFLAGS) $(LDFLAGS) -c -o libocas-static.o libocas.c
++	$(CXX) $(CFLAGS) $(LDFLAGS) -c -o libqp_splx-static.o libqp_splx.c
++	ar cru libocas.a libocas-static.o libqp_splx-static.o
+ 
+ clean: 
+-		rm -f *~ svmocas.$(MEXSUFFIX) svmlight_linclass.$(MEXSUFFIX) svmocas msvmocas linclass libocas.so msvmocas.$(MEXSUFFIX) lbpfilter.$(MEXSUFFIX) lbppyr_features.$(MEXSUFFIX) svmocas_lbp.$(MEXSUFFIX) lbppyr.$(MEXSUFFIX) compute_errors.$(MEXSUFFIX)
++		rm -f *~ *.o libocas.a svmocas.$(MEXSUFFIX) svmlight_linclass.$(MEXSUFFIX) svmocas msvmocas linclass libocas.so* msvmocas.$(MEXSUFFIX) lbpfilter.$(MEXSUFFIX) lbppyr_features.$(MEXSUFFIX) svmocas_lbp.$(MEXSUFFIX) lbppyr.$(MEXSUFFIX) compute_errors.$(MEXSUFFIX)
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..72e9037 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Properly-build-shared-and-static-libraries-programs.patch

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



More information about the debian-science-commits mailing list