Changeset 99458


Ignore:
Timestamp:
Nov 6, 2012, 1:59:27 AM (11 years ago)
Author:
snc@…
Message:

uhd :

  • update to latest release (003_005_000);
  • use github portgroup;
  • force use of MacPorts' ncurses;
  • fix python variant version setting;
  • add openmaintainer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/uhd/Portfile

    r78717 r99458  
    44PortSystem          1.0
    55PortGroup           cmake 1.0
     6PortGroup           github 1.0
    67
     8github.setup        EttusResearch UHD-Mirror 003_005_000 release_
     9
     10# override name from github PortGroup
    711name                uhd
    8 version             003.001.000
     12
    913categories          science
    10 maintainers         michaelld
     14maintainers         michaelld openmaintainer
    1115description         Universal Hardware Driver for Ettus Research products
    1216long_description    ${description}
     
    1620platforms           darwin
    1721
    18 fetch.type          git
    19 git.url             http://github.com/EttusResearch/UHD-Mirror.git
    20 git.branch          release_[strsed ${version} {g/\./_/}]
     22checksums           sha1        efaeb888d9f2f7c9f219d140b3c924f93155d72c \
     23                    rmd160      458367c42ba02219183f74ecfa4dc56c2fd290db
    2124
    2225worksrcdir          ${name}-${version}
     
    2528
    2629# do VPATH build
    27 post-extract { file mkdir ${workpath}/build }
    2830
    29 default configure.post_args {../${worksrcdir}/host}
    30 default configure.dir       {${workpath}/build}
    31 default build.dir           {${workpath}/build}
     31post-extract        { file mkdir ${workpath}/build }
     32configure.dir       ${workpath}/build
     33build.dir           ${workpath}/build
     34
     35# set last configure argument to the reletive path
     36# to the top-level cmake source
     37
     38configure.post_args ../${worksrcdir}/host
     39
     40# explicitly set configure args -D cmake flags to get MacPorts' curses
    3241
    3342configure.args-append \
    34     -DENABLE_USB=OFF \
    35     -DENABLE_EXAMPLES=OFF \
    36     -DENABLE_TESTS=OFF \
    37     -DENABLE_MANUAL=OFF \
    38     -DENABLE_DOXYGEN=OFF
     43    -DCURSES_CURSES_H_PATH=${prefix}/include \
     44    -DCURSES_CURSES_LIBRARY=${prefix}/lib/libcurses.dylib \
     45    -DCURSES_FORM_LIBRARY=${prefix}/lib/libform.dylib \
     46    -DCURSES_HAVE_CURSES_H=${prefix}/include/curses.h \
     47    -DCURSES_INCLUDE_PATH=${prefix}/include \
     48    -DCURSES_LIBRARY=${prefix}/lib/libcurses.dylib \
     49    -DCURSES_NCURSES_LIBRARY=${prefix}/lib/libncurses.dylib
    3950
    40 variant tests description {enable tests} {
    41     configure.args-delete -DENABLE_TESTS=OFF
    42     configure.args-append -DENABLE_TESTS=ON
    43     test.run yes
    44 }
     51# after destroot, have uhd fetch its images into the destroot area,
     52# so that they are also tracked by MacPorts
    4553
    46 variant examples description {enable examples} {
    47     configure.args-delete -DENABLE_EXAMPLES=OFF
    48     configure.args-append -DENABLE_EXAMPLES=ON
    49 }
    50 
    51 variant libusb description {enable USB support via libusb version 1.0} {
    52     depends_lib-append port:libusb
    53     configure.args-delete -DENABLE_USB=OFF
    54     configure.args-append -DENABLE_USB=ON
     54post-destroot {
     55    system "${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --download-location=${destroot}${prefix}/share/uhd/images"
    5556}
    5657
    5758# set Python variants
     59
    5860set pythons_suffixes {26 27}
    5961global chosen_python_suffix
     
    6769foreach s ${pythons_suffixes} {
    6870    set p python${s}
    69     set v [join [split ${chosen_python_suffix} ""] "."]
     71    set v [join [split ${s} ""] "."]
    7072    set i [lsearch -exact ${pythons_ports} ${p}]
    7173    set c [lreplace ${pythons_ports} ${i} ${i}]
     
    98100}
    99101
     102variant tests description {enable tests} {
     103    configure.args-append -DENABLE_TESTS=ON
     104    test.run yes
     105}
     106
     107if {![variant_isset tests]} {
     108    configure.args-append -DENABLE_TESTS=OFF
     109}
     110
     111variant examples description {enable examples} {
     112    configure.args-append -DENABLE_EXAMPLES=ON
     113}
     114
     115if {![variant_isset examples]} {
     116    configure.args-append -DENABLE_EXAMPLES=OFF
     117}
     118
     119variant libusb description {enable USB support via libusb version 1.0} {
     120    depends_lib-append port:libusb
     121    configure.args-append -DENABLE_USB=ON
     122}
     123
     124if {![variant_isset libusb]} {
     125    configure.args-append -DENABLE_USB=OFF
     126}
     127
    100128variant docs description {build documentation} {
    101     depends_lib-append \
    102         port:doxygen
    103     configure.args-delete \
    104         -DENABLE_DOXYGEN=OFF
    105     configure.args-append \
    106         -DENABLE_DOXYGEN=ON
     129    depends_lib-append port:doxygen
     130    configure.args-append -DENABLE_DOXYGEN=ON
     131}
     132
     133if {![variant_isset docs]} {
     134    configure.args-append -DENABLE_DOXYGEN=OFF
    107135}
    108136
    109137variant manual description {build manual} {
    110     set v [join [split ${chosen_python_suffix} ""] "."]
    111138    depends_lib-append \
    112139        port:py${chosen_python_suffix}-docutils
    113     configure.args-delete \
    114         -DENABLE_MANUAL=OFF
    115     configure.args-append \
    116         -DENABLE_MANUAL=ON \
    117         -DRST2HTML_EXECUTABLE=${prefix}/bin/rst2html-${v}.py
     140    pre-configure {
     141        set v [join [split ${chosen_python_suffix} ""] "."]
     142        configure.args-append -DENABLE_MANUAL=ON \
     143            -DRST2HTML_EXECUTABLE=${prefix}/bin/rst2html-${v}.py
     144    }
    118145}
    119146
    120 #livecheck.type      regex
    121 #livecheck.url       http://gitorious.org/dbusmenu/${name}/trees/master
    122 #livecheck.regex     >(\\d+(\\.\\d+)+)<
     147if {![variant_isset manual]} {
     148    configure.args-append -DENABLE_MANUAL=OFF
     149}
Note: See TracChangeset for help on using the changeset viewer.