svn commit: r318197 - head/science/avogadro/files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Tue May 14 20:10:29 UTC 2013
Author: rakuco
Date: Tue May 14 20:10:28 2013
New Revision: 318197
URL: http://svnweb.freebsd.org/changeset/ports/318197
Log:
Fix the build on 64-bits systems.
Add "-fPIC" to the compilation lines if `uname -p' returns "amd64"
(FreeBSD's case).
The patch has been submitted upstream.
PR: ports/178537
Added:
head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 (contents, props changed)
Added: head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 Tue May 14 20:10:28 2013 (r318197)
@@ -0,0 +1,41 @@
+From f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco at FreeBSD.org>
+Date: Tue, 14 May 2013 23:03:57 +0300
+Subject: [PATCH] Treat "amd64" as a possible value for CMAKE_SYSTEM_PROCESSOR.
+
+The BSDs (and maybe OS X) report 64-bits sytems as "amd64" instead of
+"x86_64", so accept that value when deciding whether to pass -fPIC to the
+compiler too.
+---
+ libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt | 2 +-
+ libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt b/libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+index fb88316..8ee7d71 100644
+--- ./libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
++++ ./libavogadro/src/extensions/crystallography/spglib/CMakeLists.txt
+@@ -20,6 +20,6 @@ add_library(spglib STATIC ${spglib_SRCS})
+ set_target_properties(spglib PROPERTIES COMPILE_FLAGS "-w")
+
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
+ endif()
+diff --git a/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt b/libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+index 0cd0c3e..62adfe3 100644
+--- ./libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
++++ ./libavogadro/src/extensions/swcntbuilder/tubegen/CMakeLists.txt
+@@ -19,7 +19,7 @@ add_library(tubegen STATIC ${tubegen_SRCS})
+ set_target_properties(tubegen PROPERTIES COMPILE_FLAGS "-w")
+
+ # Set -fPIC on x86_64
+-if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
++if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" )
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
+ endif()
+--
+1.8.2.3
+
More information about the svn-ports-all
mailing list