From 1d1275baf533294abf1f9e1c2b535d24c37da9f8 Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sun, 4 Mar 2012 09:54:46 +0000 Subject: Prevent crashes, bug #382033 by Nico R. Drop broken version. (Portage version: 2.1.10.49/cvs/Linux x86_64) --- dev-util/biew/ChangeLog | 10 ++++- dev-util/biew/biew-6.1.0-r1.ebuild | 64 ------------------------------- dev-util/biew/biew-6.1.0-r2.ebuild | 65 ++++++++++++++++++++++++++++++++ dev-util/biew/files/biew-610-crash.patch | 28 ++++++++++++++ 4 files changed, 101 insertions(+), 66 deletions(-) delete mode 100644 dev-util/biew/biew-6.1.0-r1.ebuild create mode 100644 dev-util/biew/biew-6.1.0-r2.ebuild create mode 100644 dev-util/biew/files/biew-610-crash.patch (limited to 'dev-util') diff --git a/dev-util/biew/ChangeLog b/dev-util/biew/ChangeLog index c1cc1f2dde69..33ed997f564b 100644 --- a/dev-util/biew/ChangeLog +++ b/dev-util/biew/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/biew -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/biew/ChangeLog,v 1.32 2011/12/28 08:08:40 xmw Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/biew/ChangeLog,v 1.33 2012/03/04 09:54:46 pacho Exp $ + +*biew-6.1.0-r2 (04 Mar 2012) + + 04 Mar 2012; Pacho Ramos +biew-6.1.0-r2.ebuild, + +files/biew-610-crash.patch, -biew-6.1.0-r1.ebuild: + Prevent crashes, bug #382033 by Nico R. Drop broken version. 28 Dec 2011; Michael Weber metadata.xml: taking maint diff --git a/dev-util/biew/biew-6.1.0-r1.ebuild b/dev-util/biew/biew-6.1.0-r1.ebuild deleted file mode 100644 index c1be1d2e9c40..000000000000 --- a/dev-util/biew/biew-6.1.0-r1.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/biew/biew-6.1.0-r1.ebuild,v 1.3 2011/04/05 15:30:44 signals Exp $ - -EAPI=4 -inherit eutils flag-o-matic toolchain-funcs versionator - -MY_P=${PN}-$(replace_all_version_separators "") - -DESCRIPTION="A portable viewer of binary files, hexadecimal and disassembler modes." -HOMEPAGE="http://beye.sourceforge.net/" -SRC_URI="mirror://sourceforge/beye/${PV}/${MY_P}-src.tar.bz2" -S=${WORKDIR}/${MY_P} - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="gpm mmx sse" -REQUIRED_USE="mmx sse" - -RDEPEND="gpm? ( sys-libs/gpm )" -DEPEND="${RDEPEND}" - -pkg_setup() { - append-flags -mmmx -msse #362043 -} - -src_prepare() { - epatch "${FILESDIR}/${PN}-610-fix_localedep-1.patch" - epatch "${FILESDIR}/${PN}-610-portable_configure-1.patch" - sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile || die "Failed to edit makefile." -} - -src_configure() { - if use gpm; then - append-flags -DHAVE_MOUSE - else - append-flags -UHAVE_MOUSE - fi - ./configure --datadir=/usr/share/${PN} \ - --prefix=/usr \ - --cc="$(tc-getCC)" \ - --ld="$(tc-getCC)" \ - --as="$(tc-getAS)" \ - --ranlib="$(tc-getRANLIB)" || die "configure failed." -} - -src_compile() { - emake LDFLAGS="${LDFLAGS}" -} - -src_install() { - emake DESTDIR="${D}" install - dodoc doc/{biew_en,release,unix}.txt -} - -pkg_postinst() { - elog - elog "Note: if you are upgrading from <=dev-util/biew-6.1.0 you will need" - elog "to change the paths in the setup dialog (F9) from /usr/share/ to" - elog "/usr/share/biew/ Alternatively, you can delete ~/.biewrc and it will" - elog "automatically determine the correct locations on the next run." - elog -} diff --git a/dev-util/biew/biew-6.1.0-r2.ebuild b/dev-util/biew/biew-6.1.0-r2.ebuild new file mode 100644 index 000000000000..7912e6029934 --- /dev/null +++ b/dev-util/biew/biew-6.1.0-r2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/biew/biew-6.1.0-r2.ebuild,v 1.1 2012/03/04 09:54:46 pacho Exp $ + +EAPI=4 +inherit eutils flag-o-matic toolchain-funcs versionator + +MY_P=${PN}-$(replace_all_version_separators "") + +DESCRIPTION="A portable viewer of binary files, hexadecimal and disassembler modes." +HOMEPAGE="http://beye.sourceforge.net/" +SRC_URI="mirror://sourceforge/beye/${PV}/${MY_P}-src.tar.bz2" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gpm mmx sse" +REQUIRED_USE="mmx sse" + +RDEPEND="gpm? ( sys-libs/gpm )" +DEPEND="${RDEPEND}" + +pkg_setup() { + append-flags -mmmx -msse #362043 +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-610-fix_localedep-1.patch" + epatch "${FILESDIR}/${PN}-610-portable_configure-1.patch" + epatch "${FILESDIR}/${PN}-610-crash.patch" + sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile || die "Failed to edit makefile." +} + +src_configure() { + if use gpm; then + append-flags -DHAVE_MOUSE + else + append-flags -UHAVE_MOUSE + fi + ./configure --datadir=/usr/share/${PN} \ + --prefix=/usr \ + --cc="$(tc-getCC)" \ + --ld="$(tc-getCC)" \ + --as="$(tc-getAS)" \ + --ranlib="$(tc-getRANLIB)" || die "configure failed." +} + +src_compile() { + emake LDFLAGS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc doc/{biew_en,release,unix}.txt +} + +pkg_postinst() { + elog + elog "Note: if you are upgrading from <=dev-util/biew-6.1.0 you will need" + elog "to change the paths in the setup dialog (F9) from /usr/share/ to" + elog "/usr/share/biew/ Alternatively, you can delete ~/.biewrc and it will" + elog "automatically determine the correct locations on the next run." + elog +} diff --git a/dev-util/biew/files/biew-610-crash.patch b/dev-util/biew/files/biew-610-crash.patch new file mode 100644 index 000000000000..244f94a7ad53 --- /dev/null +++ b/dev-util/biew/files/biew-610-crash.patch @@ -0,0 +1,28 @@ +If .biewrc does not exist, the setup dialog appears at program start. If you try +to click a checkbox with the mouse, biew tries to dereference a null pointer +(because the MainWindow is not yet set). + +This patch adds a workaround. Note that you actually cannot click a checkbox. +But that is what users might expect. (Maybe the biew code should be changed to +handle this properly.) Well, it is better not to crash, even if the checkboxes +are not clickable. + + –nico + + +diff -Naur biew-610.orig/events.c biew-610/events.c +--- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 ++++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 +@@ -118,7 +118,11 @@ + } + else + { +- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; ++ TWindow *wnd = ++ MainWnd ? MainWnd : /*XXX:drop this line?*/ ++ twGetWinAtPos(mx, my); ++ if(!wnd) return KE_MOUSE; ++ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; + } + wdh = X2 - X1; + hght = Y2 - Y1; -- cgit v1.2.3-65-gdbad