summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Wendel <lanius@gentoo.org>2004-09-16 13:39:28 +0000
committerHeinrich Wendel <lanius@gentoo.org>2004-09-16 13:39:28 +0000
commit5eb7b69778e233986f5b790241181d0775fdd43d (patch)
treeb3826f24e8520821f06322feaaa1670a49c7a07a /app-misc
parentgnome 2.8 commit (Manifest recommit) (diff)
downloadgentoo-2-5eb7b69778e233986f5b790241181d0775fdd43d.tar.gz
gentoo-2-5eb7b69778e233986f5b790241181d0775fdd43d.tar.bz2
gentoo-2-5eb7b69778e233986f5b790241181d0775fdd43d.zip
add utf8 support, bug #64195
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/mc/ChangeLog5
-rw-r--r--app-misc/mc/files/digest-mc-4.6.0-r112
-rw-r--r--app-misc/mc/files/mc-4.6.0-largefile.patch160
-rw-r--r--app-misc/mc/files/mc-4.6.0-utf8.patch.bz2bin0 -> 30359 bytes
-rw-r--r--app-misc/mc/mc-4.6.0-r11.ebuild104
5 files changed, 271 insertions, 0 deletions
diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog
index 13f4dd155144..bb4ef43e1770 100644
--- a/app-misc/mc/ChangeLog
+++ b/app-misc/mc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-misc/mc
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
+ 16 Sep 2004; Heinrich Wendel <lanius@gentoo.org>
+ +files/mc-4.6.0-largefile.patch, +files/mc-4.6.0-utf8.patch.bz2,
+ mc-4.6.0-r11.ebuild:
+ add utf8 support, bug #64195
+
08 Sep 2004; Gustavo Zacarias <gustavoz@gentoo.org> mc-4.6.0-r10.ebuild:
Keyworded sparc and hppa back into stable, PLEASE be careful when committing
diff --git a/app-misc/mc/files/digest-mc-4.6.0-r11 b/app-misc/mc/files/digest-mc-4.6.0-r11
new file mode 100644
index 000000000000..c66b6aee0770
--- /dev/null
+++ b/app-misc/mc/files/digest-mc-4.6.0-r11
@@ -0,0 +1,2 @@
+MD5 70804dc9e2049e24f294ff7090a82a12 mc-4.6.0.tar.gz 3727676
+MD5 f5053361d1936b3e4187857daf0cc6cb mc-4.6.0-sambalib-3.0.0.patch.bz2 399920
diff --git a/app-misc/mc/files/mc-4.6.0-largefile.patch b/app-misc/mc/files/mc-4.6.0-largefile.patch
new file mode 100644
index 000000000000..24bfe90b03a0
--- /dev/null
+++ b/app-misc/mc/files/mc-4.6.0-largefile.patch
@@ -0,0 +1,160 @@
+diff -ur mc-4.6.0-gentoo/src/view.c mc-4.6.0-largefile/src/view.c
+--- mc-4.6.0-gentoo/src/view.c 2004-09-16 03:59:30.177753168 +0400
++++ mc-4.6.0-largefile/src/view.c 2004-09-16 03:51:31.000000000 +0400
+@@ -81,6 +81,12 @@
+ #define vwidth (view->widget.cols - (view->have_frame ? 2 : 0))
+ #define vheight (view->widget.lines - (view->have_frame ? 2 : 0))
+
++#if GLIB_MAJOR_VERSION >= 2
++# define my_g_malloc g_try_malloc
++#else
++# define my_g_malloc g_malloc
++#endif
++
+ /* The growing buffers data types */
+ typedef struct block_ptr_t {
+ unsigned char *data;
+@@ -580,7 +586,7 @@
+ view->data =
+ mc_mmap (0, view->s.st_size, PROT_READ, MAP_FILE | MAP_SHARED,
+ view->file, 0);
+- if ((caddr_t) view->data != (caddr_t) - 1) {
++ if (view->data != (void *)-1) {
+ /* mmap worked */
+ view->first = 0;
+ view->bytes_read = view->s.st_size;
+@@ -593,6 +599,9 @@
+ * file into memory (alex@bcs.zaporizhzhe.ua). Also, mmap can fail
+ * for any reason, so we use this as fallback (pavel@ucw.cz) */
+
++ /* If large file support is enabled, st_size is a 64 bit value and
++ * will thus on 32 bit platforms possibly be beyond the range of gulong */
++
+ if ((gulong) view->s.st_size == view->s.st_size)
+ view->data = (unsigned char *) g_try_malloc (view->s.st_size);
+ else
+diff -ur mc-4.6.0-gentoo/vfs/local.c mc-4.6.0-largefile/vfs/local.c
+--- mc-4.6.0-gentoo/vfs/local.c 2002-09-23 10:45:33.000000000 +0400
++++ mc-4.6.0-largefile/vfs/local.c 2004-09-16 03:45:21.000000000 +0400
+@@ -282,8 +282,8 @@
+ }
+
+ #ifdef HAVE_MMAP
+-caddr_t
+-local_mmap (vfs *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset)
++void *
++local_mmap (vfs *me, void *addr, size_t len, int prot, int flags, void *data, off_t offset)
+ {
+ int fd = * (int *)data;
+
+@@ -291,7 +291,7 @@
+ }
+
+ int
+-local_munmap (vfs *me, caddr_t addr, size_t len, void *data)
++local_munmap (vfs *me, void *addr, size_t len, void *data)
+ {
+ return munmap (addr, len);
+ }
+diff -ur mc-4.6.0-gentoo/vfs/local.h mc-4.6.0-largefile/vfs/local.h
+--- mc-4.6.0-gentoo/vfs/local.h 1998-12-16 01:30:55.000000000 +0300
++++ mc-4.6.0-largefile/vfs/local.h 2004-09-16 03:45:21.000000000 +0400
+@@ -7,8 +7,8 @@
+ extern int local_errno (vfs *me);
+ extern int local_lseek (void *data, off_t offset, int whence);
+ #ifdef HAVE_MMAP
+-extern caddr_t local_mmap (vfs *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset);
+-extern int local_munmap (vfs *me, caddr_t addr, size_t len, void *data);
++extern void *local_mmap (vfs *me, void *addr, size_t len, int prot, int flags, void *data, off_t offset);
++extern int local_munmap (vfs *me, void *addr, size_t len, void *data);
+ #endif
+
+ #endif
+diff -ur mc-4.6.0-gentoo/vfs/samba/lib/util.c mc-4.6.0-largefile/vfs/samba/lib/util.c
+--- mc-4.6.0-gentoo/vfs/samba/lib/util.c 2004-09-16 01:38:29.000000000 +0400
++++ mc-4.6.0-largefile/vfs/samba/lib/util.c 2004-09-16 03:45:21.000000000 +0400
+@@ -1830,7 +1830,7 @@
+
+ /* Look up the host address in the address list we just got. */
+ for (i = 0; hp->h_addr_list[i]; i++) {
+- if (memcmp(hp->h_addr_list[i], (caddr_t) & addr, sizeof(addr)) == 0)
++ if (memcmp(hp->h_addr_list[i], &addr, sizeof(addr)) == 0)
+ return True;
+ }
+
+diff -ur mc-4.6.0-gentoo/vfs/vfs.c mc-4.6.0-largefile/vfs/vfs.c
+--- mc-4.6.0-gentoo/vfs/vfs.c 2004-09-16 01:38:30.000000000 +0400
++++ mc-4.6.0-largefile/vfs/vfs.c 2004-09-16 03:45:21.000000000 +0400
+@@ -995,27 +995,27 @@
+
+ #ifdef HAVE_MMAP
+ static struct mc_mmapping {
+- caddr_t addr;
++ void *addr;
+ void *vfs_info;
+ vfs *vfs;
+ struct mc_mmapping *next;
+ } *mc_mmaparray = NULL;
+
+-caddr_t
+-mc_mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
++void *
++mc_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
+ {
+ vfs *vfs;
+- caddr_t result;
++ void *result;
+ struct mc_mmapping *mcm;
+
+ if (fd == -1)
+- return (caddr_t) -1;
++ return (void *)-1;
+
+ vfs = vfs_op (fd);
+- result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (caddr_t)-1;
+- if (result == (caddr_t)-1){
++ result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (void *)-1;
++ if (result == (void *)-1){
+ errno = ferrno (vfs);
+- return (caddr_t)-1;
++ return (void *)-1;
+ }
+ mcm =g_new (struct mc_mmapping, 1);
+ mcm->addr = result;
+@@ -1027,7 +1027,7 @@
+ }
+
+ int
+-mc_munmap (caddr_t addr, size_t len)
++mc_munmap (void *addr, size_t len)
+ {
+ struct mc_mmapping *mcm, *mcm2 = NULL;
+
+diff -ur mc-4.6.0-gentoo/vfs/vfs.h mc-4.6.0-largefile/vfs/vfs.h
+--- mc-4.6.0-gentoo/vfs/vfs.h 2002-12-11 12:36:51.000000000 +0300
++++ mc-4.6.0-largefile/vfs/vfs.h 2004-09-16 03:45:21.000000000 +0400
+@@ -88,9 +88,9 @@
+ int (*ctl) (void *vfs_info, int ctlop, int arg);
+ int (*setctl) (vfs *me, char *path, int ctlop, char *arg);
+ #ifdef HAVE_MMAP
+- caddr_t (*mmap) (vfs *me, caddr_t addr, size_t len, int prot,
++ void *(*mmap) (vfs *me, void *addr, size_t len, int prot,
+ int flags, void *vfs_info, off_t offset);
+- int (*munmap) (vfs *me, caddr_t addr, size_t len,
++ int (*munmap) (vfs *me, void *addr, size_t len,
+ void *vfs_info);
+ #endif
+ };
+@@ -208,9 +208,9 @@
+ int mc_ctl (int fd, int ctlop, int arg);
+ int mc_setctl (char *path, int ctlop, char *arg);
+ #ifdef HAVE_MMAP
+- caddr_t mc_mmap (caddr_t, size_t, int, int, int, off_t);
+- int mc_unmap (caddr_t, size_t);
+- int mc_munmap (caddr_t addr, size_t len);
++ void *mc_mmap (void *, size_t, int, int, int, off_t);
++ int mc_unmap (void *, size_t);
++ int mc_munmap (void *addr, size_t len);
+ #endif /* HAVE_MMAP */
+
+ #else
diff --git a/app-misc/mc/files/mc-4.6.0-utf8.patch.bz2 b/app-misc/mc/files/mc-4.6.0-utf8.patch.bz2
new file mode 100644
index 000000000000..1dcc1a52e44f
--- /dev/null
+++ b/app-misc/mc/files/mc-4.6.0-utf8.patch.bz2
Binary files differ
diff --git a/app-misc/mc/mc-4.6.0-r11.ebuild b/app-misc/mc/mc-4.6.0-r11.ebuild
new file mode 100644
index 000000000000..bfccb7fd58b9
--- /dev/null
+++ b/app-misc/mc/mc-4.6.0-r11.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.6.0-r11.ebuild,v 1.1 2004/09/16 13:39:28 lanius Exp $
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="GNU Midnight Commander cli-based file manager"
+HOMEPAGE="http://www.ibiblio.org/mc/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/utils/file/managers/${PN}/${P}.tar.gz
+ http://www.spock.mga.com.pl/public/gentoo/${P}-sambalib-3.0.0.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ia64 ~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ppc64"
+IUSE="gpm nls samba ncurses X slang unicode"
+
+PROVIDE="virtual/editor"
+
+DEPEND=">=sys-fs/e2fsprogs-1.19
+ ncurses? ( >=sys-libs/ncurses-5.2-r5 )
+ =dev-libs/glib-2*
+ >=sys-libs/pam-0.72
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ slang? ( >=sys-libs/slang-1.4.9-r1 )
+ samba? ( >=net-fs/samba-3.0.0 )
+ X? ( virtual/x11 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+
+ epatch ${DISTDIR}/${P}-sambalib-3.0.0.patch.bz2
+
+ epatch ${FILESDIR}/${P}-find.patch
+ epatch ${FILESDIR}/${P}-cpan-2003-1023.patch
+ epatch ${FILESDIR}/${P}-can-2004-0226-0231-0232.patch.bz2
+ epatch ${FILESDIR}/${P}-vfs.patch
+ epatch ${FILESDIR}/${P}-ftp.patch
+ epatch ${FILESDIR}/${P}-largefile.patch
+
+ use unicode && epatch ${FILESDIR}/${P}-utf8.patch.bz2
+}
+
+src_compile() {
+ filter-flags -malign-double
+
+ local myconf=""
+
+ if ! use slang && ! use ncurses ; then
+ myconf="${myconf} --with-screen=mcslang"
+ elif use ncurses && ! use slang ; then
+ myconf="${myconf} --with-screen=ncurses"
+ else
+ use slang && myconf="${myconf} --with-screen=slang"
+ fi
+
+ myconf="${myconf} `use_with gpm gpm-mouse`"
+
+ use nls \
+ && myconf="${myconf} --with-included-gettext" \
+ || myconf="${myconf} --disable-nls"
+
+ myconf="${myconf} `use_with X x`"
+
+ use samba \
+ && myconf="${myconf} --with-samba --with-configdir=/etc/samba
+ --with-codepagedir=/var/lib/samba/codepages --with-privatedir=/etc/samba/private" \
+ || myconf="${myconf} --without-samba"
+
+ econf \
+ --with-vfs \
+ --with-gnu-ld \
+ --with-ext2undel \
+ --with-edit \
+ --enable-charset \
+ ${myconf} || die
+
+ emake || die
+}
+
+src_install() {
+ cat ${FILESDIR}/chdir-4.6.0.gentoo >>\
+ ${S}/lib/mc-wrapper.sh
+
+ einstall || die
+
+ # install cons.saver setuid, to actually work
+ chmod u+s ${D}/usr/lib/mc/cons.saver
+
+ dodoc ChangeLog AUTHORS MAINTAINERS FAQ INSTALL* NEWS README*
+
+ insinto /usr/share/mc
+ doins ${FILESDIR}/mc.gentoo
+}
+
+pkg_postinst() {
+ einfo "Add the following line to your ~/.bashrc to"
+ einfo "allow mc to chdir to its latest working dir at exit"
+ einfo ""
+ einfo "# Midnight Commander chdir enhancement"
+ einfo "if [ -f /usr/share/mc/mc.gentoo ]; then"
+ einfo " . /usr/share/mc/mc.gentoo"
+ einfo "fi"
+}