forked from easybuilders/easybuild-easyconfigs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch LASTZ to avoid escaping issues when using rpath wrappers
- Loading branch information
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
easybuild/easyconfigs/l/LASTZ/LASTZ-1.04.22_avoid-escaping.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
From 1aec3dc99b781f3466a1f5a1501cc41d69ead231 Mon Sep 17 00:00:00 2001 | ||
From: jfgrimm <[email protected]> | ||
Date: Fri, 6 Sep 2024 16:32:11 +0100 | ||
Subject: [PATCH] avoid requiring score type to be escaped at compile-time | ||
Avoid issues when using compiler wrappers (which mess with the escaping in the Makefile) | ||
--- | ||
src/Makefile | 4 ++-- | ||
src/dna_utilities.h | 14 ++++++++++---- | ||
2 files changed, 12 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/src/Makefile b/src/Makefile | ||
index 1908774..cd7a55a 100644 | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -91,10 +91,10 @@ incFiles = lastz.h infer_scores.h \ | ||
utilities.h dna_utilities.h sequences.h capsule.h | ||
|
||
%.o: %.c version.mak ${incFiles} | ||
- ${CC} -c ${CFLAGS} -Dscore_type=\'I\' $< -o $@ | ||
+ ${CC} -c ${CFLAGS} -Dscore_type=I $< -o $@ | ||
|
||
%_D.o: %.c version.mak ${incFiles} | ||
- ${CC} -c ${CFLAGS} -Dscore_type=\'D\' $< -o $@ | ||
+ ${CC} -c ${CFLAGS} -Dscore_type=D $< -o $@ | ||
|
||
%_32.o: %.c version.mak ${incFiles} | ||
${CC} -c ${CFLAGS} ${flagsFor32} $< -o $@ | ||
diff --git a/src/dna_utilities.h b/src/dna_utilities.h | ||
index f3a0ce2..b0d41cb 100644 | ||
--- a/src/dna_utilities.h | ||
+++ b/src/dna_utilities.h | ||
@@ -35,9 +35,7 @@ global int dna_utilities_dbgShowQToBest; | ||
// score values-- | ||
// Scores used for sequence comparisons are normally signed 32-bit integers, | ||
// but the programmer can override this at compile time by defining score_type | ||
-// as one of 'F', 'D', or 'I'. Note that some effort must be taken to get | ||
-// the apostrophes into the definition from the compiler command line, such as | ||
-// -Dscore_type=\'F\' . | ||
+// as one of: F, D, or I, by compiling with e.g. -Dscore_type=F | ||
// | ||
//---------- | ||
// | ||
@@ -66,7 +64,15 @@ global int dna_utilities_dbgShowQToBest; | ||
//---------- | ||
|
||
#if defined(score_type) | ||
-#define scoreType score_type | ||
+#if score_type == I | ||
+#define scoreType 'I' | ||
+#elif score_type == F | ||
+#define scoreType 'F' | ||
+#elif score_type == D | ||
+#define scoreType 'D' | ||
+#else | ||
+#error ***** undecipherable score type definition ***** | ||
+#endif | ||
#else | ||
#define scoreType 'I' | ||
#endif |