Feature #566

Distribute gammalib for Macs via the Macports package manager?

Added by Deil Christoph over 11 years ago. Updated over 11 years ago.

Status:NewStart date:10/14/2012
Priority:NormalDue date:
Assigned To:Deil Christoph% Done:

0%

Category:-
Target version:-
Duration:

Description

Jürgen, do you think it would be a good idea to distribute gammalib for Macs via the Macports package manager?

I use and like Macports a lot, the advantage for the end-user is that with one command

sudo port install gammalib +cfitsio +python27 (maybe + other stuff like gcc for OpenMP or matplotlib for plotting)

all dependencies are installed generally without any problems and one gets updates for all software easily.

I have written a gammalib Portfile that works and am willing to maintain it. There's two problems I still have to figure out:
  • Python files at the moment are installed in /opt/local/lib/python2.7/site-packages/gammalib, but they should go to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages. Also they are not registered for some reason by Macports, i.e. they don’t show when I say port contents gammalib or uninstalled via port uninstall gammalib.
  • The swig interface files /opt/local/share/gammalib are also not registered for some reason.

Of course I could add a ctools port if you like it.

Portfile (3.28 KB) Deil Christoph, 10/15/2012 09:51 AM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 11 years ago

Great. Indeed, ultimately I would like to have GammaLib installed through all available package managers. This is one of the items we have on our task list. If you can take about MacPorts, this would be great.

Can you put information about the procedure somewhere in the Wiki? We may generate a new page called “deployment”, under which we will then create pages for the various systems.

By the way: if you have written a script for deployment it can go in the dev directory of GammaLib, where I gather actually scripts used for various development issues.

For the MacPorts version, I guess we want to create the SWIG wrappers so that SWIG is not needed for deployment. In dev there is a script called release_gammalib.sh which I use for release. This script creates the Python wrappers and PDF files for documentation before making a tarball. That’s the tarball that I then put on sourceforge.

#2 Updated by Deil Christoph over 11 years ago

Jürgen Knödlseder wrote:

Great. Indeed, ultimately I would like to have GammaLib installed through all available package managers. This is one of the items we have on our task list. If you can take about MacPorts, this would be great.

Can you put information about the procedure somewhere in the Wiki? We may generate a new page called “deployment”, under which we will then create pages for the various systems.

I don’t see any buttons to edit the wiki /create new pages. Do I need extra permissions?

By the way: if you have written a script for deployment it can go in the dev directory of GammaLib, where I gather actually scripts used for various development issues.

For Macports all that is needed is one Portfile which will live in the macports repo. Based on the instructions in that file, Macports then fetches the standard gammalib tarball from sourceforge and builds / installs it. To illustrate I have attached the preliminary version of the Portfile, it is work in progress.

For the MacPorts version, I guess we want to create the SWIG wrappers so that SWIG is not needed for deployment. In dev there is a script called release_gammalib.sh which I use for release. This script creates the Python wrappers and PDF files for documentation before making a tarball. That’s the tarball that I then put on sourceforge.

I could specify in the Portfile that the gammalib configure is passed the option not to recreate the SWIG wrappers even if swig is available. But installing swig and making it a gammalib dependency would also be trivial with Macports. As you like.

#3 Updated by Knödlseder Jürgen over 11 years ago

Christoph Deil wrote:

Jürgen Knödlseder wrote:

Great. Indeed, ultimately I would like to have GammaLib installed through all available package managers. This is one of the items we have on our task list. If you can take about MacPorts, this would be great.

Can you put information about the procedure somewhere in the Wiki? We may generate a new page called “deployment”, under which we will then create pages for the various systems.

I don’t see any buttons to edit the wiki /create new pages. Do I need extra permissions?

It took me some time to find this one out:

Just add My new page somewhere where you want to add a link to the new page (we may add a page Deployment to the Sidebar, can be edited by clicking on sidebar on the right panel). You then get a red link. Click on it and the page will be created.

By the way: if you have written a script for deployment it can go in the dev directory of GammaLib, where I gather actually scripts used for various development issues.

For Macports all that is needed is one Portfile which will live in the macports repo. Based on the instructions in that file, Macports then fetches the standard gammalib tarball from sourceforge and builds / installs it. To illustrate I have attached the preliminary version of the Portfile, it is work in progress.

Thanks. Would it make sense to have this Portfile in the dev folder? This would give us version control over this file.

For the MacPorts version, I guess we want to create the SWIG wrappers so that SWIG is not needed for deployment. In dev there is a script called release_gammalib.sh which I use for release. This script creates the Python wrappers and PDF files for documentation before making a tarball. That’s the tarball that I then put on sourceforge.

I could specify in the Portfile that the gammalib configure is passed the option not to recreate the SWIG wrappers even if swig is available. But installing swig and making it a gammalib dependency would also be trivial with Macports. As you like.

This is done already by GammaLib. It checks if the SWIG wrapper files are available, and if all are present, it skips the SWIG step.

I think it’s always better to reduce the dependencies

#4 Updated by Knödlseder Jürgen over 11 years ago

As you see above, red links are even created when you type in the issue comments :)

#5 Updated by Deil Christoph over 11 years ago

Jürgen Knödlseder wrote:

Christoph Deil wrote:

Jürgen Knödlseder wrote:

Thanks. Would it make sense to have this Portfile in the dev folder? This would give us version control over this file.

I don’t think we should keep the Portfile in the gammalib repo. The right place is the macports SVN repo where all Portfiles live. We can add a link to the Portfile from the Deployment wiki page. Here’s an example for the cfitsio port:

https://trac.macports.org/browser/trunk/dports/science/cfitsio/Portfile

Also available in: Atom PDF