public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/nkf/, app-i18n/nkf/files/
@ 2020-05-18 14:13 Akinori Hattori
  0 siblings, 0 replies; 3+ messages in thread
From: Akinori Hattori @ 2020-05-18 14:13 UTC (permalink / raw
  To: gentoo-commits

commit:     86705e51452695c1d5781de24949fae2b4f29c1e
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Mon May 18 14:13:20 2020 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Mon May 18 14:13:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86705e51

app-i18n/nkf: drop old

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 app-i18n/nkf/Manifest                    |   3 -
 app-i18n/nkf/files/nkf-2.1.3-strip.patch |   9 ---
 app-i18n/nkf/nkf-2.1.3-r2.ebuild         | 109 -------------------------------
 3 files changed, 121 deletions(-)

diff --git a/app-i18n/nkf/Manifest b/app-i18n/nkf/Manifest
index b6aa6e00fce..eeec965bb7b 100644
--- a/app-i18n/nkf/Manifest
+++ b/app-i18n/nkf/Manifest
@@ -1,7 +1,4 @@
-DIST NKF_python20090602.tgz 2318 BLAKE2B 54399912fce0f4486e4051825319294a214089a59fa9b40e93bdc77859e79e5586abf2d197511cb158b094663993a692c981885e9db8fe260a5a746771168509 SHA512 3baee969daaba43e7ddee0d3b6d3d73ed67cfb0a3c3cbdabcdcda9fa1e61ccf374cd686ee096d031c3c48541c6be6daacf82e3b05885de63b88344d137c306d9
-DIST nkf-2.1.3.tar.gz 195020 BLAKE2B 7ffd2acdc16d98cfe1e7a73ff5999756a1c46e5dbbbf349d296f11526c077c42a64b1657d3a6bf8bee1326768ec06fe9d2aea02e5f8ba02e77626bb1316d1484 SHA512 e40798d4084657b545bdaa9904229b0a424a9be076c16993b97d206c3e82490c45288eaab417c6eea70b770f89530f90e98e1a659f8f7e4b928eea4396d1e738
 DIST nkf-2.1.4.tar.gz 232479 BLAKE2B 81887b8b0422e92b2fa2be285c1d9fa4da16d572ca50e1fbeef7be4f50af9ba9b64ef140163e325e57c351dd384ee8b09849bad7c37b03d48a9cb4b88f2ee199 SHA512 8667c20a6c5e9c0c6df7ebe2571bcf24090f04dafd306d32f07312acd659ea026a91d31521b4b213f77aba8218159effd73607d0b7236b7287e4a4cde8cc62b9
 DIST nkf-2.1.5.tar.gz 215879 BLAKE2B b5ae8f51b0ed97261f9e82ad469adbc9e469e709dc5acb64bfba48881555931eade5fcb772e7956a7401399008ec33bd57c8d6d8b5790eefe4d69d4e1dabed7c SHA512 fa5b683184481b25249872e7902033a72b6a6219b4c63d508a738710029430733e78cfa13b3d69dc281676762765e0452c92244a3855d3acbb5e23aa63214847
-DIST nkf.1j 24160 BLAKE2B 1d461dbacfb6e5ee358d7ea162582da5042a03f02448791c4ed33a10e9eb6e5907220db8d70aea691e3908252daffcbacdaab1b9fe52b0e4e25f7b590e5bca72 SHA512 4680dfb59ceb9db5031ecefeca808e34202c841309d5b634cdd7aa89ee97118701ddeddb0ae18a2cf791987929dc9c5a528275cb1f63b1742eac2197ac9c1416
 DIST python-nkf-0.2.0_p20141211.tar.gz 187761 BLAKE2B b607e155934dd14ad4d29298f209a233d846122299326df48e45339661d1cd08a789f5278928cb4a32c747673723f5f8877d98c7a6200af6b2dbbf29cd100f00 SHA512 5a493f32244e3cb72d188fa39b810baef31ce5f530309797a05474e3f58cf22fd5f8b6c66cdf5268451c49ffb759c476c707329ce1ccf42da0362ad4f5c24d71
 DIST python-nkf-0.2.0_p20191121.tar.gz 188496 BLAKE2B f7c9baaff8129956b7981011634f7ee5ece97e1b6650551a5cc2b50ff51a0c96a454f39e888c80120242a12b202c0422c0ecfc21858b1822a4959ff4c108b10d SHA512 ae1494ebdd488dc40802178a1b7b05c9a9b0bcf9cf9fa5017c6bc9f153c01b475c00f993489a21f643acc4ad61595c38c5afe28f3512a4d24f36eda7abd33958

diff --git a/app-i18n/nkf/files/nkf-2.1.3-strip.patch b/app-i18n/nkf/files/nkf-2.1.3-strip.patch
deleted file mode 100644
index 5cfac8820f8..00000000000
--- a/app-i18n/nkf/files/nkf-2.1.3-strip.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/NKF.python/setup.py
-+++ b/NKF.python/setup.py
-@@ -8,5 +8,4 @@
-        author="Matsumoto Tadashi",
-        author_email="ma2@city.plala.jp",
-        ext_modules = [
--               Extension("nkf", ["NKF_python.c"],
--                         extra_link_args = ['-s'])])
-+               Extension("nkf", ["NKF_python.c"])])

diff --git a/app-i18n/nkf/nkf-2.1.3-r2.ebuild b/app-i18n/nkf/nkf-2.1.3-r2.ebuild
deleted file mode 100644
index a4a6e0e67a3..00000000000
--- a/app-i18n/nkf/nkf-2.1.3-r2.ebuild
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_OPTIONAL="1"
-DISTUTILS_USE_SETUPTOOLS="no"
-
-inherit distutils-r1 perl-module toolchain-funcs
-
-DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
-HOMEPAGE="https://osdn.net/projects/nkf/"
-SRC_URI="mirror://sourceforge.jp/${PN}/59912/${P}.tar.gz
-	l10n_ja? ( https://dev.gentoo.org/~naota/files/${PN}.1j )
-	python? ( https://dev.gentoo.org/~naota/files/NKF_python20090602.tgz )"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-macos"
-IUSE="perl python l10n_ja"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-RDEPEND="python? (
-		${PYTHON_DEPS}
-		$(python_gen_cond_dep '
-			dev-python/setuptools[${PYTHON_USEDEP}]
-		')
-	)"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
-	sed -i \
-		-e "/^CFLAGS/{ s/-g -O2//; s/=/+=/; }" \
-		-e "/ -o ${PN}/s/\(-o \)/\$(LDFLAGS) \1/" \
-		Makefile
-	if use l10n_ja; then
-		cp "${DISTDIR}"/${PN}.1j ${PN}.ja.1 || die
-	fi
-	if use python; then
-		mv "${WORKDIR}"/NKF.python . || die
-		eapply "${FILESDIR}"/${P}-strip.patch
-		cd NKF.python
-		distutils-r1_src_prepare
-		cd - >/dev/null
-	fi
-
-	default
-}
-
-src_configure() {
-	default
-	if use perl; then
-		cd NKF.mod
-		perl-module_src_configure
-		cd - >/dev/null
-	fi
-	if use python; then
-		cd NKF.python
-		distutils-r1_src_configure
-		cd - >/dev/null
-	fi
-}
-
-src_compile() {
-	emake CC="$(tc-getCC)"
-	if use perl; then
-		cd NKF.mod
-		perl-module_src_compile
-		cd - >/dev/null
-	fi
-	if use python; then
-		cd NKF.python
-		distutils-r1_src_compile
-		cd - >/dev/null
-	fi
-}
-
-src_test() {
-	default
-	if use perl; then
-		cd NKF.mod
-		perl-module_src_test
-		cd - >/dev/null
-	fi
-}
-
-src_install() {
-	dobin ${PN}
-	doman ${PN}.1
-
-	if use l10n_ja; then
-		doman ${PN}.ja.1
-	fi
-	dodoc ${PN}.doc
-
-	if use perl; then
-		cd NKF.mod
-		docinto perl
-		perl-module_src_install
-		cd - >/dev/null
-	fi
-	if use python; then
-		cd NKF.python
-		docinto python
-		DOCS= distutils-r1_src_install
-		dodoc README
-		cd - >/dev/null
-	fi
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/nkf/, app-i18n/nkf/files/
@ 2022-10-04  5:07 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-10-04  5:07 UTC (permalink / raw
  To: gentoo-commits

commit:     d7838f82889905b9bb599a551b8ed2a89a7181a0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 05:00:18 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 05:07:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7838f82

app-i18n/nkf: fix build w/ Clang 15

Closes: https://bugs.gentoo.org/874303
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../nkf/files/nkf-2.1.5-python-ssize_t-deux.patch  |  45 ++++++++
 app-i18n/nkf/files/nkf-2.1.5-python-ssize_t.patch  |  71 +++++++++++++
 app-i18n/nkf/nkf-2.1.5-r1.ebuild                   | 117 +++++++++++++++++++++
 3 files changed, 233 insertions(+)

diff --git a/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t-deux.patch b/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t-deux.patch
new file mode 100644
index 000000000000..355951cab319
--- /dev/null
+++ b/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t-deux.patch
@@ -0,0 +1,45 @@
+https://github.com/fumiyas/python-nkf/pull/7
+
+From abdebb9d49619d9b9cafa172d2ad7c171f3977d4 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 4 Oct 2022 05:56:12 +0100
+Subject: [PATCH] Use designated initialiser syntax for PyModuleDef
+
+Fixes build with Clang. Switch to the more readable designated
+initialiser syntax to avoid having to lookup member order.
+
+Before, Clang would complain:
+```
+nkf.c:205:3: error: incompatible pointer to integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of type 'void *' [-Wint-conversion]
+  NULL,
+  ^~~~
+/usr/lib/llvm/16/bin/../../../../lib/clang/16.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
+               ^~~~~~~~~~
+2 warnings and 1 error generated.
+```
+
+This is because some of PyModuleDef's members are actually
+Py_ssize_t so chucking a NULL in looks like a codesmell to Clang.
+
+Bug: https://bugs.gentoo.org/874303
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/NKF.python/nkf.c
++++ b/NKF.python/nkf.c
+@@ -200,14 +200,8 @@ nkfmethods[] = {
+ static struct PyModuleDef
+ moduledef = {
+   PyModuleDef_HEAD_INIT,
+-  "nkf",
+-  NULL,
+-  NULL,
+-  nkfmethods,
+-  NULL,
+-  NULL,
+-  NULL,
+-  NULL
++  .m_name = "nkf",
++  .m_methods = nkfmethods
+ };
+ 
+ /* Module initialization function */
+

diff --git a/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t.patch b/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t.patch
new file mode 100644
index 000000000000..6aa986866e0d
--- /dev/null
+++ b/app-i18n/nkf/files/nkf-2.1.5-python-ssize_t.patch
@@ -0,0 +1,71 @@
+https://github.com/nurse/nkf/commit/8246108073f739d45a21ef42ad2d9342fa3c6c28
+
+From 8246108073f739d45a21ef42ad2d9342fa3c6c28 Mon Sep 17 00:00:00 2001
+From: slic <slic-io@users.noreply.github.com>
+Date: Sun, 6 Mar 2022 18:05:54 +0900
+Subject: [PATCH] fix: python3 extention ABI # variant when parsing warning
+
+--- a/NKF.python3/NKF_python.c
++++ b/NKF.python3/NKF_python.c
+@@ -20,6 +20,8 @@ Changes.
+ **    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
+ ***************************************************************************/
+ 
++#define PY_SSIZE_T_CLEAN
++
+ #include "Python.h"
+ #include <setjmp.h>
+ 
+@@ -33,7 +35,7 @@ Changes.
+ #undef FALSE
+ #define putchar(c)      pynkf_putchar(c)
+ 
+-static int pynkf_ibufsize, pynkf_obufsize;
++static Py_ssize_t pynkf_ibufsize, pynkf_obufsize;
+ static unsigned char *pynkf_inbuf, *pynkf_outbuf;
+ static int pynkf_icount,pynkf_ocount;
+ static unsigned char *pynkf_iptr, *pynkf_optr;
+@@ -62,7 +64,7 @@ pynkf_ungetc(int c, FILE *f)
+ static void
+ pynkf_putchar(int c)
+ {
+-  size_t size;
++  Py_ssize_t size;
+   unsigned char *p;
+ 
+   if (pynkf_guess_flag) {
+@@ -89,7 +91,7 @@ pynkf_putchar(int c)
+ #include "../nkf.c"
+ 
+ static PyObject *
+-pynkf_convert(unsigned char* str, int strlen, char* opts, int optslen)
++pynkf_convert(unsigned char* str, Py_ssize_t strlen, char* opts, Py_ssize_t optslen)
+ {
+   PyObject * res;
+ 
+@@ -157,12 +159,12 @@ static
+ PyObject *pynkf_nkf(PyObject *self, PyObject *args)
+ {
+   unsigned char *str;
+-  int strlen;
++  Py_ssize_t strlen;
+   char *opts;
+-  int optslen;
++  Py_ssize_t optslen;
+   PyObject* res;
+ 
+-  if (!PyArg_ParseTuple(args, "s#y#", &opts, &optslen, &str, &strlen)) {
++  if (!PyArg_ParseTuple(args, "s#s#", &opts, &optslen, &str, &strlen)) {
+     return NULL;
+   }
+   res = pynkf_convert(str, strlen, opts, optslen);
+@@ -178,7 +180,7 @@ PyObject *pynkf_guess(PyObject *self, PyObject *args)
+   int strlen;
+   PyObject* res;
+ 
+-  if (!PyArg_ParseTuple(args, "y#", &str, &strlen)) {
++  if (!PyArg_ParseTuple(args, "s#", &str, &strlen)) {
+     return NULL;
+   }
+   res = pynkf_convert_guess(str, strlen);
+

diff --git a/app-i18n/nkf/nkf-2.1.5-r1.ebuild b/app-i18n/nkf/nkf-2.1.5-r1.ebuild
new file mode 100644
index 000000000000..095d49cf0515
--- /dev/null
+++ b/app-i18n/nkf/nkf-2.1.5-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_OPTIONAL="1"
+
+inherit distutils-r1 perl-module toolchain-funcs vcs-snapshot
+
+PY_P="python-${PN}-0.2.0_p20191121"
+PY_COMMIT="c2c6724714b66f295137c8818dae4c09fc09e0a3"
+
+DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
+HOMEPAGE="https://osdn.net/projects/nkf/"
+SRC_URI="mirror://sourceforge.jp/${PN}/70406/${P}.tar.gz
+	python? ( https://github.com/fumiyas/python-${PN}/archive/${PY_COMMIT}.tar.gz -> ${PY_P}.tar.gz )"
+
+LICENSE="ZLIB python? ( BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="perl python l10n_ja"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="python? (
+		${PYTHON_DEPS}
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	)"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-python-ssize_t.patch
+	"${FILESDIR}"/${PN}-2.1.5-python-ssize_t-deux.patch
+)
+
+src_unpack() {
+	use python && vcs-snapshot_src_unpack || default
+}
+
+src_prepare() {
+	sed -i \
+		-e "/^CFLAGS/{ s/-g -O2//; s/=/+=/; }" \
+		-e "/ -o ${PN}/s/\(-o \)/\$(LDFLAGS) \1/" \
+		Makefile
+	if use python; then
+		mv "${WORKDIR}"/${PY_P} NKF.python || die
+		eapply "${FILESDIR}"/${PN}-python.patch
+		cd NKF.python || die
+		distutils-r1_src_prepare
+		cd - >/dev/null || die
+	fi
+
+	default
+}
+
+src_configure() {
+	default
+	if use perl; then
+		cd NKF.mod || die
+		perl-module_src_configure
+		cd - >/dev/null || die
+	fi
+	if use python; then
+		cd NKF.python || die
+		distutils-r1_src_configure
+		cd - >/dev/null || die
+	fi
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+	if use perl; then
+		cd NKF.mod || die
+		perl-module_src_compile
+		cd - >/dev/null || die
+	fi
+	if use python; then
+		cd NKF.python || die
+		distutils-r1_src_compile
+		cd - >/dev/null || die
+	fi
+}
+
+src_test() {
+	default
+	if use perl; then
+		cd NKF.mod || die
+		perl-module_src_test
+		cd - >/dev/null || die
+	fi
+}
+
+src_install() {
+	dobin ${PN}
+	doman ${PN}.1
+
+	if use l10n_ja; then
+		iconv -f ISO-2022-JP-3 -t UTF-8 ${PN}.1j > ${PN}.ja.1 || die
+		doman ${PN}.ja.1
+	fi
+	dodoc ${PN}.doc
+
+	if use perl; then
+		cd NKF.mod || die
+		docinto perl
+		perl-module_src_install
+		cd - >/dev/null || die
+	fi
+	if use python; then
+		cd NKF.python || die
+		docinto python
+		DOCS= distutils-r1_src_install
+		dodoc CHANGES README.md
+		cd - >/dev/null || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/nkf/, app-i18n/nkf/files/
@ 2018-07-31 12:43 Akinori Hattori
  0 siblings, 0 replies; 3+ messages in thread
From: Akinori Hattori @ 2018-07-31 12:43 UTC (permalink / raw
  To: gentoo-commits

commit:     3c10dea506923c49468ff262e256aa38fdaa6dab
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 31 12:43:29 2018 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Tue Jul 31 12:43:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c10dea5

app-i18n/nkf: new upstream release

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 app-i18n/nkf/Manifest                     |  2 +
 app-i18n/nkf/files/nkf-2.1.4-python.patch | 13 +++++
 app-i18n/nkf/nkf-2.1.4.ebuild             | 90 +++++++++++++++++++++++++++++++
 3 files changed, 105 insertions(+)

diff --git a/app-i18n/nkf/Manifest b/app-i18n/nkf/Manifest
index d45655ec517..5376dcc7dea 100644
--- a/app-i18n/nkf/Manifest
+++ b/app-i18n/nkf/Manifest
@@ -1,3 +1,5 @@
 DIST NKF_python20090602.tgz 2318 BLAKE2B 54399912fce0f4486e4051825319294a214089a59fa9b40e93bdc77859e79e5586abf2d197511cb158b094663993a692c981885e9db8fe260a5a746771168509 SHA512 3baee969daaba43e7ddee0d3b6d3d73ed67cfb0a3c3cbdabcdcda9fa1e61ccf374cd686ee096d031c3c48541c6be6daacf82e3b05885de63b88344d137c306d9
 DIST nkf-2.1.3.tar.gz 195020 BLAKE2B 7ffd2acdc16d98cfe1e7a73ff5999756a1c46e5dbbbf349d296f11526c077c42a64b1657d3a6bf8bee1326768ec06fe9d2aea02e5f8ba02e77626bb1316d1484 SHA512 e40798d4084657b545bdaa9904229b0a424a9be076c16993b97d206c3e82490c45288eaab417c6eea70b770f89530f90e98e1a659f8f7e4b928eea4396d1e738
+DIST nkf-2.1.4.tar.gz 232479 BLAKE2B 81887b8b0422e92b2fa2be285c1d9fa4da16d572ca50e1fbeef7be4f50af9ba9b64ef140163e325e57c351dd384ee8b09849bad7c37b03d48a9cb4b88f2ee199 SHA512 8667c20a6c5e9c0c6df7ebe2571bcf24090f04dafd306d32f07312acd659ea026a91d31521b4b213f77aba8218159effd73607d0b7236b7287e4a4cde8cc62b9
 DIST nkf.1j 24160 BLAKE2B 1d461dbacfb6e5ee358d7ea162582da5042a03f02448791c4ed33a10e9eb6e5907220db8d70aea691e3908252daffcbacdaab1b9fe52b0e4e25f7b590e5bca72 SHA512 4680dfb59ceb9db5031ecefeca808e34202c841309d5b634cdd7aa89ee97118701ddeddb0ae18a2cf791987929dc9c5a528275cb1f63b1742eac2197ac9c1416
+DIST python-nkf-0.2.0_p20141211.tar.gz 187761 BLAKE2B b607e155934dd14ad4d29298f209a233d846122299326df48e45339661d1cd08a789f5278928cb4a32c747673723f5f8877d98c7a6200af6b2dbbf29cd100f00 SHA512 5a493f32244e3cb72d188fa39b810baef31ce5f530309797a05474e3f58cf22fd5f8b6c66cdf5268451c49ffb759c476c707329ce1ccf42da0362ad4f5c24d71

diff --git a/app-i18n/nkf/files/nkf-2.1.4-python.patch b/app-i18n/nkf/files/nkf-2.1.4-python.patch
new file mode 100644
index 00000000000..6f9e2e687e0
--- /dev/null
+++ b/app-i18n/nkf/files/nkf-2.1.4-python.patch
@@ -0,0 +1,13 @@
+--- a/NKF.python/nkf.c
++++ b/NKF.python/nkf.c
+@@ -78,8 +78,8 @@
+ }
+ 
+ #define PERL_XS 1
+-#include "nkf-dist/utf8tbl.c"
+-#include "nkf-dist/nkf.c"
++#include "../utf8tbl.c"
++#include "../nkf.c"
+ 
+ static PyObject *
+ pynkf_convert(unsigned char* str, int strlen, char* opts, int optslen)

diff --git a/app-i18n/nkf/nkf-2.1.4.ebuild b/app-i18n/nkf/nkf-2.1.4.ebuild
new file mode 100644
index 00000000000..9f6f6f5d630
--- /dev/null
+++ b/app-i18n/nkf/nkf-2.1.4.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1 perl-module toolchain-funcs vcs-snapshot
+
+PY_P="python-${PN}-0.2.0_p20141211"
+PY_COMMIT="000915e115acac57a1fdbceb1e6361788af83a3d"
+
+DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
+HOMEPAGE="http://sourceforge.jp/projects/nkf/"
+SRC_URI="mirror://sourceforge.jp/${PN}/64158/${P}.tar.gz
+	python? ( https://github.com/fumiyas/python-${PN}/archive/${PY_COMMIT}.tar.gz -> ${PY_P}.tar.gz )"
+
+LICENSE="ZLIB python? ( BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-macos"
+IUSE="perl python l10n_ja"
+
+src_prepare() {
+	sed -i \
+		-e "/^CFLAGS/{ s/-g -O2//; s/=/+=/; }" \
+		-e "/ -o ${PN}/s/\(-o \)/\$(LDFLAGS) \1/" \
+		Makefile
+	if use python; then
+		mv "${WORKDIR}"/${PY_P} NKF.python || die
+		eapply "${FILESDIR}"/${P}-python.patch
+	fi
+
+	default
+}
+
+src_configure() {
+	default
+	if use perl; then
+		cd NKF.mod
+		perl-module_src_configure
+		cd - >/dev/null
+	fi
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+	if use perl; then
+		cd NKF.mod
+		perl-module_src_compile
+		cd - >/dev/null
+	fi
+	if use python; then
+		cd NKF.python
+		distutils-r1_src_compile
+		cd - >/dev/null
+	fi
+}
+
+src_test() {
+	default
+	if use perl; then
+		cd NKF.mod
+		perl-module_src_test
+		cd - >/dev/null
+	fi
+}
+
+src_install() {
+	dobin ${PN}
+	doman ${PN}.1
+
+	if use l10n_ja; then
+		iconv -f ISO-2022-JP-3 -t UTF-8 ${PN}.1j > ${PN}.ja.1 || die
+		doman ${PN}.ja.1
+	fi
+	dodoc ${PN}.doc
+
+	if use perl; then
+		cd NKF.mod
+		docinto perl
+		perl-module_src_install
+		cd - >/dev/null
+	fi
+	if use python; then
+		cd NKF.python
+		docinto python
+		DOCS= distutils-r1_src_install
+		dodoc CHANGES README.md
+		cd - >/dev/null
+	fi
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-04  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-18 14:13 [gentoo-commits] repo/gentoo:master commit in: app-i18n/nkf/, app-i18n/nkf/files/ Akinori Hattori
  -- strict thread matches above, loose matches on Subject: below --
2022-10-04  5:07 Sam James
2018-07-31 12:43 Akinori Hattori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox