fastqc: add 0.12.1, update patch files (#37934)
* fastqc: add 0.12.1 * fastqc: add 0.12.1 * Update var/spack/repos/builtin/packages/fastqc/package.py Yeah, had considered doing the same, I'd just opted to maintain the status quo. All good. Co-authored-by: Alec Scott <alec@bcs.sh> * Update package.py Style fiddles to make the bot contented. --------- Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk> Co-authored-by: Alec Scott <alec@bcs.sh>
This commit is contained in:
parent
d6765f66ae
commit
110f836927
3 changed files with 40 additions and 3 deletions
31
var/spack/repos/builtin/packages/fastqc/fastqc_0.12.x.patch
Normal file
31
var/spack/repos/builtin/packages/fastqc/fastqc_0.12.x.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- fastqc.orig 2023-05-26 08:02:49.123718275 +0100
|
||||
+++ fastqc 2023-05-26 08:12:19.980320240 +0100
|
||||
@@ -38,13 +38,21 @@
|
||||
$delimiter = ';';
|
||||
}
|
||||
|
||||
-if ($ENV{CLASSPATH}) {
|
||||
- $ENV{CLASSPATH} .= "$delimiter$RealBin$delimiter$RealBin/htsjdk.jar$delimiter$RealBin/jbzip2-0.9.jar$delimiter$RealBin/cisd-jhdf5.jar";
|
||||
-}
|
||||
-else {
|
||||
- $ENV{CLASSPATH} = "$RealBin$delimiter$RealBin/htsjdk.jar$delimiter$RealBin/jbzip2-0.9.jar$delimiter$RealBin/cisd-jhdf5.jar";
|
||||
-}
|
||||
-
|
||||
+# The lib dir is $RealBin/../lib
|
||||
+# start with list of jars we need and prefix them with the lib dir
|
||||
+# then stick CLASSPATH onto the front (empty or otherwise...)
|
||||
+# then filter out anything that's empty (perhaps CLASSPATH...)
|
||||
+# then join all the remainings bits with the delimiter.
|
||||
+use File::Basename;
|
||||
+use File::Spec::Functions;
|
||||
+my $_lib = catfile(dirname($RealBin), 'lib');
|
||||
+$ENV{CLASSPATH} =
|
||||
+ join($delimiter,
|
||||
+ grep {$_}
|
||||
+ ($ENV{CLASSPATH},
|
||||
+ $_lib,
|
||||
+ map {"$_lib/$_"}
|
||||
+ qw(htsjdk.jar jbzip2-0.9.jar cisd-jhdf5.jar)));
|
||||
|
||||
# We need to find the java interpreter. We'll start from the assumption that this
|
||||
# is included in the path.
|
|
@ -12,6 +12,7 @@ class Fastqc(Package):
|
|||
homepage = "https://www.bioinformatics.babraham.ac.uk/projects/fastqc/"
|
||||
url = "https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip"
|
||||
|
||||
version("0.12.1", sha256="5f4dba8780231a25a6b8e11ab2c238601920c9704caa5458d9de559575d58aa7")
|
||||
version("0.11.9", sha256="15510a176ef798e40325b717cac556509fb218268cfdb9a35ea6776498321369")
|
||||
version("0.11.7", sha256="59cf50876bbe5f363442eb989e43ae3eaab8d932c49e8cff2c1a1898dd721112")
|
||||
version("0.11.5", sha256="dd7a5ad80ceed2588cf6d6ffe35e0f161c0d9977ed08355f5e4d9473282cbd66")
|
||||
|
@ -20,7 +21,8 @@ class Fastqc(Package):
|
|||
depends_on("java", type="run")
|
||||
depends_on("perl") # for fastqc "script", any perl will do
|
||||
|
||||
patch("fastqc.patch", level=0)
|
||||
patch("fastqc_0.12.x.patch", level=0, when="@0.12:")
|
||||
patch("fastqc_0.11.x.patch", level=0, when="@:0.11.9")
|
||||
|
||||
def patch(self):
|
||||
filter_file("/usr/bin/perl", self.spec["perl"].command.path, "fastqc", backup=False)
|
||||
|
@ -29,8 +31,12 @@ def install(self, spec, prefix):
|
|||
mkdir(prefix.bin)
|
||||
mkdir(prefix.lib)
|
||||
install("fastqc", prefix.bin)
|
||||
for j in ["cisd-jhdf5.jar", "jbzip2-0.9.jar", "sam-1.103.jar"]:
|
||||
install(j, prefix.lib)
|
||||
install("cisd-jhdf5.jar", prefix.lib)
|
||||
install("jbzip2-0.9.jar", prefix.lib)
|
||||
if self.spec.satisfies("@:0.11.9"):
|
||||
install("sam-1.103.jar", prefix.lib)
|
||||
else:
|
||||
install("htsjdk.jar", prefix.lib)
|
||||
for d in ["Configuration", "net", "org", "Templates", "uk"]:
|
||||
install_tree(d, join_path(prefix.lib, d))
|
||||
chmod = which("chmod")
|
||||
|
|
Loading…
Reference in a new issue