[136331] trunk/dports/archivers/blosc

ryandesign at macports.org ryandesign at macports.org
Thu May 14 20:27:57 PDT 2015


Revision: 136331
          https://trac.macports.org/changeset/136331
Author:   ryandesign at macports.org
Date:     2015-05-14 20:27:57 -0700 (Thu, 14 May 2015)
Log Message:
-----------
blosc: fix build on non-x86_64 systems (#47658)

Modified Paths:
--------------
    trunk/dports/archivers/blosc/Portfile

Added Paths:
-----------
    trunk/dports/archivers/blosc/files/
    trunk/dports/archivers/blosc/files/patch-CMakeLists.txt.diff
    trunk/dports/archivers/blosc/files/patch-blosc-shuffle.c.diff

Modified: trunk/dports/archivers/blosc/Portfile
===================================================================
--- trunk/dports/archivers/blosc/Portfile	2015-05-15 02:56:20 UTC (rev 136330)
+++ trunk/dports/archivers/blosc/Portfile	2015-05-15 03:27:57 UTC (rev 136331)
@@ -28,6 +28,9 @@
 checksums           rmd160  d8b2f37a62b12a58ffec1e3bc802094e87cf8e48 \
                     sha256  bd98117e3aca998bf3b1429371b4665a4f9d8de42e7bb54889931516e4ce945f
 
+patchfiles-append   patch-CMakeLists.txt.diff \
+                    patch-blosc-shuffle.c.diff
+
 configure.args-append \
                     -DBUILD_STATIC=ON \
                     -DBUILD_HDF5_FILTER=OFF \

Added: trunk/dports/archivers/blosc/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/archivers/blosc/files/patch-CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/archivers/blosc/files/patch-CMakeLists.txt.diff	2015-05-15 03:27:57 UTC (rev 136331)
@@ -0,0 +1,27 @@
+Fix build on PowerPC
+https://github.com/Blosc/c-blosc/commit/1c36bf1507f52cd0b48b49d62f0622bfe3763d50
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -139,8 +139,11 @@ endif(NOT CMAKE_BUILD_TYPE)
+ # by the compiler. Note we DO NOT check which hardware features are supported
+ # by this (the host) system, because we want to be able to support compiling
+ # for newer hardware on older machines as well as cross-compilation.
+-set(SYSTEM_PROCESSOR_INTEL_X86 ((CMAKE_SYSTEM_PROCESSOR STREQUAL i686) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64)))
+-if(SYSTEM_PROCESSOR_INTEL_X86)
++message(STATUS "Building for system processor ${CMAKE_SYSTEM_PROCESSOR}.")
++if(CMAKE_SYSTEM_PROCESSOR STREQUAL i386 OR
++   CMAKE_SYSTEM_PROCESSOR STREQUAL i686 OR
++   CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR
++   CMAKE_SYSTEM_PROCESSOR STREQUAL amd64)
+     if(CMAKE_C_COMPILER_ID STREQUAL GNU)
+         set(COMPILER_SUPPORT_SSE2 TRUE)
+         if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.7 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.7)
+@@ -175,7 +178,7 @@ if(SYSTEM_PROCESSOR_INTEL_X86)
+         # Unrecognized compiler. Emit a warning message to let the user know hardware-acceleration won't be available.
+         message(WARNING "Unable to determine which ${CMAKE_SYSTEM_PROCESSOR} hardware features are supported by the C compiler (${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}).")
+     endif()
+-else(SYSTEM_PROCESSOR_INTEL_X86)
++else()
+     # If the target system processor isn't recognized, emit a warning message to alert the user
+     # that hardware-acceleration support won't be available but allow configuration to proceed.
+     message(WARNING "Unrecognized system processor ${CMAKE_SYSTEM_PROCESSOR}. Cannot determine which hardware features (${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}) supports, so hardware-accelerated implementations will not be available.")

Added: trunk/dports/archivers/blosc/files/patch-blosc-shuffle.c.diff
===================================================================
--- trunk/dports/archivers/blosc/files/patch-blosc-shuffle.c.diff	                        (rev 0)
+++ trunk/dports/archivers/blosc/files/patch-blosc-shuffle.c.diff	2015-05-15 03:27:57 UTC (rev 136331)
@@ -0,0 +1,15 @@
+Fix build on "unknown" architectures
+https://github.com/Blosc/c-blosc/commit/d84472e959651b5ae4cfb4a1f8e81e9c1058f53b
+--- blosc/shuffle.c.orig
++++ blosc/shuffle.c
+@@ -217,6 +217,10 @@ static blosc_cpu_features blosc_get_cpu_features(void) {
+   #warning Hardware-acceleration detection not implemented for the target architecture. Only the generic shuffle/unshuffle routines will be available.
+   #endif
+ 
++static blosc_cpu_features blosc_get_cpu_features(void) {
++  return BLOSC_HAVE_NOTHING;
++}
++
+ #endif
+ 
+ static shuffle_implementation_t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150514/fc001b6b/attachment.html>


More information about the macports-changes mailing list