diff --git a/misc/wordnet/Makefile b/misc/wordnet/Makefile index 16fd19a6f8e..a1b1043a3d2 100644 --- a/misc/wordnet/Makefile +++ b/misc/wordnet/Makefile @@ -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 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 diff --git a/misc/wordnet/files/wordnet.desktop b/misc/wordnet/files/wordnet.desktop new file mode 100644 index 00000000000..f37ee71f0d3 --- /dev/null +++ b/misc/wordnet/files/wordnet.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=WordNet Browser +Exec=${TRUEPREFIX}/bin/wnb %f diff --git a/misc/wordnet/pkg/PLIST b/misc/wordnet/pkg/PLIST index b237cd5f10c..c7d05578964 100644 --- a/misc/wordnet/pkg/PLIST +++ b/misc/wordnet/pkg/PLIST @@ -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