|
0 |
Author: Helmut Grohne <helmut@subdivi.de>
|
|
1 |
Last-Update: Thu, 25 Jul 2019 21:31:15 +0200
|
|
2 |
Bug-Debian: https://bugs.debian.org/933024
|
|
3 |
Description: crac fails to cross build from source, because it uses the build
|
|
4 |
architecture pkg-config in its Makefile.am files. Doing so is an
|
|
5 |
anti-pattern. You should never call pkg-config from a Makefile.am.
|
|
6 |
Instead such checks should be performed at configure time. The attached
|
|
7 |
patch implements that and makes crac cross buildable. Please consider
|
|
8 |
applying it.
|
|
9 |
|
|
10 |
--- a/configure.ac
|
|
11 |
+++ b/configure.ac
|
|
12 |
@@ -282,6 +282,7 @@ AC_ARG_WITH([libProgressBar-prefix],
|
|
13 |
[with_libProgressBar_prefix=""])
|
|
14 |
|
|
15 |
dnl Check if we need included ProgressBar library.
|
|
16 |
+PKG_CHECK_MODULES([PROGRESSBAR],[libProgressBar])
|
|
17 |
PB_OK=0
|
|
18 |
AS_IF([test "x$with_included_ProgressBar" == "xcheck"],
|
|
19 |
[AS_IF([test "x$with_libProgressBar_prefix" != "x"],
|
|
20 |
@@ -315,6 +316,7 @@ AC_CHECK_LIB([z], [gzread], ,
|
|
21 |
AC_CHECK_LIB([hts], [hts_hopen], ,
|
|
22 |
[AC_MSG_ERROR([htslib not found, see http://www.htslib.org/])])
|
|
23 |
|
|
24 |
+PKG_CHECK_MODULES([GKARRAYS],[libGkArrays])
|
|
25 |
GK_OK=1
|
|
26 |
AS_IF([test "x$with_included_GkArrays" != "xyes"],
|
|
27 |
[AC_CHECK_LIB([GkArrays],
|
|
28 |
--- a/src/Makefile.am
|
|
29 |
+++ b/src/Makefile.am
|
|
30 |
@@ -149,11 +149,11 @@ if INCLUDED_JELLYFISH
|
|
31 |
endif
|
|
32 |
|
|
33 |
if INCLUDED_GKARRAYS
|
|
34 |
- AM_LDFLAGS += `pkg-config --libs libGkArrays`
|
|
35 |
- AM_CPPFLAGS += `pkg-config --cflags libGkArrays`
|
|
36 |
+ AM_LDFLAGS += $(GKARRAYS_LIBS)
|
|
37 |
+ AM_CPPFLAGS += $(GKARRAYS_CFLAGS)
|
|
38 |
if INCLUDED_PROGRESSBAR
|
|
39 |
- AM_LDFLAGS += `pkg-config --libs libProgressBar`
|
|
40 |
- AM_CPPFLAGS += `pkg-config --cflags libProgressBar`
|
|
41 |
+ AM_LDFLAGS += $(PROGRESSBAR_LIBS)
|
|
42 |
+ AM_CPPFLAGS += $(PROGRESSBAR_CFLAGS)
|
|
43 |
endif
|
|
44 |
endif
|
|
45 |
|
|
46 |
--- a/src/libReadsInfo/Makefile.am
|
|
47 |
+++ b/src/libReadsInfo/Makefile.am
|
|
48 |
@@ -124,7 +124,7 @@ libReadsInfo_a_SOURCES =
|
|
49 |
|
|
50 |
libReadsInfo_a_CPPFLAGS = -I@abs_top_srcdir@ -I@abs_top_srcdir@/src -I@abs_top_srcdir@/src/libSSA
|
|
51 |
if INCLUDED_GKARRAYS
|
|
52 |
- libReadsInfo_a_CPPFLAGS += `pkg-config --cflags libGkArrays`
|
|
53 |
+ libReadsInfo_a_CPPFLAGS += $(GKARRAYS_CFLAGS)
|
|
54 |
endif
|
|
55 |
|
|
56 |
|
|
57 |
--- a/src/libSSA/Makefile.am
|
|
58 |
+++ b/src/libSSA/Makefile.am
|
|
59 |
@@ -101,7 +101,7 @@
|
|
60 |
bin_PROGRAMS = crac-index
|
|
61 |
crac_index_SOURCES = cracIndex.cpp cracIndex.h
|
|
62 |
|
|
63 |
-AM_CPPFLAGS = -I@abs_top_srcdir@ -I@abs_srcdir@/karkkainen_bwt `pkg-config --cflags libGkArrays`
|
|
64 |
+AM_CPPFLAGS = -I@abs_top_srcdir@ -I@abs_srcdir@/karkkainen_bwt $(GKARRAYS_CFLAGS)
|
|
65 |
AM_LDFLAGS = -lm -lpthread -lSSA -L@abs_builddir@/
|
|
66 |
LDADD = libSSA.a
|
|
67 |
|