plan9port: 2018-09-20 -> 2019-02-25
This commit is contained in:
parent
4c268dcabc
commit
e71445c330
@ -1,24 +1,22 @@
|
|||||||
{ stdenv, fetchgit, which, libX11, libXt, fontconfig, freetype
|
{ stdenv, fetchFromGitHub, which, libX11, libXt, fontconfig, freetype
|
||||||
, xorgproto ? null
|
, xorgproto ? null
|
||||||
, libXext ? null
|
, libXext ? null
|
||||||
, zlib ? null
|
, zlib ? null
|
||||||
# For building web manuals
|
, perl ? null # For building web manuals
|
||||||
, perl ? null
|
|
||||||
, samChordingSupport ? true #from 9front
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "plan9port-2018-09-20";
|
pname = "plan9port";
|
||||||
|
version = "2019-02-25";
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchFromGitHub {
|
||||||
# Latest, same as on github, google code is old
|
owner = "9fans";
|
||||||
url = "https://github.com/9fans/plan9port.git";
|
repo = "plan9port";
|
||||||
rev = "a82a8b6368274d77d42f526e379b74e79c137e26";
|
rev = "047fd921744f39a82a86d9370e03f7af511e6e84";
|
||||||
sha256 = "1icywcnqv0dz1mkm7giakii536nycp0ajxnmzkx4944dxsmhcwq1";
|
sha256 = "1lp17948q7vpl8rc2bf5a45bc8jqyj0s3zffmks9r25ai42vgb43";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = stdenv.lib.optionals samChordingSupport [ ./sam_chord_9front.patch ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
#hardcoded path
|
#hardcoded path
|
||||||
substituteInPlace src/cmd/acme/acme.c \
|
substituteInPlace src/cmd/acme/acme.c \
|
||||||
@ -36,37 +34,20 @@ stdenv.mkDerivation rec {
|
|||||||
--replace "case Kcmd+'v':" "case 0x16: case Kcmd+'v':"
|
--replace "case Kcmd+'v':" "case 0x16: case Kcmd+'v':"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
builder = ./builder.sh;
|
|
||||||
|
|
||||||
NIX_LDFLAGS="-lgcc_s";
|
|
||||||
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [
|
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||||
which
|
which perl libX11 fontconfig xorgproto libXt libXext
|
||||||
perl
|
freetype # fontsrv wants ft2build.h provides system fonts for acme and sam.
|
||||||
libX11
|
|
||||||
fontconfig
|
|
||||||
xorgproto
|
|
||||||
libXt
|
|
||||||
libXext
|
|
||||||
freetype #fontsrv wants ft2build.h. provides system fonts for acme and sam.
|
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
homepage = http://swtch.com/plan9port/;
|
|
||||||
description = "Plan 9 from User Space";
|
|
||||||
license = licenses.lpl-102;
|
|
||||||
maintainers = with maintainers; [ bbarker ftrvxmtrx kovirobi ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
|
||||||
|
|
||||||
libX11_dev = libX11.dev;
|
libX11_dev = libX11.dev;
|
||||||
libXt_dev = libXt.dev;
|
libXt_dev = libXt.dev;
|
||||||
libXext_dev = libXext.dev;
|
libXext_dev = libXext.dev;
|
||||||
fontconfig_dev = fontconfig.dev;
|
fontconfig_dev = fontconfig.dev;
|
||||||
freetype_dev = freetype.dev;
|
freetype_dev = freetype.dev;
|
||||||
zlib_dev = zlib.dev;
|
zlib_dev = zlib.dev;
|
||||||
|
|
||||||
xorgproto_exp = xorgproto;
|
xorgproto_exp = xorgproto;
|
||||||
libX11_exp = libX11;
|
libX11_exp = libX11;
|
||||||
libXt_exp = libXt;
|
libXt_exp = libXt;
|
||||||
@ -75,4 +56,21 @@ stdenv.mkDerivation rec {
|
|||||||
zlib_exp = zlib;
|
zlib_exp = zlib;
|
||||||
|
|
||||||
fontconfig_lib = fontconfig.lib;
|
fontconfig_lib = fontconfig.lib;
|
||||||
|
|
||||||
|
NIX_LDFLAGS="-lgcc_s";
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://9fans.github.io/plan9port/;
|
||||||
|
description = "Plan 9 from User Space";
|
||||||
|
longDescription = ''
|
||||||
|
Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs
|
||||||
|
from their native Plan 9 environment to Unix-like operating systems.
|
||||||
|
'';
|
||||||
|
license = licenses.lpl-102;
|
||||||
|
maintainers = with maintainers; [ AndersonTorres bbarker
|
||||||
|
ftrvxmtrx kovirobi ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
# TODO: investigate the mouse chording support patch
|
||||||
|
@ -1,215 +0,0 @@
|
|||||||
diff -r -c p9p/src/cmd/sam/xec.c p9p-patched/src/cmd/sam/xec.c
|
|
||||||
*** p9p/src/cmd/sam/xec.c 2016-04-18 21:07:22.000000000 +0300
|
|
||||||
--- p9p-patched/src/cmd/sam/xec.c 2016-08-31 06:35:26.910876148 +0300
|
|
||||||
***************
|
|
||||||
*** 277,282 ****
|
|
||||||
--- 277,283 ----
|
|
||||||
else
|
|
||||||
while(n++ && undo(FALSE))
|
|
||||||
;
|
|
||||||
+ moveto(f, f->dot.r);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -r -c p9p/src/cmd/samterm/flayer.c p9p-patched/src/cmd/samterm/flayer.c
|
|
||||||
*** p9p/src/cmd/samterm/flayer.c 2016-04-18 21:07:22.000000000 +0300
|
|
||||||
--- p9p-patched/src/cmd/samterm/flayer.c 2016-08-31 06:46:19.441411045 +0300
|
|
||||||
***************
|
|
||||||
*** 254,274 ****
|
|
||||||
int
|
|
||||||
flselect(Flayer *l)
|
|
||||||
{
|
|
||||||
- int ret;
|
|
||||||
if(l->visible!=All)
|
|
||||||
flupfront(l);
|
|
||||||
! frselect(&l->f, mousectl);
|
|
||||||
! ret = 0;
|
|
||||||
! if(l->f.p0==l->f.p1){
|
|
||||||
! if(mousep->msec-l->click<Clicktime && l->f.p0+l->origin==l->p0){
|
|
||||||
! ret = 1;
|
|
||||||
l->click = 0;
|
|
||||||
! }else
|
|
||||||
! l->click = mousep->msec;
|
|
||||||
! }else
|
|
||||||
! l->click = 0;
|
|
||||||
l->p0 = l->f.p0+l->origin, l->p1 = l->f.p1+l->origin;
|
|
||||||
! return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
--- 254,271 ----
|
|
||||||
int
|
|
||||||
flselect(Flayer *l)
|
|
||||||
{
|
|
||||||
if(l->visible!=All)
|
|
||||||
flupfront(l);
|
|
||||||
! if(l->f.p0==l->f.p1)
|
|
||||||
! if(mousep->msec-l->click<Clicktime && l->f.p0+l->origin==l->p0 &&
|
|
||||||
! l->f.p0==frcharofpt(&l->f, mousep->xy)){
|
|
||||||
l->click = 0;
|
|
||||||
! return 1;
|
|
||||||
! }
|
|
||||||
! l->click = mousep->msec;
|
|
||||||
! frselect(&l->f, mousectl);
|
|
||||||
l->p0 = l->f.p0+l->origin, l->p1 = l->f.p1+l->origin;
|
|
||||||
! return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
diff -r -c p9p/src/cmd/samterm/main.c p9p-patched/src/cmd/samterm/main.c
|
|
||||||
*** p9p/src/cmd/samterm/main.c 2016-04-18 21:07:22.000000000 +0300
|
|
||||||
--- p9p-patched/src/cmd/samterm/main.c 2016-08-31 06:52:05.670322598 +0300
|
|
||||||
***************
|
|
||||||
*** 23,33 ****
|
|
||||||
char hostlock = 1;
|
|
||||||
char hasunlocked = 0;
|
|
||||||
int maxtab = 8;
|
|
||||||
- int chord;
|
|
||||||
int autoindent;
|
|
||||||
|
|
||||||
- #define chording 0 /* code here for reference but it causes deadlocks */
|
|
||||||
-
|
|
||||||
void
|
|
||||||
notifyf(void *a, char *msg)
|
|
||||||
{
|
|
||||||
--- 23,30 ----
|
|
||||||
***************
|
|
||||||
*** 39,45 ****
|
|
||||||
void
|
|
||||||
threadmain(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
! int i, got, scr, w;
|
|
||||||
Text *t;
|
|
||||||
Rectangle r;
|
|
||||||
Flayer *nwhich;
|
|
||||||
--- 36,42 ----
|
|
||||||
void
|
|
||||||
threadmain(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
! int i, got, scr, chord;
|
|
||||||
Text *t;
|
|
||||||
Rectangle r;
|
|
||||||
Flayer *nwhich;
|
|
||||||
***************
|
|
||||||
*** 84,89 ****
|
|
||||||
--- 81,87 ----
|
|
||||||
startnewfile(Tstartcmdfile, &cmd);
|
|
||||||
|
|
||||||
got = 0;
|
|
||||||
+ chord = 0;
|
|
||||||
if(protodebug) print("loop\n");
|
|
||||||
for(;;got = waitforio()){
|
|
||||||
if(hasunlocked && RESIZED())
|
|
||||||
***************
|
|
||||||
*** 108,163 ****
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
nwhich = flwhich(mousep->xy);
|
|
||||||
! scr = which && ptinrect(mousep->xy, which->scroll);
|
|
||||||
if(mousep->buttons)
|
|
||||||
flushtyping(1);
|
|
||||||
! if(chording && chord==1 && !mousep->buttons)
|
|
||||||
chord = 0;
|
|
||||||
! if(chording && chord)
|
|
||||||
chord |= mousep->buttons;
|
|
||||||
! else if(mousep->buttons&1){
|
|
||||||
! if(nwhich){
|
|
||||||
! if(nwhich!=which)
|
|
||||||
! current(nwhich);
|
|
||||||
! else if(scr)
|
|
||||||
! scroll(which, 1);
|
|
||||||
! else{
|
|
||||||
! t=(Text *)which->user1;
|
|
||||||
! if(flselect(which)){
|
|
||||||
! outTsl(Tdclick, t->tag, which->p0);
|
|
||||||
! t->lock++;
|
|
||||||
! }else if(t!=&cmd)
|
|
||||||
! outcmd();
|
|
||||||
! if(mousep->buttons&1)
|
|
||||||
! chord = mousep->buttons;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else if((mousep->buttons&2) && which){
|
|
||||||
if(scr)
|
|
||||||
scroll(which, 2);
|
|
||||||
else
|
|
||||||
menu2hit();
|
|
||||||
! }else if((mousep->buttons&4)){
|
|
||||||
if(scr)
|
|
||||||
! scroll(which, 3);
|
|
||||||
else
|
|
||||||
menu3hit();
|
|
||||||
}
|
|
||||||
mouseunblock();
|
|
||||||
}
|
|
||||||
- if(chording && chord){
|
|
||||||
- t = (Text*)which->user1;
|
|
||||||
- if(!t->lock && !hostlock){
|
|
||||||
- w = which-t->l;
|
|
||||||
- if(chord&2){
|
|
||||||
- cut(t, w, 1, 1);
|
|
||||||
- chord &= ~2;
|
|
||||||
- }else if(chord&4){
|
|
||||||
- paste(t, w);
|
|
||||||
- chord &= ~4;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--- 106,159 ----
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
nwhich = flwhich(mousep->xy);
|
|
||||||
! scr = which && (ptinrect(mousep->xy, which->scroll) ||
|
|
||||||
! mousep->buttons&(8|16));
|
|
||||||
if(mousep->buttons)
|
|
||||||
flushtyping(1);
|
|
||||||
! if((mousep->buttons&1)==0)
|
|
||||||
chord = 0;
|
|
||||||
! if(chord && which && which==nwhich){
|
|
||||||
chord |= mousep->buttons;
|
|
||||||
! t = (Text *)which->user1;
|
|
||||||
! if(!t->lock){
|
|
||||||
! int w = which-t->l;
|
|
||||||
! if(chord&2){
|
|
||||||
! cut(t, w, 1, 1);
|
|
||||||
! chord &= ~2;
|
|
||||||
! }
|
|
||||||
! if(chord&4){
|
|
||||||
! paste(t, w);
|
|
||||||
! chord &= ~4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ }else if(mousep->buttons&(1|8)){
|
|
||||||
+ if(scr)
|
|
||||||
+ scroll(which, (mousep->buttons&8) ? 4 : 1);
|
|
||||||
+ else if(nwhich && nwhich!=which)
|
|
||||||
+ current(nwhich);
|
|
||||||
+ else{
|
|
||||||
+ t=(Text *)which->user1;
|
|
||||||
+ if(flselect(which)){
|
|
||||||
+ outTsl(Tdclick, t->tag, which->p0);
|
|
||||||
+ t->lock++;
|
|
||||||
+ }else if(t!=&cmd)
|
|
||||||
+ outcmd();
|
|
||||||
+ if(mousep->buttons&1)
|
|
||||||
+ chord = mousep->buttons;
|
|
||||||
+ }
|
|
||||||
}else if((mousep->buttons&2) && which){
|
|
||||||
if(scr)
|
|
||||||
scroll(which, 2);
|
|
||||||
else
|
|
||||||
menu2hit();
|
|
||||||
! }else if(mousep->buttons&(4|16)){
|
|
||||||
if(scr)
|
|
||||||
! scroll(which, (mousep->buttons&16) ? 5 : 3);
|
|
||||||
else
|
|
||||||
menu3hit();
|
|
||||||
}
|
|
||||||
mouseunblock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user