On Fri, Jun 28, 2013 at 8:32 PM, Frank Schima wrote: > On Jun 28, 2013, at 11:22 AM, Mojca Miklavec wrote: >> On Fri, Jun 28, 2013 at 6:44 PM, Frank Schima wrote: > > It is fine to have multiple versions but we should use the port_select method > and NOT have a generic geant4 port like perl5. We want to follow the python > model not the perl model in Macports.
OK, fine. I'm not familiar with the concept yet and with implementation details, but I agree. > So if you want this what we need to do is the following: > 1. Move the current geant4 port to "geant-4.9.4". That means svn cp the > current port and then make geant4 obsolete. > 2. Create a new port for geant-4.9.5. > 3. Create a new port for geant-4.9.6. > 4. Create a geant_select port. Let's not have any numbers involved in this > port because there will presumably be a geant5 someday. > >> Btw: Geant4 10.0 beta has just been released! > > 5. Create a new port for geant-4.10.0. OK. (Moving geant4 to geant-4.9.4 is not strictly necessary in case that it turns out to be too complicated.) > We can have separate Portfiles for each of these and possibly not use > sub-ports. But it might be easier to make sub-ports for each build style. I don't have a good insight into this (difference between suports etc.). But with a good portgroup the need for sub-ports deminishes. > When did it switch to cmake? Most probably 9.4 was the first one that supported cmake. And 10.0 is the first one dropping support for gnu make. So 9.4, 9.5 and 9.6 should work with both. (But I wouldn't bother loosing any time trying to port 9.4 to CMake-based installation.) My suggestion would be to try to get 9.6 working with CMake first (and maybe 10.0 in parallel), then "backport" the same strategy to 9.5 and try to figure out what functions are needed in the portgroup along the way. > If it's version 4.9.6, then we would have one Portfile with 4.9.4 and 4.9.5 > and the rest can go in the Portfile for 4.9.6+. I'm not sure of a good model > Portfile to use. Maybe the mysql55 / mysql55-server Portfile? That has both > in the same Portfile using subports without a Portgroup. The php5.3+ ports > use a Portgroup with subport support. That is more complicated and more > flexible. I don't think we need that much complexity. > >>> Do you have a Portfile for that version in some state? Can you send it to >>> me or attach to one of the tickets? Time permitting, I am interested in >>> helping getting this port updated. >> >> See https://trac.macports.org/ticket/32716. I'm currently trying to >> create a port for Geant4 10.0 by modifying that one. (I'm not even >> sure if it will compile, but we need to start at some point and >> possible submit bug reports before the actual release.) >> >>> Another thought, I think that separating the data into a subport would be a >>> good idea but I'm open to staying with the current all inclusive single >>> port. >> >> I would really really like to see different versions installed >> side-by-side. Currently that would be 4.9.5p2, 4.9.6p2 and 4.10.0b1 >> with geant4 defaulting to 4.9.6p2. In that case it would make sense to >> create a portgroup geant (or geant4). It would be very handy to be >> able to specify just >> somefunction(G4NDL, 4.3, G4NDL, tar.gz, G4NEUTRONHPDATA, >> 55493e74cba90e6cb167a5008e138cd7) >> rather than >> >> set v_G4NDL 4.3 >> ... >> distfiles geant${version}.tar.gz:cern \ >> G4NDL.${v_G4NDL}.tar.gz:cern \ >> ... >> checksums geant${version}.tar.gz \ >> <checksums> \ >> G4NDL.${G4NDL_v}.tar.gz \ >> <checksums> \ >> ... >> >> I didn't study the subports yet. It would be perfectly ok to use >> depend geant4-data-G4NDL-4.3 >> or something like this. That would also make it possible to share the >> same data file across different versions of Geant4 (also on the same >> place), but I don't know how to properly implement that. I'm not yet >> skilled enough. One needs approximately 8 data files. If we would keep >> 2-3 versions of Geant4 alive at the same moment, that would mean up to >> 24 packages. >> >> Not entirely serious about it, but: are hidden packages possible? ;) >> It doesn't help anyone to see that a package geant4-data-G4NDL-4.3 is >> available to be installed. It would be nice to have it there >> independent of geant4, but it would be a bit confusing for the user. > > Given multiple ports of geant, we should definitely create separate data > ports. There is no need for them to be hidden and Macports has no mechanism > for that. This is what dependencies are for. There are over 17,000 ports in > Macports. Most people have no idea what most of them are already. OK. > The question is do we want 1 port called "geant4-data" or do we want a > subport for each of the 8 datasets? Do they get updated individually or all > at once? They are updated individually, but updates only matter when geant4 gets updated. A particular version of Geant4 needs to depend on a set of packages (name,version), so we need to: - be able to say depend port:geant4-data-<name>-<version> (or in some similar way, possibly with a macro) - be able to install multiple versions of the same package <name> If one can cover that functionality by writing a single Portfile, that would be awesome, but if we need one portfile per each name & version, that's still fine. I would prefer having a single Portfile if that is possible, but I don't know how to achieve the desired functionality. Any help would be welcome. The contents of that Portfile could be something like this: PortSystem 1.0 PortGroup geant 4.0 name geant4-data subport G4NDL { set_shortname G4NDL set_variablename G4NEUTRONHPDATA # or: set_properties(G4NDL, G4NEUTRONHPDATA) add_version(4.3, 55493e74cba90e6cb167a5008e138cd7) add_version(4.1, ff018eca2c2ca3bc32a096c2d72df64f) ... } subport G4EMLOW { set_shortname G4EMLOW set_variablename G4LEDATA add_version(6.33, 0002a1c16c9b1fb5e8d49dfbce12a576) ... } ... > This port(s) should have a run-time dependency on any geant. The problem is > that we need to have each geant have different file locations and thus we > cannot use the path style dependency. I'm not sure of the best way to handle > this. I think we will have to resort to geant-4.X variants. I assume we can > have a single install location for the data files (i.e. > /opt/local/etc/geant4/data) and have all geant-4.X.Y ports point to that same > directory. I also hope that Geant4 doesn't have problems if there are multiple versions of the same data in the same directory, as in: /opt/local/share/Geant/Data/G4EMLOW6.31/ /opt/local/share/Geant/Data/G4EMLOW6.32/ /opt/local/share/Geant/Data/G4EMLOW6.33/ /opt/local/share/Geant/Data/RealSurface1.0/ ... I believe that one only needs to make sure that the DATA directory is properly set. Mojca _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
