Skip to content

Package/grass#8505

Merged
adamjstewart merged 4 commits intospack:developfrom
tmerrick1:package/grass
Jun 22, 2018
Merged

Package/grass#8505
adamjstewart merged 4 commits intospack:developfrom
tmerrick1:package/grass

Conversation

@tmerrick1
Copy link
Copy Markdown
Contributor

Add the grass gis system.

# See the Spack documentation for more information on packaging.
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove all of this template stuff below the license.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed that one.

depends_on('[email protected]:', type='build')
depends_on('zlib')
depends_on('flex')
depends_on('bison')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flex and bison are usually type='build' dependencies.

depends_on('flex')
depends_on('bison')
depends_on('proj')
depends_on('gdal')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually thinking about adding a GRASS package when I was working on GDAL. I noticed that GDAL has a --with-grass option, but that would create a circular dependency. Can you comment on whether GRASS should be built with GDAL or GDAL should be built with GRASS? I'm not too familiar with GRASS.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a circular piece. As I recall, you first build gdal without grass, then build grass, then build gdal with grass. I could code this in as gdal~grass then have gdal to just code grass, So gdal+grass should be able to compile then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I don't think that will work at the moment. Spack doesn't let the same package occur multiple times in the DAG, even if one is gdal+grass and the other is gdal~grass. I don't think it's possible to build GDAL with GRASS support at the moment.

args.append('--without-cxx')

if '-tiff' in spec:
args.append('--without-tiff')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to be explicit and say:

if '+tiff' in spec:
    args.append('--with-tiff')
else:
    args.append('--without-tiff')

for all dependencies. Otherwise, a lot of build systems will build optional support if they can find the dependency on the OS. We don't want these kind of non-deterministic builds in Spack.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+tiff is the default, which will load up libtiff. Mine is not as symmetrical as it follows the configuration file - which probably will change at any time, so your way is better.

@tmerrick1
Copy link
Copy Markdown
Contributor Author

I also loaded up opengl - shouldn't this be mesa? I suppose that I could have both opengl and mesa options with a constraint that it could not be both at once.

@adamjstewart
Copy link
Copy Markdown
Member

I also loaded up opengl - shouldn't this be mesa?

You should use the virtual dependency gl, which can be provided by either opengl or mesa.

depends_on('bison', type='build')
depends_on('proj')
depends_on('gdal')
depends_on('[email protected]:2.9')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type=('build', 'run')?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for python. Shouldn't the proj/gdal be build,link,run? Also, should this be named grass7 to be more consistent with its r routine r-rgrass7?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on how proj/gdal are used by the package.

Don't worry about the R package, we don't want several grass packages if they are all the same.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found that if you do not include the link for routines with pkgconfig directories, it breaks the chain. See libxfixes and libxi changes in 8450.

@adamjstewart adamjstewart merged commit bef60f6 into spack:develop Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants