summaryrefslogtreecommitdiff
path: root/emulators/tme
diff options
context:
space:
mode:
authormartin <martin@pkgsrc.org>2013-11-02 21:53:36 +0000
committermartin <martin@pkgsrc.org>2013-11-02 21:53:36 +0000
commit99a67866aead03eec18a11d4ebf61d156fe91f03 (patch)
treed226910b8e40ccd2c3f2f50d3b1b2e4eb0f6e9a4 /emulators/tme
parent052a4f0ccb983a54bb0280684d4a2690f131307a (diff)
downloadpkgsrc-99a67866aead03eec18a11d4ebf61d156fe91f03.tar.gz
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 (limited to 'emulators/tme')
-rw-r--r--emulators/tme/MESSAGE9
-rw-r--r--emulators/tme/distinfo6
-rw-r--r--emulators/tme/patches/patch-tmesh_Makefile.in15
-rw-r--r--emulators/tme/patches/patch-tmesh_tmesh-input.y21
-rw-r--r--emulators/tme/patches/patch-tmesh_tmesh.c19
5 files changed, 60 insertions, 10 deletions
diff --git a/emulators/tme/MESSAGE b/emulators/tme/MESSAGE
index 14964eb5a59..3983de313b1 100644
--- a/emulators/tme/MESSAGE
+++ b/emulators/tme/MESSAGE
@@ -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 --git a/emulators/tme/distinfo b/emulators/tme/distinfo
index 0f4e45f9fd9..a99acba9f69 100644
--- a/emulators/tme/distinfo
+++ b/emulators/tme/distinfo
@@ -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-ic_ieee754_ieee754-misc-auto.sh) = afeb7452ef64bcae71e4dbae21881cff1
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 --git a/emulators/tme/patches/patch-tmesh_Makefile.in b/emulators/tme/patches/patch-tmesh_Makefile.in
new file mode 100644
index 00000000000..b3e1cd8d0d4
--- /dev/null
+++ b/emulators/tme/patches/patch-tmesh_Makefile.in
@@ -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 --git a/emulators/tme/patches/patch-tmesh_tmesh-input.y b/emulators/tme/patches/patch-tmesh_tmesh-input.y
index 57d09ada020..e79a5287b05 100644
--- a/emulators/tme/patches/patch-tmesh_tmesh-input.y
+++ b/emulators/tme/patches/patch-tmesh_tmesh-input.y
@@ -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 @@ $NetBSD: patch-tmesh_tmesh-input.y,v 1.1 2013/02/26 23:39:18 joerg Exp $
_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 --git a/emulators/tme/patches/patch-tmesh_tmesh.c b/emulators/tme/patches/patch-tmesh_tmesh.c
new file mode 100644
index 00000000000..d6a9021cf10
--- /dev/null
+++ b/emulators/tme/patches/patch-tmesh_tmesh.c
@@ -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();
+