- trim exports from .la file/--libs output (#174924)

This commit is contained in:
jorton 2005-12-06 14:54:56 +00:00
parent b789283cc4
commit d3d483883c
2 changed files with 64 additions and 2 deletions

View File

@ -0,0 +1,53 @@
- don't export libs needed for DBD
- don't add -L%{_libdir} to --link-ld output
--- apr-util-1.2.2/build/dbd.m4.exports
+++ apr-util-1.2.2/build/dbd.m4
@@ -64,7 +64,6 @@
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
dnl we know the library is there.
if test "$apu_have_pgsql" = "1"; then
- APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lpq])
APR_ADDTO(APRUTIL_LIBS,[-lpq])
fi
])
@@ -115,7 +114,6 @@
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
dnl we know the library is there.
if test "$apu_have_mysql" = "1"; then
- APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lmysqlclient_r])
APR_ADDTO(APRUTIL_LIBS,[-lmysqlclient_r])
fi
])
@@ -152,7 +150,6 @@
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
dnl we know the library is there.
if test "$apu_have_sqlite3" = "1"; then
- APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lsqlite3])
APR_ADDTO(APRUTIL_LIBS,[-lsqlite3])
fi
])
@@ -189,7 +186,6 @@
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
dnl we know the library is there.
if test "$apu_have_sqlite2" = "1"; then
- APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lsqlite])
APR_ADDTO(APRUTIL_LIBS,[-lsqlite])
fi
])
--- apr-util-1.2.2/apu-config.in.exports
+++ apr-util-1.2.2/apu-config.in
@@ -147,8 +147,10 @@
;;
--link-ld)
if test "$location" = "installed"; then
- ### avoid using -L if libdir is a "standard" location like /usr/lib
- flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
+ if test "$prefix" != "/usr"; then
+ flags="$flags -L${libdir}"
+ fi
+ flags="$flags -l$APRUTIL_LIBNAME"
else
flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
fi

View File

@ -4,11 +4,12 @@
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: 1.2.2
Release: 1
License: Apache Software License
Release: 2
License: Apache Software License 2.0
Group: System Environment/Libraries
URL: http://apr.apache.org/
Source0: %{name}-%{version}.tar.gz
Patch0: apr-util-1.2.2-exports.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: autoconf, doxygen, apr-devel >= 1.2.0
BuildRequires: openldap-devel, db4-devel, expat-devel
@ -36,6 +37,7 @@ library of C data structures and routines.
%prep
%setup -q
%patch0 -p1 -b .exports
%build
autoheader && autoconf
@ -61,6 +63,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp \
sed -i '/^old_library/s,libapr.*\.a,,' \
$RPM_BUILD_ROOT%{_libdir}/libapr*.la
# Remove unnecessary exports from dependency_libs
sed -ri '/^dependency_libs/{s,-l(pq|sqlite[0-9]|rt|dl|uuid) ,,g}' \
$RPM_BUILD_ROOT%{_libdir}/libapr*.la
%check
# Run the less verbose test suites
cd test
@ -92,6 +98,9 @@ rm -rf $RPM_BUILD_ROOT
%doc --parents html
%changelog
* Tue Dec 6 2005 Joe Orton <jorton@redhat.com> 1.2.2-2
- trim exports from .la file/--libs output (#174924)
* Fri Nov 25 2005 Joe Orton <jorton@redhat.com> 1.2.2-1
- update to 1.2.2