diff options
author | Maciej Barć <xgqt@riseup.net> | 2021-07-29 03:40:20 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2021-08-13 08:01:48 +0200 |
commit | 8a1f855b5c9aac03194c859f57900a212373d520 (patch) | |
tree | 76b58cbeb1cc915abd9e972d758577365701e2f4 /dev-scheme | |
parent | dev-python/podcastparser: bump to 0.6.7 (diff) | |
download | gentoo-8a1f855b5c9aac03194c859f57900a212373d520.tar.gz gentoo-8a1f855b5c9aac03194c859f57900a212373d520.tar.bz2 gentoo-8a1f855b5c9aac03194c859f57900a212373d520.zip |
dev-scheme/racket: add 8.1 and 8.2
Closes: https://github.com/gentoo/gentoo/pull/20668
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Maciej Barć <xgqt@riseup.net>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r-- | dev-scheme/racket/Manifest | 4 | ||||
-rw-r--r-- | dev-scheme/racket/files/Makefile-nostrip.patch | 13 | ||||
-rw-r--r-- | dev-scheme/racket/files/Makefile-starter.patch | 32 | ||||
-rw-r--r-- | dev-scheme/racket/racket-8.1.ebuild | 166 | ||||
-rw-r--r-- | dev-scheme/racket/racket-8.2.ebuild | 166 |
5 files changed, 381 insertions, 0 deletions
diff --git a/dev-scheme/racket/Manifest b/dev-scheme/racket/Manifest index 05b00b776775..a5969235d059 100644 --- a/dev-scheme/racket/Manifest +++ b/dev-scheme/racket/Manifest @@ -3,8 +3,12 @@ DIST racket-7.1-src-builtpkgs.tgz 126596138 BLAKE2B 734595105630352977d7f51de233 DIST racket-7.2-src-builtpkgs.tgz 127050541 BLAKE2B f6235c9f5a646a6d2a8ab0ce63ded384ed707dc704927b63281c159e2daa503ffc4bad99cd33511aca05c0fa7aa55adde1e9c79032faa17dcd99f1bbd15324a8 SHA512 748e1ee63b6c32bafc58401e943e7dd31a47cfd2eb8dad6e4a40a8966d4df2fb7e4bb573841c210a567ba0f02b518d41fa69df03736f49ae9761446e71a4ab9b DIST racket-7.3-src-builtpkgs.tgz 127136703 BLAKE2B 3449f62d8301cf5cc527cd46e074279d34c6064631a584488407d4c7af3b10aa01bb074d0dbc59034e8e036b1f24f9921ccdc070fb7bb3ff548f18b37cd8d12d SHA512 2cba16d6513984721b82d21e279a0017e3d96f3e2a53ca773deb45e10be2b74a61d4496679eb5aa4aff9276f323a16a1506e9471a873c28ee014f7d4e49bfea8 DIST racket-8.0-src-builtpkgs.tgz 153847792 BLAKE2B dba1b39e770954e5971689f6d2b413f1aadc6176822e4400b40b41ebf7eab00cc34b5e5158f38d1a1d8caa98fa260ef10864794dc0d4768e2ea5b2ad869d0102 SHA512 df3e14ccdba00eb4de113693a6eee22e640958b074f3ad4946e5900333fbf558c4c2653f65a89f638f6ef173d32c9f97b19349360a9d4afca82365aceb43c911 +DIST racket-8.1-src-builtpkgs.tgz 154340467 BLAKE2B 1a12ca71a3af0c506238e2abad44596c54b5102fbe81d99c713356dc52abcdba8f0a0cf969702cff1f7738a0383d55894a546f682f3d854b504ceab34cef600e SHA512 afc8c737087a98172dbf699d24cee73966da699aebbdefb8b7785a6521dc4de61b8d7f2ed3a3f1d2be7a1dfe6675db7a33d39492da9dfe0aad8d9074cd03cf9f +DIST racket-8.2-src-builtpkgs.tgz 150467561 BLAKE2B 5005aa852b089becd9d6da136a55a035ac5fd86bd1ad186ec30cdcf411927d444e1814797d63dbde3eb7b52bba7756e0464edf1d854d2ee7f5851caaae18ba55 SHA512 9e4c0cabfcbdb8c8742e8170548bee58021697e8b0842f575f94193db31adc04a7b9023ed8fd70dae197e5ec6f1aee7985d849be3ce5b4279f216e900ee143c7 DIST racket-minimal-7.0-src-builtpkgs.tgz 12215529 BLAKE2B 4e9d2b137edf6b188c71dd32771753a16589ab49884aba1641fac5a5f82b9016843fec3257de7d59a9b00971a7dd455e99897782794800e14a656bcb22a17080 SHA512 976fd0ab96f4bf99eb7c63f7f213af91f91de4dd2498c4f8f1440743f7571194090abf0c4037e436970235f737d0add116f5689bf495688b3667a91ef95e8270 DIST racket-minimal-7.1-src-builtpkgs.tgz 15304920 BLAKE2B be851eb58655d5f7eb36235eeb37f3d24c94c4a6b20724a4772acccf109df6e6a9d8e0f9797530c7c3f6540e99325417ef982244017719fced75e1afda71847a SHA512 e1e839867fd4540fe15234f149162c88ad1f73ca26ba22644d58b3d8ab2809851d8b176f9f448dfd7acd3b7733a20d388c71cdd76e8a5dc6c50662e6113df6df DIST racket-minimal-7.2-src-builtpkgs.tgz 15481415 BLAKE2B 145823cfe8538e5f569e33303bae585cb2eebf013da27551a606a005ab84e70b0e58710eadbaecbaae4fc5c9b62b22e26ba1ab2f3158500600c0bc9d7a52e17c SHA512 0fb17ef0e7d8c03c847827118dec48486fd499777fbbf98588124f9e4725dd815e0f6df2e95f4d8700b8d8dbe3b7d678d2ffb8966ce0add6742bff554ef9415c DIST racket-minimal-7.3-src-builtpkgs.tgz 15549791 BLAKE2B ab03252c48b8a07ae6caeb3af67d823d8eeddd22242d2146812c7b12ade09caa86ad026fb1a7b3dfeb981e304b78c697d1f93fb9d94c6e7dbc8c3ecb09fdfea0 SHA512 e542898dab04e781b0b8a613f250a35db8beed9db33406f20d4f028b7f3629904409aadf653c68998d36948bdd46e51134d3cebe1e014b46e3dba82472c3563b DIST racket-minimal-8.0-src-builtpkgs.tgz 24065953 BLAKE2B 2af056758660d30f7d232dabe03d544e5e77478df71389df883b8af956fe224332048eac3a351fdb905051e3ef99b08bd0e0f1704e04919a4a2e68f8005922b8 SHA512 1e43b390f6a4c1405df0872c71c27638ec35a8cdd8508390db13bd59a43f5a4728f0660fe1afb5785f625d31fd25cdc1a6ecb9972daf99bcb538f7204956dabc +DIST racket-minimal-8.1-src-builtpkgs.tgz 24172851 BLAKE2B ab3e898e257d610874b31ac5ea3034b5c213f1d181f105c206c45129c35efb53250986163ea8c2399c02084d0d7ec55d0c79c8c8499578067f1bbef4c02568c5 SHA512 eb786882383c33fc77a697a66b06d797b0dbb2de8435daa41db4211cfa893dbbc213910ada4ea087f848dae1abb4d5ff9df162af5cf8eae689f1ef69b410d6c5 +DIST racket-minimal-8.2-src-builtpkgs.tgz 21187959 BLAKE2B 0f62a900e71ee101fa3acf0985b0a72215ac657285c5ce9e4f5f49189180b82dcca94ded9778b7ba92a42919f17b1dc24eec07e13c64c77e47fc958614d7dc0a SHA512 04950703fa73cdbbb10c234d57c89e70db6076b42d4a74ddb8cace9e0438b9a1431f7317baf31d667368ad75ae19e4eecec39667ba0c5b08a3580f8cc81f4f5e diff --git a/dev-scheme/racket/files/Makefile-nostrip.patch b/dev-scheme/racket/files/Makefile-nostrip.patch new file mode 100644 index 000000000000..be958546cb89 --- /dev/null +++ b/dev-scheme/racket/files/Makefile-nostrip.patch @@ -0,0 +1,13 @@ +diff --git a/racket/src/bc/Makefile.in b/racket/src/bc/Makefile.in +index 3393e0c55e..6f0014881a 100644 +--- a/bc/Makefile.in ++++ b/bc/Makefile.in +@@ -524,7 +524,7 @@ unix-install-3m: + $(RESTORE_SIGNATURE) "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@" + + unix-install-libs-3m: +- cd ..; $(ICP_LIB) bc/libracket3m.@LIBSFX@ "$(DESTDIR)$(libdir)/libracket3m.@LIBSFX@" ++ cd ..; libtool --mode=install install bc/libracket3m.@LIBSFX@ "$(DESTDIR)$(libdir)/libracket3m.@LIBSFX@" + cd ..; $(ICP_STATIC_LIB) bc/rktio/librktio.@LIBSFX@ "$(DESTDIR)$(libdir)/librktio.@LIBSFX@" + cd ..; $(STRIP_LIB_DEBUG) "$(DESTDIR)$(libdir)/libracket3m.@LIBSFX@" + diff --git a/dev-scheme/racket/files/Makefile-starter.patch b/dev-scheme/racket/files/Makefile-starter.patch new file mode 100644 index 000000000000..1a6d527dd085 --- /dev/null +++ b/dev-scheme/racket/files/Makefile-starter.patch @@ -0,0 +1,32 @@ +index 771f13149e..f219acf1a7 100644 +--- a/bc/dynsrc/Makefile.in ++++ b/bc/dynsrc/Makefile.in +@@ -22,6 +22,7 @@ PLAIN_CC = @PLAIN_CC@ + CFLAGS = @CFLAGS@ @COMPFLAGS@ + CPPFLAGS = @PREFLAGS@ + ALL_CFLAGS = $(CFLAGS) $(CPPFLAGS) -I$(builddir)/.. -I$(srcdir)/../include -I$(srcdir)/../src -I$(srcdir)/../../version -I$(srcdir)/../../start @MZOPTIONS@ ++LDFLAGS = @LDFLAGS@ + + dynlib@NOT_MINGW@: + $(MAKE) ../mzdyn.o +@@ -61,7 +62,7 @@ dynexmpl.o: $(srcdir)/dynexmpl.c $(HEADERS) + $(PLAIN_CC) $(ALL_CFLAGS) -c $(srcdir)/dynexmpl.c -o dynexmpl.o + + ../starter@NOT_MINGW@@EXE_SUFFIX@: $(srcdir)/../../start/ustart.c $(srcdir)/../../start/self_exe.inc +- $(PLAIN_CC) $(ALL_CFLAGS) -o ../starter@EXE_SUFFIX@ $(srcdir)/../../start/ustart.c ++ $(PLAIN_CC) $(ALL_CFLAGS) $(LDFLAGS) -o ../starter@EXE_SUFFIX@ $(srcdir)/../../start/ustart.c + + PARSE_CMDL = $(srcdir)/../../start/parse_cmdl.inc + +index 1413d1802e..f1135a6681 100644 +--- a/cs/c/Makefile.in ++++ b/cs/c/Makefile.in +@@ -441,7 +441,7 @@ boot.o: $(srcdir)/boot.c $(srcdir)/../../rktio/rktio.inc $(srcdir)/boot.h + $(CC) $(CFLAGS) -c -o boot.o $(srcdir)/boot.c + + starter@NOT_MINGW@: $(srcdir)/../../start/ustart.c $(srcdir)/../../start/self_exe.inc +- $(CC) $(CFLAGS) -o starter $(srcdir)/../../start/ustart.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o starter $(srcdir)/../../start/ustart.c + + + repack-install-libs: diff --git a/dev-scheme/racket/racket-8.1.ebuild b/dev-scheme/racket/racket-8.1.ebuild new file mode 100644 index 000000000000..46f752b22ec8 --- /dev/null +++ b/dev-scheme/racket/racket-8.1.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop optfeature xdg-utils + +DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" +HOMEPAGE="https://racket-lang.org/" +SRC_URI=" + minimal? ( https://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz ) + !minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz ) +" +S="${WORKDIR}/${P}/src" + +# 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 ) +" +# Bytecode generated by Racket is not compatible between versions +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="X +chez +doc +futures +jit minimal +places +readline +threads" +REQUIRED_USE="futures? ( jit )" + +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 + ) + readline? ( dev-libs/libedit ) +" +RDEPEND="${DEPEND}" + +# "mred" and "mzscheme" are binaries generated by Racket, not CC +QA_FLAGS_IGNORED="usr/bin/mred usr/bin/mzscheme" + +# Backports that will be probably available in 8.3 release +PATCHES=( + # Prevent "libracket3m" from being stripped + # https://github.com/racket/racket/commit/92d202060201f569fafc348c4f64a2965b55287f + "${FILESDIR}/Makefile-nostrip.patch" + # Fix "starter" LDFLAGS + # https://github.com/racket/racket/commit/4f0e1703979d704c4f91b009945c324450acec7a + "${FILESDIR}/Makefile-starter.patch" +) + +# Package database files +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 + unset PLTADDONDIR PLTCOLLECTS PLTCONFIGDIR PLTUSERHOME + xdg_environment_reset + + default + + # Remove bundled libffi + rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi" +} + +src_configure() { + # According to vapier, we should use the bundled libtool + # such that we don't preclude cross-compile. + # Thus don't use --enable-lt=/usr/bin/libtool + # --enable-bc builds Racket w/o chez backend + local myconf=( + --disable-libs + --disable-strip + --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 futures) + $(use_enable jit) + $(use_enable places) + $(use_enable threads pthread) + ) + econf "${myconf[@]}" +} + +src_install() { + default + + # raco needs decompressed files for packages doc installation bug 662424 + if use doc; then + docompress -x /usr/share/doc/${PF} + fi + + # Remove unneeded "*.a" and "*.la" files + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die + + # Create missing desktop files and icon + if use X && ! 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;" + fi +} + +pkg_preinst() { + # If we are merging the same version (NOT revision!) + # check if pkg database files exist and do not overwrite them + local pvr rel + for pvr in ${REPLACING_VERSIONS}; do + rel="${pvr%-r*}" + if [[ "${rel}" == "${PV}" ]]; then + echo "We are installing the same version: ${rel}" + local rktd + for rktd in "${PKGDB[@]}"; do + if [[ -f "${EROOT}/${rktd}" ]]; then + einfo "Keeping old file: ${rktd}" + mv "${ED}"/${rktd} "${ED}"/${rktd}.bak || + die "failed to create a backup of ${rktd}" + cp "${EROOT}"/${rktd} "${ED}"/${rktd} || + die "failed to create a copy of ${rktd}" + fi + done + fi + done +} + +pkg_postinst() { + post_X_update + + optfeature "generating PDF files using Scribble" dev-texlive/texlive-fontsextra +} + +pkg_postrm() { + post_X_update +} + +pkg_config() { + einfo "Swapping package database backup files" + + for rktd in "${PKGDB[@]}"; do + mv "${EROOT}"/${rktd} "${EROOT}"/${rktd}.pkg_config || die + mv "${EROOT}"/${rktd}.bak "${EROOT}"/${rktd} || die + mv "${EROOT}"/${rktd}.pkg_config "${EROOT}"/${rktd}.bak || die + done +} diff --git a/dev-scheme/racket/racket-8.2.ebuild b/dev-scheme/racket/racket-8.2.ebuild new file mode 100644 index 000000000000..46f752b22ec8 --- /dev/null +++ b/dev-scheme/racket/racket-8.2.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop optfeature xdg-utils + +DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" +HOMEPAGE="https://racket-lang.org/" +SRC_URI=" + minimal? ( https://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz ) + !minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz ) +" +S="${WORKDIR}/${P}/src" + +# 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 ) +" +# Bytecode generated by Racket is not compatible between versions +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="X +chez +doc +futures +jit minimal +places +readline +threads" +REQUIRED_USE="futures? ( jit )" + +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 + ) + readline? ( dev-libs/libedit ) +" +RDEPEND="${DEPEND}" + +# "mred" and "mzscheme" are binaries generated by Racket, not CC +QA_FLAGS_IGNORED="usr/bin/mred usr/bin/mzscheme" + +# Backports that will be probably available in 8.3 release +PATCHES=( + # Prevent "libracket3m" from being stripped + # https://github.com/racket/racket/commit/92d202060201f569fafc348c4f64a2965b55287f + "${FILESDIR}/Makefile-nostrip.patch" + # Fix "starter" LDFLAGS + # https://github.com/racket/racket/commit/4f0e1703979d704c4f91b009945c324450acec7a + "${FILESDIR}/Makefile-starter.patch" +) + +# Package database files +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 + unset PLTADDONDIR PLTCOLLECTS PLTCONFIGDIR PLTUSERHOME + xdg_environment_reset + + default + + # Remove bundled libffi + rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi" +} + +src_configure() { + # According to vapier, we should use the bundled libtool + # such that we don't preclude cross-compile. + # Thus don't use --enable-lt=/usr/bin/libtool + # --enable-bc builds Racket w/o chez backend + local myconf=( + --disable-libs + --disable-strip + --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 futures) + $(use_enable jit) + $(use_enable places) + $(use_enable threads pthread) + ) + econf "${myconf[@]}" +} + +src_install() { + default + + # raco needs decompressed files for packages doc installation bug 662424 + if use doc; then + docompress -x /usr/share/doc/${PF} + fi + + # Remove unneeded "*.a" and "*.la" files + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die + + # Create missing desktop files and icon + if use X && ! 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;" + fi +} + +pkg_preinst() { + # If we are merging the same version (NOT revision!) + # check if pkg database files exist and do not overwrite them + local pvr rel + for pvr in ${REPLACING_VERSIONS}; do + rel="${pvr%-r*}" + if [[ "${rel}" == "${PV}" ]]; then + echo "We are installing the same version: ${rel}" + local rktd + for rktd in "${PKGDB[@]}"; do + if [[ -f "${EROOT}/${rktd}" ]]; then + einfo "Keeping old file: ${rktd}" + mv "${ED}"/${rktd} "${ED}"/${rktd}.bak || + die "failed to create a backup of ${rktd}" + cp "${EROOT}"/${rktd} "${ED}"/${rktd} || + die "failed to create a copy of ${rktd}" + fi + done + fi + done +} + +pkg_postinst() { + post_X_update + + optfeature "generating PDF files using Scribble" dev-texlive/texlive-fontsextra +} + +pkg_postrm() { + post_X_update +} + +pkg_config() { + einfo "Swapping package database backup files" + + for rktd in "${PKGDB[@]}"; do + mv "${EROOT}"/${rktd} "${EROOT}"/${rktd}.pkg_config || die + mv "${EROOT}"/${rktd}.bak "${EROOT}"/${rktd} || die + mv "${EROOT}"/${rktd}.pkg_config "${EROOT}"/${rktd}.bak || die + done +} |