[Pkg-voip-commits] [asterisk] 01/01: preserve CPPFLAGS without using a patch
Jeremy Lainé
sharky at moszumanska.debian.org
Wed Dec 11 13:01:12 UTC 2013
This is an automated email from the git hooks/post-receive script.
sharky pushed a commit to branch master
in repository asterisk.
commit cec28107e5ebffa429bb671a63bb1e95077f3154
Author: Jeremy Lainé <jeremy.laine at m4x.org>
Date: Wed Dec 11 14:00:56 2013 +0100
preserve CPPFLAGS without using a patch
---
debian/patches/preserve_cppflags | 49 ----------------------------------------
debian/patches/series | 1 -
debian/rules | 4 +++-
3 files changed, 3 insertions(+), 51 deletions(-)
diff --git a/debian/patches/preserve_cppflags b/debian/patches/preserve_cppflags
deleted file mode 100644
index 3a3bf7e..0000000
--- a/debian/patches/preserve_cppflags
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: asterisk/configure.ac
-===================================================================
---- asterisk.orig/configure.ac 2013-12-11 13:40:47.915458039 +0100
-+++ asterisk/configure.ac 2013-12-11 13:41:02.567365173 +0100
-@@ -22,7 +22,7 @@
- AC_COPYRIGHT("Asterisk")
- AC_REVISION($Revision: 388769 $)
-
--# preserve any CFLAGS or LDFLAGS that may be set
-+# preserve any CFLAGS, CPPFLAGS or LDFLAGS that may be set
- # NOTE: This must be done before calling any macros that end up
- # calling AC_PROG_CC or the like, since they will set a default
- # set of CFLAGS ("-g -O2") if the user did not supply any, and
-@@ -30,8 +30,10 @@
- # rest of the build system since we have other means of controlling
- # debugging symbol generation and optimization.
- CONFIG_CFLAGS="${CFLAGS}"
-+CONFIG_CPPFLAGS="${CPPFLAGS}"
- CONFIG_LDFLAGS="${LDFLAGS}"
- AC_SUBST(CONFIG_CFLAGS)
-+AC_SUBST(CONFIG_CPPFLAGS)
- AC_SUBST(CONFIG_LDFLAGS)
-
- # specify output header file
-Index: asterisk/makeopts.in
-===================================================================
---- asterisk.orig/makeopts.in 2013-12-11 13:40:47.915458039 +0100
-+++ asterisk/makeopts.in 2013-12-11 13:40:47.911458064 +0100
-@@ -58,6 +58,7 @@
- PTHREAD_LIBS=@PTHREAD_LIBS@
-
- CONFIG_CFLAGS=@CONFIG_CFLAGS@
-+CONFIG_CPPFLAGS=@CONFIG_CPPFLAGS@
- CONFIG_LDFLAGS=@CONFIG_LDFLAGS@
-
- GNU_LD=@GNU_LD@
-Index: asterisk/Makefile.rules
-===================================================================
---- asterisk.orig/Makefile.rules 2013-12-11 13:40:47.915458039 +0100
-+++ asterisk/Makefile.rules 2013-12-11 13:40:47.911458064 +0100
-@@ -58,6 +58,8 @@
- _ASTCFLAGS+=$(CONFIG_CFLAGS)
- endif
-
-+_ASTCFLAGS+=$(CONFIG_CPPFLAGS)
-+
- # shortcuts for common combinations of flags; these must be recursively expanded so that
- # per-target settings will be applied
- CC_CFLAGS=$(PTHREAD_CFLAGS) $(_ASTCFLAGS) $(ASTCFLAGS)
diff --git a/debian/patches/series b/debian/patches/series
index a4007f2..f4203ce 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -31,4 +31,3 @@ astdb_mans
hyphen
reenable
freeradius-client
-preserve_cppflags
diff --git a/debian/rules b/debian/rules
index 650f821..43edf4f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -77,10 +77,12 @@ override_dh_autoreconf:
# Make sure the configure script gets an CFLAGS parameter. Otherwise
# it will build with -march=native
+# Pass CPPFLAGS in the CFLAGS as otherwise the build system will
+# ignore them.
override_dh_auto_configure:
chmod 755 $(CURDIR)/debian/dummyprogs/fetch
$(FETCH_ENV) ./configure \
- CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
+ CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git
More information about the Pkg-voip-commits
mailing list