pkgsrc/security/cyrus-sasl/patches/patch-an
jlam 366cb19d6c Fix sasl-config script so that "sasl-config --libs" returns the full list
of libraries and linker flags needed to link against libsasl.  Bump
PKGREVISION and bump the BUILDLINK_DEPENDS as packages will be needing to
use a version of cyrus-sasl with a correct sasl-config.
2002-10-21 06:03:41 +00:00

114 lines
4.6 KiB
Text

$NetBSD: patch-an,v 1.2 2002/10/21 06:03:42 jlam Exp $
--- plugins/Makefile.in.orig Fri Mar 23 20:48:13 2001
+++ plugins/Makefile.in
@@ -143,6 +143,7 @@ SASL_KRB_LIB = @SASL_KRB_LIB@
SASL_MECHS = @SASL_MECHS@
SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
+SED = @SED@
SNPRINTFOBJS = @SNPRINTFOBJS@
SRP_LIBS = @SRP_LIBS@
VERSION = @VERSION@
@@ -168,6 +169,10 @@ sasldir = $(prefix)/lib/sasl
sasl_LTLIBRARIES = @SASL_MECHS@
EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la libscrammd5.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la
+bin_SCRIPTS = sasl-config
+sasl_config_CFLAGS = $(CPPFLAGS)
+sasl_config_LIBS = -lsasl $(libplain_la_LIBADD) $(libkerberos4_la_LIBADD) $(libgssapiv2_la_LIBADD)
+
libplain_la_SOURCES = plain.c
libplain_la_LDFLAGS = -version-info $(plain_version)
libplain_la_LIBADD = $(PLAIN_LIBS)
@@ -227,6 +232,8 @@ liblogin_la_DEPENDENCIES =
liblogin_la_OBJECTS = login.lo
libsrp_la_DEPENDENCIES =
libsrp_la_OBJECTS = srp.lo
+SCRIPTS = $(bin_SCRIPTS)
+
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -343,6 +350,25 @@ liblogin.la: $(liblogin_la_OBJECTS) $(li
libsrp.la: $(libsrp_la_OBJECTS) $(libsrp_la_DEPENDENCIES)
$(LINK) $(libsrp_la_LDFLAGS) $(libsrp_la_OBJECTS) $(libsrp_la_LIBADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi; \
+ done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_SCRIPTS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
@@ -395,7 +421,7 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
-install-exec-am:
+install-exec-am: install-binSCRIPTS
install-exec: install-exec-am
install-data-am: install-saslLTLIBRARIES
@@ -404,14 +430,14 @@ install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall-am: uninstall-saslLTLIBRARIES
+uninstall-am: uninstall-saslLTLIBRARIES uninstall-binSCRIPTS
uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(SCRIPTS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(sasldir)
+ $(mkinstalldirs) $(DESTDIR)$(sasldir) $(DESTDIR)$(bindir)
mostlyclean-generic:
@@ -455,9 +481,11 @@ clean-saslLTLIBRARIES maintainer-clean-s
uninstall-saslLTLIBRARIES install-saslLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
-maintainer-clean-libtool tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-exec-am install-exec \
+maintainer-clean-libtool uninstall-binSCRIPTS install-binSCRIPTS tags \
+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
+distdir mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
@@ -467,6 +495,13 @@ mostlyclean distclean maintainer-clean
# libx509_la_SOURCES = x509.c
# libx509_la_LDFLAGS = -version-info $(x509_version)
# libx509_la_LIBADD = $(X509_LIBS)
+
+sasl-config: sasl-config.in
+ $(SED) -e "s,%%sasl_config_LIBS%%,$(sasl_config_LIBS),g" \
+ -e "s,%%sasl_config_CFLAGS%%,$(sasl_config_CFLAGS),g" \
+ -e "s,%%prefix%%,$(prefix),g" \
+ -e "s,%%VERSION%%,$(VERSION),g" \
+ < sasl-config.in > sasl-config
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.