1 |
commit: b41f42a861661c6ba39c431961df204a4c19237e |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 1 18:47:16 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 18:47:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b41f42a8 |
7 |
|
8 |
dev-ml/findlib: revbump to avoid installing ocamlbuild META file |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
dev-ml/findlib/files/externalmeta2.patch | 16 +++++++ |
14 |
dev-ml/findlib/findlib-1.6.1-r1.ebuild | 76 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 92 insertions(+) |
16 |
|
17 |
diff --git a/dev-ml/findlib/files/externalmeta2.patch b/dev-ml/findlib/files/externalmeta2.patch |
18 |
new file mode 100644 |
19 |
index 0000000..f8e7a5a |
20 |
--- /dev/null |
21 |
+++ b/dev-ml/findlib/files/externalmeta2.patch |
22 |
@@ -0,0 +1,16 @@ |
23 |
+Avoid installing META files for labltk, camlp4 and ocamlbuild: Those are provided by their |
24 |
+respective packages now. |
25 |
+ |
26 |
+Index: findlib-1.5.5/configure |
27 |
+=================================================================== |
28 |
+--- findlib-1.5.5.orig/configure |
29 |
++++ findlib-1.5.5/configure |
30 |
+@@ -515,7 +515,7 @@ fi |
31 |
+ |
32 |
+ # Generate the META files now. |
33 |
+ |
34 |
+-l="$ldbm dynlink graphics num num-top str threads unix stdlib bigarray $llabltk $lcamlp4 $lobuild $lcomplibs $lbytes" |
35 |
++l="$ldbm dynlink graphics num num-top str threads unix stdlib bigarray $lcomplibs $lbytes" |
36 |
+ |
37 |
+ for dir in site-lib-src/*; do |
38 |
+ # We do not really know if $dir is a directory. |
39 |
|
40 |
diff --git a/dev-ml/findlib/findlib-1.6.1-r1.ebuild b/dev-ml/findlib/findlib-1.6.1-r1.ebuild |
41 |
new file mode 100644 |
42 |
index 0000000..4d06013 |
43 |
--- /dev/null |
44 |
+++ b/dev-ml/findlib/findlib-1.6.1-r1.ebuild |
45 |
@@ -0,0 +1,76 @@ |
46 |
+# Copyright 1999-2014 Gentoo Foundation |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+# $Id$ |
49 |
+ |
50 |
+EAPI=5 |
51 |
+ |
52 |
+inherit multilib eutils |
53 |
+ |
54 |
+DESCRIPTION="OCaml tool to find/use non-standard packages" |
55 |
+HOMEPAGE="http://projects.camlcity.org/projects/findlib.html" |
56 |
+SRC_URI="http://download.camlcity.org/download/${P}.tar.gz" |
57 |
+IUSE="doc +ocamlopt tk" |
58 |
+ |
59 |
+LICENSE="MIT" |
60 |
+ |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" |
63 |
+ |
64 |
+DEPEND=">=dev-lang/ocaml-4.02.1:=[ocamlopt?] |
65 |
+ tk? ( dev-ml/labltk:= )" |
66 |
+RDEPEND="${DEPEND}" |
67 |
+ |
68 |
+ocamlfind_destdir="${EPREFIX}/usr/$(get_libdir)/ocaml" |
69 |
+stublibs="${ocamlfind_destdir}/stublibs" |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ epatch "${FILESDIR}/externalmeta2.patch" \ |
73 |
+ "${FILESDIR}/quoting.patch" |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ local myconf |
78 |
+ use tk && myconf="-with-toolbox" |
79 |
+ ./configure -bindir "${EPREFIX}"/usr/bin -mandir "${EPREFIX}"/usr/share/man \ |
80 |
+ -sitelib ${ocamlfind_destdir} \ |
81 |
+ -config ${ocamlfind_destdir}/findlib/findlib.conf \ |
82 |
+ -no-custom \ |
83 |
+ ${myconf} || die "configure failed" |
84 |
+} |
85 |
+ |
86 |
+src_compile() { |
87 |
+ emake -j1 all |
88 |
+ if use ocamlopt; then |
89 |
+ emake -j1 opt # optimized code |
90 |
+ fi |
91 |
+} |
92 |
+ |
93 |
+src_install() { |
94 |
+ emake prefix="${D}" install |
95 |
+ |
96 |
+ dodir "${stublibs#${EPREFIX}}" |
97 |
+ |
98 |
+ cd "${S}/doc" |
99 |
+ dodoc QUICKSTART README DOCINFO |
100 |
+ use doc && dohtml -r ref-html guide-html |
101 |
+} |
102 |
+ |
103 |
+check_stublibs() { |
104 |
+ local ocaml_stdlib=`ocamlc -where` |
105 |
+ local ldconf="${ocaml_stdlib}/ld.conf" |
106 |
+ |
107 |
+ if [ ! -e ${ldconf} ] |
108 |
+ then |
109 |
+ echo "${ocaml_stdlib}" > ${ldconf} |
110 |
+ echo "${ocaml_stdlib}/stublibs" >> ${ldconf} |
111 |
+ fi |
112 |
+ |
113 |
+ if [ -z `grep -e ${stublibs} ${ldconf}` ] |
114 |
+ then |
115 |
+ echo ${stublibs} >> ${ldconf} |
116 |
+ fi |
117 |
+} |
118 |
+ |
119 |
+pkg_postinst() { |
120 |
+ check_stublibs |
121 |
+} |