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
47 $(use_enable X gracket) \
48 $(use_enable doc docs) \
50 $(use_enable places) \
51 $(use_enable futures) \
52 $(use_enable threads pthread)
57 # When the JIT is enabled, a few binaries need to be pax-marked
58 # on hardened systems (bug 613634). The trick is to pax-mark
59 # them before they're used later in the build system. The
60 # following order for racketcgc and racket3m was determined by
61 # digging through the Makefile in src/racket to find out which
62 # targets would build those binaries but not use them.
65 pax-mark m .libs/racketcgc
69 pax-mark m .libs/racket3m
80 # The final binaries need to be pax-marked, too, if you want to
81 # actually use them. The src_compile marking get lost somewhere
82 # in the install process.
83 for f in mred mzscheme racket; do
84 pax-mark m "${D}/usr/bin/${f}"
87 use X && pax-mark m "${D}/usr/$(get_libdir)/racket/gracket"
89 # raco needs decompressed files for packages doc installation bug 662424
91 docompress -x /usr/share/doc/${PF}