Hello community,
here is the log from the commit of package perl-Text-Iconv for openSUSE:Factory
checked in at Sat Jan 9 11:51:42 CET 2010.
--------
--- perl-Text-Iconv/perl-Text-Iconv.changes 2006-01-25 21:39:59.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-Text-Iconv/perl-Text-Iconv.changes 2009-08-27 14:52:18.000000000 +0200
@@ -1,0 +2,25 @@
+Tue Jul 28 09:46:52 CEST 2009 - coolo@novell.com
+
+- merge factory and build service package
+
+-------------------------------------------------------------------
+Wed Jul 15 10:59:36 CEST 2009 - chris@computersalat.de
+
+- added perl-macros
+ o autogen filelist with perl_gen_filelist
+- spec mods
+ o added header
+
+-------------------------------------------------------------------
+Tue Jun 2 09:27:15 CEST 2009 - lars@linux-schulserver.de
+
+- update to version 1.7
+ * Output buffer was always initialized to 5 bytes--this was
+ just for testing, but I'd forgotten to revert back to the
+ original code (detected via a bug report by Aldo LeTellier).
+ * Added get_attr() and set_attr() methods. They provide an
+ interface to the iconvctl() function of GNU libiconv.
+ * In Iconv.xs, moved the variable declarations in
+ ti_set_attr() and ti_get_attr() into the PREINIT: section.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
Text-Iconv-1.4.tar.bz2
New:
----
Text-Iconv-1.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-Iconv.spec ++++++
--- /var/tmp/diff_new_pack.K7F9X6/_old 2010-01-09 11:51:36.000000000 +0100
+++ /var/tmp/diff_new_pack.K7F9X6/_new 2010-01-09 11:51:36.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package perl-Text-Iconv (Version 1.4)
+# spec file for package perl-Text-Iconv (Version 1.7)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,48 +19,52 @@
Name: perl-Text-Iconv
-License: Artistic License
+%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
+Summary: Perl interface to iconv() codeset conversion function
+Version: 1.7
+Release: 1
+License: Artistic
Group: Development/Libraries/Perl
-Requires: perl = %{perl_version}
-AutoReqProv: on
-Summary: Iconv interface for text recoding
-Version: 1.4
-Release: 135
-Source: Text-Iconv-%{version}.tar.bz2
+Url: http://search.cpan.org/dist/Text-Iconv
+Source: %{cpan_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: perl
+BuildRequires: perl-macros
+Requires: perl = %{perl_version}
%description
-The UNIX iconv interface for perl.
+The Text::Iconv module provides a Perl interface to the iconv() function as
+defined by the Single UNIX Specification.
+The convert() method converts the encoding of characters in the input string
+from the fromcode codeset to the tocode codeset, and returns the result.
-
-Authors:
---------
- Michael Piotrowski
+Settings of fromcode and tocode and their permitted combinations are
+implementation-dependent. Valid values are specified in the system
+documentation; the iconv(1) utility should also provide a -l option that lists
+all supported codesets.
%prep
-%setup -n Text-Iconv-%{version}
-%define perl_site %(TMP=%{perl_sitearch}; echo ${TMP%/*})
+%setup -q -n %{cpan_name}-%{version}
%build
-perl Makefile.PL
-make
-make test
+perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
+%{__make}
+
+%check
+%{__make} test
%install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install_vendor
+%perl_make_install
%perl_process_packlist
+%perl_gen_filelist
%clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf $RPM_BUILD_ROOT
-%files
-%defattr(-,root,root)
-%doc MANIFEST Changes README
-%{perl_vendorarch}/auto/Text
-%{perl_vendorarch}/Text
-%{_mandir}/man3/Text::Iconv.3pm.gz
-/var/adm/perl-modules/perl-Text-Iconv
+%files -f %{name}.files
+# normally you only need to check for doc files
+%defattr(-,root,root,)
+%doc Changes README
%changelog
++++++ Text-Iconv-1.4.tar.bz2 -> Text-Iconv-1.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/Changes new/Text-Iconv-1.7/Changes
--- old/Text-Iconv-1.4/Changes 2004-07-18 00:18:45.000000000 +0200
+++ new/Text-Iconv-1.7/Changes 2007-10-17 16:14:41.000000000 +0200
@@ -33,3 +33,25 @@
- Reset shift state for state-dependent conversions.
- Makefile.PL now passes all options besides LIBS and INC to
MakeMaker, so options like INSTALLDIRS=vendor work again.
+
+1.5 Thu Aug 30 14:42:08 CEST 2007
+ - Various small changes to make Text::Iconv compile on OpenVMS
+ (based on a patch by Peter (Stig) Edwards)
+ - Output buffer was always initialized to 5 bytes--this was
+ just for testing, but I'd forgotten to revert back to the
+ original code (detected via a bug report by Aldo LeTellier).
+
+1.6 Sat Oct 13 00:16:30 CEST 2007
+ - Makefile.PL now uses File::Spec to portably specify the null
+ device. This should make it possible to build Text::Iconv
+ on Windows "out of the box".
+ - Added get_attr() and set_attr() methods. They provide an
+ interface to the iconvctl() function of GNU libiconv.
+
+1.7 Wed Oct 17 15:49:56 CEST 2007
+ - Makefile.PL now explicitly declares "use 5.006;" since it
+ uses functionality like delete() for array elements.
+ - In Iconv.xs, moved the variable declarations in
+ ti_set_attr() and ti_get_attr() into the PREINIT: section.
+ This makes it possible to compile it using gcc 2.96.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/Iconv.pm new/Text-Iconv-1.7/Iconv.pm
--- old/Text-Iconv-1.4/Iconv.pm 2004-07-18 00:25:46.000000000 +0200
+++ new/Text-Iconv-1.7/Iconv.pm 2007-10-17 16:14:22.000000000 +0200
@@ -1,6 +1,6 @@
package Text::Iconv;
-# @(#) $Id: Iconv.pm,v 1.6 2004/07/17 22:25:46 mxp Exp $
-# Copyright (c) 2004 Michael Piotrowski
+# @(#) $Id: Iconv.pm,v 1.10 2007/10/17 14:14:22 mxp Exp $
+# Copyright (c) 2007 Michael Piotrowski
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
@@ -16,7 +16,7 @@
@EXPORT_OK = qw(
convert
);
-$VERSION = '1.4';
+$VERSION = '1.7';
bootstrap Text::Iconv $VERSION;
@@ -41,31 +41,73 @@
=head1 DESCRIPTION
The BText::Iconv module provides a Perl interface to the iconv()
-function as defined by the Single UNIX Specification. The convert()
-method converts the encoding of characters in the input string from
-the I<fromcode> codeset to the I<tocode> codeset, and returns the
-result.
+function as defined by the Single UNIX Specification.
+
+The convert() method converts the encoding of characters in the input
+string from the I<fromcode> codeset to the I<tocode> codeset, and
+returns the result.
Settings of I<fromcode> and I<tocode> and their permitted combinations
are implementation-dependent. Valid values are specified in the
-system documentation
+system documentation; the iconv(1) utility should also provide a B<-l>
+option that lists all supported codesets.
+
+=head2 Utility methods
+
+BText::Iconv objects also provide the following methods:
+
+retval() returns the return value of the underlying iconv() function
+for the last conversion; according to the Single UNIX Specification,
+this value indicates "the number of non-identical conversions
+performed." Note, however, that iconv implementations vary widely in
+the interpretation of this specification.
-As an experimental feature, this version of BText::Iconv objects
-provide the retval() method:
+This method can be called after calling convert(), e.g.:
$result = $converter->convert("lorem ipsum dolor sit amet");
$retval = $converter->retval;
-This method can be called after calling convert(). It returns the
-return value of the underlying iconv() function for the last
-conversion; according to the Single UNIX Specification, this value
-indicates "the number of non-identical conversions performed." Note,
-however, that iconv implementations vary widely in the interpretation
-of this specification.
-
When called before the first call to convert(), or if an error occured
during the conversion, retval() returns B<undef>.
+get_attr(): This method is only available with GNU libiconv, otherwise
+it throws an exception. The get_attr() method allows you to query
+various attributes which influence the behavior of convert(). The
+currently supported attributes are I<trivialp>, I<transliterate>, and
+I, e.g.:
+
+ $state = $converter->get_attr("transliterate");
+
+See iconvctl(3) for details. To ensure portability to other iconv
+implementations you should first check for the availability of this
+method using B, e.g.:
+
+ eval { $conv->get_attr("trivialp") };
+ if ($@)
+ {
+ # get_attr() is not available
+ }
+ else
+ {
+ # get_attr() is available
+ }
+
+This method should be considered experimental.
+
+set_attr(): This method is only available with GNU libiconv, otherwise
+it throws an exception. The set_attr() method allows you to set
+various attributes which influence the behavior of convert(). The
+currently supported attributes are I<transliterate> and
+I, e.g.:
+
+ $state = $converter->set_attr("transliterate");
+
+See iconvctl(3) for details. To ensure portability to other iconv
+implementations you should first check for the availability of this
+method using B, cf. the description of set_attr() above.
+
+This method should be considered experimental.
+
=head1 ERRORS
If the conversion can't be initialized an exception is raised (using
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/Iconv.xs new/Text-Iconv-1.7/Iconv.xs
--- old/Text-Iconv-1.4/Iconv.xs 2004-07-18 00:08:50.000000000 +0200
+++ new/Text-Iconv-1.7/Iconv.xs 2007-10-17 16:06:22.000000000 +0200
@@ -1,6 +1,6 @@
-/* $Id: Iconv.xs,v 1.12 2004/07/17 22:08:50 mxp Exp $ */
-/* XSUB for Perl module Text::Iconv */
-/* Copyright (c) 2004 Michael Piotrowski */
+/* $Id: Iconv.xs,v 1.15 2007/10/17 14:06:22 mxp Exp $ */
+/* XSUB for Perl module Text::Iconv */
+/* Copyright (c) 2007 Michael Piotrowski */
#ifdef __cplusplus
extern "C" {
@@ -21,14 +21,22 @@
{
iconv_t handle; /* iconv handle (returned by iconv_open()) */
SV *retval; /* iconv() return value (according to the Single UNIX
- Specification, "the number of non-identical
- conversions performed") */
+ Specification, "the number of non-identical
+ conversions performed") */
SV *raise_error; /* Per-object flag controlling whether exceptions
are to be thrown */
};
/*****************************************************************************/
+static int
+not_here(s)
+char *s;
+{
+ croak("%s not implemented on this architecture", s);
+ return -1;
+}
+
static int raise_error = 0;
/* Macro for checking when to throw an exception for use in the
@@ -43,8 +51,8 @@
char *ibuf; /* char* to the content of SV *string */
char *obuf; /* temporary output buffer */
size_t inbytesleft; /* no. of bytes left to convert; initially
- this is the length of the input string,
- and 0 when the conversion has finished */
+ this is the length of the input string,
+ and 0 when the conversion has finished */
size_t outbytesleft; /* no. of bytes in the output buffer */
size_t l_obuf; /* length of the output buffer */
char *icursor; /* current position in the input buffer */
@@ -86,7 +94,7 @@
}
else
{
- outbytesleft = 5; /* 2 * inbytesleft; */
+ outbytesleft = 2 * inbytesleft;
}
l_obuf = outbytesleft;
@@ -106,59 +114,59 @@
while(inbytesleft != 0)
{
-#if (defined(__hpux) || defined(__linux)) && ! defined(_LIBICONV_VERSION)
+#if (defined(__hpux) || defined(__linux) || defined(VMS)) && ! defined(_LIBICONV_VERSION)
/* Even in HP-UX 11.00, documentation and header files do not agree */
/* glibc doesn't seem care too much about standards */
ret = iconv(obj->handle, &icursor, &inbytesleft,
- &ocursor, &outbytesleft);
+ &ocursor, &outbytesleft);
#else
ret = iconv(obj->handle, (const char **)&icursor, &inbytesleft,
- &ocursor, &outbytesleft);
+ &ocursor, &outbytesleft);
#endif
if(ret == (size_t) -1)
{
- obj->retval = &PL_sv_undef;
+ obj->retval = &PL_sv_undef;
- switch(errno)
- {
- case EILSEQ:
- /* Stop conversion if input character encountered which
- does not belong to the input char set */
- if (RAISE_ERROR_P)
- croak("Character not from source char set: %s",
- strerror(errno));
- Safefree(obuf);
- /* INIT_SHIFT_STATE(obj->handle, ocursor, outbytesleft); */
- return(&PL_sv_undef);
- case EINVAL:
- /* Stop conversion if we encounter an incomplete
+ switch(errno)
+ {
+ case EILSEQ:
+ /* Stop conversion if input character encountered which
+ does not belong to the input char set */
+ if (RAISE_ERROR_P)
+ croak("Character not from source char set: %s",
+ strerror(errno));
+ Safefree(obuf);
+ /* INIT_SHIFT_STATE(obj->handle, ocursor, outbytesleft); */
+ return(&PL_sv_undef);
+ case EINVAL:
+ /* Stop conversion if we encounter an incomplete
character or shift sequence */
- if (RAISE_ERROR_P)
- croak("Incomplete character or shift sequence: %s",
- strerror(errno));
- Safefree(obuf);
- return(&PL_sv_undef);
- case E2BIG:
- /* fprintf(stdout, "%s\n", obuf); */
+ if (RAISE_ERROR_P)
+ croak("Incomplete character or shift sequence: %s",
+ strerror(errno));
+ Safefree(obuf);
+ return(&PL_sv_undef);
+ case E2BIG:
+ /* fprintf(stdout, "%s\n", obuf); */
- /* If the output buffer is not large enough, copy the
+ /* If the output buffer is not large enough, copy the
converted bytes to the return string, reset the
output buffer and continue */
- sv_catpvn(perl_str, obuf, l_obuf - outbytesleft);
- ocursor = obuf;
- outbytesleft = l_obuf;
- break;
- default:
- if (RAISE_ERROR_P)
- croak("iconv error: %s", strerror(errno));
- Safefree(obuf);
- return(&PL_sv_undef);
- }
+ sv_catpvn(perl_str, obuf, l_obuf - outbytesleft);
+ ocursor = obuf;
+ outbytesleft = l_obuf;
+ break;
+ default:
+ if (RAISE_ERROR_P)
+ croak("iconv error: %s", strerror(errno));
+ Safefree(obuf);
+ return(&PL_sv_undef);
+ }
}
else
{
- obj->retval = newSViv(ret);
+ obj->retval = newSViv(ret);
}
}
@@ -189,7 +197,7 @@
== (size_t) -1)
{
croak("iconv error (while trying to reset shift state): %s",
- strerror(errno));
+ strerror(errno));
Safefree(obuf);
return(&PL_sv_undef);
}
@@ -203,6 +211,15 @@
return perl_str;
}
+/* */
+
+#if _LIBICONV_VERSION >= 0x0109
+int do_iconvctl(struct tiobj *obj, int request, void *arg)
+{
+ return iconvctl(obj->handle, request, arg);
+}
+#endif
+
typedef struct tiobj Text__Iconv;
/*****************************************************************************/
@@ -233,22 +250,23 @@
if ((handle = iconv_open(tocode, fromcode)) == (iconv_t)-1)
{
- switch(errno)
- {
- case ENOMEM:
- croak("Insufficient memory to initialize conversion: %s",
- strerror(errno));
- case EINVAL:
- croak("Unsupported conversion: %s", strerror(errno));
- default:
- croak("Couldn't initialize conversion: %s", strerror(errno));
- }
+ switch(errno)
+ {
+ case ENOMEM:
+ croak("Insufficient memory to initialize conversion: %s",
+ strerror(errno));
+ case EINVAL:
+ croak("Unsupported conversion from %s to %s: %s",
+ fromcode, tocode, strerror(errno));
+ default:
+ croak("Couldn't initialize conversion: %s", strerror(errno));
+ }
}
Newz(0, obj, 1, Text__Iconv);
if (obj == NULL)
{
- croak("Newz: %s", strerror(errno));
+ croak("Newz: %s", strerror(errno));
}
obj->handle = handle;
@@ -284,10 +302,95 @@
PPCODE:
if (items > 1 && SvIOK(ST(1)))
{
- sv_setiv(self->raise_error, SvIV(ST(1)));
+ sv_setiv(self->raise_error, SvIV(ST(1)));
}
XPUSHs(sv_mortalcopy(self->raise_error));
+#if _LIBICONV_VERSION >= 0x0109
+
+int
+ti_get_attr(self, request)
+ Text::Iconv *self
+ char *request;
+ PREINIT:
+ int reqno;
+ int arg;
+ int err;
+ CODE:
+ if (strEQ(request, "trivialp"))
+ reqno = ICONV_TRIVIALP;
+ else if (strEQ(request, "transliterate"))
+ reqno = ICONV_GET_TRANSLITERATE;
+ else if (strEQ(request, "discard_ilseq"))
+ reqno = ICONV_GET_DISCARD_ILSEQ;
+ else
+ reqno = -1;
+
+ err = do_iconvctl(self, reqno, &arg);
+
+ if (err < 0)
+ RETVAL = err;
+ else
+ RETVAL = arg;
+ OUTPUT:
+ RETVAL
+
+#else
+
+int
+ti_get_attr(self, request)
+ Text::Iconv *self
+ char *request;
+ CODE:
+ not_here("iconvctl (needed for get_attr())");
+ RETVAL = -1;
+ OUTPUT:
+ RETVAL
+
+#endif
+
+#if _LIBICONV_VERSION >= 0x0109
+
+int
+ti_set_attr(self, request, arg)
+ Text::Iconv *self
+ char *request;
+ int arg;
+ PREINIT:
+ int reqno;
+ int err;
+ CODE:
+ if (strEQ(request, "transliterate"))
+ reqno = ICONV_SET_TRANSLITERATE;
+ else if (strEQ(request, "discard_ilseq"))
+ reqno = ICONV_SET_DISCARD_ILSEQ;
+ else
+ reqno = -1;
+
+ err = do_iconvctl(self, reqno, &arg);
+
+ if (err < 0)
+ RETVAL = err;
+ else
+ RETVAL = arg;
+ OUTPUT:
+ RETVAL
+
+#else
+
+int
+ti_set_attr(self, request, arg)
+ Text::Iconv *self
+ char *request;
+ int arg;
+ CODE:
+ not_here("iconvctl (needed for set_attr())");
+ RETVAL = -1;
+ OUTPUT:
+ RETVAL
+
+#endif
+
void
ti_DESTROY(self)
Text::Iconv * self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/MANIFEST new/Text-Iconv-1.7/MANIFEST
--- old/Text-Iconv-1.4/MANIFEST 2000-12-18 00:37:37.000000000 +0100
+++ new/Text-Iconv-1.7/MANIFEST 2007-10-17 16:15:06.000000000 +0200
@@ -7,3 +7,4 @@
typemap
t/00_load.t
t/01_charsets.t
+META.yml Module meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/META.yml new/Text-Iconv-1.7/META.yml
--- old/Text-Iconv-1.4/META.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/Text-Iconv-1.7/META.yml 2007-10-17 16:15:06.000000000 +0200
@@ -0,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: Text-Iconv
+version: 1.7
+version_from: Iconv.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/Makefile.PL new/Text-Iconv-1.7/Makefile.PL
--- old/Text-Iconv-1.4/Makefile.PL 2004-07-18 00:16:55.000000000 +0200
+++ new/Text-Iconv-1.7/Makefile.PL 2007-10-17 16:06:22.000000000 +0200
@@ -1,10 +1,13 @@
-# @(#) $Id: Makefile.PL,v 1.6 2004/07/17 22:16:55 mxp Exp $
+# @(#) $Id: Makefile.PL,v 1.9 2007/10/17 14:06:22 mxp Exp $
+use 5.006;
use ExtUtils::MakeMaker;
use Config;
+use File::Spec;
my %config;
my $ok;
+my $devnull = File::Spec->devnull();
###############################################################################
# Read settings from the commandline
@@ -79,17 +82,17 @@
# Write the makefile
WriteMakefile(
- 'NAME' => 'Text::Iconv',
- 'VERSION_FROM' => 'Iconv.pm', # finds $VERSION
- 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'Iconv.pm', # retrieve abstract from module
- AUTHOR => 'Michael Piotrowski ') : ()),
- 'LIBS' => $config{LIBS},
- 'DEFINE' => "@DEFINE",
- 'INC' => $config{INC},
- 'dist' => {COMPRESS => 'gzip', SUFFIX => 'gz'},
-);
+ 'NAME' => 'Text::Iconv',
+ 'VERSION_FROM' => 'Iconv.pm', # finds $VERSION
+ 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => 'Iconv.pm', # retrieve abstract from module
+ AUTHOR => 'Michael Piotrowski ') : ()),
+ 'LIBS' => $config{LIBS},
+ 'DEFINE' => "@DEFINE",
+ 'INC' => $config{INC},
+ 'dist' => {COMPRESS => 'gzip', SUFFIX => 'gz'},
+ );
###############################################################################
@@ -98,7 +101,9 @@
my $libs = shift;
my $incs = shift;
- my $file = '.linktest';
+ my $file = 'linktest';
+ my $obj_ext = $Config{_o};
+
my $prog = <
@@ -108,15 +113,43 @@
}
EOT
- my $compile = join ' ', $Config{cc}, $incs, $Config{ccflags},
- $Config{ldflags}, $libs;
- # print "Compiler: $compile\n";
- open LINKTEST, '>', "$file.c" or die "Can't create test file";
+ my $compile;
+
+ unless ($^O eq 'VMS')
+ {
+ # It is admittedly a bit simplistic to simply concatenate all
+ # flags, but it seems to work in most cases.
+ $compile = join ' ', $Config{cc}, $incs, $Config{ccflags},
+ $Config{ldflags}, $libs;
+ }
+ else
+ {
+ $compile = join ' ', $Config{cc}, $incs, $Config{ccflags}, $libs;
+ }
+
+ if (exists $config{verbose})
+ {
+ print "\nCompiler: '$compile'\n";
+ }
+
+ open LINKTEST, '>', "$file.c" or die "Can't create test file '$file.c'.";
print LINKTEST $prog;
close LINKTEST;
- my $result = system("$compile -o $file $file.c $libs 2> /dev/null") / 256;
- unlink $file, "$file.c", "$file.o";
+ my $compile_line = "$compile -o $file $file.c $libs 2> $devnull";
+
+ if ($^O eq 'VMS')
+ {
+ $compile_line = "pipe $compile $file.c $libs 2> NL:";
+ }
+
+ if (exists $config{verbose})
+ {
+ print "\nCompiler command line: '$compile_line'\n";
+ }
+
+ my $result = system($compile_line) / 256;
+ unlink $file, "$file.c", "$file$obj_ext";
if ($result == 0)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/README new/Text-Iconv-1.7/README
--- old/Text-Iconv-1.4/README 2004-07-18 00:13:09.000000000 +0200
+++ new/Text-Iconv-1.7/README 2007-10-13 00:15:42.000000000 +0200
@@ -1,6 +1,6 @@
-Text::Iconv Version 1.4
+Text::Iconv Version 1.6
-Copyright � 2004 Michael Piotrowski. All Rights Reserved.
+Copyright � 2007 Michael Piotrowski. All Rights Reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
@@ -83,15 +83,12 @@
Feedback
--------
-This version of Text::Iconv was tested on HP-UX 11.00 (native and with
-GNU libiconv), NetBSD 1.6.1 (with GNU libiconv), NetBSD 1.6ZK (native
-and with GNU libiconv), FreeBSD 5.1 (with GNU libiconv), Solaris 8,
-Solaris 9, and Linux 2.4.20.
-
-If you are building the module on another platform I would appreciate
-a note to tell me how you got on, especially if you need to specify
-additional libraries, or if none of the codeset identifiers in the
-test scripts are supported.
+Text::Iconv was tested on various platforms and with different iconv
+implementations.
+
+If you built Text::Iconv on a platform where you needed to specify
+additional libraries, or where none of the codeset identifiers in the
+test scripts are supported, please drop me a note.
Thanks
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/t/00_load.t new/Text-Iconv-1.7/t/00_load.t
--- old/Text-Iconv-1.4/t/00_load.t 2000-12-18 00:40:25.000000000 +0100
+++ new/Text-Iconv-1.7/t/00_load.t 2007-10-12 23:36:54.000000000 +0200
@@ -3,3 +3,7 @@
use Text::Iconv;
$loaded = 1;
print "ok 1\n";
+
+### Local variables:
+### mode: perl
+### End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-Iconv-1.4/t/01_charsets.t new/Text-Iconv-1.7/t/01_charsets.t
--- old/Text-Iconv-1.4/t/01_charsets.t 2004-06-28 21:10:48.000000000 +0200
+++ new/Text-Iconv-1.7/t/01_charsets.t 2007-10-12 23:38:01.000000000 +0200
@@ -1,4 +1,5 @@
-# @(#) $Id: 01_charsets.t,v 1.2 2004/06/28 19:10:48 mxp Exp $
+# @(#) $Id: 01_charsets.t,v 1.4 2007/10/12 21:38:01 mxp Exp $
+# -*- encoding: iso-8859-1 -*-
BEGIN { $| = 1; print "1..13\n"; }
END {print "not ok 1\n" unless $loaded;}
@@ -8,16 +9,18 @@
Text::Iconv->raise_error(1);
+# Note: On VMS codepages are found in SYS$I18N_ICONV
+
%codesets = ('iso88591' => [qw(iso88591 iso8859-1 iso-8859-1 ISO88591
- ISO8859-1 ISO-8859-1 88591 8859-1)],
- 'cp037' => [qw(cp037 CP037 ibm037 IBM037 ibm-037 IBM-037)],
- 'cp850' => [qw(cp850 CP850 ibm850 IBM850 ibm-850 IBM-850)],
- 'utf8' => [qw(utf8 utf-8 UTF8 UTF-8)]);
+ ISO8859-1 ISO-8859-1 88591 8859-1)],
+ 'cp037' => [qw(cp037 CP037 ibm037 IBM037 ibm-037 IBM-037)],
+ 'cp850' => [qw(cp850 CP850 ibm850 IBM850 ibm-850 IBM-850)],
+ 'utf8' => [qw(utf8 utf-8 UTF8 UTF-8)]);
%strings = ('iso88591' => "Sch�ne Gr��e",
- 'cp037' => "\xa2\xa4\xa4\x94\x40\x83\xa4\x89\x98\xa4\x85",
- 'cp850' => "Sch\x94ne Gr\x81\xe1e",
- 'utf8' => "Sch\xc3\xb6ne Gr\xc3\xbc\xc3\x9fe");
+ 'cp037' => "\xa2\xa4\xa4\x94\x40\x83\xa4\x89\x98\xa4\x85",
+ 'cp850' => "Sch\x94ne Gr\x81\xe1e",
+ 'utf8' => "Sch\xc3\xb6ne Gr\xc3\xbc\xc3\x9fe");
$test_no = 1;
@@ -27,41 +30,45 @@
{
unless ($source eq $target)
{
- $test_no++;
+ $test_no++;
- $c1 = try_codesets($codesets{$source}, $codesets{$target});
- $c2 = try_codesets($codesets{$target}, $codesets{$source});
+ $c1 = try_codesets($codesets{$source}, $codesets{$target});
+ $c2 = try_codesets($codesets{$target}, $codesets{$source});
- if (not defined $c1 or not defined $c2)
- {
- print "not ok $test_no \t # (call to open_iconv() failed)\n";
- }
- elsif ($c1 == 0 or $c2 == 0)
- {
- print "ok $test_no \t # skip ($source <-> $target conversion not supported by iconv library)\n";
- }
- else
- {
- eval
- {
- $r1 = $c1->convert($strings{$source});
- $r2 = $c2->convert($r1);
- };
-
- if ($@)
- {
- print "not ok $test_no \t # ($source <-> $target conversion failed: $@)\n";
- }
- elsif ($r2 eq $strings{$source})
- {
- print "ok $test_no \t # ($source <-> $target)", $c1->retval, "/", $c2->retval,"\n";
- }
- else
- {
- print "not ok $test_no \t # ($source <-> $target roundtrip failed)\n";
-print $c1->retval, "/", $c2->retval,"\n";
- }
- }
+ if (not defined $c1 or not defined $c2)
+ {
+ print "not ok $test_no \t # (call to open_iconv() failed)\n";
+ }
+ elsif ($c1 == 0 or $c2 == 0)
+ {
+ print "ok $test_no \t ",
+ "# skip ($source <-> $target conversion not supported)\n";
+ }
+ else
+ {
+ eval
+ {
+ $r1 = $c1->convert($strings{$source});
+ $r2 = $c2->convert($r1);
+ };
+
+ if ($@)
+ {
+ print "not ok $test_no \t ",
+ "# ($source <-> $target conversion failed: $@)\n";
+ }
+ elsif ($r2 eq $strings{$source})
+ {
+ print "ok $test_no \t # ($source <-> $target) ",
+ "[", $c1->retval, "/", $c2->retval, "]\n";
+ }
+ else
+ {
+ print "not ok $test_no \t ",
+ "# ($source <-> $target roundtrip failed)",
+ "[", $c1->retval, "/", $c2->retval, "]\n";
+ }
+ }
}
}
}
@@ -85,12 +92,12 @@
{
foreach my $t (@$to)
{
- eval
- {
- $converter = new Text::Iconv($f, $t);
- };
+ eval
+ {
+ $converter = new Text::Iconv($f, $t);
+ };
- last TRY if not $@;
+ last TRY if not $@;
}
}
@@ -107,3 +114,7 @@
return $converter;
}
}
+
+### Local variables:
+### mode: perl
+### End:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org