dev-scheme/racket: add desktop files for other gui programs; rev bump

Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
Maciej Barć 2020-09-14 18:03:08 +02:00
parent 194a83b3ff
commit 7184347ff9
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
2 changed files with 58 additions and 12 deletions

View File

@ -3,7 +3,7 @@
EAPI=7 EAPI=7
inherit pax-utils inherit desktop pax-utils xdg
DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language"
HOMEPAGE="https://racket-lang.org/" HOMEPAGE="https://racket-lang.org/"
@ -47,7 +47,7 @@ RDEPEND="
dev-libs/libedit dev-libs/libedit
) )
X? ( X? (
x11-libs/gtk+[X?] x11-libs/gtk+[X]
) )
" "
DEPEND=" DEPEND="
@ -85,7 +85,8 @@ src_configure() {
} }
src_compile() { src_compile() {
if use jit; then if use jit
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
@ -108,11 +109,14 @@ src_compile() {
src_install() { src_install() {
default default
if use jit; then 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.
for f in mred mzscheme racket; do local f
for f in mred mzscheme racket
do
pax-mark m "${D}/usr/bin/${f}" pax-mark m "${D}/usr/bin/${f}"
done done
@ -120,9 +124,28 @@ src_install() {
fi fi
# raco needs decompressed files for packages doc installation bug 662424 # raco needs decompressed files for packages doc installation bug 662424
if use doc; then if use doc
then
docompress -x /usr/share/doc/${PF} docompress -x /usr/share/doc/${PF}
fi fi
find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
if use X
then
make_desktop_entry "gracket" "GRacket" \
"/usr/share/racket/drracket-exe-icon.png" \
"Development;Education;"
make_desktop_entry "plt-games" "PLT Games" \
"/usr/share/racket/drracket-exe-icon.png" \
"Education;Game;"
fi
}
pkg_postinst() {
use X && xdg_desktop_database_update
}
pkg_postrm() {
use X && xdg_desktop_database_update
} }

View File

@ -3,7 +3,7 @@
EAPI=7 EAPI=7
inherit pax-utils inherit desktop pax-utils xdg
DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language"
HOMEPAGE="https://racket-lang.org/" HOMEPAGE="https://racket-lang.org/"
@ -47,7 +47,7 @@ RDEPEND="
dev-libs/libedit dev-libs/libedit
) )
X? ( X? (
x11-libs/gtk+[X?] x11-libs/gtk+[X]
) )
" "
DEPEND=" DEPEND="
@ -85,7 +85,8 @@ src_configure() {
} }
src_compile() { src_compile() {
if use jit; then if use jit
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
@ -108,11 +109,14 @@ src_compile() {
src_install() { src_install() {
default default
if use jit; then 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.
for f in mred mzscheme racket; do local f
for f in mred mzscheme racket
do
pax-mark m "${D}/usr/bin/${f}" pax-mark m "${D}/usr/bin/${f}"
done done
@ -120,9 +124,28 @@ src_install() {
fi fi
# raco needs decompressed files for packages doc installation bug 662424 # raco needs decompressed files for packages doc installation bug 662424
if use doc; then if use doc
then
docompress -x /usr/share/doc/${PF} docompress -x /usr/share/doc/${PF}
fi fi
find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
if use X
then
make_desktop_entry "gracket" "GRacket" \
"/usr/share/racket/drracket-exe-icon.png" \
"Development;Education;"
make_desktop_entry "plt-games" "PLT Games" \
"/usr/share/racket/drracket-exe-icon.png" \
"Education;Game;"
fi
}
pkg_postinst() {
use X && xdg_desktop_database_update
}
pkg_postrm() {
use X && xdg_desktop_database_update
} }