plan9port: 2020-01-08 -> 2021-04-22

* Relicense as MIT!
* Mark Darwin broken.
This commit is contained in:
Emery Hemingway 2021-06-24 11:07:05 +02:00
parent 0f441f5cad
commit f524f88402
3 changed files with 12 additions and 82 deletions

View File

@ -1,24 +0,0 @@
From d1f0bd3de7d3d54523aeefd9731ea850d20eaab4 Mon Sep 17 00:00:00 2001
From: Jason Felice <jason.m.felice@gmail.com>
Date: Tue, 2 Jul 2019 13:19:23 -0400
Subject: [PATCH] Need CoreFoundation
---
src/cmd/devdraw/cocoa-screen.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
index 97128da2..0e380dd3 100644
--- a/src/cmd/devdraw/cocoa-screen.m
+++ b/src/cmd/devdraw/cocoa-screen.m
@@ -56,6 +56,7 @@
#endif
AUTOFRAMEWORK(Cocoa)
+AUTOFRAMEWORK(CoreFoundation)
#define LOG if(0)NSLog
#define panic sysfatal
--
2.21.0

View File

@ -1,47 +0,0 @@
From d21d082275f04f88eabcc8ecdb03ee932c71ebf1 Mon Sep 17 00:00:00 2001
From: Jason Felice <jason.m.felice@gmail.com>
Date: Mon, 1 Jul 2019 15:23:19 -0400
Subject: [PATCH 2/3] Build for 10.12
---
bin/osxvers | 3 +--
src/cmd/devdraw/mkwsysrules.sh | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/bin/osxvers b/bin/osxvers
index 4af44da2..3be7e6e9 100755
--- a/bin/osxvers
+++ b/bin/osxvers
@@ -2,6 +2,5 @@
u=`uname`
case "$u" in
-Darwin)
- sw_vers | awk '$1 == "ProductVersion:" {print $2}' | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}'
+Darwin) printf 'CFLAGS=$CFLAGS -DOSX_VERSION=101200\n';;
esac
diff --git a/src/cmd/devdraw/mkwsysrules.sh b/src/cmd/devdraw/mkwsysrules.sh
index e94afbd3..40e632db 100644
--- a/src/cmd/devdraw/mkwsysrules.sh
+++ b/src/cmd/devdraw/mkwsysrules.sh
@@ -22,7 +22,7 @@ fi
if [ "x$WSYSTYPE" = "x" ]; then
if [ "x`uname`" = "xDarwin" ]; then
- if sw_vers | grep 'ProductVersion: 10\.[0-5]\.' >/dev/null; then
+ if false; then
echo 1>&2 'OS X 10.5 and older are not supported'
exit 1
else
@@ -54,7 +54,7 @@ if [ $WSYSTYPE = x11 ]; then
XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'`
echo 'WSYSOFILES=$WSYSOFILES '$XO
elif [ $WSYSTYPE = osx-cocoa ]; then
- if sw_vers|awk '/ProductVersion/{split($2,a,".");exit(a[2]<14)}' >/dev/null; then # 0 is true in sh.
+ if false; then
echo 'OBJCFLAGS=$OBJCFLAGS -fobjc-arc'
echo 'WSYSOFILES=$WSYSOFILES osx-draw.o cocoa-screen-metal-objc.o cocoa-srv.o cocoa-thread.o'
else
--
2.21.0

View File

@ -11,20 +11,15 @@
stdenv.mkDerivation {
pname = "plan9port";
version = "2020-01-08";
version = "2021-04-22";
src = fetchFromGitHub {
owner = "9fans";
repo = "plan9port";
rev = "cc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e";
sha256 = "0gb55kj0gzx1kdhiwcrbr7xcgz1im21dyxgxhfhh6d0q9rw0c17g";
rev = "70cc6e5ba7798b315c3fb3aae19620a01604a459";
hash = "sha256-HCn8R9YSocHrpw/xK5n8gsCLSAbAQgw0NtjO9vYIbKo=";
};
patches = [
./darwin-sw_vers.patch
./darwin-cfframework.patch
];
postPatch = ''
#hardcoded path
substituteInPlace src/cmd/acme/acme.c \
@ -86,10 +81,16 @@ stdenv.mkDerivation {
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 ];
license = licenses.mit;
maintainers = with maintainers; [
AndersonTorres
bbarker
ehmry
ftrvxmtrx
kovirobi
];
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}
# TODO: investigate the mouse chording support patch