diff options
author | sada <sada@FreeBSD.org> | 2001-11-19 22:01:41 +0800 |
---|---|---|
committer | sada <sada@FreeBSD.org> | 2001-11-19 22:01:41 +0800 |
commit | 25e3ebe694678be096d9a23f00dceadf95001806 (patch) | |
tree | 1980d6c83cbbf3652b5f2e27887b10d999c2dbe3 /japanese | |
parent | e4873a01ae6b8e3d5b4dc5ddc6fce9a5fbfdebce (diff) | |
download | freebsd-ports-gnome-25e3ebe694678be096d9a23f00dceadf95001806.tar.gz freebsd-ports-gnome-25e3ebe694678be096d9a23f00dceadf95001806.tar.zst freebsd-ports-gnome-25e3ebe694678be096d9a23f00dceadf95001806.zip |
- add ja-locale entry to locale.alias at pkg_add stage as same as
`make install' does.
- avoid to add multiple entries when you repeat
make install|pkg_add <--> make deinstall|pkg_delete
Revewed by: HIRAOKA Shinji <hiraoka@pc.mycom.co.jp>,
Daichi GOTO <daichi@jp.freebsd.org>
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/linux_locale/Makefile | 16 | ||||
-rw-r--r-- | japanese/linux_locale/pkg-plist | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/japanese/linux_locale/Makefile b/japanese/linux_locale/Makefile index fb069c730439..84a926fd890e 100644 --- a/japanese/linux_locale/Makefile +++ b/japanese/linux_locale/Makefile @@ -18,7 +18,7 @@ BUILD_DEPENDS= ${LCDEF_CMD}:${PORTSDIR}/emulators/linux_base USE_LINUX_PREFIX= yes WRKSRC= ${WRKDIR}/locale-ja-${VERSION} -PLIST_SUB= VER=${VERSION} +PLIST_SUB= VER=${VERSION} LINUXBASE=${LINUXBASE} VERSION= 18 SRCDEF= ${WRKSRC}/ja_JP @@ -34,6 +34,15 @@ DOCDIR= ${PREFIX}/usr/doc/locale-ja-${VERSION} LOCALE_ADD= ja_JP.EUC LOCALE_DEF_ja_JP.EUC= ja_JP.eucJP +.include <bsd.port.pre.mk> + +LOCALE_GREP= ${GREP} -q +.for locale in ${LOCALE_ADD} +LOCALE_ALIASES!= ${ECHO} ${LOCALE_ALIASES} ${locale}:${LOCALE_DEF_${locale}} +LOCALE_GREP!= ${ECHO} "${LOCALE_GREP} -e '^${locale}'" +.endfor +PLIST_SUB+= LOCALE_ALIASES="${LOCALE_ALIASES}" LOCALE_GREP="${LOCALE_GREP}" + do-build: ${MKDIR} ${WRKDIR}/LC_MESSAGES ${LCDEF_CMD} ${LCDEF_ARGS} ${WRKDIR} @@ -48,8 +57,9 @@ do-install: ${MKDIR} ${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/debian/* ${DOCDIR} .for locale in ${LOCALE_ADD} - @${ECHO} "${locale} ${LOCALE_DEF_${locale}}" \ + ${GREP} -q -e ^${locale} ${LINUXBASE}/usr/share/locale/locale.alias \ + || ${ECHO} "${locale} ${LOCALE_DEF_${locale}}" \ >> ${LINUXBASE}/usr/share/locale/locale.alias .endfor -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/japanese/linux_locale/pkg-plist b/japanese/linux_locale/pkg-plist index abba974cdad8..b452f17c56ff 100644 --- a/japanese/linux_locale/pkg-plist +++ b/japanese/linux_locale/pkg-plist @@ -10,6 +10,7 @@ usr/share/locale/ja_JP/LC_MONETARY usr/share/locale/ja_JP/LC_NUMERIC usr/share/locale/ja_JP/LC_TIME @exec ln -sf ja_JP %D/usr/share/locale/ja_JP.EUC +@exec echo %%LOCALE_GREP%% %%LINUXBASE%%/usr/share/locale/locale.alias | sh || echo -n %%LOCALE_ALIASES%% | awk -F: 'BEGIN{RS=" "}{print $1" "$2}' >> %%LINUXBASE%%/usr/share/locale/locale.alias @unexec rm -f %D/usr/share/locale/ja_JP.EUC @dirrm usr/share/locale/ja_JP/LC_MESSAGES @dirrm usr/share/locale/ja_JP |