Skip to content
Permalink
Browse files

volk: update release to 2.2.1

deprecate devel port in favor of release, since releases are happening regularly again
  • Loading branch information
michaelld committed Mar 25, 2020
1 parent aeab7db commit 9a91b4c213d4fefa6356c71c0b8d60218c1268a6
Showing with 136 additions and 144 deletions.
  1. +136 −144 science/volk/Portfile
@@ -16,13 +16,24 @@ description Vector-Optimized Library of Kernels
long_description VOLK is the Vector-Optimized Library of Kernels, a library that contains kernels of hand-written single-instruction multiple data (SIMD) code for different mathematical operations, providing portable SIMD code that is optimized for a variety of platforms.
license GPL-3
platforms darwin
homepage https://libvolk.org/

subport volk-devel {
# releases happen here often enough to not require this port
replaced_by volk
PortGroup obsolete 1.0

# final version of the devel, with +1 rev bump
version 20200216-1ec627c1
revision 1
}

if {${name} eq ${subport}} {

github.setup gnuradio volk 2.1.0 v
checksums rmd160 8050edc7d8a0c7633d9dd7523b36ea6d62130c5f \
sha256 0934d9f3a0f4b4375826dc291720d52b464da3203f52ff47595a80d731902ce0 \
size 274868
github.setup gnuradio volk 2.2.1 v
checksums rmd160 e1f7dc8baee968301e2daeb86908c3e74c976745 \
sha256 9ddcf892e5e2d6544e51d70ea9f4749e0777c0ae24171e81ae3cce07210a099d \
size 330734
revision 0

# bump the epoch because I moved the version from 20150707 to 1.0.1
@@ -31,198 +42,179 @@ if {${name} eq ${subport}} {
provides the release version, which is typically updated every month or so.
conflicts volk-devel

}

subport volk-devel {

github.setup gnuradio volk 001e60a7f33cdc5430892201af88a332b67f5872
version 20200108-[string range ${github.version} 0 7]
checksums rmd160 34802f54d390c4f11910cdf0244bf20ef8e023fb \
sha256 4bb75391fa5ec37e1b12967c3f8dfb2dc905a318a8237f98fb9e867c1c57715a \
size 274863
revision 0

conflicts volk
long_description ${long_description} ${subport} \
provides the Volk GIT maint or master branch, depending on which is more advanced, and is typically updated every few days to week.

}

# fix naming of *Clang compiler to just "Clang" for internal use
patchfiles-append patch-fix-clang.diff
patch.pre_args -p1

# override githib PortGroup homepage setting
# fix naming of *Clang compiler to just "Clang" for internal use
patchfiles-append patch-fix-clang.diff
patch.pre_args -p1

homepage http://libvolk.org/

depends_build-append port:pkgconfig
depends_lib-append port:boost
depends_build-append port:pkgconfig
depends_lib-append port:boost

# Volk doesn't understand build type "MacPorts"; use release unless +debug is set
# Volk doesn't understand build type "MacPorts"; use release unless +debug is set

if {[variant_isset debug]} {
cmake.build_type Debug
} else {
cmake.build_type Release
}

# remove use of CPATH, as it is not needed
if {[variant_isset debug]} {
cmake.build_type Debug
} else {
cmake.build_type Release
}

compiler.cpath
# remove use of CPATH, as it is not needed

# remove top-level library path, such that internal libraries are used
# instead of any already-installed ones.
compiler.cpath

configure.ldflags-delete -L${prefix}/lib
# remove top-level library path, such that internal libraries are used
# instead of any already-installed ones.

# remove top-level include path, such that internal headers are used
# instead of any already-installed ones.
configure.ldflags-delete -L${prefix}/lib

configure.cppflags-delete -I${prefix}/include
# remove top-level include path, such that internal headers are used
# instead of any already-installed ones.

# specify the Python dependencies; these are checked for at configure,
# then used for building, but not at runtime.
configure.cppflags-delete -I${prefix}/include

set pythons_suffixes {27 35 36 37 38}
# specify the Python dependencies; these are checked for at configure,
# then used for building, but not at runtime.

set pythons_ports {}
foreach s ${pythons_suffixes} {
lappend pythons_ports python${s}
}
set pythons_suffixes {35 36 37 38}

proc python_dir {} {
global pythons_suffixes
set pythons_ports {}
foreach s ${pythons_suffixes} {
if {[variant_isset python${s}]} {
set p python[string index ${s} 0].[string index ${s} 1]
return [file normalize [exec ${p} -c "import sys; print(sys.prefix)"]/lib/${p}/site-packages]
lappend pythons_ports python${s}
}

proc python_dir {} {
global pythons_suffixes
foreach s ${pythons_suffixes} {
if {[variant_isset python${s}]} {
set p python[string index ${s} 0].[string index ${s} 1]
return [file normalize [exec ${p} -c "import sys; print(sys.prefix)"]/lib/${p}/site-packages]
}
}
error "Python support not enabled."
}
error "Python support not enabled."
}

foreach s ${pythons_suffixes} {
set p python${s}
set v [string index ${s} 0].[string index ${s} 1]
set i [lsearch -exact ${pythons_ports} ${p}]
set c [lreplace ${pythons_ports} ${i} ${i}]
variant ${p} description "Build Volk using Python ${v}" conflicts {*}${c} "
foreach s ${pythons_suffixes} {
set p python${s}
set v [string index ${s} 0].[string index ${s} 1]
set i [lsearch -exact ${pythons_ports} ${p}]
set c [lreplace ${pythons_ports} ${i} ${i}]
variant ${p} description "Build Volk using Python ${v}" conflicts {*}${c} "
# required Python
# required Python
depends_lib-append \
port:${p}
depends_lib-append \
port:${p}
depends_build-append \
port:py${s}-six \
port:py${s}-mako
depends_build-append \
port:py${s}-six \
port:py${s}-mako
# specify the Python version to use
# specify the Python version to use
configure.args-append \
-DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/${v}/bin/python${v} \
-DVOLK_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}/site-packages
"
}
configure.args-append \
-DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/${v}/bin/python${v} \
-DVOLK_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}/site-packages
"
}

if {![variant_isset debug]} {
set selected_python python37
foreach s ${pythons_suffixes} {
if {[variant_isset python${s}]} {
set selected_python python${s}
if {![variant_isset debug]} {
set selected_python python37
foreach s ${pythons_suffixes} {
if {[variant_isset python${s}]} {
set selected_python python${s}
}
}
default_variants +${selected_python}
}
default_variants +${selected_python}
}

# override default version string to be MacPorts-specific
# git / "devel" only for now
# override default version string to be MacPorts-specific
# git / "devel" only for now

set VOLK_VERSION_INFO "git-[string range ${github.version} 0 7](${version})"
set VOLK_VERSION_INFO "git-[string range ${github.version} 0 7](${version})"

configure.args-append \
-DVOLK_GIT_COUNT="MacPorts" \
-DVOLK_GIT_HASH="${VOLK_VERSION_INFO}"
configure.args-append \
-DVOLK_GIT_COUNT="MacPorts" \
-DVOLK_GIT_HASH="${VOLK_VERSION_INFO}"

# install CMake files into this directory
# install CMake files into this directory

configure.args-append \
-DCMAKE_MODULES_DIR=${prefix}/share/cmake
configure.args-append \
-DCMAKE_MODULES_DIR=${prefix}/share/cmake

default_variants +docs +orc
default_variants +docs +orc

variant docs description "Install Volk documentation" {
variant docs description "Install Volk documentation" {

depends_build-append \
port:doxygen
depends_build-append \
port:doxygen

configure.args-append \
-DDOXYGEN_EXECUTABLE=${prefix}/bin/doxygen
}
configure.args-append \
-DDOXYGEN_EXECUTABLE=${prefix}/bin/doxygen
}

if {![variant_isset docs]} {
if {![variant_isset docs]} {

configure.args-append \
-DDOXYGEN_EXECUTABLE=
configure.args-append \
-DDOXYGEN_EXECUTABLE=

}
}

variant orc description "Install Volk with support for ORC" {
variant orc description "Install Volk with support for ORC" {

depends_lib-append \
port:orc
depends_lib-append \
port:orc

configure.args-append \
-DORCC_EXECUTABLE=${prefix}/bin/orcc \
-DORC_INCLUDE_DIR=${prefix}/include/orc-0.4 \
-DORC_LIBRARY_DIR=${prefix}/lib
configure.args-append \
-DORCC_EXECUTABLE=${prefix}/bin/orcc \
-DORC_INCLUDE_DIR=${prefix}/include/orc-0.4 \
-DORC_LIBRARY_DIR=${prefix}/lib

}
}

if {![variant_isset orc]} {
if {![variant_isset orc]} {

configure.args-append \
-DORCC_EXECUTABLE= \
-DORC_INCLUDE_DIR= \
-DORC_LIBRARY_DIR=
configure.args-append \
-DORCC_EXECUTABLE= \
-DORC_INCLUDE_DIR= \
-DORC_LIBRARY_DIR=

}
}

pre-extract {
pre-extract {

# tell the user to force deactivate gnuradio-(devel,next) if one
# is active and version is before Volk was split off (20150329 for
# devel and next). gnuradio 3.7.6.2+ provides this split, too (as
# of 2015-04-12).
# tell the user to force deactivate gnuradio-(devel,next) if one
# is active and version is before Volk was split off (20150329 for
# devel and next). gnuradio 3.7.6.2+ provides this split, too (as
# of 2015-04-12).

set not_found [catch {set installed [lindex [registry_active gnuradio-devel] 0]}]
if {${not_found}} {
set not_found [catch {set installed [lindex [registry_active gnuradio-next] 0]}]
}
if {${not_found}} {
set not_found [catch {set installed [lindex [registry_active gnuradio] 0]}]
}
if (!${not_found}) {
set not_found [catch {set installed [lindex [registry_active gnuradio-devel] 0]}]
if {${not_found}} {
set not_found [catch {set installed [lindex [registry_active gnuradio-next] 0]}]
}
if {${not_found}} {
set not_found [catch {set installed [lindex [registry_active gnuradio] 0]}]
}
if (!${not_found}) {

set _portname [lindex ${installed} 0]
set _version [lindex ${installed} 1]
set _portname [lindex ${installed} 0]
set _version [lindex ${installed} 1]

if {${_portname} eq "gnuradio"} {
set _vcmp [vercmp ${_version} 3.7.6.2]
} else {
set _vcmp [vercmp ${_version} 20150329]
}
if {${_portname} eq "gnuradio"} {
set _vcmp [vercmp ${_version} 3.7.6.2]
} else {
set _vcmp [vercmp ${_version} 20150329]
}

if {${_vcmp} < 0} {
if {${_vcmp} < 0} {

ui_msg "\nVolk is currently installed by the port '${_portname}'."
ui_msg "Use the command"
ui_msg " sudo port -f deactivate ${_portname}"
ui_msg "to deactivate the port owning volk, then proceed with"
ui_msg " sudo port upgrade ${_portname}\n"
return -code error "Port Needs Deactivation"
ui_msg "\nVolk is currently installed by the port '${_portname}'."
ui_msg "Use the command"
ui_msg " sudo port -f deactivate ${_portname}"
ui_msg "to deactivate the port owning volk, then proceed with"
ui_msg " sudo port upgrade ${_portname}\n"
return -code error "Port Needs Deactivation"

}
}
}
}

0 comments on commit 9a91b4c

Please sign in to comment.
You can’t perform that action at this time.