From 5da3e556a5a4966290a459c477a48a34a210250a Mon Sep 17 00:00:00 2001 From: brad Date: Wed, 23 Jun 1999 17:28:33 +0000 Subject: [PATCH] add support for shared libs --- devel/libslang/Makefile | 16 +++++---- devel/libslang/patches/patch-ac | 55 +++++++++++++++++++++++++++++++ devel/libslang/patches/patch-ad | 12 +++++++ devel/libslang/pkg/PLIST | 2 ++ devel/libslang/pkg/PLIST.noshared | 3 ++ 5 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 devel/libslang/patches/patch-ac create mode 100644 devel/libslang/patches/patch-ad create mode 100644 devel/libslang/pkg/PLIST.noshared diff --git a/devel/libslang/Makefile b/devel/libslang/Makefile index 618358da189..cdc932edcad 100644 --- a/devel/libslang/Makefile +++ b/devel/libslang/Makefile @@ -1,18 +1,22 @@ -# $OpenBSD: Makefile,v 1.9 1999/06/23 01:44:36 marc Exp $ +# $OpenBSD: Makefile,v 1.10 1999/06/23 17:28:33 brad Exp $ DISTNAME= slang-1.3.7 PKGNAME= libslang-1.3.7 CATEGORIES= devel - -NEED_VERSION= 1.64 - -MAINTAINER= todd@OpenBSD.org - MASTER_SITES= ftp://space.mit.edu/pub/davis/slang/v1.3/ +NEED_VERSION= 1.73 + +MAINTAINER= todd@openbsd.org + GNU_CONFIGURE= yes test: @cd ${WRKSRC} && ${MAKE} runtests .include + +.if !defined(NO_SHARED_LIBS) +ALL_TARGET= all elf +INSTALL_TARGET= install-elf +.endif diff --git a/devel/libslang/patches/patch-ac b/devel/libslang/patches/patch-ac new file mode 100644 index 00000000000..be6acd591b7 --- /dev/null +++ b/devel/libslang/patches/patch-ac @@ -0,0 +1,55 @@ +--- src/Makefile.in.orig Wed Jun 23 11:14:49 1999 ++++ src/Makefile.in Wed Jun 23 11:21:46 1999 +@@ -2,8 +2,8 @@ + #--------------------------------------------------------------------------- + # ANSI C compiler + #--------------------------------------------------------------------------- +-CC = @CC@ +-CFLAGS = @CFLAGS@ ++#CC = @CC@ ++#CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ @DYNAMIC_LINK_FLAGS@ + #----------------------------------------------------------------------------- + # System library that contains functions for dynamic linking (-ldl) +@@ -13,9 +13,9 @@ + #--------------------------------------------------------------------------- + # ELF specific (Linux) + #--------------------------------------------------------------------------- +-ELF_CC = @ELF_CC@ +-ELF_CFLAGS = @ELF_CFLAGS@ +-ELF_LINK = @ELF_LINK@ ++ELF_CC = $(CC) ++ELF_CFLAGS = $(CFLAGS) -fpic -DPIC ++ELF_LINK = ld -Bshareable -Bforcearchive + ELF_DEP_LIBS = $(DL_LIB) -lm -lc + + #--------------------------------------------------------------------------- +@@ -104,11 +104,9 @@ + + $(ELFDIR_ELF_LIB): $(ELFDIR) $(CONFIG_H) $(ELFOBJS) + -$(RM) $(ELFDIR_ELF_LIB) +- cd $(ELFDIR); $(ELF_LINK_CMD) -o $(ELFLIB_MAJOR_MINOR) $(OFILES) $(ELF_DEP_LIBS) +- cd $(ELFDIR); $(RM) $(ELFLIB); $(LN) $(ELFLIB_MAJOR_MINOR) $(ELFLIB) ++ cd $(ELFDIR); $(ELF_LINK) -o $(ELFLIB_MAJOR_MINOR) $(OFILES) $(ELF_DEP_LIBS) + @echo "" + @echo $(ELFLIB_MAJOR_MINOR) created in $(ELFDIR). +- @echo The link $(ELFLIB) to $(ELFLIB_MAJOR_MINOR) was also created. + @echo "" + $(OBJDIR) : + -$(MKDIR) $(OBJDIR) +@@ -135,15 +133,10 @@ + install-elf: install elf $(install_lib_dir) $(install_include_dir) $(ELFDIR_ELF_LIB) + $(INSTALL_DATA) $(SRCDIR)/slang.h $(install_include_dir) + $(INSTALL_DATA) $(SRCDIR)/slcurses.h $(install_include_dir) +- -$(RM) $(install_lib_dir)/$(ELFLIB) +- -$(RM) $(install_lib_dir)/$(ELFLIB_MAJOR) + @echo installing $(ELFLIB_MAJOR_MINOR) in $(install_lib_dir) + $(INSTALL_DATA) $(ELFDIR_ELF_LIB) $(install_lib_dir) +- @echo creating symbolic links to $(ELFLIB_MAJOR_MINOR) +- -cd $(install_lib_dir); $(LN) $(ELFLIB_MAJOR_MINOR) $(ELFLIB) + @echo "" + @echo $(ELFLIB_MAJOR_MINOR) created in $(install_lib_dir). +- @echo The link $(ELFLIB) to $(ELFLIB_MAJOR_MINOR) was also created. + @echo "" + install-links: + -$(RM) $(install_lib_dir)/$(ELFLIB) diff --git a/devel/libslang/patches/patch-ad b/devel/libslang/patches/patch-ad new file mode 100644 index 00000000000..c8db4f6cff5 --- /dev/null +++ b/devel/libslang/patches/patch-ad @@ -0,0 +1,12 @@ +--- configure.orig Sun Jun 6 19:34:53 1999 ++++ configure Wed Jun 23 11:34:43 1999 +@@ -1952,7 +1952,8 @@ + slang_mminor_version=`echo $slang_version $slang_major_version $slang_minor_version | + awk '{ print ($1 - $2*10000 - $3*100) }'` + +-slang_minor_version=$slang_minor_version.$slang_mminor_version ++slang_major_version=$slang_major_version$slang_minor_version ++slang_minor_version=$slang_mminor_version + echo "$ac_t""$slang_major_version.$slang_minor_version" 1>&6 + + diff --git a/devel/libslang/pkg/PLIST b/devel/libslang/pkg/PLIST index ce0dccbddb6..5db700fd4ec 100644 --- a/devel/libslang/pkg/PLIST +++ b/devel/libslang/pkg/PLIST @@ -1,3 +1,5 @@ lib/libslang.a +lib/libslang.so.13.7 +@exec /sbin/ldconfig -m %B include/slcurses.h include/slang.h diff --git a/devel/libslang/pkg/PLIST.noshared b/devel/libslang/pkg/PLIST.noshared new file mode 100644 index 00000000000..ce0dccbddb6 --- /dev/null +++ b/devel/libslang/pkg/PLIST.noshared @@ -0,0 +1,3 @@ +lib/libslang.a +include/slcurses.h +include/slang.h