From a99b06d58b8814c043cbea23a1cd87fd8b3a6e8f Mon Sep 17 00:00:00 2001 From: Matthew Seaman Date: Fri, 22 Sep 2017 14:57:41 +0000 Subject: [PATCH] xonsh is a Python-ish, BASHwards-looking shell language and command prompt. The language is a superset of Python 3.4+ with additional shell primitives. xonsh (pronounced conch) is meant for the daily use of experts and novices alike. WWW: http://xon.sh PR: 220596 Submitted by: roberfern@gmail.com --- shells/Makefile | 1 + shells/xonsh/Makefile | 21 +++++++++++++++++++ shells/xonsh/distinfo | 3 +++ shells/xonsh/files/patch-xonsh_platform.py | 11 ++++++++++ .../files/patch-xonsh_xoreutils_uptime.py | 11 ++++++++++ shells/xonsh/pkg-descr | 7 +++++++ 6 files changed, 54 insertions(+) create mode 100644 shells/xonsh/Makefile create mode 100644 shells/xonsh/distinfo create mode 100644 shells/xonsh/files/patch-xonsh_platform.py create mode 100644 shells/xonsh/files/patch-xonsh_xoreutils_uptime.py create mode 100644 shells/xonsh/pkg-descr diff --git a/shells/Makefile b/shells/Makefile index 6a92bba190e4..e09a232b6240 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -45,6 +45,7 @@ SUBDIR += viewglob SUBDIR += vshnu SUBDIR += wcd + SUBDIR += xonsh SUBDIR += zsh SUBDIR += zsh-navigation-tools diff --git a/shells/xonsh/Makefile b/shells/xonsh/Makefile new file mode 100644 index 000000000000..6ff3dc0bb8c3 --- /dev/null +++ b/shells/xonsh/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= xonsh +PORTVERSION= 0.5.12 +CATEGORIES= shells python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= roberfern@gmail.com +COMMENT= Python-ish BASH-wards shell + +LICENSE= BSD2CLAUSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}amalgamate>=0:devel/py-amalgamate + +NO_ARCH= yes + +USES= python:3.4+ +USE_PYTHON= distutils autoplist concurrent + +.include diff --git a/shells/xonsh/distinfo b/shells/xonsh/distinfo new file mode 100644 index 000000000000..51bf7ebc43b8 --- /dev/null +++ b/shells/xonsh/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1506080374 +SHA256 (xonsh-0.5.12.tar.gz) = 4ca8fd5f1ce5532fba252132a7a7db26b38d80429d8d538928d1aed26149e5fb +SIZE (xonsh-0.5.12.tar.gz) = 686495 diff --git a/shells/xonsh/files/patch-xonsh_platform.py b/shells/xonsh/files/patch-xonsh_platform.py new file mode 100644 index 000000000000..cca4ca00ecfc --- /dev/null +++ b/shells/xonsh/files/patch-xonsh_platform.py @@ -0,0 +1,11 @@ +--- xonsh/platform.py.orig 2017-03-12 02:36:40 UTC ++++ xonsh/platform.py +@@ -491,7 +491,7 @@ def LIBC(): + libc = ctypes.CDLL('cygwin1.dll') + elif ON_BSD: + try: +- libc = ctypes.CDLL('libc.so') ++ libc = ctypes.CDLL(ctypes.util.find_library("c")) + except AttributeError: + libc = None + except OSError: diff --git a/shells/xonsh/files/patch-xonsh_xoreutils_uptime.py b/shells/xonsh/files/patch-xonsh_xoreutils_uptime.py new file mode 100644 index 000000000000..8d0525adf5e3 --- /dev/null +++ b/shells/xonsh/files/patch-xonsh_xoreutils_uptime.py @@ -0,0 +1,11 @@ +--- xonsh/xoreutils/uptime.py.orig 2017-02-11 16:24:07 UTC ++++ xonsh/xoreutils/uptime.py +@@ -100,7 +100,7 @@ def _uptime_bsd(): + return None + # Determine how much space we need for the response. + sz = ctypes.c_uint(0) +- xp.LIBC.sysctlbyname('kern.boottime', None, ctypes.byref(sz), None, 0) ++ xp.LIBC.sysctlbyname(b'kern.boottime', None, ctypes.byref(sz), None, 0) + if sz.value != struct.calcsize('@LL'): + # Unexpected, let's give up. + return None diff --git a/shells/xonsh/pkg-descr b/shells/xonsh/pkg-descr new file mode 100644 index 000000000000..1c0aa70c84cd --- /dev/null +++ b/shells/xonsh/pkg-descr @@ -0,0 +1,7 @@ +xonsh is a Python-ish, BASHwards-looking shell language and command prompt. + +The language is a superset of Python 3.4+ with additional shell primitives. +xonsh (pronounced conch) is meant for the daily use of experts and novices +alike. + +WWW: http://xon.sh