blob: b0c94e79bc97c40ba9a76c623374fdc8a88eb734 (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ADA_COMPAT=( gcc_14 gcc_15 )
LLVM_COMPAT=( {19..22} ) # Check configure script for supported LLVM versions.
inherit ada edo llvm-r2 toolchain-funcs
DESCRIPTION="Open-source analyzer, compiler, and simulator for VHDL 2008/93/87"
HOMEPAGE="https://ghdl.github.io/ghdl/
https://github.com/ghdl/ghdl/"
if [[ "${PV}" == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/ghdl/${PN}"
else
SRC_URI="https://github.com/ghdl/${PN}/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz"
KEYWORDS="amd64 ~x86"
fi
LICENSE="GPL-2+"
SLOT="0"
IUSE="llvm +static-libs"
# The LLVM backend requires static libraries to work, see bug: https://bugs.gentoo.org/938171
REQUIRED_USE="${ADA_REQUIRED_USE} llvm? ( static-libs )"
RDEPEND="
${ADA_DEPS}
llvm? (
$(llvm_gen_dep '
llvm-core/llvm:${LLVM_SLOT}=
')
)
"
DEPEND="
${RDEPEND}
"
BDEPEND="
dev-util/patchelf
"
PATCHES=( "${FILESDIR}/${PN}-4.0.0_pre20231218-no-pyunit.patch" )
pkg_setup() {
ada_pkg_setup
use llvm && llvm-r2_pkg_setup
}
src_prepare() {
default
edo sed -i "s|ar rc|$(tc-getAR) rc|g" Makefile.in
}
src_configure() {
tc-export CC CXX
local -a myconf=(
# Build.
--disable-werror
# Install location.
--libdir=$(get_libdir)
--prefix="/usr"
# Features.
--enable-libghdl
--enable-synth
)
if use llvm ; then
myconf+=( --with-llvm-config="llvm-config" )
fi
# Not a autotools script!
edo sh ./configure "${myconf[@]}"
}
src_compile() {
emake V=1
edo patchelf --set-soname libghw.so lib/libghw.so
}
src_test() {
emake V=1 test
}
src_install() {
default
if ! use static-libs ; then
edo find "${ED}" -type f -name '*.a' -delete
fi
}
|