Ticket #22132: Portfile

File Portfile, 2.9 KB (added by jtomshine@…, 15 years ago)
Line 
1# $Id$
2
3PortSystem          1.0
4
5name                indi
6
7version             0.6
8
9categories          science
10
11maintainers         gmail.com:jtomshine
12
13description         distributed control protocol for astronomical instrumentation
14long_description    INDI is a distributed control protocol designed to \
15                    operate astronomical instrumentation. INDI is small, \
16                    flexible, easy to parse, and scalable. It supports common \
17                    DCS functions such as remote control, data acquisition, \
18                    monitoring, and a lot more.  With INDI, you have a total \
19                    transparent control over your instruments so you can get \
20                    more science with less time.
21                   
22homepage            http://www.indilib.org
23
24platforms           darwin
25
26master_sites        http://downloads.sourceforge.net/project/indi/indilib/0.6/libindi0_0.6.tar.gz?use_mirror=softlayer
27
28checksums           md5 49218ad15a40dfa8a2366a2694477595 \
29                    sha1 70b6a4cf4447874a0cf65dd8ece2d77dc397826d \
30                    rmd160 1ec9fd8daa04db458b80ab2e153a6025faa0406f
31                   
32depends_lib         port:libnova \
33                    port:zlib \
34                    port:libusb
35
36depends_build       port:cmake
37
38worksrcdir          libindi0-0.6
39
40pre-configure {
41    # fix include reference problems in some of the code or configure (and build) will fail
42    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/cmake_modules/FindNova.cmake
43    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200ap.cpp
44    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200aplib.h
45    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200generic.cpp
46    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/temmadriver.c
47    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/video/stvdriver.c
48    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/libs/indicom.c
49}
50
51post-destroot {
52    # the install phase makes some symlinks in ${prefix}.  Copy these into destroot
53    # so that they are recorded properly
54   
55    file copy ${prefix}/bin/indi_lx200_16      ${destroot}${prefix}/bin
56    file copy ${prefix}/bin/indi_lx200ap       ${destroot}${prefix}/bin
57    file copy ${prefix}/bin/indi_lx200autostar ${destroot}${prefix}/bin
58    file copy ${prefix}/bin/indi_lx200classic  ${destroot}${prefix}/bin
59    file copy ${prefix}/bin/indi_lx200gps      ${destroot}${prefix}/bin
60
61}
62
63configure.cmd      ${prefix}/bin/cmake
64configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix} \
65configure.args     -DWITH_CFITSIO=OFF \
66                   -DWITH_FLI=OFF \
67                   -DNOVA_INCLUDE_DIR=${prefix}/include \
68                   -DNOVA_LIBRARIES=${prefix}/lib/libnova.a \
69                   ${worksrcpath}