1 |
commit: 1217820a8c6b84a38b6db358f4a436a8fb6ad61d |
2 |
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 17 07:13:59 2019 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 17 07:14:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1217820a |
7 |
|
8 |
dev-ada/gnatcoll-bindings: simplify using ada eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
12 |
|
13 |
.../gnatcoll-bindings-2019-r1.ebuild | 81 ++++++++++++++++++++++ |
14 |
1 file changed, 81 insertions(+) |
15 |
|
16 |
diff --git a/dev-ada/gnatcoll-bindings/gnatcoll-bindings-2019-r1.ebuild b/dev-ada/gnatcoll-bindings/gnatcoll-bindings-2019-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..f9e5cb1c6a2 |
19 |
--- /dev/null |
20 |
+++ b/dev-ada/gnatcoll-bindings/gnatcoll-bindings-2019-r1.ebuild |
21 |
@@ -0,0 +1,81 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python2_7 ) |
28 |
+ADA_COMPAT=( gnat_201{6,7,8,9} ) |
29 |
+inherit ada multilib multiprocessing python-single-r1 |
30 |
+ |
31 |
+MYP=${P}-20190430-1928C |
32 |
+ |
33 |
+DESCRIPTION="GNAT Component Collection" |
34 |
+HOMEPAGE="http://libre.adacore.com" |
35 |
+SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8afa31e87a8f1d425054 |
36 |
+ -> ${MYP}-src.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-3" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+IUSE="gmp iconv python readline +shared static-libs static-pic syslog" |
42 |
+ |
43 |
+RDEPEND="python? ( ${PYTHON_DEPS} ) |
44 |
+ ${ADA_DEPS} |
45 |
+ dev-ada/gnatcoll-core[${ADA_USEDEP},shared?,static-libs?,static-pic?] |
46 |
+ gmp? ( dev-libs/gmp:* )" |
47 |
+DEPEND="${RDEPEND} |
48 |
+ dev-ada/gprbuild[${ADA_USEDEP}]" |
49 |
+ |
50 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) |
51 |
+ ${ADA_REQUIRED_USE}" |
52 |
+ |
53 |
+S="${WORKDIR}"/${MYP}-src |
54 |
+ |
55 |
+src_compile() { |
56 |
+ build () { |
57 |
+ gprbuild -j$(makeopts_jobs) -m -p -v \ |
58 |
+ -XGPR_BUILD=$2 -XGNATCOLL_CORE_BUILD=$2 \ |
59 |
+ -XLIBRARY_TYPE=$2 -P $1/gnatcoll_$1.gpr -XBUILD="PROD" \ |
60 |
+ -XGNATCOLL_ICONV_OPT= -XGNATCOLL_PYTHON_CFLAGS="-I$(python_get_includedir)" \ |
61 |
+ -XGNATCOLL_PYTHON_LIBS=$(python_get_library_path) \ |
62 |
+ -cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS} || die "gprbuild failed" |
63 |
+ } |
64 |
+ for kind in shared static-libs static-pic ; do |
65 |
+ if use $kind; then |
66 |
+ lib=${kind%-libs} |
67 |
+ lib=${lib/shared/relocatable} |
68 |
+ for dir in gmp iconv python readline syslog ; do |
69 |
+ if use $dir; then |
70 |
+ build $dir $lib |
71 |
+ fi |
72 |
+ done |
73 |
+ fi |
74 |
+ done |
75 |
+} |
76 |
+ |
77 |
+src_install() { |
78 |
+ build () { |
79 |
+ gprinstall -p -f -XBUILD=PROD --prefix="${D}"/usr -XLIBRARY_TYPE=$2 \ |
80 |
+ -XGPR_BUILD=$2 -XGNATCOLL_CORE_BUILD=$2 \ |
81 |
+ -XGNATCOLL_ICONV_OPT= -P $1/gnatcoll_$1.gpr --build-name=$2 |
82 |
+ } |
83 |
+ for kind in shared static-libs static-pic ; do |
84 |
+ if use $kind; then |
85 |
+ lib=${kind%-libs} |
86 |
+ lib=${lib/shared/relocatable} |
87 |
+ for dir in gmp iconv python readline syslog ; do |
88 |
+ if use $dir; then |
89 |
+ build $dir $lib |
90 |
+ fi |
91 |
+ done |
92 |
+ fi |
93 |
+ done |
94 |
+ if use iconv; then |
95 |
+ sed -i \ |
96 |
+ -e "s:GNATCOLL_ICONV_BUILD:LIBRARY_TYPE:" \ |
97 |
+ "${D}"/usr/share/gpr/gnatcoll_iconv.gpr \ |
98 |
+ || die |
99 |
+ fi |
100 |
+ rm -r "${D}"/usr/share/gpr/manifests || die |
101 |
+ einstalldocs |
102 |
+} |