1 |
commit: 7fe9fb808188b046045fb31e3bf5a7d228511d09 |
2 |
Author: Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
3 |
AuthorDate: Sun Dec 4 18:41:07 2016 +0000 |
4 |
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
5 |
CommitDate: Sun Dec 4 18:41:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7fe9fb80 |
7 |
|
8 |
sci-biology/plinkseq: fixing issues with bundled dev-libs/protobuf and www-servers/mongoose |
9 |
|
10 |
The git repo received some commits this year so trying to create an ebuild |
11 |
for that. It bailed out at more places than the latest release tarball |
12 |
v0.10. The static Makefile needs more tweaks so that the values from |
13 |
'pkg-config protobuf' calls get propagated properly. And not to look |
14 |
for the removed protobuf and mongoose subdirs. |
15 |
|
16 |
Package-Manager: portage-2.3.2 |
17 |
|
18 |
sci-biology/plinkseq/plinkseq-0.10.ebuild | 8 +++-- |
19 |
sci-biology/plinkseq/plinkseq-9999.ebuild | 59 +++++++++++++++++++++++++++++++ |
20 |
2 files changed, 64 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/sci-biology/plinkseq/plinkseq-0.10.ebuild b/sci-biology/plinkseq/plinkseq-0.10.ebuild |
23 |
index 71871e8..f39458b 100644 |
24 |
--- a/sci-biology/plinkseq/plinkseq-0.10.ebuild |
25 |
+++ b/sci-biology/plinkseq/plinkseq-0.10.ebuild |
26 |
@@ -20,14 +20,16 @@ KEYWORDS="" |
27 |
IUSE="" |
28 |
|
29 |
DEPEND="sys-libs/zlib |
30 |
- dev-libs/protobuf" |
31 |
+ dev-libs/protobuf |
32 |
+ !sci-biology/fsl" # file collision on /usr/bin/mm |
33 |
RDEPEND="${DEPEND}" |
34 |
|
35 |
src_prepare(){ |
36 |
sed -e "s/gcc/$(tc-getCC)/g;s/g++/$(tc-getCXX)/g;s/-O3/${CFLAGS}/g" -i config_defs.Makefile || die |
37 |
sed -e "s/= -static/=/g" -i config_defs.Makefile || die |
38 |
rm -rf sources/ext/protobuf-* || die |
39 |
- sed -e 's#^all:.*#all: echo "skipping compilation of bundled dev-libs/protobuf"#' -i sources/ext/Makefile || die |
40 |
+ rm -rf sources/mongoose || die |
41 |
+ sed -e 's@^all:.*@all: # skipping compilation of bundled dev-libs/protobuf@' -i sources/ext/Makefile || die |
42 |
# TODO: fix also sources/ext/sources/include/DUMMY/include/google/protobuf/compiler/plugin.proto causing: |
43 |
# plugin.proto: Import "google/protobuf/descriptor.proto" was not found or had errors. |
44 |
# plugin.proto:74:12: "FileDescriptorProto" is not defined. |
45 |
@@ -44,5 +46,5 @@ src_install(){ |
46 |
cd build/execs || die |
47 |
# TODO: avoid file collision with sci-biology/fsl |
48 |
# https://bitbucket.org/statgen/plinkseq/issue/9/rename-mm-filename-to-plinkseq_mm |
49 |
- dobin gcol browser pseq behead mm smp tab2vcf mongoose pdas |
50 |
+ dobin gcol browser pseq behead mm smp tab2vcf pdas |
51 |
} |
52 |
|
53 |
diff --git a/sci-biology/plinkseq/plinkseq-9999.ebuild b/sci-biology/plinkseq/plinkseq-9999.ebuild |
54 |
new file mode 100644 |
55 |
index 0000000..49c9a13 |
56 |
--- /dev/null |
57 |
+++ b/sci-biology/plinkseq/plinkseq-9999.ebuild |
58 |
@@ -0,0 +1,59 @@ |
59 |
+# Copyright 1999-2016 Gentoo Foundation |
60 |
+# Distributed under the terms of the GNU General Public License v2 |
61 |
+# $Id$ |
62 |
+ |
63 |
+EAPI=5 |
64 |
+ |
65 |
+AUTOTOOLS_AUTORECONF=yes |
66 |
+ |
67 |
+inherit toolchain-funcs git-r3 |
68 |
+ |
69 |
+DESCRIPTION="C/C++ library for working with human genetic variation data" |
70 |
+HOMEPAGE="http://atgu.mgh.harvard.edu/plinkseq" |
71 |
+EGIT_REPO_URI="https://bitbucket.org/statgen/plinkseq.git" |
72 |
+# https://bitbucket.org/statgen/plinkseq/commits/all |
73 |
+# http://pngu.mgh.harvard.edu/~purcell/plink/download.shtml |
74 |
+ |
75 |
+LICENSE="GPL-2" |
76 |
+SLOT="0" |
77 |
+KEYWORDS="" |
78 |
+IUSE="" |
79 |
+ |
80 |
+DEPEND="sys-libs/zlib |
81 |
+ dev-libs/protobuf |
82 |
+ www-servers/mongoose |
83 |
+ !sci-biology/fsl" # file collision on /usr/bin/mm |
84 |
+RDEPEND="${DEPEND}" |
85 |
+ |
86 |
+src_prepare(){ |
87 |
+ sed -e "s/gcc/$(tc-getCC)/g;s/g++/$(tc-getCXX)/g;s/-O3/${CFLAGS}/g" -i config_defs.Makefile || die |
88 |
+ sed -e "s/= -static/=/g" -i config_defs.Makefile || die |
89 |
+ rm -rf sources/ext/protobuf-* || die |
90 |
+ rm -rf sources/mongoose || die |
91 |
+ sed -e 's@^all:.*@all: # skipping compilation of bundled dev-libs/protobuf@' -i sources/ext/Makefile || die |
92 |
+ find . -name \*.proto | while read f; do \ |
93 |
+ d=`dirname $f`; \ |
94 |
+ pushd $d; \ |
95 |
+ protoc --cpp_out=. *.proto || exit 255; \ |
96 |
+ popd; \ |
97 |
+ done || die |
98 |
+ # |
99 |
+ # recopy the updated files |
100 |
+ cp -p sources/plinkseq/sources/lib/matrix.pb.h sources/plinkseq/sources/include/plinkseq/matrix.pb.h || die |
101 |
+ cp -p sources/plinkseq/sources/lib/variant.pb.h sources/plinkseq/sources/include/plinkseq/variant.pb.h || die |
102 |
+ sed -e 's/google::protobuf::internal::kEmptyString/google::protobuf::internal::GetEmptyStringAlreadyInited()/g' -i sources/plinkseq/sources/lib/matrix.pb.cpp || die |
103 |
+ sed -e 's/google::protobuf::internal::kEmptyString/google::protobuf::internal::GetEmptyStringAlreadyInited()/g' -i sources/plinkseq/sources/lib/variant.pb.cpp || die |
104 |
+ local myinc=`pkg-config protobuf --variable=includedir` |
105 |
+ sed -e "s@\$(PROTOBUF_LIB_BASE_DIR)/\$(INC_DIR)/@$myinc@" -i Makefile || die |
106 |
+ local mylib=`pkg-config protobuf --variable=libdir` |
107 |
+ sed -e "s@$(PROTOBUF_LIB_BASE_DIR)/$(BLD_LIB_DIR)/@$mylib@" -i Makefile || die |
108 |
+ local mylibs=`pkg-config protobuf --libs` |
109 |
+ sed -e "s@libprotobuf.a@$mylibs@" -i Makefile || die |
110 |
+} |
111 |
+ |
112 |
+src_install(){ |
113 |
+ cd build/execs || die |
114 |
+ # TODO: avoid file collision with sci-biology/fsl |
115 |
+ # https://bitbucket.org/statgen/plinkseq/issue/9/rename-mm-filename-to-plinkseq_mm |
116 |
+ dobin gcol browser pseq behead mm smp tab2vcf pdas |
117 |
+} |