blob: cc33438f3252870dd20dad03dbc71804ef864c17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ADA_COMPAT=( gcc_13 gcc_14 )
inherit ada multiprocessing
DESCRIPTION="LibGPR2 - Parser for GPR Project files"
HOMEPAGE="https://github.com/AdaCore/gpr"
SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}-next.tar.gz
-> ${P}-next.tar.gz"
S="${WORKDIR}"/${P}-next
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="static-libs static-pic"
REQUIRED_USE="${ADA_REQUIRED_USE}"
RDEPEND="${ADA_DEPS}
dev-ada/xmlada[${ADA_USEDEP},shared,static-libs?,static-pic?]
dev-ada/gnatcoll-core[${ADA_USEDEP},shared,static-libs?,static-pic?]
dev-ada/gnatcoll-bindings[${ADA_USEDEP},shared,static-libs?,static-pic?]
dev-ada/gnatcoll-bindings[iconv(+),gmp]
"
DEPEND="${RDEPEND}
dev-ada/gprconfig_kb[${ADA_USEDEP}]
dev-ada/gprbuild[${ADA_USEDEP}]"
src_compile() {
emake GPR2KBDIR=/usr/share/gprconfig .build/kb/config.kb
build () {
gprbuild -j$(makeopts_jobs) -m -p -v -XLIBRARY_TYPE=$1 \
-XGPR2_BUILD=release -XXMLADA_BUILD=$1 gpr2.gpr \
-largs ${LDFLAGS} \
-cargs ${ADAFLAGS} || die "gprbuild failed"
}
build relocatable
use static-libs && build static
use static-pic && build static-pic
gprbuild -p -m -v -j$(makeopts_jobs) -aP . -XGPR2_BUILD=release \
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
tools/gpr2-tools.gpr \
-largs ${LDFLAGS} -cargs ${ADAFLAGS} || die
}
src_install() {
build () {
gprinstall -XLIBRARY_TYPE=$1 -f -p -v -XGPR2_BUILD=release \
--prefix="${D}/usr" -XXMLADA_BUILD=$1 \
--build-name=$1 --build-var=LIBRARY_TYPE \
--build-var=GPR2_LIBRARY_TYPE gpr2.gpr || die
}
build relocatable
use static-libs && build static
use static-pic && build static-pic
gprinstall -p -f -v -aP . -XGPR2_BUILD=release --prefix="${D}/usr" \
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
--build-name=relocatable --mode=usage tools/gpr2-tools.gpr || die
einstalldocs
rm "${D}"/usr/bin/gprconfig || die
rm -r "${D}"/usr/share/gpr/manifests
}
|