# $Id: Portfile,v 1.9 2006/07/19 07:51:17 takanori Exp $

PortSystem		1.0
name			hyperestraier
version         1.3.3
categories      textproc net
maintainers     rsky0711@gmail.com pelopor@nifty.com

platforms       darwin
description		Hyper Estraier is a full-text search system.
long_description	\
    Hyper Estraier is a full-text search system. It has the following \
    characteristics. \
	(1) High performance of search \
 	(2) High scalability of target documents \
	(3) Perfect recall ratio by N-gram method \
	(4) High precision by hybrid mechanism of N-gram and morphological analyzer \
	(5) Phrase search, regular expressions, attribute search, and similarity search \
    (6) Multilingualism with Unicode \
	(7) Independent of file format and repository \
	(8) Intelligent web crawler \
	(9) Simple and powerful API \
	(10) Supporting P2P architecture.

homepage	 	http://hyperestraier.sourceforge.net/
master_sites    ${homepage} \
				sourceforge:${name}
checksums       md5    d2c544f48b8b92a62d7028c68736ce40 \
                sha1   857dba712fd30be7e8d0fbec5ea0a150664522e6 \
                rmd160 834f401f02231a5f48c7b8354d8ab8599d82155b

depends_build	bin:pkg-config:pkgconfig
depends_lib		port:qdbm port:libiconv port:zlib 

configure.args  --mandir=${prefix}/share/man \
                --datadir=${prefix}/share/doc

post-extract {
    # configure
    reinplace "s|\$HOME|\${prefix}|g" \
        ${worksrcpath}/configure
    # Makefile.in
    reinplace "s|\$(HOME)|\$(prefix)|g" \
        ${worksrcpath}/Makefile.in
    # myconf.h
    reinplace "s|lzo/|lzo2/|g" \
        ${worksrcpath}/myconf.h
}

test.run         yes

platform  macosx {
		  build.target	mac
		  test.target      check-mac
		  destroot.target	install-mac
}

variant mecab {
    depends_lib-append      port:mecab
    configure.args-append   --enable-mecab
}
variant no-zlib {
    depends_lib-delete      lib:libz:zlib
    configure.args-append   --disable-zlib
}
variant lzo {
    depends_lib-append      lib:liblzo2:lzo2
    configure.args-append   --enable-lzo
}
variant bzip2 {
    depends_lib-append      lib:libbz2:bzip2
    configure.args-append   --enable-bzip
}
