Sync from SUSE:SLFO:Main uchardet revision 1f6c0e4bcf56caf726d598022cdcb041

This commit is contained in:
Adrian Schröter 2024-05-04 01:34:32 +02:00
commit 67eb9b2f9c
5 changed files with 273 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libuchardet0

BIN
uchardet-0.0.8.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

136
uchardet.changes Normal file
View File

@ -0,0 +1,136 @@
-------------------------------------------------------------------
Fri Dec 23 17:06:18 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 0.0.8:
* New supports:
Norwegian: IBM865, ISO-8859-1, ISO-8859-15 and WINDOWS-1252.
Danish: IBM865.
* Minimum CMake version bumped to 3.1
* Fix build issues for UWP on Windows.
* Add uchardet CLI tool building support for MSVC.
* Various bug fixes and docs/README tweaks.
-------------------------------------------------------------------
Fri Jun 5 11:44:24 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 0.0.7
* New supports:
+ Croatian - ISO-8859-2, ISO-8859-13, ISO-8859-16, IBM852,
Windows-1250 and MAC-CENTRALEUROPE
+ Czech - Windows-1250, ISO-8859-2, IBM852 and
Mac-CentralEurope.
+ Estonian - ISO-8859-4, ISO-8859-13, ISO-8859-13,
Windows-1252 and Windows-1257.
+ Finnish - ISO-8859-1, ISO-8859-4, ISO-8859-9, ISO-8859-13,
ISO-8859-15 and WINDOWS-1252.
+ Irish Gaelic - ISO-8859-1, ISO-8859-9, ISO-8859-15 and
WINDOWS-1252.
+ Italian - ISO-8859-1, ISO-8859-3, ISO-8859-9, ISO-8859-15
and WINDOWS-1252.
+ Latvian - ISO-8859-4, ISO-8859-10 and ISO-8859-13
+ Lithuanian - ISO-8859-4, IISO-8859-10 and SO-8859-13
+ Maltese - ISO-8859-3.
+ Polish - ISO-8859-2, ISO-8859-13, ISO-8859-16,
Windows-1250, IBM852, MAC-CENTRALEUROPE.
+ Portuguese - ISO-8859-1, ISO-8859-9, ISO-8859-15 and
Windows-1252.
+ Romanian - ISO-8859-2, ISO-8859-16, Windows-1250 and
IBM852.
+ Slovak - Windows-1250, ISO-8859-2, IBM852 and
Mac-CentralEurope.
+ Slovene - ISO-8859-2, ISO-8859-16, Windows-1250, IBM852
and MAC-CENTRALEUROPE.
+ Swedish - ISO-8859-1, ISO-8859-4, ISO-8859-9, ISO-8859-15
and WINDOWS-1252.
* EUC-KR now returned as UHC: despite differences, mostly
upward compatible. Let's return UHC until separate detection
machines are implemented.
* uchardet CLI tool now supports the end-of-options -- option
to be able to process any file starting with a dash.
* uchardet_handle_data() API considers an empty string input
as successful processing to improve automatic detection from
random input sources.
* Repository code now requires C++1 standard.
* Several bugs fixed.
-------------------------------------------------------------------
Wed Feb 28 20:22:45 UTC 2018 - dimstar@opensuse.org
- Modernize spec-file by calling spec-cleaner
-------------------------------------------------------------------
Wed Feb 8 23:51:40 UTC 2017 - dimstar@opensuse.org
- Fix Source URL.
-------------------------------------------------------------------
Tue Aug 30 14:05:21 UTC 2016 - virtuousfox@gmail.com
- Update to version 0.0.6:
- Improve ASCII and ISO-8859-1 detection.
- Improve language models: Greek, Hungarian.
- New supports:
* Arabic - ISO-8859-6 and Windows-1256.
* Danish - Windows-1252, ISO-8859-1 and ISO-8859-15.
* Spanish - ISO-8859-1, ISO-8859-15 and Windows-1252.
* Vietnamese - VISCII and Windows-1258.
- Improve single-byte encoding detection algorithm by giving more weight
to "probable" sequences (less frequent than "positive" sequence, yet
not "negative").
- `uchardet` command line tool improved:
* exits with non-zero return values on error.
- CMake build improved with more options:
* Binary can be installed to non-default dir.
* Allow building static-only builds.
* Allow not building the command line tool.
* Add static lib destination.
- Changes from 0.0.4 to 0.0.5:
- Revert UTF-16 and UTF-32 label change:
it was an error to specify endianness for texts with BOM.
The Unicode standard explicitly warns against it, and it actually
even (partially) break conversions.
- Added supports:
- French: Windows-1252.
- German: ISO-8859-1, Windows-1252
- Esperanto: ISO-8859-3
- Turkish: ISO-8859-3 and ISO-8859-9
- Thai: ISO-8859-11 (and TIS-620 model rebuilt).
- Single Byte charset detection algorithm improved:
detection of control characters lowers confidence.
- Changes from 0.0.3 to 0.0.4:
- Add support of ISO-8859-1 and ISO-8859-15 for French.
- Re-enable Hungarian language models (ISO-8859-2 and Windows-1250)
which used to conflict with other charsets (should be better now).
- Differentiate ASCII detection and detection failure.
- Improve single-byte charset detection confidence algorithm (fixes for
instance Windows-1251 Russian text detection).
- "UTF-16" is now outputted with endianness information (UTF-16LE/BE).
- Add UTF-32 BOM detection.
- Discard single byte charsets upon illegal codepoint detection.
- Internal redesign of single-byte charmaps with more semantics, and
variable sample size length (different languages have different sizes
of grapheme lists).
- A lot more test files (33 successful unit tests should be successful
with `make test`).
- Adding python scripts to generate language models from Wikipedia data
in a single command.
- Changes from 0.0.2 to 0.0.3:
- A quick release after 0.0.2 mostly to fix a bad crash on the command
line tool when charset detection failed (or detected ASCII).
- The build now includes more test files for various language/encoding
and a `make test` target for unit testing (20 encoding detection tests
should be successful upon running it).
- The build has a new BUILD_STATIC option, by default set to ON,
allowing to disable static library building if not needed.
- All encoding names are iconv-compatible, enabling developers to
directly feed the result of uchardet_get_charset() into libiconv.
- Compilation warnings fixed.
- Changes from 0.0.1 to 0.0.2:
- Version 0.0.2 mostly fixes various bugs and allow querying charsets
for multiple files in the same command with uchardet command line tool.
-------------------------------------------------------------------
Mon Oct 14 10:06:31 UTC 2013 - lazy.kent@opensuse.org
- Initial package created - 0.0.1.

110
uchardet.spec Normal file
View File

@ -0,0 +1,110 @@
#
# spec file for package uchardet
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define major 0
Name: uchardet
Version: 0.0.8
Release: 0
Summary: Universal Charset Detection Library
License: GPL-2.0-or-later OR MPL-1.1 OR LGPL-2.1-or-later
Group: Productivity/Text/Utilities
URL: https://www.freedesktop.org/wiki/Software/uchardet/
Source0: https://www.freedesktop.org/software/%{name}/releases/%{name}-%{version}.tar.xz
Source1: baselibs.conf
BuildRequires: cmake >= 3.1
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%description
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
%package -n libuchardet%{major}
Summary: Universal Charset Detection Library
Group: System/Libraries
%description -n libuchardet%{major}
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
This package contains the shared library.
%package -n libuchardet-devel
Summary: Universal Charset Detection Library
Group: Development/Libraries/C and C++
Requires: libuchardet%{major} = %{version}
%description -n libuchardet-devel
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
This package contains the development files.
%prep
%setup -q
%build
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_INSTALL_LIBDIR=%{_libdir}
make %{?_smp_mflags} VERBOSE=1
%install
pushd build
%make_install
popd
rm -f %{buildroot}%{_libdir}/libuchardet.a
%post -n libuchardet%{major} -p /sbin/ldconfig
%postun -n libuchardet%{major} -p /sbin/ldconfig
%files
%license COPYING
%doc AUTHORS
%{_bindir}/%{name}
%{_mandir}/man?/*
%files -n libuchardet%{major}
%{_libdir}/*.so.*
%files -n libuchardet-devel
%license COPYING
%doc AUTHORS
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/uchardet
%changelog