From 50221ff36f340323e1381ddd00ee76829258b450 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao
Date: Wed, 29 Jan 2020 02:51:59 +0000
Subject: [PATCH] japanese/ebnetd: Fix build on real environment
by changing character set of doc-ja/ebnetd-ja.texi from EUC-JP to UTF-8.
- Change pkg-install so it doesn't modify /etc/services while building package
- Bump PORTREVISION by package change
PR: 242091
Submitted by: Yasuhiro KIMURA (maintainer)
---
japanese/ebnetd/Makefile | 6 +++++-
japanese/ebnetd/pkg-install | 28 +++++++++++++++-------------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/japanese/ebnetd/Makefile b/japanese/ebnetd/Makefile
index 9483c830ffa7..636bff9957e8 100644
--- a/japanese/ebnetd/Makefile
+++ b/japanese/ebnetd/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ebnetd
PORTVERSION= 1.0
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= japanese
MASTER_SITES= ftp://ftp.sra.co.jp/pub/misc/eb/
@@ -15,6 +15,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libeb.so:japanese/eb
+USES= iconv:patch
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=${RUNDIR} --with-logdir=${LOGDIR}
CONFIGURE_ENV= PERL=${PREFIX}/bin/perl
@@ -37,6 +39,8 @@ PLIST_SUB= EBNETD_RUNDIR=${RUNDIR}/${PORTNAME} \
INFO= ebnetd ebnetd-ja
post-patch:
+ ${MV} ${WRKSRC}/doc-ja/ebnetd-ja.texi ${WRKSRC}/doc-ja/ebnetd-ja.texi.orig
+ ${ICONV_CMD} -f EUC-JP -t UTF-8 ${WRKSRC}/doc-ja/ebnetd-ja.texi.orig > ${WRKSRC}/doc-ja/ebnetd-ja.texi
${REINPLACE_CMD} -e "s/%%EBNETD_USER%%/${EBNETD_USER}/" \
-e "s/%%EBNETD_GROUP%%/${EBNETD_GROUP}/" \
${WRKSRC}/ebnetd.conf.sample.in
diff --git a/japanese/ebnetd/pkg-install b/japanese/ebnetd/pkg-install
index 747d2672696c..3988b1465c65 100644
--- a/japanese/ebnetd/pkg-install
+++ b/japanese/ebnetd/pkg-install
@@ -10,9 +10,9 @@ ask() {
question=$1
default=$2
- if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
+ if [ x${BATCH} = xno ]; then
read -p "${question} (y/n) [${default}]? " answer
- [ "${answer}" ] && default=${answer}
+ [ "${answer}" ] && default=${answer}
fi
echo ${default}
}
@@ -102,18 +102,20 @@ entry_ndtp=ndtp
port_ndtp=2010/tcp
comment_ndtp='Network Dictionary Transfer Protocol'
-echo "************************************************************************"
-if checkall ${file} ${entrylist}; then
- echo "This system has already all entries for EBNETD in ${file}."
-else
- echo "This system doesn't have some of entries for EBNETD in ${file}."
- if yesno " Would you like to add them automatically?" y; then
- cp -f ${file} ${back}
- echo " The original file is saved as ${back}."
- add ${file} ${entry_ebnet} ${port_ebnet} ${comment_ebnet}
- add ${file} ${entry_ndtp} ${port_ndtp} ${comment_ndtp}
+if [ -z "${PACKAGE_BUILDING}" ]; then
+ echo "************************************************************************"
+ if checkall ${file} ${entrylist}; then
+ echo "This system has already all entries for EBNETD in ${file}."
+ else
+ echo "This system doesn't have some of entries for EBNETD in ${file}."
+ if yesno " Would you like to add them automatically?" y; then
+ cp -f ${file} ${back}
+ echo " The original file is saved as ${back}."
+ add ${file} ${entry_ebnet} ${port_ebnet} ${comment_ebnet}
+ add ${file} ${entry_ndtp} ${port_ndtp} ${comment_ndtp}
+ fi
fi
+ echo "************************************************************************"
fi
-echo "************************************************************************"
exit 0