pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/tme Make the emulator not crash on EOF in th...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a15ff425fab4
branches:  trunk
changeset: 626155:a15ff425fab4
user:      martin <martin%pkgsrc.org@localhost>
date:      Sat Nov 02 21:53:36 2013 +0000

description:
Make the emulator not crash on EOF in the tmesh.
Also, since pkgsrc knows very well where we install the needed libraries,
use that as a default path if the user does not supply an LTDL_LIBRARY_PATH.

diffstat:

 emulators/tme/MESSAGE                           |   9 +++++----
 emulators/tme/distinfo                          |   6 ++++--
 emulators/tme/patches/patch-tmesh_Makefile.in   |  15 +++++++++++++++
 emulators/tme/patches/patch-tmesh_tmesh-input.y |  21 +++++++++++++++++----
 emulators/tme/patches/patch-tmesh_tmesh.c       |  19 +++++++++++++++++++
 5 files changed, 60 insertions(+), 10 deletions(-)

diffs (111 lines):

diff -r 23b6f59a6d33 -r a15ff425fab4 emulators/tme/MESSAGE
--- a/emulators/tme/MESSAGE     Sat Nov 02 21:09:10 2013 +0000
+++ b/emulators/tme/MESSAGE     Sat Nov 02 21:53:36 2013 +0000
@@ -1,9 +1,10 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2012/08/29 18:13:19 shattered Exp $
+$NetBSD: MESSAGE,v 1.2 2013/11/02 21:53:36 martin Exp $
 
-TME loads a number of shared libraries at runtime and requires that
-LTDL_LIBRARY_PATH environment variable is set correctly, for example:
+TME loads a number of shared libraries at runtime. By default it
+looks for them in ${PREFIX}/lib.
 
-export LTDL_LIBRARY_PATH=@PREFIX@/lib
+Set the LTDL_LIBRARY_PATH environment variable to override this
+(multiple directories may be colon separated).
 
 ===========================================================================
diff -r 23b6f59a6d33 -r a15ff425fab4 emulators/tme/distinfo
--- a/emulators/tme/distinfo    Sat Nov 02 21:09:10 2013 +0000
+++ b/emulators/tme/distinfo    Sat Nov 02 21:53:36 2013 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2013/04/14 02:00:15 dholland Exp $
+$NetBSD: distinfo,v 1.17 2013/11/02 21:53:36 martin Exp $
 
 SHA1 (tme-0.8.tar.gz) = dd4f3421c20ceed548c5328a21dbb26e80f46b9c
 RMD160 (tme-0.8.tar.gz) = 6bd505c5fa7810d37f436883383c4ba655df2ded
@@ -14,5 +14,7 @@
 SHA1 (patch-machine_sun2_sun2-mainbus.c) = 91b901d37d5f9a72064831d440c4371b81857640
 SHA1 (patch-machine_sun3_sun3-mainbus.c) = bfe56fdee109824ccf8a81760406b6c5d1ab7157
 SHA1 (patch-machine_sun4_sun4-mainbus.c) = 9dda3c5365e608cce2faa180d6a58351c8e58095
+SHA1 (patch-tmesh_Makefile.in) = 850adc8390ea3031ee3d55396373be8507a43c32
 SHA1 (patch-tmesh_tmesh-cmds.c) = 6fffc98ea828e0b58261d810382665ae56da03ff
-SHA1 (patch-tmesh_tmesh-input.y) = 745bb1eb860635b89ebf9a0d8560c6c6f49a8c11
+SHA1 (patch-tmesh_tmesh-input.y) = 1337a8faa4bc1a90a14c29d0d6853ec8f86b4cf2
+SHA1 (patch-tmesh_tmesh.c) = d14e18cc558e07d0334bc0fa5a8a27c4d92065bc
diff -r 23b6f59a6d33 -r a15ff425fab4 emulators/tme/patches/patch-tmesh_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/tme/patches/patch-tmesh_Makefile.in     Sat Nov 02 21:53:36 2013 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-tmesh_Makefile.in,v 1.1 2013/11/02 21:53:36 martin Exp $
+
+Provide a default path for modules
+
+--- tmesh/Makefile.in.orig     2010-06-05 21:57:47.000000000 +0200
++++ tmesh/Makefile.in  2013-11-02 21:37:20.000000000 +0100
+@@ -111,7 +111,7 @@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+ CYGPATH_W = @CYGPATH_W@
+-DEFS = @DEFS@
++DEFS = @DEFS@ -DLTDL_LIBRARY_PATH_DEFAULT='"@prefix@/lib"'
+ DEPDIR = @DEPDIR@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
diff -r 23b6f59a6d33 -r a15ff425fab4 emulators/tme/patches/patch-tmesh_tmesh-input.y
--- a/emulators/tme/patches/patch-tmesh_tmesh-input.y   Sat Nov 02 21:09:10 2013 +0000
+++ b/emulators/tme/patches/patch-tmesh_tmesh-input.y   Sat Nov 02 21:53:36 2013 +0000
@@ -1,8 +1,11 @@
-$NetBSD: patch-tmesh_tmesh-input.y,v 1.1 2013/02/26 23:39:18 joerg Exp $
+$NetBSD: patch-tmesh_tmesh-input.y,v 1.2 2013/11/02 21:53:36 martin Exp $
 
---- tmesh/tmesh-input.y.orig   2013-02-26 21:54:57.000000000 +0000
-+++ tmesh/tmesh-input.y
-@@ -301,7 +301,7 @@ _tmesh_parser_argv_arg(struct tmesh_pars
+Add missing format string parameter and avoid a crash on EOF on the shells
+input.
+
+--- tmesh/tmesh-input.y.orig   2006-11-16 00:11:31.000000000 +0100
++++ tmesh/tmesh-input.y        2013-11-02 22:45:05.000000000 +0100
+@@ -301,7 +301,7 @@
  static void
  yyerror(char *msg)
  {
@@ -11,3 +14,13 @@
    _tmesh_input->tmesh_scanner.tmesh_scanner_in_args = FALSE;
  }
  
+@@ -468,6 +468,9 @@
+       scanner->tmesh_scanner_in_quotes = FALSE;
+       scanner->tmesh_scanner_in_comment = FALSE;
+ 
++      if (stack->tmesh_io_stack_next == NULL)
++        _exit(0);
++
+       /* close the now-finished source: */
+       (*source->tmesh_io_close)(source, 
+                               (stack->tmesh_io_stack_next != NULL
diff -r 23b6f59a6d33 -r a15ff425fab4 emulators/tme/patches/patch-tmesh_tmesh.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/tme/patches/patch-tmesh_tmesh.c Sat Nov 02 21:53:36 2013 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-tmesh_tmesh.c,v 1.1 2013/11/02 21:53:36 martin Exp $
+
+Supply a sane default value for LTDL_LIBRARY_PATH.
+
+--- tmesh/tmesh.c.orig 2009-08-30 19:06:38.000000000 +0200
++++ tmesh/tmesh.c      2013-11-02 21:59:21.000000000 +0100
+@@ -583,6 +586,12 @@
+     }
+   }
+ 
++#ifdef LTDL_LIBRARY_PATH_DEFAULT
++  /* if the user did not provide a library path, put a sane default */
++  if (getenv("LTDL_LIBRARY_PATH") == NULL)
++    setenv("LTDL_LIBRARY_PATH", LTDL_LIBRARY_PATH_DEFAULT, 0);
++#endif
++
+   /* initialize libtme: */
+   (void) tme_init();
+ 



Home | Main Index | Thread Index | Old Index