<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[135909] trunk/dports/science/gate</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/135909">135909</a></dd>
<dt>Author</dt> <dd>mojca@macports.org</dd>
<dt>Date</dt> <dd>2015-05-06 13:46:12 -0700 (Wed, 06 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>gate: take a newer commit, add a patch to allow building against geant4.10.1.p01 (closes #47404)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportssciencegatePortfile">trunk/dports/science/gate/Portfile</a></li>
<li><a href="#trunkdportssciencegatefilespatchaddmenudiff">trunk/dports/science/gate/files/patch-addmenu.diff</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportssciencegatefilespatchsourcephysicsGateVSourcediff">trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssciencegatePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/gate/Portfile (135908 => 135909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gate/Portfile        2015-05-06 20:44:31 UTC (rev 135908)
+++ trunk/dports/science/gate/Portfile        2015-05-06 20:46:12 UTC (rev 135909)
</span><span class="lines">@@ -8,15 +8,15 @@
</span><span class="cx"> PortGroup cmake 1.0
</span><span class="cx"> PortGroup active_variants 1.1
</span><span class="cx">
</span><del>-set git_sha a20d5f0
-set git_date 20150318
</del><ins>+set git_sha 684ff5a2
+set git_date 20150414
</ins><span class="cx">
</span><span class="cx"> # Using GitHub just for the sake of downloadable zips
</span><span class="cx"> PortGroup github 1.0
</span><span class="cx"> github.setup OpenGATE Gate ${git_sha}
</span><span class="cx"> name gate
</span><span class="cx"> version 7.1
</span><del>-revision 1
</del><ins>+revision 2
</ins><span class="cx"> # version 7.1-git-${git_date}-${git_sha}
</span><span class="cx">
</span><span class="cx"> ## official repository
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx"> homepage http://www.opengatecollaboration.org
</span><span class="cx"> platforms darwin
</span><span class="cx">
</span><del>-checksums rmd160 e81d692f267aa87a557493dccba28f70f2d15025 \
- sha256 9a4e7fb77a200808fc22030279c12979a0000065a08a4cd9e122b31a744c03db
</del><ins>+checksums rmd160 dd346db9be8d28fcdd9e0a91cce25ef486ebe38f \
+ sha256 5f3953c1cead4e988bd8e19df1c5362912312446013cc2aeac7f7f056725c61f
</ins><span class="cx">
</span><span class="cx"> # TODO: take this data from a geant4 portgroup
</span><span class="cx"> set geant.data_versions_10.1 {
</span><span class="lines">@@ -74,9 +74,11 @@
</span><span class="cx">
</span><span class="cx"> depends_lib port:root5
</span><span class="cx">
</span><del>-# Geant4.9.5 probably doesn't support icon bars
-if {![variant_isset geant495]} {
- patchfiles patch-addmenu.diff
</del><ins>+patchfiles-append patch-addmenu.diff
+
+if {![variant_isset geant4100]} {
+ patchfiles-append \
+ patch-source-physics-GateVSource.diff
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> configure.args-append \
</span><span class="lines">@@ -153,7 +155,7 @@
</span><span class="cx"> }
</span><span class="cx"> variant geant4101 conflicts geant4100 description {Use Geant4 10.1} {
</span><span class="cx"> set geant.version 10.1
</span><del>- set geant.revision 0
</del><ins>+ set geant.revision 1
</ins><span class="cx"> set geant.port_name geant4.${geant.version}
</span><span class="cx"> set geant.data_versions ${geant.data_versions_10.1}
</span><span class="cx"> set geant.datadir ${prefix}/share/Geant4/Data/Geant4.${geant.version}
</span></span></pre></div>
<a id="trunkdportssciencegatefilespatchaddmenudiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/gate/files/patch-addmenu.diff (135908 => 135909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gate/files/patch-addmenu.diff        2015-05-06 20:44:31 UTC (rev 135908)
+++ trunk/dports/science/gate/files/patch-addmenu.diff        2015-05-06 20:46:12 UTC (rev 135909)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> --- Gate.cc.orig
</span><span class="cx"> +++ Gate.cc
</span><del>-@@ -382,6 +382,7 @@ int main( int argc, char* argv[] )
-
</del><ins>+@@ -389,6 +389,7 @@ int main( int argc, char* argv[] )
+ #ifdef G4UI_USE
</ins><span class="cx"> if (ui) // Launching interactive mode // Qt
</span><span class="cx"> {
</span><span class="cx"> + UImanager->ApplyCommand("/gate/control/execute gui.mac");
</span></span></pre></div>
<a id="trunkdportssciencegatefilespatchsourcephysicsGateVSourcediff"></a>
<div class="addfile"><h4>Added: trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff (0 => 135909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff         (rev 0)
+++ trunk/dports/science/gate/files/patch-source-physics-GateVSource.diff        2015-05-06 20:46:12 UTC (rev 135909)
</span><span class="lines">@@ -0,0 +1,130 @@
</span><ins>+--- source/physics/include/GateVSource.hh.orig
++++ source/physics/include/GateVSource.hh
+@@ -119,7 +119,7 @@ public:
+ // Class function related to the userFocused angDist type
+ void InitializeUserFocalShape();
+ G4ThreeVector UserFocalShapeGenerateOne();
+- G4SPSPosDistribution *GetUserFocalShape() { return &mUserFocalShape;}
++ G4SPSPosDistribution *GetUserFocalShape() { return mUserFocalShape; }
+ void SetUserFocalShapeFlag(G4bool b) { mUserFocalShapeInitialisation = b; }
+
+ //void AddTimeSlices(double time, int nParticles);
+@@ -186,8 +186,8 @@ protected:
+ G4ThreeVector mUserFluenceVoxelSize;
+ std::vector<double> mUserPosX;
+ std::vector<double> mUserPosY;
+- G4SPSRandomGenerator mUserPosGenX;
+- std::vector<G4SPSRandomGenerator> mUserPosGenY;
++ G4SPSRandomGenerator *mUserPosGenX;
++ std::vector<G4SPSRandomGenerator*> mUserPosGenY;
+ // - copy of useful members from G4SPSPosDistribution (unreachable G4 class)
+ G4ThreeVector mCentreCoords;
+ G4ThreeVector mRotX;
+@@ -198,7 +198,7 @@ protected:
+ G4bool mIsUserFocalShapeActive;
+ G4bool mUserFocalShapeInitialisation;
+ G4double mUserFocalRadius;
+- G4SPSPosDistribution mUserFocalShape;
++ G4SPSPosDistribution *mUserFocalShape;
+
+ std::vector<double> mTimeList;
+ std::vector<double> mActivityList;
+--- source/physics/src/GateVSource.cc.orig
++++ source/physics/src/GateVSource.cc
+@@ -83,8 +83,9 @@ GateVSource::GateVSource(G4String name): m_name( name ) {
+ // mUserPosRndm = NULL;
+ mIsUserFocalShapeActive = false;
+ mUserFocalShapeInitialisation = false;
++ mUserFocalShape = new G4SPSPosDistribution();
+
+-
++ mUserPosGenX = new G4SPSRandomGenerator();
+ m_posSPS = new GateSPSPosDistribution();
+ m_posSPS->SetBiasRndm( GetBiasRndm() );
+ m_eneSPS = new GateSPSEneDistribution();
+@@ -116,6 +117,11 @@ GateVSource::~GateVSource()
+ delete m_posSPS;
+ delete m_eneSPS;
+ delete m_angSPS;
++ delete mUserFocalShape;
++ delete mUserPosGenX;
++ for (int i = 0; i<mUserPosGenY.size(); ++i) {
++ delete mUserPosGenY[i];
++ }
+ }
+ //-------------------------------------------------------------------------------------------------
+
+@@ -883,7 +889,7 @@ void GateVSource::InitializeUserFluence()
+ posX = (0.5 * sizeX) + userFluenceImage.GetOrigin().x();
+ // posX = ((0.5 * sizeX) - userFluenceImage.GetHalfSize().x());
+
+- mUserPosGenX.SetXBias(G4ThreeVector(0.,0.,0.));
++ mUserPosGenX->SetXBias(G4ThreeVector(0.,0.,0.));
+ for(int i=0; i<resX;i++)
+ {
+ mUserPosX[i] = posX;
+@@ -891,18 +897,24 @@ void GateVSource::InitializeUserFluence()
+ sum = 0.0;
+ posY = (0.5 * sizeY) + userFluenceImage.GetOrigin().y();
+ // posY = ((0.5 * sizeY) - userFluenceImage.GetHalfSize().y());
+-
+- mUserPosGenY[i].SetYBias(G4ThreeVector(0.,0.,0.));
++
++ if (mUserPosGenY[i]==0) {
++ mUserPosGenY[i] = new G4SPSRandomGenerator();
++ }
++ mUserPosGenY[i]->SetYBias(G4ThreeVector(0.,0.,0.));
+ for(int j=0; j<resY; j++)
+ {
+-        sum += userFluenceImage.GetValue(i,j,0);
+-        mUserPosY[j] = posY;
++ sum += userFluenceImage.GetValue(i,j,0);
++ mUserPosY[j] = posY;
+
+-        mUserPosGenY[i].SetYBias(G4ThreeVector(j+1,userFluenceImage.GetValue(i,j,0),0.));
+-        posY += sizeY;
++ if (mUserPosGenY[i]==0) {
++ mUserPosGenY[i] = new G4SPSRandomGenerator();
++ }
++ mUserPosGenY[i]->SetYBias(G4ThreeVector(j+1,userFluenceImage.GetValue(i,j,0),0.));
++ posY += sizeY;
+ }
+
+- mUserPosGenX.SetXBias(G4ThreeVector(i+1,sum,0.));
++ mUserPosGenX->SetXBias(G4ThreeVector(i+1,sum,0.));
+ posX += sizeX;
+ }
+
+@@ -913,8 +925,8 @@ void GateVSource::InitializeUserFluence()
+ //----------------------------------------------------------------------------------------
+ G4ThreeVector GateVSource::UserFluencePosGenerateOne()
+ {
+- int i = floor(mUserPosGenX.GenRandX());
+- int j = floor(mUserPosGenY[i].GenRandY());
++ int i = floor(mUserPosGenX->GenRandX());
++ int j = floor(mUserPosGenY[i]->GenRandY());
+
+ // uniform rand in pixel
+ double x = mUserPosX[i] + (G4UniformRand()-0.5)*mUserFluenceVoxelSize.x();
+@@ -986,9 +998,9 @@ void GateVSource::InitializeUserFocalShape()
+ {
+ mIsUserFocalShapeActive = true;
+ mUserFocalShapeInitialisation = false;
+- mUserFocalShape.SetBiasRndm( GetBiasRndm() );
+- mUserFocalShape.SetPosDisType("Plane");
+- mUserFocalShape.SetPosDisShape("Circle");
++ mUserFocalShape->SetBiasRndm( GetBiasRndm() );
++ mUserFocalShape->SetPosDisType("Plane");
++ mUserFocalShape->SetPosDisShape("Circle");
+
+ m_angSPS->SetAngDistType("focused");
+ }
+@@ -997,7 +1009,7 @@ void GateVSource::InitializeUserFocalShape()
+ //----------------------------------------------------------------------------------------
+ G4ThreeVector GateVSource::UserFocalShapeGenerateOne()
+ {
+- G4ThreeVector position = mUserFocalShape.GenerateOne();
++ G4ThreeVector position = mUserFocalShape->GenerateOne();
+ // DD(position);
+ m_angSPS->SetFocusPoint(position);
+ G4ThreeVector momentum = m_angSPS->GenerateOne();
</ins></span></pre>
</div>
</div>
</body>
</html>