pkgsrc-Bugs archive

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

pkg/51103: Updates for ski emulator



>Number:         51103
>Category:       pkg
>Synopsis:       Updates for ski emulator
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 29 13:15:00 +0000 2016
>Originator:     scole_mail
>Release:        pkgsrc-2015Q4
>Organization:
none
>Environment:
NetBSD dstar 7.0.0_PATCH NetBSD 7.0.0_PATCH (GENERIC) #0: Sat Apr 16 16:57:22 EDT 2016  scole@dstar:/home/scole/nbsd/7_0/obj/sys/arch/i386/compile/GENERIC i386
>Description:
I made some updates for the ski emulator, the main changes were:

 - fix so builds work with motif and/or gtk
 - add options.mk for debug, x11, and gtk
 - use '\n' instead of  '\r\n' in few places
   so curses will display source code correctly
 - unbreak build on freebsd

So with these changes you can run the motif (xski) or gtk (gski)
clients, (myself, I prefer xski).  The boot loader "skiload" will run
and you can see disassembled instructions with all 3 clients (ski gski
xski).

It looks like some things were never completed for netbsd, like
booting or dissembly of netbsd kernel, source code lines not decoded,
and other stuff.  If I can figure some of those things out, I may
submit another PR.

List of new and modified files
? options.mk
? patches/patch-XSki.netbsd
? patches/patch-src-line_separator.h
? patches/patch-src_eparse.y
? patches/patch-src_freebsd_signal.h
? patches/patch-src_program.c
? patches/patch-src_ssDCmd.c
? patches/patch-src_ssX.c
M DESCR
M Makefile
M PLIST
M distinfo
M patches/patch-ad
M patches/patch-ae
M patches/patch-ap


Thanks

>How-To-Repeat:
Install pkgsrc/emulator/ski, cross-compile ia64 boot loader "skiload", then run emulator

[ski|xski|gski] skiload


>Fix:
Here are patches:

Index: DESCR
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/DESCR,v
retrieving revision 1.6
diff -b -u -r1.6 DESCR
--- DESCR	27 Jul 2011 11:14:22 -0000	1.6
+++ DESCR	29 Apr 2016 13:04:59 -0000
@@ -9,4 +9,7 @@
 
 Run the ski binary from within an xterm window.
 
-BUGS: the xserver version xski doesn't currently work.
+BUGS: source listing doesn't show up in Program window, decoding of
+      assembly doesn't always work correctly, manual pages out of date,
+      rpm build target broken, ctrl-c breaks curses ski program not emulator,
+      prints in ski-fake-xterm aren't aligned, probably others.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/Makefile,v
retrieving revision 1.17
diff -b -u -r1.17 Makefile
--- Makefile	18 Aug 2015 07:31:07 -0000	1.17
+++ Makefile	29 Apr 2016 13:04:59 -0000
@@ -2,13 +2,17 @@
 #
 
 DISTNAME=	ski-1.3.2
-PKGREVISION=	2
+PKGREVISION=	3
 CATEGORIES=	emulators
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ski/}
 
 MAINTAINER=	cherry%zyx.in@localhost
 HOMEPAGE=	http://ski.sourceforge.net/
 COMMENT=	The ia64 instruction set simulator
+LICENSE=	gnu-gpl-v2
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
 
 BUILD_DEPENDS+= libelf>=0.8.13:../../devel/libelf
 
@@ -22,14 +26,27 @@
 USE_LIBTOOL=	yes
 USE_NCURSES=	yes
 
+INSTALLATION_DIRS+=	share/doc/ski
+
+SUBST_CLASSES+=		xski-app
+SUBST_STAGE.xski-app=	pre-configure
+SUBST_MESSAGE.xski-app=	Fixing X11 Makefile.am app-default paths.
+SUBST_FILES.xski-app=	Makefile.am
+SUBST_SED.xski-app=	-e 's,/etc/X11/app-defaults,${PREFIX}/lib/X11/app-defaults,g'
+
+SUBST_CLASSES+=		ssx-app
+SUBST_STAGE.ssx-app=	post-patch
+SUBST_MESSAGE.ssx-app=	Fixing X11 ssX.c app-default paths.
+SUBST_FILES.ssx-app=	src/ssX.c
+SUBST_SED.ssx-app=	-e 's,XSKI_RESOURCE_FILE,${PREFIX}/lib/X11/app-defaults/XSki,g'
+
 pre-configure:
 #	cd  ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./autogen.sh ${CONFIGURE_ARGS}
 	cd ${WRKSRC} && autoreconf -fi -I macros
 
 post-install:
-	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/X11/app-defaults
-	${INSTALL_DATA} ${WRKSRC}/src/XSki \
-			${DESTDIR}${PREFIX}/lib/X11/app-defaults/XSki
+	${INSTALL_DATA} ${WRKSRC}/doc/manual/SkiManualMasterDoc.pdf \
+			${DESTDIR}${PREFIX}/share/ski
 
 .include "../../devel/gperf/buildlink3.mk"
 .include "../../devel/libelf/buildlink3.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/PLIST,v
retrieving revision 1.3
diff -b -u -r1.3 PLIST
--- PLIST	27 Jul 2011 11:14:22 -0000	1.3
+++ PLIST	29 Apr 2016 13:04:59 -0000
@@ -4,6 +4,8 @@
 bin/bskinc
 bin/ski-config
 bin/ski-fake-xterm
+${PLIST.xski}bin/xski
+${PLIST.gski}bin/gski
 include/ski-1.3/asm.h
 include/ski-1.3/bits.h
 include/ski-1.3/coreui.h
@@ -19,13 +21,12 @@
 include/ski-1.3/state.h
 include/ski-1.3/std.h
 include/ski-1.3/types.h
-lib/X11/app-defaults/XSki
-lib/libski-1.3.so.2
-lib/libski-1.3.so.2.0.0
+${PLIST.xski}lib/X11/app-defaults/XSki
 lib/libski.a
-lib/libski.la
-lib/libski.so
 man/man1/bski.1
 man/man1/bskinc.1
 man/man1/ski.1
-share/ski/gski.glade
+${PLIST.xski}man/man1/xski.1
+${PLIST.gski}man/man1/gski.1
+${PLIST.gski}share/ski/gski.glade
+share/ski/SkiManualMasterDoc.pdf
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/distinfo,v
retrieving revision 1.5
diff -b -u -r1.5 distinfo
--- distinfo	3 Nov 2015 20:31:01 -0000	1.5
+++ distinfo	29 Apr 2016 13:04:59 -0000
@@ -4,11 +4,12 @@
 RMD160 (ski-1.3.2.tar.gz) = 1ff739eac7b8163026d208ee9b51d134f524e73f
 SHA512 (ski-1.3.2.tar.gz) = 21f2e1dd87cb517602d4d6ef62707ec6042c1b6ec5dfd063db7315d13bbc3fb47b491c15b7efb0433fc82f27c7924e2d50b2f57fe24e49aeb864ce2c3c2c8bd0
 Size (ski-1.3.2.tar.gz) = 2715791 bytes
+SHA1 (patch-XSki.netbsd) = 866b050bf751cf1bff147835db17570c754b891b
 SHA1 (patch-aa) = 60003cef1eef2bbb6ce535c137fa15a76b0e4f13
 SHA1 (patch-ab) = 23076061dac3a0488d2f5b7b0ac022d095568d80
 SHA1 (patch-ac) = 769b847c5564565617be8043e0c736e12c296d40
-SHA1 (patch-ad) = d1680c77d837a8c3c371e7bd624cb1fa87ea6724
-SHA1 (patch-ae) = 036804384c4a4a694529092a8819c90abbc6e9ae
+SHA1 (patch-ad) = e25a3b08b1e0f8d4972331a05682a1d917aa9ff9
+SHA1 (patch-ae) = 954ef900e9cd64b485c9057a5fb01e283dcf6ed5
 SHA1 (patch-af) = f4048bccb6809ad69527352bcc4c32f8b109b437
 SHA1 (patch-ag) = 973a8f5c1cc5cc36bb8aa1e1e21769f51194967e
 SHA1 (patch-ah) = 31e4807b546c69aa43c7bddc4f16ba3b99d8da3e
@@ -19,4 +20,10 @@
 SHA1 (patch-am) = 0965936933424ab4af4d1fa3384808f4e92f9b04
 SHA1 (patch-an) = 73629a59de77f233be3748d19c5d17d8e18e8af5
 SHA1 (patch-ao) = 8f2eabd4d8dc6ccef593a5f50d00485a905ee523
-SHA1 (patch-ap) = b392a3b89273db3f55ed7d88ca167229f6e3c802
+SHA1 (patch-ap) = a98cd0aa55a002020c26fb70e5549bd16270bf39
+SHA1 (patch-src-line_separator.h) = 2c9b0c2fdace6bc59735cbeb9588aea21b19b1db
+SHA1 (patch-src_eparse.y) = c82918d36047e51273cc1aa0e20a4ce1649668f5
+SHA1 (patch-src_freebsd_signal.h) = 265bd4e3f18dcfda791595b1356b37398c055349
+SHA1 (patch-src_program.c) = d364a8a0ababfbc48333d5e48962f53677bcfeb9
+SHA1 (patch-src_ssDCmd.c) = 9062b2107f72171644e27d83ec45260aa40019fe
+SHA1 (patch-src_ssX.c) = 01c24b8d6b62b51798ae4a33e69cfb323a66f8d5
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ad,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 patch-ad
--- patches/patch-ad	27 Jul 2011 10:23:48 -0000	1.1.1.1
+++ patches/patch-ad	29 Apr 2016 13:04:59 -0000
@@ -1,17 +1,24 @@
-$NetBSD: patch-ad,v 1.1.1.1 2011/07/27 10:23:48 cherry Exp $
+$NetBSD$
 
---- src/Makefile.am.orig	2008-02-05 04:11:38.000000000 +0000
-+++ src/Makefile.am
-@@ -130,7 +130,7 @@ if LINUX
+Make compile for NetBSD and gtk.
+
+--- src/Makefile.am.orig	2008-02-04 23:11:38.000000000 -0500
++++ src/Makefile.am	2016-04-20 09:50:38.000000000 -0400
+@@ -130,7 +130,12 @@
  ski_LDFLAGS = 
  endif
  
 -ski_LDADD= libski.la -ldl
++# XXX others beside netbsd require?, rdynamic for gtk/libglade
++if NETBSD
++ski_LDFLAGS=-static -rdynamic
++endif
++
 +ski_LDADD= libski.la
  
  skiincludedir= $(includedir)/ski-$(SKI_MAJOR_VERSION).$(SKI_MINOR_VERSION)
  skiinclude_HEADERS= \
-@@ -226,6 +226,23 @@ else
+@@ -226,6 +231,23 @@
  freebsd_FILES =
  endif
  @@ -35,7 +42,7 @@
  libski_la_SOURCES= \
  	$(COMBFNS_DERIVED) \
  	$(PREDECODE_DERIVED) \
-@@ -252,6 +269,7 @@ libski_la_SOURCES= \
+@@ -252,6 +274,7 @@
  	$(linux_FILES) \
  	$(hpux_FILES) \
  	$(freebsd_FILES) \
@@ -43,7 +50,7 @@
  	libsym.c \
  	$(ASM_HASH_DERIVED) \
  	$(IADAS_DECODER_DERIVED) \
-@@ -288,6 +306,7 @@ EXTRA_libski_la_SOURCES = \
+@@ -288,6 +311,7 @@
  	$(EXTRA_linux_FILES) \
  	$(EXTRA_hpux_FILES) \
  	$(EXTRA_freebsd_FILES) \
Index: patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ae,v
retrieving revision 1.2
diff -b -u -r1.2 patch-ae
--- patches/patch-ae	26 Jan 2013 23:11:14 -0000	1.2
+++ patches/patch-ae	29 Apr 2016 13:04:59 -0000
@@ -1,11 +1,8 @@
-$NetBSD: patch-ae,v 1.2 2013/01/26 23:11:14 wiz Exp $
+$NetBSD$
 
-Second chunk: automake-1.13 compat
-Rest: ?
-
---- configure.ac.orig	2008-02-05 04:11:37.000000000 +0000
-+++ configure.ac
-@@ -33,12 +33,14 @@ case $host_os in
+--- configure.ac	2008-02-04 23:11:37.000000000 -0500
++++ configure.ac	2016-04-20 20:09:24.000000000 -0400
+@@ -33,12 +33,14 @@
      linux*)	HOST_OS=linux;;
      hpux*)	HOST_OS=hpux;;
      freebsd*)	HOST_OS=freebsd;;
@@ -20,7 +17,7 @@
  
  # Version number definitions
  #
-@@ -80,12 +82,11 @@ AC_PREFIX_DEFAULT(/usr/local)
+@@ -80,12 +82,11 @@
  AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
  
  # Specify a configuration file
@@ -34,7 +31,7 @@
  AM_PROG_AS
  AC_PROG_INSTALL
  AC_PROG_LN_S
-@@ -259,6 +260,10 @@ if test "$HOST_OS" = freebsd; then
+@@ -259,6 +260,10 @@
  	LDFLAGS="$LDFLAGS -lutil"
  fi
  @@ -45,7 +42,7 @@
  dnl Check for optional libs
  AC_CHECK_LIB(unwind-ia64, _Uia64_get_proc_name, )
  
-@@ -331,6 +336,13 @@ if test "$HOST_OS" = hpux; then
+@@ -331,6 +336,13 @@
          check_curses=no], [])
  fi    
  
@@ -59,7 +56,7 @@
  if test "x$check_curses" != xno; then
  AC_CHECK_LIB(curses, tgetent, [],
      [AC_CHECK_LIB(ncurses, tgetent, ,
-@@ -347,6 +359,7 @@ case $host_os in
+@@ -347,6 +359,7 @@
      hpux10*)	CFLAGS="$CFLAGS -DHPUX1020";;
      hpux11*)	CFLAGS="$CFLAGS -DHPUX1100";;
      freebsd*)	CFLAGS="$CFLAGS -DFREEBSD -D__linux__";;
Index: patches/patch-ap
===================================================================
RCS file: /cvsroot/pkgsrc/emulators/ski/patches/patch-ap,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 patch-ap
--- patches/patch-ap	27 Jul 2011 10:23:50 -0000	1.1.1.1
+++ patches/patch-ap	29 Apr 2016 13:04:59 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $
+$NetBSD$
 
---- src/netbsd/syscall-netbsd.h.orig	2009-12-16 13:06:31.000000000 +0000
-+++ src/netbsd/syscall-netbsd.h
-@@ -0,0 +1,144 @@
+--- src/netbsd/syscall-netbsd.h.orig	2016-04-19 05:58:13.000000000 -0400
++++ src/netbsd/syscall-netbsd.h	2016-04-19 05:59:45.000000000 -0400
+@@ -0,0 +1,139 @@
 +/*
 + * Copyright (C) 1995-2007, Hewlett-Packard Development Company, L.P.
 + *
@@ -63,9 +63,6 @@
 +	long64	tv_nsec;
 +};
 +
-+
-+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	*/
-+
 +struct stat64 {
 +	dev_t	  st_dev;		/* inode's device */
 +	mode_t	  st_mode;		/* inode protection mode */
@@ -98,8 +95,6 @@
 +	uint32_t  st_spare[2];
 +};
 +
-+
-+/*	$NetBSD: patch-ap,v 1.1.1.1 2011/07/27 10:23:50 cherry Exp $	 */
 +struct statvfs64 {
 +	unsigned long	f_flag;		/* copy of mount exported flags */
 +	unsigned long	f_bsize;	/* file system block size */



Home | Main Index | Thread Index | Old Index