dev-scheme/racket: add personal and ::gentoo fixes
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Maciej Barć <xgqt@riseup.net>
This commit is contained in:
parent
502f63d2cc
commit
9301ad2c63
@ -5,7 +5,24 @@
|
|||||||
<email>xgqt@protonmail.com</email>
|
<email>xgqt@protonmail.com</email>
|
||||||
<name>Maciej Barć</name>
|
<name>Maciej Barć</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<longdescription lang="en">
|
||||||
|
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.
|
||||||
|
</longdescription>
|
||||||
<use>
|
<use>
|
||||||
|
<flag name="chez">
|
||||||
|
Build Racket on Chez (Racket CS)
|
||||||
|
</flag>
|
||||||
<flag name="futures">
|
<flag name="futures">
|
||||||
Enable racket/future library for fine-grained hardware parallelism
|
Enable racket/future library for fine-grained hardware parallelism
|
||||||
</flag>
|
</flag>
|
||||||
|
@ -12,45 +12,43 @@ SRC_URI="
|
|||||||
!minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz )
|
!minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz )
|
||||||
"
|
"
|
||||||
|
|
||||||
RESTRICT="mirror"
|
# See https://blog.racket-lang.org/2019/11/completing-racket-s-relicensing-effort.html
|
||||||
LICENSE="GPL-3+ LGPL-3"
|
LICENSE="
|
||||||
|
|| ( MIT Apache-2.0 )
|
||||||
|
chez? ( Apache-2.0 )
|
||||||
|
!chez? ( LGPL-3 )
|
||||||
|
"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
IUSE="X +doc +futures +graphics +jit minimal +places +readline +threads"
|
IUSE="X +chez +doc +futures +jit minimal +places +readline +threads"
|
||||||
REQUIRED_USE="
|
REQUIRED_USE="futures? ( jit )"
|
||||||
X? ( graphics )
|
|
||||||
futures? ( jit )
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPEND="
|
DEPEND="
|
||||||
!dev-tex/slatex
|
!dev-tex/slatex
|
||||||
dev-db/sqlite:3
|
dev-db/sqlite:3
|
||||||
dev-libs/libffi
|
dev-libs/libffi
|
||||||
X? (
|
X? (
|
||||||
dev-util/desktop-file-utils
|
dev-util/desktop-file-utils
|
||||||
x11-libs/gtk+:3[X]
|
|
||||||
x11-misc/shared-mime-info
|
|
||||||
)
|
|
||||||
graphics? (
|
|
||||||
media-libs/libpng:0
|
media-libs/libpng:0
|
||||||
virtual/jpeg:0
|
virtual/jpeg:0
|
||||||
x11-libs/cairo[X?]
|
x11-libs/cairo[X]
|
||||||
x11-libs/pango[X?]
|
x11-libs/gtk+:3[X]
|
||||||
|
x11-libs/pango[X]
|
||||||
|
x11-misc/shared-mime-info
|
||||||
)
|
)
|
||||||
readline? ( dev-libs/libedit )
|
readline? ( dev-libs/libedit )
|
||||||
"
|
"
|
||||||
DEPEND="${RDEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
S="${WORKDIR}/${P}/src"
|
S="${WORKDIR}/${P}/src"
|
||||||
|
|
||||||
X_xdg_update() {
|
# BC library is being stripped unconditionally
|
||||||
if use X; then
|
QA_PRESTRIPPED="/usr/lib64/libracket3m-8.0.so"
|
||||||
xdg_desktop_database_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
|
unset PLTUSERHOME
|
||||||
|
xdg_environment_reset
|
||||||
|
|
||||||
default
|
default
|
||||||
|
|
||||||
rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi"
|
rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi"
|
||||||
@ -64,12 +62,12 @@ src_configure() {
|
|||||||
local myconf=(
|
local myconf=(
|
||||||
--disable-libs
|
--disable-libs
|
||||||
--disable-strip
|
--disable-strip
|
||||||
--docdir="${EPREFIX}"/usr/share/doc/${PF}
|
--docdir="${EPREFIX}/usr/share/doc/${PF}"
|
||||||
--enable-bc
|
|
||||||
--enable-float
|
--enable-float
|
||||||
--enable-foreign
|
--enable-foreign
|
||||||
--enable-libffi
|
--enable-libffi
|
||||||
--enable-shared
|
--enable-shared
|
||||||
|
$(usex chez "--enable-cs --enable-csonly" "--enable-bc --enable-bconly")
|
||||||
$(use_enable X gracket)
|
$(use_enable X gracket)
|
||||||
$(use_enable doc docs)
|
$(use_enable doc docs)
|
||||||
$(use_enable jit)
|
$(use_enable jit)
|
||||||
@ -81,21 +79,23 @@ src_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
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
|
# When the JIT is enabled, a few binaries need to be pax-marked
|
||||||
# on hardened systems (bug 613634). The trick is to pax-mark
|
# on hardened systems (bug 613634). The trick is to pax-mark
|
||||||
# them before they're used later in the build system. The
|
# them before they're used later in the build system. The
|
||||||
# following order for racketcgc and racket3m was determined by
|
# following order for racketcgc and racket3m was determined by
|
||||||
# digging through the Makefile in src/racket to find out which
|
# digging through the Makefile in src/racket to find out which
|
||||||
# targets would build those binaries but not use them.
|
# targets would build those binaries but not use them.
|
||||||
pushd ./bc
|
pushd ./bc || die
|
||||||
emake cgc-core
|
emake cgc-core
|
||||||
pax-mark m .libs/racketcgc
|
pax-mark m .libs/racketcgc
|
||||||
pushd ./gc2
|
|
||||||
|
pushd ./gc2 || die
|
||||||
emake all
|
emake all
|
||||||
popd
|
popd || die
|
||||||
|
|
||||||
pax-mark m .libs/racket3m
|
pax-mark m .libs/racket3m
|
||||||
popd
|
popd || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
default
|
default
|
||||||
@ -104,15 +104,7 @@ src_compile() {
|
|||||||
src_install() {
|
src_install() {
|
||||||
default
|
default
|
||||||
|
|
||||||
# bin -> binbc ; remove this when we use Chez
|
if use jit; then
|
||||||
pushd "${D}/usr/bin"
|
|
||||||
for b in *bc; do
|
|
||||||
ln -s "${b}" "${b%bc*}"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
if use jit
|
|
||||||
then
|
|
||||||
# The final binaries need to be pax-marked, too, if you want to
|
# The final binaries need to be pax-marked, too, if you want to
|
||||||
# actually use them. The src_compile marking get lost somewhere
|
# actually use them. The src_compile marking get lost somewhere
|
||||||
# in the install process.
|
# in the install process.
|
||||||
@ -121,6 +113,7 @@ src_install() {
|
|||||||
pax-mark m "${D}/usr/bin/${f}"
|
pax-mark m "${D}/usr/bin/${f}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
pax-mark m "${D}/usr/$(get_libdir)/racket/starter"
|
||||||
use X && pax-mark m "${D}/usr/$(get_libdir)/racket/gracket"
|
use X && pax-mark m "${D}/usr/$(get_libdir)/racket/gracket"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -140,9 +133,15 @@ src_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
X_xdg_update
|
if use X; then
|
||||||
|
xdg_desktop_database_update
|
||||||
|
xdg_icon_cache_update
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm() {
|
pkg_postrm() {
|
||||||
X_xdg_update
|
if use X; then
|
||||||
|
xdg_desktop_database_update
|
||||||
|
xdg_icon_cache_update
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user