[145817] trunk/dports/science/gnuradio

michaelld at macports.org michaelld at macports.org
Wed Feb 17 18:49:43 PST 2016


Revision: 145817
          https://trac.macports.org/changeset/145817
Author:   michaelld at macports.org
Date:     2016-02-17 18:49:43 -0800 (Wed, 17 Feb 2016)
Log Message:
-----------
gnuradio*: add patch to fix version string to allow it to be set externally, then use it here to be MacPorts-specific.

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

Added Paths:
-----------
    trunk/dports/science/gnuradio/files/patch-cmake_Modules_GrVersion.cmake.diff

Modified: trunk/dports/science/gnuradio/Portfile
===================================================================
--- trunk/dports/science/gnuradio/Portfile	2016-02-18 01:41:17 UTC (rev 145816)
+++ trunk/dports/science/gnuradio/Portfile	2016-02-18 02:49:43 UTC (rev 145817)
@@ -22,6 +22,7 @@
 if {${subport} eq ${name}} {
 
     github.setup    gnuradio gnuradio 3.7.9.1 v
+    revision        1
 
     long_description    ${description}: \
         This port is kept up with the GNU Radio release, currently ${version}, which is typically updated every few months.
@@ -32,6 +33,10 @@
         rmd160 6b91a3e53b542045b1fad6c4953f7bdda974759c \
         sha256 2da66524120ad47a6145e346a73f4f8eca497e0866ca5471978b52adcfbccb70
 
+    # set the version override string
+
+    set GR_VERSION_INFO "Release"
+
     # overload the github livecheck regex to look for versions that
     # are just numbers and '.', no letters (e.g., "3.7.3git").
 
@@ -49,10 +54,15 @@
 
     github.setup        gnuradio gnuradio 64f3b70cf135a8641a0271ee27b431e05a8df97b
     version             20160214
+    revision            1
     checksums \
         rmd160 4196deea6bb5e8cc42f4fac36db8608a5d9add2b \
         sha256 0c6c9da5729dc2a6aeadedc7c0c18446754b4f25aba41ab003615a6599494b89
 
+    # set the version override string
+
+    set GR_VERSION_INFO "devel-git-[string range ${github.version} 0 7](${version})"
+
 }
 
 subport gnuradio-next {
@@ -65,10 +75,15 @@
 
     github.setup        gnuradio gnuradio 4aabba72f0d268174855fce97a80bd55acb1358c
     version             20160214
+    revision            1
     checksums \
         rmd160 8773ddc6555c6b8d2f4f157c9e5b8a6fc2ec997e \
         sha256 9ef412cf57fa676b254e0e3d1d6e920a2afe2db12b971490dd09a7a1bc9d1fea
 
+    # set the version override string
+
+    set GR_VERSION_INFO "next-git-[string range ${github.version} 0 7](${version})"
+
     # overload the github livecheck URL with the correct branch
 
     livecheck.url       ${github.homepage}/commits/next.atom
@@ -93,6 +108,10 @@
 
 }
 
+# temporary patch to allow us to set version info here
+
+patchfiles-append   patch-cmake_Modules_GrVersion.cmake.diff
+
 # override githib PortGroup homepage setting
 
 homepage            http://gnuradio.org/
@@ -124,6 +143,12 @@
 configure.args-append \
     -DCMAKE_MODULES_DIR=${prefix}/share/cmake
 
+# override default version string to be MacPorts-specific
+
+configure.args-append \
+    -DGR_GIT_COUNT="MacPorts" \
+    -DGR_GIT_HASH="${GR_VERSION_INFO}"
+
 # release, devel, and next can use either the Volk.
 
 depends_lib-append path:lib/libvolk.dylib:volk

Added: trunk/dports/science/gnuradio/files/patch-cmake_Modules_GrVersion.cmake.diff
===================================================================
--- trunk/dports/science/gnuradio/files/patch-cmake_Modules_GrVersion.cmake.diff	                        (rev 0)
+++ trunk/dports/science/gnuradio/files/patch-cmake_Modules_GrVersion.cmake.diff	2016-02-18 02:49:43 UTC (rev 145817)
@@ -0,0 +1,17 @@
+--- cmake/Modules/GrVersion.cmake.orig
++++ cmake/Modules/GrVersion.cmake
+@@ -41,7 +41,13 @@ if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
+         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+     )
+ else()
+-    set(GIT_DESCRIBE "v${MAJOR_VERSION}.${API_COMPAT}.x-xxx-xunknown")
++    if(NOT GR_GIT_COUNT)
++        set(GR_GIT_COUNT "compat-xxx")
++    endif()
++    if(NOT GR_GIT_HASH)
++        set(GR_GIT_HASH "xunknown")
++    endif()
++    set(GIT_DESCRIBE "v${MAJOR_VERSION}.${API_COMPAT}-${GR_GIT_COUNT}-${GR_GIT_HASH}")
+ endif()
+ 
+ ########################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160217/945ce06d/attachment-0001.html>


More information about the macports-changes mailing list