diff options
author | Michael Januszewski <spock@gentoo.org> | 2004-03-29 18:17:02 +0000 |
---|---|---|
committer | Michael Januszewski <spock@gentoo.org> | 2004-03-29 18:17:02 +0000 |
commit | f398bd74569c69b698102b146ef087889bfb4b96 (patch) | |
tree | 7b563d1a69f71060ade925d9567dfec48d27c12b /x11-terms | |
parent | Stable on alpha and ia64 (Manifest recommit) (diff) | |
download | gentoo-2-f398bd74569c69b698102b146ef087889bfb4b96.tar.gz gentoo-2-f398bd74569c69b698102b146ef087889bfb4b96.tar.bz2 gentoo-2-f398bd74569c69b698102b146ef087889bfb4b96.zip |
Updated the copynpaste patch to make jedit happy and close a bug.
Diffstat (limited to 'x11-terms')
-rw-r--r-- | x11-terms/aterm/ChangeLog | 9 | ||||
-rw-r--r-- | x11-terms/aterm/aterm-0.4.2-r9.ebuild | 84 | ||||
-rw-r--r-- | x11-terms/aterm/files/aterm-0.4.2-copynpaste-r3.patch | 180 | ||||
-rw-r--r-- | x11-terms/aterm/files/digest-aterm-0.4.2-r9 | 2 |
4 files changed, 274 insertions, 1 deletions
diff --git a/x11-terms/aterm/ChangeLog b/x11-terms/aterm/ChangeLog index 25be8efbefb2..a65432196f47 100644 --- a/x11-terms/aterm/ChangeLog +++ b/x11-terms/aterm/ChangeLog @@ -1,10 +1,17 @@ # ChangeLog for x11-terms/aterm # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-terms/aterm/ChangeLog,v 1.25 2004/03/28 21:37:10 avenj Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-terms/aterm/ChangeLog,v 1.26 2004/03/29 18:17:01 spock Exp $ 28 Mar 2004; Jon Portnoy <avenj@gentoo.org> aterm-0.4.2-r8.ebuild : Stable on AMD64. +*aterm-0.4.2-r9 (29 Mar 2004) + + 29 Mar 2004; Michal Januszewski <spock@gentoo.org> aterm-0.4.2-r9.ebuild, + files/aterm-0.4.2-copynpaste-r3.patch: + Updated the copy'n'paste patch to make jedit happy and close #42683. Seems my + ears were long enough after all ;) + 27 Mar 2004; Michal Januszewski <spock@gentoo.org> aterm-0.4.2-r4.ebuild, aterm-0.4.2-r5.ebuild, aterm-0.4.2-r6.ebuild, aterm-0.4.2-r7.ebuild, aterm-0.4.2-r8.ebuild: diff --git a/x11-terms/aterm/aterm-0.4.2-r9.ebuild b/x11-terms/aterm/aterm-0.4.2-r9.ebuild new file mode 100644 index 000000000000..17ee20fa555b --- /dev/null +++ b/x11-terms/aterm/aterm-0.4.2-r9.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-terms/aterm/aterm-0.4.2-r9.ebuild,v 1.1 2004/03/29 18:17:02 spock Exp $ + +IUSE="cjk" +S=${WORKDIR}/${P} +DESCRIPTION="A terminal emulator with transparency support as well as rxvt backwards compatibility" +SRC_URI="mirror://sourceforge/aterm/${P}.tar.bz2 + cjk? (http://wakaba.com/~tsann/aterm/aterm-0.4.2-ja.patch)" +HOMEPAGE="http://aterm.sourceforge.net" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ~ppc sparc ~alpha ~amd64" + +DEPEND="media-libs/jpeg + media-libs/libpng + virtual/x11" + +src_unpack() { + unpack ${P}.tar.bz2 + cd ${S}/src + cp feature.h feature.h.orig + sed "s:\(#define LINUX_KEYS\):/\*\1\*/:" \ + feature.h.orig > feature.h + + cd ${S} + epatch ${FILESDIR}/aterm-0.4.2-borderless.patch + epatch ${FILESDIR}/aterm-0.4.2-paste.patch + epatch ${FILESDIR}/aterm-0.4.2-paste_mouse_outside.patch + + if [ `use cjk` ] ; then + epatch ${DISTDIR}/aterm-0.4.2-ja.patch + else + epatch ${FILESDIR}/aterm-0.4.2-copynpaste-r3.patch + fi + + epatch ${FILESDIR}/aterm-0.4.2-patch-pack000.patch +} + +src_compile() { + local myconf + + # You can't --enable-big5 with aterm-0.4.2-ja.patch + # I think it's very bad thing but as nobody complains it + # and we don't have per-language flag atm, I stick to + # use --enable-kanji/--enable-thai (and leave --enable-big5) + use cjk && myconf="$myconf + --enable-kanji + --enable-thai + --enable-xim + --enable-linespace" + + econf \ + --enable-transparency \ + --enable-fading \ + --enable-background-image \ + --enable-menubar \ + --enable-graphics \ + --enable-utmp \ + --with-x \ + ${myconf} || die + + emake || die +} + +src_install () { + make DESTDIR=${D} install || die + + fperms g+s /usr/bin/aterm + fowners root:utmp /usr/bin/aterm + + doman doc/aterm.1 + dodoc ChangeLog INSTALL doc/BUGS doc/FAQ doc/README.* + docinto menu + dodoc doc/menu/* + dohtml -r . +} + +pkg_postinst () { + einfo + einfo "Hint: you can copy text from aterm to the clipboard by holding the ALT key" + einfo "while highlighting the text." + einfo +} diff --git a/x11-terms/aterm/files/aterm-0.4.2-copynpaste-r3.patch b/x11-terms/aterm/files/aterm-0.4.2-copynpaste-r3.patch new file mode 100644 index 000000000000..bf837a6f3d90 --- /dev/null +++ b/x11-terms/aterm/files/aterm-0.4.2-copynpaste-r3.patch @@ -0,0 +1,180 @@ +diff -Naur aterm-orig/configure aterm-0.4.2/configure +--- aterm-orig/configure 2001-09-06 18:38:07.000000000 +0200 ++++ aterm-0.4.2/configure 2004-03-29 19:38:49.923263224 +0200 +@@ -2609,7 +2609,7 @@ + ; \ + do + ac_save_LIBS=$LIBS +- LIBS="-L$ac_dir -lXpm $LIBS -lX11" ++ LIBS="-L$ac_dir -lXpm $LIBS -lX11 -lXmu" + cat > conftest.$ac_ext <<EOF + #line 2615 "configure" + #include "confdefs.h" +diff -Naur aterm-orig/src/command.c aterm-0.4.2/src/command.c +--- aterm-orig/src/command.c 2001-09-06 18:38:07.000000000 +0200 ++++ aterm-0.4.2/src/command.c 2004-03-29 19:38:49.928262464 +0200 +@@ -2653,7 +2653,7 @@ + switch (ev->xbutton.button) { + case Button1: + case Button3: +- selection_make(ev->xbutton.time); ++ selection_make(ev->xbutton.time, ev->xbutton.state); + break; + + case Button2: +diff -Naur aterm-orig/src/screen.c aterm-0.4.2/src/screen.c +--- aterm-orig/src/screen.c 2004-03-29 19:38:25.944908488 +0200 ++++ aterm-0.4.2/src/screen.c 2004-03-29 19:28:56.000000000 +0200 +@@ -44,7 +44,7 @@ + + #include <X11/Xatom.h> + #include <X11/Xmd.h> /* get the typedef for CARD32 */ +- ++#include <X11/Xmu/Atoms.h> + + static screen_t screen; + +@@ -2759,21 +2759,88 @@ + long nread; + unsigned long bytes_after, nitems; + unsigned char *data; ++ XTextProperty ct; + Atom actual_type; + int actual_fmt; +- ++ int dummy_count; ++ char **cl; ++ XEvent ev; ++ XWindowAttributes wa; ++ int setpropertyevent = 0; ++ + if (prop == None) + return; ++ + for (nread = 0, bytes_after = 1; bytes_after > 0; nread += nitems) { + if ((XGetWindowProperty(Xdisplay, win, prop, (nread / 4), PROP_SIZE, +- Delete, AnyPropertyType, &actual_type, +- &actual_fmt, &nitems, &bytes_after, +- &data) != Success)) { +- XFree(data); ++ False, AnyPropertyType, &ct.encoding, &ct.format, ++ &ct.nitems, &bytes_after, &ct.value) != Success)) { ++ XFree(ct.value); + return; + } +- PasteIt(data, nitems); +- XFree(data); ++ ++ if (ct.encoding == XInternAtom(Xdisplay, "INCR", False)) { ++ /* ++ * This is an INCR (incremental large) paste ++ */ ++ XGetWindowAttributes(Xdisplay, win, &wa); ++ if ((wa.your_event_mask | PropertyChangeMask) != wa.your_event_mask) { ++ /* We need to register the PropertyNotify event */ ++ XSelectInput(Xdisplay, win, (wa.your_event_mask | PropertyChangeMask) ); ++ setpropertyevent = 1; ++ } ++ XDeleteProperty(Xdisplay, win, prop); ++ while (1) { ++ XWindowEvent(Xdisplay, win, PropertyChangeMask, &ev); ++ if (ev.xproperty.state != PropertyNewValue) ++ continue; ++ if ((XGetWindowProperty(Xdisplay, win, prop, 0, PROP_SIZE, ++ True, AnyPropertyType, &ct.encoding, &ct.format, ++ &ct.nitems, &bytes_after, &ct.value) != Success)) { ++ XFree(ct.value); ++ /* error */ ++ break; ++ } ++ ++ if (ct.nitems == 0) { ++ /* end of INCR transfer */ ++ XFree(ct.value); ++ break; ++ } ++ else { ++ if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &dummy_count) == Success && cl) { ++ PasteIt(cl[0], strlen(cl[0])); ++ XFreeStringList(cl); ++ } else { ++ PasteIt(ct.value, (unsigned int)ct.nitems); ++ } ++ ++ XFree(ct.value); ++ } ++ } ++ if (setpropertyevent == 1) { ++ /* We need to unregister the PropertyNotify event */ ++ XGetWindowAttributes(Xdisplay, win, &wa); ++ XSelectInput(Xdisplay, win, (wa.your_event_mask ^ PropertyChangeMask)); ++ setpropertyevent = 0; ++ } ++ } else { ++ /* ++ * This is a normal 1-time paste ++ */ ++ if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl, &dummy_count) == Success && cl) { ++ PasteIt(cl[0], strlen(cl[0])); ++ XFreeStringList(cl); ++ } else { ++ PasteIt(ct.value, (unsigned int)ct.nitems); ++ } ++ ++ if (Delete) { ++ XDeleteProperty(Xdisplay, win, prop); ++ } ++ ++ XFree(ct.value); ++ } + } + } + +@@ -2787,6 +2854,9 @@ + selection_request(Time tm, int x, int y) + { + Atom prop; ++ Atom xa; ++ ++ xa = XInternAtom(Xdisplay, "COMPOUND_TEXT", False); + + if (!(Options & Opt_pasteMouseOutside)) + if (x < 0 || x >= TermWin.width || y < 0 || y >= TermWin.height) +@@ -2798,8 +2868,11 @@ + selection_paste(Xroot, XA_CUT_BUFFER0, False); + } else { + prop = XInternAtom(Xdisplay, "VT_SELECTION", False); +- XConvertSelection(Xdisplay, XA_PRIMARY, XA_STRING, prop, TermWin.vt, +- tm); ++ if (XConvertSelection(Xdisplay, XA_PRIMARY, xa, prop, TermWin.vt,tm) != Success) { ++ if (XConvertSelection(Xdisplay, XA_PRIMARY, XA_UTF8_STRING(Xdisplay), prop, TermWin.vt,tm) != Success) {; ++ XConvertSelection(Xdisplay, XA_PRIMARY, XA_STRING, prop, TermWin.vt,tm); ++ } ++ } + } + } + +@@ -2828,7 +2901,7 @@ + */ + /* PROTO */ + void +-selection_make(Time tm) ++selection_make(Time tm, unsigned int key_state) + { + int i, col, end_col, row, end_row; + unsigned char *new_selection_text; +@@ -2895,7 +2968,13 @@ + FREE(selection.text); + selection.text = new_selection_text; + +- XSetSelectionOwner(Xdisplay, XA_PRIMARY, TermWin.vt, tm); ++ // selecting with ALT will put the text to clipboard ++ if (key_state & Mod1Mask) { ++ XSetSelectionOwner(Xdisplay, XA_CLIPBOARD(Xdisplay), TermWin.vt, tm); ++ } else { ++ XSetSelectionOwner(Xdisplay, XA_PRIMARY, TermWin.vt, tm); ++ } ++ + if (XGetSelectionOwner(Xdisplay, XA_PRIMARY) != TermWin.vt) + print_error("can't get primary selection"); + XChangeProperty(Xdisplay, Xroot, XA_CUT_BUFFER0, XA_STRING, 8, diff --git a/x11-terms/aterm/files/digest-aterm-0.4.2-r9 b/x11-terms/aterm/files/digest-aterm-0.4.2-r9 new file mode 100644 index 000000000000..a1aafd5e085e --- /dev/null +++ b/x11-terms/aterm/files/digest-aterm-0.4.2-r9 @@ -0,0 +1,2 @@ +MD5 5c29d0cde4225bdbd63ccb6a4dd94c56 aterm-0.4.2.tar.bz2 243419 +MD5 2bd8629ea2a1926bca13841b0aca6604 aterm-0.4.2-ja.patch 84282 |