diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2013-12-06 09:50:17 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2013-12-06 09:50:17 +0000 |
commit | 8e80d1ce9c5df8b50dd8ae2173868e21f08853f5 (patch) | |
tree | 3c179c8fdb4b7a78fb928dd53ac96e462851d824 /x11-wm | |
parent | Fixed minimum required mercurial version (diff) | |
download | gentoo-2-8e80d1ce9c5df8b50dd8ae2173868e21f08853f5.tar.gz gentoo-2-8e80d1ce9c5df8b50dd8ae2173868e21f08853f5.tar.bz2 gentoo-2-8e80d1ce9c5df8b50dd8ae2173868e21f08853f5.zip |
Fix crash on BSD, thanks Yuta SATOH <nigoro.gentoo@0x100.com> in bug #493124
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key C74525F2)
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/windowmaker/ChangeLog | 8 | ||||
-rw-r--r-- | x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch | 28 | ||||
-rw-r--r-- | x11-wm/windowmaker/windowmaker-0.95.5-r1.ebuild | 107 |
3 files changed, 142 insertions, 1 deletions
diff --git a/x11-wm/windowmaker/ChangeLog b/x11-wm/windowmaker/ChangeLog index 03efa82829c8..595d1e9fe94a 100644 --- a/x11-wm/windowmaker/ChangeLog +++ b/x11-wm/windowmaker/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-wm/windowmaker # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/windowmaker/ChangeLog,v 1.140 2013/09/13 23:43:48 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/windowmaker/ChangeLog,v 1.141 2013/12/06 09:50:17 voyageur Exp $ + +*windowmaker-0.95.5-r1 (06 Dec 2013) + + 06 Dec 2013; Bernard Cafarelli <voyageur@gentoo.org> + +windowmaker-0.95.5-r1.ebuild, +files/windowmaker-0.95.5-bsd_crash.patch: + Fix crash on BSD, thanks Yuta SATOH <nigoro.gentoo@0x100.com> in bug #493124 *windowmaker-0.95.5 (13 Sep 2013) diff --git a/x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch b/x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch new file mode 100644 index 000000000000..a3e71375f621 --- /dev/null +++ b/x11-wm/windowmaker/files/windowmaker-0.95.5-bsd_crash.patch @@ -0,0 +1,28 @@ +From: François Tigeot <ftigeot@wolfpond.org> +Date: Sat, 21 Sep 2013 10:34:51 +0000 (+0200) +Subject: osdep_bsd.c: Fix a typo causing memory to be overwritten +X-Git-Url: http://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/38e088314a2a4b7f8031f50eb546c22e5024bdf4 + +osdep_bsd.c: Fix a typo causing memory to be overwritten + +* When compiled on DragonFly+gcc 4.7.3, this out of bounds array element + initialization causes an important variable to be overwritten and a + subsequent WindowMaker crash + +* It was sheer luck other compilers/environments didn't exhibit any obvious + issue so far +--- + +diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c +index 3393240..ad504ad 100644 +--- a/src/osdep_bsd.c ++++ b/src/osdep_bsd.c +@@ -86,7 +86,7 @@ Bool GetCommandForPid(int pid, char ***argv, int *argc) + mib[0] = CTL_KERN; + mib[1] = KERN_ARGMAX; + mib[2] = 0; +- mib[4] = 0; ++ mib[3] = 0; + + count = sizeof(argmax); + if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1) diff --git a/x11-wm/windowmaker/windowmaker-0.95.5-r1.ebuild b/x11-wm/windowmaker/windowmaker-0.95.5-r1.ebuild new file mode 100644 index 000000000000..1c9f1f253421 --- /dev/null +++ b/x11-wm/windowmaker/windowmaker-0.95.5-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/windowmaker/windowmaker-0.95.5-r1.ebuild,v 1.1 2013/12/06 09:50:17 voyageur Exp $ + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="The fast and light GNUstep window manager" +HOMEPAGE="http://www.windowmaker.org/" +SRC_URI=" http://windowmaker.org/pub/source/release/${P/windowm/WindowM}.tar.gz + http://www.windowmaker.org/pub/source/release/WindowMaker-extra-0.1.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +IUSE="gif jpeg nls png tiff modelock xinerama xrandr" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" + +DEPEND="media-libs/fontconfig + >=x11-libs/libXft-2.1.0 + x11-libs/libXmu + x11-libs/libXt + x11-libs/libXv + gif? ( >=media-libs/giflib-4.1.0-r3 ) + png? ( media-libs/libpng:0= ) + jpeg? ( virtual/jpeg ) + tiff? ( media-libs/tiff:0 ) + xinerama? ( x11-libs/libXinerama ) + xrandr? ( x11-libs/libXrandr )" +RDEPEND="${DEPEND} + nls? ( >=sys-devel/gettext-0.10.39 )" + +S=${WORKDIR}/${P/windowm/WindowM} + +src_prepare() { + # Fix some paths + for file in WindowMaker/*menu* util/wmgenmenu.c; do + if [[ -r $file ]] ; then + sed -i -e "s:/usr/local/GNUstep/Applications/WPrefs.app:${EPREFIX}/usr/bin/:g;" "$file" || die + sed -i -e "s:/usr/local/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die + sed -i -e "s:/opt/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die + fi; + done; + + epatch "${FILESDIR}"/${PN}-0.95.3-fix_underlinking.patch + epatch "${FILESDIR}"/${P}-bsd_crash.patch + eautoreconf +} + +src_configure() { + local myconf + + # image format types + # xpm is provided by X itself + myconf="--enable-xpm $(use_enable png) $(use_enable jpeg) $(use_enable gif) $(use_enable tiff)" + + # non required X capabilities + myconf="${myconf} $(use_enable modelock) $(use_enable xrandr) $(use_enable xinerama)" + + if use nls; then + [[ -z $LINGUAS ]] && export LINGUAS="`ls po/*.po | sed 's:po/\(.*\)\.po$:\1:'`" + else + myconf="${myconf} --disable-locale" + fi + + # default settings with $myconf appended + econf \ + --sysconfdir="${EPREFIX}"/etc/X11 \ + --with-x \ + --enable-usermenu \ + --with-pixmapdir="${EPREFIX}"/usr/share/pixmaps \ + --with-nlsdir="${EPREFIX}"/usr/share/locale \ + ${myconf} + + cd ../WindowMaker-extra-0.1 + econf +} + +src_compile() { + emake + + # WindowMaker Extra Package (themes and icons) + cd ../WindowMaker-extra-0.1 + emake +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS BUGFORM BUGS ChangeLog INSTALL* FAQ* \ + README* NEWS TODO + + # WindowMaker Extra + cd ../WindowMaker-extra-0.1 + emake DESTDIR="${D}" install + + newdoc README README.extra + + # create wmaker session shell script + echo "#!/usr/bin/env bash" > wmaker + echo "${EPREFIX}/usr/bin/wmaker" >> wmaker + exeinto /etc/X11/Sessions/ + doexe wmaker + + insinto /usr/share/xsessions + doins "${FILESDIR}"/wmaker.desktop + make_desktop_entry /usr/bin/wmaker +} |