1 |
commit: fa4478808fd51e36ba96e59a11514779f609ef86 |
2 |
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 3 16:36:44 2021 +0000 |
4 |
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 3 18:27:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa447880 |
7 |
|
8 |
dev-scheme/racket: bump to 8.3 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> |
12 |
|
13 |
dev-scheme/racket/Manifest | 2 + |
14 |
dev-scheme/racket/racket-8.3.ebuild | 166 ++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 168 insertions(+) |
16 |
|
17 |
diff --git a/dev-scheme/racket/Manifest b/dev-scheme/racket/Manifest |
18 |
index 13a7c36e953e..faf44781e93f 100644 |
19 |
--- a/dev-scheme/racket/Manifest |
20 |
+++ b/dev-scheme/racket/Manifest |
21 |
@@ -1,2 +1,4 @@ |
22 |
DIST racket-8.2-src-builtpkgs.tgz 150467561 BLAKE2B 5005aa852b089becd9d6da136a55a035ac5fd86bd1ad186ec30cdcf411927d444e1814797d63dbde3eb7b52bba7756e0464edf1d854d2ee7f5851caaae18ba55 SHA512 9e4c0cabfcbdb8c8742e8170548bee58021697e8b0842f575f94193db31adc04a7b9023ed8fd70dae197e5ec6f1aee7985d849be3ce5b4279f216e900ee143c7 |
23 |
+DIST racket-8.3-src-builtpkgs.tgz 150608486 BLAKE2B f002934c07afab4152ad8395c4ab5c6c87ef810f5cf79cf5ae0b41f4caa4508e0044f4246812513def14130d507af57aa61efaff8106eaeac0b86918bd775902 SHA512 7c340f65d221343beb2b4205cdc58648bd65dceabdb16f40cda425474faa905f4dd441193dc6cd4856f7863fb83834721394d6888027db356f830eceb127dbae |
24 |
DIST racket-minimal-8.2-src-builtpkgs.tgz 21187959 BLAKE2B 0f62a900e71ee101fa3acf0985b0a72215ac657285c5ce9e4f5f49189180b82dcca94ded9778b7ba92a42919f17b1dc24eec07e13c64c77e47fc958614d7dc0a SHA512 04950703fa73cdbbb10c234d57c89e70db6076b42d4a74ddb8cace9e0438b9a1431f7317baf31d667368ad75ae19e4eecec39667ba0c5b08a3580f8cc81f4f5e |
25 |
+DIST racket-minimal-8.3-src-builtpkgs.tgz 21212037 BLAKE2B 76a742efe7ba2c44eb935d4852c20be355ccff9b935b39226ef1935184b0a9179ef6ca2ac0a64f3c7a6ae4a0082117a12c668d7804a0b73b9f1a391eaba61994 SHA512 3cab4a24cab5c1ac107c8aead2ada6fa3ec7d7aa122716c78af584f055dadf89497168e95b36d99115ecd1a1905dc1ec51774dd2c8099198ec7d6aa9d380039d |
26 |
|
27 |
diff --git a/dev-scheme/racket/racket-8.3.ebuild b/dev-scheme/racket/racket-8.3.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..c767ef23e92c |
30 |
--- /dev/null |
31 |
+++ b/dev-scheme/racket/racket-8.3.ebuild |
32 |
@@ -0,0 +1,166 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit desktop optfeature xdg-utils |
39 |
+ |
40 |
+DESCRIPTION="General purpose, multi-paradigm Lisp-Scheme programming language" |
41 |
+HOMEPAGE="https://racket-lang.org/" |
42 |
+SRC_URI=" |
43 |
+ minimal? ( https://download.racket-lang.org/installers/${PV}/${PN}-minimal-${PV}-src-builtpkgs.tgz ) |
44 |
+ !minimal? ( https://download.racket-lang.org/installers/${PV}/${P}-src-builtpkgs.tgz ) |
45 |
+" |
46 |
+S="${WORKDIR}/${P}/src" |
47 |
+ |
48 |
+# See https://blog.racket-lang.org/2019/11/completing-racket-s-relicensing-effort.html |
49 |
+LICENSE=" |
50 |
+ || ( MIT Apache-2.0 ) |
51 |
+ chez? ( Apache-2.0 ) |
52 |
+ !chez? ( LGPL-3 ) |
53 |
+" |
54 |
+# Bytecode generated by Racket is not compatible between versions. |
55 |
+# The bytecode version should be denoted by SLOT, in most cases |
56 |
+# PV == SLOT but this has to be checked carefully and in cases |
57 |
+# where we use _p, _pre, etc it will have to be set manually. |
58 |
+SLOT="0/${PV}" |
59 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" |
60 |
+IUSE="X +chez +doc +futures +jit minimal +places +threads" |
61 |
+# See bug #809785 re chez/threads |
62 |
+REQUIRED_USE="futures? ( jit threads ) chez? ( threads ) places? ( threads )" |
63 |
+ |
64 |
+DEPEND=" |
65 |
+ !dev-tex/slatex |
66 |
+ dev-db/sqlite:3 |
67 |
+ dev-libs/libffi:= |
68 |
+ X? ( |
69 |
+ dev-util/desktop-file-utils |
70 |
+ media-libs/libpng:0 |
71 |
+ virtual/jpeg:0 |
72 |
+ x11-libs/cairo[X] |
73 |
+ x11-libs/gtk+:3[X] |
74 |
+ x11-libs/pango[X] |
75 |
+ x11-misc/shared-mime-info |
76 |
+ ) |
77 |
+" |
78 |
+RDEPEND="${DEPEND}" |
79 |
+ |
80 |
+# "mred" and "mzscheme" are binaries generated by Racket, not CC |
81 |
+QA_FLAGS_IGNORED="usr/bin/mred usr/bin/mzscheme" |
82 |
+ |
83 |
+# Package database files |
84 |
+PKGDB=( |
85 |
+ /usr/share/racket/info-cache.rktd |
86 |
+ /usr/share/racket/links.rktd |
87 |
+ /usr/share/racket/pkgs/pkgs.rktd |
88 |
+) |
89 |
+ |
90 |
+post_X_update() { |
91 |
+ if use X && ! use minimal; then |
92 |
+ xdg_desktop_database_update |
93 |
+ xdg_icon_cache_update |
94 |
+ fi |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ # Prepare environment |
99 |
+ unset PLTADDONDIR PLTCOLLECTS PLTCONFIGDIR PLTUSERHOME |
100 |
+ xdg_environment_reset |
101 |
+ |
102 |
+ default |
103 |
+ |
104 |
+ # Remove bundled libffi |
105 |
+ rm -r ./bc/foreign/libffi || die "failed to remove bundled libffi" |
106 |
+} |
107 |
+ |
108 |
+src_configure() { |
109 |
+ # Libtool: |
110 |
+ # According to vapier, we should use the bundled libtool |
111 |
+ # such that we don't preclude cross-compile. |
112 |
+ # Thus don't use --enable-lt=/usr/bin/libtool |
113 |
+ # Backend: |
114 |
+ # --enable-bc builds Racket w/o chez backend |
115 |
+ # C Libraries: |
116 |
+ # --enable-libs & --disable-shared is the way to build |
117 |
+ # .a files that are needed to embed Racket into programs |
118 |
+ # https://docs.racket-lang.org/inside/cs-embedding.html |
119 |
+ local myconf=( |
120 |
+ --disable-shared |
121 |
+ --disable-strip |
122 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" |
123 |
+ --enable-float |
124 |
+ --enable-foreign |
125 |
+ --enable-libffi |
126 |
+ --enable-libs |
127 |
+ $(usex chez "--enable-cs --enable-csonly" "--enable-bc --enable-bconly") |
128 |
+ $(use_enable X gracket) |
129 |
+ $(use_enable doc docs) |
130 |
+ $(use_enable futures) |
131 |
+ $(use_enable jit) |
132 |
+ $(use_enable places) |
133 |
+ $(use_enable threads pthread) |
134 |
+ ) |
135 |
+ econf "${myconf[@]}" |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ default |
140 |
+ |
141 |
+ # Install Racket boot files |
142 |
+ if use chez; then |
143 |
+ pushd "${S}"/cs/c || die |
144 |
+ emake DESTDIR="${ED}" unix-install-boot-files |
145 |
+ popd || die |
146 |
+ fi |
147 |
+ |
148 |
+ # raco needs decompressed files for packages doc installation bug 662424 |
149 |
+ if use doc; then |
150 |
+ docompress -x /usr/share/doc/${PF} |
151 |
+ fi |
152 |
+ |
153 |
+ # Create missing desktop files and icon |
154 |
+ if use X && ! use minimal; then |
155 |
+ newicon "${ED}/usr/share/racket/drracket-exe-icon.png" "racket.png" |
156 |
+ make_desktop_entry "gracket" "GRacket" "racket" "Development;Education;" |
157 |
+ make_desktop_entry "plt-games" "PLT Games" "racket" "Education;Game;" |
158 |
+ fi |
159 |
+} |
160 |
+ |
161 |
+pkg_preinst() { |
162 |
+ # If we are merging the same SLOT check if package |
163 |
+ # database files exist and do not overwrite them |
164 |
+ if has_version "${CATEGORY}/${PN}:${SLOT}"; then |
165 |
+ echo "We are installing the same SLOT: ${SLOT}" |
166 |
+ local rktd |
167 |
+ for rktd in "${PKGDB[@]}"; do |
168 |
+ if [[ -f "${EROOT}/${rktd}" ]]; then |
169 |
+ einfo "Keeping old file: ${rktd}" |
170 |
+ mv "${ED}"/${rktd} "${ED}"/${rktd}.bak || |
171 |
+ die "failed to create a backup of ${rktd}" |
172 |
+ cp "${EROOT}"/${rktd} "${ED}"/${rktd} || |
173 |
+ die "failed to create a copy of ${rktd}" |
174 |
+ fi |
175 |
+ done |
176 |
+ fi |
177 |
+} |
178 |
+ |
179 |
+pkg_postinst() { |
180 |
+ post_X_update |
181 |
+ |
182 |
+ optfeature "readline editing features in REPL" dev-libs/libedit sys-libs/readline |
183 |
+ optfeature "generating PDF files using Scribble" dev-texlive/texlive-fontsextra |
184 |
+} |
185 |
+ |
186 |
+pkg_postrm() { |
187 |
+ post_X_update |
188 |
+} |
189 |
+ |
190 |
+pkg_config() { |
191 |
+ einfo "Swapping package database backup files" |
192 |
+ |
193 |
+ for rktd in "${PKGDB[@]}"; do |
194 |
+ mv "${EROOT}"/${rktd} "${EROOT}"/${rktd}.pkg_config || die |
195 |
+ mv "${EROOT}"/${rktd}.bak "${EROOT}"/${rktd} || die |
196 |
+ mv "${EROOT}"/${rktd}.pkg_config "${EROOT}"/${rktd}.bak || die |
197 |
+ done |
198 |
+} |