summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2019-12-11 20:19:27 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2019-12-11 20:19:27 -0600
commitfec3a852c74febda1c16abe5f5dfe618cbb8c69b (patch)
tree8da726405160b12c63538838296638fda639bff5
parent695c09a8b7d46533f09e4a742463b5e6c0c6ee22 (diff)
downloadspack-fec3a852c74febda1c16abe5f5dfe618cbb8c69b.tar.gz
spack-fec3a852c74febda1c16abe5f5dfe618cbb8c69b.tar.bz2
spack-fec3a852c74febda1c16abe5f5dfe618cbb8c69b.tar.xz
spack-fec3a852c74febda1c16abe5f5dfe618cbb8c69b.zip
Fix replacement of embedded 'gcc' in augustus (#14116)
PR #13975 added makefile filtering to replace gcc/g++ with the spack compiler. This conflicts with other filtering that is done in the package to add paths for dependencies. The text of the dependency paths might have 'gcc' in the path name, depending on the install_path_scheme, and that was being replaced by the new compiler filters. That would mangle the path to the dependecy resulting in a failed build. This PR moves the compiler filters to be before the other filters to make sure that the compiler is set before the dependency paths.
-rw-r--r--var/spack/repos/builtin/packages/augustus/package.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py
index 1ed1b85f72..a99be82637 100644
--- a/var/spack/repos/builtin/packages/augustus/package.py
+++ b/var/spack/repos/builtin/packages/augustus/package.py
@@ -34,6 +34,31 @@ class Augustus(MakefilePackage):
depends_on('curl', when='@3.3.1:')
def edit(self, spec, prefix):
+ # Set compile commands for each compiler and
+ # Fix for using 'boost' on Spack. (only after ver.3.3.1-tag1)
+ if self.version >= Version('3.3.1-tag1'):
+ with working_dir(join_path('auxprogs', 'utrrnaseq', 'Debug')):
+ filter_file('g++', spack_cxx, 'makefile', string=True)
+ filter_file('g++ -I/usr/include/boost', '{0} -I{1}'
+ .format(spack_cxx,
+ self.spec['boost'].prefix.include),
+ 'src/subdir.mk', string=True)
+
+ # Set compile commands to all makefiles.
+ makefiles = [
+ 'auxprogs/aln2wig/Makefile',
+ 'auxprogs/bam2hints/Makefile',
+ 'auxprogs/bam2wig/Makefile',
+ 'auxprogs/checkTargetSortedness/Makefile',
+ 'auxprogs/compileSpliceCands/Makefile',
+ 'auxprogs/homGeneMapping/src/Makefile',
+ 'auxprogs/joingenes/Makefile',
+ 'src/Makefile'
+ ]
+ for makefile in makefiles:
+ filter_file('gcc', spack_cc, makefile, string=True)
+ filter_file('g++', spack_cxx, makefile, string=True)
+
with working_dir(join_path('auxprogs', 'filterBam', 'src')):
makefile = FileFilter('Makefile')
makefile.filter('BAMTOOLS = .*', 'BAMTOOLS = %s' % self.spec[
@@ -84,31 +109,6 @@ class Augustus(MakefilePackage):
makefile.filter('$(HTSLIB)/libhts.a',
'$(HTSLIB)/../lib/libhts.a', string=True)
- # Set compile commands for each compiler and
- # Fix for using 'boost' on Spack. (only after ver.3.3.1-tag1)
- if self.version >= Version('3.3.1-tag1'):
- with working_dir(join_path('auxprogs', 'utrrnaseq', 'Debug')):
- filter_file('g++', spack_cxx, 'makefile', string=True)
- filter_file('g++ -I/usr/include/boost', '{0} -I{1}'
- .format(spack_cxx,
- self.spec['boost'].prefix.include),
- 'src/subdir.mk', string=True)
-
- # Set compile commands to all makefiles.
- makefiles = [
- 'auxprogs/aln2wig/Makefile',
- 'auxprogs/bam2hints/Makefile',
- 'auxprogs/bam2wig/Makefile',
- 'auxprogs/checkTargetSortedness/Makefile',
- 'auxprogs/compileSpliceCands/Makefile',
- 'auxprogs/homGeneMapping/src/Makefile',
- 'auxprogs/joingenes/Makefile',
- 'src/Makefile'
- ]
- for makefile in makefiles:
- filter_file('gcc', spack_cc, makefile, string=True)
- filter_file('g++', spack_cxx, makefile, string=True)
-
def install(self, spec, prefix):
install_tree('bin', join_path(self.spec.prefix, 'bin'))
install_tree('config', join_path(self.spec.prefix, 'config'))