Ticket #17605: Portfile-pspp.diff

File Portfile-pspp.diff, 3.9 KB (added by jeremy@…, 15 years ago)

My apologies: I created the diff in the wrong direction!

  • Portfile

    old new  
    11# -*- 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$
     2# $Id: Portfile 45130 2009-01-08 20:47:32Z mcalhoun@macports.org $
    33
    44PortSystem              1.0
    55
     
    1616
    1717homepage                http://www.gnu.org/software/pspp/
    1818platforms               darwin
    19 master_sites            http://ftpmirror.gnu.org/pspp
     19master_sites            gnu
    2020
    2121checksums               md5 b871739200938820d8db898cd200ed06 \
    2222                        sha1 22f335053a3e1d3861bfc2d87536b9a6fc5a1ae7 \
     
    2424
    2525use_parallel_build      yes
    2626
     27depends_build           path:bin/perl:perl5
     28configure.perl          ${prefix}/bin/perl
     29
    2730depends_lib                     port:gsl \
    28                         path:bin/perl:perl5 \
    2931                        port:libiconv \
    30                         port:plotutils \
    31                         port:pkgconfig \
    32                         port:gtk2 \
    33                         port:libglade2 \
    34                         port:libpqxx \
    3532                        port:zlib \
     33                        port:pkgconfig \
    3634                        port:libxml2 \
    37                         port:ncursesw \
    38                         port:readline \
    39                         port:texinfo
     35                        port:readline
    4036
    41 configure.perl          ${prefix}/bin/perl
     37configure.args          --disable-rpath \
     38                        --without-gui \
     39                        --without-libplot \
     40                        --without-libpq \
     41                        --enable-debug \
     42                        --without-libncurses \
     43                        --program-suffix=orig
    4244
    4345patchfiles              patch-config.h.in
    4446
     47variant ncurses description {Enable terminal resizing} {
     48    depends_lib-append  port:ncursesw
     49    configure.args-delete   --without-libncurses
     50}
     51
     52variant 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
     63variant 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
     69variant graph description {Enable graphing features (default)} {
     70    depends_lib-append  port:plotutils
     71    configure.args-delete   --without-libplot
     72}
     73
     74variant 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
     81default_variants        +graph +gui
     82
    4583post-destroot {
    4684    delete ${destroot}${prefix}/lib/charset.alias
     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"
    47109}