Skip to content

Instantly share code, notes, and snippets.

View tsutsui's full-sized avatar

Izumi Tsutsui tsutsui

View GitHub Profile
@tsutsui
tsutsui / pkgsrc-textproc-icu-NetBSD-atomic_ops.diff
Created January 30, 2014 17:04
a dumb patch to make pkgsrc/textproc/icu compile on all NetBSD ports (gcc(1) doesn't have GCC_ATOMICS for all CPUs)
? work.i386
? patches/patch-common_umutex.h
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/icu/distinfo,v
retrieving revision 1.43
diff -u -p -d -r1.43 distinfo
--- distinfo 4 Dec 2013 21:02:23 -0000 1.43
+++ distinfo 30 Jan 2014 17:03:27 -0000
@@ -10,7 +10,8 @@ SHA1 (patch-acinclude.m4) = 40ddfb09cbc9
@tsutsui
tsutsui / pkgsrc-textproc-icu-atomic_ops.diff
Created February 10, 2014 15:33
patch to make pkgsrc/textproc/icu use NetBSD's atomic_ops(3) for non-x86 CPUs
Index: textproc/icu/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/icu/distinfo,v
retrieving revision 1.43
diff -u -p -d -r1.43 distinfo
--- textproc/icu/distinfo 4 Dec 2013 21:02:23 -0000 1.43
+++ textproc/icu/distinfo 10 Feb 2014 15:31:15 -0000
@@ -10,7 +10,8 @@ SHA1 (patch-acinclude.m4) = 40ddfb09cbc9
SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284
SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067
@tsutsui
tsutsui / x68k-stand-scsi-inquiry.diff
Created February 10, 2014 19:06
patch to fix NetBSD/x68k bootloader to use proper scsi inquiry size (for XM6 based emulators)
Index: libiocs/iocs.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/stand/libiocs/iocs.h,v
retrieving revision 1.8
diff -u -p -d -r1.8 iocs.h
--- libiocs/iocs.h 21 Feb 2011 02:31:59 -0000 1.8
+++ libiocs/iocs.h 10 Feb 2014 19:03:46 -0000
@@ -224,7 +224,10 @@ struct iocs_inquiry {
unsigned char ver;
unsigned char reserve;
@tsutsui
tsutsui / firefox-27.0.1-pkgsrc-2013Q4.diff
Created February 21, 2014 15:54
pkgsrc/www/firefox and pkgsrc/www/firefox-l10n patch for pkgsrc-2013Q4 to update 27.0.1
Index: firefox/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/Makefile,v
retrieving revision 1.149
diff -u -p -d -u -p -d -r1.149 Makefile
--- firefox/Makefile 30 Dec 2013 00:24:07 -0000 1.149
+++ firefox/Makefile 21 Feb 2014 15:49:28 -0000
@@ -1,17 +1,18 @@
# $NetBSD: Makefile,v 1.149 2013/12/30 00:24:07 dholland Exp $
@tsutsui
tsutsui / X68k-xorg.diff
Last active August 29, 2015 13:56
Work-in-progress files for X11R7 based NetBSD/x68k Xserver
Index: src/distrib/sets/lists/xetc/md.x68k
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/xetc/md.x68k,v
retrieving revision 1.3
diff -u -p -d -r1.3 md.x68k
--- src/distrib/sets/lists/xetc/md.x68k 2 Sep 2008 02:24:12 -0000 1.3
+++ src/distrib/sets/lists/xetc/md.x68k 22 Feb 2014 10:41:16 -0000
@@ -1,2 +1,3 @@
# $NetBSD: md.x68k,v 1.3 2008/09/02 02:24:12 lukem Exp $
./etc/X11/X68kConfig -unknown- x11
@tsutsui
tsutsui / X68k-xorg-20140227.diff
Last active August 29, 2015 13:56
Updated WIP X11R7 based NetBSD/x68k Xserver. Now almost functional except xkb stuff.
Index: src/distrib/sets/lists/xetc/md.x68k
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/xetc/md.x68k,v
retrieving revision 1.3
diff -u -p -d -r1.3 md.x68k
--- src/distrib/sets/lists/xetc/md.x68k 2 Sep 2008 02:24:12 -0000 1.3
+++ src/distrib/sets/lists/xetc/md.x68k 27 Feb 2014 11:39:39 -0000
@@ -1,2 +1,3 @@
# $NetBSD: md.x68k,v 1.3 2008/09/02 02:24:12 lukem Exp $
./etc/X11/X68kConfig -unknown- x11
@tsutsui
tsutsui / X11R7-server-API-diff.txt
Last active August 29, 2015 13:56
dumb tips on porting old style XFree based X68k server for NetBSD/x68k to build under X11R7 tree
x68kFb.c, x68kGraph.c, x68kText.c:
- AllocateScreenPrivateIndex() has been removed and should be replaced with dixRegisterPrivateKey()
- private stuff needs to be handled by dixSetPrivate() and dixLookupPrivate()
- mfb* and cfb* ops have been merged into fb* or mi* ops with depth
x68kInit.c:
- OsVendorPreInit() has been removed
- AddInputDevice() requires "serverClient" arg and mieqInit() no longer takes pointer and keyboard info
- RegisterPointerDevice() and RegisterKeyboardDevice() have been removed
- CloseInput() is now required
@tsutsui
tsutsui / mlterm-3.3.3-x68k-fb.diff
Created March 1, 2014 05:40
mlterm-fb patch for non-priviileged user to use mlterm-fb on NetBSD/x68k
--- mlterm-3.3.3/fb/xwindow/fb/x_display_x68kgrf.c.orig 2014-02-28 20:16:03.000000000 +0900
+++ mlterm-3.3.3/fb/xwindow/fb/x_display_x68kgrf.c 2014-03-01 13:41:03.000000000 +0900
@@ -185,8 +185,15 @@ open_display(
struct rgb_info rgb_info_15bpp = { 3 , 3 , 3 , 6 , 11 , 1 } ;
struct termios tm ;
- if( ( _display.fb_fd = open( ( dev = getenv("FRAMEBUFFER")) ? dev : "/dev/grf1" ,
- O_RDWR)) < 0)
+ kik_priv_restore_euid() ;
+ kik_priv_restore_egid() ;
@tsutsui
tsutsui / x68k-event-cv.diff
Last active August 29, 2015 13:57
trying to replace tsleep(9)/wakeup(9) in NetBSD/x68k's keyboard and mouse drivers with condvar(9)
Index: dev/event.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/dev/event.c,v
retrieving revision 1.13
diff -u -p -d -r1.13 event.c
--- dev/event.c 1 Mar 2008 14:16:50 -0000 1.13
+++ dev/event.c 6 Mar 2014 16:29:35 -0000
@@ -49,12 +49,14 @@ __KERNEL_RCSID(0, "$NetBSD: event.c,v 1.
#include <sys/param.h>
@tsutsui
tsutsui / ltsleep.9.diff
Created March 6, 2014 16:48
Adding a description how to convert tsleep(9)/wakeup(9) pairs to condvar(9) in the ltsleep(9) man page, based on rmind@' mail: http://mail-index.netbsd.org/tech-kern/2010/09/05/msg008831.html
Index: ltsleep.9
===================================================================
RCS file: /cvsroot/src/share/man/man9/ltsleep.9,v
retrieving revision 1.14
diff -u -p -d -r1.14 ltsleep.9
--- ltsleep.9 28 Jan 2012 13:26:12 -0000 1.14
+++ ltsleep.9 6 Mar 2014 16:44:44 -0000
@@ -166,6 +166,80 @@ If
.Fn tsleep
returns because of a timeout it returns