~ubuntu-branches/ubuntu/vivid/aeolus/vivid

« back to all changes in this revision

Viewing changes to debian/patches/01-makefile.patch

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-19 19:12:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100419191251-hgarjfcdfl7c0ryl
Tags: 0.8.4-3
debian/patches/01-makefile.patch: Drop -march=native flag, it isn't valid
for Debian packages as the results are unpredictable, thanks to
Bastian Blank for reporting this (Closes: #578278).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Alessio Treglia <quadrispro@ubuntu.com>
 
2
Description: Add DESTDIR, adjust PREFIX and append SONAME to the libraries.
 
3
 Plus, fix FTBFS with binutils-gold.
 
4
 Disable -march-native to fix FTBFS.
 
5
Bug: http://bugs.debian.org/553630
 
6
Bug: http://bugs.debian.org/578278
 
7
---
 
8
 source/Makefile |   26 ++++++++++++++++----------
 
9
 1 file changed, 16 insertions(+), 10 deletions(-)
 
10
 
 
11
--- aeolus.orig/source/Makefile
 
12
+++ aeolus/source/Makefile
 
13
@@ -15,20 +15,23 @@
 
14
 #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
15
 
 
16
 
 
17
-PREFIX = /usr/local
 
18
-SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
 
19
+PREFIX = /usr
 
20
+#SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
 
21
+DESTDIR=
 
22
 LIBDIR = lib$(SUFFIX)
 
23
 VERSION = 0.8.4
 
24
 DISTDIR = aeolus-$(VERSION)
 
25
 CPPFLAGS += -O3 -Wall -MMD -MP -DVERSION=\"$(VERSION)\" -DLIBDIR=\"$(PREFIX)/$(LIBDIR)\"
 
26
-CPPFLAGS += -march=native
 
27
+#CPPFLAGS += -march=native
 
28
+MAJ = 0
 
29
+REL = 0.0
 
30
 
 
31
 all:   aeolus aeolus_x11.so aeolus_txt.so
 
32
 
 
33
 
 
34
 AEOLUS_O =     main.o audio.o model.o slave.o imidi.o addsynth.o scales.o \
 
35
                reverb.o asection.o division.o rankwave.o rngen.o exp2ap.o lfqueue.o
 
36
-aeolus:        LDLIBS += -lclalsadrv -lclthreads -lpthread -ljack -lasound -lpthread -lrt
 
37
+aeolus:        LDLIBS += -lclalsadrv -lclthreads -lpthread -ljack -lasound -ldl -lrt
 
38
 aeolus: LDFLAGS += -L$(PREFIX)/$(LIBDIR)
 
39
 aeolus:        $(AEOLUS_O)
 
40
        g++ $(LDFLAGS) -o $@ $(AEOLUS_O) $(LDLIBS)
 
41
@@ -44,7 +47,7 @@ aeolus_x11.so:        CPPFLAGS += -fpic -D_REEN
 
42
 aeolus_x11.so: LDLIBS += -lclthreads -lclxclient -lXft -lX11
 
43
 aeolus_x11.so: LDFLAGS += -shared -L$(PREFIX)/$(LIBDIR) -L/usr/X11R6/$(LIBDIR)
 
44
 aeolus_x11.so: $(XIFACE_O) $(LIBCLX)
 
45
-       g++ $(LDFLAGS) -o $@ $(XIFACE_O) $(LDLIBS)
 
46
+       g++ $(LDFLAGS) -Wl,-soname=$(@).$(MAJ) -o $(@).$(MAJ).$(REL) $(XIFACE_O) $(LDLIBS)
 
47
 
 
48
 $(XIFACE_O):
 
49
 -include $(XIFACE_O:%.o=%.d)
 
50
@@ -55,17 +58,20 @@ aeolus_txt.so:      CPPFLAGS += -fpic -D_REEN
 
51
 aeolus_txt.so: LDLIBS += -lclthreads -lreadline
 
52
 aeolus_txt.so: LDFLAGS += -shared -L$(PREFIX)/$(LIBDIR)
 
53
 aeolus_txt.so: $(TIFACE_O)
 
54
-       g++ $(LDFLAGS) -o $@ $(TIFACE_O) $(LDLIBS)
 
55
+       g++ $(LDFLAGS) -Wl,-soname=$(@).$(MAJ) -o $(@).$(MAJ).$(REL) $(TIFACE_O) $(LDLIBS)
 
56
 
 
57
 $(TIFACE_O):
 
58
 -include $(TIFACE_O:%.o=%.d)
 
59
 
 
60
 
 
61
 install:       aeolus aeolus_x11.so aeolus_txt.so 
 
62
-       install -Dm 755 aeolus $(DESTDIR)$(PREFIX)/bin/aeolus
 
63
-       install -Dm 755 aeolus_x11.so $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_x11.so
 
64
-       install -Dm 755 aeolus_txt.so $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_txt.so
 
65
-       /sbin/ldconfig $(PREFIX)/$(LIBDIR)
 
66
+       /usr/bin/install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
 
67
+       /usr/bin/install -d $(DESTDIR)$(PREFIX)/bin
 
68
+       /usr/bin/install -m 755 aeolus $(DESTDIR)$(PREFIX)/bin
 
69
+       /usr/bin/install -m 755 aeolus_x11.so.$(MAJ).$(REL) $(DESTDIR)$(PREFIX)/$(LIBDIR)
 
70
+       ln -s aeolus_x11.so.$(MAJ).$(REL) $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_x11.so.$(MAJ)
 
71
+       /usr/bin/install -m 755 aeolus_txt.so.$(MAJ).$(REL) $(DESTDIR)$(PREFIX)/$(LIBDIR)
 
72
+       ln -s aeolus_txt.so.$(MAJ).$(REL) $(DESTDIR)$(PREFIX)/$(LIBDIR)/aeolus_txt.so.$(MAJ)
 
73
 
 
74
 
 
75
 clean: