summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-01-14 15:39:18 +0000
committerMatthew Jordan <mjordan@digium.com>2015-01-14 15:39:18 +0000
commit89a431df8475df407a9e305e4cd8a16e6d231e93 (patch)
tree2488b9ec5e4dc0a1c8b186ac63c6bbec87c18db5 /build_tools
parent1f94b9674914467f68e1239f6999bbf5e3b7f292 (diff)
build_tools/mkpkgconfig: Fix Cflags concatenation error in asterisk.pc
The mkpkgconfig script incorrectly concatenates Cflags options together. As an example, the following: Cflags: -I/usr/include/libxml2 -g3 Is instead generated as: Cflags: -I/usr/include/libxml2-g3 This patch corrects the generation of Cflags in mkpkgconfig such that the Cflags options are output correctly. Review: https://reviewboard.asterisk.org/r/3707/ ASTERISK-23991 #close Reported by: Diederik de Groot patches: fix_mkpkgconfig.diff uploaded by Diederik de Groot (License 6600) ........ Merged revisions 430589 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/mkpkgconfig9
1 files changed, 4 insertions, 5 deletions
diff --git a/build_tools/mkpkgconfig b/build_tools/mkpkgconfig
index fd7d90686..9d29b9eca 100755
--- a/build_tools/mkpkgconfig
+++ b/build_tools/mkpkgconfig
@@ -22,13 +22,12 @@ else
fi
## Clean out CFLAGS for the spec file.
-
-LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
- ${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
+LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
+ ${EXTREGEX} 's/\s+-I(include|\.\.\/include)\s+/ /g' | \
${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
- ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
-
+ ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' | \
+ ${EXTREGEX} 's/^\s|\s$//g'`
cat <<EOF > "$PPATH/asterisk.pc"
install_prefix=$INSTALL_PREFIX