diff options
author | Ulrich Müller <ulm@gentoo.org> | 2008-04-07 18:34:50 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2008-04-07 18:34:50 +0000 |
commit | 3013d37deec9e5279f3323f5038ce60a482fd9ce (patch) | |
tree | 06b6af119fa62ad16aed20607f131aec55245c2c /x11-libs | |
parent | Keyworded on alpha, bug #216120 (diff) | |
download | gentoo-2-3013d37deec9e5279f3323f5038ce60a482fd9ce.tar.gz gentoo-2-3013d37deec9e5279f3323f5038ce60a482fd9ce.tar.bz2 gentoo-2-3013d37deec9e5279f3323f5038ce60a482fd9ce.zip |
Fix segmentation faults affecting nedit, bug 216710.
(Portage version: 2.1.5_rc2)
Diffstat (limited to 'x11-libs')
-rw-r--r-- | x11-libs/openmotif/ChangeLog | 10 | ||||
-rw-r--r-- | x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch | 20 | ||||
-rw-r--r-- | x11-libs/openmotif/openmotif-2.3.0-r2.ebuild | 141 |
3 files changed, 170 insertions, 1 deletions
diff --git a/x11-libs/openmotif/ChangeLog b/x11-libs/openmotif/ChangeLog index 69ebda2d8a8b..c424ea6790fd 100644 --- a/x11-libs/openmotif/ChangeLog +++ b/x11-libs/openmotif/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for x11-libs/openmotif # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.170 2008/04/04 12:38:41 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.171 2008/04/07 18:34:50 ulm Exp $ + +*openmotif-2.3.0-r2 (07 Apr 2008) + + 07 Apr 2008; Ulrich Mueller <ulm@gentoo.org> + +files/openmotif-2.3.0-fix-nedit-segfaults.patch, + +openmotif-2.3.0-r2.ebuild: + Fix segmentation faults affecting nedit, bug 216710. Patch extracted from + upstream CVS. Thanks to Evan Teran <eteran@alum.rit.edu> for reporting. 04 Apr 2008; Ulrich Mueller <ulm@gentoo.org> files/openmotif-2.3.0-sensitivity-invisible.patch: diff --git a/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch b/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch new file mode 100644 index 000000000000..0d3f1b97c373 --- /dev/null +++ b/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch @@ -0,0 +1,20 @@ +--- openmotif-2.3.0-orig/lib/Xm/List.c 2008-04-07 18:27:43.000000000 +0200 ++++ openmotif-2.3.0/lib/Xm/List.c 2008-04-07 18:45:47.000000000 +0200 +@@ -3647,6 +3647,7 @@ + XmStringFree(lw->list.items[pos]); + lw->list.items[pos] = XmStringCopy(item); + /*Selected items should be replaced also*/ ++ UpdateSelectedPositions(lw, lw->list.selectedItemCount); + for(i=0; i<lw->list.selectedItemCount; i++) + if(lw->list.selectedPositions[i]==pos+1) { + XmStringFree(lw->list.selectedItems[i]); +--- openmotif-2.3.0-orig/lib/Xm/ResEncod.c 2006-11-21 20:50:31.000000000 +0100 ++++ openmotif-2.3.0/lib/Xm/ResEncod.c 2008-04-07 18:45:47.000000000 +0200 +@@ -2524,6 +2524,7 @@ + /* Now copy in the text */ + if (ctlen > 0) { + char *text = Convert(ctext, ctlen, "UTF-8", tag); ++ if (text == NULL) return(False); + *outc = ctextConcat(*outc, *outlen, text, strlen(text)); + *outlen += ctlen; + XtFree(text); diff --git a/x11-libs/openmotif/openmotif-2.3.0-r2.ebuild b/x11-libs/openmotif/openmotif-2.3.0-r2.ebuild new file mode 100644 index 000000000000..177572065665 --- /dev/null +++ b/x11-libs/openmotif/openmotif-2.3.0-r2.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.3.0-r2.ebuild,v 1.1 2008/04/07 18:34:50 ulm Exp $ + +inherit eutils flag-o-matic multilib autotools + +DESCRIPTION="Open Motif" +HOMEPAGE="http://www.motifzone.org/" +SRC_URI="ftp://ftp.ics.com/openmotif/2.3/${PV}/${P}.tar.gz + doc? ( http://www.motifzone.net/files/documents/${P}-manual.pdf.tgz )" + +LICENSE="MOTIF doc? ( OPL )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="doc examples jpeg png xft" + +# make people unmerge motif-config and all previous slots +# since the slotting is finally gone now +RDEPEND="!x11-libs/motif-config + !x11-libs/lesstif + !<=x11-libs/openmotif-2.3.0 + x11-libs/libXmu + x11-libs/libXaw + x11-libs/libXp + xft? ( x11-libs/libXft ) + jpeg? ( media-libs/jpeg ) + png? ( media-libs/libpng )" +DEPEND="${RDEPEND} + x11-misc/xbitmaps + x11-proto/printproto" + +PROVIDE="virtual/motif" + +pkg_setup() { + # clean up orphaned cruft left over by motif-config + local i l count=0 + for i in "${ROOT}"usr/bin/{mwm,uil,xmbind} \ + "${ROOT}"usr/include/{Xm,uil,Mrm} \ + "${ROOT}"usr/$(get_libdir)/lib{Xm,Uil,Mrm}.*; do + [[ -L "${i}" ]] || continue + l=$(readlink "${i}") + if [[ ${l} == *openmotif-* || ${l} == *lesstif-* ]]; then + einfo "Cleaning up orphaned ${i} symlink ..." + rm -f "${i}" + fi + done + + cd "${ROOT}"usr/share/man + for i in $(find . -type l); do + l=$(readlink "${i}") + if [[ ${l} == *-openmotif-* || ${l} == *-lesstif-* ]]; then + (( count++ )) + rm -f "${i}" + fi + done + [[ ${count} -ne 0 ]] && \ + einfo "Cleaned up ${count} orphaned symlinks in ${ROOT}usr/share/man" +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-sensitivity-invisible.patch" + epatch "${FILESDIR}/${P}-fix-nedit-segfaults.patch" + + # disable compilation of demo binaries + sed -i -e 's/^[ \t]*demos//' Makefile.in +} + +src_compile() { + # get around some LANG problems in make (#15119) + unset LANG + + # bug #80421 + filter-flags -ftracer + + # multilib includes don't work right in this package... + has_multilib_profile && append-flags "-I$(get_ml_incdir)" + + # feel free to fix properly if you care + append-flags -fno-strict-aliasing + + econf --with-x \ + $(use_enable xft) \ + $(use_enable jpeg) \ + $(use_enable png) + + emake -j1 || die "emake failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "emake install failed" + + newbin "${FILESDIR}"/motif-config-2.3 motif-config + dosed "s:@@LIBDIR@@:$(get_libdir):g" /usr/bin/motif-config + + # mwm default configs + insinto /etc/X11/app-defaults + doins "${FILESDIR}"/Mwm.defaults + + local f + for f in /usr/share/man/man1/mwm.1 /usr/share/man/man4/mwmrc.4; do + dosed 's:/usr/lib/X11/\(.*system\\&\.mwmrc\):/etc/X11/mwm/\1:g' ${f} + dosed 's:/usr/lib/X11/app-defaults:/etc/X11/app-defaults:g' ${f} + done + + dodir /etc/X11/mwm + mv -f "${D}"/usr/$(get_libdir)/X11/system.mwmrc "${D}"/etc/X11/mwm + dosym /etc/X11/mwm/system.mwmrc /usr/$(get_libdir)/X11/ + + if use examples ; then + emake -j1 -C demos DESTDIR="${D}" install-data \ + || die "installation of demos failed" + dodir /usr/share/doc/${PF}/demos + mv "${D}"/usr/share/Xm/* "${D}"/usr/share/doc/${PF}/demos + fi + rm -rf "${D}"/usr/share/Xm + + # documentation + dodoc README RELEASE RELNOTES BUGREPORT TODO + use doc && cp "${WORKDIR}"/*.pdf "${D}"/usr/share/doc/${PF} +} + +pkg_postinst() { + local line + while read line; do elog "${line}"; done <<-EOF + Gentoo is no longer providing slotted Open Motif libraries. + See bug 204249 and its dependencies for the reasons. + + From the Open Motif 2.3.0 (upstream) release notes: + "Open Motif 2.3 is an updated version of 2.2. Any applications + built against a previous 2.x release of Open Motif will be binary + compatible with this release." + + If you have binary-only applications requiring libXm.so.3, you may + therefore create a symlink from libXm.so.3 to libXm.so.4. + Please note, however, that there will be no Gentoo support for this. + Alternatively, you may install x11-libs/openmotif-compat-2.2* for + the Open Motif 2.2 libraries. + EOF +} |