1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language"
9 HOMEPAGE="https://racket-lang.org/"
10 SRC_URI="minimal? ( https://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz ) !minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz )"
11 LICENSE="GPL-3+ LGPL-3"
13 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
14 IUSE="doc +futures +jit minimal +places +readline +threads +X"
15 REQUIRED_USE="futures? ( jit )"
17 RDEPEND="dev-db/sqlite:3
23 readline? ( dev-libs/libedit )
24 X? ( x11-libs/gtk+[X?] )"
25 RDEPEND="${RDEPEND} !dev-tex/slatex"
29 S="${WORKDIR}/${P}/src"
33 rm -r foreign/libffi || die 'failed to remove bundled libffi'
37 # According to vapier, we should use the bundled libtool
38 # such that we don't preclude cross-compile. Thus don't use
39 # --enable-lt=/usr/bin/libtool
41 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
48 $(use_enable X gracket) \
49 $(use_enable doc docs) \
51 $(use_enable places) \
52 $(use_enable futures) \
53 $(use_enable threads pthread)
58 # When the JIT is enabled, a few binaries need to be pax-marked
59 # on hardened systems (bug 613634). The trick is to pax-mark
60 # them before they're used later in the build system. The
61 # following order for racketcgc and racket3m was determined by
62 # digging through the Makefile in src/racket to find out which
63 # targets would build those binaries but not use them.
66 pax-mark m .libs/racketcgc
70 pax-mark m .libs/racket3m
81 # The final binaries need to be pax-marked, too, if you want to
82 # actually use them. The src_compile marking get lost somewhere
83 # in the install process.
84 for f in mred mzscheme racket; do
85 pax-mark m "${D}/usr/bin/${f}"
88 use X && pax-mark m "${D}/usr/$(get_libdir)/racket/gracket"
90 # raco needs decompressed files for packages doc installation bug 662424
92 docompress -x /usr/share/doc/${PF}
94 find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die