diff options
author | William Pitcock <nenolod@dereferenced.org> | 2013-09-19 14:09:05 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2013-09-19 14:09:29 +0000 |
commit | 5c5f4f6002d15a6c662d4f3ef7f16fa6a64d3b65 (patch) | |
tree | 4c8ec406abc0dd70f63bc7965a6db5769c6e9bb9 /main/fish | |
parent | 59541b8beffed564b87186e8a652e0f4938b5c0d (diff) | |
download | aports-5c5f4f6002d15a6c662d4f3ef7f16fa6a64d3b65.tar.bz2 aports-5c5f4f6002d15a6c662d4f3ef7f16fa6a64d3b65.tar.xz |
main/fish: new aport
Diffstat (limited to 'main/fish')
-rw-r--r-- | main/fish/APKBUILD | 53 | ||||
-rw-r--r-- | main/fish/fish-safe-strerror.patch | 31 |
2 files changed, 84 insertions, 0 deletions
diff --git a/main/fish/APKBUILD b/main/fish/APKBUILD new file mode 100644 index 0000000000..edd15a4e78 --- /dev/null +++ b/main/fish/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: William Pitcock <nenolod@dereferenced.org> +# Maintainer: William Pitcock <nenolod@dereferenced.org> +pkgname=fish +pkgver=2.0.0 +pkgrel=0 +pkgdesc="a modern interactive commandline shell" +url="http://www.fishshell.com/" +arch="all" + +# guessed from fish/fish.cpp *gag* +license="GPL" + +depends="" +depends_dev="libiconv-dev libncurses-dev" +makedepends="$depends_dev autoconf automake libtool" +install="" +subpackages="$pkgname-doc" +source="http://fishshell.com/files/$pkgver/fish-$pkgver.tar.gz + + fish-safe-strerror.patch" + +_builddir="$srcdir"/fish +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + + autoconf +} + +build() { + cd "$_builddir" + + ./configure --prefix=/usr \ + --sysconfdir=/etc || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make install DESTDIR="$pkgdir" || return 1 +} + +md5sums="fe5907e6af61607d4128ce891a1f6501 fish-2.0.0.tar.gz +f99973e0ed551b4ab592ab7b3bd43343 fish-safe-strerror.patch" +sha256sums="7e4c4a0b3c518769a3d31b235e743de7a8d52f851ad19d2df9d53534e6238303 fish-2.0.0.tar.gz +11478ff89e9e775b2934835fc99cf164157dd9c382118fe461951ac43bf6947c fish-safe-strerror.patch" +sha512sums="a41e1b3737d5b556e08728312f486c55d1405492dd0be8a97694dabc0974b90ecbacfc74d3e427d63e9b3a639a03844b98ecded68cb3060522eee68879c28ce1 fish-2.0.0.tar.gz +117778f4c3e3f37236aa8a7c01a7993eadab6ff38cd777d6806f4fcf264cc83de054bc42040c294105d1be73b82408fdd241a6a175c8916827577c7da401aa97 fish-safe-strerror.patch" diff --git a/main/fish/fish-safe-strerror.patch b/main/fish/fish-safe-strerror.patch new file mode 100644 index 0000000000..e596da108b --- /dev/null +++ b/main/fish/fish-safe-strerror.patch @@ -0,0 +1,31 @@ +--- fish/wutil.cpp ++++ fish.orig/wutil.cpp +@@ -319,27 +319,7 @@ + + const char *safe_strerror(int err) + { +- if (err >= 0 && err < sys_nerr && sys_errlist[err] != NULL) +- { +- return sys_errlist[err]; +- } +- else +- { +- int saved_err = errno; +- +- /* Use a shared buffer for this case */ +- static char buff[384]; +- char errnum_buff[64]; +- format_long_safe(errnum_buff, err); +- +- buff[0] = '\0'; +- safe_append(buff, "unknown error (errno was ", sizeof buff); +- safe_append(buff, errnum_buff, sizeof buff); +- safe_append(buff, ")", sizeof buff); +- +- errno = saved_err; +- return buff; +- } ++ return strerror(err); + } + + void safe_perror(const char *message) |