pkgsrc/devel/libslang/patches/patch-aa
jlam 45391e9c1b Fix patch so that it refers to $(TCAPLIB) and doesn't hardcode "-ltermcap".
Now the only time that libslang.so links against libtermcap.so only when
we're using termcap.  In the case where we don't, libslang.so includes
its own terminfo database parser, so we don't need to link against any
curses or other terminfo library.

Bump the PKGREVISION to 7.
2008-03-01 03:09:35 +00:00

81 lines
3.2 KiB
Text

$NetBSD: patch-aa,v 1.17 2008/03/01 03:09:35 jlam Exp $
--- src/Makefile.in.orig Sun Feb 10 18:39:19 2002
+++ src/Makefile.in Mon Mar 25 11:59:49 2002
@@ -4,7 +4,7 @@
#---------------------------------------------------------------------------
CC = @CC@
CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@ @DYNAMIC_LINK_FLAGS@
+LDFLAGS = $(EXECLIBS)
#-----------------------------------------------------------------------------
# System library that contains functions for dynamic linking (-ldl)
#-----------------------------------------------------------------------------
@@ -22,7 +22,7 @@
# Set these values to ABSOLUTE path names
#---------------------------------------------------------------------------
SRCDIR = @SRCDIR@# Location of sources
-OBJDIR = @OBJDIR@# Location of objects
+OBJDIR = .# Location of objects
ELFDIR = @ELFDIR@# Location of elf objects
#---------------------------------------------------------------------------
@@ -38,7 +38,7 @@
exec_prefix = @exec_prefix@
install_lib_dir = @libdir@
install_include_dir = @includedir@
-install_doc_dir = $(prefix)/doc/slang
+install_doc_dir = $(prefix)/share/doc/slang
DOC_FILES = ../changes.txt ../COPY* ../doc/slangdoc.html ../doc/text/*.txt
MODULE_INSTALL_DIR = @libdir@/slang/modules
#---------------------------------------------------------------------------
@@ -76,11 +76,11 @@
CONFIG_H = config.h
ALL_CFLAGS = $(CFLAGS) -Dunix $(THIS_LIB_DEFINES)
ALL_ELF_CFLAGS = $(ELF_CFLAGS) -Dunix $(THIS_LIB_DEFINES)
-COMPILE_CMD = $(CC) -c $(ALL_CFLAGS)
+COMPILE_CMD = $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS)
ELFCOMPILE_CMD = $(ELF_CC) -c $(ALL_ELF_CFLAGS)
ELF_LINK_CMD = @ELF_LINK_CMD@
-NORMAL_LIB = lib$(THIS_LIB).a
+NORMAL_LIB = lib$(THIS_LIB).la
OBJDIR_NORMAL_LIB = $(OBJDIR)/$(NORMAL_LIB)
# ELFLIB = lib$(THIS_LIB).so#
@@ -92,7 +92,7 @@
ELFDIR_ELF_LIB = $(ELFDIR)/$(ELFLIB_MAJOR_MINOR)#
-EXECLIBS = -L$(OBJDIR) -lslang -lm $(TCAPLIB) $(DL_LIB)
+EXECLIBS = libslang.la $(TCAPLIB)
EXECDEPS = $(OBJDIR_NORMAL_LIB)
OFILES = @PROGRAM_OFILES@
@@ -112,13 +112,12 @@
#---------------------------------------------------------------------------
# Rules
#---------------------------------------------------------------------------
-all: $(OBJDIR) $(CONFIG_H) $(OBJDIR_NORMAL_LIB) $(OTHERSTUFF)
+all: $(OBJDIR) $(CONFIG_H) $(OBJDIR_NORMAL_LIB)
elf: $(ELFDIR) $(CONFIG_H) $(ELFDIR_ELF_LIB)
$(OBJDIR_NORMAL_LIB): $(OBJDIR) $(CONFIG_H) $(OBJS)
- -$(RM) $(OBJDIR_NORMAL_LIB)
- cd $(OBJDIR); $(AR_CR) $(NORMAL_LIB) $(OFILES)
- $(RANLIB) $(OBJDIR_NORMAL_LIB)
+ cd $(OBJDIR); $(LIBTOOL) --mode=link $(CC) -o $(NORMAL_LIB) $(OFILES:.o=.lo) \
+ -rpath $(PREFIX)/lib $(DL_LIB) -lm $(TCAPLIB) -version-info 1:4
@echo ""
@echo $(NORMAL_LIB) created in $(OBJDIR)
@@ -143,8 +142,7 @@
install: install_basic_lib install_docs
install_basic_lib: $(DEST_LIBDIR) $(DEST_INCDIR) $(OBJDIR_NORMAL_LIB)
@echo installing $(OBJDIR_NORMAL_LIB) in $(DEST_LIBDIR)
- $(INSTALL_DATA) $(OBJDIR_NORMAL_LIB) $(DEST_LIBDIR)
- $(RANLIB) $(DEST_LIBDIR)/$(NORMAL_LIB)
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(OBJDIR_NORMAL_LIB) $(DEST_LIBDIR)
@echo installing slang.h and slcurses.h in $(DEST_INCDIR)
$(INSTALL_DATA) $(SRCDIR)/slang.h $(DEST_INCDIR)
$(INSTALL_DATA) $(SRCDIR)/slcurses.h $(DEST_INCDIR)