diff --git a/textproc/wordnet/Makefile b/textproc/wordnet/Makefile index 3afeeb1d2478..8f338b15d636 100644 --- a/textproc/wordnet/Makefile +++ b/textproc/wordnet/Makefile @@ -1,39 +1,43 @@ PORTNAME= WordNet PORTVERSION= 3.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= textproc MASTER_SITES= http://wordnetcode.princeton.edu/${PORTVERSION}/:code \ http://wordnetcode.princeton.edu/:dict DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:code wn3.1.dict.tar.gz:dict MAINTAINER= ports@virtual-estates.net COMMENT= Dictionaries and thesauri with devel. libraries (C, TCL) and browsers WWW= https://wordnet.princeton.edu/ +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + EXTRACT_ONLY= ${DISTFILES:M*code:S/:code//} EXTRACT_AFTER_ARGS=--exclude dict USES= tcl uidfix tar:bzip2 SCRIPTS_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION} MAKE_ENV+= TCL_DVER=${TCL_VER} VER=${PORTVERSION} STAGEDIR="${STAGEDIR}" +MAKE_ENV+= LOCALBASE="${LOCALBASE}" TCL_INCLUDEDIR="${TCL_INCLUDEDIR}" PLIST_SUB+= TCL_DVER=${TCL_VER} VER=${PORTVERSION} REINPLACE_ARGS= -i "" USE_LDCONFIG= yes SUB_FILES= pkg-message SUB_LIST+= TCL_VER=${TCL_VER} # Fix build on recent current -CFLAGS+= -fcommon +CFLAGS+= -fcommon -Wno-parentheses post-patch: ${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' \ ${WRKSRC}/src/wnb ${WRKSRC}/doc/man/*.? ${REINPLACE_CMD} -e 's, *\\n,\\n,' ${WRKSRC}/include/wn.h post-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${TAR} -C ${STAGEDIR}${DATADIR} -x --no-same-owner \ --strip-components 1 \ - -f ${_DISTDIR}${DISTFILES:M*dict:S/:dict//} \ + -f ${_DISTDIR}/${DISTFILES:M*dict:S/:dict//} \ `${SED} -n -e '/\.xbm/d' -e 's,^%%DATADIR%%/,dict/,p' ${PLIST}` .include diff --git a/textproc/wordnet/files/src.wnb.Makefile b/textproc/wordnet/files/src.wnb.Makefile index 63998a4d0456..df28cd2f4f70 100644 --- a/textproc/wordnet/files/src.wnb.Makefile +++ b/textproc/wordnet/files/src.wnb.Makefile @@ -1,36 +1,35 @@ PREFIX?= /usr/local TCL_DVER?= 8.4 TCL_VER= ${TCL_DVER:S/.//g} -TCL_INCDIR?= ${PREFIX}/include/tcl${TCL_DVER} CFLAGS+= -DUNIX -DDEFAULTPATH="\"${PREFIX}/share/WordNet\"" \ -DDEFAULTBIN="\"${PREFIX}/bin\"" -DHAVE_LANGINFO_CODESET -CFLAGS+= -I${.CURDIR}/../../include -I$(TCL_INCDIR) +CFLAGS+= -I${.CURDIR}/../../include -I${TCL_INCLUDEDIR} -LDADD= -L.. -lWN -L${PREFIX}/lib -ltcl${TCL_VER} # -ltk${TCL_VER} +LDADD= -L.. -lWN -L${LOCALBASE}/lib -ltcl${TCL_VER} # -ltk${TCL_VER} SHLIB_NAME= libtclwn2.so.0 SRCS= stubs.c .PATH: ${.CURDIR:H:H}/src all: pkgIndex.tcl pkgIndex.tcl: echo "package ifneeded Wordnet ${VER} [list load \ [file join ${PREFIX}/lib ${SHLIB_NAME}] Wordnet]" \ > pkgIndex.tcl LIBDIR= ${PREFIX}/lib RESDIR= ${STAGEDIR}${PREFIX}/share/WordNet/ ${LIBDIR} ${RESDIR} ${STAGEDIR}${LIBDIR}/tcl${TCL_DVER}/Wordnet: mkdir -p ${.TARGET} beforeinstall: ${RESDIR} ${STAGEDIR}${LIBDIR}/tcl${TCL_DVER}/Wordnet ${BSD_INSTALL_DATA} pkgIndex.tcl ${STAGEDIR}${LIBDIR}/tcl${TCL_DVER}/Wordnet ${BSD_INSTALL_DATA} ${.CURDIR}/*.xbm ${RESDIR} ${BSD_INSTALL_SCRIPT} ${.CURDIR:H:H}/src/wnb ${STAGEDIR}${PREFIX}/bin .include diff --git a/textproc/wordnet/scripts/configure b/textproc/wordnet/scripts/configure index 027ae612d290..bc7a5198a6cb 100644 --- a/textproc/wordnet/scripts/configure +++ b/textproc/wordnet/scripts/configure @@ -1,38 +1,42 @@ #!/bin/sh for mf in ${FILESDIR}/*Makefile ; do \ dir=`basename $mf | sed -e s%Makefile%% -e 's%\.%/%g'` case "$dir" in "man/") dir=doc/man/ ;; "src/lib/") dir=lib/ ;; "src/wn/") dir=src/ ;; "src/wnb/") dir=lib/wnres/ ;; esac dir=${WRKSRC}/$dir test -f ${dir}Makefile.orig && continue test -f ${dir}Makefile && mv ${dir}Makefile ${dir}Makefile.orig ln -s $mf ${dir}Makefile done patch -d ${WRKSRC}/src -p0 << EOPATCH Configuring the wnb script to call the right wish-binary directly --- wnb Sun Feb 22 12:49:56 1998 +++ wnb Sat Feb 26 17:41:06 2000 -@@ -1,6 +1,3 @@ +@@ -1,6 +1,7 @@ -#!/bin/sh -# the following line is evaluated by sh but ignored by tcl \\ -wishwn "\$0" "\$@" & -# the following line is evaluated by sh but ignored by tcl \\ -exec true -# the preceding lines make this script self-executing on unix systems -+#!${PREFIX}/bin/wish${TCL_DVER} ++#!${PREFIX}/bin/tclsh${TCL_DVER} + ++if {[catch {package require Tk} e]} { ++ puts stderr "The x11-toolkits/tk${TCL_DVER} must be installed for wnb to work" ++ exit 1 ++} +package require Wordnet EOPATCH