Ticket #22249: 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
43    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/cmake_modules/FindNova.cmake
44    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200ap.cpp
45    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200aplib.h
46    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/lx200generic.cpp
47    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/telescope/temmadriver.c
48    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/drivers/video/stvdriver.c
49    reinplace "s|<libnova.h>|<libnova/libnova.h>|g" ${worksrcpath}/libs/indicom.c
50}
51
52
53post-destroot {
54    # the install phase makes some symlinks in ${prefix}.  Copy these into destroot
55    # so that they are recorded properly, otherwise they will be left behind after uninstall
56
57    file copy ${prefix}/bin/indi_lx200_16      ${destroot}${prefix}/bin
58    file copy ${prefix}/bin/indi_lx200ap       ${destroot}${prefix}/bin
59    file copy ${prefix}/bin/indi_lx200autostar ${destroot}${prefix}/bin
60    file copy ${prefix}/bin/indi_lx200classic  ${destroot}${prefix}/bin
61    file copy ${prefix}/bin/indi_lx200gps      ${destroot}${prefix}/bin
62
63}
64
65
66configure.cmd      ${prefix}/bin/cmake
67configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix} \
68configure.args     -DWITH_CFITSIO=OFF \
69                   -DWITH_FLI=OFF \
70                   -DNOVA_INCLUDE_DIR=${prefix}/include \
71                   -DNOVA_LIBRARIES=${prefix}/lib/libnova.a \
72                   ${worksrcpath}