From 7184347ff988bc6721bc99da169bbae5003243cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Mon, 14 Sep 2020 18:03:08 +0200 Subject: [PATCH] dev-scheme/racket: add desktop files for other gui programs; rev bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Maciej Barć --- ...racket-7.7.ebuild => racket-7.7-r1.ebuild} | 35 +++++++++++++++---- ...racket-7.8.ebuild => racket-7.8-r1.ebuild} | 35 +++++++++++++++---- 2 files changed, 58 insertions(+), 12 deletions(-) rename dev-scheme/racket/{racket-7.7.ebuild => racket-7.7-r1.ebuild} (82%) rename dev-scheme/racket/{racket-7.8.ebuild => racket-7.8-r1.ebuild} (82%) diff --git a/dev-scheme/racket/racket-7.7.ebuild b/dev-scheme/racket/racket-7.7-r1.ebuild similarity index 82% rename from dev-scheme/racket/racket-7.7.ebuild rename to dev-scheme/racket/racket-7.7-r1.ebuild index f7dd554..cd8c8e5 100644 --- a/dev-scheme/racket/racket-7.7.ebuild +++ b/dev-scheme/racket/racket-7.7-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit pax-utils +inherit desktop pax-utils xdg DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" HOMEPAGE="https://racket-lang.org/" @@ -47,7 +47,7 @@ RDEPEND=" dev-libs/libedit ) X? ( - x11-libs/gtk+[X?] + x11-libs/gtk+[X] ) " DEPEND=" @@ -85,7 +85,8 @@ src_configure() { } src_compile() { - if use jit; then + if use jit + 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 @@ -108,11 +109,14 @@ src_compile() { src_install() { default - 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. - for f in mred mzscheme racket; do + local f + for f in mred mzscheme racket + do pax-mark m "${D}/usr/bin/${f}" done @@ -120,9 +124,28 @@ src_install() { fi # raco needs decompressed files for packages doc installation bug 662424 - if use doc; then + if use doc + then docompress -x /usr/share/doc/${PF} fi 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 } diff --git a/dev-scheme/racket/racket-7.8.ebuild b/dev-scheme/racket/racket-7.8-r1.ebuild similarity index 82% rename from dev-scheme/racket/racket-7.8.ebuild rename to dev-scheme/racket/racket-7.8-r1.ebuild index f7dd554..cd8c8e5 100644 --- a/dev-scheme/racket/racket-7.8.ebuild +++ b/dev-scheme/racket/racket-7.8-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit pax-utils +inherit desktop pax-utils xdg DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" HOMEPAGE="https://racket-lang.org/" @@ -47,7 +47,7 @@ RDEPEND=" dev-libs/libedit ) X? ( - x11-libs/gtk+[X?] + x11-libs/gtk+[X] ) " DEPEND=" @@ -85,7 +85,8 @@ src_configure() { } src_compile() { - if use jit; then + if use jit + 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 @@ -108,11 +109,14 @@ src_compile() { src_install() { default - 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. - for f in mred mzscheme racket; do + local f + for f in mred mzscheme racket + do pax-mark m "${D}/usr/bin/${f}" done @@ -120,9 +124,28 @@ src_install() { fi # raco needs decompressed files for packages doc installation bug 662424 - if use doc; then + if use doc + then docompress -x /usr/share/doc/${PF} fi 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 }