take more care with CFLAGS
This commit is contained in:
parent
794fcf079f
commit
5d1ec06e7d
@ -33,6 +33,7 @@ Patch1: cyrus-sasl-1.5.28-autoconf25.patch
|
||||
Patch2: cyrus-sasl-1.5.28-automake17.patch
|
||||
Patch3: cyrus-sasl-1.5.28-automake18.patch
|
||||
Patch4: cyrus-sasl-1.5.28-saslauthd2.patch
|
||||
Patch8: cyrus-sasl-1.5.28-notgnu.patch
|
||||
%endif
|
||||
Patch5: cyrus-sasl-2.1.7-gdbm.patch
|
||||
Patch6: cyrus-sasl-2.1.10-des.patch
|
||||
@ -41,6 +42,8 @@ Patch9: cyrus-sasl-2.1.17-saslauthd1.patch
|
||||
Patch10: cyrus-sasl-2.1.20-db_bundle.patch
|
||||
Patch11: cyrus-sasl-2.1.18-no_rpath.patch
|
||||
Patch12: cyrus-sasl-1.5.28-env.patch
|
||||
Patch13: cyrus-sasl-2.1.20-notgnu.patch
|
||||
Patch14: cyrus-sasl-2.1.20-conflict.patch
|
||||
Buildroot: %{_tmppath}/%{name}-root
|
||||
%if %{includev1}
|
||||
BuildPrereq: gdbm-devel
|
||||
@ -124,6 +127,7 @@ pushd cyrus-sasl-%{cs1_version}
|
||||
%patch2 -p1 -b .automake17
|
||||
%patch3 -p1 -b .automake18
|
||||
%patch4 -p1 -b .saslauthd2
|
||||
%patch8 -p1 -b .notgnu
|
||||
%patch12 -p1 -b .env
|
||||
rm config/ltconfig
|
||||
libtoolize -f -c
|
||||
@ -145,6 +149,8 @@ done
|
||||
#%patch9 -p1 -b .saslauthd1
|
||||
%patch10 -p1 -b .db_bundle
|
||||
%patch11 -p1 -b .no_rpath
|
||||
%patch13 -p1 -b .notgnu
|
||||
%patch14 -p1 -b .conflict
|
||||
# FIXME - this is just weird
|
||||
rm config/ltconfig config/libtool.m4
|
||||
rm -fr autom4te.cache
|
||||
@ -238,17 +244,23 @@ popd
|
||||
mysql_config=mysql_config
|
||||
pg_config=pg_config
|
||||
SQL_CFLAGS=`${mysql_config} --cflags`" -I"`${pg_config} --includedir`
|
||||
SQL_LIBS=`${mysql_config} --libs`" -L"`${pg_config} --libdir`""
|
||||
SQL_CFLAGS=`eval echo "$SQL_CFLAGS" | sed -e 's,-I%{_includedir}[^/],,g' -e 's,-I%{_includedir}$,,g'`
|
||||
SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-L%{_libdir}[^/],,g' -e 's,-L%{_libdir}$,,g'`
|
||||
SQL_LIBS=`${mysql_config} --libs`" -L"`${pg_config} --libdir`
|
||||
SQL_CFLAGS=`eval echo "$SQL_CFLAGS" | sed -e 's,-I%{_includedir}[^/],,g' -e 's,-I%{_includedir}$,,g' -e 's,[[:blank:]]+, ,g'`
|
||||
SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-L%{_libdir}[^/],,g' -e 's,-L%{_libdir}$,,g' -e 's,[[:blank:]]+, ,g'`
|
||||
SQL_LDFLAGS=`eval echo "$SQL_LIBS" | sed -e 's,-[^L][^ ]*,,g'`
|
||||
echo $SQL_LDFLAGS
|
||||
SQL_LIBS=`eval echo "$SQL_LIBS" | sed -e 's,-[^l][^ ]*,,g'`
|
||||
echo $SQL_LIBS
|
||||
|
||||
CFLAGS=`echo $CFLAGS $SQL_CFLAGS | sed -e 's,[ ]+, ,g'`; export CFLAGS
|
||||
CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | sed -e 's,[ ]+, ,g'`; export CPPFLAGS
|
||||
LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | sed -e 's,[ ]+, ,g'`; export LDFLAGS
|
||||
cleanup_flags() {
|
||||
sed -r -e 's,-D_GNU_SOURCE(=[^[:blank:]]+)?,,g' \
|
||||
-e 's,-D_FILE_OFFSET_BITS=[[:digit:]]+,,g' \
|
||||
-e 's,-D_LARGEFILE_SOURCE(=[^[:blank:]]+)?,,g' \
|
||||
-e 's,[[:blank:]]+, ,g'
|
||||
}
|
||||
CFLAGS=`echo $CFLAGS $SQL_CFLAGS | cleanup_flags`; export CFLAGS
|
||||
CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS
|
||||
LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS
|
||||
|
||||
# Version 2. If built statically, the plugins are part of the library itself,
|
||||
# and if built shared in the same instance, in the shared library, too, so we
|
||||
|
Loading…
Reference in New Issue
Block a user