[138693] trunk/dports/science/uhd/Portfile
michaelld at macports.org
michaelld at macports.org
Thu Jul 16 07:45:02 PDT 2015
Revision: 138693
https://trac.macports.org/changeset/138693
Author: michaelld at macports.org
Date: 2015-07-16 07:45:02 -0700 (Thu, 16 Jul 2015)
Log Message:
-----------
uhd:
+ update devel to 012381d9 (20150714);
+ devel now uses mako instead of cheetah;
+ add patch to fix uhd_images_downloader to work with Python 2.7 and 3.4, which requires using py*-requests;
+ release still requires Python 2.7;
+ add python selection variants to devel, and means for easily moving this to overall usage with the next release.
Modified Paths:
--------------
trunk/dports/science/uhd/Portfile
Modified: trunk/dports/science/uhd/Portfile
===================================================================
--- trunk/dports/science/uhd/Portfile 2015-07-16 13:58:20 UTC (rev 138692)
+++ trunk/dports/science/uhd/Portfile 2015-07-16 14:45:02 UTC (rev 138693)
@@ -47,10 +47,10 @@
name uhd-devel
conflicts uhd
- github.setup EttusResearch uhd d9656de88f7af77b39bfe9985f0ac7c623932d71
- version 20150708
- checksums rmd160 13387ce1a29fb78fecf992d16ec52a36cf721a14 \
- sha256 46ab3eb22f30c5f7ffd3cb6539186fb7ef55be24c0620c881e7df9150b47b143
+ github.setup EttusResearch uhd 012381d999c4a895593412aaf06e73432b458810
+ version 20150714
+ checksums rmd160 450a9619d127533574f8848de6e7ce17beefb1cf \
+ sha256 d3f26e8cfa7147df99f383a53f41340ff646bd202d748aa487da2a1befac0292
# overload the github livecheck URL with the maint branch,
# when it is more advanced; comment out for master.
@@ -116,9 +116,13 @@
default_variants +docs +examples +libusb +manual +test +manpages
+set PythonVersionNoDot ""
+
if {${subport} eq "uhd"} {
- # for release until 3.8.5+, keep +orc around. it has been
+ # for release until 3.8.5+:
+ #
+ # 1) keep +orc around. it has been
# deprecated and removed as of 2015-07-01, commit 41812aa2.
default_variants +orc
@@ -131,17 +135,59 @@
if {![variant_isset orc]} {
configure.args-append -DENABLE_ORC=OFF
}
+
+ # 2) use Python 2.7 only, and cheetah for templates
+
+ set PythonVersionNoDot "27"
+ depends_lib-append \
+ port:py27-cheetah
+
+} else {
+
+ # as of 2015-07-14, commit 4b1034b2: uhd-devel uses mako for
+ # templates, which means it can use Python 2.7 or 3.4.
+
+ variant python27 conflicts python34 description {Build using Python 2.7} {}
+ variant python34 conflicts python27 description {Build using Python 3.4} {}
+
+ if {![variant_isset python27] && ![variant_isset python34]} {
+ default_variants +python27
+ }
+
+ if {![variant_isset python27] && ![variant_isset python34]} {
+ ui_error "\n\nYou must select either the +python27 or +python34 variant.\n"
+ return -code error "Invalid variant selection"
+ }
+
+ if {[variant_isset python27]} {
+ set PythonVersionNoDot "27"
+ } else {
+ set PythonVersionNoDot "34"
+ }
+
+ depends_lib-append \
+ port:py${PythonVersionNoDot}-mako
+
}
-# require Python 2.7
+# patch the UHD images downloader to work with both Python 2.7 & 3.4.
+patchfiles-append patch-host_utils_uhd_images_downloader.py.in.diff
+
+set PythonVersionWithDot [join [split ${PythonVersionNoDot} ""] "."]
+
+# required Python
+
depends_lib-append \
- port:python27 \
- port:py27-cheetah
+ port:python${PythonVersionNoDot} \
+ port:py${PythonVersionNoDot}-requests
# specify that Python version to use
+
+set PythonExe "${prefix}/bin/python${PythonVersionWithDot}"
+
configure.args-append \
- -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7
+ -DPYTHON_EXECUTABLE=${PythonExe}
# after destroot, have uhd fetch its images into the
# destroot area, so that they are also tracked by MacPorts
@@ -149,8 +195,8 @@
post-destroot {
ui_debug "Fetching images:"
- ui_debug "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
- system "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --verbose --install-location=${destroot}${prefix}/share/uhd/images"
+ ui_debug "${PythonExe} ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
+ system "${PythonExe} ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --verbose --install-location=${destroot}${prefix}/share/uhd/images"
}
@@ -195,7 +241,7 @@
}
variant manual description {build manual} {
- depends_lib-append port:py27-docutils
+ depends_lib-append port:py${PythonVersionNoDot}-docutils
configure.args-append -DENABLE_MANUAL=ON
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150716/277f8020/attachment.html>
More information about the macports-changes
mailing list