diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2014-10-31 22:44:13 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2014-10-31 22:44:13 +0800 |
commit | 4bbe0cbba792b44973736f276ad2221c11a81692 (patch) | |
tree | 7ef89aaf6876fe1f9cf5d9b407a9b334134b0a0e | |
parent | 440882e387b31f4a477d63fb2dc542a7149e4402 (diff) | |
download | freebsd-ports-gnome-4bbe0cbba792b44973736f276ad2221c11a81692.tar.gz freebsd-ports-gnome-4bbe0cbba792b44973736f276ad2221c11a81692.tar.zst freebsd-ports-gnome-4bbe0cbba792b44973736f276ad2221c11a81692.zip |
- Use OPTIONS helpers
- Don't use gettext when NLS is disabled
- Remove @exec/@unexec's handled by USES=shared-mime-info
- Drop @dirrm* from plist
-rw-r--r-- | games/glchess/Makefile | 16 | ||||
-rw-r--r-- | games/glchess/pkg-plist | 15 |
2 files changed, 8 insertions, 23 deletions
diff --git a/games/glchess/Makefile b/games/glchess/Makefile index 8269a1abe6e6..9286562d288a 100644 --- a/games/glchess/Makefile +++ b/games/glchess/Makefile @@ -16,18 +16,14 @@ USES= desktop-file-utils python shared-mime-info USE_GNOME= gconf2 USE_PYTHON= distutils GCONF_SCHEMAS= glchess.schemas + OPTIONS_DEFINE= DOCS NLS +OPTIONS_SUB= yes +NLS_USES= gettext +NLS_CONFIGURE_ENABLE= nls .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MNLS} -PLIST_SUB+= NLS="" -USES+= gettext -.else -PLIST_SUB+= NLS="@comment" -CONFIGURE_ARGS+= --disable-nls -.endif - post-patch: @${GREP} -lR "/usr/share/games/glchess" ${WRKSRC} | ${XARGS} \ ${REINPLACE_CMD} -e 's|/usr/share/games/glchess|${DATADIR}|g' @@ -35,17 +31,21 @@ post-patch: s|share/gconf/schemas|etc/gconf/schemas|g' ${WRKSRC}/setup.py post-build: +.if ${PORT_OPTIONS:MNLS} @(for lang in `${MAKE} -f ${WRKSRC}/Makefile -V LANGUAGES` ; do \ cd ${WRKSRC}/po ; \ ${LOCALBASE}/bin/msgfmt $$lang.po -o $$lang.mo ; \ done) +.endif post-install: +.if ${PORT_OPTIONS:MNLS} @(for lang in `${MAKE} -f ${WRKSRC}/Makefile -V LANGUAGES` ; do \ ${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/$$lang/LC_MESSAGES ; \ ${INSTALL_DATA} ${WRKSRC}/po/$$lang.mo \ ${STAGEDIR}${PREFIX}/share/locale/$$lang/LC_MESSAGES/glchess.mo ; \ done) +.endif @${MKDIR} ${STAGEDIR}${DOCSDIR} .for file in ChangeLog README TODO ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} diff --git a/games/glchess/pkg-plist b/games/glchess/pkg-plist index 7f82e76bb6db..83cb696130eb 100644 --- a/games/glchess/pkg-plist +++ b/games/glchess/pkg-plist @@ -214,18 +214,3 @@ share/applications/glchess.desktop %%NLS%%share/locale/zh_TW/LC_MESSAGES/glchess.mo share/mime/packages/glchess.xml share/pixmaps/glchess.svg -@dirrm %%DATADIR%%/textures -@dirrm %%DATADIR%%/gui -@dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm %%PYTHON_SITELIBDIR%%/glchess/ui -@dirrm %%PYTHON_SITELIBDIR%%/glchess/scene/opengl -@dirrm %%PYTHON_SITELIBDIR%%/glchess/scene/cairo -@dirrm %%PYTHON_SITELIBDIR%%/glchess/scene -@dirrm %%PYTHON_SITELIBDIR%%/glchess/gtkui -@dirrm %%PYTHON_SITELIBDIR%%/glchess/chess/fics -@dirrm %%PYTHON_SITELIBDIR%%/glchess/ggz -@dirrm %%PYTHON_SITELIBDIR%%/glchess/chess -@dirrm %%PYTHON_SITELIBDIR%%/glchess -@exec %%LOCALBASE%%/bin/update-mime-database %%LOCALBASE%%/share/mime -@unexec %%LOCALBASE%%/bin/update-mime-database %%LOCALBASE%%/share/mime |