I'd like to update the Jimtcl port but that necessitates an update of OpenOCD.
A typedef in Jim had a * removed so it has to be added to OpenOCD in a couple 
of places.

I sent similar diffs to the OpenOCD maintainer last week but have yet to hear 
from him.
It's a simple change to OpenOCD, and although I'm not sure how to test it,
the build output with the new Jimtcl is the same as with the current Jimtcl.

The Jimtcl update also removes the RUN_DEPENDS on Tcl (Jim doesn't need Tcl),
improves Jim's auto_path and installs more docs and examples.

Fixed a bad bound bug in OpenOCD. OpenOCD shouldn't need Tcl either.

k?


Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/jimtcl/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile    11 Sep 2014 03:49:27 -0000      1.8
+++ Makefile    12 Sep 2014 21:47:20 -0000
@@ -4,8 +4,8 @@ SHARED_ONLY =           Yes

 COMMENT =              small footprint implementation of Tcl

-DISTNAME =             jimtcl-0.75pl0
-SHARED_LIBS =          jim 1.1
+DISTNAME =             jimtcl-0.75pl1
+SHARED_LIBS =          jim 1.2
 CATEGORIES =           lang devel
 HOMEPAGE =             http://jim.tcl.tk/
 MAINTAINER =           Stuart Cassoff <s...@users.sourceforge.net>
@@ -15,11 +15,10 @@ PERMIT_PACKAGE_CDROM =      Yes

 WANTLIB =              c m sqlite3

-# Git checkin          2013/11/09 fae001d74c06a6293798d6b27db874ff46610a42
+# Git checkin          2014/09/01 c4d4bf8bc104733db1f5992a27d88fbfca9ba882
 MASTER_SITES =         http://mirror.arieslabs.com/openbsd/

 MODULES =              lang/tcl
-RUN_DEPENDS =          ${MODTCL_RUN_DEPENDS}

 BUILD_DEPENDS =                ${MODTCL_BUILD_DEPENDS} \
                        textproc/asciidoc
@@ -31,7 +30,8 @@ MAKE_FLAGS =          LIBJIM=libjim.so.${LIBjim_

 FAKE_FLAGS =           INSTALL_DATA_DIR='${INSTALL_DATA_DIR}' \
                        INSTALL_DATA='${INSTALL_DATA}' \
-                       INSTALL_PROGRAM='${INSTALL_PROGRAM}'
+                       INSTALL_PROGRAM='${INSTALL_PROGRAM}' \
+                       INSTALL_SCRIPT='${INSTALL_SCRIPT}'

 SEPARATE_BUILD =       Yes
 CONFIGURE_STYLE =      simple
@@ -41,5 +41,8 @@ CONFIGURE_ARGS +=     ${CONFIGURE_SHARED} \
                        --full \
                        --with-mod=sqlite3 \
                        CCACHE=none
+
+pre-configure:
+       @${SUBST_CMD} ${WRKSRC}/examples.{api,ext}/Makefile

 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/jimtcl/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    14 Nov 2013 09:11:21 -0000      1.3
+++ distinfo    12 Sep 2014 21:47:20 -0000
@@ -1,2 +1,2 @@
-SHA256 (jimtcl-0.75pl0.tar.gz) = hke0AsUyrgKYC86LhjmwIIfw+psdyFyT0oiWECuGUjA=
-SIZE (jimtcl-0.75pl0.tar.gz) = 2217434
+SHA256 (jimtcl-0.75pl1.tar.gz) = P0IpuMohJOHD79LznqEpaVlbligXbJ04z9tcfY2C8TM=
+SIZE (jimtcl-0.75pl1.tar.gz) = 2227650
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/lang/jimtcl/patches/patch-Makefile_in,v
retrieving revision 1.4
diff -u -p -r1.4 patch-Makefile_in
--- patches/patch-Makefile_in   14 Nov 2013 09:11:21 -0000      1.4
+++ patches/patch-Makefile_in   12 Sep 2014 21:47:20 -0000
@@ -1,63 +1,50 @@
 $OpenBSD: patch-Makefile_in,v 1.4 2013/11/14 09:11:21 stu Exp $
-
-Install everything nicely.
-
---- Makefile.in.orig   Sat Nov  9 00:49:42 2013
-+++ Makefile.in        Sat Nov  9 10:04:48 2013
-@@ -54,6 +54,12 @@ OBJS := _load-static-exts.o jim-subcmd.o jim-interacti
-
- JIMSH := jimsh@EXEEXT@
+--- Makefile.in.orig   Thu Aug  7 21:59:27 2014
++++ Makefile.in        Thu Sep  4 00:51:06 2014
+@@ -59,6 +59,7 @@ JIMSH := jimsh@EXEEXT@
+ INSTALL_DATA_DIR ?= mkdir -p
+ INSTALL_DATA ?= cp
+ INSTALL_PROGRAM ?= cp
++INSTALL_SCRIPT ?= cp
+ @endif

-+@if JIM_INSTALL
-+INSTALL_DATA_DIR ?= mkdir -p
-+INSTALL_DATA ?= cp
-+INSTALL_PROGRAM ?= cp
-+@endif
-+
  all: $(JIMSH) @C_EXT_SHOBJS@
-
- # Create C extensions from pure Tcl extensions
-@@ -66,8 +72,8 @@ docs: Tcl.html
+@@ -73,8 +74,9 @@ docs: Tcl.html

  @if JIM_DOCS
  install-docs: docs
--      mkdir -p $(DESTDIR)$(prefix)/doc/jim
--      cp Tcl.html $(DESTDIR)$(prefix)/doc/jim
+-      $(INSTALL_DATA_DIR) $(DESTDIR)$(prefix)/doc/jim
+-      $(INSTALL_DATA) Tcl.html $(DESTDIR)$(prefix)/doc/jim
 +      $(INSTALL_DATA_DIR) $(DESTDIR)@datadir@/doc/jim
-+      $(INSTALL_DATA) @srcdir@/README.extensions Tcl.html 
$(DESTDIR)@datadir@/doc/jim
++      $(INSTALL_DATA) @srcdir@/LICENSE @srcdir@/README Tcl.html 
$(DESTDIR)@datadir@/doc/jim
++      $(INSTALL_DATA) @srcdir@/README.{extensions,namespaces,oo,sqlite,utf-8} 
$(DESTDIR)@datadir@/doc/jim
  @else
  install-docs:
  @endif
-@@ -77,20 +83,21 @@ $(JIMSH): $(LIBJIM) jimsh.o initjimsh.o
+@@ -83,17 +85,22 @@ $(JIMSH): $(LIBJIM) jimsh.o initjimsh.o
+       $(JIMSH_CC) @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o 
$(LIBJIM) $(LDLIBS) $(LIBS)

  @if JIM_INSTALL
- install: all @TCL_EXTS@ install-exec install-docs
--      mkdir -p $(DESTDIR)@libdir@/jim
--      cp $(LIBJIM) $(DESTDIR)@libdir@
--      cp @srcdir@/README.extensions @C_EXT_SHOBJS@ $(DESTDIR)@libdir@/jim
--      for i in @TCL_EXTS@; do cp @srcdir@/$$i $(DESTDIR)@libdir@/jim; done
--      mkdir -p $(DESTDIR)@includedir@
--      cp @srcdir@/jim.h @srcdir@/jim-eventloop.h @srcdir@/jim-signal.h \
-+      $(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@
-+      $(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim
+-install: all @TCL_EXTS@ install-exec install-docs
++install: all @TCL_EXTS@ install-exec install-docs install-exas
+       $(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim
+       $(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@
+-      $(INSTALL_DATA) @srcdir@/README.extensions @C_EXT_SHOBJS@ 
$(DESTDIR)@libdir@/jim
 +      $(INSTALL_DATA) @C_EXT_SHOBJS@ $(DESTDIR)@libdir@/jim
-+      for i in @TCL_EXTS@; do $(INSTALL_DATA) @srcdir@/$$i 
$(DESTDIR)@libdir@/jim; done
-+      $(INSTALL_DATA_DIR) $(DESTDIR)@includedir@
-+      $(INSTALL_DATA) @srcdir@/jim.h @srcdir@/jim-eventloop.h 
@srcdir@/jim-signal.h \
+       for i in @TCL_EXTS@; do $(INSTALL_DATA) @srcdir@/$$i 
$(DESTDIR)@libdir@/jim; done
+       $(INSTALL_DATA_DIR) $(DESTDIR)@includedir@
+       $(INSTALL_DATA) @srcdir@/jim.h @srcdir@/jim-eventloop.h 
@srcdir@/jim-signal.h \
                @srcdir@/jim-subcmd.h @srcdir@/jim-win32compat.h 
$(DESTDIR)@includedir@
--      cp jim-config.h $(DESTDIR)@includedir@
--      mkdir -p $(DESTDIR)@bindir@
--      cp build-jim-ext $(DESTDIR)@bindir@
-+      $(INSTALL_DATA) jim-config.h $(DESTDIR)@includedir@
-+      $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
-+      $(INSTALL_DATA_DIR) $(DESTDIR)@datadir@/examples/jim
-+      $(INSTALL_DATA) build-jim-ext @srcdir@/examples/* 
$(DESTDIR)@datadir@/examples/jim
+       $(INSTALL_DATA) jim-config.h $(DESTDIR)@includedir@
+-      $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
+-      $(INSTALL_DATA) build-jim-ext $(DESTDIR)@bindir@
++
++install-exas:
++      $(INSTALL_DATA_DIR) $(DESTDIR)@datadir@/examples/jim{,/api,/ext}
++      $(INSTALL_SCRIPT) build-jim-ext         $(DESTDIR)@datadir@/examples/jim
++      $(INSTALL_DATA) @srcdir@/examples/*     $(DESTDIR)@datadir@/examples/jim
++      $(INSTALL_DATA) @srcdir@/examples.api/{README,Makefile,*.c,*.tcl} 
$(DESTDIR)@datadir@/examples/jim/api
++      $(INSTALL_DATA) @srcdir@/examples.ext/{README,Makefile,*.c} 
$(DESTDIR)@datadir@/examples/jim/ext

  install-exec: all
--      mkdir -p $(DESTDIR)@bindir@
--      cp $(JIMSH) $(DESTDIR)@bindir@
-+      $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
-+      $(INSTALL_PROGRAM) $(JIMSH) $(DESTDIR)@bindir@
-
- uninstall:
-       rm -f $(DESTDIR)@bindir@/$(JIMSH)
+       $(INSTALL_DATA_DIR) $(DESTDIR)@bindir@
Index: patches/patch-examples_api_Makefile
===================================================================
RCS file: patches/patch-examples_api_Makefile
diff -N patches/patch-examples_api_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-examples_api_Makefile 12 Sep 2014 21:47:20 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- examples.api/Makefile.orig Wed Sep  3 22:22:49 2014
++++ examples.api/Makefile      Wed Sep  3 22:23:27 2014
+@@ -1,6 +1,6 @@
+ CFLAGS+= -Wall -g
+-CFLAGS+= -I..
+-LDLIBS += -L.. -ljim
++CFLAGS+= -I${LOCALBASE}/include/jim
++LDLIBS += -L${LOCALBASE}/lib -ljim
+
+ EXAMPLES=             \
+       jim_command     \
Index: patches/patch-examples_ext_Makefile
===================================================================
RCS file: patches/patch-examples_ext_Makefile
diff -N patches/patch-examples_ext_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-examples_ext_Makefile 12 Sep 2014 21:47:20 -0000
@@ -0,0 +1,30 @@
+$OpenBSD$
+--- examples.ext/Makefile.orig Thu Sep 11 21:39:06 2014
++++ examples.ext/Makefile      Fri Sep 12 17:41:23 2014
+@@ -9,21 +9,21 @@
+ # Prefer jimsh in the PATH because it is more likely to be built
+ # for the build-host rather than the target.
+
+-ifdef NOTEST
++.ifdef NOTEST
+ BUILDOPTS := --notest
+-endif
++.endif
+
+-export PATH := $(PATH):..
+
+ all: helloworld.so
+
+ helloworld.so: helloworld.c
+-      ../build-jim-ext -I.. -L.. $(BUILDOPTS) $^
++      ${LOCALBASE}/share/examples/jim/build-jim-ext \
++      -I${LOCALBASE}/include/jim $(BUILDOPTS) $>
+
+ # Note: Currently we don't attempt to set LD_LIBRARY_PATH or equivalent
+
+ test:
+-      JIMLIB=. ../jimsh -e 'package require helloworld; hello'
++      JIMLIB=. jimsh -e 'package require helloworld; hello'
+
+ clean:
+       rm -f *.o *.so
Index: patches/patch-initjimsh_tcl
===================================================================
RCS file: patches/patch-initjimsh_tcl
diff -N patches/patch-initjimsh_tcl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-initjimsh_tcl 12 Sep 2014 21:47:20 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Don't include ${LOCALBASE}/bin in the auto_path;
+Jim extensions will never be installed there.
+
+--- initjimsh.tcl.orig Thu Sep  4 03:08:30 2014
++++ initjimsh.tcl      Thu Sep  4 03:08:39 2014
+@@ -7,7 +7,6 @@ proc _jimsh_init {} {
+       # Add to the standard auto_path
+       lappend p {*}[split [env JIMLIB {}] $::tcl_platform(pathSeparator)]
+       lappend p {*}$::auto_path
+-      lappend p [file dirname [info nameofexecutable]]
+       set ::auto_path $p
+
+       if {$::tcl_interactive && [env HOME {}] ne ""} {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/jimtcl/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   14 Nov 2013 09:11:21 -0000      1.3
+++ pkg/PLIST   12 Sep 2014 21:47:20 -0000
@@ -11,13 +11,32 @@ lib/jim/
 lib/jim/sqlite3.so
 @lib lib/libjim.so.${LIBjim_VERSION}
 share/doc/jim/
+share/doc/jim/LICENSE
+share/doc/jim/README
 share/doc/jim/README.extensions
+share/doc/jim/README.namespaces
+share/doc/jim/README.oo
+share/doc/jim/README.sqlite
+share/doc/jim/README.utf-8
 share/doc/jim/Tcl.html
 share/examples/jim/
+share/examples/jim/api/
+share/examples/jim/api/Makefile
+share/examples/jim/api/README
+share/examples/jim/api/jim_command.c
+share/examples/jim/api/jim_hello.c
+share/examples/jim/api/jim_list.c
+share/examples/jim/api/jim_obj.c
+share/examples/jim/api/jim_return.c
+share/examples/jim/api/print.tcl
 share/examples/jim/build-jim-ext
 share/examples/jim/client-server.tcl
 share/examples/jim/dns.tcl
 share/examples/jim/dnstest.tcl
+share/examples/jim/ext/
+share/examples/jim/ext/Makefile
+share/examples/jim/ext/README
+share/examples/jim/ext/helloworld.c
 share/examples/jim/jtclsh.tcl
 share/examples/jim/metakit.tcl
 share/examples/jim/ootest.tcl


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/openocd/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile    14 Nov 2013 09:12:29 -0000      1.10
+++ Makefile    12 Sep 2014 21:10:51 -0000
@@ -3,7 +3,7 @@
 COMMENT =      Open On-Chip Debugging

 DISTNAME =     openocd-0.6.1
-REVISION =     0
+REVISION =     1
 CATEGORIES =   devel

 SHARED_LIBS +=  openocd                1.0 # unknown
Index: patches/patch-src_flash_mflash_c
===================================================================
RCS file: patches/patch-src_flash_mflash_c
diff -N patches/patch-src_flash_mflash_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_flash_mflash_c    12 Sep 2014 21:10:51 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix bad bound.
+
+--- src/flash/mflash.c.orig    Fri Sep  5 19:36:35 2014
++++ src/flash/mflash.c Fri Sep  5 19:43:06 2014
+@@ -1161,7 +1161,7 @@ static void mg_gen_ataid(mg_io_type_drv_info *pSegIdDr
+       memset((void *)pSegIdDrvInfo->vendor_uniq_bytes, 0x00, 62);
+       /* CFA power mode 1 support in maximum 200mA */
+       pSegIdDrvInfo->cfa_pwr_mode                     = 0x0100;
+-      memset((void *)pSegIdDrvInfo->reserved7, 0x00, 190);
++      memset((void *)pSegIdDrvInfo->reserved7, 0x00, 186);
+ }
+
+ static int mg_storage_config(void)
Index: patches/patch-src_helper_command_c
===================================================================
RCS file: patches/patch-src_helper_command_c
diff -N patches/patch-src_helper_command_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_helper_command_c  12 Sep 2014 21:10:51 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- src/helper/command.c.orig  Sun Oct  7 04:15:36 2012
++++ src/helper/command.c       Fri Sep  5 09:00:43 2014
+@@ -368,7 +368,7 @@ static int register_command_handler(struct command_con
+
+       LOG_DEBUG("registering '%s'...", ocd_name);
+
+-      Jim_CmdProc func = c->handler ? &script_command : &command_unknown;
++      Jim_CmdProc *func = c->handler ? &script_command : &command_unknown;
+       int retval = Jim_CreateCommand(interp, ocd_name, func, c, NULL);
+       free((void *)ocd_name);
+       if (JIM_OK != retval)
Index: patches/patch-src_helper_command_h
===================================================================
RCS file: patches/patch-src_helper_command_h
diff -N patches/patch-src_helper_command_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_helper_command_h  12 Sep 2014 21:10:51 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- src/helper/command.h.orig  Sun Oct  7 04:15:54 2012
++++ src/helper/command.h       Fri Sep  5 08:59:17 2014
+@@ -169,7 +169,7 @@ struct command {
+       struct command *parent;
+       struct command *children;
+       command_handler_t handler;
+-      Jim_CmdProc jim_handler;
++      Jim_CmdProc *jim_handler;
+       void *jim_handler_data;
+       enum command_mode mode;
+       struct command *next;
+@@ -205,7 +205,7 @@ char *command_name(struct command *c, char delim);
+ struct command_registration {
+       const char *name;
+       command_handler_t handler;
+-      Jim_CmdProc jim_handler;
++      Jim_CmdProc *jim_handler;
+       void *jim_handler_data;
+       enum command_mode mode;
+       const char *help;

Reply via email to