summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2006-11-22 20:24:28 +0000
committerAlin Năstac <mrness@gentoo.org>2006-11-22 20:24:28 +0000
commit9577a95fe48c376d21b169d8a0d8ab8547c0ae31 (patch)
treed97893972df27bbab833a0f8302d6f13573934e2 /net-dialup/mingetty
parentAdded the comment, forgot the actual change. (diff)
downloadhistorical-9577a95fe48c376d21b169d8a0d8ab8547c0ae31.tar.gz
historical-9577a95fe48c376d21b169d8a0d8ab8547c0ae31.tar.bz2
historical-9577a95fe48c376d21b169d8a0d8ab8547c0ae31.zip
Added support for Unicode, thanks to Vince C. <vcadet@hotmail.com> who ported the Suse patch (#123270).
Package-Manager: portage-2.1.1-r1
Diffstat (limited to 'net-dialup/mingetty')
-rw-r--r--net-dialup/mingetty/ChangeLog9
-rw-r--r--net-dialup/mingetty/Manifest25
-rw-r--r--net-dialup/mingetty/files/digest-mingetty-1.07-r13
-rw-r--r--net-dialup/mingetty/files/mingetty-1.07-utf8.patch156
-rw-r--r--net-dialup/mingetty/mingetty-1.07-r1.ebuild29
5 files changed, 214 insertions, 8 deletions
diff --git a/net-dialup/mingetty/ChangeLog b/net-dialup/mingetty/ChangeLog
index 4cf07c04cc5d..ddd4c860905d 100644
--- a/net-dialup/mingetty/ChangeLog
+++ b/net-dialup/mingetty/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dialup/mingetty
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/mingetty/ChangeLog,v 1.38 2006/11/18 12:08:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/mingetty/ChangeLog,v 1.39 2006/11/22 20:24:28 mrness Exp $
+
+*mingetty-1.07-r1 (22 Nov 2006)
+
+ 22 Nov 2006; Alin Nastac <mrness@gentoo.org>
+ +files/mingetty-1.07-utf8.patch, +mingetty-1.07-r1.ebuild:
+ Added support for Unicode, thanks to Vince C. <vcadet@hotmail.com> who
+ ported the Suse patch (#123270).
*mingetty-1.07 (18 Nov 2006)
diff --git a/net-dialup/mingetty/Manifest b/net-dialup/mingetty/Manifest
index 1bec0bd23ca9..206744e30259 100644
--- a/net-dialup/mingetty/Manifest
+++ b/net-dialup/mingetty/Manifest
@@ -1,15 +1,23 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX mingetty-1.07-utf8.patch 4181 RMD160 20ce4ba325f79260eb2de521130bbf4a461dbfac SHA1 e8e2c638f0eae5441b39bfdce2de247cab9312da SHA256 3d81e4e4cf5645e3e3e89728c0df1f1b628e91873edc993a03d958dd5e10bbed
+MD5 23f659887c21005ab5da75041bf872d6 files/mingetty-1.07-utf8.patch 4181
+RMD160 20ce4ba325f79260eb2de521130bbf4a461dbfac files/mingetty-1.07-utf8.patch 4181
+SHA256 3d81e4e4cf5645e3e3e89728c0df1f1b628e91873edc993a03d958dd5e10bbed files/mingetty-1.07-utf8.patch 4181
DIST mingetty-1.07.tar.gz 13435 RMD160 91d03c8a704af754137a6b61260c9925e602a121 SHA1 20e67224870b480813d5624cc67d5d19a633bd55 SHA256 f84dff06f1b0f449794c7b59be81128624f233dec049b48668457875935f871d
+EBUILD mingetty-1.07-r1.ebuild 850 RMD160 332c5e314510a516448d9f966fa46ce29e0d734e SHA1 f87c8c9e0db532631034300bce82c364bdecbb80 SHA256 6ad5fc687b1d3ca7fe4eb760dc8b8d695c775d44c152a207bf4fbd0c70eb6986
+MD5 b86d2b75c439e9dfd9617f006325f887 mingetty-1.07-r1.ebuild 850
+RMD160 332c5e314510a516448d9f966fa46ce29e0d734e mingetty-1.07-r1.ebuild 850
+SHA256 6ad5fc687b1d3ca7fe4eb760dc8b8d695c775d44c152a207bf4fbd0c70eb6986 mingetty-1.07-r1.ebuild 850
EBUILD mingetty-1.07.ebuild 737 RMD160 5716b3ec6cca32d4ae3f6317764ec53e3b2633d1 SHA1 d78d03b29a8b7639d24fb21eee1875b9d450af3e SHA256 c891b2cdddb3a57f8589ba0bccb5f7b05b77c1f3bd73cb1ffe2b3e9f4f7c05ee
MD5 ba283609fea932bb26c2f3a72cf0dd73 mingetty-1.07.ebuild 737
RMD160 5716b3ec6cca32d4ae3f6317764ec53e3b2633d1 mingetty-1.07.ebuild 737
SHA256 c891b2cdddb3a57f8589ba0bccb5f7b05b77c1f3bd73cb1ffe2b3e9f4f7c05ee mingetty-1.07.ebuild 737
-MISC ChangeLog 4794 RMD160 299239b56b7da64123a3a775df58589b2cc9f0bb SHA1 29863064d1f1cf1a9121e671f88ffa83ef90fae1 SHA256 78a6fc552d6748c5dc1db86d3f4f8c0234e72970df48d1b4278d538d8c9541de
-MD5 d1626057386d1f341ac64d0842aa0a1f ChangeLog 4794
-RMD160 299239b56b7da64123a3a775df58589b2cc9f0bb ChangeLog 4794
-SHA256 78a6fc552d6748c5dc1db86d3f4f8c0234e72970df48d1b4278d538d8c9541de ChangeLog 4794
+MISC ChangeLog 5044 RMD160 f45b17974fc9699caf8bba406bc8f0bff4c636a7 SHA1 0c12e2f025fb9b45b622d435e374b70b3e1ddd85 SHA256 cb004ecd0fd0c0e95b4c2232e379859941a788147aa3cd901c83bab1e3b95e6e
+MD5 35f224c556aa58d96b4eefe7d0817f21 ChangeLog 5044
+RMD160 f45b17974fc9699caf8bba406bc8f0bff4c636a7 ChangeLog 5044
+SHA256 cb004ecd0fd0c0e95b4c2232e379859941a788147aa3cd901c83bab1e3b95e6e ChangeLog 5044
MISC metadata.xml 389 RMD160 bfaa697a02d5ddbee8311d4bef068463b0438fc6 SHA1 5cda19fc7e05fa86e0f1cfada887749265f358e3 SHA256 b74ffab9c3e426a61783e39c7250102761fa842ebba3e182ba82be5113ae293f
MD5 acdb7765fc8608543c8f2b6812f1f061 metadata.xml 389
RMD160 bfaa697a02d5ddbee8311d4bef068463b0438fc6 metadata.xml 389
@@ -17,10 +25,13 @@ SHA256 b74ffab9c3e426a61783e39c7250102761fa842ebba3e182ba82be5113ae293f metadata
MD5 61d05c95fff576534e4004b1af8c7a7d files/digest-mingetty-1.07 238
RMD160 6a0d61789728e2a078303090d68c37bc67951958 files/digest-mingetty-1.07 238
SHA256 fd3f8dda5fdd0dfb6601091a597d6718a1d872b282a459c2afc669b3d44e2d88 files/digest-mingetty-1.07 238
+MD5 61d05c95fff576534e4004b1af8c7a7d files/digest-mingetty-1.07-r1 238
+RMD160 6a0d61789728e2a078303090d68c37bc67951958 files/digest-mingetty-1.07-r1 238
+SHA256 fd3f8dda5fdd0dfb6601091a597d6718a1d872b282a459c2afc669b3d44e2d88 files/digest-mingetty-1.07-r1 238
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
-iD8DBQFFXvfa3sf9c6kjmR8RAgnZAJ47UU375LYQ9cZFZ8jDGXQoCTbleACePGl9
-EaFqzVw9JUbNxse+Q9/NAbI=
-=ccCR
+iD8DBQFFZLIK3sf9c6kjmR8RAgj1AKCkps4Lu7dD92BvjzVMG3IJMKzZVwCfe2rF
+cDU6fBuxQZrHDszuUIFqHMc=
+=Sk2v
-----END PGP SIGNATURE-----
diff --git a/net-dialup/mingetty/files/digest-mingetty-1.07-r1 b/net-dialup/mingetty/files/digest-mingetty-1.07-r1
new file mode 100644
index 000000000000..991e29edb540
--- /dev/null
+++ b/net-dialup/mingetty/files/digest-mingetty-1.07-r1
@@ -0,0 +1,3 @@
+MD5 72e4bce381908556ede9c3f959d1ca7a mingetty-1.07.tar.gz 13435
+RMD160 91d03c8a704af754137a6b61260c9925e602a121 mingetty-1.07.tar.gz 13435
+SHA256 f84dff06f1b0f449794c7b59be81128624f233dec049b48668457875935f871d mingetty-1.07.tar.gz 13435
diff --git a/net-dialup/mingetty/files/mingetty-1.07-utf8.patch b/net-dialup/mingetty/files/mingetty-1.07-utf8.patch
new file mode 100644
index 000000000000..29d147629c1b
--- /dev/null
+++ b/net-dialup/mingetty/files/mingetty-1.07-utf8.patch
@@ -0,0 +1,156 @@
+diff -Nru mingetty-1.07.orig/mingetty.c mingetty-1.07/mingetty.c
+--- mingetty-1.07.orig/mingetty.c 2004-01-03 15:15:56.000000000 +0200
++++ mingetty-1.07/mingetty.c 2006-11-22 22:13:26.967910100 +0200
+@@ -16,10 +16,15 @@
+ * - autologin only at first login
+ * - /etc/mingetty.conf that can be used instead of /etc/inittab for
+ * command line options
+- * - Can UTF-8 setup be done within mingetty?
++ * - Can UTF-8 setup be done within mingetty? Let's try now :-) (VinzC)
+ * - Also add /bin/login-type functionality in here?
+ */
+
++/* Additional comments: Vincent Cadet <vcadet@hotmail.com> (2006-11-21)
++ * - Attempt to make mingetty support UTF-8. Modifications were imported
++ * from Suse migetty.c 0.9.6s.
++ */
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -39,6 +44,19 @@
+ #include <syslog.h>
+ #include <sys/utsname.h>
+ #include <time.h>
++#include <locale.h>
++#include <iconv.h>
++#include <wctype.h>
++#include <sys/kd.h>
++#include <sys/ttydefaults.h>
++
++#ifndef IUTF8
++# ifndef ASM_IUTF8
++# error ASM_IUTF8 input flag not defined - Cannot define IUTF8
++# else
++# define IUTF8 ASM_IUTF8
++# endif
++#endif
+
+ /* name of this program (argv[0]) */
+ static char *progname;
+@@ -74,6 +92,8 @@
+ static int priority = 0;
+ /* automatic login with this user */
+ static char *autologin = NULL;
++/* terminal mode */
++static int mode = K_RAW;
+
+ /* error() - output error messages */
+ static void error (const char *fmt, ...)
+@@ -187,10 +207,21 @@
+ if (fd > 2)
+ close (fd);
+
++ /* Detect mode of current keyboard setup, e.g. for UTF-8 */
++ if (ioctl(0, KDGKBMODE, &mode) < 0)
++ mode = K_RAW;
++
+ /* Write a reset string to the terminal. This is very linux-specific
+ and should be checked for other systems. */
+ if (noclear == 0)
+- write (0, "\033c", 2);
++ /* don't write a full reset (ESC c) because this leaves the
++ unicode mode again if the terminal was in unicode mode
++ and also undos the ESC sequences in CONSOLE_MAGIC which
++ are needed for some languages/console-fonts.
++ Just put the cursor to the home position (ESC [ H),
++ erase everything below the cursor (ESC [ J), and set the
++ scrolling region to the full window (ESC [ r) */
++ write (0, "\033[r\033[H\033[J", 9);
+
+ sigaction (SIGHUP, &sa_old, NULL);
+ }
+@@ -292,32 +323,75 @@
+
+ static char *get_logname (void)
+ {
+- static char logname[40];
++ static char logname[4*UT_NAMESIZE];
+ char *bp;
+ unsigned char c;
++ int ascii;
++ iconv_t ic;
+
+ tcflush (0, TCIFLUSH); /* flush pending input */
++
++ /* Check for UTF-8 mode */
++ switch(mode) {
++ case K_UNICODE:
++ ascii = 0;
++ setlocale(LC_CTYPE, "en_US.UTF-8");
++ break;
++ case K_RAW:
++ case K_MEDIUMRAW:
++ case K_XLATE:
++ default:
++ ascii = 1;
++ setlocale(LC_CTYPE, "POSIX");
++ break;
++ }
++
+ for (*logname = 0; *logname == 0;) {
+ do_prompt (1);
+ for (bp = logname;;) {
+ if (read (0, &c, 1) < 1) {
+- if (errno == EINTR || errno == EIO
+- || errno == ENOENT)
++ if (errno == EINTR || errno == EAGAIN) {
++ usleep(1000);
++ continue;
++ }
++ if (errno == EIO || errno == ENOENT)
+ exit (EXIT_SUCCESS);
+ error ("%s: read: %s", tty, strerror (errno));
+ }
+ if (c == '\n' || c == '\r') {
+ *bp = 0;
+ break;
+- } else if (!isprint (c))
+- error ("%s: invalid character 0x%x in login"
+- " name", tty, c);
++ }
++
++ if (ascii && !isprint (c))
++ error ("%s: invalid character 0x%x in login name", tty, c);
+ else if ((size_t)(bp - logname) >= sizeof (logname) - 1)
+ error ("%s: too long login name", tty);
+- else
+- *bp++ = c;
++
++ *bp++ = c;
+ }
+ }
++
++ if (!ascii && (ic = iconv_open("WCHAR_T", "UTF-8"))) {
++ char tmpbuf[4*sizeof(logname)], *op, *lp;
++ size_t len = bp - logname;
++ size_t out = sizeof(tmpbuf) - 1;
++ size_t wcl;
++ wint_t *wcp;
++
++ op = tmpbuf;
++ lp = logname;
++ if ((wcl = iconv(ic , &lp, &len, &op, &out)) == (size_t)-1)
++ error ("%s: invalid character conversion for login name", tty);
++ iconv_close(ic);
++
++ wcp = (wint_t*)tmpbuf;
++ wcp[wcl] = (wint_t)0;
++ while (*wcp) {
++ if (!iswprint(*wcp++))
++ error ("%s: invalid character for login name found", tty);
++ }
++ }
+ return logname;
+ }
+
diff --git a/net-dialup/mingetty/mingetty-1.07-r1.ebuild b/net-dialup/mingetty/mingetty-1.07-r1.ebuild
new file mode 100644
index 000000000000..0dbcdf3d7ac2
--- /dev/null
+++ b/net-dialup/mingetty/mingetty-1.07-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/mingetty/mingetty-1.07-r1.ebuild,v 1.1 2006/11/22 20:24:28 mrness Exp $
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A compact getty program for virtual consoles only."
+HOMEPAGE="http://sourceforge.net/projects/mingetty"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="unicode"
+
+src_unpack() {
+ unpack ${A}
+
+ use unicode && epatch "${FILESDIR}"/${P}-utf8.patch
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -Wall -W -pipe -D_GNU_SOURCE" CC="$(tc-getCC)" || die "compile failed"
+}
+
+src_install () {
+ dodir /sbin /usr/share/man/man8
+ emake DESTDIR="${D}" install || die "install failed"
+}