| 47 | variant ncurses description {Enable terminal resizing} { |
| 48 | depends_lib-append port:ncursesw |
| 49 | configure.args-delete --without-libncurses |
| 50 | } |
| 51 | |
| 52 | variant doc description {Build documentation} { |
| 53 | depends_lib-append port:texinfo |
| 54 | build.target-append pdf html |
| 55 | post-destroot { |
| 56 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} |
| 57 | foreach fl [glob -nocomplain -directory ${worksrcpath}/doc *.pdf *.html] { |
| 58 | copy ${fl} ${destroot}${prefix}/share/doc/${name} |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | variant postgres description {Enables reading of postgresql databases} { |
| 64 | depends_lib-append port:postgresql83 |
| 65 | configure.args-delete --without-libpq |
| 66 | configure.ldflags-append -L${prefix}/lib/postgresql83 |
| 67 | } |
| 68 | |
| 69 | variant graph description {Enable graphing features (default)} { |
| 70 | depends_lib-append port:plotutils |
| 71 | configure.args-delete --without-libplot |
| 72 | } |
| 73 | |
| 74 | variant gui description {Enable PSPPIRE, the graphical interface (default)} { |
| 75 | depends_lib-append port:pkgconfig \ |
| 76 | port:gtk2 \ |
| 77 | port:libglade2 |
| 78 | configure.args-delete --without-gui |
| 79 | } |
| 80 | |
| 81 | default_variants +graph +gui |
| 82 | |
| 85 | |
| 86 | ln -s ${prefix}/lib/pspp/libpsppire.dylib \ |
| 87 | ${destroot}${prefix}/lib/pspp/libpsppire.so |
| 88 | ln -s ${prefix}/lib/pspp/libpsppwidgets.dylib \ |
| 89 | ${destroot}${prefix}/lib/pspp/libpsppwidgets.so |
| 90 | |
| 91 | set script [open ${destroot}${prefix}/bin/psppire w+] |
| 92 | puts $script "#!/bin/bash" |
| 93 | puts $script "export OLDPWD=`pwd`" |
| 94 | puts $script "cd /tmp" |
| 95 | puts $script "LD_LIBRARY_PATH=${prefix}/lib/pspp ${prefix}/bin/psppireorig" |
| 96 | puts $script "cd \$OLDPWD" |
| 97 | close $script |
| 98 | |
| 99 | set script [open ${destroot}${prefix}/bin/pspp w+] |
| 100 | puts $script "#!/bin/bash" |
| 101 | puts $script "export OLDPWD=`pwd`" |
| 102 | puts $script "cd /tmp" |
| 103 | puts $script "LD_LIBRARY_PATH=${prefix}/lib/pspp ${prefix}/bin/pspporig" |
| 104 | puts $script "cd \$OLDPWD" |
| 105 | close $script |
| 106 | |
| 107 | system "chmod 755 ${destroot}${prefix}/bin/psppire" |
| 108 | system "chmod 755 ${destroot}${prefix}/bin/pspp" |