[107923] users/mojca/ports/science
mojca at macports.org
mojca at macports.org
Tue Jul 9 03:21:01 PDT 2013
Revision: 107923
https://trac.macports.org/changeset/107923
Author: mojca at macports.org
Date: 2013-07-09 03:21:01 -0700 (Tue, 09 Jul 2013)
Log Message:
-----------
geant: add a patch for LC_NUMERIC
Modified Paths:
--------------
users/mojca/ports/science/geant/Portfile
users/mojca/ports/science/geant4.9.6/Portfile
Added Paths:
-----------
users/mojca/ports/science/geant/files/patch-cmake_Modules_FindAIDA.cmake.diff
users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.diff
users/mojca/ports/science/geant4.9.6/files/patch-source-interfaces-common-src-G4Qt.cc.diff
Modified: users/mojca/ports/science/geant/Portfile
===================================================================
--- users/mojca/ports/science/geant/Portfile 2013-07-09 09:57:58 UTC (rev 107922)
+++ users/mojca/ports/science/geant/Portfile 2013-07-09 10:21:01 UTC (rev 107923)
@@ -142,7 +142,14 @@
# port:iAIDA
# iAIDA currently doesn't compile, while Geant4 compiles just fine without iAIDA
- if {${geant.version} == "9.6" || ${geant.version} == "10.0"} {
+ # TODO: patch-source-interfaces-common-src-G4Qt.cc.diff is needed in all versions at the moment,
+ # but I need to check if the same patch applies (maybe some offset is needed)
+ # I could also use reinplace to simply add 'setlocale (LC_NUMERIC, "C");'
+ if {${geant.version} == "9.6"} {
+ patchfiles patch-cmake_Modules_FindAIDA.cmake.diff \
+ patch-source-interfaces-common-src-G4Qt.cc.diff
+ }
+ if {${geant.version} == "10.0"} {
patchfiles patch-cmake_Modules_FindAIDA.cmake.diff
}
Added: users/mojca/ports/science/geant/files/patch-cmake_Modules_FindAIDA.cmake.diff
===================================================================
--- users/mojca/ports/science/geant/files/patch-cmake_Modules_FindAIDA.cmake.diff (rev 0)
+++ users/mojca/ports/science/geant/files/patch-cmake_Modules_FindAIDA.cmake.diff 2013-07-09 10:21:01 UTC (rev 107923)
@@ -0,0 +1,14 @@
+--- cmake/Modules/FindAIDA.cmake.orig
++++ cmake/Modules/FindAIDA.cmake
+@@ -30,10 +30,7 @@ else()
+ OUTPUT_VARIABLE AIDA_LIBRARIES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+- execute_process(
+- COMMAND ${AIDA_CONFIG_EXECUTABLE} --implementation
+- OUTPUT_VARIABLE AIDA_IMPLEMENTATION
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
++ set(AIDA_IMPLEMENTATION "MacPorts")
+
+ # Make variables changeble to the advanced user
+ mark_as_advanced(AIDA_CONFIG_EXECUTABLE)
Added: users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.diff
===================================================================
--- users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.diff (rev 0)
+++ users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.diff 2013-07-09 10:21:01 UTC (rev 107923)
@@ -0,0 +1,23 @@
+--- source/interfaces/common/src/G4Qt.cc.orig
++++ source/interfaces/common/src/G4Qt.cc
+@@ -148,6 +148,20 @@ G4Qt::G4Qt (
+ }
+ #endif
+ // AddDispatcher ((G4DispatchFunction)XtDispatchEvent);
++
++/*
++ * On some non-English locale, comma is used for the decimal separator instead of dot
++ * bringing to weird behavior of strtod (string to double) function in user application.
++ * This is "by design" from Qt, see https://bugreports.qt-project.org/browse/QTBUG-10994
++ *
++ * $ LC_NUMERIC=fr_FR.UTF-8 ./qtstrtod
++ * strtod(0.1) = 0
++ * $ LC_NUMERIC=C ./qtstrtod
++ * strtod(0.1) = 0.1
++ *
++ * Jerome Suhard, jerome at suhard.fr
++ */
++ setlocale (LC_NUMERIC, "C");
+ }
+ /***************************************************************************/
+ G4Qt::~G4Qt (
Modified: users/mojca/ports/science/geant4.9.6/Portfile
===================================================================
--- users/mojca/ports/science/geant4.9.6/Portfile 2013-07-09 09:57:58 UTC (rev 107922)
+++ users/mojca/ports/science/geant4.9.6/Portfile 2013-07-09 10:21:01 UTC (rev 107923)
@@ -34,7 +34,8 @@
file mkdir ${configure.dir}
}
-patchfiles patch-cmake_Modules_FindAIDA.cmake.diff
+patchfiles patch-cmake_Modules_FindAIDA.cmake.diff \
+ patch-source-interfaces-common-src-G4Qt.cc.diff
configure.post_args ${worksrcpath}
Added: users/mojca/ports/science/geant4.9.6/files/patch-source-interfaces-common-src-G4Qt.cc.diff
===================================================================
--- users/mojca/ports/science/geant4.9.6/files/patch-source-interfaces-common-src-G4Qt.cc.diff (rev 0)
+++ users/mojca/ports/science/geant4.9.6/files/patch-source-interfaces-common-src-G4Qt.cc.diff 2013-07-09 10:21:01 UTC (rev 107923)
@@ -0,0 +1,23 @@
+--- source/interfaces/common/src/G4Qt.cc.orig
++++ source/interfaces/common/src/G4Qt.cc
+@@ -148,6 +148,20 @@ G4Qt::G4Qt (
+ }
+ #endif
+ // AddDispatcher ((G4DispatchFunction)XtDispatchEvent);
++
++/*
++ * On some non-English locale, comma is used for the decimal separator instead of dot
++ * bringing to weird behavior of strtod (string to double) function in user application.
++ * This is "by design" from Qt, see https://bugreports.qt-project.org/browse/QTBUG-10994
++ *
++ * $ LC_NUMERIC=fr_FR.UTF-8 ./qtstrtod
++ * strtod(0.1) = 0
++ * $ LC_NUMERIC=C ./qtstrtod
++ * strtod(0.1) = 0.1
++ *
++ * Jerome Suhard, jerome at suhard.fr
++ */
++ setlocale (LC_NUMERIC, "C");
+ }
+ /***************************************************************************/
+ G4Qt::~G4Qt (
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130709/d7d90d3a/attachment.html>
More information about the macports-changes
mailing list