| 1 | # -*- 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 |
|---|
| 2 | # $Id$ |
|---|
| 3 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | |
|---|
| 6 | name sword |
|---|
| 7 | version 1.6.2 |
|---|
| 8 | revision 3 |
|---|
| 9 | set branch [join [lrange [split ${version} .] 0 1] .] |
|---|
| 10 | categories textproc |
|---|
| 11 | maintainers nomaintainer |
|---|
| 12 | license GPL-2 |
|---|
| 13 | description cross-platform API/library for Bible software |
|---|
| 14 | long_description The SWORD Project is an open source, cross-platform \ |
|---|
| 15 | (Linux, Windows, Solaris, etc.) API/library for \ |
|---|
| 16 | Bible software with a constantly growing list of \ |
|---|
| 17 | front-ends (GUI, textmode, web-based, etc.) and a \ |
|---|
| 18 | library of over 200 text modules. |
|---|
| 19 | homepage http://www.crosswire.org/${name}/index.jsp |
|---|
| 20 | master_sites http://www.crosswire.org/ftpmirror/pub/${name}/source/v${branch}/ |
|---|
| 21 | checksums md5 a7dc4456e20e915fec46d774b690e305 \ |
|---|
| 22 | sha1 d4f3b924ba6f78b436a33d4819c76f766e4551f8 \ |
|---|
| 23 | rmd160 e85230c007782c526157a5650f3e5c1c27b60ea6 |
|---|
| 24 | platforms darwin |
|---|
| 25 | |
|---|
| 26 | depends_build port:autoconf \ |
|---|
| 27 | port:automake \ |
|---|
| 28 | port:libtool \ |
|---|
| 29 | port:pkgconfig |
|---|
| 30 | depends_lib port:curl \ |
|---|
| 31 | port:icu \ |
|---|
| 32 | port:openssl \ |
|---|
| 33 | port:zlib |
|---|
| 34 | |
|---|
| 35 | # fails to build with clang, probably incorrect code |
|---|
| 36 | # ../include/multimapwdef.h:22:7: error: use of undeclared identifier 'find' |
|---|
| 37 | # llvm-gcc-4.2 actually hangs |
|---|
| 38 | if {${configure.compiler} == "clang" || ${configure.compiler} == "llvm-gcc-4.2"} { |
|---|
| 39 | configure.compiler gcc-4.2 |
|---|
| 40 | if {![file executable ${configure.cc}]} { |
|---|
| 41 | depends_build-append port:apple-gcc42 |
|---|
| 42 | configure.compiler apple-gcc-4.2 |
|---|
| 43 | } |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | pre-configure { |
|---|
| 47 | system "cd ${worksrcpath} && env LTIZE=${prefix}/bin/glibtoolize ./autogen.sh" |
|---|
| 48 | } |
|---|
| 49 | configure.args --with-zlib --with-conf --with-curl \ |
|---|
| 50 | --with-icu --without-clucene |
|---|
| 51 | |
|---|
| 52 | use_parallel_build yes |
|---|
| 53 | |
|---|
| 54 | destroot.keepdirs ${destroot}${prefix}/share/${name}/mods.d \ |
|---|
| 55 | ${destroot}${prefix}/share/${name}/modules |
|---|
| 56 | post-destroot { |
|---|
| 57 | xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/mods.d |
|---|
| 58 | xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/modules |
|---|
| 59 | |
|---|
| 60 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} |
|---|
| 61 | xinstall -m 0644 -W ${worksrcpath} README INSTALL LICENSE ${destroot}${prefix}/share/doc/${name} |
|---|
| 62 | copy ${worksrcpath}/samples ${destroot}${prefix}/share/doc/${name}/ |
|---|
| 63 | delete ${destroot}${prefix}/share/${name}/mods.d/globals.conf |
|---|
| 64 | move ${destroot}${prefix}/etc/sword.conf ${destroot}${prefix}/etc/sword.conf.sample |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | post-activate { |
|---|
| 68 | if {![file exists ${prefix}/share/${name}/mods.d/globals.conf]} { |
|---|
| 69 | copy ${prefix}/share/doc/${name}/samples/mods.d/globals.conf ${prefix}/share/${name}/mods.d/ |
|---|
| 70 | } |
|---|
| 71 | if {![file exists ${prefix}/etc/sword.conf]} { |
|---|
| 72 | copy ${prefix}/etc/sword.conf.sample ${prefix}/etc/sword.conf |
|---|
| 73 | } |
|---|
| 74 | } |
|---|
| 75 | |
|---|
| 76 | livecheck.type regex |
|---|
| 77 | livecheck.url http://www.crosswire.org/sword/software/swordapi.jsp |
|---|
| 78 | livecheck.regex {SWORD Engine / API v([0-9\.]+)} |
|---|