From 4bf67dc3d888259240113b7e461c1c2ebc43bfa7 Mon Sep 17 00:00:00 2001 From: Gunnar Hjalmarsson Date: Tue, 8 Nov 2022 15:33:54 +0000 Subject: [PATCH] Import opencc_1.1.4+ds1-4.debian.tar.xz [dgit import tarball opencc 1.1.4+ds1-4 opencc_1.1.4+ds1-4.debian.tar.xz] --- TODO | 4 + changelog | 530 ++++++++++++++++++ clean | 17 + control | 101 ++++ copyright | 68 +++ docs | 2 + gbp.conf | 2 + libopencc-data.install | 1 + libopencc-dev.install | 3 + libopencc-doc.doc-base | 10 + libopencc-doc.docs | 1 + libopencc1.1.install | 2 + libopencc1.1.symbols | 233 ++++++++ opencc.install | 1 + patches/0001-use-cmake-install-libdir.patch | 37 ++ .../0003-data-Explicitly-use-python3.patch | 65 +++ ...ote-images-when-reading-docs-on-disk.patch | 37 ++ patches/0005-Use-system-googletest.patch | 23 + patches/series | 4 + rules | 55 ++ source/format | 1 + source/lintian-overrides | 2 + tests/CMakeLists.txt | 24 + tests/CommandLineConvertTest.cpp | 104 ++++ tests/README.md | 3 + tests/control | 8 + tests/integration | 12 + upstream/metadata | 4 + watch | 4 + 29 files changed, 1358 insertions(+) create mode 100644 TODO create mode 100644 changelog create mode 100644 clean create mode 100644 control create mode 100644 copyright create mode 100644 docs create mode 100644 gbp.conf create mode 100644 libopencc-data.install create mode 100644 libopencc-dev.install create mode 100644 libopencc-doc.doc-base create mode 100644 libopencc-doc.docs create mode 100644 libopencc1.1.install create mode 100644 libopencc1.1.symbols create mode 100644 opencc.install create mode 100644 patches/0001-use-cmake-install-libdir.patch create mode 100644 patches/0003-data-Explicitly-use-python3.patch create mode 100644 patches/0004-no-remote-images-when-reading-docs-on-disk.patch create mode 100644 patches/0005-Use-system-googletest.patch create mode 100644 patches/series create mode 100755 rules create mode 100644 source/format create mode 100644 source/lintian-overrides create mode 100644 tests/CMakeLists.txt create mode 100644 tests/CommandLineConvertTest.cpp create mode 100644 tests/README.md create mode 100644 tests/control create mode 100755 tests/integration create mode 100644 upstream/metadata create mode 100644 watch diff --git a/TODO b/TODO new file mode 100644 index 0000000..6b06ca6 --- /dev/null +++ b/TODO @@ -0,0 +1,4 @@ +* We need to pack nodejs module provided by opencc when possible. +* The python binding is not packaged. There is a embedded pybind11 + library that need to be dealt if we want to enable python + binding support. diff --git a/changelog b/changelog new file mode 100644 index 0000000..47a3cb1 --- /dev/null +++ b/changelog @@ -0,0 +1,530 @@ +opencc (1.1.4+ds1-4) unstable; urgency=medium + + * Team upload + * Work around uscan issue with GitHub releases page + + -- Gunnar Hjalmarsson Tue, 08 Nov 2022 16:33:54 +0100 + +opencc (1.1.4+ds1-3) unstable; urgency=medium + + * Team upload + * debian/libopencc1.1.symbols: + - Update other archs for LTO using buildd logs (closes: #1015565) + * Build with GCC-12 + - It builds fine now with GCC-12, so the symbols fix for LTO also + closes: #1013008. + + -- Gunnar Hjalmarsson Mon, 25 Jul 2022 02:26:42 +0200 + +opencc (1.1.4+ds1-2) unstable; urgency=medium + + * Team upload + * Start fixing FTBFS with LTO enabled (see bug 1015565): + - debian/rules: Enable LTO + - Create symbols file for amd64 only + * Bump Standards-Version to 4.6.1 + * debian/copyright: Bump copyright year to 2022 + + -- Gunnar Hjalmarsson Sat, 23 Jul 2022 19:05:33 +0200 + +opencc (1.1.4+ds1-1) unstable; urgency=medium + + [ xiao sheng wen ] + * update-debian-copyright to 2021 year. + + [ Boyuan Yang ] + * New upstream version 1.1.4+ds1. + * debian/patches: Refresh patches. + * debian/libopencc1.1.symbols: Refresh symbols. + + -- Boyuan Yang Sat, 04 Jun 2022 11:52:24 -0400 + +opencc (1.1.3+ds1-5) unstable; urgency=medium + + * Team upload + * debian/libopencc1.1.symbols: + - Refresh using buildd logs for all archs and pkgkde-symbolshelper + (Closes: #997412) + + -- Gunnar Hjalmarsson Wed, 27 Oct 2021 09:39:59 +0200 + +opencc (1.1.3+ds1-4) unstable; urgency=medium + + * Team upload + * Re-build with GCC 11 + * debian/libopencc1.1.symbols: + - amd64 tweak using buildd log from test rebuild + + -- Gunnar Hjalmarsson Tue, 26 Oct 2021 23:03:58 +0200 + +opencc (1.1.3+ds1-3) unstable; urgency=medium + + * Refresh symbols again for all archs using buildd logs. + + -- Boyuan Yang Mon, 20 Sep 2021 15:44:37 -0400 + +opencc (1.1.3+ds1-2) unstable; urgency=medium + + * Refresh symbols for all archs using buildd logs. + + -- Boyuan Yang Sun, 19 Sep 2021 16:32:52 -0400 + +opencc (1.1.3+ds1-1) unstable; urgency=medium + + * New upstream release 1.1.3. + * Add myself into uploaders list. + * debian/patches: Refresh patches. + + 0002-use-system-libraries.patch: Dropped, upstream now provides + CMake options to use system libraries. + + Drop backported patches (0006, 0007), merged upstream. + * debian/control: + + Bump Standards-Version to 4.6.0. + + Add new build-dependency pybind11-dev. + * debian/rules: Refresh cmake build options. + * debian/libopencc1.1.symbols: Refresh symbols. + + -- Boyuan Yang Sat, 18 Sep 2021 21:13:03 -0400 + +opencc (1.1.1+git20200624+ds2-10) unstable; urgency=medium + + * Team upload. + * Upload to unstable. + * Backport patch to fix performance regression again. + Add + + 0006-Fix-a-bug-in-the-calculation-of-DictGroup-keyMaxLeng.patch + + 0007-Fix-a-severe-performance-bug-in-Conversion-Convert-t.patch + + -- Shengjing Zhu Sun, 07 Mar 2021 14:20:40 +0800 + +opencc (1.1.1+git20200624+ds2-9) experimental; urgency=medium + + * Team upload. + * Remove unused command from autopkgtest scripts + * Add build-essential to autopkgtest + + -- Shengjing Zhu Sun, 07 Mar 2021 00:54:22 +0800 + +opencc (1.1.1+git20200624+ds2-8) experimental; urgency=medium + + * Team upload. + * Enable test when building + * Add autopkgtest + + -- Shengjing Zhu Sat, 06 Mar 2021 17:57:00 +0800 + +opencc (1.1.1+git20200624+ds2-7) unstable; urgency=high + + * Team upload. + * Drop debian/patches/0005 for now due to regression reported. + See also https://github.com/fcitx/fcitx5/issues/238 . + + -- Boyuan Yang Fri, 05 Mar 2021 09:37:48 -0500 + +opencc (1.1.1+git20200624+ds2-6) unstable; urgency=high + + * Team upload. + * debian/patches/0005: Add upstream patch to fix severe performance + regression in `Conversion::Convert` that caused O(N^2) complexity. + * debian/rules: Disable parallel build to workaround some random + build error for now. + + -- Boyuan Yang Sun, 28 Feb 2021 19:48:01 -0500 + +opencc (1.1.1+git20200624+ds2-5) unstable; urgency=medium + + * Team upload. + * debian/rules: Rewrite to support build profile. + * debian/rules: Enable dh_doxygen when building docs. + * Drop unnecessary build dependencies. (Closes: #981606) + * debian/control: Mark build-dependency doxygen as . + * debian/control: Drop build-dependency on libjs-jquery. Let + doxygen handle it. + * debian/control: Drop build-dependency on graphviz. Doxyfile + did not enable HAVE_DOT. + * debian/control: Drop build-dependency on dartz. Currently opencc + uses its vendored copy. + + -- Boyuan Yang Tue, 02 Feb 2021 11:58:39 -0500 + +opencc (1.1.1+git20200624+ds2-4) unstable; urgency=medium + + * Build-depends on pkg-kde-tools to handle symbols. + * debian/libopencc1.1.symbols: Refresh symbols using Debian + buildd logs. + + -- Boyuan Yang Sun, 17 Jan 2021 17:52:00 -0500 + +opencc (1.1.1+git20200624+ds2-3) unstable; urgency=medium + + * Team upload. + + [ Gunnar Hjalmarsson ] + * Replace shlibs file with symbols file + * debian/patches/no-remote-images-when-reading-docs-on-disk.patch: + - Fixes a privacy breach previously reported as Lintian warnings + * Bump Standards-Version to 4.5.1 + * debian/source/lintian-overrides: + - Explain why libopencc1.1 is not multi-archified even if + libopencc-dev depends on it. + + [ Boyuan Yang ] + * Mark package libopencc-dev as Multi-Arch: same + + -- Boyuan Yang Sat, 16 Jan 2021 10:36:38 -0500 + +opencc (1.1.1+git20200624+ds2-2) unstable; urgency=high + + * Team upload. + * debian/control: Mark package libopencc-data Breaks+Replaces the + old libopencc2-data package. (Closes: #963187) + + -- Boyuan Yang Sat, 04 Jul 2020 13:46:28 -0400 + +opencc (1.1.1+git20200624+ds2-1) unstable; urgency=medium + + * Team upload. + * Upload to unstable. + + -- Boyuan Yang Sat, 04 Jul 2020 06:28:22 -0400 + +opencc (1.1.1+git20200624+ds2-1~exp2) experimental; urgency=medium + + * Team upload. + * Rebuild against marisa 0.2.6. + + -- Boyuan Yang Fri, 03 Jul 2020 17:40:16 -0400 + +opencc (1.1.1+git20200624+ds2-1~exp1) experimental; urgency=medium + + * Team upload. + + [ 肖盛文 ] + * add libopencc-doc.doc-base,to register opencc to doc-base + * d/control: + - add Section: doc for libopencc-doc + - add Depends: libjs-jquery for the libopencc-doc package + + [ Boyuan Yang ] + * Import new upstream snapshot 2020-06-24 to fix some bugs. + * debian/patches: Refresh patches. + + -- Boyuan Yang Thu, 25 Jun 2020 20:34:50 -0400 + +opencc (1.1.1+ds1-1~exp1) experimental; urgency=medium + + * Team upload. + + [ 肖盛文 ] + * New upstream version 1.1.1 + * change libopencc data pkgname from libopencc[num]-data to libopencc-data + * change libopencc pkgname from libopencc2 to libopencc1.1 + * update debian/libopencc1.1.install for filename *.ocd2 + * d/rules: + - delete override_dh_missing: + - use execute_after_dh_auto_clean: + - use execute_after_dh_auto_install: + * d/copyright: + - update dirname for new upstream version + - add xiao sheng wen for debian/* + - add Upstream-Contact + * d/control: + - add Rules-Requires-Root: no + - add New Uploaders: xiao sheng wen + - delete some Replaces: and Breaks:, + let the new version packages can co-exist with the old ones. + * add debian/upstream/metadata + * d/watch: use @PACKAGE@ @ANY_VERSION@@ARCHIVE_EXT@ + + [ Boyuan Yang ] + * ds: Do not include bundled gtest and libmarisa. + * debian/rules: Explicitly disable building bundled libmarisa. + * debian/libopencc1.1.shlibs: Reset version requirement. + * debian/control: Add new build-dependency libmarisa-dev. + * debian/patches: Refreshed. + + -- Boyuan Yang Sat, 23 May 2020 15:51:01 -0400 + +opencc (1.0.6-2) unstable; urgency=medium + + * Team upload. + * debian/libopencc2.shlibs: Bump version requirement to 1.0.6. + * debian/control: Bump debhelper compat to v13. + * debian/rules: Drop as-needed linker flag. + + -- Boyuan Yang Sat, 02 May 2020 10:46:44 -0400 + +opencc (1.0.6-1) unstable; urgency=medium + + * Team upload. + * New upstream release 1.0.6. + * debian/control: + + Bump Standards-Version to 4.5.0. + + Add Debian Chinese Team into uploaders to show team's interest + in package co-maintenance. + * debian/patches: Refresh patches. + + -- Boyuan Yang Mon, 13 Apr 2020 18:20:20 -0400 + +opencc (1.0.5+git20190530-1) unstable; urgency=medium + + * Team upload. + * New upstream git snapshot (2019-05-30). + - opencc::ConvertDirectory is now exported. + - Various fixes and document updates. + * debian/control: + + Bump Standards-Version to 4.4.0. + + Bump debhelper copmat to v12. + + Add build-dependency graphviz for dot support for doxygen. + * debian/patches: Add patch 0004 to migrate from python2 to + python3. (Closes: #937195) + + -- Boyuan Yang Fri, 30 Aug 2019 14:09:03 -0400 + +opencc (1.0.5-2) unstable; urgency=medium + + * Team upload. + * Rebuild against gcc 8. + * debian/control: + + Update uploaders email address and use the @debian.org one. + + Bump Standards-Version to 4.2.1 (no changes needed). + * debian/rules: Avoid explicit invocation to dpkg-architecture. + + -- Boyuan Yang Thu, 20 Sep 2018 15:07:38 -0400 + +opencc (1.0.5-1) unstable; urgency=medium + + * Team upload. + * New upstream Release. + * Remove libopencc2 M-A:same mark for now since ocd files exist. + (Closes: #874227) + * Remove LI Daobing from Uploaders list. (Closes: #841792) + Thank you for your previous work! + * Apply "wrap-and-sort -abst". + * d/patches: Refresh patches. + * d/changelog: Remove trailing spaces. + * d/control: Use debian-input-method maillist in Maintainer field. + Closes: #899625. + * d/control: Use Vcs URL on Salsa platform. + * d/control: Bump Standards-Version to 4.1.4. + * d/control: Bump debhelper compat to v11. + * d/rules: Use NEWS.md as upstream changelog. + * d/rules: Use "dh_missing --fail-missing". + * d/shlibs: Explicitly require the latest library version. + + -- Boyuan Yang <073plan@gmail.com> Thu, 21 Jun 2018 11:18:37 +0800 + +opencc (1.0.4-5) unstable; urgency=medium + + * Make ocd data files arch:any (Closes: #851733) + + -- Aron Xu Fri, 20 Jan 2017 15:15:35 +0800 + +opencc (1.0.4-4) unstable; urgency=medium + + * Tighter Breaks/Conflicts version (Closes: #847145) + + -- Aron Xu Mon, 19 Dec 2016 23:30:01 +0800 + +opencc (1.0.4-3) unstable; urgency=medium + + * Correct Breaks/Conflicts version (Closes: #846665) + + -- Aron Xu Sun, 04 Dec 2016 16:39:48 +0800 + +opencc (1.0.4-2) unstable; urgency=medium + + [ Aron Xu ] + * Install data files to libopencc2-data, drop -dbg package + (Closes: #836395) + + [ Boyuan Yang ] + * Add BSD-3-clause license in d/copyright + + -- Aron Xu Sat, 03 Sep 2016 21:07:26 +0800 + +opencc (1.0.4-1) unstable; urgency=medium + + * Imported Upstream version 1.0.4 + * Update d/watch to Github URL + * std-ver: 3.9.6 -> 3.9.8, no change + * Update VCS-Browser URL to use HTTPS + + -- Aron Xu Mon, 08 Aug 2016 14:43:15 +0800 + +opencc (1.0.3-1) experimental; urgency=medium + + * New upstream release + * Add myself to Uploaders + * Drop symbols file, see README.Debian + + -- Aron Xu Wed, 16 Dec 2015 00:34:21 +0800 + +opencc (1.0.2-1) experimental; urgency=medium + + * Team upload for new upstream release. + * SONAME transition: libopencc1 -> libopencc2 + * Add libjs-jquery, libtclap-dev, darts, rapidjson-dev to B-D. + * Patches added/updated: + - lib-name-match-soversion.patch: rename library to match SONAME + - install-data-file-to-meet-need-of-multi-arch.patch: updated + - use-system-libraries.patch: do not use embeded libraries + * Use system version of jquery.js instead of embeded one. + * Removed python-opencc, upstream abandoned. + * Updated symbols file. + * Rewrite copyright file to machine-readable format. + * Allow parallel building. + + -- Aron Xu Thu, 20 Nov 2014 17:09:31 +0800 + +opencc (0.4.3-2) unstable; urgency=low + + * Add the python-opencc package to support the Python binding. + Closes: #694993 + * Bump standard version to 3.9.5. + + -- Osamu Aoki Sat, 02 Nov 2013 12:17:51 +0900 + +opencc (0.4.3-1) experimental; urgency=low + + * New upstream release. + * Update watch file. + * Clean up debian/control and wrap-and-sort. + * Update symbols file. + + -- Osamu Aoki Sun, 15 Sep 2013 00:13:31 +0900 + +opencc (0.4.0-1) experimental; urgency=low + + * New upstream release + * fix-new-test-cases.patch in upstream + * part of more_clear_man_c_option.patch is in upstream + the rest is in install-data-file-to-meet-need-of-multi-arch.path + + -- Asias He Fri, 05 Apr 2013 10:52:29 +0800 + +opencc (0.3.0-3) unstable; urgency=low + + * Rebuild to + generate little endian mo file on any arch (Closes: #670016). + * add an - before include buildflags.mk + + -- YunQiang Su Sun, 10 Jun 2012 19:35:51 +0800 + +opencc (0.3.0-2) unstable; urgency=low + + * Multi-arch it. + * Add libopencc-dbg package. + * Bump standard version to 3.9.3. + * Add YunQiang Su to Uploaders. + * Enable CPPFLAGS hardening flags (Closes: #665322). + * Better explanation for the -c option arguments of opencc, + give the path of these files out. (Closes: #656201). + + -- YunQiang Su Thu, 29 Mar 2012 03:22:51 +0800 + +opencc (0.3.0-1) unstable; urgency=low + + * Team upload. + + [ Kan-Ru Chen ] + * New upstream release + * debian/control: + - Remove autotools-dev and quilt from Build-Depends + * debian/rules: + - Support `nostrip' DEB_BUILD_OPTIONS + - Enable hardening flags. + * debian/docs: Install NEWS + * debian/copyright: Update update url + * debian/watch: Update upstream url + * debian/patches/fix-big-endian-build.diff: merged upstream + * debian/patches/fix-new-test-cases.patch: New patch. + + -- Kan-Ru Chen Sat, 17 Dec 2011 16:41:49 +0800 + +opencc (0.2.0-2) unstable; urgency=low + + * Fix "Please fix FTBFS on mips, ppc, s390 and sparc" (Closes: #624562) + * debian/control: bump standards version to 3.9.2. + * Set DM-Upload-Allowed to yes + + -- Asias He Mon, 16 May 2011 20:46:03 +0800 + +opencc (0.2.0-1) unstable; urgency=low + + * New upstream release + * Move usr/share/locale to package opencc + * Add cmake to Build-Depends + * Change Homepage to http://code.google.com/p/opencc + * Set Vcs to git.debian.org + + -- Asias He Thu, 17 Mar 2011 21:36:41 +0800 + +opencc (0.1.2-1) unstable; urgency=low + + * New upstream release. + * debian/libopencc1.symbols: updated. + + -- LI Daobing Wed, 22 Sep 2010 20:40:54 +0800 + +opencc (0.1.1-2) unstable; urgency=low + + *debian/control: add Conflicts to libopencc0 (Closes: #596434) + + -- Asias He Sun, 12 Sep 2010 14:58:18 +0800 + +opencc (0.1.1-1) unstable; urgency=low + + [ Asias He ] + * New upstream release (closes: #591076). + * debian/control: bump standards version to 3.9.1. + * debian/watch: use googlecode.debian.net. + + [ LI Daobing ] + * debian/clean: added. + + -- LI Daobing Wed, 11 Aug 2010 22:04:12 +0800 + +opencc (0.1.0-1) unstable; urgency=low + + * New upstream release. + * debian/control: + - bump standards version to 3.9.1. + - libopencc0 -> libopecc1 (closes: #590473). + - libopencc1 replaces libopencc0. + * libopencc0 -> libopencc1: + - debian/libopencc0.install => debian/libopencc1.install + - debian/libopencc0.symbols => debian/libopencc1.symbols + + -- LI Daobing Thu, 29 Jul 2010 23:05:17 +0800 + +opencc (0.0.5-1) unstable; urgency=low + + * New upstream release. + * debian/control: no longer build depends on python. + * debian/opencc.install: move .mo files to libopencc0. + * debian/libopencc0.install: install .mo files. + * debian/opencc_dict.1: deleted. + * debian/opencc.manpages: deleted. + + -- LI Daobing Wed, 21 Jul 2010 22:42:32 +0800 + +opencc (0.0.4-1) unstable; urgency=low + + * New upstream release. + * debian/control: bump standards version to 3.9.0. + + -- LI Daobing Fri, 16 Jul 2010 23:52:08 +0800 + +opencc (0.0.3-1) unstable; urgency=low + + * New upstream release. + * debian/opencc.install: updated. + * debian/control: opencc depends on libopencc0 at the same version. + + -- LI Daobing Tue, 22 Jun 2010 19:08:33 +0800 + +opencc (0.0.2-1) unstable; urgency=low + + * Initial release (Closes: #585621) + + -- LI Daobing Sat, 19 Jun 2010 18:27:20 +0800 diff --git a/clean b/clean new file mode 100644 index 0000000..0777230 --- /dev/null +++ b/clean @@ -0,0 +1,17 @@ +test/mix2zhs.ans +test/mix2zhs.in +test/mix2zhs.ini +test/mix2zht.ans +test/mix2zht.in +test/mix2zht.ini +test/opencc +test/simp_to_trad_characters.ocd +test/simp_to_trad_phrases.ocd +test/trad_to_simp_characters.ocd +test/trad_to_simp_phrases.ocd +test/zhs2zht.ans +test/zhs2zht.in +test/zhs2zht.ini +test/zht2zhs.ans +test/zht2zhs.in +test/zht2zhs.ini diff --git a/control b/control new file mode 100644 index 0000000..c84ec2a --- /dev/null +++ b/control @@ -0,0 +1,101 @@ +Source: opencc +Priority: optional +Maintainer: Debian Input Method Team +Uploaders: + Debian Chinese Team , + Asias He , + YunQiang Su , + Osamu Aoki , + Aron Xu , + xiao sheng wen , + Boyuan Yang , +Build-Depends: + cmake, + darts, + debhelper-compat (= 13), + doxygen , + googletest , + libmarisa-dev, + libtclap-dev, + pkg-kde-tools, + pybind11-dev, + python3:any, + rapidjson-dev, +Standards-Version: 4.6.1 +Rules-Requires-Root: no +Section: libs +Homepage: https://github.com/BYVoid/OpenCC +Vcs-Git: https://salsa.debian.org/debian/opencc.git +Vcs-Browser: https://salsa.debian.org/debian/opencc + +Package: libopencc-data +Architecture: all +Multi-Arch: foreign +Depends: + ${misc:Depends}, +Breaks: + libopencc2-data (<< 1.1.1~), +Replaces: + libopencc2-data (<< 1.1.1~), +Description: simplified-traditional Chinese conversion library - data files + opencc is a library for converting character between traditional Chinese and + simplified Chinese. + . + This package includes the data files. + +Package: libopencc-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + libopencc1.1 (= ${binary:Version}), + ${misc:Depends}, +Suggests: + libopencc-doc, +Description: simplified-traditional Chinese conversion library - development + opencc is a library for converting character between traditional Chinese and + simplified Chinese. + . + This package includes the development support files. + +Package: libopencc-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: + ${misc:Depends}, +Description: simplified-traditional Chinese conversion library - document + opencc is a library for converting character between traditional Chinese and + simplified Chinese. + . + This package includes the library document files. + +Package: libopencc1.1 +Architecture: any +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + libopencc-data (= ${source:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: simplified-traditional Chinese conversion library - runtime + opencc is a library for converting character between traditional Chinese and + simplified Chinese. + . + This package includes the shared library. + +Package: opencc +Section: utils +Architecture: any +Multi-Arch: foreign +Depends: + libopencc1.1 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Suggests: + libopencc-doc, +Description: simplified-traditional Chinese conversion tool + opencc is a library for converting character between traditional Chinese and + simplified Chinese. + . + This package includes the conversion tool. diff --git a/copyright b/copyright new file mode 100644 index 0000000..a2d17ef --- /dev/null +++ b/copyright @@ -0,0 +1,68 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: OpenCC +Upstream-Contact: BYVoid +Source: https://github.com/BYVoid/OpenCC/releases +Files-Excluded: + deps/google-benchmark/* + deps/gtest-*/* + deps/marisa-*/* + deps/rapidjson-*/* + deps/tclap-*/* + deps/pybind11-*/* + +Files: * +Copyright: 2010-2022, BYVoid +License: Apache-2 + +Files: debian/* +Copyright: 2010, LI Daobing + 2014, Aron Xu + 2020-2021, xiao sheng wen + 2022, Boyuan Yang +License: Apache-2 + +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +Files: deps/darts-clone/* +Copyright: 2001-2008, Taku Kudoh +License: BSD-3-Clause + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name Nara Institute of Science and Technology may not be used to + endorse or promote products derived from this software without specific + prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/docs b/docs new file mode 100644 index 0000000..0b6e0f3 --- /dev/null +++ b/docs @@ -0,0 +1,2 @@ +AUTHORS +README.md diff --git a/gbp.conf b/gbp.conf new file mode 100644 index 0000000..cec628c --- /dev/null +++ b/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True diff --git a/libopencc-data.install b/libopencc-data.install new file mode 100644 index 0000000..1ef017d --- /dev/null +++ b/libopencc-data.install @@ -0,0 +1 @@ +usr/share/opencc/*.json diff --git a/libopencc-dev.install b/libopencc-dev.install new file mode 100644 index 0000000..7df81cd --- /dev/null +++ b/libopencc-dev.install @@ -0,0 +1,3 @@ +usr/include/* +usr/lib/*/lib*.so +usr/lib/*/pkgconfig/* diff --git a/libopencc-doc.doc-base b/libopencc-doc.doc-base new file mode 100644 index 0000000..8c24829 --- /dev/null +++ b/libopencc-doc.doc-base @@ -0,0 +1,10 @@ +Document: opencc +Title: Open Chinese Convert +Author: BYVoid +Abstract: This document describes the OpenCC. + A project for conversion between Traditional and Simplified Chinese. +Section: Text + +Format: HTML +Index: /usr/share/doc/opencc/html/index.html +Files: /usr/share/doc/opencc/html/*.html diff --git a/libopencc-doc.docs b/libopencc-doc.docs new file mode 100644 index 0000000..69420c8 --- /dev/null +++ b/libopencc-doc.docs @@ -0,0 +1 @@ +usr/share/opencc/doc/* diff --git a/libopencc1.1.install b/libopencc1.1.install new file mode 100644 index 0000000..28d741f --- /dev/null +++ b/libopencc1.1.install @@ -0,0 +1,2 @@ +usr/lib/*/lib*.so.* +usr/share/opencc/*.ocd2 diff --git a/libopencc1.1.symbols b/libopencc1.1.symbols new file mode 100644 index 0000000..25bc8f4 --- /dev/null +++ b/libopencc1.1.symbols @@ -0,0 +1,233 @@ +# SymbolsHelper-Confirmed: 1.1.4+ds1 amd64 armel armhf hppa hurd-i386 i386 m68k mipsel powerpc riscv64 sh4 x32 +libopencc.so.1.1 libopencc1.1 #MINVER# +* Build-Depends-Package: libopencc-dev + _Z11ConvertDictRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN6opencc4DictEE@Base 1.1.4+ds1 + _Z14LoadDictionaryRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_@Base 1.1.4+ds1 + _Z20opencc_open_internalPKc@Base 1.1.4+ds1 + _ZN6opencc10BinaryDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc10MarisaDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 + _ZN6opencc10MarisaDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc10MarisaDictC1Ev@Base 1.1.4+ds1 + _ZN6opencc10MarisaDictC2Ev@Base 1.1.4+ds1 + _ZN6opencc10MarisaDictD0Ev@Base 1.1.4+ds1 + _ZN6opencc10MarisaDictD1Ev@Base 1.1.4+ds1 + _ZN6opencc10MarisaDictD2Ev@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract11SelectWordsEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract15ExtractPrefixesEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract15ExtractSuffixesEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract18CalculateCohesionsEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract18CalculateFrequencyEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract21ExtractWordCandidatesEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract22CalculatePrefixEntropyEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract22CalculateSuffixEntropyEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract27DefaultPreCalculationFilterERKS0_RKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract28DefaultPostCalculationFilterERKS0_RKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtract5ResetEv@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtractC1Ev@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtractC2Ev@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtractD0Ev@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtractD1Ev@Base 1.1.4+ds1 + _ZN6opencc13PhraseExtractD2Ev@Base 1.1.4+ds1 + _ZN6opencc15ConversionChainC1ENSt7__cxx114listISt10shared_ptrINS_10ConversionEESaIS5_EEE@Base 1.1.4+ds1 + _ZN6opencc15ConversionChainC2ENSt7__cxx114listISt10shared_ptrINS_10ConversionEESaIS5_EEE@Base 1.1.4+ds1 + _ZN6opencc15SimpleConverterC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZN6opencc15SimpleConverterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZN6opencc15SimpleConverterD1Ev@Base 1.1.4+ds1 + _ZN6opencc15SimpleConverterD2Ev@Base 1.1.4+ds1 + _ZN6opencc16SerializedValues11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc17ConvertDictionaryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_@Base 1.1.4+ds1 + _ZN6opencc6Config11NewFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZN6opencc6Config13NewFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_@Base 1.1.4+ds1 + _ZN6opencc6ConfigC1Ev@Base 1.1.4+ds1 + _ZN6opencc6ConfigC2Ev@Base 1.1.4+ds1 + _ZN6opencc6ConfigD0Ev@Base 1.1.4+ds1 + _ZN6opencc6ConfigD1Ev@Base 1.1.4+ds1 + _ZN6opencc6ConfigD2Ev@Base 1.1.4+ds1 + _ZN6opencc7Lexicon4SortEv@Base 1.1.4+ds1 + _ZN6opencc7Lexicon8IsSortedEv@Base 1.1.4+ds1 + _ZN6opencc7Lexicon8IsUniqueEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZN6opencc8TextDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 + _ZN6opencc8TextDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc8TextDict17NewFromSortedFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc8TextDictC1ERKSt10shared_ptrINS_7LexiconEE@Base 1.1.4+ds1 + _ZN6opencc8TextDictC2ERKSt10shared_ptrINS_7LexiconEE@Base 1.1.4+ds1 + _ZN6opencc8TextDictD0Ev@Base 1.1.4+ds1 + _ZN6opencc8TextDictD1Ev@Base 1.1.4+ds1 + _ZN6opencc8TextDictD2Ev@Base 1.1.4+ds1 + _ZN6opencc8UTF8Util11SkipUtf8BomEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc8internal19ContainsPunctuationERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZN6opencc9DartsDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 + _ZN6opencc9DartsDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZN6opencc9DartsDictC1Ev@Base 1.1.4+ds1 + _ZN6opencc9DartsDictC2Ev@Base 1.1.4+ds1 + _ZN6opencc9DartsDictD0Ev@Base 1.1.4+ds1 + _ZN6opencc9DartsDictD1Ev@Base 1.1.4+ds1 + _ZN6opencc9DartsDictD2Ev@Base 1.1.4+ds1 + _ZN6opencc9DictEntry12UPtrLessThanERKSt10unique_ptrIS0_St14default_deleteIS0_EES6_@Base 1.1.4+ds1 + _ZN6opencc9DictGroup11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 + _ZN6opencc9DictGroupC1ERKNSt7__cxx114listISt10shared_ptrINS_4DictEESaIS5_EEE@Base 1.1.4+ds1 + _ZN6opencc9DictGroupC2ERKNSt7__cxx114listISt10shared_ptrINS_4DictEESaIS5_EEE@Base 1.1.4+ds1 + _ZN6opencc9DictGroupD0Ev@Base 1.1.4+ds1 + _ZN6opencc9DictGroupD1Ev@Base 1.1.4+ds1 + _ZN6opencc9DictGroupD2Ev@Base 1.1.4+ds1 + _ZNK6opencc10BinaryDict12KeyMaxLengthEv@Base 1.1.4+ds1 + (subst)_ZNK6opencc10BinaryDict15ConstructBufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorI{size_t}SaI{size_t}EER{size_t}S7_SB_SC_@Base 1.1.4+ds1 + _ZNK6opencc10BinaryDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZNK6opencc10Conversion7ConvertB5cxx11EPKc@Base 1.1.4+ds1 + _ZNK6opencc10Conversion7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZNK6opencc10Conversion7ConvertERKSt10shared_ptrINS_8SegmentsEE@Base 1.1.4+ds1 + _ZNK6opencc10MarisaDict10GetLexiconEv@Base 1.1.4+ds1 + (subst)_ZNK6opencc10MarisaDict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc10MarisaDict12KeyMaxLengthEv@Base 1.1.4+ds1 + _ZNK6opencc10MarisaDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 + (subst)_ZNK6opencc10MarisaDict16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 + (subst)_ZNK6opencc10MarisaDict5MatchEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract11ProbabilityERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract13PrefixEntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract13SuffixEntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract14LogProbabilityERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + (subst)_ZNK6opencc13PhraseExtract16CalculateEntropyERKSt13unordered_mapINS_19UTF8StringSliceBaseIhEE{size_t}NS3_6HasherESt8equal_toIS3_ESaISt4pairIKS3_{size_t}EEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract17CalculateCohesionERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract3PMIERKNS_19UTF8StringSliceBaseIhEES4_S4_@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract6SignalERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract7EntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract8CohesionERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc13PhraseExtract9FrequencyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 + _ZNK6opencc15ConversionChain7ConvertERKSt10shared_ptrINS_8SegmentsEE@Base 1.1.4+ds1 + _ZNK6opencc15SimpleConverter7ConvertB5cxx11EPKc@Base 1.1.4+ds1 + (subst)_ZNK6opencc15SimpleConverter7ConvertB5cxx11EPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc15SimpleConverter7ConvertEPKcPc@Base 1.1.4+ds1 + (subst)_ZNK6opencc15SimpleConverter7ConvertEPKc{size_t}Pc@Base 1.1.4+ds1 + _ZNK6opencc15SimpleConverter7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZNK6opencc16SerializedValues12KeyMaxLengthEv@Base 1.1.4+ds1 + _ZNK6opencc16SerializedValues15ConstructBufferEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorItSaItEEPj@Base 1.1.4+ds1 + _ZNK6opencc16SerializedValues15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 + _ZNK6opencc19MultiValueDictEntry8ToStringB5cxx11Ev@Base 1.1.4+ds1 + _ZNK6opencc20MaxMatchSegmentation7SegmentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + (subst)_ZNK6opencc4Dict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 + (subst)_ZNK6opencc4Dict16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc8TextDict10GetLexiconEv@Base 1.1.4+ds1 + _ZNK6opencc8TextDict12KeyMaxLengthEv@Base 1.1.4+ds1 + _ZNK6opencc8TextDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 + (subst)_ZNK6opencc8TextDict5MatchEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc9Converter7ConvertEPKcPc@Base 1.1.4+ds1 + _ZNK6opencc9Converter7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 + _ZNK6opencc9DartsDict10GetLexiconEv@Base 1.1.4+ds1 + (subst)_ZNK6opencc9DartsDict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc9DartsDict12KeyMaxLengthEv@Base 1.1.4+ds1 + _ZNK6opencc9DartsDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 + (subst)_ZNK6opencc9DartsDict5MatchEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc9DictGroup10GetLexiconEv@Base 1.1.4+ds1 + (subst)_ZNK6opencc9DictGroup11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 + _ZNK6opencc9DictGroup12KeyMaxLengthEv@Base 1.1.4+ds1 + (subst)_ZNK6opencc9DictGroup16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 + (subst)_ZNK6opencc9DictGroup5MatchEPKc{size_t}@Base 1.1.4+ds1 + (optional=templinst)_ZNSt17_Function_handlerIFbRKN6opencc13PhraseExtractERKNS0_19UTF8StringSliceBaseIhEEEPS8_E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation@Base 1.1.4+ds1 + (optional=templinst)_ZNSt17_Function_handlerIFbRKN6opencc13PhraseExtractERKNS0_19UTF8StringSliceBaseIhEEEPS8_E9_M_invokeERKSt9_Any_dataS3_S7_@Base 1.1.4+ds1 + _ZTIFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 + _ZTIN6opencc10BinaryDictE@Base 1.1.4+ds1 + _ZTIN6opencc10MarisaDictE@Base 1.1.4+ds1 + _ZTIN6opencc11InvalidUTF8E@Base 1.1.4+ds1 + _ZTIN6opencc12FileNotFoundE@Base 1.1.4+ds1 + _ZTIN6opencc12SegmentationE@Base 1.1.4+ds1 + _ZTIN6opencc13InvalidFormatE@Base 1.1.4+ds1 + _ZTIN6opencc13PhraseExtractE@Base 1.1.4+ds1 + _ZTIN6opencc15FileNotWritableE@Base 1.1.4+ds1 + _ZTIN6opencc15ShouldNotBeHereE@Base 1.1.4+ds1 + _ZTIN6opencc16SerializableDictE@Base 1.1.4+ds1 + _ZTIN6opencc16SerializedValuesE@Base 1.1.4+ds1 + _ZTIN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 + _ZTIN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 + _ZTIN6opencc20SingleValueDictEntryE@Base 1.1.4+ds1 + _ZTIN6opencc21InvalidTextDictionaryE@Base 1.1.4+ds1 + _ZTIN6opencc4DictE@Base 1.1.4+ds1 + _ZTIN6opencc6ConfigE@Base 1.1.4+ds1 + _ZTIN6opencc8TextDictE@Base 1.1.4+ds1 + _ZTIN6opencc9DartsDictE@Base 1.1.4+ds1 + _ZTIN6opencc9DictEntryE@Base 1.1.4+ds1 + _ZTIN6opencc9DictGroupE@Base 1.1.4+ds1 + _ZTIN6opencc9ExceptionE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTIN9__gnu_cxx7__mutexE@Base 1.1.4+ds1 + _ZTIPFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + _ZTSFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 + _ZTSN5Darts15DoubleArrayImplIchijNS_6LengthIcEEEE@Base 1.1.4+ds1 + _ZTSN6opencc10BinaryDictE@Base 1.1.4+ds1 + _ZTSN6opencc10MarisaDictE@Base 1.1.4+ds1 + _ZTSN6opencc11InvalidUTF8E@Base 1.1.4+ds1 + _ZTSN6opencc12FileNotFoundE@Base 1.1.4+ds1 + _ZTSN6opencc12SegmentationE@Base 1.1.4+ds1 + _ZTSN6opencc13InvalidFormatE@Base 1.1.4+ds1 + _ZTSN6opencc13PhraseExtractE@Base 1.1.4+ds1 + _ZTSN6opencc15FileNotWritableE@Base 1.1.4+ds1 + _ZTSN6opencc15ShouldNotBeHereE@Base 1.1.4+ds1 + _ZTSN6opencc16NoValueDictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc16SerializableDictE@Base 1.1.4+ds1 + _ZTSN6opencc16SerializedValuesE@Base 1.1.4+ds1 + _ZTSN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 + _ZTSN6opencc20SingleValueDictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc21InvalidTextDictionaryE@Base 1.1.4+ds1 + _ZTSN6opencc22StrMultiValueDictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc23StrSingleValueDictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc4DictE@Base 1.1.4+ds1 + _ZTSN6opencc6ConfigE@Base 1.1.4+ds1 + _ZTSN6opencc8TextDictE@Base 1.1.4+ds1 + _ZTSN6opencc9DartsDictE@Base 1.1.4+ds1 + _ZTSN6opencc9DictEntryE@Base 1.1.4+ds1 + _ZTSN6opencc9DictGroupE@Base 1.1.4+ds1 + _ZTSN6opencc9ExceptionE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSN9__gnu_cxx7__mutexE@Base 1.1.4+ds1 + _ZTSPFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10BinaryDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10BinaryDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10ConversionELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10ConversionELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10MarisaDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10MarisaDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc15ConversionChainELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc15ConversionChainELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc16SerializedValuesELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc16SerializedValuesELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc20MaxMatchSegmentationELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc20MaxMatchSegmentationELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc7LexiconELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc7LexiconELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8SegmentsELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8SegmentsELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8TextDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8TextDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9ConverterELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9ConverterELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DartsDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DartsDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DictGroupELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DictGroupELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + (arch=armel riscv64)_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 + (arch=!armel !riscv64)_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 + _ZTVN6opencc10BinaryDictE@Base 1.1.4+ds1 + _ZTVN6opencc10MarisaDictE@Base 1.1.4+ds1 + _ZTVN6opencc13PhraseExtractE@Base 1.1.4+ds1 + _ZTVN6opencc16SerializedValuesE@Base 1.1.4+ds1 + _ZTVN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 + _ZTVN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 + _ZTVN6opencc4DictE@Base 1.1.4+ds1 + _ZTVN6opencc6ConfigE@Base 1.1.4+ds1 + _ZTVN6opencc8TextDictE@Base 1.1.4+ds1 + _ZTVN6opencc9DartsDictE@Base 1.1.4+ds1 + _ZTVN6opencc9DictGroupE@Base 1.1.4+ds1 + (optional=templinst)_ZZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEixIS5_EERS6_RKNS0_IS2_T_EEE6buffer@Base 1.1.4+ds1 + (c++)"non-virtual thunk to opencc::DartsDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 + (c++)"non-virtual thunk to opencc::MarisaDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 + (c++)"non-virtual thunk to opencc::TextDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 + opencc_close@Base 1.1.4+ds1 + opencc_convert_utf8@Base 1.1.4+ds1 + opencc_convert_utf8_free@Base 1.1.4+ds1 + opencc_convert_utf8_to_buffer@Base 1.1.4+ds1 + opencc_error@Base 1.1.4+ds1 + opencc_open@Base 1.1.4+ds1 diff --git a/opencc.install b/opencc.install new file mode 100644 index 0000000..1df36c6 --- /dev/null +++ b/opencc.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/patches/0001-use-cmake-install-libdir.patch b/patches/0001-use-cmake-install-libdir.patch new file mode 100644 index 0000000..8155f75 --- /dev/null +++ b/patches/0001-use-cmake-install-libdir.patch @@ -0,0 +1,37 @@ +From: IME Packaging Team +Date: Mon, 9 Oct 2017 22:02:39 +0800 +Subject: use-cmake-install-libdir + +Update 2021-09-18: Also use GNUInstallDirs. + +Last-Update: 2021-09-18 +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2ae987..76c2b69 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,10 +17,11 @@ + # + + ######## Project settings +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.0.2) + set (PACKAGE_NAME opencc) + project (${PACKAGE_NAME} CXX) + include (CTest) ++include (GNUInstallDirs) + + ######## Options + option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) +@@ -80,7 +81,7 @@ set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX}) + set (DIR_INCLUDE ${DIR_PREFIX}/include/) + set (DIR_SHARE ${DIR_PREFIX}/share/) + set (DIR_ETC ${DIR_PREFIX}/etc/) +-set (DIR_LIBRARY ${DIR_PREFIX}/lib${LIB_SUFFIX}/) ++set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR}) + + if (DEFINED SHARE_INSTALL_PREFIX) + set (DIR_SHARE ${SHARE_INSTALL_PREFIX}) diff --git a/patches/0003-data-Explicitly-use-python3.patch b/patches/0003-data-Explicitly-use-python3.patch new file mode 100644 index 0000000..2388a8d --- /dev/null +++ b/patches/0003-data-Explicitly-use-python3.patch @@ -0,0 +1,65 @@ +From: Boyuan Yang +Date: Thu, 25 Jun 2020 20:32:44 -0400 +Subject: data/: Explicitly use python3 + +Before "python" is default to python3, this patch should be kept. + +Last-Update: 2020-06-25 +--- + data/scripts/find_target.py | 2 +- + data/scripts/merge.py | 2 +- + data/scripts/reverse.py | 2 +- + data/scripts/sort.py | 2 +- + data/scripts/sort_all.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/data/scripts/find_target.py b/data/scripts/find_target.py +index 4244949..7b2b477 100755 +--- a/data/scripts/find_target.py ++++ b/data/scripts/find_target.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import sys +diff --git a/data/scripts/merge.py b/data/scripts/merge.py +index 680c90e..01fcf51 100755 +--- a/data/scripts/merge.py ++++ b/data/scripts/merge.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import codecs +diff --git a/data/scripts/reverse.py b/data/scripts/reverse.py +index 746f887..a87ae46 100755 +--- a/data/scripts/reverse.py ++++ b/data/scripts/reverse.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import sys +diff --git a/data/scripts/sort.py b/data/scripts/sort.py +index f7d4dc5..6ad6e8c 100755 +--- a/data/scripts/sort.py ++++ b/data/scripts/sort.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + import sys + +diff --git a/data/scripts/sort_all.py b/data/scripts/sort_all.py +index 20d82fd..11bc4c9 100755 +--- a/data/scripts/sort_all.py ++++ b/data/scripts/sort_all.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + import glob + import sys diff --git a/patches/0004-no-remote-images-when-reading-docs-on-disk.patch b/patches/0004-no-remote-images-when-reading-docs-on-disk.patch new file mode 100644 index 0000000..d1a2ae2 --- /dev/null +++ b/patches/0004-no-remote-images-when-reading-docs-on-disk.patch @@ -0,0 +1,37 @@ +From: Gunnar Hjalmarsson +Date: Sat, 6 Mar 2021 17:45:20 +0800 +Subject: Don't fetch remote images when reading docs on disk + +Forwarded: no +Last-Update: 2021-09-18 + +This fixes a privacy breach previously reported as Lintian warnings +--- + README.md | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/README.md b/README.md +index 7225e01..dbb7fb4 100644 +--- a/README.md ++++ b/README.md +@@ -1,14 +1,14 @@ + # Open Chinese Convert 開放中文轉換 + +-[![Travis](https://img.shields.io/travis/BYVoid/OpenCC.svg)](https://travis-ci.org/BYVoid/OpenCC) +-[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC) +-[![C/C++ CI](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml) +-[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml) +-[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml) ++[[Travis](https://travis-ci.org/BYVoid/OpenCC)] ++[[AppVeyor](https://ci.appveyor.com/project/Carbo/OpenCC)] ++[[C/C++ CI](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)] ++[[Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)] ++[[Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)] + + ## Introduction 介紹 + +-![OpenCC](https://opencc.byvoid.com/img/opencc.png) ++OpenCC + + Open Chinese Convert (OpenCC, 開放中文轉換) is an opensource project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai). It supports character-level and phrase-level conversion, character variant conversion and regional idioms among Mainland China, Taiwan and Hong Kong. This is not translation tool between Mandarin and Cantonese, etc. + diff --git a/patches/0005-Use-system-googletest.patch b/patches/0005-Use-system-googletest.patch new file mode 100644 index 0000000..8b09b81 --- /dev/null +++ b/patches/0005-Use-system-googletest.patch @@ -0,0 +1,23 @@ +From: Shengjing Zhu +Date: Sat, 6 Mar 2021 17:53:25 +0800 +Subject: Use system googletest + +Forwarded: not-needed +Last-Update: 2021-09-18 +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 76c2b69..5f9cdcf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,6 +204,8 @@ add_subdirectory(test) + if (ENABLE_GTEST) + if(NOT USE_SYSTEM_GTEST) + add_subdirectory(deps/gtest-1.11.0) ++ else() ++ add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) + endif() + enable_testing() + endif() diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..481132a --- /dev/null +++ b/patches/series @@ -0,0 +1,4 @@ +0001-use-cmake-install-libdir.patch +0003-data-Explicitly-use-python3.patch +0004-no-remote-images-when-reading-docs-on-disk.patch +0005-Use-system-googletest.patch diff --git a/rules b/rules new file mode 100755 index 0000000..949892e --- /dev/null +++ b/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto + +include /usr/share/dpkg/architecture.mk + +# Disable parallel build to circumvent some random build error +# (needs further investigation) +%: + dh $@ --buildsystem=cmake --with pkgkde_symbolshelper --no-parallel + +BUILD_OPTIONS = \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_SYSTEM_DARTS=ON \ + -DUSE_SYSTEM_GTEST=ON \ + -DUSE_SYSTEM_MARISA=ON \ + -DUSE_SYSTEM_PYBIND11=ON \ + -DUSE_SYSTEM_RAPIDJSON=ON \ + -DUSE_SYSTEM_TCLAP=ON + +ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) +BUILD_OPTIONS += -DBUILD_DOCUMENTATION=ON +else +BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF +endif + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) +BUILD_OPTIONS += -DENABLE_GTEST=ON +else +BUILD_OPTIONS += -DENABLE_GTEST=OFF +endif + +override_dh_auto_configure: + dh_auto_configure -- $(BUILD_OPTIONS) + +execute_after_dh_auto_clean: + find . -name *.pyc -delete + +execute_after_dh_installdocs-indep: +ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) + dh_doxygen --indep +endif + +override_dh_installdocs: + dh_installdocs -plibopencc-doc --doc-main-package=opencc + dh_installdocs --remaining-packages + +override_dh_installchangelogs: + dh_installchangelogs -k NEWS.md diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/source/lintian-overrides b/source/lintian-overrides new file mode 100644 index 0000000..ceb0cce --- /dev/null +++ b/source/lintian-overrides @@ -0,0 +1,2 @@ +# libopencc1.1 installs architecture dependent .ocd2 files +dependency-is-not-multi-archified libopencc-dev depends on libopencc1.1 (multi-arch: no) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..e6f88c7 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.18) +project (opencc-integration CXX) +include (CTest) +enable_testing() + +find_package(PkgConfig REQUIRED) +find_program (OPENCC_TOOL opencc REQUIRED) +pkg_check_modules(OPENCC REQUIRED IMPORTED_TARGET opencc) + +add_definitions( + -DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}" + -DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}" + -DPROJECT_BINARY_PATH="${OPENCC_TOOL}" +) +make_directory(${CMAKE_BINARY_DIR}/test) +add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) +set(UNITTESTS + CommandLineConvertTest +) +foreach(UNITTEST ${UNITTESTS}) + add_executable(${UNITTEST} ${UNITTEST}.cpp) + target_link_libraries(${UNITTEST} gtest gtest_main PkgConfig::OPENCC) + add_test(${UNITTEST} ${UNITTEST}) +endforeach(UNITTEST) diff --git a/tests/CommandLineConvertTest.cpp b/tests/CommandLineConvertTest.cpp new file mode 100644 index 0000000..6ca6068 --- /dev/null +++ b/tests/CommandLineConvertTest.cpp @@ -0,0 +1,104 @@ +/* + * Open Chinese Convert + * + * Copyright 2015 Carbo Kuo + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "Common.hpp" +#include "gtest/gtest.h" + +namespace opencc { + +class CommandLineConvertTest : public ::testing::Test { +protected: + CommandLineConvertTest() { GetCurrentWorkingDirectory(); } + + virtual ~CommandLineConvertTest() { free(originalWorkingDirectory); } + + virtual void SetUp() { + ASSERT_NE("", CMAKE_BINARY_DIR); + ASSERT_NE("", CMAKE_SOURCE_DIR); + ASSERT_EQ(0, chdir("/usr/share/opencc/")); + } + + virtual void TearDown() { ASSERT_EQ(0, chdir(originalWorkingDirectory)); } + + std::string GetFileContents(const std::string& fileName) const { + std::ifstream fs(fileName); + EXPECT_TRUE(fs.is_open()); + const std::string content((std::istreambuf_iterator(fs)), + (std::istreambuf_iterator())); + fs.close(); + return content; + } + + void GetCurrentWorkingDirectory() { + originalWorkingDirectory = getcwd(nullptr, 0); + } + + const char* OpenccCommand() const { + return PROJECT_BINARY_PATH; + } + + const char* InputDirectory() const { + return CMAKE_SOURCE_DIR "/../../test/testcases/"; + } + + const char* OutputDirectory() const { return CMAKE_BINARY_DIR "/test/"; } + + const char* AnswerDirectory() const { + return CMAKE_SOURCE_DIR "/../../test/testcases/"; + } + + const char* ConfigurationDirectory() const { + return "/usr/share/opencc/"; + } + + std::string OutputFile(const char* config) const { + return std::string(OutputDirectory()) + config + ".out"; + } + + std::string AnswerFile(const char* config) const { + return std::string(AnswerDirectory()) + config + ".ans"; + } + + std::string TestCommand(const char* config) const { + return OpenccCommand() + std::string("") + " -i " + InputDirectory() + + config + ".in" + " -o " + OutputFile(config) + " -c " + + ConfigurationDirectory() + config + ".json"; + } + + char* originalWorkingDirectory; +}; + +class ConfigurationTest : public CommandLineConvertTest, + public ::testing::WithParamInterface {}; + +TEST_P(ConfigurationTest, Convert) { + const char* config = GetParam(); + ASSERT_EQ(0, system(TestCommand(config).c_str())); + const std::string& output = GetFileContents(OutputFile(config)); + const std::string& answer = GetFileContents(AnswerFile(config)); + ASSERT_EQ(answer, output); +} + +INSTANTIATE_TEST_CASE_P(CommandLine, ConfigurationTest, + ::testing::Values("hk2s", "hk2t", "jp2t", "s2hk", "s2t", + "s2tw", "s2twp", "t2hk", "t2jp", "t2s", + "tw2s", "tw2sp", "tw2t")); + +} // namespace opencc diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..12d6cec --- /dev/null +++ b/tests/README.md @@ -0,0 +1,3 @@ +Fork from ../../test, please refresh this file if source has changed. + +Test with installed opencc tool and library. diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..36df47b --- /dev/null +++ b/tests/control @@ -0,0 +1,8 @@ +Tests: integration +Depends: + build-essential, + cmake, + googletest, + pkg-config, + @, +Restrictions: allow-stderr, diff --git a/tests/integration b/tests/integration new file mode 100755 index 0000000..c1f1746 --- /dev/null +++ b/tests/integration @@ -0,0 +1,12 @@ +#!/bin/sh + +set -ex + +cd "$(dirname "$0")" +mkdir -p build +cd build +cmake .. +make +make test +cd .. +rm -rf build diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..85af1e4 --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/BYVoid/OpenCC/issues +Bug-Submit: https://github.com/BYVoid/OpenCC/issues/new +Repository: https://github.com/BYVoid/OpenCC.git +Repository-Browse: https://github.com/BYVoid/OpenCC diff --git a/watch b/watch new file mode 100644 index 0000000..7c65a04 --- /dev/null +++ b/watch @@ -0,0 +1,4 @@ +version=4 +opts="dversionmangle=s/\+ds\d?$//,repack,repacksuffix=+ds1,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \ + https://github.com/byvoid/@PACKAGE@/tags \ + (?:.*?/)?(?:ver\.)?@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate -- 2.30.2