Skip to content

Commit

Permalink
dev-scheme/racket: revisit configure options
Browse files Browse the repository at this point in the history
Removed X dependencies because its pure FFI and do not depend on X11's
pkgs being installed.
Some options are forced in CS variant, so logically restrict the untooglable
USE flags to be enabled.
Bump to EAPI 8.
This still does not close 828602.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Maciej Barć <[email protected]>
  • Loading branch information
xgqt committed Dec 9, 2021
1 parent 43ab6b9 commit 7083401
Showing 1 changed file with 18 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
EAPI=8

inherit desktop optfeature xdg-utils
inherit desktop optfeature

DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language"
HOMEPAGE="https://racket-lang.org/"
Expand All @@ -25,47 +25,30 @@ LICENSE="
# where we use _p, _pre, etc it will have to be set manually.
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
IUSE="X +chez +doc +futures +jit minimal +places +threads"
IUSE="+chez +doc +futures +jit minimal +places +threads"
# See bug #809785 re chez/threads
REQUIRED_USE="futures? ( jit threads ) chez? ( threads ) places? ( threads )"
REQUIRED_USE="chez? ( futures places ) futures? ( jit threads ) places? ( threads )"

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
)
"
RDEPEND="${DEPEND}"

# "mred" and "mzscheme" are binaries generated by Racket, not CC
QA_FLAGS_IGNORED="usr/bin/mred usr/bin/mzscheme"

# Package database files
# Package database files (for pkg_preinst & pkg_config)
PKGDB=(
/usr/share/racket/info-cache.rktd
/usr/share/racket/links.rktd
/usr/share/racket/pkgs/pkgs.rktd
)

post_X_update() {
if use X && ! use minimal; then
xdg_desktop_database_update
xdg_icon_cache_update
fi
}

src_prepare() {
# Prepare environment
# Prepare the environment
unset PLTADDONDIR PLTCOLLECTS PLTCONFIGDIR PLTUSERHOME
xdg_environment_reset

default

Expand All @@ -88,18 +71,21 @@ src_configure() {
--disable-shared
--disable-strip
--docdir="${EPREFIX}/usr/share/doc/${PF}"
--enable-float
--enable-foreign
--enable-libffi
--enable-libs
$(usex chez "--enable-cs --enable-csonly" "--enable-bc --enable-bconly")
$(use_enable X gracket)
$(use_enable doc docs)
$(use_enable futures)
$(use_enable jit)
$(use_enable places)
$(use_enable threads pthread)
)
# Some options are togglable only for the BC version (are forced in CS)
! use chez && myconf+=(
--enable-float
--enable-foreign
--enable-gracket
--enable-libffi
$(use_enable futures)
$(use_enable jit)
$(use_enable places)
$(use_enable threads pthread)
)
econf "${myconf[@]}"
}

Expand All @@ -119,7 +105,7 @@ src_install() {
fi

# Create missing desktop files and icon
if use X && ! use minimal; then
if ! use minimal; then
newicon "${ED}/usr/share/racket/drracket-exe-icon.png" "racket.png"
make_desktop_entry "gracket" "GRacket" "racket" "Development;Education;"
make_desktop_entry "plt-games" "PLT Games" "racket" "Education;Game;"
Expand All @@ -145,16 +131,10 @@ pkg_preinst() {
}

pkg_postinst() {
post_X_update

optfeature "readline editing features in REPL" dev-libs/libedit sys-libs/readline
optfeature "generating PDF files using Scribble" dev-texlive/texlive-fontsextra
}

pkg_postrm() {
post_X_update
}

pkg_config() {
einfo "Swapping package database backup files"

Expand Down

0 comments on commit 7083401

Please sign in to comment.