add a desktop file for WordNet, based on a diff from Michael Reed

- clean up Makefile while there

- don't USE_GROFF, there's a small issue with table formatting in
wnpkgs(7) (not wrapping so lines are long) but it's pretty unimportant
and otherwise now working well with mandoc
This commit is contained in:
sthen 2016-04-09 11:42:09 +00:00
parent 7bdf33e794
commit 20c2570a28
3 changed files with 23 additions and 11 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.12 2014/11/30 05:41:35 brad Exp $
# $OpenBSD: Makefile,v 1.13 2016/04/09 11:42:09 sthen Exp $
COMMENT= browser for a large lexical database of English
V= 3.0
DISTNAME= WordNet-$V
PKGNAME= wordnet-$V
REVISION= 5
REVISION= 6
CATEGORIES= misc
@ -16,19 +17,14 @@ MAINTAINER= Stuart Henderson <sthen@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += X11 Xau Xdmcp Xext Xft Xrender Xss c expat fontconfig
WANTLIB += freetype m pthread-stubs xcb z
WANTLIB += freetype m pthread-stubs xcb z ${MODTK_WANTLIB}
MASTER_SITES= http://wordnet.princeton.edu/3.0/
MODULES= x11/tk
RUN_DEPENDS += devel/desktop-file-utils
LIB_DEPENDS += ${MODTK_LIB_DEPENDS}
WANTLIB += ${MODTK_WANTLIB}
pre-configure:
@${SUBST_CMD} ${WRKSRC}/include/wn.h ${WRKSRC}/src/wnb
@perl -pi -e 's,/usr/local/WordNet-3.0,${PREFIX}/share/wordnet,; \
s,([0-9])WN,$$1,g' \${WRKSRC}/doc/man/*.[1-9]
CONFIGURE_STYLE= simple
@ -44,7 +40,16 @@ CFLAGS+= -I${MODTK_INCDIR} -I${MODTCL_INCDIR}
CONFIGURE_ENV+= CFLAGS="${CFLAGS}"
USE_GROFF = Yes
NO_TEST= Yes
pre-configure:
@${SUBST_CMD} ${WRKSRC}/include/wn.h ${WRKSRC}/src/wnb
@perl -pi -e 's,/usr/local/WordNet-3.0,${PREFIX}/share/wordnet,; \
s,([0-9])WN,$$1,g' \${WRKSRC}/doc/man/*.[1-9]
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
${SUBST_DATA} ${FILESDIR}/wordnet.desktop \
${PREFIX}/share/applications/wordnet.desktop
.include <bsd.port.mk>

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=WordNet Browser
Exec=${TRUEPREFIX}/bin/wnb %f

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.2 2008/09/01 20:02:53 sthen Exp $
@comment $OpenBSD: PLIST,v 1.3 2016/04/09 11:42:09 sthen Exp $
@bin bin/wishwn
@bin bin/wn
bin/wnb
@ -27,6 +27,7 @@ lib/libWN.a
@man man/man7/wnlicens.7
@man man/man7/wnpkgs.7
@man man/man7/wnstats.7
share/applications/wordnet.desktop
share/wordnet/
share/wordnet/dict/
share/wordnet/dict/adj.exc
@ -56,3 +57,5 @@ share/wordnet/lib/wnres/license.txt
share/wordnet/lib/wnres/wn.xbm
share/wordnet/lib/wnres/wnb.man
share/wordnet/lib/wnres/wngloss.man
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database