The attached patch fixes krb5-config to always spit out -L and -I
flags.
From 80533a7b8b49e57ac1481cc0b0e61f51e8d529ba Mon Sep 17 00:00:00 2001
From: Jelmer Vernooij <jel...@samba.org>
Date: Sun, 20 Apr 2014 16:01:35 +0200
Subject: [PATCH] Provide -L and -I flags from krb5-config. Closes: #730837

---
 debian/changelog                                   |  7 ++++
 .../debian-local/0008-krb5-config-paths.patch      | 43 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 src/build-tools/krb5-config.in                     | 14 ++-----
 4 files changed, 54 insertions(+), 11 deletions(-)
 create mode 100644 debian/patches/debian-local/0008-krb5-config-paths.patch

diff --git a/debian/changelog b/debian/changelog
index 55ef0fd..b447211 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+krb5 (1.12.1+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Provide -L and -I flags from krb5-config. Closes: #730837
+
+ -- Jelmer Vernooij <jel...@debian.org>  Sun, 20 Apr 2014 16:01:25 +0200
+
 krb5 (1.12.1+dfsg-1) unstable; urgency=low
 
   [ Sam Hartman ]
diff --git a/debian/patches/debian-local/0008-krb5-config-paths.patch b/debian/patches/debian-local/0008-krb5-config-paths.patch
new file mode 100644
index 0000000..1e7cc50
--- /dev/null
+++ b/debian/patches/debian-local/0008-krb5-config-paths.patch
@@ -0,0 +1,43 @@
+From: Jelmer Vernooij <jel...@debian.org>
+Date: Sun 20 Apr 15:59:08 CEST 2014
+Debian-Bug: http://bugs.debian.org/730837
+Subject: Fix krb5-config paths
+
+Include library and include flags in krb5-config, so they
+work when the symlinks provided by libkrb5-dev are not
+installed.
+
+Patch-Category: debian-local
+
+diff --git a/src/build-tools/krb5-config.in b/src/build-tools/krb5-config.in
+index 637bad7..a73654f 100755
+--- a/src/build-tools/krb5-config.in
++++ b/src/build-tools/krb5-config.in
+@@ -29,8 +29,8 @@ version_string="Kerberos 5 release @KRB5_VERSION@"
+ 
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-includedir=@includedir@
+-libdir=@libdir@
++includedir=@includedir@/mit-krb5
++libdir=@libdir@/mit-krb5
+ CC_LINK='@CC_LINK@'
+ KDB5_DB_LIB=@KDB5_DB_LIB@
+ LDFLAGS='@LDFLAGS@'
+@@ -209,15 +209,7 @@ fi
+ 
+ 
+ if test -n "$do_libs"; then
+-    # Assumes /usr/lib is the standard library directory everywhere...
+-    case $libdir in
+-	/usr/lib*)
+-	    libdirarg=
+-	    ;;
+-	*)
+-	    libdirarg="-L$libdir"
+-	    ;;
+-    esac
++	libdirarg="-L$libdir"
+     # Ugly gross hack for our build tree
+     lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
+ 	    -e 's/\$(PURE)//' \
diff --git a/debian/patches/series b/debian/patches/series
index 1cdbfde..54d53fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,7 @@ debian-local/0004-debian-osconf.hin-path-changes.patch
 debian-local/0005-debian-install-ldap-library-in-subdirectory.patch
 debian-local/0006-gssapi-never-unload-mechanisms.patch
 debian-local/0007-Add-substpdf-target.patch
+debian-local/0008-krb5-config-paths.patch
 upstream/0008-Move-OTP-sockets-to-KDC_RUN_DIR.patch
 upstream/0009-Avoid-duplicate-etc-krb5.conf-in-profile-path.patch
 0010-autoreconf.patch
diff --git a/src/build-tools/krb5-config.in b/src/build-tools/krb5-config.in
index 637bad7..a73654f 100755
--- a/src/build-tools/krb5-config.in
+++ b/src/build-tools/krb5-config.in
@@ -29,8 +29,8 @@ version_string="Kerberos 5 release @KRB5_VERSION@"
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-includedir=@includedir@
-libdir=@libdir@
+includedir=@includedir@/mit-krb5
+libdir=@libdir@/mit-krb5
 CC_LINK='@CC_LINK@'
 KDB5_DB_LIB=@KDB5_DB_LIB@
 LDFLAGS='@LDFLAGS@'
@@ -209,15 +209,7 @@ fi
 
 
 if test -n "$do_libs"; then
-    # Assumes /usr/lib is the standard library directory everywhere...
-    case $libdir in
-	/usr/lib*)
-	    libdirarg=
-	    ;;
-	*)
-	    libdirarg="-L$libdir"
-	    ;;
-    esac
+	libdirarg="-L$libdir"
     # Ugly gross hack for our build tree
     lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
 	    -e 's/\$(PURE)//' \
-- 
1.9.2.657.geaba915

Attachment: signature.asc
Description: Digital signature

Reply via email to