blob: 6ab955c623f9a1b6633c8a5bf81a6a1978ae14ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit gnome2-utils
DESCRIPTION="BYOB (Build Your Own Blocks) is an advanced offshoot of Scratch"
HOMEPAGE="http://snap.berkeley.edu/old-byob.html"
SRC_URI="https://www.dropbox.com/s/cevf5my91pjy0t1/BYOB-Pi.image
http://snap.berkeley.edu/byoblib.tgz
https://dl.dropbox.com/s/6dexo1gzyldapwm/BYOB.png -> byob.png"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+alsa oss pulseaudio nas +v4l"
DEPEND="dev-lang/squeakvm[scratch] games-kids/scratch
alsa? ( dev-lang/squeakvm[alsa] )
oss? ( dev-lang/squeakvm[oss] )
pulseaudio? ( dev-lang/squeakvm[pulseaudio] )
nas? ( dev-lang/squeakvm[nas] )
v4l? ( dev-lang/squeakvm[v4l] )"
RDEPEND="${DEPEND}"
REQUIRED_USE="?? ( alsa oss pulseaudio nas )"
S="${WORKDIR}"
src_prepare() {
cp "$DISTDIR/BYOB-Pi.image" "${S}"
cp "$DISTDIR/byob.png" "${S}"
mv Help/en/allscreens.html Help/en/allscreens-BYOB.html
rm Help/en/index.html \
Help/en/ScratchGettingStartedv14.pdf \
Help/en/ScratchReferenceGuide14.pdf \
Help/en/images/getting-started-thumb.gif \
Help/en/images/help-menu.gif \
Help/en/images/helpscreens-thumb.gif \
Help/en/images/scratch-interface-1.gif \
Help/en/images/scratch-logo.gif \
Help/en/images/support-site.gif \
locale/pt.po locale/de.po locale/it.po locale/fr_CA.po locale/ko.po
eapply_user
}
src_configure(){
if use alsa; then squeak_sound_plugin="ALSA"
elif use oss; then squeak_sound_plugin="OSS"
elif use pulseaudio; then squeak_sound_plugin="pulse"
elif use nas; then squeak_sound_plugin="nas"
else squeak_sound_plugin="null"
fi
}
src_install() {
local datadir="/usr/share/scratch"
local icondir="/usr/share/icons/hicolor"
dodir "${datadir}"
cp -r Help locale Media Projects "${D}${datadir}"
dodoc "BYOB 2.0.pdf" Elements090224.pdf README-BYOB.txt license.txt release.txt BYOBManual.pdf
dolib BYOB-Pi.image
dolib BYOB.ini
doicon "byob.png"
install_runner
make_desktop_entry byob BYOB byob "Education;Development" "MimeType=application/x-scratch-project"
}
install_runner() {
local tmpexe=$(emktemp)
cat << EOF > "${tmpexe}"
#!/bin/sh
cd
exec \
"/usr/bin/squeak" \\
-vm-sound-${squeak_sound_plugin} \\
"/usr/$(get_libdir)/BYOB-Pi.image" \\
"${@}"
EOF
chmod go+rx "${tmpexe}"
newbin "${tmpexe}" "${PN}" || die
}
pkg_preinst() {
gnome2_icon_savelist
}
pkg_postinst() {
gnome2_icon_cache_update
}
pkg_postrm() {
gnome2_icon_cache_update
}
|