~ubuntu-branches/ubuntu/utopic/iaxmodem/utopic

« back to all changes in this revision

Viewing changes to debian/patches/11_build_configure-stamp

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2014-10-10 22:16:40 UTC
  • mfrom: (3.1.5 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20141010221640-5mjs30s1ielht8xk
Tags: 1.2.0~dfsg-2ubuntu1
Fix autotools-dev call in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Julian Blanche <jblache@debian.org>
 
2
Subject: avoid building libraries if configure-stamp exists 
 
3
 
 
4
The build script should not build the libraries if configure-stamp exists
 
5
debian/rules takes care of that.
 
6
 
 
7
Do not link unneeded libraries:
 
8
 - -lutil is only needed if legacy PTYs are used
 
9
 - -ltiff is not needed at all (pulled in for spandsp, but
 
10
   tiff-dependent code in spandsp is not used by iaxmodem and not
 
11
   linked in the final binary)
 
12
 - Move libraries to end of link command: fixes ld --as-needed (Matthias Klose)
 
13
 
 
14
@DPATCH@
 
15
diff -urNad iaxmodem-1.2.0~dfsg~/build iaxmodem-1.2.0~dfsg/build
 
16
--- iaxmodem-1.2.0~dfsg~/build  2009-02-21 19:57:52.000000000 +0100
 
17
+++ iaxmodem-1.2.0~dfsg/build   2009-02-22 11:41:49.107062425 +0100
 
18
@@ -16,12 +16,13 @@
 
19
 }
 
20
 
 
21
 PTYUSE="-DUSE_UNIX98_PTY"
 
22
+LLIBS=
 
23
 if [ "$1" = "-bsdptys" ]; then
 
24
     PTYUSE=""
 
25
+    LLIBS="-lutil"
 
26
     shift
 
27
 fi
 
28
 
 
29
-LLIBS="-lutil"
 
30
 if [ "`uname`" = "SunOS" ]; then
 
31
     PATH=$PATH:/usr/sfw/bin; export PATH
 
32
     MAKE="gmake"; export MAKE
 
33
@@ -31,23 +32,20 @@
 
34
 fi
 
35
 
 
36
 if [ "$1" = "static" ]; then
 
37
-    cd lib/libiax2 && \
 
38
-    ./configure --disable-shared && \
 
39
-    ${MAKE-make} && \
 
40
-    cd ../spandsp && \
 
41
-    ./configure --disable-shared && \
 
42
-    if [ "`uname`" = "SunOS" ]; then
 
43
-       grep -v HAVE_TGMATH_H src/config.h > src/config.h.new && \
 
44
-       mv -f src/config.h.new src/config.h && \
 
45
-        grep -v HAVE_TGMATH_H config-h.in > config-h.in.new && \
 
46
-        mv -f config-h.in.new config-h.in
 
47
-    fi && \
 
48
-    ${MAKE-make} && \
 
49
-    cd ../.. && \
 
50
+    if [ ! -e configure-stamp ]; then
 
51
+       cd lib/libiax2 && \
 
52
+           ./configure --disable-shared && \
 
53
+           ${MAKE-make} && \
 
54
+           cd ../spandsp && \
 
55
+           ./configure --disable-shared && \
 
56
+           ${MAKE-make} && \
 
57
+           cd ../.. || exit 1
 
58
+    fi
 
59
+
 
60
     getVersions && \
 
61
     gcc -Wall -g $PTYUSE $CFLAGS -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS \
 
62
        -std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \
 
63
-    gcc -lm $LLIBS -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
 
64
+    gcc -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a -lm $LLIBS
 
65
 else
 
66
     getVersions && \
 
67
     gcc -Wall -g $PTYUSE -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \