1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

Support the original dictionary EIJIRO included in a book sold by ALC Inc.

In the version, the dictionary files are archived in LHA format

Change ${ENV} to ${SETENV}

Submitted by: knu

Fix the dependency
  Using FreePWING 1.4.3, deleting CR after NL is not necessary
  So nkf is not necessary.
  After FreePWING 1.4.2, catdump is used in FreePWING instead of
  epwutil.
This commit is contained in:
Satoshi Taoka 2002-09-15 05:48:30 +00:00
parent eda1c349ae
commit 8ede6d055b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=66344
3 changed files with 60 additions and 21 deletions

View File

@ -13,8 +13,8 @@ DISTNAME= ${PORTNAME}${PORTVERSION}-src
MAINTAINER= taoka@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
nkf:${PORTSDIR}/japanese/nkf \
BUILD_DEPENDS= ${LOCALBASE}/libexec/freepwing/catdump:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Jcode.pm:${PORTSDIR}/japanese/p5-Jcode
RESTRICTED= "The original dictionary is not free"
@ -23,10 +23,24 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/eijiro-fpw${PORTVERSION}
DICT_PATH?= /cdrom
SRCFILE?= eijiro52.txt
MAKE_ENV= PORT_SRCFILE=${DICT_PATH}/${SRCFILE}
# For eijiro included in a book sold by ALC Inc.
# (http://www.alc.co.jp/alcshop/eng/eijiro/)
.if exists(${DICT_PATH}/eijiro-original)
BUILD_DEPENDS+= lha:${PORTSDIR}/archivers/lha
CDROM_PATH:= ${DICT_PATH}
DICT_PATH:= ${WRKDIR}
.else
CDROM_PATH= ${NONEXISTENT}
.endif
MAKE_ARGS:= PORT_SRCFILE=${DICT_PATH}/${SRCFILE}
post-extract:
@if [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
@if [ -f ${CDROM_PATH}/eijiro-original/*.exe ]; then \
lha xiw=${WRKDIR} ${CDROM_PATH}/eijiro-original/*.exe '*/${SRCFILE}'; \
elif [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
${ECHO} "###################################################"; \
${ECHO} "I cannot find a file ${DICT_PATH}/${SRCFILE}"; \
${ECHO} "Specify the Eijiro Dictionary file with the full path"; \
@ -40,8 +54,8 @@ post-extract:
${CP} ${LOCALBASE}/share/doc/freepwing/fpwutils.mk ${WRKSRC}
post-build:
cd ${WRKSRC}; nkf -eSd catalogs.sjis > catalogs.txt; \
fpwmake catalogs
cd ${WRKSRC}; ${CP} catalogs.sjis catalogs.txt; \
${SETENV} CATDUMPFLAGS="-e sjis" fpwmake catalogs
do-install:
${MKDIR} ${PREFIX}/share/dict/eijiro-fpw/eijiro/data

View File

@ -14,8 +14,8 @@ DISTNAME= ${PORTNAME}${PORTVERSION:S/.a/a/}-src
MAINTAINER= taoka@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
nkf:${PORTSDIR}/japanese/nkf \
BUILD_DEPENDS= ${LOCALBASE}/libexec/freepwing/catdump:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Jcode.pm:${PORTSDIR}/japanese/p5-Jcode
RESTRICTED= "The original dictionary is not free"
@ -24,10 +24,25 @@ USE_GMAKE= yes
WRKSRC= ${WRKDIR}/otojiro-fpw${PORTVERSION:S/.a/a/}
DICT_PATH?= /cdrom
SRCFILE?= otojiro.txt
MAKE_ENV= OTOJIRO_FILE=${DICT_PATH}/${SRCFILE}
pre-extract::
@if [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
# For eijiro included in a book sold by ALC Inc.
# (http://www.alc.co.jp/alcshop/eng/eijiro/)
.if exists(${DICT_PATH}/eijiro-original)
BUILD_DEPENDS+= lha:${PORTSDIR}/archivers/lha
CDROM_PATH:= ${DICT_PATH}
DICT_PATH:= ${WRKDIR}
.else
CDROM_PATH= ${NONEXISTENT}
.endif
MAKE_ENV:= OTOJIRO_FILE=${DICT_PATH}/${SRCFILE}
post-extract:
@if [ -f ${CDROM_PATH}/eijiro-original/*.exe ]; then \
${MKDIR} ${WRKDIR}; \
lha xiw=${WRKDIR} ${CDROM_PATH}/eijiro-original/*.exe '*/${SRCFILE}'; \
elif [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
${ECHO} "###################################################"; \
${ECHO} "I cannot find a file ${DICT_PATH}/${SRCFILE}"; \
${ECHO} "Specify the Otojiro Dictionary file with the full path"; \
@ -39,14 +54,9 @@ pre-extract::
${FALSE}; \
fi
post-build:
## To delete CR after NL
cd ${WRKSRC}; ${MV} catalogs.txt catalogs.txt.org; \
nkf -sSd catalogs.txt.org > catalogs.txt; \
fpwmake catalogs
do-build:
cd ${WRKSRC}; ${ENV} ${MAKE_ENV} fpwmake
cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} fpwmake; \
fpwmake catalogs
do-install:
${MKDIR} ${PREFIX}/share/dict/otojiro-fpw/otojiro/data

View File

@ -14,7 +14,8 @@ MASTER_SITES= http://www.dsl.gr.jp/~tf/
MAINTAINER= taoka@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
BUILD_DEPENDS= ${LOCALBASE}/libexec/freepwing/catdump:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/share/doc/freepwing/fpwutils.mk:${PORTSDIR}/japanese/freepwing \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Jcode.pm:${PORTSDIR}/japanese/p5-Jcode
RESTRICTED= "The original dictionary is not free"
@ -22,10 +23,24 @@ NO_PACKAGE= "The original dictionary is not free"
USE_GMAKE= yes
DICT_PATH?= /cdrom
SRCFILE?= waeiji52.txt
MAKE_ENV= SRC_DICT=${DICT_PATH}/${SRCFILE}
# For eijiro included in a book sold by ALC Inc.
# (http://www.alc.co.jp/alcshop/eng/eijiro/)
.if exists(${DICT_PATH}/eijiro-original)
BUILD_DEPENDS+= lha:${PORTSDIR}/archivers/lha
CDROM_PATH:= ${DICT_PATH}
DICT_PATH:= ${WRKDIR}
.else
CDROM_PATH= ${NONEXISTENT}
.endif
MAKE_ARGS:= SRC_DICT=${DICT_PATH}/${SRCFILE}
post-extract:
@if [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
@if [ -f ${CDROM_PATH}/eijiro-original/*.exe ]; then \
lha xiw=${WRKDIR} ${CDROM_PATH}/eijiro-original/*.exe '*/${SRCFILE}'; \
elif [ ! -f ${DICT_PATH}/${SRCFILE} ]; then \
${ECHO} "###################################################"; \
${ECHO} "I cannot find a file ${DICT_PATH}/${SRCFILE}"; \
${ECHO} "Specify the Waeijiro Dictionary file with the full path"; \