Bug 190482 - [patch] editors/nvi-m17n option to set default encoding and canna support
Summary: [patch] editors/nvi-m17n option to set default encoding and canna support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 03:59 UTC by Yasuhito FUTATSUKI
Modified: 2014-07-17 13:39 UTC (History)
2 users (show)

See Also:


Attachments
patch for nvi-m17n/Makefile (3.52 KB, patch)
2014-06-16 07:46 UTC, Yasuhito FUTATSUKI
no flags Details | Diff
shebang fix, against r361894 (567 bytes, patch)
2014-07-17 09:23 UTC, Yasuhito FUTATSUKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhito FUTATSUKI 2014-06-02 03:59:00 UTC
nvi-m17n has a configure option to set default multibyte encoding.
It has also the option to support Canna japanese Kana-Kanji conversion system.
Those options had supported on ports in chinese, japanese, korean categories,
before 2011-05-02, expired by patch distribution site disappered, but these
locallized ports didn't revive when editors/nvi-m17n ports revived.

So, I make a patch to make these options selectable.

Fix:
Apply patch attached below.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 355773)
+++ Makefile	(working copy)
@@ -22,10 +22,83 @@
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	OPTFLAG='-D_PATH_SYSEXRC=\"${PREFIX}/etc/vi.exrc\"'
-CONFIGURE_ARGS=	--enable-multibyte --program-prefix=n
+CONFIGURE_ARGS=	--program-prefix=n
 
+OPTIONS_RADIO=	MULTIBYTE
+OPTIONS_RADIO_MULTIBYTE=	EUC_JP EUC_CN EUC_KR ISO_8859_1 ISO_8859_2\
+				ISO_8859_3 ISO_8859_4 ISO_8859_7 ISO_8859_8\
+				ISO_8859_9 ISO_2022_CN ISO_2022_JP\
+				ISO_2022_JP_3 ISO_2022_KR CTEXT\
+				SJIS BIG5 EUC_TW
+OPTIONS_DEFINE=		CANNA
+OPTIONS_DEFAULT=
+EUC_JP_DESC=		Set euc-jp        as default multibyte encoding
+EUC_CN_DESC=		Set euc-cn        as default multibyte encoding
+EUC_KR_DESC=		Set euc-kr        as default multibyte encoding
+ISO_8859_1_DESC=	Set iso-8859-1    as default multibyte encoding
+ISO_8859_2_DESC=	Set iso-8859-2    as default multibyte encoding
+ISO_8859_3_DESC=	Set iso-8859-3    as default multibyte encoding
+ISO_8859_4_DESC=	Set iso-8859-4    as default multibyte encoding
+ISO_8859_7_DESC=	Set iso-8859-7    as default multibyte encoding
+ISO_8859_8_DESC=	Set iso-8859-8    as default multibyte encoding
+ISO_8859_9_DESC=	Set iso-8859-9    as default multibyte encoding
+ISO_2022_CN_DESC=	Set iso-2022-cn   as default multibyte encoding
+ISO_2022_JP_DESC=	Set iso-2022-jp   as default multibyte encoding
+ISO_2022_JP_3_DESC=	Set iso-2022-jp-3 as default multibyte encoding
+ISO_2022_KR_DESC=	Set iso-2022-kr   as default multibyte encoding
+CTEXT_DESC=		Set X11 compound  as default multibyte encoding
+SJIS_DESC=		Set sjis          as default multibyte encoding
+BIG5_DESC=		Set big5          as default multibyte encoding
+EUC_TW_DESC=		Set euc-tw        as default multibyte encoding
+CANNA_DESC=		Enable canna support
+
 .include <bsd.port.pre.mk>
 
+.if ${PORT_OPTIONS:MEUC_JP}
+CONFIGURE_ARGS+=	--enable-multibyte=euc-jp
+.elif ${PORT_OPTIONS:MEUC_CN}
+CONFIGURE_ARGS+=	--enable-multibyte=euc-cn
+.elif ${PORT_OPTIONS:MEUC_KR}
+CONFIGURE_ARGS+=	--enable-multibyte=euc-kr
+.elif ${PORT_OPTIONS:MISO_8859_1}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-1
+.elif ${PORT_OPTIONS:MISO_8859_2}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-2
+.elif ${PORT_OPTIONS:MISO_8859_3}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-3
+.elif ${PORT_OPTIONS:MISO_8859_4}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-4
+.elif ${PORT_OPTIONS:MISO_8859_7}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-7
+.elif ${PORT_OPTIONS:MISO_8859_8}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-8
+.elif ${PORT_OPTIONS:MISO_8859_9}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-8859-9
+.elif ${PORT_OPTIONS:MISO_2022_CN}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-2022-cn
+.elif ${PORT_OPTIONS:MISO_2022_JP}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-2022-jp
+.elif ${PORT_OPTIONS:MISO_2022_JP_3}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-2022-jp-3
+.elif ${PORT_OPTIONS:MISO_2022_KR}
+CONFIGURE_ARGS+=	--enable-multibyte=iso-2022-kr
+.elif ${PORT_OPTIONS:MCTEXT}
+CONFIGURE_ARGS+=	--enable-multibyte=ctext
+.elif ${PORT_OPTIONS:MSJIS}
+CONFIGURE_ARGS+=	--enable-multibyte=sjis
+.elif ${PORT_OPTIONS:MBIG5}
+CONFIGURE_ARGS+=	--enable-multibyte=big5
+.elif ${PORT_OPTIONS:MEUC_TW}
+CONFIGURE_ARGS+=	--enable-multibyte=euc-tw
+.else
+CONFIGURE_ARGS+=	--enable-multibyte
+.endif
+
+.if ${PORT_OPTIONS:MCANNA}
+CONFIGURE_ARGS+=	--enable-canna=${PREFIX}
+LIB_DEPEND=	canna.1:${PORTSDIR}/japanese/Canna
+.endif
+
 post-patch:
 	${LN} -s /usr/include/sys/queue.h ${WRKSRC}/../include/sys/queue_dist.h
Comment 1 John Marino freebsd_committer freebsd_triage 2014-06-16 07:31:12 UTC
Please provide patch again, but as as attachment this time.  It's showing as part of a comment which is inconvenient for committers.

Note: This port has no maintainer.
Comment 2 Yasuhito FUTATSUKI 2014-06-16 07:46:58 UTC
Created attachment 143824 [details]
patch for nvi-m17n/Makefile

Ok, I've attached the patch.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-07-12 02:42:50 UTC
A commit references this bug:

Author: marino
Date: Sat Jul 12 02:42:30 UTC 2014
New revision: 361597
URL: http://svnweb.freebsd.org/changeset/ports/361597

Log:
  editors/nvi-m17n: Add options to set default encoding and canna support

  nva-m17n has a configure option to set default multibyte encoding.  It has
  also the option to support Canna japanese Kana-Kanji conversion system.
  Those options were supported on ports in chinese, japanese and korean
  categories, before 2011-05-02, expired when patch distribution site
  disappeared, but these localized port didn't revive the option when the
  port was revived.  This patch makes the options selectable.

  PR:		190482
  Submitted by:	Yasuhito FUTATSUKI

Changes:
  head/editors/nvi-m17n/Makefile
Comment 4 John Marino freebsd_committer freebsd_triage 2014-07-15 06:43:18 UTC
Yasuhito, 

I know the following problem probably wasn't caused by your patch, but the whole port is checked after each change. This port is not maintained, so can I ask you to provide a fix for likely the trivial problem exposed below?  thanks!


https://jenkins.freebsd.org/pci/head-amd64/poudriere/data/headamd64-default/701/logs/errors/nvi-m17n-1.79.20040608_2,1.log
https://jenkins.freebsd.org/pci/head-i386/poudriere/data/headi386-default/701/logs/errors/nvi-m17n-1.79.20040608_2,1.log

====> Running Q/A tests (stage-qa)
Error: 'no' is an invalid shebang you need USES=shebangfix for 'bin/regular'
Error: 'no' is an invalid shebang you need USES=shebangfix for 'bin/qregular'
Comment 5 Yasuhito FUTATSUKI 2014-07-15 11:20:47 UTC
(In reply to John Marino from comment #4)
First of all, I thank you for commiting the patch.

> ====> Running Q/A tests (stage-qa)
> Error: 'no' is an invalid shebang you need USES=shebangfix for 'bin/regular'
> Error: 'no' is an invalid shebang you need USES=shebangfix for 'bin/qregular'

This problem comes from perl dependency of bin/regular and bin/qregular,
which I didn't know. these files are created from build/regular.in and
build/qregular.in on configure phase, by replacing first line with
perl executable path detected by configure script. Under perl5 package
installed environment, the configure script detect /usr/bin/perl5 symlink
before $PREFIX/bin/perl, so patch is needed fix it. I'll try to write
it later, so please wait a while.
Comment 6 Yasuhito FUTATSUKI 2014-07-17 09:23:08 UTC
Created attachment 144747 [details]
shebang fix, against r361894

Here is a patch against r361894, to fix shebang problem.
I checked it only 10.0-RELEASE, amd64 environment.
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-07-17 13:38:18 UTC
A commit references this bug:

Author: marino
Date: Thu Jul 17 13:37:41 UTC 2014
New revision: 362141
URL: http://svnweb.freebsd.org/changeset/ports/362141

Log:
  editors/nvi-m17n: Fix shebang issues

  Jenkins squawked about invalid shebangs after the previous update so a
  fix has been provided which involves a dependency on perl.

  PR:		190482
  Submitted by:	Yashuhito FUTATSUKI
  Reported by:	swills (Jenkins)

Changes:
  head/editors/nvi-m17n/Makefile
Comment 8 John Marino freebsd_committer freebsd_triage 2014-07-17 13:39:42 UTC
Redports liked it well enough; let's see what Jenkins says.