6 |
6 |
inherit desktop optfeature toolchain-funcs readme.gentoo-r1
|
7 |
7 |
|
8 |
8 |
DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language"
|
9 |
|
HOMEPAGE="https://racket-lang.org/"
|
|
9 |
HOMEPAGE="https://racket-lang.org/
|
|
10 |
https://github.com/racket/racket/"
|
10 |
11 |
SRC_URI="
|
11 |
12 |
minimal? ( https://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz )
|
12 |
13 |
!minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz )
|
... | ... | |
24 |
25 |
# PV == SLOT but this has to be checked carefully and in cases
|
25 |
26 |
# where we use _p, _pre, etc it will have to be set manually.
|
26 |
27 |
SLOT="0/${PV}"
|
27 |
|
KEYWORDS="amd64 ~arm ~ppc ppc64 x86"
|
|
28 |
KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
|
28 |
29 |
IUSE="+chez +doc +futures iconv +jit minimal ncurses +places +threads"
|
29 |
30 |
# See bug #809785 re chez/threads
|
30 |
31 |
REQUIRED_USE="chez? ( futures places ) futures? ( jit threads ) places? ( threads )"
|
31 |
32 |
|
32 |
|
DEPEND="
|
|
33 |
RDEPEND="
|
33 |
34 |
!dev-tex/slatex
|
34 |
35 |
dev-db/sqlite:3
|
35 |
36 |
dev-libs/libffi:=
|
36 |
37 |
ncurses? ( sys-libs/ncurses:= )
|
37 |
38 |
"
|
38 |
|
RDEPEND="${DEPEND}"
|
|
39 |
DEPEND="${RDEPEND}"
|
39 |
40 |
|
40 |
41 |
# "mred" and "mzscheme" are binaries generated by Racket, not CC
|
41 |
42 |
QA_FLAGS_IGNORED="usr/bin/mred usr/bin/mzscheme"
|
... | ... | |
61 |
62 |
default
|
62 |
63 |
|
63 |
64 |
# Remove bundled libffi.
|
64 |
|
rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi"
|
|
65 |
rm -r "${S}"/bc/foreign/libffi || die "failed to remove bundled libffi"
|
65 |
66 |
}
|
66 |
67 |
|
67 |
68 |
src_configure() {
|
68 |
69 |
# Compilation of Zuo does not respect the autoconf configuration.
|
69 |
70 |
tc-export CC
|
70 |
71 |
|
71 |
|
# Configure Zuo.
|
|
72 |
einfo "Configuring Zuo in ${S}/zuo"
|
72 |
73 |
pushd "${S}"/zuo >/dev/null || die
|
73 |
74 |
econf
|
74 |
75 |
popd >/dev/null || die
|
75 |
76 |
|
76 |
|
# Configure Racket.
|
|
77 |
einfo "Configuring Racket in ${S}"
|
77 |
78 |
# Libtool:
|
78 |
79 |
# According to vapier, we should use the bundled libtool
|
79 |
80 |
# such that we don't preclude cross-compile.
|
... | ... | |
84 |
85 |
# --enable-libs & --disable-shared is the way to build
|
85 |
86 |
# .a files that are needed to embed Racket into programs
|
86 |
87 |
# https://docs.racket-lang.org/inside/cs-embedding.html
|
87 |
|
local myconf=(
|
|
88 |
local -a myconf=(
|
88 |
89 |
--disable-shared
|
89 |
90 |
--disable-strip
|
90 |
91 |
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
... | ... | |
154 |
155 |
fi
|
155 |
156 |
}
|
156 |
157 |
|
|
158 |
get_outsiders() {
|
|
159 |
racket -l raco -- pkg show -i | grep 'link' | sed 's|link.*||g'
|
|
160 |
}
|
|
161 |
|
157 |
162 |
pkg_postinst() {
|
158 |
163 |
# If we have any pkgs not included in Racket main distribution (outsiders),
|
159 |
164 |
# then we have to re-setup them or during installation other pkgs will want
|
160 |
165 |
# to recompile parts of "outsider" pkgs they depend upon (and fail).
|
161 |
|
local outsiders=( $(raco pkg show -i | grep 'link' | sed 's|link.*||g') )
|
|
166 |
local -a outsiders=( $(get_outsiders) )
|
162 |
167 |
if [[ -n "${outsiders[@]}" ]] ; then
|
163 |
168 |
ebegin "Running \"raco setup\" for outsider packages"
|
164 |
169 |
echo "Outsiders: ${outsiders[@]}"
|