[99458] trunk/dports/science/uhd/Portfile

snc at macports.org snc at macports.org
Mon Nov 5 17:59:27 PST 2012


Revision: 99458
          http://trac.macports.org//changeset/99458
Author:   snc at macports.org
Date:     2012-11-05 17:59:27 -0800 (Mon, 05 Nov 2012)
Log Message:
-----------
uhd :
* update to latest release (003_005_000);
* use github portgroup;
* force use of MacPorts' ncurses;
* fix python variant version setting;
* add openmaintainer.

Modified Paths:
--------------
    trunk/dports/science/uhd/Portfile

Modified: trunk/dports/science/uhd/Portfile
===================================================================
--- trunk/dports/science/uhd/Portfile	2012-11-05 22:19:01 UTC (rev 99457)
+++ trunk/dports/science/uhd/Portfile	2012-11-06 01:59:27 UTC (rev 99458)
@@ -3,11 +3,15 @@
 
 PortSystem          1.0
 PortGroup           cmake 1.0
+PortGroup           github 1.0
 
+github.setup        EttusResearch UHD-Mirror 003_005_000 release_
+
+# override name from github PortGroup
 name                uhd
-version             003.001.000
+
 categories          science
-maintainers         michaelld
+maintainers         michaelld openmaintainer
 description         Universal Hardware Driver for Ettus Research products
 long_description    ${description}
 license             GPL-3+
@@ -15,46 +19,44 @@
 homepage            https://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki
 platforms           darwin
 
-fetch.type          git
-git.url             http://github.com/EttusResearch/UHD-Mirror.git
-git.branch          release_[strsed ${version} {g/\./_/}]
+checksums           sha1	efaeb888d9f2f7c9f219d140b3c924f93155d72c \
+                    rmd160	458367c42ba02219183f74ecfa4dc56c2fd290db
 
 worksrcdir          ${name}-${version}
 
 depends_lib-append	port:boost
 
 # do VPATH build
-post-extract { file mkdir ${workpath}/build }
 
-default configure.post_args {../${worksrcdir}/host}
-default configure.dir       {${workpath}/build}
-default build.dir           {${workpath}/build}
+post-extract        { file mkdir ${workpath}/build }
+configure.dir       ${workpath}/build
+build.dir           ${workpath}/build
 
+# set last configure argument to the reletive path
+# to the top-level cmake source
+
+configure.post_args ../${worksrcdir}/host
+
+# explicitly set configure args -D cmake flags to get MacPorts' curses
+
 configure.args-append \
-    -DENABLE_USB=OFF \
-    -DENABLE_EXAMPLES=OFF \
-    -DENABLE_TESTS=OFF \
-    -DENABLE_MANUAL=OFF \
-    -DENABLE_DOXYGEN=OFF
+    -DCURSES_CURSES_H_PATH=${prefix}/include \
+    -DCURSES_CURSES_LIBRARY=${prefix}/lib/libcurses.dylib \
+    -DCURSES_FORM_LIBRARY=${prefix}/lib/libform.dylib \
+    -DCURSES_HAVE_CURSES_H=${prefix}/include/curses.h \
+    -DCURSES_INCLUDE_PATH=${prefix}/include \
+    -DCURSES_LIBRARY=${prefix}/lib/libcurses.dylib \
+    -DCURSES_NCURSES_LIBRARY=${prefix}/lib/libncurses.dylib
 
-variant tests description {enable tests} {
-    configure.args-delete -DENABLE_TESTS=OFF
-    configure.args-append -DENABLE_TESTS=ON
-    test.run yes
-}
+# after destroot, have uhd fetch its images into the destroot area,
+# so that they are also tracked by MacPorts
 
-variant examples description {enable examples} {
-    configure.args-delete -DENABLE_EXAMPLES=OFF
-    configure.args-append -DENABLE_EXAMPLES=ON
+post-destroot {
+    system "${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --download-location=${destroot}${prefix}/share/uhd/images"
 }
 
-variant libusb description {enable USB support via libusb version 1.0} {
-    depends_lib-append port:libusb
-    configure.args-delete -DENABLE_USB=OFF
-    configure.args-append -DENABLE_USB=ON
-}
+# set Python variants
 
-# set Python variants
 set pythons_suffixes {26 27}
 global chosen_python_suffix
 set chosen_python_suffix ""
@@ -66,7 +68,7 @@
 
 foreach s ${pythons_suffixes} {
     set p python${s}
-    set v [join [split ${chosen_python_suffix} ""] "."]
+    set v [join [split ${s} ""] "."]
     set i [lsearch -exact ${pythons_ports} ${p}]
     set c [lreplace ${pythons_ports} ${i} ${i}]
     eval [subst {
@@ -97,26 +99,51 @@
     return -code error "Exactly one Python variant must be selected."
 }
 
+variant tests description {enable tests} {
+    configure.args-append -DENABLE_TESTS=ON
+    test.run yes
+}
+
+if {![variant_isset tests]} {
+    configure.args-append -DENABLE_TESTS=OFF
+}
+
+variant examples description {enable examples} {
+    configure.args-append -DENABLE_EXAMPLES=ON
+}
+
+if {![variant_isset examples]} {
+    configure.args-append -DENABLE_EXAMPLES=OFF
+}
+
+variant libusb description {enable USB support via libusb version 1.0} {
+    depends_lib-append port:libusb
+    configure.args-append -DENABLE_USB=ON
+}
+
+if {![variant_isset libusb]} {
+    configure.args-append -DENABLE_USB=OFF
+}
+
 variant docs description {build documentation} {
-    depends_lib-append \
-        port:doxygen
-    configure.args-delete \
-        -DENABLE_DOXYGEN=OFF
-    configure.args-append \
-        -DENABLE_DOXYGEN=ON
+    depends_lib-append port:doxygen
+    configure.args-append -DENABLE_DOXYGEN=ON
 }
 
+if {![variant_isset docs]} {
+    configure.args-append -DENABLE_DOXYGEN=OFF
+}
+
 variant manual description {build manual} {
-    set v [join [split ${chosen_python_suffix} ""] "."]
     depends_lib-append \
         port:py${chosen_python_suffix}-docutils
-    configure.args-delete \
-        -DENABLE_MANUAL=OFF
-    configure.args-append \
-        -DENABLE_MANUAL=ON \
-        -DRST2HTML_EXECUTABLE=${prefix}/bin/rst2html-${v}.py
+    pre-configure {
+        set v [join [split ${chosen_python_suffix} ""] "."]
+        configure.args-append -DENABLE_MANUAL=ON \
+            -DRST2HTML_EXECUTABLE=${prefix}/bin/rst2html-${v}.py
+    }
 }
 
-#livecheck.type      regex
-#livecheck.url       http://gitorious.org/dbusmenu/${name}/trees/master
-#livecheck.regex     >(\\d+(\\.\\d+)+)<
+if {![variant_isset manual]} {
+    configure.args-append -DENABLE_MANUAL=OFF
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121105/978dd3e5/attachment-0001.html>


More information about the macports-changes mailing list