aboutsummaryrefslogtreecommitdiffstats
path: root/main/mg
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-22 09:34:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-22 09:34:45 +0000
commitfb83935ac17864c3e9e7b34c81d203385de3f81a (patch)
tree2d39395c9d9204b4384d761a8f3d3ed699a201f9 /main/mg
parent274baa32b4cbba83f3d9bb8b812839b7da51e312 (diff)
downloadaports-fb83935ac17864c3e9e7b34c81d203385de3f81a.tar.bz2
aports-fb83935ac17864c3e9e7b34c81d203385de3f81a.tar.xz
main/mg: upgrade to 20140414
Diffstat (limited to 'main/mg')
-rw-r--r--main/mg/APKBUILD20
-rw-r--r--main/mg/musl-fixes.patch106
2 files changed, 74 insertions, 52 deletions
diff --git a/main/mg/APKBUILD b/main/mg/APKBUILD
index e6c83714e7..cd30f56316 100644
--- a/main/mg/APKBUILD
+++ b/main/mg/APKBUILD
@@ -1,14 +1,14 @@
# Contributor: Lee Hinman <hinman@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mg
-pkgver=20110905
-pkgrel=1
+pkgver=20140414
+pkgrel=0
pkgdesc="mg is Micro GNU/emacs, this is a portable version of the mg maintained by the OpenBSD team."
url="http://homepage.boetes.org/software/mg"
arch="all"
license="public-domain BSD"
depends=
-makedepends="ncurses-dev"
+makedepends="ncurses-dev libbsd-dev"
install=
subpackages="$pkgname-doc"
source="http://homepage.boetes.org/software/$pkgname/$pkgname-$pkgver.tar.gz
@@ -24,12 +24,10 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
- sed -i -e '/^CFLAGS/s/-Werror//' Makefile.in
}
build() {
cd "$_builddir"
- ./configure
make prefix=/usr mandir=/usr/share/man || return 1
}
@@ -40,9 +38,9 @@ package() {
install -Dm644 tutorial "$pkgdir"/usr/share/doc/$pkgname/tutorial
}
-md5sums="2de35316fa8ebafe6003efaae70b723e mg-20110905.tar.gz
-00e7d303d5a4f163be92adc1e8a26a26 musl-fixes.patch"
-sha256sums="1cd37d7e6a3eecc890a5718c38b8f38495057ba93856762a756ccee2f9618229 mg-20110905.tar.gz
-22b330621dcbc587bae376433f77598e6fed2768f8ab31134d832a7b430d59be musl-fixes.patch"
-sha512sums="b490a5a3526d35839353e138f33ac924c5afbbf7e5c9faa20ceccb82e1dc1e6a3f0726b32bac7d43dcf8a410b1b8525067da5557cf669c52a9e32d1d2f45a8a4 mg-20110905.tar.gz
-56cbefd1806f5194765f12ee3901d111518706551201add819912c3539cab86cda1d4b3a8b74331da3840a35d2576384da80eafe6c9b8271d04b25ea730a5605 musl-fixes.patch"
+md5sums="ad4a99a5e26d25db75af7936c6657fbe mg-20140414.tar.gz
+b09b7700ded811df8f6cf35f9a8df1ff musl-fixes.patch"
+sha256sums="89ce25ee13cedc14c3c5c7b76d7a9e0ea38a060ad61e90ac43258d8dadf0d065 mg-20140414.tar.gz
+f05ae4f0cd9475932ebe51e32ce05217e7fb59a5a0614efd2b33af4cc888323c musl-fixes.patch"
+sha512sums="b080b24c6015225ee1670eb6f062a21f40d34b02c699687d92842983506497c93e15cceb79d05b6cbbebfa8466f7261cb7dde8bcc4888489236cf64104215161 mg-20140414.tar.gz
+47ced85e221951c02654533a015be67018c045ad336a9997b70dcc869f10546318aeae8d1fbd43248d485e4f9c1c950deb93789b7aa8def493ba036af1beaaa1 musl-fixes.patch"
diff --git a/main/mg/musl-fixes.patch b/main/mg/musl-fixes.patch
index b098d53526..31f3fbcc6b 100644
--- a/main/mg/musl-fixes.patch
+++ b/main/mg/musl-fixes.patch
@@ -1,51 +1,75 @@
---- mg-20110905.orig/fileio.c
-+++ mg-20110905/fileio.c
-@@ -570,7 +570,7 @@
- #if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */
- if (strlen(dent->d_name) < len
- || memcmp(cp, dent->d_name, len) != 0)
--#elif defined (__GLIBC__) /* Linux uses reclen instead. */
-+#elif defined (__linux__) /* Linux uses reclen instead. */
- if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0)
- #else
- if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0)
---- mg-20110905.orig/sysdef.h
-+++ mg-20110905/sysdef.h
-@@ -20,15 +20,13 @@
-
- /* necesarry to get asprintf & friends with glibc XXX doesn't work for some
- * mysterious reason! */
+diff --git a/GNUmakefile b/GNUmakefile
+index a89c697..ece5944 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -31,7 +31,7 @@ CURSES_LIBS= -lcurses
+ CC= gcc
+ CFLAGS?= -O2 -pipe
+ CFLAGS+= -g -Wall
+-CPPFLAGS= -DFKEYS -DREGEX -DXKEYS
++CPPFLAGS= -DFKEYS -DXKEYS
+ CPPFLAGS+= $(BSD_CPPFLAGS) -D__dead=__dead2
+ LIBS= $(CURSES_LIBS) $(BSD_LIBS)
+
+diff --git a/Makefile b/Makefile
+index 023ed17..0c92790 100644
+--- a/Makefile
++++ b/Makefile
+@@ -13,7 +13,7 @@ DPADD+= ${LIBCURSES} ${LIBUTIL}
+ # XKEYS -- use termcap function key definitions.
+ # note: XKEYS and bsmap mode do _not_ get along.
+ #
+-CFLAGS+=-Wall -DFKEYS -DREGEX -DXKEYS
++CFLAGS+=-Wall -DFKEYS -DXKEYS
+
+ SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
+ echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
+diff --git a/main.c b/main.c
+index 9204d63..dfd4a6a 100644
+--- a/main.c
++++ b/main.c
+@@ -14,6 +14,10 @@
+ #include <err.h>
+ #include <locale.h>
+
++#ifndef __dead2
++#define __dead2
++#endif
++
+ int thisflag; /* flags, this command */
+ int lastflag; /* flags, last command */
+ int curgoal; /* goal column */
+diff --git a/sysdef.h b/sysdef.h
+index 8d3d3a2..ea82d73 100644
+--- a/sysdef.h
++++ b/sysdef.h
+@@ -8,12 +8,7 @@
+ #include <sys/param.h>
+ #include <sys/queue.h>
+
+-/* necesarry to get asprintf & friends with glibc XXX doesn't work for some
+- * mysterious reason! */
-#ifdef __GLIBC__
-# define _GNU_SOURCE
-# define __USE_GNU
-#endif
+#define _GNU_SOURCE
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
+ #if defined(__APPLE__) || defined(__FreeBSD__)
+ # define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
+@@ -25,10 +20,15 @@
#include <string.h>
-+#include <fcntl.h>
#include <errno.h>
#include <signal.h>
++#include <fcntl.h>
+
+ #define KBLOCK 8192 /* Kill grow. */
+ #define GOOD 0 /* Good exit status. */
+
++#ifndef DEFFILEMODE /* 4.4BSD extension. */
++#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
++#endif
++
+ typedef int RSIZE; /* Type for file/region sizes */
+ typedef short KCHAR; /* Type for internal keystrokes */
---- mg-20110905.orig/theo.c
-+++ mg-20110905/theo.c
-@@ -218,14 +218,14 @@
- {
- const char *str;
- int len;
-- uint random;
-+ unsigned int random;
- #ifndef HAVE_ARC4RANDOM
- struct timeval tv[2];
-
- gettimeofday(&tv[0], NULL);
-- random = (uint)tv[0].tv_usec;
-+ random = (unsigned int)tv[0].tv_usec;
- #else
-- random = (uint)arc4random();
-+ random = (unsigned int)arc4random();
- #endif
-
- str = talk[random % ntalk];