aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/glchess/Makefile16
-rw-r--r--games/glchess/pkg-plist15
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