diff options
Diffstat (limited to 'security/PAM/patches/patch-ad')
-rw-r--r-- | security/PAM/patches/patch-ad | 138 |
1 files changed, 128 insertions, 10 deletions
diff --git a/security/PAM/patches/patch-ad b/security/PAM/patches/patch-ad index 77377e93698..215a838e2a0 100644 --- a/security/PAM/patches/patch-ad +++ b/security/PAM/patches/patch-ad @@ -1,7 +1,7 @@ -$NetBSD: patch-ad,v 1.4 2004/01/08 00:07:26 jlam Exp $ +$NetBSD: patch-ad,v 1.5 2004/11/16 07:46:57 jlam Exp $ ---- libpam/Makefile.orig Sun Dec 9 16:44:58 2001 -+++ libpam/Makefile Thu Sep 11 19:50:44 2003 +--- libpam/Makefile.orig 2001-12-09 16:44:58.000000000 -0500 ++++ libpam/Makefile @@ -6,7 +6,7 @@ include ../Make.Rules @@ -11,15 +11,133 @@ $NetBSD: patch-ad,v 1.4 2004/01/08 00:07:26 jlam Exp $ ifeq ($(WITH_LIBDEBUG),yes) LIBNAME=libpamd -@@ -125,8 +125,9 @@ +@@ -36,6 +36,10 @@ LIBPAMFULL = $(LIBPAMNAME)$(MODIFICATION + + LIBPAMSTATIC = $(LIBNAME).a + ++# libtool library name ++ ++LIBPAMLIBTOOL = $(LIBNAME).la ++ + ifdef STATIC + @echo Did you mean to set STATIC\? + MODULES = $(shell cat ../modules/_static_module_objects) +@@ -56,7 +60,7 @@ LIBOBJECTS = pam_item.o pam_strerror.o p + ifeq ($(DYNAMIC_LIBPAM),yes) + # libpam.so needs -ldl, too. + DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS) $(STATICOBJ)) +-ifeq ($(STATICOBJ),yes) ++ifdef STATICOBJ + dynamic/pam_static.o: pam_static.c ../modules/_static_module_objects + $(CC) $(CFLAGS) -c pam_static.c -o $@ + endif +@@ -70,10 +74,28 @@ static/pam_static.o: pam_static.c ../mod + endif + endif + ++ifeq ($(LIBTOOL_LIBPAM),yes) ++LALIBOBJECTS = $(LIBOBJECTS:.o=.lo) $(STATICOBJ:.o=.lo) ++ifdef STATICOBJ ++pam_static.lo: pam_static.c ../modules/_static_module_objects ++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c pam_static.c ++endif ++endif ++ + # --------------------------------------------- + ## rules + +-all: dirs $(LIBPAM) $(LIBPAMSTATIC) ../Make.Rules ++ifeq ($(DYNAMIC_LIBPAM),yes) ++LIBS_TO_BUILD+= $(LIBPAM) ++endif ++ifeq ($(STATIC_LIBPAM),yes) ++LIBS_TO_BUILD+= $(LIBPAMSTATIC) ++endif ++ifeq ($(LIBTOOL_LIBPAM),yes) ++LIBS_TO_BUILD+= $(LIBPAMLIBTOOL) ++endif ++ ++all: dirs $(LIBS_TO_BUILD) ../Make.Rules + + dirs: + ifeq ($(DYNAMIC_LIBPAM),yes) +@@ -89,6 +111,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 $< ++ + $(LIBPAM): $(DLIBOBJECTS) + ifeq ($(DYNAMIC_LIBPAM),yes) + ifeq ($(USESONAME),yes) +@@ -111,7 +136,26 @@ ifeq ($(STATIC_LIBPAM),yes) + $(RANLIB) $@ + endif + +-install: all ++$(LIBPAMLIBTOOL): $(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) $(FAKEROOT)$(libdir) + $(INSTALL) -m 644 include/security/pam_appl.h $(FAKEROOT)$(INCLUDED) + $(INSTALL) -m 644 include/security/pam_modules.h $(FAKEROOT)$(INCLUDED) +@@ -121,6 +165,8 @@ install: all + ifdef MEMORY_DEBUG + $(INSTALL) -m 644 include/security/pam_malloc.h $(FAKEROOT)$(INCLUDED) + endif ++ ++install-dynamic: + ifeq ($(DYNAMIC_LIBPAM),yes) $(INSTALL) -m $(SHLIBMODE) $(LIBPAM) $(FAKEROOT)$(libdir)/$(LIBPAMFULL) $(LDCONFIG) - ifneq ($(DYNTYPE),"sl") -- ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBPAM) ; \ -- ln -sf $(LIBPAMNAME) $(LIBPAM) ) -+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBPAM) $(LIBPAMNAME); \ -+ ln -sf $(LIBPAMFULL) $(LIBPAMNAME); \ -+ ln -sf $(LIBPAMFULL) $(LIBPAM) ) +@@ -129,10 +175,17 @@ ifeq ($(DYNAMIC_LIBPAM),yes) + ln -sf $(LIBPAMNAME) $(LIBPAM) ) endif endif ++ ++install-static: ifeq ($(STATIC_LIBPAM),yes) + $(INSTALL) -m 644 $(LIBPAMSTATIC) $(FAKEROOT)$(libdir) + endif + ++install-libtool: ++ifeq ($(LIBTOOL_LIBPAM),yes) ++ $(LIBTOOL) --mode=install $(INSTALL) -c $(LIBPAMLIBTOOL) $(FAKEROOT)$(libdir) ++endif ++ + remove: + rm -f $(FAKEROOT)$(INCLUDED)/_pam_types.h + rm -f $(FAKEROOT)$(INCLUDED)/_pam_macros.h +@@ -143,9 +196,13 @@ remove: + rm -f $(FAKEROOT)$(libdir)/$(LIBPAM) + $(LDCONFIG) + rm -f $(FAKEROOT)$(libdir)/$(LIBPAMSTATIC) ++ifeq ($(LIBTOOL_LIBPAM),yes) ++ $(LIBTOOL) --mode=uninstall rm $(FAKEROOT)$(libdir)$(LIBPAMLIBTOOL) ++endif + + clean: + rm -f a.out core *~ static/*.o dynamic/*.o +- rm -f *.a *.o *.so ./include/security/*~ ++ rm -f *.a *.la *.lo *.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 |