pkgsrc/devel/libslang2/patches/patch-af

70 lines
3.4 KiB
Text
Raw Normal View History

$NetBSD: patch-af,v 1.3 2011/12/07 19:49:01 drochner Exp $
--- slsh/Makefile.in.orig 2011-04-11 02:37:07.000000000 +0000
+++ slsh/Makefile.in
@@ -69,36 +69,35 @@ DEST_SLSH_DOC_DIR= $(DESTDIR)$(SLSH_DOC_
@SET_MAKE@
SHELL = /bin/sh
Update libslang2 to 2.2.2. Add license. Changelog: Changes since 2.2.1 1. src/slsmg.c: Call SLutf8_enable if UTF8 mode has not been setup. 2. src/slutty.c: Allow the hook that gets called when the read function gets interrupted to change the read file descriptor. Before, if this happened, the SLang_getkey function would return SLANG_GETKEY_ERROR. 3. lib/slsh/print.sl: Turn off buffering of the pager pipe. 4. modules/tm/*.tm: A couple of typos corrected (John Houck) 5. src/slmath.c: The round function was not correctly rounding values between 0.5 and 1.0. 6. src/slstdio.c,slclass.c: If a call to fwrite produces errno=EPIPE, then do not bother trying the write again. 7. modules/fork-module.c: Use WIFCONTINUED only if it is defined. 8. slsh/Makefile.in: Change the order of the libraries such that the newly built ones will be found first. (Markus Hennecke) 9. src/slagetput.inc: Avoid possible access violation when using a range array as an index. 10. doc/tm/rtl/lists.tm: Documented the optional argument to the list_to_array function (Manfred Hanke). Changes since 2.2.0 1. modules/socket-module.c: glibc-2.8 removed the h_addr macro. 2. src/slclass.c: Call clearerr before performing the stdio_fread/fwrite functions. 3. src/slstdio.c: typeof in the fputs intrinsic fixed (n instead of dn was compared to 0). 4. src/slscanf.c: sscanf will treat NaN and Inf in a case-insensitive manner. Also, the NaN([a-zA-Z0-9]*) form is also supported. 5. src/slang.h: SLclass_set_aelem_init_function was missing from the API. 6. src/slmath.c: The expm1 and log1p functions were returning NaN when given Inf arguments. 7. src/slmath,c: log1p(-1) produced nan instead of -inf. 8. configure: Added pkg-config support (based upon a debian patch sent to me by Luca Bigliardi). 9. doc/tm/rtl/math.tm: Updated the help for set_float_format and added documentation for the get_float_format function. 10. autoconf/slangpc.in: Added URL and Libs.private entries to the slang.pc pkg-config file. 11. src/slang.h: prototype for SLang_create_array1 missing from slang.h. 12. src/slcurses.c: Added debian patch that adds support for additional graphics characters (DIAMOND, DEGREE, etc...). 13. doc/tm/slang.tm: Added a small section about arrays of arrays. 14. src/slang.c: __builtin_expect is used for the stack functions if compiled with gcc. 15. src/*.c: A few public variables were not explicitly initialized to 0. Apparantly not doing so causes them not be be exported from the windows DLL. Complete changes at: ftp://space.mit.edu/pub/davis/slang/v2.2/changes.txt
2009-12-16 20:16:58 +01:00
#INST_LIBS = $(RPATH) $(SLANG_INST_LIB) $(DEST_LIB_DIR) -lslang $(READLINE_LIB) $(OTHER_LIBS)
-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(OTHER_LIBS)
+INST_LIBS = -L$(PREFIX)/lib -lslang $(READLINE_LIB) $(OTHER_LIBS)
DEFS = -DSLSH_CONF_DIR='"$(SLSH_CONF_DIR)"' -DSLSH_PATH='"$(SLSH_LIB_DIR)"' \
-DSLSH_CONF_DIR_ENV='$(SLSH_CONF_DIR_ENV)' -DSLSH_LIB_DIR_ENV='$(SLSH_LIB_DIR_ENV)' \
-DSLSH_PATH_ENV='$(SLSH_PATH_ENV)'
SRC_LIBS = $(SLANG_SRCLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS)
#
-all: $(OBJDIR)/slsh_exe
-slsh: $(OBJDIR)/slsh
-$(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o
- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(SRC_LIBS)
-$(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o
- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(INST_LIBS)
-$(OBJDIR)/slsh.o: $(OBJDIR) slsh.c slsh.h config.h Makefile
- cd $(OBJDIR) && $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) $(SRCDIR)/slsh.c
-$(OBJDIR)/readline.o: $(OBJDIR) readline.c slsh.h config.h Makefile
- cd $(OBJDIR) && $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) -DUSE_GNU_READLINE=$(GNU_READLINE) $(SRCDIR)/readline.c
+all: slsh
+slsh: slsh.lo readline.lo
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) slsh.lo readline.lo -o slsh $(LDFLAGS) $(SRC_LIBS) $(INST_LIBS)
+#$(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o
+# $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(INST_LIBS)
+slsh.lo: slsh.c slsh.h config.h Makefile
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) slsh.c $(LIBTOOL_CFLAGS)
+readline.lo: readline.c slsh.h config.h Makefile
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) -DUSE_GNU_READLINE=$(GNU_READLINE) readline.c $(LIBTOOL_CFLAGS)
$(OBJDIR):
-$(MKINSDIR) $(OBJDIR)
config.h: ../src/config.h
cp ../src/config.h .
install_directories:
- $(MKINSDIR) $(DEST_BIN_DIR)
- $(MKINSDIR) $(DEST_MAN_DIR)
- $(MKINSDIR) $(DEST_SLSH_CONF_DIR)
- $(MKINSDIR) $(DEST_SLSH_LIB_DIR)
- $(MKINSDIR) $(DEST_SLSH_LIB_DIR)/rline
- $(MKINSDIR) $(DEST_SLSH_HELP_DIR)
- $(MKINSDIR) $(DEST_SLSH_LOCALLIB_DIR)
- $(MKINSDIR) $(DEST_SLSH_SCRIPT_DIR)
- $(MKINSDIR) $(DEST_SLSH_DOC_DIR)/html
+ $(BSD_INSTALL_PROGRAM_DIR) $(DEST_BIN_DIR)
+ $(BSD_INSTALL_MAN_DIR) $(DEST_MAN_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DEST_SLSH_CONF_DIR)
+ $(BSD_INSTALL_LIB_DIR) $(DEST_SLSH_LIB_DIR)
+ $(BSD_INSTALL_LIB_DIR) $(DEST_SLSH_LIB_DIR)/rline
+ $(BSD_INSTALL_DATA_DIR) $(DEST_SLSH_HELP_DIR)
+ $(BSD_INSTALL_LIB_DIR) $(DEST_SLSH_LOCALLIB_DIR)
+ $(BSD_INSTALL_SCRIPT_DIR) $(DEST_SLSH_SCRIPT_DIR)
+ $(BSD_INSTALL_DATA_DIR) $(DEST_SLSH_DOC_DIR)/html
install_lib_files:
@for X in lib/*.sl; \
do \
@@ -147,7 +146,7 @@ install_docs:
#
install: slsh install_directories install_lib_files install_rline_files \
install_scripts install_help install_docs
- $(INSTALL) $(OBJDIR)/slsh $(DEST_BIN_DIR)/
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) slsh $(DEST_BIN_DIR)/
$(INSTALL_DATA) etc/slsh.rc $(DEST_SLSH_CONF_DIR)/
echo 'prepend_to_slang_load_path("$(SLSH_LOCALLIB_DIR)");' >> $(DEST_SLSH_CONF_DIR)/slsh.rc
$(INSTALL_DATA) doc/man/slsh.1 $(DEST_MAN_DIR)/