From b721c9ef8edb5ee73979633d9f73b75736ce7bde Mon Sep 17 00:00:00 2001
From: denghao <denghao@kylinos.cn>
Date: Tue, 20 Sep 2022 05:11:41 +0300
Subject: [PATCH] Import Debian changes 0.112-ok1

libunicode-map-perl (0.112-ok1) yangtze; urgency=medium

  * Build for openkylin.
---
 debian/BIG5.map.new                 |   0
 debian/README.Debian                |   8 ++
 debian/changelog                    |   5 +
 debian/control                      |  32 +++++++
 debian/copyright                    | 136 ++++++++++++++++++++++++++++
 debian/fix-big5                     |  33 +++++++
 debian/libunicode-map-perl.docs     |   1 +
 debian/libunicode-map-perl.examples |   1 +
 debian/patches/series               |   1 +
 debian/rules                        |  32 +++++++
 debian/source/format                |   1 +
 debian/tests/pkg-perl/use-name      |   1 +
 debian/watch                        |   2 +
 13 files changed, 253 insertions(+)
 create mode 100644 debian/BIG5.map.new
 create mode 100644 debian/README.Debian
 create mode 100644 debian/changelog
 create mode 100644 debian/control
 create mode 100644 debian/copyright
 create mode 100755 debian/fix-big5
 create mode 100644 debian/libunicode-map-perl.docs
 create mode 100644 debian/libunicode-map-perl.examples
 create mode 100644 debian/patches/series
 create mode 100755 debian/rules
 create mode 100644 debian/source/format
 create mode 100644 debian/tests/pkg-perl/use-name
 create mode 100644 debian/watch

diff --git a/debian/BIG5.map.new b/debian/BIG5.map.new
new file mode 100644
index 0000000..e69de29
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..1513691
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,8 @@
+libunicode-map-perl for Debian
+
+Please edit this to provide information specific to
+this libunicode-map-perl Debian package.
+
+    (Automatically generated by debmake Version 4.3.1)
+
+ -- denghao <denghao@kylinos.cn>  Tue, 20 Sep 2022 05:11:41 +0300
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..956d66e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+libunicode-map-perl (0.112-ok1) yangtze; urgency=medium
+
+  * Build for openkylin.
+
+ -- denghao <denghao@kylinos.cn>  Tue, 20 Sep 2022 05:11:41 +0300
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..17cbbb0
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,32 @@
+Source: libunicode-map-perl
+Section: perl
+Priority: optional
+Maintainer: OpenKylin Developers <packaging@lists.openkylin.top>
+Build-Depends: debhelper-compat (=13),
+              perl-xs-dev,
+               perl:native
+Testsuite: autopkgtest-pkg-perl
+Standards-Version: 4.6.1
+Vcs-Browser: https://gitee.com/openkylin/libunicode-map-perl
+Vcs-Git: https://gitee.com/openkylin/libunicode-map-perl.git
+Homepage: https://metacpan.org/release/Unicode-Map
+Rules-Requires-Root: no
+
+Package: libunicode-map-perl
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${perl:Depends},
+         ${misc:Depends}
+Suggests: libwww-perl
+Description: Perl module for mapping charsets from and to UTF16 Unicode
+ This module converts strings from and to 2-byte Unicode UCS2 format.
+ All mappings happen via 2 byte UTF16 encodings, not via 1 byte UTF8
+ encoding.  To convert between UTF8 and UTF16 use Unicode::String.
+ .
+ For historical reasons this module coexists with Unicode::Map8.
+ Please use Unicode::Map8 unless you need to care for >1 byte
+ character sets, e.g. chinese GB2312.  Anyway, if you stick to the
+ basic functionality (see documentation) you can use both modules
+ equivalently.
+ .
+ The 'libwww-perl' package is needed to run the example mirrorMappings.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7b407cc
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,136 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: libunicode-map-perl
+Source: <url://example.com>
+#
+# Please double check copyright with the licensecheck(1) command.
+
+Files:     Changes
+           INSTALL
+           MANIFEST
+           Makefile.PL
+           Map/ADOBE/STDENC.map
+           Map/ADOBE/SYMBOL.map
+           Map/ADOBE/ZDINGBAT.map
+           Map/APPLE/ARABIC.map
+           Map/APPLE/CENTEURO.map
+           Map/APPLE/CHINSIMP.map
+           Map/APPLE/CHINTRAD.map
+           Map/APPLE/CROATIAN.map
+           Map/APPLE/CYRILLIC.map
+           Map/APPLE/DEVANAGA.map
+           Map/APPLE/DINGBATS.map
+           Map/APPLE/GREEK.map
+           Map/APPLE/GUJARATI.map
+           Map/APPLE/GURMUKHI.map
+           Map/APPLE/HEBREW.map
+           Map/APPLE/ICELAND.map
+           Map/APPLE/JAPANESE.map
+           Map/APPLE/KOREAN.map
+           Map/APPLE/ROMAN.map
+           Map/APPLE/ROMANIAN.map
+           Map/APPLE/SYMBOL.map
+           Map/APPLE/THAI.map
+           Map/APPLE/TURKISH.map
+           Map/EASTASIA/BIG5.map
+           Map/EASTASIA/CNS-11643-1986.map
+           Map/EASTASIA/EUC-JP.map
+           Map/EASTASIA/EUC-KR.map
+           Map/EASTASIA/GB12345-80.map
+           Map/EASTASIA/GB2312-80.map
+           Map/EASTASIA/GB2312.map
+           Map/EASTASIA/JIS-X-0201.map
+           Map/EASTASIA/JIS-X-0208.map
+           Map/EASTASIA/JIS-X-0212.map
+           Map/EASTASIA/JOHAB.map
+           Map/EASTASIA/KSC1001.map
+           Map/EASTASIA/KSC5601-1992.map
+           Map/EASTASIA/SHIFTJIS.map
+           Map/IBM/IBM038.map
+           Map/ISO/8859-1.map
+           Map/ISO/8859-10.map
+           Map/ISO/8859-13.map
+           Map/ISO/8859-14.map
+           Map/ISO/8859-15.map
+           Map/ISO/8859-2.map
+           Map/ISO/8859-3.map
+           Map/ISO/8859-4.map
+           Map/ISO/8859-5.map
+           Map/ISO/8859-6.map
+           Map/ISO/8859-7.map
+           Map/ISO/8859-8.map
+           Map/ISO/8859-9.map
+           Map/ISO/ISO646-US.map
+           Map/MS/DOS/CP437.map
+           Map/MS/DOS/CP737.map
+           Map/MS/DOS/CP775.map
+           Map/MS/DOS/CP850.map
+           Map/MS/DOS/CP852.map
+           Map/MS/DOS/CP855.map
+           Map/MS/DOS/CP857.map
+           Map/MS/DOS/CP860.map
+           Map/MS/DOS/CP861.map
+           Map/MS/DOS/CP862.map
+           Map/MS/DOS/CP863.map
+           Map/MS/DOS/CP864.map
+           Map/MS/DOS/CP865.map
+           Map/MS/DOS/CP866.map
+           Map/MS/DOS/CP869.map
+           Map/MS/DOS/CP874.map
+           Map/MS/EBCDIC/CP037.map
+           Map/MS/EBCDIC/CP1026.map
+           Map/MS/EBCDIC/CP500.map
+           Map/MS/EBCDIC/CP875.map
+           Map/MS/MAC/CYRILLIC.map
+           Map/MS/MAC/GREEK.map
+           Map/MS/MAC/ICELAND.map
+           Map/MS/MAC/LATIN2.map
+           Map/MS/MAC/ROMAN.map
+           Map/MS/MAC/TURKISH.map
+           Map/MS/WIN/CP1250.map
+           Map/MS/WIN/CP1251.map
+           Map/MS/WIN/CP1252.map
+           Map/MS/WIN/CP1253.map
+           Map/MS/WIN/CP1254.map
+           Map/MS/WIN/CP1255.map
+           Map/MS/WIN/CP1256.map
+           Map/MS/WIN/CP1257.map
+           Map/MS/WIN/CP1258.map
+           Map/MS/WIN/CP932.map
+           Map/MS/WIN/CP936.map
+           Map/MS/WIN/CP949.map
+           Map/MS/WIN/CP950.map
+           Map/NEXT/NEXTSTEP.map
+           Map/REGISTRY
+           README
+           t/basic.t
+           t/deprecated.t
+           t/map.t
+           tools/mirrorMappings
+Copyright: __NO_COPYRIGHT_NOR_LICENSE__
+License:   __NO_COPYRIGHT_NOR_LICENSE__
+
+Files:     Map.pm
+           Map.xs
+           tools/map
+           tools/mkCSGB2312
+           tools/mkmapfile
+Copyright: 1998-2000 Martin Schwartz.
+License:   Perl
+ This program is free software; you can redistribute it and/or
+ modify it under the same terms as Perl itself.
+ .
+ Contact: Martin Schwartz <martin@nacho.de>
+
+#----------------------------------------------------------------------------
+# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
+# license/copyright files.
+
+#----------------------------------------------------------------------------
+# License file: COPYING
+ .
+ NOTE: this distribution is a non public prerelease!
+ .
+ Copyright (C) 1998, 1999, 2000 Martin Schwartz. All rights reserved.
+ This program is free software; you can redistribute it and/or
+ modify it under the same terms as Perl itself.
+ .
diff --git a/debian/fix-big5 b/debian/fix-big5
new file mode 100755
index 0000000..ce7053f
--- /dev/null
+++ b/debian/fix-big5
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Insert the US-ASCII compatible characters into the BIG5 binary map,
+# since the original source file (currently  
+#  ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT
+# ) doesn't include them. Note that this depends on the binary map format.
+# Hopefully by the time it is changed, this problem has been fixed upstream.
+#
+# See http://bugs.debian.org/320406
+#
+# Copyright Niko Tyni <ntyni@iki.fi> 2005
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of either:
+# 
+# a) the GNU General Public License as published by the Free Software
+#    Foundation; either version 1, or (at your option) any later
+#    version, or
+# 
+# b) the "Artistic License" which comes with Perl.
+
+set -e
+
+IN=Map/EASTASIA/BIG5.map
+DD=/bin/dd
+PF=/usr/bin/printf
+
+$DD if=$IN bs=1 count=12 # header, 12 bytes
+$PF "\x0\x8\x0"          # partial key-value mappings
+$PF "\x8\x1\x10\x1"      # input 1 char of 8-bits at a time, output 1 char of 16 bits
+$PF "\x80\x0\x80\x0\x0"  # 128 characters starting at 0x00 -> 128 chars starting at 0x0000
+$PF "\x0\x0\x0"          # end of submap
+$DD if=$IN bs=1 skip=12  # rest of the file
+
diff --git a/debian/libunicode-map-perl.docs b/debian/libunicode-map-perl.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/libunicode-map-perl.docs
@@ -0,0 +1 @@
+README
diff --git a/debian/libunicode-map-perl.examples b/debian/libunicode-map-perl.examples
new file mode 100644
index 0000000..7f8eb7d
--- /dev/null
+++ b/debian/libunicode-map-perl.examples
@@ -0,0 +1 @@
+tools/*
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4a97dfa
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+# You must remove unused comment lines for the released package.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..987e3e9
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,32 @@
+#!/usr/bin/make -f
+## uncomment this to turn on verbose mode
+#export DH_VERBOSE=1
+
+TMP = $(CURDIR)/debian/libunicode-map-perl
+
+b% c% i%:
+	dh $@
+
+override_dh_auto_configure: fix-big5
+	dh_auto_configure
+
+override_dh_clean:
+	[ ! -f fix-big5-stamp ] || mv debian/BIG5.map.dist Map/EASTASIA/BIG5.map
+	dh_clean
+
+override_dh_auto_install:
+	dh_auto_install
+	# Neither install scripts nor their man-pages
+	$(RM) -rvf $(TMP)/usr/bin $(TMP)/usr/share/man/man1
+
+override_dh_compress:
+	dh_compress -Xmkmapfile
+
+# fix the BIG5 map on the fly
+fix-big5: fix-big5-stamp
+fix-big5-stamp:
+	dh_testdir
+	sh debian/fix-big5 > debian/BIG5.map.new
+	mv Map/EASTASIA/BIG5.map debian/BIG5.map.dist
+	mv debian/BIG5.map.new Map/EASTASIA/BIG5.map
+	touch fix-big5-stamp
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/pkg-perl/use-name b/debian/tests/pkg-perl/use-name
new file mode 100644
index 0000000..5bfc1c0
--- /dev/null
+++ b/debian/tests/pkg-perl/use-name
@@ -0,0 +1 @@
+Unicode::Map
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..9eb1ec2
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+https://metacpan.org/release/Unicode-Map   .*/Unicode-Map-v?@ANY_VERSION@@ARCHIVE_EXT@$