rpms/jwhois/FC-6 jwhois-3.2.3-idn.patch, NONE, 1.1 jwhois.spec, 1.29, 1.30 jwhois-3.2.2-afrinic.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Oct 31 17:01:10 UTC 2006
Author: mitr
Update of /cvs/dist/rpms/jwhois/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv6405
Modified Files:
jwhois.spec
Added Files:
jwhois-3.2.3-idn.patch
Removed Files:
jwhois-3.2.2-afrinic.patch
Log Message:
* Tue Oct 31 2006 Miloslav Trmac <mitr at redhat.com> - 3.2.3-7
- Backport IDN support
Resolves: #205033
- Update to upstream config as of Oct 31 2006
jwhois-3.2.3-idn.patch:
configure.in | 25 ++++++++++++++++++++++++-
src/Makefile.am | 2 +-
src/jwhois.c | 19 +++++++++++++++++--
3 files changed, 42 insertions(+), 4 deletions(-)
--- NEW FILE jwhois-3.2.3-idn.patch ---
--- jwhois-3.2.3/configure.in.idn 2005-07-09 20:47:12.000000000 +0200
+++ jwhois-3.2.3/configure.in 2006-10-31 17:13:39.000000000 +0100
@@ -117,9 +117,32 @@
AC_CHECK_FUNCS(memcpy strtol)
AC_CHECK_FUNCS(strcasecmp strncasecmp getopt_long)
AC_HEADER_STDC([])
-AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h)
+AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h)
AC_HEADER_TIME
+
+AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
+ [Support IDN (needs GNU Libidn)]),
+ libidn=$withval, libidn=yes)
+ if test "$libidn" != "no"; then
+ if test "$libidn" != "yes"; then
+ LDFLAGS="${LDFLAGS} -L$libidn/lib"
+ CPPFLAGS="${CPPFLAGS} -I$libidn/include"
+ fi
+ AC_CHECK_HEADER(idna.h,
+ AC_CHECK_LIB(idn, stringprep_check_version,
+ [libidn=yes LIBS="${LIBS} -lidn"], libidn=no),
+ libidn=no)
+ fi
+ if test "$libidn" != "no" ; then
+ AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
+ else
+ AC_MSG_WARN([Libidn not found])
+fi
+AC_MSG_CHECKING([if Libidn should be used])
+AC_MSG_RESULT($libidn)
+
+
found=no
if test x$cache = xyes; then
AC_CHECK_FUNC(dbm_open,
--- jwhois-3.2.3/src/jwhois.c.idn 2005-01-15 17:10:14.000000000 +0100
+++ jwhois-3.2.3/src/jwhois.c 2006-10-31 17:15:00.000000000 +0100
@@ -53,6 +53,10 @@
#include <string.h>
+#ifdef LIBIDN
+# include <idna.h>
+#endif
+
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(s) gettext(s)
@@ -65,8 +69,8 @@
int
main(int argc, char **argv)
{
- int optind, count = 0, ret;
- char *qstring = NULL, *text, *cachestr;
+ int optind, count = 0, ret, rc = 0;
+ char *qstring = NULL, *text, *cachestr, *idn;
struct s_whois_query wq;
#ifdef ENABLE_NLS
@@ -106,7 +110,18 @@
optind++;
}
qstring[strlen(qstring)-1] = '\0';
+#ifdef LIBIDN
+ rc = idna_to_ascii_lz(qstring, &idn, 0);
+ if (rc != IDNA_SUCCESS)
+ {
+ printf("[IDN encoding of '%s' failed with error code %d]\n", qstring, rc);
+ exit(1);
+ }
+ wq.query = strdup(idn);
+ free(idn);
+#else
wq.query = qstring;
+#endif
if (ghost)
{
--- jwhois-3.2.3/src/Makefile.am.idn 2005-07-09 20:00:42.000000000 +0200
+++ jwhois-3.2.3/src/Makefile.am 2006-10-31 17:15:50.000000000 +0100
@@ -23,7 +23,7 @@
getopt.c getopt1.c jconfig.c string.c cache.c rwhois.c jwhois.c \
whois.c http.c
-jwhois_LIBS = @LIBINTL@ @LIBS@
+jwhois_LIBS = @LIBINTL@ @LIBICONV@ @LIBS@
jwhois_CFLAGS = $(OLDCFLAGS) -DSYSCONFDIR="\"$(sysconfdir)\"" \
-DLOCALSTATEDIR="\"$(localstatedir)\"" \
Index: jwhois.spec
===================================================================
RCS file: /cvs/dist/rpms/jwhois/FC-6/jwhois.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- jwhois.spec 12 Jul 2006 06:35:43 -0000 1.29
+++ jwhois.spec 31 Oct 2006 17:01:03 -0000 1.30
@@ -1,20 +1,21 @@
Name: jwhois
Version: 3.2.3
-Release: 6.1
+Release: 7%{?dist}
URL: http://www.gnu.org/software/jwhois/
Source0: ftp://ftp.gnu.org/gnu/jwhois/jwhois-%{version}.tar.gz
Source1: ftp://ftp.gnu.org/gnu/jwhois/jwhois-%{version}.tar.gz.sig
Patch0: jwhois-3.2.3-config-cvs.patch
-Patch1: jwhois-3.2.2-afrinic.patch
-Patch2: jwhois-3.2.2-ru.patch
-Patch3: jwhois-3.2.3-sigpipe.patch
-Patch4: jwhois-3.2.3-ipv6.patch
-Patch5: jwhois-3.2.3-uninitialized.patch
+Patch1: jwhois-3.2.2-ru.patch
+Patch2: jwhois-3.2.3-sigpipe.patch
+Patch3: jwhois-3.2.3-ipv6.patch
+Patch4: jwhois-3.2.3-uninitialized.patch
+Patch5: jwhois-3.2.3-idn.patch
License: GPL
Group: Applications/Internet
Summary: Internet whois/nicname client.
Buildroot: %{_tmppath}/%{name}-%{version}-root
Obsoletes: fwhois, whois
+BuildRequires: autoconf automake libidn-devel
Prereq: /sbin/install-info
%description
@@ -23,16 +24,18 @@
%prep
%setup -q
%patch0 -p0 -b .config
-%patch1 -p1 -b .afrinic
-%patch2 -p1 -b .ru
-%patch3 -p1 -b .sigpipe
-%patch4 -p1 -b .ipv6
-%patch5 -p1 -b .uninitialized
+%patch1 -p1 -b .ru
+%patch2 -p1 -b .sigpipe
+%patch3 -p1 -b .ipv6
+%patch4 -p1 -b .uninitialized
+%patch5 -p1 -b .idn
iconv -f iso-8859-1 -t utf-8 < doc/sv/jwhois.1 > doc/sv/jwhois.1_
mv doc/sv/jwhois.1_ doc/sv/jwhois.1
%build
+autoreconf # For jwhois-3.2.3-idn.patch
+
%configure --without-cache
make
@@ -67,6 +70,11 @@
[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT
%changelog
+* Tue Oct 31 2006 Miloslav Trmac <mitr at redhat.com> - 3.2.3-7
+- Backport IDN support
+ Resolves: #205033
+- Update to upstream config as of Oct 31 2006
+
* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 3.2.3-6.1
- rebuild
--- jwhois-3.2.2-afrinic.patch DELETED ---
More information about the fedora-cvs-commits
mailing list