From 9301ad2c633212bee0f0a1b417c4347f686fa726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Mon, 3 May 2021 17:02:49 +0200 Subject: [PATCH] dev-scheme/racket: add personal and ::gentoo fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Maciej Barć --- dev-scheme/racket/metadata.xml | 59 +++++++++++++-------- dev-scheme/racket/racket-8.0.ebuild | 79 ++++++++++++++--------------- 2 files changed, 77 insertions(+), 61 deletions(-) diff --git a/dev-scheme/racket/metadata.xml b/dev-scheme/racket/metadata.xml index c5f013b..853df03 100644 --- a/dev-scheme/racket/metadata.xml +++ b/dev-scheme/racket/metadata.xml @@ -1,25 +1,42 @@ - - xgqt@protonmail.com - Maciej Barć - - - - Enable racket/future library for fine-grained hardware parallelism - - - Enable support for graphics - - - Enable racket/place library for share-nothing parallelism and message-passing communication. Compared to futures, places are heavyweight, but they have a simpler performance model. - - - Enable support for green threads - - - - racket/racket - + + xgqt@protonmail.com + Maciej Barć + + + Racket's interactive mode encourages experimentation, and quick scripts + easily compose into larger systems. Small scripts and large systems both + benefit from native-code JIT compilation. When a system gets too big to + keep in your head, you can add static types. + Extend Racket whenever you need to. Mold it to better suit your tasks + without sacrificing interoperability with existing libraries and without + having to modify the tool chain. When less is more, you can remove parts + of a language or start over and build a new one. + Whether you're just starting out, want to know more about programming + language applications or models, looking to expand your horizons, or + ready to dive into research, Racket can help you become a better + programmer and system builder. + + + + Build Racket on Chez (Racket CS) + + + Enable racket/future library for fine-grained hardware parallelism + + + Enable support for graphics + + + Enable racket/place library for share-nothing parallelism and message-passing communication. Compared to futures, places are heavyweight, but they have a simpler performance model. + + + Enable support for green threads + + + + racket/racket + diff --git a/dev-scheme/racket/racket-8.0.ebuild b/dev-scheme/racket/racket-8.0.ebuild index b1793ff..112d95c 100644 --- a/dev-scheme/racket/racket-8.0.ebuild +++ b/dev-scheme/racket/racket-8.0.ebuild @@ -12,45 +12,43 @@ SRC_URI=" !minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz ) " -RESTRICT="mirror" -LICENSE="GPL-3+ LGPL-3" +# See https://blog.racket-lang.org/2019/11/completing-racket-s-relicensing-effort.html +LICENSE=" + || ( MIT Apache-2.0 ) + chez? ( Apache-2.0 ) + !chez? ( LGPL-3 ) +" SLOT="0" KEYWORDS="~amd64" -IUSE="X +doc +futures +graphics +jit minimal +places +readline +threads" -REQUIRED_USE=" - X? ( graphics ) - futures? ( jit ) -" +IUSE="X +chez +doc +futures +jit minimal +places +readline +threads" +REQUIRED_USE="futures? ( jit )" -RDEPEND=" +DEPEND=" !dev-tex/slatex dev-db/sqlite:3 dev-libs/libffi X? ( dev-util/desktop-file-utils + media-libs/libpng:0 + virtual/jpeg:0 + x11-libs/cairo[X] x11-libs/gtk+:3[X] + x11-libs/pango[X] x11-misc/shared-mime-info ) - graphics? ( - media-libs/libpng:0 - virtual/jpeg:0 - x11-libs/cairo[X?] - x11-libs/pango[X?] - ) - readline? ( dev-libs/libedit ) + readline? ( dev-libs/libedit ) " -DEPEND="${RDEPEND}" +RDEPEND="${DEPEND}" S="${WORKDIR}/${P}/src" -X_xdg_update() { - if use X; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -} +# BC library is being stripped unconditionally +QA_PRESTRIPPED="/usr/lib64/libracket3m-8.0.so" src_prepare() { + unset PLTUSERHOME + xdg_environment_reset + default rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi" @@ -64,12 +62,12 @@ src_configure() { local myconf=( --disable-libs --disable-strip - --docdir="${EPREFIX}"/usr/share/doc/${PF} - --enable-bc + --docdir="${EPREFIX}/usr/share/doc/${PF}" --enable-float --enable-foreign --enable-libffi --enable-shared + $(usex chez "--enable-cs --enable-csonly" "--enable-bc --enable-bconly") $(use_enable X gracket) $(use_enable doc docs) $(use_enable jit) @@ -81,21 +79,23 @@ src_configure() { } src_compile() { - if use jit; then + if use jit && ! use chez; then # When the JIT is enabled, a few binaries need to be pax-marked # on hardened systems (bug 613634). The trick is to pax-mark # them before they're used later in the build system. The # following order for racketcgc and racket3m was determined by # digging through the Makefile in src/racket to find out which # targets would build those binaries but not use them. - pushd ./bc + pushd ./bc || die emake cgc-core pax-mark m .libs/racketcgc - pushd ./gc2 + + pushd ./gc2 || die emake all - popd + popd || die + pax-mark m .libs/racket3m - popd + popd || die fi default @@ -104,15 +104,7 @@ src_compile() { src_install() { default - # bin -> binbc ; remove this when we use Chez - pushd "${D}/usr/bin" - for b in *bc; do - ln -s "${b}" "${b%bc*}" - done - popd - - if use jit - then + if use jit; then # The final binaries need to be pax-marked, too, if you want to # actually use them. The src_compile marking get lost somewhere # in the install process. @@ -121,6 +113,7 @@ src_install() { pax-mark m "${D}/usr/bin/${f}" done + pax-mark m "${D}/usr/$(get_libdir)/racket/starter" use X && pax-mark m "${D}/usr/$(get_libdir)/racket/gracket" fi @@ -140,9 +133,15 @@ src_install() { } pkg_postinst() { - X_xdg_update + if use X; then + xdg_desktop_database_update + xdg_icon_cache_update + fi } pkg_postrm() { - X_xdg_update + if use X; then + xdg_desktop_database_update + xdg_icon_cache_update + fi }