diff options
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/mg/ChangeLog | 9 | ||||
-rw-r--r-- | app-editors/mg/files/mg-20130922-dirname.patch | 20 | ||||
-rw-r--r-- | app-editors/mg/mg-20130922-r1.ebuild (renamed from app-editors/mg/mg-20130922.ebuild) | 7 |
3 files changed, 33 insertions, 3 deletions
diff --git a/app-editors/mg/ChangeLog b/app-editors/mg/ChangeLog index 52dc530e9a48..d5f9ebb33b45 100644 --- a/app-editors/mg/ChangeLog +++ b/app-editors/mg/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-editors/mg # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.60 2013/10/09 10:06:19 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.61 2013/10/13 07:12:45 ulm Exp $ + +*mg-20130922-r1 (13 Oct 2013) + + 13 Oct 2013; Ulrich Müller <ulm@gentoo.org> -mg-20130922.ebuild, + +mg-20130922-r1.ebuild, +files/mg-20130922-dirname.patch: + Fix dirname(3) call in writeout function, bug 487758. Thanks to Marien Zwart + <marienz@gentoo.org>. 09 Oct 2013; Ulrich Müller <ulm@gentoo.org> mg-20130922.ebuild: Specify CPPFLAGS not CFLAGS for preprocessor options. Add missing EPREFIX. diff --git a/app-editors/mg/files/mg-20130922-dirname.patch b/app-editors/mg/files/mg-20130922-dirname.patch new file mode 100644 index 000000000000..c97958948bfe --- /dev/null +++ b/app-editors/mg/files/mg-20130922-dirname.patch @@ -0,0 +1,20 @@ +Fix dirname(3) call in writeout function. +https://bugs.gentoo.org/487758 + +--- mg-20130922-orig/file.c ++++ mg-20130922/file.c +@@ -669,11 +669,11 @@ + { + struct stat statbuf; + int s; +- char *dp; +- +- dp = dirname(fn); ++ char ts[NFILEN], *dp; + + if (stat(fn, &statbuf) == -1 && errno == ENOENT) { ++ (void)strlcpy(ts, fn, NFILEN); ++ dp = dirname(ts); + errno = 0; + if (access(dp, W_OK) && errno == EACCES) { + ewprintf("Directory %s%s write-protected", dp, diff --git a/app-editors/mg/mg-20130922.ebuild b/app-editors/mg/mg-20130922-r1.ebuild index 368751e61d1b..2cee2c59dee9 100644 --- a/app-editors/mg/mg-20130922.ebuild +++ b/app-editors/mg/mg-20130922-r1.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/mg-20130922.ebuild,v 1.5 2013/10/09 10:06:19 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/mg-20130922-r1.ebuild,v 1.1 2013/10/13 07:12:46 ulm Exp $ EAPI=5 -inherit toolchain-funcs +inherit eutils toolchain-funcs DESCRIPTION="MicroGnuEmacs, a port from the BSDs" HOMEPAGE="http://homepage.boetes.org/software/mg/" @@ -21,6 +21,9 @@ DEPEND="${RDEPEND} dev-libs/clens" src_prepare() { + epatch "${FILESDIR}"/${P}-dirname.patch + epatch_user + # create our own Makefile to avoid BSD make echo -e 'SRCS =' *.c '\n\nmg: $(SRCS:.c=.o)' \ '\n\t$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)' >Makefile || die |