- fixed DLZ drivers building on 64bit systems

This commit is contained in:
Adam Tkac 2007-07-23 14:27:48 +00:00
parent a7cf97ec50
commit e93ead5573
2 changed files with 92 additions and 5 deletions

84
bind-9.5-dlz-64bit.patch Normal file
View File

@ -0,0 +1,84 @@
diff -up bind-9.5.0a5/contrib/dlz/config.dlz.in.64bit bind-9.5.0a5/contrib/dlz/config.dlz.in
--- bind-9.5.0a5/contrib/dlz/config.dlz.in.64bit 2006-06-07 04:21:50.000000000 +0200
+++ bind-9.5.0a5/contrib/dlz/config.dlz.in 2007-07-23 11:18:54.000000000 +0200
@@ -17,6 +17,13 @@
#
dlzdir='${DLZ_DRIVER_DIR}'
+AC_MSG_CHECKING([for target libdir])
+AC_RUN_IFELSE([int main(void) {exit((sizeof(void *) == 8) ? 0 : 1);}],
+ [target_lib=lib64],
+ [target_lib=lib],
+)
+AC_MSG_RESULT(["$target_lib"])
+
#
# Private autoconf macro to simplify configuring drivers:
#
@@ -83,7 +90,7 @@ then
if test -f $d/include/libpq-fe.h
then
use_dlz_postgres=$d/include
- use_dlz_postgres_lib=$d/lib
+ use_dlz_postgres_lib=$d/${target_lib}
break
fi
done
@@ -151,10 +158,10 @@ case "$use_dlz_mysql" in
*)
DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
[-I$use_dlz_mysql/include/mysql],
- [-L$use_dlz_mysql/lib/mysql -lmysqlclient -lz -lcrypt -lm])
+ [-L$use_dlz_mysql/${target_lib}/mysql -lmysqlclient -lz -lcrypt -lm])
AC_MSG_RESULT(
-[using mysql from $use_dlz_mysql/lib/mysql and $use_dlz_mysql/include/mysql])
+[using mysql from $use_dlz_mysql/${target_lib}/mysql and $use_dlz_mysql/include/mysql])
;;
esac
@@ -232,11 +239,11 @@ case "$use_dlz_bdb" in
bdb_libnames="db42 db-4.2 db41 db-4.1 db"
for d in $bdb_libnames
do
- if test -f "$dd/lib/lib${d}.so"
+ if test -f "$dd/${target_lib}/lib${d}.so"
then
if test "$dd" != "/usr"
then
- dlz_bdb_libs="-L${dd}/lib "
+ dlz_bdb_libs="-L${dd}/${target_lib} "
else
dlz_bdb_libs=""
fi
@@ -341,10 +348,10 @@ case "$use_dlz_ldap" in
*)
DLZ_ADD_DRIVER(LDAP, dlz_ldap_driver,
[-I$use_dlz_ldap/include],
- [-L$use_dlz_ldap/lib -lldap -llber])
+ [-L$use_dlz_ldap/${target_lib} -lldap -llber])
AC_MSG_RESULT(
-[using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include])
+[using LDAP from $use_dlz_ldap/${target_lib} and $use_dlz_ldap/include])
;;
esac
@@ -365,7 +372,7 @@ then
odbcdirs="/usr /usr/local /usr/pkg"
for d in $odbcdirs
do
- if test -f $d/include/sql.h -a -f $d/lib/libodbc.a
+ if test -f $d/include/sql.h -a -f $d/${target_lib}/libodbc.a
then
use_dlz_odbc=$d
break
@@ -385,7 +392,7 @@ case "$use_dlz_odbc" in
*)
DLZ_ADD_DRIVER(ODBC, dlz_odbc_driver,
[-I$use_dlz_odbc/include],
- [-L$use_dlz_odbc/lib -lodbc])
+ [-L$use_dlz_odbc/${target_lib} -lodbc])
AC_MSG_RESULT([using ODBC from $use_dlz_odbc])
;;

View File

@ -18,7 +18,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: BSD-like
Version: 9.5.0a5
Release: 4%{?dist}
Release: 4.1%{?dist}
Epoch: 31
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -59,6 +59,7 @@ Patch63: bind-9.4.0-dnssec-directory.patch
Patch69: bind-9.5.0-generate-xml.patch
Patch70: bind-9.5.0-errno-init.patch
Patch71: bind-9.5-overflow.patch
Patch72: bind-9.5-dlz-64bit.patch
# SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch
@ -82,10 +83,8 @@ Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp
Requires(post): grep, chkconfig >= 1.3.26
Requires(pre): shadow-utils
Requires(preun):chkconfig >= 1.3.26
Obsoletes: bind-config
Provides: bind-config
Obsoletes: caching-nameserver
Provides: caching-nameserver
Obsoletes: bind-config, caching-nameserver, bind-sdb
Provides: bind-config, caching-nameserver, bind-sdb
%if %{selinux}
Requires(post): policycoreutils
%endif
@ -241,6 +240,7 @@ popd
%patch65 -p1 -b .idn
%patch70 -p1 -b .errno-init
%patch71 -p1 -b .overflow
%patch72 -p1 -b .64bit
:;
@ -682,6 +682,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/bind-chroot-admin
%changelog
* Mon Jul 21 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-4.1.fc8
- fixed DLZ drivers building on 64bit systems
* Fri Jul 20 2007 Adam Tkac <atkac redhat com> 31:9.5.0a5-4.fc8
- fixed relation between logrotated and chroot-ed named