[107925] users/mojca/ports/science/geant

mojca at macports.org mojca at macports.org
Tue Jul 9 05:10:21 PDT 2013


Revision: 107925
          https://trac.macports.org/changeset/107925
Author:   mojca at macports.org
Date:     2013-07-09 05:10:21 -0700 (Tue, 09 Jul 2013)
Log Message:
-----------
geant: proper patches across different versions of Geant4

Modified Paths:
--------------
    users/mojca/ports/science/geant/Portfile

Added Paths:
-----------
    users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.495.diff

Modified: users/mojca/ports/science/geant/Portfile
===================================================================
--- users/mojca/ports/science/geant/Portfile	2013-07-09 10:24:39 UTC (rev 107924)
+++ users/mojca/ports/science/geant/Portfile	2013-07-09 12:10:21 UTC (rev 107925)
@@ -142,15 +142,18 @@
                             # port:iAIDA
         # iAIDA currently doesn't compile, while Geant4 compiles just fine without iAIDA
 
-        # 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");'
+        # - patch-source-interfaces-common-src-G4Qt.cc.diff: http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1487
+        # - patch-cmake_Modules_FindAIDA.cmake.diff: http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1485
+        if {${geant.version} == "10.0"} {
+            patchfiles      patch-cmake_Modules_FindAIDA.cmake.diff \
+                            patch-source-interfaces-common-src-G4Qt.cc.diff
+        }
         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
+        if {${geant.version} == "9.5"} {
+            patchfiles      patch-source-interfaces-common-src-G4Qt.cc.495.diff
         }
 
         configure.args-append -DGEANT4_INSTALL_DATA=OFF \

Added: users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.495.diff
===================================================================
--- users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.495.diff	                        (rev 0)
+++ users/mojca/ports/science/geant/files/patch-source-interfaces-common-src-G4Qt.cc.495.diff	2013-07-09 12:10:21 UTC (rev 107925)
@@ -0,0 +1,23 @@
+--- source/interfaces/common/src/G4Qt.cc.orig
++++ source/interfaces/common/src/G4Qt.cc
+@@ -149,6 +149,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/1366980e/attachment.html>


More information about the macports-changes mailing list