aboutsummaryrefslogtreecommitdiffstats
path: root/science/avogadro
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2013-05-15 04:10:28 +0800
committerrakuco <rakuco@FreeBSD.org>2013-05-15 04:10:28 +0800
commit1747ac83ce4814bc2591256018b7ab79ac5819c3 (patch)
treeb842be8544ee1fcef9d6a8fa27ed759c627b1454 /science/avogadro
parenta08367770c10df7452b3e5921aca34b46ad416d2 (diff)
downloadfreebsd-ports-gnome-1747ac83ce4814bc2591256018b7ab79ac5819c3.tar.gz
freebsd-ports-gnome-1747ac83ce4814bc2591256018b7ab79ac5819c3.tar.zst
freebsd-ports-gnome-1747ac83ce4814bc2591256018b7ab79ac5819c3.zip
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
Diffstat (limited to 'science/avogadro')
-rw-r--r--science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb041
1 files changed, 41 insertions, 0 deletions
diff --git a/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 b/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0
new file mode 100644
index 000000000000..ff8a8e3d16d3
--- /dev/null
+++ b/science/avogadro/files/patch-git_f518cdf4d281ac6da124b179a7f9b4b71ca90cb0
@@ -0,0 +1,41 @@
+From f518cdf4d281ac6da124b179a7f9b4b71ca90cb0 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <rakuco@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
+