Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#42886 closed submission (fixed)

gildas @201402b_1 New port

Reported by: smaret (Sebastien Maret) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: robitaille@…, cooljeanius (Eric Gallager)
Port:

Description

Please find enclosed a new port for Gildas, a software for radioastronomy. Gildas is widely used by professional radioastronomers, and I think it would be useful to have it included in the MacPort distribution.

Attachments (14)

astro.in (382 bytes) - added by smaret (Sebastien Maret) 11 years ago.
class.in (382 bytes) - added by smaret (Sebastien Maret) 11 years ago.
clic.in (381 bytes) - added by smaret (Sebastien Maret) 11 years ago.
greg.in (381 bytes) - added by smaret (Sebastien Maret) 11 years ago.
mapping.in (384 bytes) - added by smaret (Sebastien Maret) 11 years ago.
mira.in (381 bytes) - added by smaret (Sebastien Maret) 11 years ago.
patch-admin-gildas-env.sh.diff (4.3 KB) - added by smaret (Sebastien Maret) 11 years ago.
patch-admin-Makefile.build.diff (221 bytes) - added by smaret (Sebastien Maret) 11 years ago.
patch-packages-clic-lib-Makefile.diff (412 bytes) - added by smaret (Sebastien Maret) 11 years ago.
patch-admin-Makefile.def.diff (1.1 KB) - added by smaret (Sebastien Maret) 11 years ago.
patch-admin-Makefile.python.diff (567 bytes) - added by smaret (Sebastien Maret) 11 years ago.
Portfile (3.5 KB) - added by smaret (Sebastien Maret) 11 years ago.
sic.in (380 bytes) - added by smaret (Sebastien Maret) 11 years ago.
patch-gildas-gtk-quartz.diff (3.0 KB) - added by seanfarley (Sean Farley) 11 years ago.
compile with gtk2+quartz; fails to run

Download all attachments as: .zip

Change History (31)

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: astro.in added

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: class.in added

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: clic.in added

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: greg.in added

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: mapping.in added

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: mira.in added

Changed 11 years ago by smaret (Sebastien Maret)

Changed 11 years ago by smaret (Sebastien Maret)

Changed 11 years ago by smaret (Sebastien Maret)

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Similar to my observations in #42887:

  • The revision line should be deleted because it starts at 0.
  • Add a sha256 checksum and remove the obsolete sha1 and md5 checksums unless upstream provides them.
  • Use the compilers portgroup instead of forcing the use of gcc48 for FORTRAN compiling. See the sparskit for an example of how to use it.
  • Determine and add the correct license
Last edited 11 years ago by mf2k (Frank Schima) (previous) (diff)

comment:2 Changed 11 years ago by smaret (Sebastien Maret)

Thanks again for the comments. Attached is a revised version of the Portfile.

I have a problem though. This port requires that CC, CXX, CPP, and FC/F77 are all from a gcc variant. For example, it's not possible to compile it using CC=clang and FC=gfortran-mp-4.8. How can I modify it so that all compilers come from the same compiler suite?

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Some observations:

  • The lines "extract.suffix .tar.gz" and "worksrcdir ${distname}" should be removed because those are the defaults.
  • You still have "port:gcc48" listed as a library dependency. Presumably instead the compilers 1.0 portgroup should be allowed to add the dependency for you.
  • In the build block, instead of using "system "cd ${worksrcpath} && ..."" you should use "system -W ${worksrcpath} "...""
  • In the destroot block, where you refer to "${workpath}/gildas-exe-feb14b", you should instead simplify that to "${worksrcpath}".
  • Instead of using "system" to call "cp -a", you should just use the Tcl command "copy".
  • Note that "reinplace" can accept multiple filenames in a single invocation. So you could simplify the destroot by copying all the files individually, then reinplacing the prefix in them all at once.

comment:5 in reply to:  4 Changed 11 years ago by smaret (Sebastien Maret)

Thanks for your comments. I've modified the port as you suggested, except for this:

Replying to ryandesign@…:

  • In the destroot block, where you refer to "${workpath}/gildas-exe-feb14b", you should instead simplify that to "${worksrcpath}".

"${worksrcpath}" is "${workpath}/gildas-src-feb14b", not "${workpath}/gildas-exe-feb14b".

comment:6 Changed 11 years ago by smaret (Sebastien Maret)

Attached is a new versions of the Portfile. The new version uses clang++ to compile C++ code, as advised by Ryan and Sean: https://www.mail-archive.com/macports-dev@lists.macosforge.org/msg25967.html

Changed 11 years ago by smaret (Sebastien Maret)

comment:7 Changed 11 years ago by smaret (Sebastien Maret)

New upstream version (apr14b).

Changed 11 years ago by smaret (Sebastien Maret)

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: Portfile added

comment:8 Changed 11 years ago by smaret (Sebastien Maret)

I've just fixed the version number, which was incorrect (should be 201404b).

comment:9 Changed 11 years ago by seanfarley (Sean Farley)

I had a chance to try to compile this last night and encountered a lot of problems:

  • incorrect linking with c++
  • opportunistic linking with ATLAS
  • dependence on gtk+x11 (instead of +quartz)

These aren't too bad and I should have a chance to fix them this weekend. For the gtk problem, do you know if quartz can be used instead of X11?

comment:10 Changed 11 years ago by seanfarley (Sean Farley)

Almost got this to work with gtk+quartz but there's a segfault :-( I fixed a bunch of errors in the package that made clang's cpp fail so now you can use any fortran compiler with any of the C compilers without too much trouble. This should help simply the variants (just need a fortran variants now).

Quick question: the portfile references a bin/sic file that seems to be missing. Is that needed or not?

comment:11 in reply to:  10 ; Changed 11 years ago by smaret (Sebastien Maret)

Replying to sean@…:

Quick question: the portfile references a bin/sic file that seems to be missing. Is that needed or not?

Yes, it is needed. I forgot to attach it.

Changed 11 years ago by smaret (Sebastien Maret)

Attachment: sic.in added

comment:12 in reply to:  9 ; Changed 11 years ago by smaret (Sebastien Maret)

Replying to sean@…:

  • opportunistic linking with ATLAS

Probably this can be fixed by replacing:

source admin/gildas-env.sh -c ${configure.fc} -s ${prefix}/include:${prefix}/lib:/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/

with:

source admin/gildas-env.sh -c ${configure.fc} -s /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/:${prefix}/include:${prefix}/lib

comment:13 in reply to:  11 Changed 11 years ago by seanfarley (Sean Farley)

Replying to sebastien.maret@…:

Replying to sean@…:

Quick question: the portfile references a bin/sic file that seems to be missing. Is that needed or not?

Yes, it is needed. I forgot to attach it.

Ok, cool, that's what I thought it would be.

comment:14 in reply to:  12 Changed 11 years ago by seanfarley (Sean Farley)

Replying to sebastien.maret@…:

Replying to sean@…:

  • opportunistic linking with ATLAS

Probably this can be fixed by replacing:

source admin/gildas-env.sh -c ${configure.fc} -s ${prefix}/include:${prefix}/lib:/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/

with:

source admin/gildas-env.sh -c ${configure.fc} -s /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/:${prefix}/include:${prefix}/lib

Actually, it's tougher than that. In general, one needs to make sure not to use -llapack / -lblas when ATLAS is present, else the linker will pick them up in ${prefix}/lib. So, I fixed it by replacing all the -llapack and -lblas references with '-framework Accelerate' and '-framework vecLib'. The only wart left is that gtk2 must be installed with the +x11 variant (which conflicts with +quartz). I can attach my patch to make it build with gtk2+quartz but it crashes upon starting up.

Changed 11 years ago by seanfarley (Sean Farley)

compile with gtk2+quartz; fails to run

comment:15 Changed 11 years ago by seanfarley (Sean Farley)

Ok, I think this is now done. I'll test it on my Mavericks machine and then commit it.

comment:16 Changed 11 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Committed in r119194.

comment:17 Changed 11 years ago by smaret (Sebastien Maret)

Thanks for your help with this!

Note: See TracTickets for help on using tickets.