summaryrefslogtreecommitdiff
path: root/security/PAM/patches/patch-ae
diff options
context:
space:
mode:
Diffstat (limited to 'security/PAM/patches/patch-ae')
-rw-r--r--security/PAM/patches/patch-ae126
1 files changed, 116 insertions, 10 deletions
diff --git a/security/PAM/patches/patch-ae b/security/PAM/patches/patch-ae
index 34af2839d09..bce44d12cb9 100644
--- a/security/PAM/patches/patch-ae
+++ b/security/PAM/patches/patch-ae
@@ -1,22 +1,128 @@
-$NetBSD: patch-ae,v 1.4 2003/01/13 14:18:08 grant Exp $
+$NetBSD: patch-ae,v 1.5 2004/11/16 07:46:57 jlam Exp $
---- libpam_misc/Makefile.orig Thu Jun 27 14:04:54 2002
+--- libpam_misc/Makefile.orig 2002-06-27 00:04:54.000000000 -0400
+++ libpam_misc/Makefile
-@@ -16,7 +16,7 @@ VERSION=.$(MAJOR_REL)
+@@ -16,7 +16,12 @@ VERSION=.$(MAJOR_REL)
MODIFICATION=.$(MINOR_REL)
CFLAGS += $(MOREFLAGS) $(DYNAMIC) $(STATIC)
--LINKLIBS += -L$(absolute_objdir)/libpam -lpam
-+LINKLIBS += -L$(absolute_objdir)/libpam -lpam $(LDFLAGS)
++ifeq ($(DYNAMIC_LIBPAM),yes)
+ LINKLIBS += -L$(absolute_objdir)/libpam -lpam
++endif
++ifeq ($(LIBTOOL_LIBPAM),yes)
++LINKLIBS += $(absolute_objdir)/libpam/libpam.la
++endif
# dynamic library names
-@@ -86,7 +86,7 @@ ifeq ($(DYNAMIC_LIBPAM),yes)
+@@ -28,6 +33,10 @@ LIBNAMEDFULL = $(LIBNAMEDNAME)$(MODIFICA
+
+ LIBNAMEDSTATIC = $(LIBNAME).a
+
++# libtool library name
++
++LIBNAMEDLIBTOOL = $(LIBNAME).la
++
+ LIBOBJECTS = help_env.o misc_conv.o
+
+ ifeq ($(DYNAMIC_LIBPAM),yes)
+@@ -38,10 +47,24 @@ ifeq ($(STATIC_LIBPAM),yes)
+ SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS))
+ endif
+
++ifeq ($(LIBTOOL_LIBPAM),yes)
++LALIBOBJECTS = $(LIBOBJECTS:.o=.lo)
++endif
++
+ # ---------------------------------------------
+ ## rules
+
+-all: dirs $(LIBNAMED) $(LIBNAMEDSTATIC)
++ifeq ($(DYNAMIC_LIBPAM),yes)
++LIBS_TO_BUILD+= $(LIBNAMED)
++endif
++ifeq ($(STATIC_LIBPAM),yes)
++LIBS_TO_BUILD+= $(LIBNAMEDSTATIC)
++endif
++ifeq ($(LIBTOOL_LIBPAM),yes)
++LIBS_TO_BUILD+= $(LIBNAMEDLIBTOOL)
++endif
++
++all: dirs $(LIBS_TO_BUILD)
+
+ dirs:
+ ifeq ($(DYNAMIC_LIBPAM),yes)
+@@ -57,6 +80,9 @@ dynamic/%.o : %.c
+ static/%.o : %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+
++%.lo : %.c
++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $<
++
+ $(LIBNAMED): $(DLIBOBJECTS)
+ ifeq ($(DYNAMIC_LIBPAM),yes)
+ ifeq ($(USESONAME),yes)
+@@ -78,9 +104,30 @@ ifeq ($(STATIC_LIBPAM),yes)
+ $(RANLIB) $@
+ endif
+
+-install: all
++$(LIBNAMEDLIBTOOL): $(LALIBOBJECTS)
++ifeq ($(LIBTOOL_LIBPAM),yes)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LALIBOBJECTS) -o $@ \
++ $(MODULES) $(LINKLIBS) \
++ -rpath $(libdir) -version-info $(MAJOR_REL):$(MINOR_REL)
++endif
++
++install: all install-headers
++
++ifeq ($(DYNAMIC_LIBPAM),yes)
++install: install-dynamic
++endif
++ifeq ($(STATIC_LIBPAM),yes)
++install: install-static
++endif
++ifeq ($(LIBTOOL_LIBPAM),yes)
++install: install-libtool
++endif
++
++install-headers:
+ $(MKDIR) $(FAKEROOT)$(INCLUDED)
+ $(INSTALL) -m 644 include/security/pam_misc.h $(FAKEROOT)$(INCLUDED)
++
++install-dynamic:
+ ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) $(FAKEROOT)$(libdir)
$(INSTALL) -m $(SHLIBMODE) $(LIBNAMED) $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
- $(LDCONFIG)
- ifneq ($(DYNTYPE),"sl")
-- ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) ; ln -s $(LIBNAMEDNAME) $(LIBNAMED) )
-+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) $(LIBNAMEDNAME); ln -s $(LIBNAMEDFULL) $(LIBNAMED); ln -s $(LIBNAMEDFULL) $(LIBNAMEDNAME) )
+@@ -89,19 +136,30 @@ ifeq ($(DYNAMIC_LIBPAM),yes)
+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) ; ln -s $(LIBNAMEDNAME) $(LIBNAMED) )
endif
endif
++
++install-static:
ifeq ($(STATIC_LIBPAM),yes)
+ $(INSTALL) -m 644 $(LIBNAMEDSTATIC) $(FAKEROOT)$(libdir)
+ endif
+
++install-libtool:
++ifeq ($(LIBTOOL_LIBPAM),yes)
++ $(LIBTOOL) --mode=install $(INSTALL) -c $(LIBNAMEDLIBTOOL) $(FAKEROOT)$(libdir)
++endif
++
+ remove:
+ rm -f $(FAKEROOT)$(INCLUDED)/pam_misc.h
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMED)
+ $(LDCONFIG)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDSTATIC)
++ifeq ($(LIBTOOL_LIBPAM),yes)
++ $(LIBTOOL) --mode=uninstall rm $(FAKEROOT)$(libdir)/$(LIBNAMEDLIBTOOL)
++endif
+
+ clean:
+ rm -f a.out core *~ static/*.o dynamic/*.o
+- rm -f *.a *.out *.o *.so ./include/security/*~
++ rm -f *.a *.la *.lo *.out *.o *.so .libs/* ./include/security/*~
+ if [ -d dynamic ]; then rmdir dynamic ; fi
+ if [ -d static ]; then rmdir static ; fi
++ if [ -d .libs ]; then rmdir .libs ; fi