# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 name xapian-core version 1.4.26 categories devel maintainers {ryandesign @ryandesign} openmaintainer license GPL-2+ description Xapian search library long_description Xapian is a highly adaptable toolkit which allows \ developers to easily add advanced indexing and search \ facilities to their own applications. It supports the \ Probabilistic Information Retrieval model and also \ supports a rich set of boolean query operators. homepage https://xapian.org master_sites https://oligarchy.co.uk/xapian/${version}/ dist_subdir xapian use_xz yes compiler.cxx_standard \ 2011 if {${subport} eq ${name}} { revision 0 # version.h does not get generated properly when there are multiple -arch flags PortGroup muniversal 1.0 checksums rmd160 97bc54fa3ffe7762b82a7d6d139617937a75b7a8 \ sha256 9e6a7903806966d16ce220b49377c9c8fad667c8f0ffcb23a3442946269363a7 \ size 3246304 # TODO: Fix xapian-config to not require the .la file # /opt/local/bin/xapian-config --ltlibs --cxxflags # /opt/local/bin/xapian-config: Can't find libxapian.la to link against. destroot.delete_la_files no depends_lib port:zlib post-build { if {[variant_exists universal] && [variant_isset universal]} { foreach arch ${universal_archs_to_use} { # xapian-config records build directory, which interferes with universal merge reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${worksrcpath}-${arch}/xapian-config } } } livecheck.type regex livecheck.url ${homepage}/download livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)[quotemeta ${extract.suffix}] } else { livecheck.type none } subport xapian-omega { revision 0 checksums rmd160 4828ebec665fb48fda1c03e9a5bc795bb9352804 \ sha256 a5b2386e1b04df84d1149a9e9c5bcfc5e4726a69a69da641b86c68d79967dae4 \ size 583808 description web application using the Xapian library long_description Xapian Omega is an application built on the \ Xapian library, consisting of indexers and a \ CGI search frontend. homepage ${homepage}/docs/omega/overview.html distname xapian-omega-${version} depends_lib port:libiconv \ port:libmagic \ port:pcre2 \ port:xapian-core \ port:zlib configure.args --with-iconv } if {${subport} ni [list ${name} xapian-omega]} { checksums rmd160 d56d722efa85798790a72b4299477f23a02bfdd2 \ sha256 550873573ee0401199f835fef51ddf89ca7bc26f7b8d1bdcca59da643fb3ca81 \ size 1114580 homepage ${homepage}/docs/bindings/ distname xapian-bindings-${version} depends_lib port:xapian-core configure.args --without-csharp \ --without-java \ --without-lua \ --without-perl \ --without-python \ --without-python3 \ --without-php \ --without-ruby \ --without-tcl } # Java subport xapian-bindings-java { PortGroup java 1.0 revision 0 description Xapian bindings for Java long_description {*}${description} # Required java version java.version 6+ # JDK port to install if required java not found java.fallback openjdk11 configure.args-replace --without-java --with-java # jni destination violates the mtree layout destroot.violate_mtree yes # https://trac.xapian.org/ticket/774 post-destroot { file mkdir ${destroot}/Library/Java/Extensions move ${destroot}/${worksrcpath}/java/built/libxapian_jni.jnilib \ ${destroot}/Library/Java/Extensions/libxapian_jni.jnilib } } # Perl foreach v {5.28 5.30 5.32 5.34 5.36 5.38} { subport xapian-bindings-perl${v} " revision 0 description Xapian bindings for Perl ${v} long_description \{*\}\${description} depends_lib-append port:perl${v} configure.env-append PERL=${prefix}/bin/perl${v} configure.args-replace --without-perl --with-perl post-destroot { move ${destroot}${prefix}/share/doc/xapian-bindings/perl ${destroot}${prefix}/share/doc/xapian-bindings/perl${v} } " } # PHP foreach v {8.0 8.1 8.2 8.3} { set v_no_dot [string map {. {}} ${v}] set php php${v_no_dot} subport ${php}-xapian " revision 0 description Xapian bindings for PHP ${v} long_description \{*\}\${description} depends_lib-append port:${php} configure.env-append PHP_CONFIG=${prefix}/bin/php-config${v_no_dot} configure.args-replace --without-php --with-php post-destroot { move ${destroot}${prefix}/share/doc/xapian-bindings/php ${destroot}${prefix}/share/doc/xapian-bindings/${php} xinstall -m 0755 -d ${destroot}${prefix}/var/db/${php} set fp \[open ${destroot}${prefix}/var/db/${php}/xapian.ini w\] puts \${fp} {; Do not edit this file; it is automatically generated by MacPorts. Any changes} puts \${fp} {; you make will be lost if you upgrade, uninstall or deactivate ${subport}.} puts \${fp} \{; To configure ${php}, edit ${prefix}/etc/${php}/php.ini.\} puts \${fp} {extension=xapian.so} close \${fp} } " } # Python foreach v {3.8 3.9 3.10 3.11 3.12} { set v_no_dot [string map {. {}} ${v}] if {[vercmp ${v} 3] >= 0} { set suffix 3 } else { set suffix {} } subport xapian-bindings-python${v_no_dot} " revision 0 description Xapian bindings for Python ${v} long_description \{*\}\${description} depends_build-append port:py${v_no_dot}-sphinx depends_lib-append port:python${v_no_dot} configure.env-append PYTHON${suffix}=${prefix}/bin/python${v} configure.args-replace --without-python${suffix} --with-python${suffix} post-destroot { move ${destroot}${prefix}/share/doc/xapian-bindings/python${suffix} ${destroot}${prefix}/share/doc/xapian-bindings/python${v_no_dot} } " } # Ruby foreach v {2.7 3.0 3.1 3.2 3.3} { set v_no_dot [string map {. {}} ${v}] subport xapian-bindings-ruby${v_no_dot} " revision 0 description Xapian bindings for Ruby ${v} long_description \{*\}\${description} depends_lib-append port:ruby${v_no_dot} configure.env-append RUBY=${prefix}/bin/ruby${v} configure.args-replace --without-ruby --with-ruby post-destroot { move ${destroot}${prefix}/share/doc/xapian-bindings/ruby ${destroot}${prefix}/share/doc/xapian-bindings/ruby${v_no_dot} } " }