aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>1984-04-04 00:44:04 +0000
committerpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>1984-04-04 00:44:04 +0000
commit8d36d6eec8796ae5f8297cf9eb98eb033251278e (patch)
tree2a3abd1dea6a2c5a1c6b9e6b244c3ea9b6582ab0
parent4b6d3438a1ec982795c4b8abd2bad4866b4cb2f7 (diff)
parentb0fdb7f62a04bb48c0a6638c730b8d9e712b6048 (diff)
downloadyoubroketheinternet-overlay-8d36d6eec8796ae5f8297cf9eb98eb033251278e.tar.gz
youbroketheinternet-overlay-8d36d6eec8796ae5f8297cf9eb98eb033251278e.zip
Merge remote-tracking branch 'gnunet/master'
-rw-r--r--app-emacs/company-mode/Manifest3
-rw-r--r--app-emacs/company-mode/company-mode-0.6.14.ebuild38
-rw-r--r--app-emacs/company-mode/company-mode-0.7.ebuild38
-rw-r--r--app-emacs/company-mode/company-mode-0.9.7.ebuild18
-rw-r--r--app-emacs/company-mode/files/50company-mode-gentoo.el2
-rw-r--r--app-emacs/company-mode/metadata.xml16
-rw-r--r--app-emacs/parinfer/parinfer-9999.ebuild25
-rw-r--r--app-text/lowdown/Manifest1
-rw-r--r--app-text/lowdown/lowdown-0.4.1.ebuild32
-rw-r--r--app-text/ssg3/files/ssg3261
-rw-r--r--app-text/ssg3/ssg3-20181213.ebuild16
-rw-r--r--dev-scheme/guile-git/Manifest1
-rw-r--r--dev-scheme/guile-git/guile-git-0.0.20171110.ebuild20
-rw-r--r--dev-scheme/guile-git/guile-git-0.1.ebuild22
-rw-r--r--dev-scheme/guile-git/metadata.xml7
-rw-r--r--eclass/font-r1.eclass230
-rw-r--r--eclass/fontmake.eclass97
-rw-r--r--eclass/git-r3.eclass566
-rw-r--r--eclass/git-r3.tor.eclass1016
-rw-r--r--media-fonts/unscii/Manifest25
-rw-r--r--media-fonts/unscii/metadata.xml10
-rw-r--r--media-fonts/unscii/unscii-1.1.ebuild112
-rw-r--r--net-im/gajim/Manifest3
-rw-r--r--net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch45
-rw-r--r--net-im/gajim/files/disable-gspell-1.1.0.patch21
-rw-r--r--net-im/gajim/gajim-0.16.6-r1.ebuild126
-rw-r--r--net-im/gajim/gajim-0.16.9.ebuild125
-rw-r--r--net-im/gajim/gajim-1.0.3-r3.ebuild87
-rw-r--r--net-im/gajim/gajim-9999.ebuild111
-rw-r--r--net-im/gajim/metadata.xml15
-rw-r--r--profiles/package.mask1
-rw-r--r--www-plugins/gnash/Manifest8
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10-amf-include.patch45
-rw-r--r--www-plugins/gnash/files/gnash-0.8.10_p20150316-boost-1.60.patch24
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch24
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch12
-rw-r--r--www-plugins/gnash/files/gnash-0.8.9-klash.patch12
-rw-r--r--www-plugins/gnash/gnash-0.8.10_p20160329-r667.ebuild259
-rw-r--r--www-plugins/gnash/gnash-9999.ebuild259
-rw-r--r--www-plugins/gnash/metadata.xml17
-rw-r--r--x11-plugins/lurch/Manifest9
-rw-r--r--x11-plugins/lurch/lurch-0.6.1.ebuild22
-rw-r--r--x11-plugins/lurch/lurch-0.6.5.ebuild23
-rw-r--r--x11-plugins/lurch/lurch-0.6.6.ebuild23
-rw-r--r--x11-plugins/lurch/lurch-0.6.7.ebuild23
-rw-r--r--x11-plugins/lurch/lurch-9999.ebuild34
-rw-r--r--x11-plugins/lurch/metadata.xml10
47 files changed, 3657 insertions, 237 deletions
diff --git a/app-emacs/company-mode/Manifest b/app-emacs/company-mode/Manifest
new file mode 100644
index 0000000..f3220a8
--- /dev/null
+++ b/app-emacs/company-mode/Manifest
@@ -0,0 +1,3 @@
1DIST company-mode-0.6.14.tar.gz 51776 SHA256 5472cd634bf09da4557f055d3615afdd5436f814f63923ad94ccbebe60ab5e08 SHA512 7b8c0b70dc9c010214e8671fd7393faa9d1dd0839f41d532eb93eda91c77b4c93f2145ad2d688011976bfbb45282f35b937f195499f29cda79147ec2815e94d9 WHIRLPOOL 1aeefc6e4a5d7e3696150c38187131811c88fd3e9478a401400a31a7f7f7e3aad42736cabb093398470f9b20041639143665bb9d7335e2ae40ccfab8d2ab91ce
2DIST company-mode-0.7.tar.gz 54670 SHA256 73d55d9288537800c23f5e9e5b6208dd5e36e29271dca1a6c3840ca20142a268 SHA512 375c8541a0c5b34fba37ea136c8549e6ec916c238bee8115f036d88f273d6bcb0c0f436a6193d3b4be6528945d8f85c605de8d340e903a9764f5ace664f8cf61 WHIRLPOOL 23e18a37be0a2c1f4c7ded455557a5503c8f25b910ce5c0f36d8b09a22bd4aa96a944b0363750fce6b111dc3854c896f1800ac4dad20f99c76d7e0c9829e6014
3DIST company-mode-0.9.7.tar.gz 84652 SHA256 4b1368a7660a35f3316490d8fad716a7adb8b99f4ccc45916a1d62e1d0d8d4a5 SHA512 18d5319a7a4509972c4734a7a703b3afae0ba11663eacddff9d998629d293231b3ad07e0be42b276ec2ac7cc4aaa75116b441b298493d61a5e0dee347062fd2a WHIRLPOOL 2e0d825193db62c76e0daff3e5f8ac18cf25cf958a5368ec779aac91dfb4e8086ce8e1d5d8de49c8261e59209804190832e4414306dbd2a1eef795b5911a4b37
diff --git a/app-emacs/company-mode/company-mode-0.6.14.ebuild b/app-emacs/company-mode/company-mode-0.6.14.ebuild
new file mode 100644
index 0000000..7b2e223
--- /dev/null
+++ b/app-emacs/company-mode/company-mode-0.6.14.ebuild
@@ -0,0 +1,38 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6inherit elisp
7
8DESCRIPTION="In-buffer completion front-end"
9HOMEPAGE="https://company-mode.github.com/"
10SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12LICENSE="GPL-3+"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE="ropemacs"
16RESTRICT="test"
17
18# Note: company-mode supports many backends, and we refrain from including
19# them all in RDEPEND. Only depend on things that are needed at build time.
20DEPEND="ropemacs? ( app-emacs/pymacs )"
21RDEPEND="${DEPEND}
22 ropemacs? ( dev-python/ropemacs )"
23
24SITEFILE="50${PN}-gentoo.el"
25DOCS="README.md NEWS.md"
26
27src_prepare() {
28 # Disable backends that require extra dependencies, unless they are
29 # selected by the respective USE flag
30
31 elog "Removing pysmell backend"
32 rm company-pysmell.el || die
33
34 if ! use ropemacs; then
35 elog "Removing ropemacs backend, as requested by USE=-ropemacs"
36 rm company-ropemacs.el || die
37 fi
38}
diff --git a/app-emacs/company-mode/company-mode-0.7.ebuild b/app-emacs/company-mode/company-mode-0.7.ebuild
new file mode 100644
index 0000000..7b2e223
--- /dev/null
+++ b/app-emacs/company-mode/company-mode-0.7.ebuild
@@ -0,0 +1,38 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6inherit elisp
7
8DESCRIPTION="In-buffer completion front-end"
9HOMEPAGE="https://company-mode.github.com/"
10SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12LICENSE="GPL-3+"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE="ropemacs"
16RESTRICT="test"
17
18# Note: company-mode supports many backends, and we refrain from including
19# them all in RDEPEND. Only depend on things that are needed at build time.
20DEPEND="ropemacs? ( app-emacs/pymacs )"
21RDEPEND="${DEPEND}
22 ropemacs? ( dev-python/ropemacs )"
23
24SITEFILE="50${PN}-gentoo.el"
25DOCS="README.md NEWS.md"
26
27src_prepare() {
28 # Disable backends that require extra dependencies, unless they are
29 # selected by the respective USE flag
30
31 elog "Removing pysmell backend"
32 rm company-pysmell.el || die
33
34 if ! use ropemacs; then
35 elog "Removing ropemacs backend, as requested by USE=-ropemacs"
36 rm company-ropemacs.el || die
37 fi
38}
diff --git a/app-emacs/company-mode/company-mode-0.9.7.ebuild b/app-emacs/company-mode/company-mode-0.9.7.ebuild
new file mode 100644
index 0000000..5ab5f81
--- /dev/null
+++ b/app-emacs/company-mode/company-mode-0.9.7.ebuild
@@ -0,0 +1,18 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6inherit elisp
7
8DESCRIPTION="In-buffer completion front-end"
9HOMEPAGE="https://company-mode.github.com/"
10SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12LICENSE="GPL-3+"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15RESTRICT="test"
16
17SITEFILE="50${PN}-gentoo.el"
18DOCS="README.md NEWS.md"
diff --git a/app-emacs/company-mode/files/50company-mode-gentoo.el b/app-emacs/company-mode/files/50company-mode-gentoo.el
new file mode 100644
index 0000000..cd85457
--- /dev/null
+++ b/app-emacs/company-mode/files/50company-mode-gentoo.el
@@ -0,0 +1,2 @@
1(add-to-list 'load-path "@SITELISP@")
2(autoload 'company-mode "company" nil t)
diff --git a/app-emacs/company-mode/metadata.xml b/app-emacs/company-mode/metadata.xml
new file mode 100644
index 0000000..166418c
--- /dev/null
+++ b/app-emacs/company-mode/metadata.xml
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4<maintainer type="project">
5 <email>gnu-emacs@gentoo.org</email>
6 <name>Gentoo GNU Emacs project</name>
7</maintainer>
8<stabilize-allarches/>
9<use>
10 <flag name="ropemacs">Install backend for
11 <pkg>dev-python/ropemacs</pkg></flag>
12</use>
13<upstream>
14 <remote-id type="github">company-mode/company-mode</remote-id>
15</upstream>
16</pkgmetadata>
diff --git a/app-emacs/parinfer/parinfer-9999.ebuild b/app-emacs/parinfer/parinfer-9999.ebuild
new file mode 100644
index 0000000..21b219b
--- /dev/null
+++ b/app-emacs/parinfer/parinfer-9999.ebuild
@@ -0,0 +1,25 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6inherit elisp git-r3
7
8DESCRIPTION="Simpler Lisp editing"
9HOMEPAGE="https://github.com/DogLooksGood/parinfer-mode"
10
11EGIT_REPO_URI="https://github.com/DogLooksGood/parinfer-mode"
12
13LICENSE="GPL-3+"
14SLOT="0"
15KEYWORDS="~amd64 ~x86"
16
17DOCS="README.md NEWS.md"
18
19pkg_postinst() {
20 elisp-site-regen
21}
22
23pkg_postrm() {
24 elisp-site-regen
25}
diff --git a/app-text/lowdown/Manifest b/app-text/lowdown/Manifest
new file mode 100644
index 0000000..6f88d4b
--- /dev/null
+++ b/app-text/lowdown/Manifest
@@ -0,0 +1 @@
DIST lowdown-0.4.1.tar.gz 113713 SHA256 f822ae765b95426b6285a55d4ff032f6dcab4486a3357ab74f3d0604334371a0 SHA512 cabd879c474831c4846cb99f947dbe3ee58b8baa984955ccc04d36dc7b39a9e9f97a488464c501c9aa0bdeb26984c6341b34f1c25ed20392f15ef015a6a2da0a WHIRLPOOL 6473ae9731981ab2be251512f7c3137332ee1e55ec9c8d2363e6b7cbfe94baf6344b0b796c9c92a9c0c37f4bd8bb5b39b0210f2fee3974647812317aa21d8a75
diff --git a/app-text/lowdown/lowdown-0.4.1.ebuild b/app-text/lowdown/lowdown-0.4.1.ebuild
new file mode 100644
index 0000000..9a1c88f
--- /dev/null
+++ b/app-text/lowdown/lowdown-0.4.1.ebuild
@@ -0,0 +1,32 @@
1# Copyright 2018 ng0 <ng0@n0.is>
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6inherit versionator toolchain-funcs
7MY_P="VERSION_"$(replace_all_version_separators "_")
8
9DESCRIPTION="simple markdown translator"
10
11HOMEPAGE="https://github.com/kristapsdz/lowdown"
12SRC_URI="https://github.com/kristapsdz/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz"
13S=${WORKDIR}/${PN}-${MY_P}
14LICENSE="ISC" # Actually OpenBSD.
15SLOT="0"
16KEYWORDS="~*"
17IUSE=""
18DEPEND="sci-libs/openlibm"
19RDEPEND=""
20
21src_prepare(){
22 eapply_user
23}
24
25src_configure(){
26 ./configure PREFIX="${EPREFIX}/usr" MANDIR="${EPREFIX}/usr/share/man"
27 touch "Makefile.configure"
28}
29
30src_compile(){
31 emake
32}
diff --git a/app-text/ssg3/files/ssg3 b/app-text/ssg3/files/ssg3
new file mode 100644
index 0000000..ed7d43d
--- /dev/null
+++ b/app-text/ssg3/files/ssg3
@@ -0,0 +1,261 @@
1#!/bin/sh
2#
3# https://www.romanzolotarev.com/bin/ssg3
4# Copyright 2018 Roman Zolotarev <hi@romanzolotarev.com>
5#
6# Permission to use, copy, modify, and/or distribute this software for any
7# purpose with or without fee is hereby granted, provided that the above
8# copyright notice and this permission notice appear in all copies.
9#
10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17#
18set -e
19
20main() {
21 test -n "$1" || usage
22 test -n "$2" || usage
23 test -n "$3" || usage
24 test -n "$4" || usage
25 test -d "$1" || no_dir "$1"
26 test -d "$2" || no_dir "$2"
27
28 src=$(readlink -f "$1")
29 dst=$(readlink -f "$2")
30
31
32 # files
33
34 title="$3"
35
36 head=$(
37 wrap_file "$src/_rss.html"
38 wrap_file "$src/_styles.css" '<style>' '</style>'
39 wrap_file "$src/_scripts.js" '<script>' '</script>'
40 )
41 header=$(wrap_file "$src/_header.html")
42 footer=$(wrap_file "$src/_footer.html")
43
44 list_dirs "$src" |
45 (cd "$src" && cpio -pdu "$dst")
46
47 fs=$(
48 if test -f "$dst/.files"
49 then list_affected_files "$src" "$dst/.files"
50 else list_files "$1"
51 fi
52 )
53
54 if test -n "$fs"
55 then
56 echo "$fs" | tee "$dst/.files"
57
58 if echo "$fs" | grep -q '\.md$'
59 then test -x "$(which lowdown)" || exit 3
60 fi
61 echo "$fs" | grep '\.md$' |
62 render_md_files "$src" "$dst" \
63 "$title" "$head" "$header" "$footer"
64
65 echo "$fs" | grep '\.html$' |
66 render_html_files "$src" "$dst" \
67 "$title" "$head" "$header" "$footer"
68
69 echo "$fs" | grep -Ev '\.md$|\.html$' |
70 (cd "$src" && cpio -pu "$dst")
71 fi
72
73 printf '[ssg] ' >&2
74 print_status 'file,' 'files,' "$fs" >&2
75
76
77 # sitemap
78
79 base_url="$4"
80 date=$(date +%Y-%m-%d)
81 urls=$(list_pages "$src")
82
83 if test -n "$urls"
84 then
85 echo "$urls" |
86 render_urls "$base_url" "$date" |
87 render_sitemap > "$dst/sitemap.xml"
88 fi
89
90 print_status 'url' 'urls' "$urls" >&2
91 echo >&2
92}
93
94
95wrap_file() {
96 if test -f "$1"
97 then echo "$2$(cat "$1")$3"
98 fi
99}
100
101
102print_status() {
103 if test -n "$3"
104 then echo "$3" | line_counter "$1" "$2"
105 else printf 'no %s ' "$2"
106 fi
107}
108
109
110line_counter() {
111 wc -l |
112 awk '{printf $1" "}($1=="1"){printf "'"$1"' "}($1>"1"){printf "'"$2"' "}'
113}
114
115
116usage() {
117 echo "usage: ${0##*/} src dst title base_url" >&2
118 exit 1
119}
120
121
122no_dir() {
123 echo "${0##*/}: $1: No such directory" >&2
124 exit 2
125}
126
127
128list_dirs() {
129 cd "$1" &&
130 find . -type d \
131 ! -name '.' ! -path '*/.*' ! -path '*/CVS/*' ! -path '*/_*'
132}
133
134
135list_files() {
136 cd "$1" &&
137 find . -type f \
138 ! -name '.' ! -path '*/.*' ! -path '*/CVS/*' ! -path '*/_*'
139}
140
141
142list_dependant_files () {
143 cd "$1" &&
144 find . -type f \
145 ! -name '.' ! -path '*/.*' ! -path '*/CVS/*' ! -path '*/_*' \
146 \( -name '*.html' -o -name '*.md' -o -name '*.css' -o -name '*.js' \)
147}
148
149
150list_newer_files() {
151 cd "$1" &&
152 find . -type f \
153 ! -name '.' ! -path '*/.*' ! -path '*/CVS/*' \
154 -newer "$2"
155}
156
157
158has_partials() {
159 grep -qE '^./_.*\.html$|^./_.*\.js$|^./_.*\.css$'
160}
161
162
163list_affected_files() {
164 fs=$(list_newer_files "$1" "$2")
165
166 if echo "$fs" | has_partials
167 then list_dependant_files "$1"
168 else echo "$fs"
169 fi
170}
171
172
173render_html_files() {
174 while read -r f
175 do render_html_file "$1" "$3" "$4" "$5" "$6" < "$1/$f" > "$2/$f"
176 done
177}
178
179
180render_md_files() {
181 while read -r f
182 do
183 lowdown \
184 -D html-skiphtml \
185 -D smarty \
186 -d metadata \
187 -d autolink < "$1/$f" |
188 render_html_file "$1" "$3" "$4" "$5" "$6" \
189 > "$2/${f%\.md}.html"
190 done
191}
192
193
194render_html_file() {
195 body=$(cat)
196 src="$1"
197 site_title="$2"
198 head="$3"
199 header="$4"
200 footer="$5"
201
202 echo "$body" | grep -iq '<html' &&
203 echo "$body" && return
204
205 title=$(echo "$body" | awk 'tolower($0)~/^<h1/{gsub(/<[^>]*>/,"",$0);print;exit}')
206 echo '<!DOCTYPE html>
207<html lang="en">
208<head>
209<meta charset="UTF-8">
210<meta name="generator" content="romanzolotarev.com/bin/ssg3">
211<meta name="viewport" content="width=device-width, initial-scale=1">
212<link rel="icon" type="image/png" href="/favicon.png">
213<title>'"$(test -n "$title" && echo "$title - ")$site_title"'</title>
214'"$head"'
215</head>
216<body>
217'"$header"'
218'"$body"'
219'"$footer"'
220</body>
221</html>'
222}
223
224list_pages() {
225 cd "$1" && find . -type f ! -path '*/.*' ! -path '*/_*' \
226 \( -name '*.html' -o -name '*.md' \) |
227 sed 's#^./##;s#.md$#.html#;s#/index.html$#/#'
228}
229
230
231render_urls() {
232 while read -r url
233 do render_url "$1/$url" "$2"
234 done
235}
236
237
238render_url() {
239 url="$1"
240 date="$2"
241 echo '<url>
242<loc>'"$url"'</loc>
243<lastmod>'"$date"'</lastmod>
244<priority>1.0</priority>
245</url>'
246}
247
248
249render_sitemap() {
250 echo '<?xml version="1.0" encoding="UTF-8"?>
251<urlset
252xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
253xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
254http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
255xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
256'"$(cat)"'
257</urlset>'
258}
259
260
261main "$@"
diff --git a/app-text/ssg3/ssg3-20181213.ebuild b/app-text/ssg3/ssg3-20181213.ebuild
new file mode 100644
index 0000000..3f8d6dc
--- /dev/null
+++ b/app-text/ssg3/ssg3-20181213.ebuild
@@ -0,0 +1,16 @@
1# Copyright 2018 ng0 <ng0@n0.is>
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=7
5
6DESCRIPTION="static site generation with sh, find, grep and lowdown"
7HOMEPAGE="https://www.romanzolotarev.com/ssg.html"
8LICENSE="ISC"
9SLOT="0"
10KEYWORDS="*"
11S="$WORKDIR"
12
13src_install() {
14 exeinto /usr/bin
15 doexe "${FILESDIR}"/ssg3
16}
diff --git a/dev-scheme/guile-git/Manifest b/dev-scheme/guile-git/Manifest
new file mode 100644
index 0000000..079c9d0
--- /dev/null
+++ b/dev-scheme/guile-git/Manifest
@@ -0,0 +1 @@
DIST guile-git-0.0.20171110.tar.gz 269708 BLAKE2B 89095fcf666fdb4810e44155829413c3878c783d66d7b60416b9535f57edf27719515c22d9e15e07dbfe0976613fb5ca323ea0559b5a0533f1818b87d248db87 SHA512 b542c6ac30f596599ffa05074be7f71407a062ea3b23e80153894d13220f7935711abf74060bb0cea5e9c46b12492ee78c6914d4a15227bd393b3a833edf4fe9
diff --git a/dev-scheme/guile-git/guile-git-0.0.20171110.ebuild b/dev-scheme/guile-git/guile-git-0.0.20171110.ebuild
new file mode 100644
index 0000000..ac4a2d6
--- /dev/null
+++ b/dev-scheme/guile-git/guile-git-0.0.20171110.ebuild
@@ -0,0 +1,20 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6DESCRIPTION="Guile bindings of git"
7HOMEPAGE="https://gitlab.com/guile-git/guile-git"
8SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.gz"
9
10LICENSE="LGPL-3+"
11SLOT="0"
12KEYWORDS="~amd64 ~x86"
13IUSE=""
14
15RDEPEND="
16 >=dev-scheme/guile-2.0.11:=
17 dev-scheme/bytestructures
18 dev-libs/libgit2:=
19"
20DEPEND="${RDEPEND}"
diff --git a/dev-scheme/guile-git/guile-git-0.1.ebuild b/dev-scheme/guile-git/guile-git-0.1.ebuild
new file mode 100644
index 0000000..cc0b838
--- /dev/null
+++ b/dev-scheme/guile-git/guile-git-0.1.ebuild
@@ -0,0 +1,22 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6inherit git-r3
7
8DESCRIPTION="Guile bindings of git"
9HOMEPAGE="https://gitlab.com/guile-git/guile-git"
10EGIT_REPO_URI="https://gitlab.com/guile-git/guile-git"
11
12LICENSE="GPL-3+"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17RDEPEND="
18 >=dev-scheme/guile-2.0.11:=
19 dev-scheme/bytestructures
20 dev-libs/libgit2:=
21"
22DEPEND="${RDEPEND}"
diff --git a/dev-scheme/guile-git/metadata.xml b/dev-scheme/guile-git/metadata.xml
new file mode 100644
index 0000000..2907abe
--- /dev/null
+++ b/dev-scheme/guile-git/metadata.xml
@@ -0,0 +1,7 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4<maintainer type="person">
5 <email>slyfox@gentoo.org</email>
6</maintainer>
7</pkgmetadata>
diff --git a/eclass/font-r1.eclass b/eclass/font-r1.eclass
new file mode 100644
index 0000000..c11f6b2
--- /dev/null
+++ b/eclass/font-r1.eclass
@@ -0,0 +1,230 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4# @ECLASS: font-r1.eclass
5# @MAINTAINER:
6# fonts@gentoo.org
7# @BLURB: Eclass to make font installation uniform
8
9[[ ${EAPI} -lt 6 ]] && inherit eutils
10
11EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
12
13# @ECLASS-VARIABLE: MY_FONT_TYPES
14# @DEFAULT_UNSET
15# @DESCRIPTION:
16# An array of font formats available for install.
17MY_FONT_TYPES=( ${MY_FONT_TYPES[@]:-} )
18MY_FONT_TYPES=( ${MY_FONT_TYPES[@]/#/font_types_} )
19MY_FONT_TYPES=( ${MY_FONT_TYPES[@]/font_types_+/+font_types_} )
20
21# @ECLASS-VARIABLE: MY_FONT_VARIANTS
22# @DEFAULT_UNSET
23# @DESCRIPTION:
24# An array of available font variants.
25MY_FONT_VARIANTS=( ${MY_FONT_VARIANTS[@]:-} )
26MY_FONT_VARIANTS=( ${MY_FONT_VARIANTS[@]/#/font_variants_} )
27MY_FONT_VARIANTS=( ${MY_FONT_VARIANTS[@]/font_variants_+/+font_variants_} )
28
29# @ECLASS-VARIABLE: MY_FONT_CHARS
30# @DEFAULT_UNSET
31# @DESCRIPTION:
32# An array of available character variations.
33MY_FONT_CHARS=( ${MY_FONT_CHARS[@]:-} )
34MY_FONT_CHARS=( ${MY_FONT_CHARS[@]/#/font_chars_} )
35MY_FONT_CHARS=( ${MY_FONT_CHARS[@]/font_chars_+/+font_chars_} )
36
37# @ECLASS-VARIABLE: FONT_SUFFIX
38# @DEFAULT_UNSET
39# @DESCRIPTION:
40# Space delimited list of font suffixes to install.
41FONT_SUFFIX=${FONT_SUFFIX:-}
42
43# @ECLASS-VARIABLE: FONT_S
44# @REQUIRED
45# @DESCRIPTION:
46# An array of directories containing the fonts, ${S} if unset.
47FONT_S=( ${FONT_S[@]:-.} )
48
49# @ECLASS-VARIABLE: FONT_PN
50# @DESCRIPTION:
51# Font name (ie. last part of FONTDIR).
52FONT_PN=${FONT_PN:-${PN}}
53
54# @ECLASS-VARIABLE: FONTDIR
55# @DESCRIPTION:
56# Full path to installation directory.
57FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}}
58
59# @ECLASS-VARIABLE: FONT_CONF
60# @DEFAULT_UNSET
61# @DESCRIPTION:
62# Array containing fontconfig conf files to install.
63FONT_CONF=( "" )
64
65# @ECLASS-VARIABLE: DOCS
66# @DEFAULT_UNSET
67# @DESCRIPTION:
68# Space delimited list of docs to install.
69# We always install these:
70# COPYRIGHT README{,.txt} NEWS AUTHORS BUGS ChangeLog FONTLOG.txt
71DOCS=${DOCS:-}
72
73IUSE="
74X
75${MY_FONT_TYPES[@]}
76${MY_FONT_VARIANTS[@]}
77${MY_FONT_CHARS[@]}
78"
79[[ ${#MY_FONT_TYPES[@]} -ge 1 ]] && REQUIRED_USE="|| ( ${MY_FONT_TYPES[@]/+} )"
80
81DEPEND="
82 X? (
83 x11-apps/mkfontdir
84 media-fonts/encodings
85 )
86 sys-apps/findutils
87"
88RDEPEND=""
89RESTRICT+=" strip binchecks"
90
91# @FUNCTION: font-r1_xfont_config
92# @DESCRIPTION:
93# Generate Xorg font files (mkfontscale/mkfontdir).
94font-r1_xfont_config() {
95 local dir_name
96 if has X ${IUSE//+} && use X ; then
97 dir_name="${1:-${FONT_PN}}"
98 ebegin "Creating fonts.scale & fonts.dir in ${dir_name##*/}"
99 rm -f "${ED}${FONTDIR}/${1//${S}/}"/{fonts.{dir,scale},encodings.dir}
100 mkfontscale "${ED}${FONTDIR}/${1//${S}/}"
101 mkfontdir \
102 -e ${EPREFIX}/usr/share/fonts/encodings \
103 -e ${EPREFIX}/usr/share/fonts/encodings/large \
104 "${ED}${FONTDIR}/${1//${S}/}"
105 eend $?
106 if [[ -e fonts.alias ]] ; then
107 doins fonts.alias
108 fi
109 fi
110}
111
112# @FUNCTION: font-r1_fontconfig
113# @DESCRIPTION:
114# Install fontconfig conf files given in FONT_CONF.
115font-r1_fontconfig() {
116 local conffile
117 if [[ -n ${FONT_CONF[@]} ]]; then
118 insinto /etc/fonts/conf.avail/
119 for conffile in "${FONT_CONF[@]}"; do
120 [[ -e ${conffile} ]] && doins ${conffile}
121 done
122 fi
123}
124
125# @FUNCTION: font-r1_pkg_setup
126# @DESCRIPTION:
127# The font pkg_setup function.
128# Collision protection and Prefix compat for eapi < 3.
129font-r1_pkg_setup() {
130 # Prefix compat
131 case ${EAPI:-0} in
132 0|1|2)
133 if ! use prefix; then
134 EPREFIX=
135 ED=${D}
136 EROOT=${ROOT}
137 [[ ${EROOT} = */ ]] || EROOT+="/"
138 fi
139 ;;
140 esac
141
142 # make sure we get no collisions
143 # setup is not the nicest place, but preinst doesn't cut it
144 [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
145
146 local _t
147 for _t in ${MY_FONT_TYPES[@]/*_}; do
148 use font_types_${_t} && FONT_SUFFIX+=" ${_t}"
149 done
150 FONT_SUFFIX=${FONT_SUFFIX:-ttf}
151}
152
153# @FUNCTION: font-r1_font_install
154# @DESCRIPTION:
155# The main font install function.
156font-r1_font_install() {
157 local _s
158
159 insinto "${FONTDIR}"
160
161 for _s in ${FONT_SUFFIX}; do
162 find "${FONT_S[@]}" -mindepth 1 -maxdepth 1 -! -size 0 -type f \
163 -ipath "*.${_s}" -exec doins {} + 2>/dev/null
164
165 find "${ED}${FONTDIR}" -mindepth 1 -maxdepth 1 -! -size 0 -type f \
166 -ipath "*.${_s}" -exec false {} + && die \
167 "No ${_s} fonts were installed in ${FONTDIR}"
168 done
169}
170
171# @FUNCTION: font-r1_src_install
172# @DESCRIPTION:
173# The font src_install function.
174font-r1_src_install() {
175 font-r1_font_install
176 font-r1_xfont_config
177 font-r1_fontconfig
178
179 [[ "$(declare -p DOCS)" =~ "declare -a" ]] || DOCS=( ${DOCS} )
180 [[ -n ${DOCS} ]] && { dodoc "${DOCS[@]}" || die "docs installation failed" ; }
181
182 # install common docs
183 local commondoc
184 for commondoc in \
185 COPYRIGHT README{,.txt,.md} HISTORY NEWS AUTHORS{,.txt} BUGS TODO \
186 ChangeLog F{ont,ONT}L{og,OG}.txt CONTRIBUTORS{,.txt} relnotes.txt
187 do [[ -s ${commondoc} ]] && dodoc ${commondoc}
188 done
189}
190
191# @FUNCTION: font-r1_pkg_postinst
192# @DESCRIPTION:
193# The font pkg_postinst function.
194font-r1_pkg_postinst() {
195 if [[ -n ${FONT_CONF[@]} ]]; then
196 local conffile
197 echo
198 elog "The following fontconfig configuration files have been installed:"
199 elog
200 for conffile in "${FONT_CONF[@]}"; do
201 if [[ -e ${EROOT}etc/fonts/conf.avail/$(basename ${conffile}) ]]; then
202 elog " $(basename ${conffile})"
203 fi
204 done
205 elog
206 elog "Use \`eselect fontconfig\` to enable/disable them."
207 echo
208 fi
209
210 if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
211 ebegin "Updating fontconfig cache for ${FONT_PN}"
212 fc-cache -s "${EROOT}"usr/share/fonts/${FONT_PN}
213 eend $?
214 else
215 einfo "Skipping cache update (media-libs/fontconfig is not installed or ROOT != /)"
216 fi
217}
218
219# @FUNCTION: font-r1_pkg_postrm
220# @DESCRIPTION:
221# The font pkg_postrm function.
222font-r1_pkg_postrm() {
223 if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
224 ebegin "Updating fontconfig cache for ${FONT_PN}"
225 fc-cache -s "${EROOT}"usr/share/fonts/${FONT_PN}
226 eend $?
227 else
228 einfo "Skipping cache update (media-libs/fontconfig is not installed or ROOT != /)"
229 fi
230}
diff --git a/eclass/fontmake.eclass b/eclass/fontmake.eclass
new file mode 100644
index 0000000..4a7c94a
--- /dev/null
+++ b/eclass/fontmake.eclass
@@ -0,0 +1,97 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4# @ECLASS: fontmake.eclass
5# @MAINTAINER:
6# 4nykey@gmail.com
7# @BLURB: An eclass to build fonts from sources using dev-util/fontmake
8
9# @VARIABLE: FONT_SRCDIR
10# @DESCRIPTION:
11# The path of a directory containing the sources, relative to ${S}.
12# 'sources' if unset
13FONT_SRCDIR=${FONT_SRCDIR:-sources}
14
15# @VARIABLE: FONTMAKE_EXTRA_ARGS
16# @DEFAULT_UNSET
17# @DESCRIPTION:
18# An array containing additional arguments for fontmake.
19
20# @VARIABLE: EMAKE_EXTRA_ARGS
21# @DEFAULT_UNSET
22# @DESCRIPTION:
23# An array containing additional arguments for emake.
24
25# @VARIABLE: FONTDIR_BIN
26# @DESCRIPTION:
27# An array containing paths relative to ${S}, where to search for prebuilt
28# fonts. By default: 'fonts fonts/otf fonts/ttf'
29FONTDIR_BIN=( ${FONTDIR_BIN[@]:-fonts fonts/otf fonts/ttf} )
30
31PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
32IUSE="autohint +binary"
33MY_FONT_TYPES=( ${MY_FONT_TYPES[@]:-otf +ttf} )
34
35inherit python-any-r1 font-r1
36
37EXPORT_FUNCTIONS pkg_setup src_prepare src_compile
38
39MY_MK="9ef5512cdd3177cc8d4667bcf5a58346-7f9cf67"
40SRC_URI+="
41!binary? (
42 mirror://githubcl/gist/${MY_MK%-*}/tar.gz/${MY_MK#*-}
43 -> ${MY_MK}.tar.gz
44)
45"
46RESTRICT="primaryuri"
47
48DEPEND="
49!binary? (
50 ${PYTHON_DEPS}
51 $(python_gen_any_dep '
52 dev-util/fontmake[${PYTHON_USEDEP}]
53 ')
54 autohint? ( media-gfx/ttfautohint )
55)
56"
57
58fontmake_pkg_setup() {
59 if use binary; then
60 local _d
61 FONT_S=( "${FONTDIR_BIN[@]}" )
62 PATCHES=( )
63 else
64 FONT_S=( master_{o,t}tf autohinted/master_ttf )
65 python-any-r1_pkg_setup
66 fi
67 font-r1_pkg_setup
68}
69
70fontmake_src_prepare() {
71 default
72 use binary && return
73 unpack ${MY_MK}.tar.gz
74 local _g
75 find "${FONT_SRCDIR}" -name '* *.glyphs' -o -name '* *.designspace'| \
76 while read _g; do mv "${_g}" "${_g// }"; done
77}
78
79fontmake_src_compile() {
80 use binary && return
81
82 local myemakeargs=(
83 --no-builtin-rules
84 -f ${MY_MK}/Makefile
85 SRCDIR="${FONT_SRCDIR}"
86 "${EMAKE_EXTRA_ARGS[@]}"
87 $(in_iuse interpolate && usex interpolate '' 'INTERPOLATE=')
88 $(in_iuse clean-as-you-go && usex clean-as-you-go 'CLEAN=clean' '')
89 )
90 use autohint && FONTMAKE_EXTRA_ARGS+=( --autohint )
91 [[ "${#FONTMAKE_EXTRA_ARGS[@]}" -ge 1 ]] && \
92 myemakeargs+=(
93 FONTMAKE="fontmake ${FONTMAKE_EXTRA_ARGS[@]}"
94 )
95
96 emake "${myemakeargs[@]}" ${FONT_SUFFIX}
97}
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index e3e6717..a1ad0d2 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,44 +1,36 @@
1# Copyright 1999-2015 Gentoo Authors 1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Id$
4 3
5# @ECLASS: git-r3.eclass 4# @ECLASS: git-r3.eclass
6# @MAINTAINER: 5# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 6# Michał Górny <mgorny@gentoo.org>
7# @SUPPORTED_EAPIS: 4 5 6 7
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
9# @DESCRIPTION: 9# @DESCRIPTION:
10# Third generation eclass for easing maintenance of live ebuilds using 10# Third generation eclass for easing maintenance of live ebuilds using
11# git as remote repository. 11# git as remote repository.
12#
13# Patched by symlynX to allow for gits via Tor. Why Tor? Because
14# unlike HTTPS it provides end-to-end authenticity which is not
15# susceptible to man-in-the-middle attacks, so all gits should
16# migrate to Tor, cjdns or gnunet-vpn. But the latter two do
17# not need custom changes to this file to do their job.
18#
19# @FIXME: Should we automatically define EGIT_SOCKS="torsocks"
20# when we see that /etc/tor/torsocks.conf exists?
21 12
22case "${EAPI:-0}" in 13case "${EAPI:-0}" in
23 0|1|2|3|4|5|6) 14 0|1|2|3)
15 die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}"
16 ;;
17 4|5|6|7)
24 ;; 18 ;;
25 *) 19 *)
26 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" 20 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
27 ;; 21 ;;
28esac 22esac
29 23
30if [[ ! ${_GIT_R3} ]]; then
31
32inherit eutils
33
34fi
35
36EXPORT_FUNCTIONS src_unpack 24EXPORT_FUNCTIONS src_unpack
37 25
38if [[ ! ${_GIT_R3} ]]; then 26if [[ ! ${_GIT_R3} ]]; then
39 27
40if [[ ! ${_INHERITED_BY_GIT_2} ]]; then 28if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
41 DEPEND=">=dev-vcs/git-1.8.2.1" 29 if [[ ${EAPI:-0} != [0123456] ]]; then
30 BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
31 else
32 DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
33 fi
42fi 34fi
43 35
44# @ECLASS-VARIABLE: EGIT_CLONE_TYPE 36# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
@@ -121,18 +113,20 @@ fi
121# @ECLASS-VARIABLE: EGIT_REPO_URI 113# @ECLASS-VARIABLE: EGIT_REPO_URI
122# @REQUIRED 114# @REQUIRED
123# @DESCRIPTION: 115# @DESCRIPTION:
124# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs 116# URIs to the repository, e.g. https://foo. If multiple URIs are
125# are provided, the eclass will consider them as fallback URIs to try 117# provided, the eclass will consider the remaining URIs as fallbacks
126# if the first URI does not work. For supported URI syntaxes, read up 118# to try if the first URI does not work. For supported URI syntaxes,
127# the manpage for git-clone(1). 119# read the manpage for git-clone(1).
128# 120#
129# It can be overriden via env using ${PN}_LIVE_REPO variable. 121# URIs should be using https:// whenever possible. http:// and git://
122# URIs are completely unsecured and their use (even if only as
123# a fallback) renders the ebuild completely vulnerable to MITM attacks.
130# 124#
131# Can be a whitespace-separated list or an array. 125# Can be a whitespace-separated list or an array.
132# 126#
133# Example: 127# Example:
134# @CODE 128# @CODE
135# EGIT_REPO_URI="git://a/b.git https://c/d.git" 129# EGIT_REPO_URI="https://a/b.git https://c/d.git"
136# @CODE 130# @CODE
137 131
138# @ECLASS-VARIABLE: EVCS_OFFLINE 132# @ECLASS-VARIABLE: EVCS_OFFLINE
@@ -156,17 +150,28 @@ fi
156# @DESCRIPTION: 150# @DESCRIPTION:
157# The branch name to check out. If unset, the upstream default (HEAD) 151# The branch name to check out. If unset, the upstream default (HEAD)
158# will be used. 152# will be used.
159#
160# It can be overriden via env using ${PN}_LIVE_BRANCH variable.
161 153
162# @ECLASS-VARIABLE: EGIT_COMMIT 154# @ECLASS-VARIABLE: EGIT_COMMIT
163# @DEFAULT_UNSET 155# @DEFAULT_UNSET
164# @DESCRIPTION: 156# @DESCRIPTION:
165# The tag name or commit identifier to check out. If unset, newest 157# The tag name or commit identifier to check out. If unset, newest
166# commit from the branch will be used. If set, EGIT_BRANCH will 158# commit from the branch will be used. Note that if set to a commit
167# be ignored. 159# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
160# the commit is available.
161
162# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
163# @DEFAULT_UNSET
164# @DESCRIPTION:
165# Attempt to check out the repository state for the specified timestamp.
166# The date should be in format understood by 'git rev-list'. The commits
167# on EGIT_BRANCH will be considered.
168# 168#
169# It can be overriden via env using ${PN}_LIVE_COMMIT variable. 169# The eclass will select the last commit with commit date preceding
170# the specified date. When merge commits are found, only first parents
171# will be considered in order to avoid switching into external branches
172# (assuming that merges are done correctly). In other words, each merge
173# will be considered alike a single commit with date corresponding
174# to the merge commit date.
170 175
171# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR 176# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
172# @DESCRIPTION: 177# @DESCRIPTION:
@@ -174,6 +179,32 @@ fi
174# 179#
175# EGIT_CHECKOUT_DIR=${WORKDIR}/${P} 180# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
176 181
182# @ECLASS-VARIABLE: EGIT_SUBMODULES
183# @DEFAULT_UNSET
184# @DESCRIPTION:
185# An array of inclusive and exclusive wildcards on submodule names,
186# stating which submodules are fetched and checked out. Exclusions
187# start with '-', and exclude previously matched submodules.
188#
189# If unset, all submodules are enabled. Empty list disables all
190# submodules. In order to use an exclude-only list, start the array
191# with '*'.
192#
193# Remember that wildcards need to be quoted in order to prevent filename
194# expansion.
195#
196# Examples:
197# @CODE
198# # Disable all submodules
199# EGIT_SUBMODULES=()
200#
201# # Include only foo and bar
202# EGIT_SUBMODULES=( foo bar )
203#
204# # Use all submodules except for test-* but include test-lib
205# EGIT_SUBMODULES=( '*' '-test-*' test-lib )
206# @CODE
207
177# @FUNCTION: _git-r3_env_setup 208# @FUNCTION: _git-r3_env_setup
178# @INTERNAL 209# @INTERNAL
179# @DESCRIPTION: 210# @DESCRIPTION:
@@ -214,24 +245,40 @@ _git-r3_env_setup() {
214 die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}" 245 die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
215 esac 246 esac
216 247
248 if [[ ${EGIT_SUBMODULES[@]+1} && $(declare -p EGIT_SUBMODULES) != "declare -a"* ]]
249 then
250 die 'EGIT_SUBMODULES must be an array.'
251 fi
252
217 local esc_pn livevar 253 local esc_pn livevar
218 esc_pn=${PN//[-+]/_} 254 esc_pn=${PN//[-+]/_}
255 [[ ${esc_pn} == [0-9]* ]] && esc_pn=_${esc_pn}
219 256
257 # note: deprecated, use EGIT_OVERRIDE_* instead
220 livevar=${esc_pn}_LIVE_REPO 258 livevar=${esc_pn}_LIVE_REPO
221 EGIT_REPO_URI=${!livevar:-${EGIT_REPO_URI}} 259 EGIT_REPO_URI=${!livevar-${EGIT_REPO_URI}}
222 [[ ${!livevar} ]] \ 260 [[ ${!livevar} ]] \
223 && ewarn "Using ${livevar}, no support will be provided" 261 && ewarn "Using ${livevar}, no support will be provided"
224 262
225 livevar=${esc_pn}_LIVE_BRANCH 263 livevar=${esc_pn}_LIVE_BRANCH
226 EGIT_BRANCH=${!livevar:-${EGIT_BRANCH}} 264 EGIT_BRANCH=${!livevar-${EGIT_BRANCH}}
227 [[ ${!livevar} ]] \ 265 [[ ${!livevar} ]] \
228 && ewarn "Using ${livevar}, no support will be provided" 266 && ewarn "Using ${livevar}, no support will be provided"
229 267
230 livevar=${esc_pn}_LIVE_COMMIT 268 livevar=${esc_pn}_LIVE_COMMIT
231 EGIT_COMMIT=${!livevar:-${EGIT_COMMIT}} 269 EGIT_COMMIT=${!livevar-${EGIT_COMMIT}}
232 [[ ${!livevar} ]] \ 270 [[ ${!livevar} ]] \
233 && ewarn "Using ${livevar}, no support will be provided" 271 && ewarn "Using ${livevar}, no support will be provided"
234 272
273 livevar=${esc_pn}_LIVE_COMMIT_DATE
274 EGIT_COMMIT_DATE=${!livevar-${EGIT_COMMIT_DATE}}
275 [[ ${!livevar} ]] \
276 && ewarn "Using ${livevar}, no support will be provided"
277
278 if [[ ${EGIT_COMMIT} && ${EGIT_COMMIT_DATE} ]]; then
279 die "EGIT_COMMIT and EGIT_COMMIT_DATE can not be specified simultaneously"
280 fi
281
235 # Migration helpers. Remove them when git-2 is removed. 282 # Migration helpers. Remove them when git-2 is removed.
236 283
237 if [[ ${EGIT_SOURCEDIR} ]]; then 284 if [[ ${EGIT_SOURCEDIR} ]]; then
@@ -252,7 +299,8 @@ _git-r3_env_setup() {
252 if [[ ${EGIT_HAS_SUBMODULES} ]]; then 299 if [[ ${EGIT_HAS_SUBMODULES} ]]; then
253 eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs" 300 eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
254 eerror "to switch the clone type in order to support submodules and therefore" 301 eerror "to switch the clone type in order to support submodules and therefore"
255 eerror "submodules are detected and fetched automatically." 302 eerror "submodules are detected and fetched automatically. If you need to"
303 eerror "disable or filter submodules, see EGIT_SUBMODULES."
256 die "EGIT_HAS_SUBMODULES is no longer necessary." 304 die "EGIT_HAS_SUBMODULES is no longer necessary."
257 fi 305 fi
258 306
@@ -305,7 +353,7 @@ _git-r3_set_gitdir() {
305 git/*) repo_name=${repo_name#git/};; 353 git/*) repo_name=${repo_name#git/};;
306 # gentoo.org 354 # gentoo.org
307 gitroot/*) repo_name=${repo_name#gitroot/};; 355 gitroot/*) repo_name=${repo_name#gitroot/};;
308 # google code, sourceforge 356 # sourceforge
309 p/*) repo_name=${repo_name#p/};; 357 p/*) repo_name=${repo_name#p/};;
310 # kernel.org 358 # kernel.org
311 pub/scm/*) repo_name=${repo_name#pub/scm/};; 359 pub/scm/*) repo_name=${repo_name#pub/scm/};;
@@ -320,7 +368,7 @@ _git-r3_set_gitdir() {
320 368
321 GIT_DIR=${EGIT3_STORE_DIR}/${repo_name} 369 GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
322 370
323 if [[ ! -d ${EGIT3_STORE_DIR} ]]; then 371 if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then
324 ( 372 (
325 addwrite / 373 addwrite /
326 mkdir -p "${EGIT3_STORE_DIR}" 374 mkdir -p "${EGIT3_STORE_DIR}"
@@ -329,6 +377,14 @@ _git-r3_set_gitdir() {
329 377
330 addwrite "${EGIT3_STORE_DIR}" 378 addwrite "${EGIT3_STORE_DIR}"
331 if [[ ! -d ${GIT_DIR} ]]; then 379 if [[ ! -d ${GIT_DIR} ]]; then
380 if [[ ${EVCS_OFFLINE} ]]; then
381 eerror "A clone of the following repository is required to proceed:"
382 eerror " ${1}"
383 eerror "However, networking activity has been disabled using EVCS_OFFLINE and there"
384 eerror "is no local clone available."
385 die "No local clone of ${1}. Unable to proceed with EVCS_OFFLINE."
386 fi
387
332 local saved_umask 388 local saved_umask
333 if [[ ${EVCS_UMASK} ]]; then 389 if [[ ${EVCS_UMASK} ]]; then
334 saved_umask=$(umask) 390 saved_umask=$(umask)
@@ -366,15 +422,36 @@ _git-r3_set_submodules() {
366 l=${l#submodule.} 422 l=${l#submodule.}
367 local subname=${l%%.url=*} 423 local subname=${l%%.url=*}
368 424
425 # filter out on EGIT_SUBMODULES
426 if declare -p EGIT_SUBMODULES &>/dev/null; then
427 local p l_res res=
428 for p in "${EGIT_SUBMODULES[@]}"; do
429 if [[ ${p} == -* ]]; then
430 p=${p#-}
431 l_res=
432 else
433 l_res=1
434 fi
435
436 [[ ${subname} == ${p} ]] && res=${l_res}
437 done
438
439 if [[ ! ${res} ]]; then
440 einfo "Skipping submodule \e[1m${subname}\e[22m"
441 continue
442 fi
443 fi
444
369 # skip modules that have 'update = none', bug #487262. 445 # skip modules that have 'update = none', bug #487262.
370 local upd=$(echo "${data}" | git config -f /dev/fd/0 \ 446 local upd=$(echo "${data}" | git config -f /dev/fd/0 \
371 submodule."${subname}".update) 447 submodule."${subname}".update)
372 [[ ${upd} == none ]] && continue 448 [[ ${upd} == none ]] && continue
373 449
374 # https://github.com/git/git/blob/master/refs.c#L39 450 # https://github.com/git/git/blob/master/refs.c#L31
375 # for now, we just filter /. because of #572312 451 # we are more restrictive than git itself but that should not
376 local enc_subname=${subname//\/.//_} 452 # cause any issues, #572312, #606950
377 [[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.} 453 # TODO: check escaped names for collisions
454 local enc_subname=${subname//[^a-zA-Z0-9-]/_}
378 455
379 submodules+=( 456 submodules+=(
380 "${enc_subname}" 457 "${enc_subname}"
@@ -443,44 +520,8 @@ _git-r3_is_local_repo() {
443 [[ ${uri} == file://* || ${uri} == /* ]] 520 [[ ${uri} == file://* || ${uri} == /* ]]
444} 521}
445 522
446# @FUNCTION: _git-r3_find_head
447# @USAGE: <head-ref>
448# @INTERNAL
449# @DESCRIPTION:
450# Given a ref to which remote HEAD was fetched, try to find
451# a branch matching the commit. Expects 'git show-ref'
452# or 'git ls-remote' output on stdin.
453_git-r3_find_head() {
454 debug-print-function ${FUNCNAME} "$@"
455
456 local head_ref=${1}
457 local head_hash=$(git rev-parse --verify "${1}" || die)
458 local matching_ref
459
460 # TODO: some transports support peeking at symbolic remote refs
461 # find a way to use that rather than guessing
462
463 # (based on guess_remote_head() in git-1.9.0/remote.c)
464 local h ref
465 while read h ref; do
466 # look for matching head
467 if [[ ${h} == ${head_hash} ]]; then
468 # either take the first matching ref, or master if it is there
469 if [[ ! ${matching_ref} || ${ref} == refs/heads/master ]]; then
470 matching_ref=${ref}
471 fi
472 fi
473 done
474
475 if [[ ! ${matching_ref} ]]; then
476 die "Unable to find a matching branch for remote HEAD (${head_hash})"
477 fi
478
479 echo "${matching_ref}"
480}
481
482# @FUNCTION: git-r3_fetch 523# @FUNCTION: git-r3_fetch
483# @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]] 524# @USAGE: [<repo-uri> [<remote-ref> [<local-id> [<commit-date>]]]]
484# @DESCRIPTION: 525# @DESCRIPTION:
485# Fetch new commits to the local clone of repository. 526# Fetch new commits to the local clone of repository.
486# 527#
@@ -503,6 +544,9 @@ _git-r3_find_head() {
503# This default should be fine unless you are fetching multiple trees 544# This default should be fine unless you are fetching multiple trees
504# from the same repository in the same ebuild. 545# from the same repository in the same ebuild.
505# 546#
547# <commit-id> requests attempting to use repository state as of specific
548# date. For more details, see EGIT_COMMIT_DATE.
549#
506# The fetch operation will affect the EGIT_STORE only. It will not touch 550# The fetch operation will affect the EGIT_STORE only. It will not touch
507# the working copy, nor export any environment variables. 551# the working copy, nor export any environment variables.
508# If the repository contains submodules, they will be fetched 552# If the repository contains submodules, they will be fetched
@@ -510,8 +554,7 @@ _git-r3_find_head() {
510git-r3_fetch() { 554git-r3_fetch() {
511 debug-print-function ${FUNCNAME} "$@" 555 debug-print-function ${FUNCNAME} "$@"
512 556
513 [[ ${EVCS_OFFLINE} ]] && return 557 # process repos first since we create repo_name from it
514
515 local repos 558 local repos
516 if [[ ${1} ]]; then 559 if [[ ${1} ]]; then
517 repos=( ${1} ) 560 repos=( ${1} )
@@ -521,16 +564,23 @@ git-r3_fetch() {
521 repos=( ${EGIT_REPO_URI} ) 564 repos=( ${EGIT_REPO_URI} )
522 fi 565 fi
523 566
524 local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
525 local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
526 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
527 local local_ref=refs/git-r3/${local_id}/__main__
528
529 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset" 567 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
530 568
569 local r
570 for r in "${repos[@]}"; do
571 if [[ ${r} == git:* || ${r} == http:* ]]; then
572 ewarn "git-r3: ${r%%:*} protocol is completely unsecure and may render the ebuild"
573 ewarn "easily susceptible to MITM attacks (even if used only as fallback). Please"
574 ewarn "use https instead."
575 ewarn "[URI: ${r}]"
576 fi
577 done
578
531 local -x GIT_DIR 579 local -x GIT_DIR
532 _git-r3_set_gitdir "${repos[0]}" 580 _git-r3_set_gitdir "${repos[0]}"
533 581
582 einfo "Repository id: ${GIT_DIR##*/}"
583
534 # prepend the local mirror if applicable 584 # prepend the local mirror if applicable
535 if [[ ${EGIT_MIRROR_URI} ]]; then 585 if [[ ${EGIT_MIRROR_URI} ]]; then
536 repos=( 586 repos=(
@@ -539,163 +589,188 @@ git-r3_fetch() {
539 ) 589 )
540 fi 590 fi
541 591
592 # get the default values for the common variables and override them
593 local branch_name=${EGIT_BRANCH}
594 local commit_id=${2:-${EGIT_COMMIT}}
595 local commit_date=${4:-${EGIT_COMMIT_DATE}}
596
597 # support new override API for EAPI 6+
598 if ! has "${EAPI:-0}" 0 1 2 3 4 5; then
599 # get the name and do some more processing:
600 # 1) kill .git suffix,
601 # 2) underscore (remaining) non-variable characters,
602 # 3) add preceding underscore if it starts with a digit,
603 # 4) uppercase.
604 local override_name=${GIT_DIR##*/}
605 override_name=${override_name%.git}
606 override_name=${override_name//[^a-zA-Z0-9_]/_}
607 override_name=${override_name^^}
608
609 local varmap=(
610 REPO:repos
611 BRANCH:branch_name
612 COMMIT:commit_id
613 COMMIT_DATE:commit_date
614 )
615
616 local localvar livevar live_warn= override_vars=()
617 for localvar in "${varmap[@]}"; do
618 livevar=EGIT_OVERRIDE_${localvar%:*}_${override_name}
619 localvar=${localvar#*:}
620 override_vars+=( "${livevar}" )
621
622 if [[ -n ${!livevar} ]]; then
623 [[ ${localvar} == repos ]] && repos=()
624 live_warn=1
625 ewarn "Using ${livevar}=${!livevar}"
626 declare "${localvar}=${!livevar}"
627 fi
628 done
629
630 if [[ ${live_warn} ]]; then
631 ewarn "No support will be provided."
632 else
633 einfo "To override fetched repository properties, use:"
634 local x
635 for x in "${override_vars[@]}"; do
636 einfo " ${x}"
637 done
638 einfo
639 fi
640 fi
641
642 # set final variables after applying overrides
643 local branch=${branch_name:+refs/heads/${branch_name}}
644 local remote_ref=${commit_id:-${branch:-HEAD}}
645 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
646 local local_ref=refs/git-r3/${local_id}/__main__
647
542 # try to fetch from the remote 648 # try to fetch from the remote
543 local r success saved_umask 649 local success saved_umask
544 if [[ ${EVCS_UMASK} ]]; then 650 if [[ ${EVCS_UMASK} ]]; then
545 saved_umask=$(umask) 651 saved_umask=$(umask)
546 umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}" 652 umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
547 fi 653 fi
548 for r in "${repos[@]}"; do 654 for r in "${repos[@]}"; do
549 einfo "Fetching \e[1m${r}\e[22m ..." 655 if [[ ! ${EVCS_OFFLINE} ]]; then
550 656 einfo "Fetching \e[1m${r}\e[22m ..."
551 if [[ ${r} == https?://* ]]; then
552 # if we're not using git protocol, web proxy takes care of things
553 EGIT_SOCKS = ""
554 elif [[ ! ${EGIT_SOCKS} ]] && [[ ${r} == git://*.onion/* ]]; then
555 if ROOT=/ has_version 'net-proxy/torsocks'; then
556 EGIT_SOCKS="torsocks"
557 else
558 die "Properly configured net-proxy/torsocks required to fetch git from onion."
559 fi
560 fi
561
562 local fetch_command=( ${EGIT_SOCKS} git fetch "${r}" )
563 local clone_type=${EGIT_CLONE_TYPE}
564 657
565 if [[ ${r} == https://* ]] && ! ROOT=/ has_version 'dev-vcs/git[curl]'; then 658 local fetch_command=( git fetch "${r}" )
566 eerror "git-r3: fetching from https:// requested. In order to support https," 659 local clone_type=${EGIT_CLONE_TYPE}
567 eerror "dev-vcs/git needs to be built with USE=curl. Example solution:"
568 eerror
569 eerror " echo dev-vcs/git curl >> /etc/portage/package.use"
570 eerror " emerge -1v dev-vcs/git"
571 die "dev-vcs/git built with USE=curl required."
572 fi
573 660
574 if [[ ${r} == https://code.google.com/* ]]; then 661 if [[ ${clone_type} == mirror ]]; then
575 # Google Code has special magic on top of git that: 662 fetch_command+=(
576 # 1) can't handle shallow clones at all, 663 --prune
577 # 2) fetches duplicately when tags are pulled in with branch 664 # mirror the remote branches as local branches
578 # so automatically switch to single+tags mode. 665 "+refs/heads/*:refs/heads/*"
579 if [[ ${clone_type} == shallow ]]; then 666 # pull tags explicitly in order to prune them properly
580 einfo " Google Code does not support shallow clones" 667 "+refs/tags/*:refs/tags/*"
581 einfo " using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m" 668 # notes in case something needs them
582 clone_type=single+tags 669 "+refs/notes/*:refs/notes/*"
583 elif [[ ${clone_type} == single ]]; then 670 # and HEAD in case we need the default branch
584 einfo " git-r3: Google Code does not send tags properly in 'single' mode" 671 # (we keep it in refs/git-r3 since otherwise --prune interferes)
585 einfo " using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m" 672 "+HEAD:refs/git-r3/HEAD"
586 clone_type=single+tags 673 )
587 fi 674 else # single or shallow
588 fi 675 local fetch_l fetch_r
589 676
590 if [[ ${clone_type} == mirror ]]; then 677 if [[ ${remote_ref} == HEAD ]]; then
591 fetch_command+=( 678 # HEAD
592 --prune 679 fetch_l=HEAD
593 # mirror the remote branches as local branches 680 elif [[ ${remote_ref} == refs/* ]]; then
594 "+refs/heads/*:refs/heads/*" 681 # regular branch, tag or some other explicit ref
595 # pull tags explicitly in order to prune them properly 682 fetch_l=${remote_ref}
596 "+refs/tags/*:refs/tags/*"
597 # notes in case something needs them
598 "+refs/notes/*:refs/notes/*"
599 # and HEAD in case we need the default branch
600 # (we keep it in refs/git-r3 since otherwise --prune interferes)
601 "+HEAD:refs/git-r3/HEAD"
602 )
603 else # single or shallow
604 local fetch_l fetch_r
605
606 if [[ ${remote_ref} == HEAD ]]; then
607 # HEAD
608 fetch_l=HEAD
609 elif [[ ${remote_ref} == refs/* ]]; then
610 # regular branch, tag or some other explicit ref
611 fetch_l=${remote_ref}
612 else
613 # tag or commit id...
614 # let ls-remote figure it out
615 local tagref=$(${EGIT_SOCKS} git ls-remote "${r}" "refs/tags/${remote_ref}")
616
617 # if it was a tag, ls-remote obtained a hash
618 if [[ ${tagref} ]]; then
619 # tag
620 fetch_l=refs/tags/${remote_ref}
621 else 683 else
622 # commit id 684 # tag or commit id...
623 # so we need to fetch the whole branch 685 # let ls-remote figure it out
624 if [[ ${branch} ]]; then 686 local tagref=$(git ls-remote "${r}" "refs/tags/${remote_ref}")
625 fetch_l=${branch} 687
688 # if it was a tag, ls-remote obtained a hash
689 if [[ ${tagref} ]]; then
690 # tag
691 fetch_l=refs/tags/${remote_ref}
626 else 692 else
627 fetch_l=HEAD 693 # commit id
628 fi 694 # so we need to fetch the whole branch
629 695 if [[ ${branch} ]]; then
630 # fetching by commit in shallow mode? can't do. 696 fetch_l=${branch}
631 if [[ ${clone_type} == shallow ]]; then 697 else
632 clone_type=single 698 fetch_l=HEAD
699 fi
700
701 # fetching by commit in shallow mode? can't do.
702 if [[ ${clone_type} == shallow ]]; then
703 clone_type=single
704 fi
633 fi 705 fi
634 fi 706 fi
635 fi
636 707
637 if [[ ${fetch_l} == HEAD ]]; then 708 # checkout by date does not make sense in shallow mode
638 fetch_r=refs/git-r3/HEAD 709 if [[ ${commit_date} && ${clone_type} == shallow ]]; then
639 else 710 clone_type=single
640 fetch_r=${fetch_l} 711 fi
641 fi
642 712
643 fetch_command+=( 713 if [[ ${fetch_l} == HEAD ]]; then
644 "+${fetch_l}:${fetch_r}" 714 fetch_r=refs/git-r3/HEAD
645 ) 715 else
716 fetch_r=${fetch_l}
717 fi
646 718
647 if [[ ${clone_type} == single+tags ]]; then
648 fetch_command+=( 719 fetch_command+=(
649 # pull tags explicitly as requested 720 "+${fetch_l}:${fetch_r}"
650 "+refs/tags/*:refs/tags/*"
651 ) 721 )
652 fi
653 fi
654 722
655 if [[ ${clone_type} == shallow ]]; then 723 if [[ ${clone_type} == single+tags ]]; then
656 if _git-r3_is_local_repo; then 724 fetch_command+=(
657 # '--depth 1' causes sandbox violations with local repos 725 # pull tags explicitly as requested
658 # bug #491260 726 "+refs/tags/*:refs/tags/*"
659 clone_type=single 727 )
660 elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]] 728 fi
661 then
662 # use '--depth 1' when fetching a new branch
663 fetch_command+=( --depth 1 )
664 fi 729 fi
665 else # non-shallow mode 730
666 if [[ -f ${GIT_DIR}/shallow ]]; then 731 if [[ ${clone_type} == shallow ]]; then
667 fetch_command+=( --unshallow ) 732 if _git-r3_is_local_repo; then
733 # '--depth 1' causes sandbox violations with local repos
734 # bug #491260
735 clone_type=single
736 elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
737 then
738 # use '--depth 1' when fetching a new branch
739 fetch_command+=( --depth 1 )
740 fi
741 else # non-shallow mode
742 if [[ -f ${GIT_DIR}/shallow ]]; then
743 fetch_command+=( --unshallow )
744 fi
668 fi 745 fi
669 fi
670 746
671 set -- "${fetch_command[@]}" 747 set -- "${fetch_command[@]}"
672 echo "${@}" >&2 748 echo "${@}" >&2
673 if "${@}"; then 749 "${@}" || continue
674 if [[ ${clone_type} == mirror ]]; then 750
675 # find remote HEAD and update our HEAD properly 751 if [[ ${clone_type} == mirror || ${fetch_l} == HEAD ]]; then
676 git symbolic-ref HEAD \ 752 # update our HEAD to match our remote HEAD ref
677 "$(_git-r3_find_head refs/git-r3/HEAD \ 753 git symbolic-ref HEAD refs/git-r3/HEAD \
678 < <(git show-ref --heads || die))" \
679 || die "Unable to update HEAD"
680 else # single or shallow
681 if [[ ${fetch_l} == HEAD ]]; then
682 # find out what branch we fetched as HEAD
683 local head_branch=$(_git-r3_find_head \
684 refs/git-r3/HEAD \
685 < <(${EGIT_SOCKS} git ls-remote --heads "${r}" || die))
686
687 # and move it to its regular place
688 git update-ref --no-deref "${head_branch}" \
689 refs/git-r3/HEAD \
690 || die "Unable to sync HEAD branch ${head_branch}"
691 git symbolic-ref HEAD "${head_branch}" \
692 || die "Unable to update HEAD" 754 || die "Unable to update HEAD"
693 fi
694 fi 755 fi
756 fi
695 757
696 # now let's see what the user wants from us 758 # now let's see what the user wants from us
759 if [[ ${commit_date} ]]; then
760 local dated_commit_id=$(
761 git rev-list --first-parent --before="${commit_date}" \
762 -n 1 "${remote_ref}"
763 )
764 if [[ ${?} -ne 0 ]]; then
765 die "Listing ${remote_ref} failed (wrong ref?)."
766 elif [[ ! ${dated_commit_id} ]]; then
767 die "Unable to find commit for date ${commit_date}."
768 else
769 set -- git update-ref --no-deref "${local_ref}" "${dated_commit_id}"
770 fi
771 else
697 local full_remote_ref=$( 772 local full_remote_ref=$(
698 ${EGIT_SOCKS} git rev-parse --verify --symbolic-full-name "${remote_ref}" 773 git rev-parse --verify --symbolic-full-name "${remote_ref}"
699 ) 774 )
700 775
701 if [[ ${full_remote_ref} ]]; then 776 if [[ ${full_remote_ref} ]]; then
@@ -706,24 +781,30 @@ git-r3_fetch() {
706 # otherwise, we were likely given a commit id 781 # otherwise, we were likely given a commit id
707 set -- git update-ref --no-deref "${local_ref}" "${remote_ref}" 782 set -- git update-ref --no-deref "${local_ref}" "${remote_ref}"
708 fi 783 fi
784 fi
709 785
710 echo "${@}" >&2 786 echo "${@}" >&2
711 if ! "${@}"; then 787 if ! "${@}"; then
788 if [[ ${EVCS_OFFLINE} ]]; then
789 eerror "A clone of the following repository is required to proceed:"
790 eerror " ${r}"
791 eerror "However, networking activity has been disabled using EVCS_OFFLINE and the local"
792 eerror "clone does not have requested ref:"
793 eerror " ${remote_ref}"
794 die "Local clone of ${r} does not have requested ref: ${remote_ref}. Unable to proceed with EVCS_OFFLINE."
795 else
712 die "Referencing ${remote_ref} failed (wrong ref?)." 796 die "Referencing ${remote_ref} failed (wrong ref?)."
713 fi 797 fi
714
715 success=1
716 break
717 fi 798 fi
799
800 success=1
801 break
718 done 802 done
719 if [[ ${saved_umask} ]]; then 803 if [[ ${saved_umask} ]]; then
720 umask "${saved_umask}" || die 804 umask "${saved_umask}" || die
721 fi 805 fi
722 [[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI" 806 [[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
723 807
724 # consistency check, in case we got man-in-the-middle't --lynX
725 git fsck
726
727 # submodules can reference commits in any branch 808 # submodules can reference commits in any branch
728 # always use the 'mirror' mode to accomodate that, bug #503332 809 # always use the 'mirror' mode to accomodate that, bug #503332
729 local EGIT_CLONE_TYPE=mirror 810 local EGIT_CLONE_TYPE=mirror
@@ -732,7 +813,7 @@ git-r3_fetch() {
732 if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then 813 if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
733 local submodules 814 local submodules
734 _git-r3_set_submodules \ 815 _git-r3_set_submodules \
735 "$(${EGIT_SOCKS} git cat-file -p "${local_ref}":.gitmodules || die)" 816 "$(git cat-file -p "${local_ref}":.gitmodules || die)"
736 817
737 while [[ ${submodules[@]} ]]; do 818 while [[ ${submodules[@]} ]]; do
738 local subname=${submodules[0]} 819 local subname=${submodules[0]}
@@ -744,7 +825,7 @@ git-r3_fetch() {
744 # note: git cat-file does not work for submodules 825 # note: git cat-file does not work for submodules
745 if [[ $(git ls-tree -d "${local_ref}" "${path}") ]] 826 if [[ $(git ls-tree -d "${local_ref}" "${path}") ]]
746 then 827 then
747 local commit=$(${EGIT_SOCKS} git rev-parse "${local_ref}:${path}" || die) 828 local commit=$(git rev-parse "${local_ref}:${path}" || die)
748 829
749 if [[ ! ${commit} ]]; then 830 if [[ ! ${commit} ]]; then
750 die "Unable to get commit id for submodule ${subname}" 831 die "Unable to get commit id for submodule ${subname}"
@@ -762,7 +843,7 @@ git-r3_fetch() {
762} 843}
763 844
764# @FUNCTION: git-r3_checkout 845# @FUNCTION: git-r3_checkout
765# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]] 846# @USAGE: [<repo-uri> [<checkout-path> [<local-id> [<checkout-paths>...]]]]
766# @DESCRIPTION: 847# @DESCRIPTION:
767# Check the previously fetched tree to the working copy. 848# Check the previously fetched tree to the working copy.
768# 849#
@@ -778,6 +859,12 @@ git-r3_fetch() {
778# <local-id> needs to specify the local identifier that was used 859# <local-id> needs to specify the local identifier that was used
779# for respective git-r3_fetch. 860# for respective git-r3_fetch.
780# 861#
862# If <checkout-paths> are specified, then the specified paths are passed
863# to 'git checkout' to effect a partial checkout. Please note that such
864# checkout will not cause the repository to switch branches,
865# and submodules will be skipped at the moment. The submodules matching
866# those paths might be checked out in a future version of the eclass.
867#
781# The checkout operation will write to the working copy, and export 868# The checkout operation will write to the working copy, and export
782# the repository state into the environment. If the repository contains 869# the repository state into the environment. If the repository contains
783# submodules, they will be checked out recursively. 870# submodules, they will be checked out recursively.
@@ -795,6 +882,7 @@ git-r3_checkout() {
795 882
796 local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}} 883 local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
797 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}} 884 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
885 local checkout_paths=( "${@:4}" )
798 886
799 local -x GIT_DIR 887 local -x GIT_DIR
800 _git-r3_set_gitdir "${repos[0]}" 888 _git-r3_set_gitdir "${repos[0]}"
@@ -802,11 +890,7 @@ git-r3_checkout() {
802 einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..." 890 einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
803 891
804 if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then 892 if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
805 if [[ ${EVCS_OFFLINE} ]]; then 893 die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
806 die "No local clone of ${repos[0]}. Unable to work with EVCS_OFFLINE."
807 else
808 die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
809 fi
810 fi 894 fi
811 local remote_ref=$( 895 local remote_ref=$(
812 git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__ 896 git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__
@@ -829,9 +913,10 @@ git-r3_checkout() {
829 # setup 'alternates' to avoid copying objects 913 # setup 'alternates' to avoid copying objects
830 echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die 914 echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
831 # now copy the refs 915 # now copy the refs
832 # [htn]* safely catches heads, tags, notes without complaining 916 cp -R "${orig_repo}"/refs/* "${GIT_DIR}"/refs/ || die
833 # on non-existing ones, and omits internal 'git-r3' ref 917 if [[ -f ${orig_repo}/packed-refs ]]; then
834 cp -R "${orig_repo}"/refs/[htn]* "${GIT_DIR}"/refs/ || die 918 cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die
919 fi
835 920
836 # (no need to copy HEAD, we will set it via checkout) 921 # (no need to copy HEAD, we will set it via checkout)
837 922
@@ -845,6 +930,9 @@ git-r3_checkout() {
845 else 930 else
846 set -- "${@}" "${new_commit_id}" 931 set -- "${@}" "${new_commit_id}"
847 fi 932 fi
933 if [[ ${checkout_paths[@]} ]]; then
934 set -- "${@}" -- "${checkout_paths[@]}"
935 fi
848 echo "${@}" >&2 936 echo "${@}" >&2
849 "${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed" 937 "${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed"
850 } 938 }
@@ -867,8 +955,12 @@ git-r3_checkout() {
867 echo " updating from commit: ${old_commit_id}" 955 echo " updating from commit: ${old_commit_id}"
868 echo " to commit: ${new_commit_id}" 956 echo " to commit: ${new_commit_id}"
869 957
870 git --no-pager diff --stat \ 958 set -- git --no-pager diff --stat \
871 ${old_commit_id}..${new_commit_id} 959 ${old_commit_id}..${new_commit_id}
960 if [[ ${checkout_paths[@]} ]]; then
961 set -- "${@}" -- "${checkout_paths[@]}"
962 fi
963 "${@}"
872 else 964 else
873 echo " at the commit: ${new_commit_id}" 965 echo " at the commit: ${new_commit_id}"
874 fi 966 fi
@@ -876,7 +968,7 @@ git-r3_checkout() {
876 git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die 968 git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die
877 969
878 # recursively checkout submodules 970 # recursively checkout submodules
879 if [[ -f ${out_dir}/.gitmodules ]]; then 971 if [[ -f ${out_dir}/.gitmodules && ! ${checkout_paths} ]]; then
880 local submodules 972 local submodules
881 _git-r3_set_submodules \ 973 _git-r3_set_submodules \
882 "$(<"${out_dir}"/.gitmodules)" 974 "$(<"${out_dir}"/.gitmodules)"
diff --git a/eclass/git-r3.tor.eclass b/eclass/git-r3.tor.eclass
new file mode 100644
index 0000000..e3e6717
--- /dev/null
+++ b/eclass/git-r3.tor.eclass
@@ -0,0 +1,1016 @@
1# Copyright 1999-2015 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3# $Id$
4
5# @ECLASS: git-r3.eclass
6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories.
9# @DESCRIPTION:
10# Third generation eclass for easing maintenance of live ebuilds using
11# git as remote repository.
12#
13# Patched by symlynX to allow for gits via Tor. Why Tor? Because
14# unlike HTTPS it provides end-to-end authenticity which is not
15# susceptible to man-in-the-middle attacks, so all gits should
16# migrate to Tor, cjdns or gnunet-vpn. But the latter two do
17# not need custom changes to this file to do their job.
18#
19# @FIXME: Should we automatically define EGIT_SOCKS="torsocks"
20# when we see that /etc/tor/torsocks.conf exists?
21
22case "${EAPI:-0}" in
23 0|1|2|3|4|5|6)
24 ;;
25 *)
26 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
27 ;;
28esac
29
30if [[ ! ${_GIT_R3} ]]; then
31
32inherit eutils
33
34fi
35
36EXPORT_FUNCTIONS src_unpack
37
38if [[ ! ${_GIT_R3} ]]; then
39
40if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
41 DEPEND=">=dev-vcs/git-1.8.2.1"
42fi
43
44# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
45# @DESCRIPTION:
46# Type of clone that should be used against the remote repository.
47# This can be either of: 'mirror', 'single', 'shallow'.
48#
49# This is intended to be set by user in make.conf. Ebuilds are supposed
50# to set EGIT_MIN_CLONE_TYPE if necessary instead.
51#
52# The 'mirror' type clones all remote branches and tags with complete
53# history and all notes. EGIT_COMMIT can specify any commit hash.
54# Upstream-removed branches and tags are purged from the local clone
55# while fetching. This mode is suitable for cloning the local copy
56# for development or hosting a local git mirror. However, clones
57# of repositories with large diverged branches may quickly grow large.
58#
59# The 'single+tags' type clones the requested branch and all tags
60# in the repository. All notes are fetched as well. EGIT_COMMIT
61# can safely specify hashes throughout the current branch and all tags.
62# No purging of old references is done (if you often switch branches,
63# you may need to remove stale branches yourself). This mode is intended
64# mostly for use with broken git servers such as Google Code that fail
65# to fetch tags along with the branch in 'single' mode.
66#
67# The 'single' type clones only the requested branch or tag. Tags
68# referencing commits throughout the branch history are fetched as well,
69# and all notes. EGIT_COMMIT can safely specify only hashes
70# in the current branch. No purging of old references is done (if you
71# often switch branches, you may need to remove stale branches
72# yourself). This mode is suitable for general use.
73#
74# The 'shallow' type clones only the newest commit on requested branch
75# or tag. EGIT_COMMIT can only specify tags, and since the history is
76# unavailable calls like 'git describe' will not reference prior tags.
77# No purging of old references is done. This mode is intended mostly for
78# embedded systems with limited disk space.
79: ${EGIT_CLONE_TYPE:=single}
80
81# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
82# @DESCRIPTION:
83# 'Minimum' clone type supported by the ebuild. Takes same values
84# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
85# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
86# EGIT_MIN_CLONE_TYPE instead.
87#
88# This variable is intended to be used by ebuilds only. Users are
89# supposed to set EGIT_CLONE_TYPE instead.
90#
91# A common case is to use 'single' whenever the build system requires
92# access to full branch history, or 'single+tags' when Google Code
93# or a similar remote is used that does not support shallow clones
94# and fetching tags along with commits. Please use sparingly, and to fix
95# fatal errors rather than 'non-pretty versions'.
96: ${EGIT_MIN_CLONE_TYPE:=shallow}
97
98# @ECLASS-VARIABLE: EGIT3_STORE_DIR
99# @DESCRIPTION:
100# Storage directory for git sources.
101#
102# This is intended to be set by user in make.conf. Ebuilds must not set
103# it.
104#
105# EGIT3_STORE_DIR=${DISTDIR}/git3-src
106
107# @ECLASS-VARIABLE: EGIT_MIRROR_URI
108# @DEFAULT_UNSET
109# @DESCRIPTION:
110# 'Top' URI to a local git mirror. If specified, the eclass will try
111# to fetch from the local mirror instead of using the remote repository.
112#
113# The mirror needs to follow EGIT3_STORE_DIR structure. The directory
114# created by eclass can be used for that purpose.
115#
116# Example:
117# @CODE
118# EGIT_MIRROR_URI="git://mirror.lan/"
119# @CODE
120
121# @ECLASS-VARIABLE: EGIT_REPO_URI
122# @REQUIRED
123# @DESCRIPTION:
124# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
125# are provided, the eclass will consider them as fallback URIs to try
126# if the first URI does not work. For supported URI syntaxes, read up
127# the manpage for git-clone(1).
128#
129# It can be overriden via env using ${PN}_LIVE_REPO variable.
130#
131# Can be a whitespace-separated list or an array.
132#
133# Example:
134# @CODE
135# EGIT_REPO_URI="git://a/b.git https://c/d.git"
136# @CODE
137
138# @ECLASS-VARIABLE: EVCS_OFFLINE
139# @DEFAULT_UNSET
140# @DESCRIPTION:
141# If non-empty, this variable prevents any online operations.
142
143# @ECLASS-VARIABLE: EVCS_UMASK
144# @DEFAULT_UNSET
145# @DESCRIPTION:
146# Set this variable to a custom umask. This is intended to be set by
147# users. By setting this to something like 002, it can make life easier
148# for people who do development as non-root (but are in the portage
149# group), and then switch over to building with FEATURES=userpriv.
150# Or vice-versa. Shouldn't be a security issue here as anyone who has
151# portage group write access already can screw the system over in more
152# creative ways.
153
154# @ECLASS-VARIABLE: EGIT_BRANCH
155# @DEFAULT_UNSET
156# @DESCRIPTION:
157# The branch name to check out. If unset, the upstream default (HEAD)
158# will be used.
159#
160# It can be overriden via env using ${PN}_LIVE_BRANCH variable.
161
162# @ECLASS-VARIABLE: EGIT_COMMIT
163# @DEFAULT_UNSET
164# @DESCRIPTION:
165# The tag name or commit identifier to check out. If unset, newest
166# commit from the branch will be used. If set, EGIT_BRANCH will
167# be ignored.
168#
169# It can be overriden via env using ${PN}_LIVE_COMMIT variable.
170
171# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
172# @DESCRIPTION:
173# The directory to check the git sources out to.
174#
175# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
176
177# @FUNCTION: _git-r3_env_setup
178# @INTERNAL
179# @DESCRIPTION:
180# Set the eclass variables as necessary for operation. This can involve
181# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
182_git-r3_env_setup() {
183 debug-print-function ${FUNCNAME} "$@"
184
185 # check the clone type
186 case "${EGIT_CLONE_TYPE}" in
187 mirror|single+tags|single|shallow)
188 ;;
189 *)
190 die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
191 esac
192 case "${EGIT_MIN_CLONE_TYPE}" in
193 shallow)
194 ;;
195 single)
196 if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
197 einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
198 EGIT_CLONE_TYPE=single
199 fi
200 ;;
201 single+tags)
202 if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
203 einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
204 EGIT_CLONE_TYPE=single+tags
205 fi
206 ;;
207 mirror)
208 if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
209 einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
210 EGIT_CLONE_TYPE=mirror
211 fi
212 ;;
213 *)
214 die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
215 esac
216
217 local esc_pn livevar
218 esc_pn=${PN//[-+]/_}
219
220 livevar=${esc_pn}_LIVE_REPO
221 EGIT_REPO_URI=${!livevar:-${EGIT_REPO_URI}}
222 [[ ${!livevar} ]] \
223 && ewarn "Using ${livevar}, no support will be provided"
224
225 livevar=${esc_pn}_LIVE_BRANCH
226 EGIT_BRANCH=${!livevar:-${EGIT_BRANCH}}
227 [[ ${!livevar} ]] \
228 && ewarn "Using ${livevar}, no support will be provided"
229
230 livevar=${esc_pn}_LIVE_COMMIT
231 EGIT_COMMIT=${!livevar:-${EGIT_COMMIT}}
232 [[ ${!livevar} ]] \
233 && ewarn "Using ${livevar}, no support will be provided"
234
235 # Migration helpers. Remove them when git-2 is removed.
236
237 if [[ ${EGIT_SOURCEDIR} ]]; then
238 eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating"
239 eerror "your ebuild, please check whether the variable is necessary at all"
240 eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}."
241 eerror "Therefore, proper setting of S may be sufficient."
242 die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR."
243 fi
244
245 if [[ ${EGIT_MASTER} ]]; then
246 eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)"
247 eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH"
248 eerror "as necessary."
249 die "EGIT_MASTER has been removed."
250 fi
251
252 if [[ ${EGIT_HAS_SUBMODULES} ]]; then
253 eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
254 eerror "to switch the clone type in order to support submodules and therefore"
255 eerror "submodules are detected and fetched automatically."
256 die "EGIT_HAS_SUBMODULES is no longer necessary."
257 fi
258
259 if [[ ${EGIT_PROJECT} ]]; then
260 eerror "EGIT_PROJECT has been removed. Instead, the eclass determines"
261 eerror "the local clone path using path in canonical EGIT_REPO_URI."
262 eerror "If the current algorithm causes issues for you, please report a bug."
263 die "EGIT_PROJECT is no longer necessary."
264 fi
265
266 if [[ ${EGIT_BOOTSTRAP} ]]; then
267 eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()"
268 eerror "instead."
269 die "EGIT_BOOTSTRAP has been removed."
270 fi
271
272 if [[ ${EGIT_NOUNPACK} ]]; then
273 eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default"
274 eerror "unpack function. If necessary, please declare proper src_unpack()."
275 die "EGIT_NOUNPACK has been removed."
276 fi
277}
278
279# @FUNCTION: _git-r3_set_gitdir
280# @USAGE: <repo-uri>
281# @INTERNAL
282# @DESCRIPTION:
283# Obtain the local repository path and set it as GIT_DIR. Creates
284# a new repository if necessary.
285#
286# <repo-uri> may be used to compose the path. It should therefore be
287# a canonical URI to the repository.
288_git-r3_set_gitdir() {
289 debug-print-function ${FUNCNAME} "$@"
290
291 local repo_name=${1#*://*/}
292
293 # strip the trailing slash
294 repo_name=${repo_name%/}
295
296 # strip common prefixes to make paths more likely to match
297 # e.g. git://X/Y.git vs https://X/git/Y.git
298 # (but just one of the prefixes)
299 case "${repo_name}" in
300 # gnome.org... who else?
301 browse/*) repo_name=${repo_name#browse/};;
302 # cgit can proxy requests to git
303 cgit/*) repo_name=${repo_name#cgit/};;
304 # pretty common
305 git/*) repo_name=${repo_name#git/};;
306 # gentoo.org
307 gitroot/*) repo_name=${repo_name#gitroot/};;
308 # google code, sourceforge
309 p/*) repo_name=${repo_name#p/};;
310 # kernel.org
311 pub/scm/*) repo_name=${repo_name#pub/scm/};;
312 esac
313 # ensure a .git suffix, same reason
314 repo_name=${repo_name%.git}.git
315 # now replace all the slashes
316 repo_name=${repo_name//\//_}
317
318 local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
319 : ${EGIT3_STORE_DIR:=${distdir}/git3-src}
320
321 GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
322
323 if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
324 (
325 addwrite /
326 mkdir -p "${EGIT3_STORE_DIR}"
327 ) || die "Unable to create ${EGIT3_STORE_DIR}"
328 fi
329
330 addwrite "${EGIT3_STORE_DIR}"
331 if [[ ! -d ${GIT_DIR} ]]; then
332 local saved_umask
333 if [[ ${EVCS_UMASK} ]]; then
334 saved_umask=$(umask)
335 umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
336 fi
337 mkdir "${GIT_DIR}" || die
338 git init --bare || die
339 if [[ ${saved_umask} ]]; then
340 umask "${saved_umask}" || die
341 fi
342 fi
343}
344
345# @FUNCTION: _git-r3_set_submodules
346# @USAGE: <file-contents>
347# @INTERNAL
348# @DESCRIPTION:
349# Parse .gitmodules contents passed as <file-contents>
350# as in "$(cat .gitmodules)"). Composes a 'submodules' array that
351# contains in order (name, URL, path) for each submodule.
352_git-r3_set_submodules() {
353 debug-print-function ${FUNCNAME} "$@"
354
355 local data=${1}
356
357 # ( name url path ... )
358 submodules=()
359
360 local l
361 while read l; do
362 # submodule.<path>.path=<path>
363 # submodule.<path>.url=<url>
364 [[ ${l} == submodule.*.url=* ]] || continue
365
366 l=${l#submodule.}
367 local subname=${l%%.url=*}
368
369 # skip modules that have 'update = none', bug #487262.
370 local upd=$(echo "${data}" | git config -f /dev/fd/0 \
371 submodule."${subname}".update)
372 [[ ${upd} == none ]] && continue
373
374 # https://github.com/git/git/blob/master/refs.c#L39
375 # for now, we just filter /. because of #572312
376 local enc_subname=${subname//\/.//_}
377 [[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
378
379 submodules+=(
380 "${enc_subname}"
381 "$(echo "${data}" | git config -f /dev/fd/0 \
382 submodule."${subname}".url || die)"
383 "$(echo "${data}" | git config -f /dev/fd/0 \
384 submodule."${subname}".path || die)"
385 )
386 done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
387}
388
389# @FUNCTION: _git-r3_set_subrepos
390# @USAGE: <submodule-uri> <parent-repo-uri>...
391# @INTERNAL
392# @DESCRIPTION:
393# Create 'subrepos' array containing absolute (canonical) submodule URIs
394# for the given <submodule-uri>. If the URI is relative, URIs will be
395# constructed using all <parent-repo-uri>s. Otherwise, this single URI
396# will be placed in the array.
397_git-r3_set_subrepos() {
398 debug-print-function ${FUNCNAME} "$@"
399
400 local suburl=${1}
401 subrepos=( "${@:2}" )
402
403 if [[ ${suburl} == ./* || ${suburl} == ../* ]]; then
404 # drop all possible trailing slashes for consistency
405 subrepos=( "${subrepos[@]%%/}" )
406
407 while true; do
408 if [[ ${suburl} == ./* ]]; then
409 suburl=${suburl:2}
410 elif [[ ${suburl} == ../* ]]; then
411 suburl=${suburl:3}
412
413 # XXX: correctness checking
414
415 # drop the last path component
416 subrepos=( "${subrepos[@]%/*}" )
417 # and then the trailing slashes, again
418 subrepos=( "${subrepos[@]%%/}" )
419 else
420 break
421 fi
422 done
423
424 # append the preprocessed path to the preprocessed URIs
425 subrepos=( "${subrepos[@]/%//${suburl}}")
426 else
427 subrepos=( "${suburl}" )
428 fi
429}
430
431
432# @FUNCTION: _git-r3_is_local_repo
433# @USAGE: <repo-uri>
434# @INTERNAL
435# @DESCRIPTION:
436# Determine whether the given URI specifies a local (on-disk)
437# repository.
438_git-r3_is_local_repo() {
439 debug-print-function ${FUNCNAME} "$@"
440
441 local uri=${1}
442
443 [[ ${uri} == file://* || ${uri} == /* ]]
444}
445
446# @FUNCTION: _git-r3_find_head
447# @USAGE: <head-ref>
448# @INTERNAL
449# @DESCRIPTION:
450# Given a ref to which remote HEAD was fetched, try to find
451# a branch matching the commit. Expects 'git show-ref'
452# or 'git ls-remote' output on stdin.
453_git-r3_find_head() {
454 debug-print-function ${FUNCNAME} "$@"
455
456 local head_ref=${1}
457 local head_hash=$(git rev-parse --verify "${1}" || die)
458 local matching_ref
459
460 # TODO: some transports support peeking at symbolic remote refs
461 # find a way to use that rather than guessing
462
463 # (based on guess_remote_head() in git-1.9.0/remote.c)
464 local h ref
465 while read h ref; do
466 # look for matching head
467 if [[ ${h} == ${head_hash} ]]; then
468 # either take the first matching ref, or master if it is there
469 if [[ ! ${matching_ref} || ${ref} == refs/heads/master ]]; then
470 matching_ref=${ref}
471 fi
472 fi
473 done
474
475 if [[ ! ${matching_ref} ]]; then
476 die "Unable to find a matching branch for remote HEAD (${head_hash})"
477 fi
478
479 echo "${matching_ref}"
480}
481
482# @FUNCTION: git-r3_fetch
483# @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
484# @DESCRIPTION:
485# Fetch new commits to the local clone of repository.
486#
487# <repo-uri> specifies the repository URIs to fetch from, as a space-
488# -separated list. The first URI will be used as repository group
489# identifier and therefore must be used consistently. When not
490# specified, defaults to ${EGIT_REPO_URI}.
491#
492# <remote-ref> specifies the remote ref or commit id to fetch.
493# It is preferred to use 'refs/heads/<branch-name>' for branches
494# and 'refs/tags/<tag-name>' for tags. Other options are 'HEAD'
495# for upstream default branch and hexadecimal commit SHA1. Defaults
496# to the first of EGIT_COMMIT, EGIT_BRANCH or literal 'HEAD' that
497# is set to a non-null value.
498#
499# <local-id> specifies the local branch identifier that will be used to
500# locally store the fetch result. It should be unique to multiple
501# fetches within the repository that can be performed at the same time
502# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT%/*}.
503# This default should be fine unless you are fetching multiple trees
504# from the same repository in the same ebuild.
505#
506# The fetch operation will affect the EGIT_STORE only. It will not touch
507# the working copy, nor export any environment variables.
508# If the repository contains submodules, they will be fetched
509# recursively.
510git-r3_fetch() {
511 debug-print-function ${FUNCNAME} "$@"
512
513 [[ ${EVCS_OFFLINE} ]] && return
514
515 local repos
516 if [[ ${1} ]]; then
517 repos=( ${1} )
518 elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
519 repos=( "${EGIT_REPO_URI[@]}" )
520 else
521 repos=( ${EGIT_REPO_URI} )
522 fi
523
524 local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
525 local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
526 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
527 local local_ref=refs/git-r3/${local_id}/__main__
528
529 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
530
531 local -x GIT_DIR
532 _git-r3_set_gitdir "${repos[0]}"
533
534 # prepend the local mirror if applicable
535 if [[ ${EGIT_MIRROR_URI} ]]; then
536 repos=(
537 "${EGIT_MIRROR_URI%/}/${GIT_DIR##*/}"
538 "${repos[@]}"
539 )
540 fi
541
542 # try to fetch from the remote
543 local r success saved_umask
544 if [[ ${EVCS_UMASK} ]]; then
545 saved_umask=$(umask)
546 umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
547 fi
548 for r in "${repos[@]}"; do
549 einfo "Fetching \e[1m${r}\e[22m ..."
550
551 if [[ ${r} == https?://* ]]; then
552 # if we're not using git protocol, web proxy takes care of things
553 EGIT_SOCKS = ""
554 elif [[ ! ${EGIT_SOCKS} ]] && [[ ${r} == git://*.onion/* ]]; then
555 if ROOT=/ has_version 'net-proxy/torsocks'; then
556 EGIT_SOCKS="torsocks"
557 else
558 die "Properly configured net-proxy/torsocks required to fetch git from onion."
559 fi
560 fi
561
562 local fetch_command=( ${EGIT_SOCKS} git fetch "${r}" )
563 local clone_type=${EGIT_CLONE_TYPE}
564
565 if [[ ${r} == https://* ]] && ! ROOT=/ has_version 'dev-vcs/git[curl]'; then
566 eerror "git-r3: fetching from https:// requested. In order to support https,"
567 eerror "dev-vcs/git needs to be built with USE=curl. Example solution:"
568 eerror
569 eerror " echo dev-vcs/git curl >> /etc/portage/package.use"
570 eerror " emerge -1v dev-vcs/git"
571 die "dev-vcs/git built with USE=curl required."
572 fi
573
574 if [[ ${r} == https://code.google.com/* ]]; then
575 # Google Code has special magic on top of git that:
576 # 1) can't handle shallow clones at all,
577 # 2) fetches duplicately when tags are pulled in with branch
578 # so automatically switch to single+tags mode.
579 if [[ ${clone_type} == shallow ]]; then
580 einfo " Google Code does not support shallow clones"
581 einfo " using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
582 clone_type=single+tags
583 elif [[ ${clone_type} == single ]]; then
584 einfo " git-r3: Google Code does not send tags properly in 'single' mode"
585 einfo " using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
586 clone_type=single+tags
587 fi
588 fi
589
590 if [[ ${clone_type} == mirror ]]; then
591 fetch_command+=(
592 --prune
593 # mirror the remote branches as local branches
594 "+refs/heads/*:refs/heads/*"
595 # pull tags explicitly in order to prune them properly
596 "+refs/tags/*:refs/tags/*"
597 # notes in case something needs them
598 "+refs/notes/*:refs/notes/*"
599 # and HEAD in case we need the default branch
600 # (we keep it in refs/git-r3 since otherwise --prune interferes)
601 "+HEAD:refs/git-r3/HEAD"
602 )
603 else # single or shallow
604 local fetch_l fetch_r
605
606 if [[ ${remote_ref} == HEAD ]]; then
607 # HEAD
608 fetch_l=HEAD
609 elif [[ ${remote_ref} == refs/* ]]; then
610 # regular branch, tag or some other explicit ref
611 fetch_l=${remote_ref}
612 else
613 # tag or commit id...
614 # let ls-remote figure it out
615 local tagref=$(${EGIT_SOCKS} git ls-remote "${r}" "refs/tags/${remote_ref}")
616
617 # if it was a tag, ls-remote obtained a hash
618 if [[ ${tagref} ]]; then
619 # tag
620 fetch_l=refs/tags/${remote_ref}
621 else
622 # commit id
623 # so we need to fetch the whole branch
624 if [[ ${branch} ]]; then
625 fetch_l=${branch}
626 else
627 fetch_l=HEAD
628 fi
629
630 # fetching by commit in shallow mode? can't do.
631 if [[ ${clone_type} == shallow ]]; then
632 clone_type=single
633 fi
634 fi
635 fi
636
637 if [[ ${fetch_l} == HEAD ]]; then
638 fetch_r=refs/git-r3/HEAD
639 else
640 fetch_r=${fetch_l}
641 fi
642
643 fetch_command+=(
644 "+${fetch_l}:${fetch_r}"
645 )
646
647 if [[ ${clone_type} == single+tags ]]; then
648 fetch_command+=(
649 # pull tags explicitly as requested
650 "+refs/tags/*:refs/tags/*"
651 )
652 fi
653 fi
654
655 if [[ ${clone_type} == shallow ]]; then
656 if _git-r3_is_local_repo; then
657 # '--depth 1' causes sandbox violations with local repos
658 # bug #491260
659 clone_type=single
660 elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
661 then
662 # use '--depth 1' when fetching a new branch
663 fetch_command+=( --depth 1 )
664 fi
665 else # non-shallow mode
666 if [[ -f ${GIT_DIR}/shallow ]]; then
667 fetch_command+=( --unshallow )
668 fi
669 fi
670
671 set -- "${fetch_command[@]}"
672 echo "${@}" >&2
673 if "${@}"; then
674 if [[ ${clone_type} == mirror ]]; then
675 # find remote HEAD and update our HEAD properly
676 git symbolic-ref HEAD \
677 "$(_git-r3_find_head refs/git-r3/HEAD \
678 < <(git show-ref --heads || die))" \
679 || die "Unable to update HEAD"
680 else # single or shallow
681 if [[ ${fetch_l} == HEAD ]]; then
682 # find out what branch we fetched as HEAD
683 local head_branch=$(_git-r3_find_head \
684 refs/git-r3/HEAD \
685 < <(${EGIT_SOCKS} git ls-remote --heads "${r}" || die))
686
687 # and move it to its regular place
688 git update-ref --no-deref "${head_branch}" \
689 refs/git-r3/HEAD \
690 || die "Unable to sync HEAD branch ${head_branch}"
691 git symbolic-ref HEAD "${head_branch}" \
692 || die "Unable to update HEAD"
693 fi
694 fi
695
696 # now let's see what the user wants from us
697 local full_remote_ref=$(
698 ${EGIT_SOCKS} git rev-parse --verify --symbolic-full-name "${remote_ref}"
699 )
700
701 if [[ ${full_remote_ref} ]]; then
702 # when we are given a ref, create a symbolic ref
703 # so that we preserve the actual argument
704 set -- git symbolic-ref "${local_ref}" "${full_remote_ref}"
705 else
706 # otherwise, we were likely given a commit id
707 set -- git update-ref --no-deref "${local_ref}" "${remote_ref}"
708 fi
709
710 echo "${@}" >&2
711 if ! "${@}"; then
712 die "Referencing ${remote_ref} failed (wrong ref?)."
713 fi
714
715 success=1
716 break
717 fi
718 done
719 if [[ ${saved_umask} ]]; then
720 umask "${saved_umask}" || die
721 fi
722 [[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
723
724 # consistency check, in case we got man-in-the-middle't --lynX
725 git fsck
726
727 # submodules can reference commits in any branch
728 # always use the 'mirror' mode to accomodate that, bug #503332
729 local EGIT_CLONE_TYPE=mirror
730
731 # recursively fetch submodules
732 if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
733 local submodules
734 _git-r3_set_submodules \
735 "$(${EGIT_SOCKS} git cat-file -p "${local_ref}":.gitmodules || die)"
736
737 while [[ ${submodules[@]} ]]; do
738 local subname=${submodules[0]}
739 local url=${submodules[1]}
740 local path=${submodules[2]}
741
742 # use only submodules for which path does exist
743 # (this is in par with 'git submodule'), bug #551100
744 # note: git cat-file does not work for submodules
745 if [[ $(git ls-tree -d "${local_ref}" "${path}") ]]
746 then
747 local commit=$(${EGIT_SOCKS} git rev-parse "${local_ref}:${path}" || die)
748
749 if [[ ! ${commit} ]]; then
750 die "Unable to get commit id for submodule ${subname}"
751 fi
752
753 local subrepos
754 _git-r3_set_subrepos "${url}" "${repos[@]}"
755
756 git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
757 fi
758
759 submodules=( "${submodules[@]:3}" ) # shift
760 done
761 fi
762}
763
764# @FUNCTION: git-r3_checkout
765# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]]
766# @DESCRIPTION:
767# Check the previously fetched tree to the working copy.
768#
769# <repo-uri> specifies the repository URIs, as a space-separated list.
770# The first URI will be used as repository group identifier
771# and therefore must be used consistently with git-r3_fetch.
772# The remaining URIs are not used and therefore may be omitted.
773# When not specified, defaults to ${EGIT_REPO_URI}.
774#
775# <checkout-path> specifies the path to place the checkout. It defaults
776# to ${EGIT_CHECKOUT_DIR} if set, otherwise to ${WORKDIR}/${P}.
777#
778# <local-id> needs to specify the local identifier that was used
779# for respective git-r3_fetch.
780#
781# The checkout operation will write to the working copy, and export
782# the repository state into the environment. If the repository contains
783# submodules, they will be checked out recursively.
784git-r3_checkout() {
785 debug-print-function ${FUNCNAME} "$@"
786
787 local repos
788 if [[ ${1} ]]; then
789 repos=( ${1} )
790 elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
791 repos=( "${EGIT_REPO_URI[@]}" )
792 else
793 repos=( ${EGIT_REPO_URI} )
794 fi
795
796 local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
797 local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
798
799 local -x GIT_DIR
800 _git-r3_set_gitdir "${repos[0]}"
801
802 einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\e[22m ..."
803
804 if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
805 if [[ ${EVCS_OFFLINE} ]]; then
806 die "No local clone of ${repos[0]}. Unable to work with EVCS_OFFLINE."
807 else
808 die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
809 fi
810 fi
811 local remote_ref=$(
812 git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__
813 )
814 local new_commit_id=$(
815 git rev-parse --verify refs/git-r3/"${local_id}"/__main__
816 )
817
818 git-r3_sub_checkout() {
819 local orig_repo=${GIT_DIR}
820 local -x GIT_DIR=${out_dir}/.git
821 local -x GIT_WORK_TREE=${out_dir}
822
823 mkdir -p "${out_dir}" || die
824
825 # use git init+fetch instead of clone since the latter doesn't like
826 # non-empty directories.
827
828 git init --quiet || die
829 # setup 'alternates' to avoid copying objects
830 echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
831 # now copy the refs
832 # [htn]* safely catches heads, tags, notes without complaining
833 # on non-existing ones, and omits internal 'git-r3' ref
834 cp -R "${orig_repo}"/refs/[htn]* "${GIT_DIR}"/refs/ || die
835
836 # (no need to copy HEAD, we will set it via checkout)
837
838 if [[ -f ${orig_repo}/shallow ]]; then
839 cp "${orig_repo}"/shallow "${GIT_DIR}"/ || die
840 fi
841
842 set -- git checkout --quiet
843 if [[ ${remote_ref} ]]; then
844 set -- "${@}" "${remote_ref#refs/heads/}"
845 else
846 set -- "${@}" "${new_commit_id}"
847 fi
848 echo "${@}" >&2
849 "${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed"
850 }
851 git-r3_sub_checkout
852 unset -f git-r3_sub_checkout
853
854 local old_commit_id=$(
855 git rev-parse --quiet --verify refs/git-r3/"${local_id}"/__old__
856 )
857 if [[ ! ${old_commit_id} ]]; then
858 echo "GIT NEW branch -->"
859 echo " repository: ${repos[0]}"
860 echo " at the commit: ${new_commit_id}"
861 else
862 # diff against previous revision
863 echo "GIT update -->"
864 echo " repository: ${repos[0]}"
865 # write out message based on the revisions
866 if [[ "${old_commit_id}" != "${new_commit_id}" ]]; then
867 echo " updating from commit: ${old_commit_id}"
868 echo " to commit: ${new_commit_id}"
869
870 git --no-pager diff --stat \
871 ${old_commit_id}..${new_commit_id}
872 else
873 echo " at the commit: ${new_commit_id}"
874 fi
875 fi
876 git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die
877
878 # recursively checkout submodules
879 if [[ -f ${out_dir}/.gitmodules ]]; then
880 local submodules
881 _git-r3_set_submodules \
882 "$(<"${out_dir}"/.gitmodules)"
883
884 while [[ ${submodules[@]} ]]; do
885 local subname=${submodules[0]}
886 local url=${submodules[1]}
887 local path=${submodules[2]}
888
889 # use only submodules for which path does exist
890 # (this is in par with 'git submodule'), bug #551100
891 if [[ -d ${out_dir}/${path} ]]; then
892 local subrepos
893 _git-r3_set_subrepos "${url}" "${repos[@]}"
894
895 git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
896 "${local_id}/${subname}"
897 fi
898
899 submodules=( "${submodules[@]:3}" ) # shift
900 done
901 fi
902
903 # keep this *after* submodules
904 export EGIT_DIR=${GIT_DIR}
905 export EGIT_VERSION=${new_commit_id}
906}
907
908# @FUNCTION: git-r3_peek_remote_ref
909# @USAGE: [<repo-uri> [<remote-ref>]]
910# @DESCRIPTION:
911# Peek the reference in the remote repository and print the matching
912# (newest) commit SHA1.
913#
914# <repo-uri> specifies the repository URIs to fetch from, as a space-
915# -separated list. When not specified, defaults to ${EGIT_REPO_URI}.
916#
917# <remote-ref> specifies the remote ref to peek. It is preferred to use
918# 'refs/heads/<branch-name>' for branches and 'refs/tags/<tag-name>'
919# for tags. Alternatively, 'HEAD' may be used for upstream default
920# branch. Defaults to the first of EGIT_COMMIT, EGIT_BRANCH or literal
921# 'HEAD' that is set to a non-null value.
922#
923# The operation will be done purely on the remote, without using local
924# storage. If commit SHA1 is provided as <remote-ref>, the function will
925# fail due to limitations of git protocol.
926#
927# On success, the function returns 0 and writes hexadecimal commit SHA1
928# to stdout. On failure, the function returns 1.
929git-r3_peek_remote_ref() {
930 debug-print-function ${FUNCNAME} "$@"
931
932 local repos
933 if [[ ${1} ]]; then
934 repos=( ${1} )
935 elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
936 repos=( "${EGIT_REPO_URI[@]}" )
937 else
938 repos=( ${EGIT_REPO_URI} )
939 fi
940
941 local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
942 local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
943
944 [[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
945
946 local r success
947 for r in "${repos[@]}"; do
948 einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
949
950 local lookup_ref
951 if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
952 then
953 lookup_ref=${remote_ref}
954 else
955 # ls-remote by commit is going to fail anyway,
956 # so we may as well pass refs/tags/ABCDEF...
957 lookup_ref=refs/tags/${remote_ref}
958 fi
959
960 # split on whitespace
961 local ref=(
962 $(git ls-remote "${r}" "${lookup_ref}")
963 )
964
965 if [[ ${ref[0]} ]]; then
966 echo "${ref[0]}"
967 return 0
968 fi
969 done
970
971 return 1
972}
973
974git-r3_src_fetch() {
975 debug-print-function ${FUNCNAME} "$@"
976
977 if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
978 ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
979 ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"
980 ewarn "a different directory than EGIT_STORE_DIR to ease removing old clones"
981 ewarn "when git-2 eclass becomes deprecated."
982 fi
983
984 _git-r3_env_setup
985 git-r3_fetch
986}
987
988git-r3_src_unpack() {
989 debug-print-function ${FUNCNAME} "$@"
990
991 _git-r3_env_setup
992 git-r3_src_fetch
993 git-r3_checkout
994}
995
996# https://bugs.gentoo.org/show_bug.cgi?id=482666
997git-r3_pkg_needrebuild() {
998 debug-print-function ${FUNCNAME} "$@"
999
1000 local new_commit_id=$(git-r3_peek_remote_ref)
1001 [[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
1002
1003 if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
1004 einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
1005 else
1006 einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
1007 fi
1008
1009 [[ ${EGIT_VERSION} != ${new_commit_id} ]]
1010}
1011
1012# 'export' locally until this gets into EAPI
1013pkg_needrebuild() { git-r3_pkg_needrebuild; }
1014
1015_GIT_R3=1
1016fi
diff --git a/media-fonts/unscii/Manifest b/media-fonts/unscii/Manifest
new file mode 100644
index 0000000..5e6ec93
--- /dev/null
+++ b/media-fonts/unscii/Manifest
@@ -0,0 +1,25 @@
1DIST unscii-1.1-src.tar.gz 1181933 BLAKE2B 7757bd6d2062fb6fbafce9dc244468936b93a064b78bad41881bdcef6298e023d3dc7d8d8abebd95eb592bd30f0c0b10847ae8c9a40527bb9b88d1a106c1eba5 SHA512 4b172c8bfce53c588c10affc5f9b044ab099b3d87a00059de256543f46a7978ebc4e9470a6886ef379024bf18f2ed96968b31bfd25a3ff3db44d03c80f6fb55a
2DIST unscii-16-full.otf 6242788 BLAKE2B 872ed7ecce66fe15fee84ddb39531672bf0927ceac1c216ba1e72817135a6f522e719af47ea56fb4746876784c5d9545f63987246598d849c29f886efcf20409 SHA512 0ddf040ab4a9e3e9e11ec12b9ce633de79812690d6f86fb67c1586d43e420de9ca743fa83701c23cebd3d8a27b62148869aef06f30ef3937b8d53d50958eca6c
3DIST unscii-16-full.pcf 5338168 BLAKE2B 2ae5be5c7ff44d51f9a47abe48256c430df2227f9a72d37749c43de50043f367018ab182487a664f80281e75a3c233b6a08f55f39c6f96553df4cd721926f5b1 SHA512 5af92a6791055dbe3aa8eca824d204b344ecd6cdbaf0f3c122f7af0a0db00fbbe5ed065f64bdc3773f8155c24558a000f4e6e6503d7c9771167f44a593f5240e
4DIST unscii-16-full.ttf 11587408 BLAKE2B 4dcff84878aedbe7dcdd69b8a9a2303078c4c1810416bbcaeb42c0b200d288d9eca3e80a82944c88d068ed1080a8960103da41fae8a0dbaf5d625d80c151ba2f SHA512 fc79e3f892705337a039436e1c8782c03e20fff9470c774983319fa0462a00eaae496c16a60826ce8bab44fc87b0cd01ebecf0ced0f49a0e89278cb7e86773ef
5DIST unscii-16.otf 101768 BLAKE2B d13b18e9fd239381ed0ad58420d47d279b7d595b69a6ba144b78347aaed98708b6244af09561e8cbade728729e266428f42cc996cd84228d54ba9aac2b16fb9a SHA512 53863b2b74ba66825cf5e43a053f609e67a444fdf6f07ac13be8efad426cab3502e030d4e35d416c99e03ee784c85b7565a8472cf6de591f33c157f71414d462
6DIST unscii-16.pcf 344608 BLAKE2B 3c4a8a232979105116d30372247e5f09be19402b3ad5338bf5e5561f5eda99c994fd0f035e6a8877d19d14fca67c840aa998b523f23d1505828a8de20afb7eba SHA512 5e739257ad79bbb9dea12393a690889888ded296a19c8017a5d3d4725c907c3773de647663d5037f87cc23795ee1b3a7d16318be40f43f3fc9cce11681daf328
7DIST unscii-16.ttf 188204 BLAKE2B d9d08c52c8858b0d9e940dc8ee1c8970353aa35dbbae7f8bce29b3e3a778a6945d24a6ed236021223648f93b1175990b0baa3462621507f63f5e8c309bfff6c2 SHA512 d51ed256b6397082412de2ea9c4cbb494c8689003a55436339464a42f5ff59bd8c621550f1ab22f06fc9a390d2928a36d4f5cbfd25040d071f9e4649a6f3f128
8DIST unscii-8-alt.otf 97444 BLAKE2B 8495a8791e4191704231e1f0df0c5a752f29b1bc65acc2b7e691d77a1a844a9003f4b9cc65aa01bdaad0f46402682c382ab9f5bef26d2747a67693d905c1827f SHA512 0837ac766bd7881887156e7b6726e88a3ad50809ee65f39512f784deaf6f7f60d3619bca0fe199a9247075a65d4d4f874f288f009754423c2df9b78a995f35f4
9DIST unscii-8-alt.pcf 265984 BLAKE2B 0c6d81ef9008b16d93cab62147c50ad83675491e0706e5d0d17ac4df1c6fecbc7b0225a2d5e38e9dfb7bb8689dfe905ceb18aec638c1acffb01216fd5d2dba10 SHA512 607bbaa16f22465435412511b8d68aa44be9836cbd85a15bab4a32104a5625da5a5cd726c44dde1f1d15065be63df9e920183409bbaf5b6918d3e401bda2f6c3
10DIST unscii-8-alt.ttf 176696 BLAKE2B 00b0f459fdbd50b5187c20e6d671d088726718b1eb7e9ac7eb5758264be05d8f26a3fe4765b72098241f0177c0bc8a23253d54c46a42ef5f6469a1259c35b3b2 SHA512 02466b8350afe708e401430885443e10757695ed273829407e3d1da2c51c839873d95763b62e6afd136352026010ef569cb25ff68137e01fad6dcc8e37d01250
11DIST unscii-8-fantasy.otf 97916 BLAKE2B 4322e418dc8e060126790e651a3c5471afb2ef61918b936bbc89ad3e7f353b4879e75d0db56b3e015910a88b6db577d059c3be6f48cb66061d09a74a75f00909 SHA512 97a75bfc8072d63ee5f4bbd603cf99d000214561bf8d4cf936b5b713ad422b29d9c951c8eab75d2a25e013dfa182bba3fa2da141d0fb8db7c2eece3dd965fba9
12DIST unscii-8-fantasy.pcf 265992 BLAKE2B a78348ff3a632a146caa6b0bc1694385f888a89a64289431f9782b584702ce8579864c303dcbdc4267e6a41a69e1736d10fd99c57b23e0b4ebba99bf8b37e633 SHA512 8687f97a4aadcebd7bee2b9e2d39487c4553a2f652a3be2423cc5fbe720307c48dfe095cc88e2d5580ed52dd657477e48e72f1a18dd549bbd300680e5aaff6d9
13DIST unscii-8-fantasy.ttf 176888 BLAKE2B 8d7fe68c0d62a70d710c867b1bbb6f913838fb3255c1f120fbf3af3c335620bf24916d8da06fcbad3b59351aad5f8887bb571b51a08786c0f061667b2f2f01ab SHA512 40acb8f42eeef15ee842215e7c93784f754140607abe0f0a571b8cdedac79f4202fad2359333938759f7ef05e359d307d311773a5bed047a6b776845465b57fa
14DIST unscii-8-mcr.otf 96864 BLAKE2B 9c3b582ce6e66f3cf7c54db1f0f7c4fe94572302d59d03e0cf4972c9ffcd4999b20769585b7ef360d740be7cdc96dac58942d8d5beb2bfb25e4715e638266457 SHA512 4d0216a2fe270ebf2241b7874dd0924028f7fffa80d270b9bcdab2352b9a537f7205e4d50c4423049a2fb54ad088a97593ecd286bd64ce8fb75ab7c911b00d3b
15DIST unscii-8-mcr.pcf 265984 BLAKE2B 0922c0280ce09e585d98149f08b6599ca6622ae01bd174fbab4188cef72035e251371af58d4c387d51321e555a9bdaa329c7174f3d8b916b220e7b135a8db9a5 SHA512 2b336140a6b6dc9af683aaa20fcbe93078664c3f394d04dd966a8be65923e9592333d2a9d5549bf2fd760cadd0922afbaa92c4e3e21596b5871516d192b45b3f
16DIST unscii-8-mcr.ttf 174044 BLAKE2B 3a8bf5ae0d6f748bca5a340a3282c6b6ccf918c8a8ad2349cf7ace25394314d4997d5f11fc6e4685b142a67479aac48d3be66742c94154e746a87009b57d6d5b SHA512 15458d2e0129604fc74828758131101b2a6894dd7d4240b297b5c65d28eaa9405543a99bc2aad108b568e3d49aaf71053467d5b34eb9319e678d22d0c074c59c
17DIST unscii-8-tall.otf 138388 BLAKE2B 46cc7e5db68fc45d0690e8140c1ca16d6fabbebe5a2e4fe367b5eb4b2de794e1616fe33674c599bf618fb47a5597522a8b9019d55b00f556b0bd34868a0cd274 SHA512 6a28ad2f80a93f7d11ac752665412c6c8466f556dab4255f345ca9c89a45e2ef9c19f89052bfab4686de47804054f06a10658370c1a3ac31e692b00ad3e90ed3
18DIST unscii-8-tall.pcf 354504 BLAKE2B a06f49bc82037b939c8d42b4818b8f311f001bd43f480c343dde9035b9baafbc97349b49cd6a394611b2723bede9c23639c806b0f915f96641ee84e30acd4846 SHA512 1627ffa4d73082cdda479ca571478f26270a89148df3dd38d7ea5ad500be2d9b435d6f7dfb930219b0c0089358399396d717f98c097f277fbf8d5510f49b2d09
19DIST unscii-8-tall.ttf 275252 BLAKE2B 602c53268768fdf965942a4d112f66aabf951626ecbb379609c0e4a8976ec6630c731472c46daa71f86447b2534b0684e9bb8773f44f0ff826aa2b2a77bd34a0 SHA512 c81ccbd352e801d17aa6855782ae4ea957ff7c5fd3b9c9ad4efc2d5dc79edb34c395b489b7ef0cd400b52cdfcd38e657ae2f8239fecc36051c479973290d642a
20DIST unscii-8-thin.otf 98588 BLAKE2B 34df80c0d4b459f5de964a63764d59460f1a07ee2be5cff8e90921eacf6b86990b2c0891b5168971438e2e730a9c63e112e11d55a5870d4838a6dd147958177e SHA512 7a819a0e91291686962c23ed6f15b30ffe3fb66bb349a0a16e1a9cb13d4b6f8c830fbc1c26f1a2eef264a99a25927608ab87260efebeb8cfe0e2dd222c75ded4
21DIST unscii-8-thin.pcf 265984 BLAKE2B 5a5a27b97177168880835ebac8689d89f1589eea524df7af55bfc58d64ec578c19354f039c7916d7c8592e9da3e01effced9fcf7fa7208f32ff3b230fa5cc4e0 SHA512 c936fa49fcd2a5aab7a6ffe6fc9972c78835bf0435185f95480720da760fbaf4fcdd2309a717e6ed2fa3748d3932d92fa5f54158889e1cfd8b1a162b0ae5f713
22DIST unscii-8-thin.ttf 177052 BLAKE2B 7193d03f55180e31435283090c87df39dcfd7d8c684e039913a14bb625abcf7d8f4642c4fa19ab9aeb88ed2e3f71a392982fd2a798ed4d8ef4e0964e48f04a8a SHA512 30765d99499a733cc3af27e2d106b53dc4e56714b4059d9d5d65950bd701c331c111067c5df584967d3500733ea418a0f4c8cce2f1eb00936dd6e7c9b084e020
23DIST unscii-8.otf 95984 BLAKE2B e0f564a77f3533dc894c0eb193ac260bf1e1a4551c4cef7e600086de056c1d37aa84849511c5b760d16a7d73f88e97d59dabd9986f7d5483bca5c5d6ee0d9276 SHA512 b8d0b1e82c47d6d84705cc376d2c83193f81145f5562dce473dd3826d5587a172cedb063dfe731428c66a186b94267631792ad5b6e3500481f4414981c7ef08f
24DIST unscii-8.pcf 265980 BLAKE2B 8d3485240348aa898365768cc9a7280f0423f5a00eecbd2bd8e39e7c7cad4d9bd5338be285e80633f79fd75fd125148db37ef92b977c0e85baaa2c5516ef4a31 SHA512 294e37a471d1951b1fbfa2fc3445858ed605452f63f7f87922421343a0639643fba21556087231c64682c161cd307d100120d78c9001cc8e5352db5a42b34a8a
25DIST unscii-8.ttf 175664 BLAKE2B a80daabb3c009b41c21019839a7695fcabb5750a25181200ac2dd53aae7734b38ee674eaae52b64731b24ecd43aa07a5d2f4b107aa47d19ef4c84495d725a050 SHA512 b8d441eed6eb365595f437341ac77b7829326daa90734396b487ae3219d6b19009caff8b4a8bdcae12b9a90477c59724c3bf57afd59bbfd8d3ed5f3d2dd50d5a
diff --git a/media-fonts/unscii/metadata.xml b/media-fonts/unscii/metadata.xml
new file mode 100644
index 0000000..e2617ab
--- /dev/null
+++ b/media-fonts/unscii/metadata.xml
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4 <maintainer type="person">
5 <email>4nykey@gmail.com</email>
6 </maintainer>
7 <use>
8 <flag name="utils">Install bm2uns util to convert a bitmap image to unscii art</flag>
9 </use>
10</pkgmetadata>
diff --git a/media-fonts/unscii/unscii-1.1.ebuild b/media-fonts/unscii/unscii-1.1.ebuild
new file mode 100644
index 0000000..64b49b2
--- /dev/null
+++ b/media-fonts/unscii/unscii-1.1.ebuild
@@ -0,0 +1,112 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6MY_FONT_TYPES=( otf +pcf ttf )
7MY_FONT_VARIANTS=( alt fantasy mcr tall thin )
8inherit toolchain-funcs font-r1
9
10DESCRIPTION="A bitmapped Unicode font based on classic system fonts"
11HOMEPAGE="http://pelulamu.net/${PN}/"
12SRC_URI="
13 ${HOMEPAGE}${P}-src.tar.gz
14 binary? (
15 unicode? (
16 font_types_otf? ( ${HOMEPAGE}${PN}-16-full.otf )
17 font_types_pcf? ( ${HOMEPAGE}${PN}-16-full.pcf )
18 font_types_ttf? ( ${HOMEPAGE}${PN}-16-full.ttf )
19 )
20 !unicode? (
21 font_types_otf? ( ${HOMEPAGE}${PN}-16.otf )
22 font_types_pcf? ( ${HOMEPAGE}${PN}-16.pcf )
23 font_types_ttf? ( ${HOMEPAGE}${PN}-16.ttf )
24 )
25 font_types_otf? (
26 ${HOMEPAGE}${PN}-8.otf
27 font_variants_alt? ( ${HOMEPAGE}${PN}-8-alt.otf )
28 font_variants_fantasy? ( ${HOMEPAGE}${PN}-8-fantasy.otf )
29 font_variants_mcr? ( ${HOMEPAGE}${PN}-8-mcr.otf )
30 font_variants_tall? ( ${HOMEPAGE}${PN}-8-tall.otf )
31 font_variants_thin? ( ${HOMEPAGE}${PN}-8-thin.otf )
32 )
33 font_types_pcf? (
34 ${HOMEPAGE}${PN}-8.pcf
35 font_variants_alt? ( ${HOMEPAGE}${PN}-8-alt.pcf )
36 font_variants_fantasy? ( ${HOMEPAGE}${PN}-8-fantasy.pcf )
37 font_variants_mcr? ( ${HOMEPAGE}${PN}-8-mcr.pcf )
38 font_variants_tall? ( ${HOMEPAGE}${PN}-8-tall.pcf )
39 font_variants_thin? ( ${HOMEPAGE}${PN}-8-thin.pcf )
40 )
41 font_types_ttf? (
42 ${HOMEPAGE}${PN}-8.ttf
43 font_variants_alt? ( ${HOMEPAGE}${PN}-8-alt.ttf )
44 font_variants_fantasy? ( ${HOMEPAGE}${PN}-8-fantasy.ttf )
45 font_variants_mcr? ( ${HOMEPAGE}${PN}-8-mcr.ttf )
46 font_variants_tall? ( ${HOMEPAGE}${PN}-8-tall.ttf )
47 font_variants_thin? ( ${HOMEPAGE}${PN}-8-thin.ttf )
48 )
49 )
50"
51RESTRICT="primaryuri"
52
53LICENSE="OFL-1.1"
54SLOT="0"
55KEYWORDS="~amd64 ~x86"
56IUSE="+binary unicode utils"
57
58RDEPEND="
59 utils? ( media-libs/sdl-image )
60"
61DEPEND="
62 ${RDEPEND}
63 !binary? (
64 dev-lang/perl
65 font_types_otf? ( media-gfx/fontforge )
66 font_types_ttf? ( media-gfx/fontforge )
67 font_types_pcf? ( x11-apps/bdftopcf )
68 unicode? (
69 media-fonts/unifont[utils]
70 )
71 )
72 utils? ( dev-lang/perl )
73"
74S="${WORKDIR}/${P}-src"
75DOCS=( ${PN}.txt )
76
77src_unpack() {
78 unpack ${P}-src.tar.gz
79 use binary && cp -L "${DISTDIR}"/*.*f "${S}"
80}
81
82src_prepare() {
83 default
84 use binary && return
85 use unicode && cp "${EROOT}"usr/share/unifont/unifont.hex "${S}"
86 local _t='\<woff\>'
87 use font_types_otf || _t+='\|\<otf\>'
88 use font_types_ttf || _t+='\|\<ttf\>'
89 sed -e "/\(${_t}\)/d" -i makevecfonts.ff
90}
91
92src_compile() {
93 use utils && emake CC="$(tc-getCC) ${CFLAGS}" bm2uns
94 use binary && return
95 local _s _v _t=( )
96 for _s in ${FONT_SUFFIX}; do
97 _s=${_s/otf/ttf}
98 _t+=(
99 ${PN}-8.${_s}
100 ${PN}-16$(usex unicode '-full' '').${_s}
101 )
102 for _v in "${MY_FONT_VARIANTS[@]}"; do
103 has ${_v} ${USE} && _t+=( ${PN}-8-${_v#font_variants_}.${_s} )
104 done
105 done
106 emake CC="$(tc-getCC) ${CFLAGS}" "${_t[@]}"
107}
108
109src_install() {
110 font-r1_src_install
111 use utils && dobin bm2uns
112}
diff --git a/net-im/gajim/Manifest b/net-im/gajim/Manifest
new file mode 100644
index 0000000..8055cbb
--- /dev/null
+++ b/net-im/gajim/Manifest
@@ -0,0 +1,3 @@
1DIST gajim-0.16.6.tar.bz2 4564505 BLAKE2B 0446d826afc782ceba4fe67d6c7173d60264ec1b5a227f0da62285ea1d083143b4895e4472c2df499de419f9a34c59d9afa1ac2348052defb100438782a3df46 SHA512 6c8c2a38429468a1e6f02aae730ff947c649960e8cc672457c1e1733ab2dad6534b1e5ac2e1c0c385e331a6ba817c6e67c1a27443632b9fd43e7ab76ad66c935
2DIST gajim-0.16.9.tar.bz2 4469275 BLAKE2B 451f09cde9d177932429b9ece900e09c58ac43b5f97cd64cf70e75d13f2261ab52ee35e02e8680c83a5d81d7574bca561532dd1327f1109b0cc872956b1a05f7 SHA512 d8ddae3826bbcd4458b016b3cf6b0472b41db4b9026b300b058d9cef403195e38423ff950fcbf6fed0cdbbb485a274905a9a5945028c4cbb24d1a38c72bf4cbb
3DIST gajim-1.0.3.tar.bz2 5964743 BLAKE2B af4bf2206a962eb68c4df09359fa3a0ccaca1e886d4fad67d9839f5fd4c1fd359c7ee7933d39d8c1ae7dcbde6b72548fef3564a467653064d4d37aa1db234c04 SHA512 a6d7f92a22a9dddc8a4b07eda0aae0b6fb4db57c73133ee19937f7e2a2a82c5351051d1f3627c94a44434276ed001b83d375f708f177962125af66cda8579ec8
diff --git a/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch b/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch
new file mode 100644
index 0000000..046c72c
--- /dev/null
+++ b/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch
@@ -0,0 +1,45 @@
1From 285392b27db7cb01b0566b4bda3920e6559b75e4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <forenjunkie@chello.at>
3Date: Fri, 26 May 2017 23:10:05 +0200
4Subject: [PATCH] Add config option to activate XEP-0146 commands
5
6Some of the Commands have security implications, thats why we disable them per default
7Fixes #8378
8---
9 src/common/commands.py | 7 ++++---
10 src/common/config.py | 1 +
11 2 files changed, 5 insertions(+), 3 deletions(-)
12
13diff --git a/src/common/commands.py b/src/common/commands.py
14index 40d700710..46d6947f8 100644
15--- a/src/common/commands.py
16+++ b/src/common/commands.py
17@@ -345,9 +345,10 @@ class ConnectionCommands:
18 def __init__(self):
19 # a list of all commands exposed: node -> command class
20 self.__commands = {}
21- for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
22- LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
23- self.__commands[cmdobj.commandnode] = cmdobj
24+ if gajim.config.get('remote_commands'):
25+ for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
26+ LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
27+ self.__commands[cmdobj.commandnode] = cmdobj
28
29 # a list of sessions; keys are tuples (jid, sessionid, node)
30 self.__sessions = {}
31diff --git a/src/common/config.py b/src/common/config.py
32index 3884d9e1d..7c1313fc4 100644
33--- a/src/common/config.py
34+++ b/src/common/config.py
35@@ -313,6 +313,7 @@ class Config:
36 'ignore_incoming_attention': [opt_bool, False, _('If True, Gajim will ignore incoming attention requestd ("wizz").')],
37 'remember_opened_chat_controls': [ opt_bool, True, _('If enabled, Gajim will reopen chat windows that were opened last time Gajim was closed.')],
38 'positive_184_ack': [ opt_bool, False, _('If enabled, Gajim will show an icon to show that sent message has been received by your contact')],
39+ 'remote_commands': [opt_bool, False, _('If True, Gajim will execute XEP-0146 Commands.')],
40 }, {})
41
42 __options_per_key = {
43--
442.12.2
45
diff --git a/net-im/gajim/files/disable-gspell-1.1.0.patch b/net-im/gajim/files/disable-gspell-1.1.0.patch
new file mode 100644
index 0000000..45c16a1
--- /dev/null
+++ b/net-im/gajim/files/disable-gspell-1.1.0.patch
@@ -0,0 +1,21 @@
1--- a/gajim/common/app.py 2018-11-06 23:57:20.088079001 +0100
2+++ a/gajim/common/app.py 2018-11-06 23:58:36.638834033 +0100
3@@ -299,17 +299,7 @@
4 pass
5
6 # GSPELL
7- try:
8- gi.require_version('Gspell', '1')
9- from gi.repository import Gspell
10- langs = Gspell.language_get_available()
11- for lang in langs:
12- log('gajim').info('%s (%s) dict available',
13- lang.get_name(), lang.get_code())
14- if langs:
15- _dependencies['GSPELL'] = True
16- except (ImportError, ValueError):
17- pass
18+ # [REMOVED BY EBUILD]
19
20 # Print results
21 for dep, val in _dependencies.items():
diff --git a/net-im/gajim/gajim-0.16.6-r1.ebuild b/net-im/gajim/gajim-0.16.6-r1.ebuild
new file mode 100644
index 0000000..8d50c46
--- /dev/null
+++ b/net-im/gajim/gajim-0.16.6-r1.ebuild
@@ -0,0 +1,126 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6PYTHON_COMPAT=( python2_7 )
7PYTHON_REQ_USE="sqlite,xml"
8
9AUTOTOOLS_AUTORECONF=true
10
11inherit autotools-utils python-r1 versionator
12
13MY_PV=${PV/_/-}
14MY_P="${PN}-${MY_PV}"
15
16DESCRIPTION="Jabber client written in PyGTK"
17HOMEPAGE="https://www.gajim.org/"
18SRC_URI="
19 https://www.gajim.org/downloads/$(get_version_component_range 1-2)/${MY_P}.tar.bz2"
20# test? ( https://dev.gentoo.org/~jlec/distfiles/${PN}-tests-${PV}.tar.xz )"
21
22LICENSE="GPL-3"
23SLOT="0"
24KEYWORDS="amd64 arm x86 ~x86-fbsd"
25IUSE="crypt dbus gnome gnome-keyring kde idle jingle libnotify networkmanager nls spell +srv test X xhtml zeroconf"
26
27REQUIRED_USE="
28 ${PYTHON_REQUIRED_USE}
29 libnotify? ( dbus )
30 gnome? ( gnome-keyring )
31 zeroconf? ( dbus )"
32
33COMMON_DEPEND="
34 ${PYTHON_DEPS}
35 dev-python/pygtk:2[${PYTHON_USEDEP}]
36 x11-libs/gtk+:2"
37DEPEND="${COMMON_DEPEND}
38 >=dev-util/intltool-0.40.1
39 virtual/pkgconfig
40 >=sys-devel/gettext-0.17-r1"
41RDEPEND="${COMMON_DEPEND}
42 dev-python/pyasn1[${PYTHON_USEDEP}]
43 >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
44 !>=dev-python/pyopenssl-17.4.0[${PYTHON_USEDEP}]
45 >=dev-python/python-nbxmpp-0.5.3[${PYTHON_USEDEP}]
46 crypt? (
47 app-crypt/gnupg
48 dev-python/pycrypto[${PYTHON_USEDEP}]
49 )
50 dbus? (
51 dev-python/dbus-python[${PYTHON_USEDEP}]
52 dev-libs/dbus-glib
53 libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
54 zeroconf? ( net-dns/avahi[dbus,gtk,python,${PYTHON_USEDEP}] )
55 )
56 gnome? (
57 dev-python/libgnome-python[${PYTHON_USEDEP}]
58 dev-python/egg-python[${PYTHON_USEDEP}]
59 )
60 gnome-keyring? ( dev-python/gnome-keyring-python[${PYTHON_USEDEP}] )
61 idle? ( x11-libs/libXScrnSaver )
62 jingle? ( net-libs/farstream:0.1[python,${PYTHON_USEDEP}] )
63 kde? ( kde-apps/kwalletmanager )
64 networkmanager? (
65 dev-python/dbus-python[${PYTHON_USEDEP}]
66 net-misc/networkmanager
67 )
68 spell? ( app-text/gtkspell:2 )
69 srv? (
70 || (
71 dev-python/libasyncns-python[${PYTHON_USEDEP}]
72 net-dns/bind-tools
73 )
74 )
75 xhtml? ( dev-python/docutils[${PYTHON_USEDEP}] )"
76
77RESTRICT="test"
78
79PATCHES=(
80 "${FILESDIR}/${PV}-0001-Add-config-option-to-activate-XEP-0146.patch" )
81
82S="${WORKDIR}"/${MY_P}
83
84src_prepare() {
85 autotools-utils_src_prepare
86 python_copy_sources
87}
88
89src_configure() {
90 configuration() {
91 local myeconfargs=(
92 $(use_enable nls)
93 $(use_with X x)
94 --docdir="/usr/share/doc/${PF}"
95 --libdir="$(python_get_sitedir)"
96 --enable-site-packages
97 )
98 run_in_build_dir autotools-utils_src_configure
99 }
100 python_foreach_impl configuration
101}
102
103src_compile() {
104 compilation() {
105 run_in_build_dir autotools-utils_src_compile
106 }
107 python_foreach_impl compilation
108}
109
110src_test() {
111 testing() {
112 run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
113 }
114 python_foreach_impl testing
115}
116
117src_install() {
118 installation() {
119 run_in_build_dir autotools-utils_src_install
120 python_optimize
121 }
122 python_foreach_impl installation
123
124 rm "${ED}/usr/share/doc/${PF}/README.html" || die
125 dohtml README.html
126}
diff --git a/net-im/gajim/gajim-0.16.9.ebuild b/net-im/gajim/gajim-0.16.9.ebuild
new file mode 100644
index 0000000..50310bd
--- /dev/null
+++ b/net-im/gajim/gajim-0.16.9.ebuild
@@ -0,0 +1,125 @@
1# Copyright 1999-2017 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=5
5
6PYTHON_COMPAT=( python2_7 )
7PYTHON_REQ_USE="sqlite,xml"
8
9AUTOTOOLS_AUTORECONF=true
10
11inherit autotools-utils gnome2-utils python-r1 versionator xdg-utils
12
13MY_PV=${PV/_/-}
14MY_P="${PN}-${MY_PV}"
15
16DESCRIPTION="Jabber client written in PyGTK"
17HOMEPAGE="https://www.gajim.org/"
18SRC_URI="
19 https://www.gajim.org/downloads/$(get_version_component_range 1-2)/${MY_P}.tar.bz2"
20# test? ( https://dev.gentoo.org/~jlec/distfiles/${PN}-tests-${PV}.tar.xz )"
21
22LICENSE="GPL-3"
23SLOT="0"
24KEYWORDS="~amd64 ~arm ~x86 ~x86-fbsd"
25IUSE="crypt dbus gnome gnome-keyring idle jingle libnotify networkmanager nls spell +srv test X xhtml zeroconf"
26
27REQUIRED_USE="
28 ${PYTHON_REQUIRED_USE}
29 libnotify? ( dbus )
30 gnome? ( gnome-keyring )
31 zeroconf? ( dbus )"
32
33COMMON_DEPEND="
34 ${PYTHON_DEPS}
35 dev-python/pygtk:2[${PYTHON_USEDEP}]
36 x11-libs/gtk+:2"
37DEPEND="${COMMON_DEPEND}
38 >=dev-util/intltool-0.40.1
39 virtual/pkgconfig
40 >=sys-devel/gettext-0.17-r1"
41RDEPEND="${COMMON_DEPEND}
42 dev-python/pyasn1[${PYTHON_USEDEP}]
43 >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
44 >=dev-python/python-nbxmpp-0.6.1[${PYTHON_USEDEP}]
45 crypt? ( >=dev-python/python-gnupg-0.4.0[${PYTHON_USEDEP}] )
46 dbus? (
47 dev-python/dbus-python[${PYTHON_USEDEP}]
48 dev-libs/dbus-glib
49 libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
50 zeroconf? ( net-dns/avahi[dbus,gtk,python,${PYTHON_USEDEP}] )
51 )
52 gnome? (
53 dev-python/libgnome-python[${PYTHON_USEDEP}]
54 dev-python/egg-python[${PYTHON_USEDEP}]
55 )
56 gnome-keyring? ( dev-python/gnome-keyring-python[${PYTHON_USEDEP}] )
57 idle? ( x11-libs/libXScrnSaver )
58 jingle? ( net-libs/farstream:0.1[python,${PYTHON_USEDEP}] )
59 networkmanager? (
60 dev-python/dbus-python[${PYTHON_USEDEP}]
61 net-misc/networkmanager
62 )
63 spell? ( app-text/gtkspell:2 )
64 srv? (
65 || (
66 dev-python/libasyncns-python[${PYTHON_USEDEP}]
67 net-dns/bind-tools
68 )
69 )
70 xhtml? ( dev-python/docutils[${PYTHON_USEDEP}] )"
71
72RESTRICT="test"
73
74S="${WORKDIR}"/${MY_P}
75
76src_prepare() {
77 autotools-utils_src_prepare
78 python_copy_sources
79}
80
81src_configure() {
82 configuration() {
83 local myeconfargs=(
84 $(use_enable nls)
85 $(use_with X x)
86 --docdir="/usr/share/doc/${PF}"
87 --libdir="$(python_get_sitedir)"
88 --enable-site-packages
89 )
90 run_in_build_dir autotools-utils_src_configure
91 }
92 python_foreach_impl configuration
93}
94
95src_compile() {
96 compilation() {
97 run_in_build_dir autotools-utils_src_compile
98 }
99 python_foreach_impl compilation
100}
101
102src_test() {
103 testing() {
104 run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
105 }
106 python_foreach_impl testing
107}
108
109src_install() {
110 installation() {
111 run_in_build_dir autotools-utils_src_install
112 python_optimize
113 }
114 python_foreach_impl installation
115}
116
117pkg_postinst() {
118 gnome2_icon_cache_update
119 xdg_desktop_database_update
120}
121
122pkg_postrm() {
123 gnome2_icon_cache_update
124 xdg_desktop_database_update
125}
diff --git a/net-im/gajim/gajim-1.0.3-r3.ebuild b/net-im/gajim/gajim-1.0.3-r3.ebuild
new file mode 100644
index 0000000..3f52531
--- /dev/null
+++ b/net-im/gajim/gajim-1.0.3-r3.ebuild
@@ -0,0 +1,87 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6PYTHON_COMPAT=( python3_{5,6} )
7PYTHON_REQ_USE="sqlite,xml"
8DISTUTILS_SINGLE_IMPL=1
9
10inherit gnome2-utils distutils-r1 versionator xdg-utils
11
12DESCRIPTION="Jabber client written in PyGTK"
13HOMEPAGE="https://www.gajim.org/"
14SRC_URI="https://www.gajim.org/downloads/$(get_version_component_range 1-2)/${P}.tar.bz2"
15#https://ftp.gajim.org/plugins_1/plugin_installer.zip -> ${P}-plugin_installer.zip"
16
17LICENSE="GPL-3"
18SLOT="0"
19KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
20IUSE="gpg +crypt remote idle jingle keyring networkmanager upnp geoclue spell +webp rst omemo"
21
22COMMON_DEPEND="
23 dev-libs/gobject-introspection[cairo,${PYTHON_USEDEP}]
24 x11-libs/gtk+:3[introspection]"
25DEPEND="${COMMON_DEPEND}
26 app-arch/unzip
27 >=dev-util/intltool-0.40.1
28 virtual/pkgconfig
29 >=sys-devel/gettext-0.17-r1"
30RDEPEND="${COMMON_DEPEND}
31 dev-python/pyasn1[${PYTHON_USEDEP}]
32 dev-python/pycairo[${PYTHON_USEDEP}]
33 dev-python/pygobject:3[${PYTHON_USEDEP}]
34 >=dev-python/python-nbxmpp-0.6.6[${PYTHON_USEDEP}]
35 dev-python/pyopenssl[${PYTHON_USEDEP}]
36 dev-python/idna[${PYTHON_USEDEP}]
37 dev-python/precis-i18n[${PYTHON_USEDEP}]
38 dev-python/pycurl[${PYTHON_USEDEP}]
39 crypt? ( dev-python/pycryptodome[${PYTHON_USEDEP}] )
40 gpg? ( >=dev-python/python-gnupg-0.4.0[${PYTHON_USEDEP}] )
41 idle? ( x11-libs/libXScrnSaver )
42 remote? (
43 >=dev-python/dbus-python-1.2.0[${PYTHON_USEDEP}]
44 dev-libs/dbus-glib
45 )
46 rst? ( dev-python/docutils[${PYTHON_USEDEP}] )
47 keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
48 jingle? (
49 net-libs/farstream:0.2[introspection]
50 media-libs/gstreamer:1.0[introspection]
51 media-libs/gst-plugins-base:1.0[introspection]
52 media-libs/gst-plugins-ugly:1.0
53 )
54 networkmanager? ( net-misc/networkmanager[introspection] )
55 upnp? ( net-libs/gupnp-igd[introspection] )
56 geoclue? ( app-misc/geoclue[introspection] )
57 spell? (
58 app-text/gspell[introspection]
59 app-text/hunspell
60 )
61 omemo? (
62 dev-python/python-axolotl[${PYTHON_USEDEP}]
63 dev-python/qrcode[${PYTHON_USEDEP}]
64 )
65 webp? ( dev-python/pillow[${PYTHON_USEDEP}] )
66"
67
68RESTRICT="test"
69
70src_prepare() {
71 ewarn "I will not update the Gajim ebuilds in the future since they are"
72 ewarn "available in the pzskc383 repo. Please use that instead."
73
74 default
75
76 use spell || eapply "${FILESDIR}/disable-gspell.patch"
77}
78
79pkg_postinst() {
80 gnome2_icon_cache_update
81 xdg_desktop_database_update
82}
83
84pkg_postrm() {
85 gnome2_icon_cache_update
86 xdg_desktop_database_update
87}
diff --git a/net-im/gajim/gajim-9999.ebuild b/net-im/gajim/gajim-9999.ebuild
new file mode 100644
index 0000000..47dcedf
--- /dev/null
+++ b/net-im/gajim/gajim-9999.ebuild
@@ -0,0 +1,111 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=7
5
6PYTHON_COMPAT=( python3_{5,6} )
7PYTHON_REQ_USE="sqlite,xml"
8DISTUTILS_SINGLE_IMPL=1
9
10inherit git-r3 python-r1
11
12DESCRIPTION="Jabber client written in PyGTK"
13HOMEPAGE="http://www.gajim.org/"
14EGIT_REPO_URI="https://dev.gajim.org/gajim/gajim.git"
15
16LICENSE="GPL-3"
17SLOT="0"
18KEYWORDS=""
19IUSE="gpg +crypt remote idle jingle keyring networkmanager upnp geoclue spell +webp rst omemo"
20
21COMMON_DEPEND="
22 dev-libs/gobject-introspection[cairo,${PYTHON_USEDEP}]
23 x11-libs/gtk+:3[introspection]"
24DEPEND="${COMMON_DEPEND}
25 app-arch/unzip
26 >=dev-util/intltool-0.40.1
27 virtual/pkgconfig
28 >=sys-devel/gettext-0.17-r1"
29RDEPEND="${COMMON_DEPEND}
30 dev-python/pyasn1[${PYTHON_USEDEP}]
31 dev-python/pycairo[${PYTHON_USEDEP}]
32 dev-python/pygobject:3[${PYTHON_USEDEP}]
33 >=dev-python/python-nbxmpp-0.6.6[${PYTHON_USEDEP}]
34 dev-python/pyopenssl[${PYTHON_USEDEP}]
35 dev-python/idna[${PYTHON_USEDEP}]
36 dev-python/precis-i18n[${PYTHON_USEDEP}]
37 dev-python/pycurl[${PYTHON_USEDEP}]
38 crypt? ( dev-python/pycryptodome[${PYTHON_USEDEP}] )
39 gpg? ( >=dev-python/python-gnupg-0.4.0[${PYTHON_USEDEP}] )
40 idle? ( x11-libs/libXScrnSaver )
41 remote? (
42 >=dev-python/dbus-python-1.2.0[${PYTHON_USEDEP}]
43 dev-libs/dbus-glib
44 )
45 rst? ( dev-python/docutils[${PYTHON_USEDEP}] )
46 keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
47 jingle? (
48 net-libs/farstream:0.2[introspection]
49 media-libs/gstreamer:1.0[introspection]
50 media-libs/gst-plugins-base:1.0[introspection]
51 media-libs/gst-plugins-ugly:1.0
52 )
53 networkmanager? ( net-misc/networkmanager[introspection] )
54 upnp? ( net-libs/gupnp-igd[introspection] )
55 geoclue? ( app-misc/geoclue[introspection] )
56 spell? (
57 app-text/gspell[introspection]
58 app-text/hunspell
59 )
60 omemo? (
61 dev-python/python-axolotl[${PYTHON_USEDEP}]
62 dev-python/qrcode[${PYTHON_USEDEP}]
63 )
64 webp? ( dev-python/pillow[${PYTHON_USEDEP}] )
65"
66
67RESTRICT="test"
68
69src_prepare() {
70 autotools-utils_src_prepare
71 python_copy_sources
72}
73
74src_configure() {
75 configuration() {
76 local myeconfargs=(
77 $(use_enable nls)
78 $(use_with X x)
79 --docdir="/usr/share/doc/${PF}"
80 --libdir="$(python_get_sitedir)"
81 --enable-site-packages
82 )
83 run_in_build_dir autotools-utils_src_configure
84 }
85 python_foreach_impl configuration
86}
87
88src_compile() {
89 compilation() {
90 run_in_build_dir autotools-utils_src_compile
91 }
92 python_foreach_impl compilation
93}
94
95src_test() {
96 testing() {
97 run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
98 }
99 python_foreach_impl testing
100}
101
102src_install() {
103 installation() {
104 run_in_build_dir autotools-utils_src_install
105 python_optimize
106 }
107 python_foreach_impl installation
108
109 rm "${ED}/usr/share/doc/${PF}/README.html" || die
110 dohtml README.html
111}
diff --git a/net-im/gajim/metadata.xml b/net-im/gajim/metadata.xml
new file mode 100644
index 0000000..4ed46fb
--- /dev/null
+++ b/net-im/gajim/metadata.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4 <maintainer type="person">
5 <email>aidecoe@gentoo.org</email>
6 </maintainer>
7 <longdescription>
8 A fully featured and easy to use GTK+ Jabber client written in PyGTK.
9 </longdescription>
10 <use>
11 <flag name="idle">Enable idle module</flag>
12 <flag name="srv">SRV capabilities</flag>
13 <flag name="xhtml">Enable XHTML support</flag>
14 </use>
15</pkgmetadata>
diff --git a/profiles/package.mask b/profiles/package.mask
index 8e891ab..850dcf3 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -25,3 +25,4 @@ net-im/cutegram
25 25
26# unfinished 26# unfinished
27www-client/hardzilla 27www-client/hardzilla
28=www-plugins/gnash-9999
diff --git a/www-plugins/gnash/Manifest b/www-plugins/gnash/Manifest
new file mode 100644
index 0000000..60e4956
--- /dev/null
+++ b/www-plugins/gnash/Manifest
@@ -0,0 +1,8 @@
1AUX gnash-0.8.10-amf-include.patch 1245 BLAKE2B f73c74329ae848e6dc1674d58179d5c04cb30dd7b4dcfe30b0e09ed350ad2ceabc7d5b1fde2866fc691f558cbe277bde3f594b6b5e11609b404998312a8b3d49 SHA512 46c2b9d4a57a1180626760ebcdbcbdc10c01fba4e01d8c45378ad26da3bf1181daaa54a2c88419452b6e691467c1ccb77374d8e926776b5f1b93ee2baa875986
2AUX gnash-0.8.10_p20150316-boost-1.60.patch 746 BLAKE2B cdb98c9424940aa5b2596bd94f037708211323f2fa1d371ba923d12f1279644e517bd4eccaa42528b13e452e915b8ebd7e6f032e8add1be7590a76e9a02f7599 SHA512 302946a47710978471837a8ddacd4be0eaf116cd6d1389f98155a939df774d61557eaafcec473cfdb37c06439b6f7cc5de8a5494fb880aa62669df5d951feb5d
3AUX gnash-0.8.9-external-dejagnu.patch 700 BLAKE2B c01f515259aa96076cf47f0f3a5553b405dae0ce997dc50310207189fc3aacd89a6f3158bb8ec47ff6a30072d872884f159c7e3c35176929639bb0222775887a SHA512 1b6714e0d44d3d43dcef53622cb6a8c153a1e336a99ef5ee13de1a092e54dc1b1c346e4468e9ea66035762195bd45b84dd185370bb726427472e5b5d6b470556
4AUX gnash-0.8.9-kde4-libdir.patch 498 BLAKE2B ae7d071ef8026e134415481b613c343fea78e038ba7568a6b05e319eaf7c02ec6a20502a7486e560beec30f05d50716ec468456f5a0fd5b88c94c64f71bc5c1a SHA512 df1a6faf5b3cae8a519b590ee3e26009b5a194a01f5dacc5b1862751118d1172f0babf85f7641d6b8e898d5013b6c11002c593df589c57312d842930ab964341
5AUX gnash-0.8.9-klash.patch 471 BLAKE2B 0006bfe83a78dd923766972b44138ceea36befaaf5e9b09560e2a06b0d902791a8d7645e32d357196264fc126c34d448585672647cf800085e07a48138fd5980 SHA512 4a57310522ac2323eee26bb027432b12606d91add6d528b31afd69e172c73aa9f80bafc7c0a84fed4214773f901b65ddea4a7de67865f82a2984ac1dfe274c4d
6DIST gnash-0.8.10_p20160329.tar.xz 4079572 BLAKE2B 4d5f4799add9d2e00a9b9322dc48be0b8b3c9f790dc5881d9fba6e4d9646537786f7644d3dbbf3bd259d1975062438af071eb2ab28c661de2b5510368c9d218e SHA512 e8956d6277dde29a22bfe5af4279b40f80dad5659961d042e0bb57505b084f3ef1b489cf6fdf06730a8f3e2f9fdb737d7b1bc015a0255a80b167b98e686aa245
7EBUILD gnash-0.8.10_p20160329-r667.ebuild 6514 BLAKE2B 1e9d5c14c5460a8416d820eed3c8c2562e6807a27c2f0c37427b96ddab12bddf8433ca0dfe833852946a6ceed3650dc16fc135a5cf1e7abf265365b8e805fea0 SHA512 a0d6a953779154e042a2e2480038ba32c9de4177e1837b16f616dd05766a483142ba4e19f867f1caaaf3b5950e0591d3af19f83d671bee196ac3c565be3012af
8MISC metadata.xml 1086 BLAKE2B d00c9a09b846c88412200030a6744cc2a0fad5cbbeabf054ef3fac4e658061355a2133b4ef374904d4553d8cd3cce9ae806da4d1e3dd2b0e4161f39db912cea4 SHA512 819c7c00ab2ed21cb5826f534fe8cc51394d41a67e038f9f0ca707061494af1954a242b8cf9f67c3952d20dc4f8eff47b759d8b8e197e0207e617c20786f6c73
diff --git a/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch b/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch
new file mode 100644
index 0000000..983fa6b
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10-amf-include.patch
@@ -0,0 +1,45 @@
1diff -ur a/cygnal/libnet/cque.h b/cygnal/libnet/cque.h
2--- a/cygnal/libnet/cque.h 2012-01-19 20:17:47.000000000 +0100
3+++ b/cygnal/libnet/cque.h 2012-02-23 20:13:39.000000000 +0100
4@@ -25,8 +25,9 @@
5 #include <boost/thread/condition.hpp>
6 #include <deque>
7
8+#include "../libamf/amf.h"
9 #include "getclocktime.hpp"
10-#include "buffer.h"
11+#include "../libamf/buffer.h"
12 #include "network.h"
13 #include "dsodefs.h" //For DSOEXPORT.
14
15diff -ur a/cygnal/libnet/sshclient.h b/cygnal/libnet/sshclient.h
16--- a/cygnal/libnet/sshclient.h 2012-01-19 20:17:47.000000000 +0100
17+++ b/cygnal/libnet/sshclient.h 2012-02-23 20:13:09.000000000 +0100
18@@ -32,9 +32,10 @@
19 #include <libssh/sftp.h>
20 }
21
22+#include "../libamf/amf.h"
23 #include "cque.h"
24 #include "network.h"
25-#include "buffer.h"
26+#include "../libamf/buffer.h"
27
28 namespace gnash
29 {
30diff -ur a/cygnal/libnet/sslclient.h b/cygnal/libnet/sslclient.h
31--- a/cygnal/libnet/sslclient.h 2012-01-19 20:17:47.000000000 +0100
32+++ b/cygnal/libnet/sslclient.h 2012-02-23 20:13:21.000000000 +0100
33@@ -36,10 +36,11 @@
34 #include <openssl/err.h>
35 #endif
36
37+#include "../libamf/amf.h"
38 #include "dsodefs.h"
39 #include "cque.h"
40 #include "network.h"
41-#include "buffer.h"
42+#include "../libamf/buffer.h"
43
44
45 namespace gnash
diff --git a/www-plugins/gnash/files/gnash-0.8.10_p20150316-boost-1.60.patch b/www-plugins/gnash/files/gnash-0.8.10_p20150316-boost-1.60.patch
new file mode 100644
index 0000000..6671d36
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.10_p20150316-boost-1.60.patch
@@ -0,0 +1,24 @@
1diff --git i/libbase/accumulator.h w/libbase/accumulator.h
2index 694cbd2..876c669 100644
3--- i/libbase/accumulator.h
4+++ w/libbase/accumulator.h
5@@ -22,6 +22,7 @@
6
7 #include <boost/program_options/value_semantic.hpp>
8 #include <boost/any.hpp>
9+#include <boost/version.hpp>
10 #include <functional>
11 #include <vector>
12 #include <string>
13@@ -61,6 +62,11 @@ public:
14 virtual unsigned min_tokens() const { return 0; }
15 virtual unsigned max_tokens() const { return 0; }
16
17+#if BOOST_VERSION >= 105900
18+ /// There are no tokens, so this is indifferent.
19+ virtual bool adjacent_tokens_only() const { return false; }
20+#endif
21+
22 /// Accumulating from different sources is silly.
23 virtual bool is_composing() const { return false; }
24
diff --git a/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch b/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch
new file mode 100644
index 0000000..eaffda7
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-external-dejagnu.patch
@@ -0,0 +1,24 @@
1diff -ur a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
2--- a/plugin/npapi/test.cpp 2011-03-13 17:47:36.000000000 +0100
3+++ b/plugin/npapi/test.cpp 2011-03-20 23:52:20.369998096 +0100
4@@ -35,7 +35,7 @@
5 #include "npfunctions.h"
6 #endif
7 #include "pluginbase.h"
8-#include "dejagnu.h"
9+#include <dejagnu.h>
10 #include "../../testsuite/check.h"
11 #include <regex.h>
12
13diff -ur a/testsuite/check.h b/testsuite/check.h
14--- a/testsuite/check.h 2011-02-26 19:11:08.000000000 +0100
15+++ b/testsuite/check.h 2011-03-20 23:52:32.570998094 +0100
16@@ -29,7 +29,7 @@
17
18 #define HAVE_DEJAGNU_H 1 // we ship our own now...
19 #ifdef HAVE_DEJAGNU_H
20-#include "dejagnu.h"
21+#include <dejagnu.h>
22
23 #define info(x) note x
24
diff --git a/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch b/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch
new file mode 100644
index 0000000..b327944
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-kde4-libdir.patch
@@ -0,0 +1,12 @@
1diff -ur a/macros/kde4.m4 b/macros/kde4.m4
2--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100
3+++ b/macros/kde4.m4 2011-11-25 18:09:25.000000000 +0100
4@@ -198,7 +198,7 @@
5 if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then
6 KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4"
7 else
8- KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4"
9+ KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4"
10 fi
11 fi
12 if test x"${with_kde4_servicesdir}" != x ; then
diff --git a/www-plugins/gnash/files/gnash-0.8.9-klash.patch b/www-plugins/gnash/files/gnash-0.8.9-klash.patch
new file mode 100644
index 0000000..e6afec0
--- /dev/null
+++ b/www-plugins/gnash/files/gnash-0.8.9-klash.patch
@@ -0,0 +1,12 @@
1diff -ur a/macros/kde4.m4 b/macros/kde4.m4
2--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100
3+++ b/macros/kde4.m4 2011-03-21 00:04:38.845997945 +0100
4@@ -210,7 +210,7 @@
5 KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config"
6 fi
7 if test x"${KDE4_APPSDATADIR}" = x ; then
8- KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash"
9+ KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash"
10 fi
11
12 if test x"${ac_cv_path_kde4_incl}" != x ; then
diff --git a/www-plugins/gnash/gnash-0.8.10_p20160329-r667.ebuild b/www-plugins/gnash/gnash-0.8.10_p20160329-r667.ebuild
new file mode 100644
index 0000000..b1bef02
--- /dev/null
+++ b/www-plugins/gnash/gnash-0.8.10_p20160329-r667.ebuild
@@ -0,0 +1,259 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5AT_M4DIR="cygnal"
6# won't build with python-3, bug #392969
7PYTHON_COMPAT=( python2_7 )
8
9inherit autotools eutils multilib nsplugins python-any-r1 flag-o-matic xdg-utils
10
11DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
12HOMEPAGE="https://www.gnu.org/software/gnash/"
13
14if [[ ${PV} = 9999* ]]; then
15 SRC_URI=""
16 EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
17 inherit git-r3
18else
19# Release tarball is b0rked, upstream #35612
20 SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.gz"
21 SRC_URI="mirror://gentoo/${P}.tar.xz"
22fi
23
24LICENSE="GPL-3"
25SLOT="0"
26KEYWORDS="amd64 ppc ~ppc64 ~sparc x86"
27IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg libav libressl gnome gtk harden jemalloc lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
28REQUIRED_USE="
29 dump? ( agg ffmpeg )
30 fbcon? ( agg )
31 nsplugin? ( gtk )
32 openvg? ( egl )
33 python? ( gtk )
34 vaapi? ( agg ffmpeg )
35 || ( agg cairo opengl openvg )
36 || ( dump fbcon gtk sdl )
37"
38
39RDEPEND=">=dev-libs/boost-1.41.0
40 dev-libs/expat
41 dev-libs/libxml2:2
42 virtual/jpeg:0
43 media-libs/libpng:0=
44 net-misc/curl
45 x11-libs/libX11
46 x11-libs/libXi
47 x11-libs/libXmu
48 x11-libs/libXt
49 media-libs/giflib:=
50 agg? ( x11-libs/agg )
51 cairo? ( x11-libs/cairo )
52 directfb? (
53 dev-libs/DirectFB
54 )
55 doc? (
56 >=app-text/docbook2X-0.8.8
57 app-text/docbook-sgml-utils
58 )
59 egl? (
60 media-libs/mesa[egl]
61 )
62 fbcon? (
63 x11-libs/tslib
64 )
65 ffmpeg? (
66 libav? ( media-video/libav:0=[vaapi?] )
67 !libav? ( media-video/ffmpeg:0=[vaapi?] )
68 )
69 gtk? (
70 x11-libs/gtk+:2
71 python? ( dev-python/pygtk:2 )
72 )
73 jemalloc? ( dev-libs/jemalloc )
74 opengl? (
75 virtual/glu
76 virtual/opengl
77 gtk? ( x11-libs/gtkglext )
78 )
79 openvg? (
80 media-libs/mesa[openvg]
81 )
82 sdl? ( media-libs/libsdl[X] )
83 sdl-sound? ( media-libs/libsdl )
84 >=media-libs/speex-1.2.0
85 media-libs/speexdsp
86 sys-libs/zlib
87 >=sys-devel/libtool-2.2
88 mysql? ( virtual/mysql )
89 lirc? ( app-misc/lirc )
90 dbus? ( sys-apps/dbus )
91 ssh? ( >=net-libs/libssh-0.4[server] )
92 ssl? (
93 libressl? ( dev-libs/libressl:0= )
94 !libressl? ( dev-libs/openssl:0= )
95 )
96 vaapi? ( x11-libs/libva[opengl?] )
97 "
98DEPEND="${RDEPEND}
99 virtual/pkgconfig
100 nls? ( sys-devel/gettext )
101 gnome? ( app-text/rarian )
102 nsplugin? ( net-misc/npapi-sdk )
103 test? ( dev-util/dejagnu )
104 ${PYTHON_DEPS}
105"
106# Tests hang with sandbox, bug #321017
107RESTRICT="test"
108
109pkg_setup() {
110 python-any-r1_pkg_setup
111
112 if use !ffmpeg; then
113 ewarn "You are trying to build Gnash without choosing a media handler."
114 ewarn "Sound and video playback will not work."
115 fi
116}
117
118src_unpack() {
119 default
120 # rename git snapshot directory to what portage expects
121 mv ${PN}-*/ ${P} || die
122}
123
124src_prepare() {
125 default
126
127 xdg_environment_reset # 591014
128
129 # Fix paths for klash, bug #339610
130 eapply "${FILESDIR}"/${PN}-0.8.9-klash.patch
131
132 # Use external dejagnu for tests, bug #321017
133 eapply "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
134
135 # Fix building on ppc64, bug #342535
136 use ppc64 && append-flags -mminimal-toc
137
138 # Fix kde multilib library path, bug #391283
139 eapply "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
140
141 # Fix libamf includes
142 eapply "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
143
144 # Fix new adjacent_tokens_only() in >=boost-1.59 (bug 579142)
145 # See https://savannah.gnu.org/bugs/?46148
146 eapply "${FILESDIR}"/${PN}-0.8.10_p20150316-boost-1.60.patch
147
148 eautoreconf
149}
150src_configure() {
151 local device gui input media myconf myext renderers
152
153 # Set nsplugin install directory.
154 use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
155
156 # Set hardware acceleration.
157 use X && device+=",x11"
158 use directfb && device+=",directfb"
159 use egl && device+=",egl"
160 use fbcon && device+=",rawfb"
161 use vaapi && device+=",vaapi"
162 [[ "${device}x" == "x" ]] && device+=",none"
163
164 # Set rendering engine.
165 use agg && renderers+=",agg"
166 use cairo && renderers+=",cairo"
167 use opengl && renderers+=",opengl"
168 use openvg && renderers+=",openvg"
169
170 # Set media handler.
171 use ffmpeg || media+=",none"
172 use ffmpeg && media+=",ffmpeg"
173
174 # Set gui.
175 use dump && gui+=",dump"
176 use fbcon && gui+=",fb"
177 use gtk && gui+=",gtk"
178 use sdl && gui+=",sdl"
179
180 if use sdl-sound; then
181 myconf="${myconf} --enable-sound=sdl"
182 else
183 myconf="${myconf} --enable-sound=none"
184 fi
185
186 # Set extensions
187 use mysql && myext=",mysql"
188 use gtk && myext="${myext},gtk"
189 use lirc && myext="${myext},lirc"
190 use dbus && myext="${myext},dbus"
191
192 # Strip extra comma from gui, myext, hwaccel and renderers.
193 device=$( echo $device | sed -e 's/,//' )
194 gui=$( echo $gui | sed -e 's/^,//' )
195 myext=$( echo $myext | sed -e 's/,//' )
196 renderers=$( echo $renderers | sed -e 's/,//' )
197 media=$( echo $media | sed -e 's/,//' )
198
199 econf \
200 --disable-kparts3 \
201 --disable-kparts4 \
202 --without-gconf \
203 $(use_enable cygnal) \
204 $(use_enable cygnal cgibins) \
205 $(use_enable doc docbook) \
206 $(use_enable gnome ghelp) \
207 $(use_enable harden) \
208 $(use_enable jemalloc) \
209 $(use_enable nls) \
210 $(use_enable nsplugin npapi) \
211 $(use_enable python) \
212 $(use_enable ssh) \
213 $(use_enable ssl) \
214 $(use_enable test testsuite) \
215 --enable-gui=${gui} \
216 --enable-device=${device} \
217 --enable-extensions=${myext} \
218 --enable-renderer=${renderers} \
219 --enable-media=${media} \
220 ${myconf}
221}
222src_test() {
223 local log=testsuite-results.txt
224 cd testsuite
225 emake check || die "make check failed"
226 ./anaylse-results.sh > $log || die "results analyze failed"
227 cat $log
228}
229src_install() {
230 emake DESTDIR="${D}" install || die "emake install failed"
231
232 # Install nsplugin in directory set by --with-npapi-plugindir.
233 if use nsplugin; then
234 emake DESTDIR="${D}" install-plugin || die "install plugins failed"
235 fi
236
237 # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
238 use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so
239
240 # Remove eglinfo, bug #463654
241 if use egl; then
242 rm -f "${D}"/usr/bin/eglinfo || die
243 fi
244
245 einstalldocs
246}
247pkg_postinst() {
248 if use !gnome || use !ffmpeg ; then
249 ewarn ""
250 ewarn "Gnash was built without a media handler and or http handler !"
251 ewarn ""
252 ewarn "If you want Gnash to support video then you will need to"
253 ewarn "rebuild Gnash with the ffmpeg and gnome use flags set."
254 ewarn ""
255 fi
256 ewarn "${PN} is still in heavy development"
257 ewarn "Please first report bugs on upstream gnashdevs and deal with them"
258 ewarn "And then report a Gentoo bug to the maintainer"
259}
diff --git a/www-plugins/gnash/gnash-9999.ebuild b/www-plugins/gnash/gnash-9999.ebuild
new file mode 100644
index 0000000..b1bef02
--- /dev/null
+++ b/www-plugins/gnash/gnash-9999.ebuild
@@ -0,0 +1,259 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5AT_M4DIR="cygnal"
6# won't build with python-3, bug #392969
7PYTHON_COMPAT=( python2_7 )
8
9inherit autotools eutils multilib nsplugins python-any-r1 flag-o-matic xdg-utils
10
11DESCRIPTION="GNU Flash movie player that supports many SWF v7,8,9 features"
12HOMEPAGE="https://www.gnu.org/software/gnash/"
13
14if [[ ${PV} = 9999* ]]; then
15 SRC_URI=""
16 EGIT_REPO_URI="git://git.savannah.gnu.org/gnash.git"
17 inherit git-r3
18else
19# Release tarball is b0rked, upstream #35612
20 SRC_URI="mirror://gnu/${PN}/${PV}/${P}.tar.gz"
21 SRC_URI="mirror://gentoo/${P}.tar.xz"
22fi
23
24LICENSE="GPL-3"
25SLOT="0"
26KEYWORDS="amd64 ppc ~ppc64 ~sparc x86"
27IUSE="X +agg cairo cygnal dbus directfb doc dump egl fbcon +ffmpeg libav libressl gnome gtk harden jemalloc lirc mysql +nls nsplugin opengl openvg python sdl +sdl-sound ssh ssl test vaapi"
28REQUIRED_USE="
29 dump? ( agg ffmpeg )
30 fbcon? ( agg )
31 nsplugin? ( gtk )
32 openvg? ( egl )
33 python? ( gtk )
34 vaapi? ( agg ffmpeg )
35 || ( agg cairo opengl openvg )
36 || ( dump fbcon gtk sdl )
37"
38
39RDEPEND=">=dev-libs/boost-1.41.0
40 dev-libs/expat
41 dev-libs/libxml2:2
42 virtual/jpeg:0
43 media-libs/libpng:0=
44 net-misc/curl
45 x11-libs/libX11
46 x11-libs/libXi
47 x11-libs/libXmu
48 x11-libs/libXt
49 media-libs/giflib:=
50 agg? ( x11-libs/agg )
51 cairo? ( x11-libs/cairo )
52 directfb? (
53 dev-libs/DirectFB
54 )
55 doc? (
56 >=app-text/docbook2X-0.8.8
57 app-text/docbook-sgml-utils
58 )
59 egl? (
60 media-libs/mesa[egl]
61 )
62 fbcon? (
63 x11-libs/tslib
64 )
65 ffmpeg? (
66 libav? ( media-video/libav:0=[vaapi?] )
67 !libav? ( media-video/ffmpeg:0=[vaapi?] )
68 )
69 gtk? (
70 x11-libs/gtk+:2
71 python? ( dev-python/pygtk:2 )
72 )
73 jemalloc? ( dev-libs/jemalloc )
74 opengl? (
75 virtual/glu
76 virtual/opengl
77 gtk? ( x11-libs/gtkglext )
78 )
79 openvg? (
80 media-libs/mesa[openvg]
81 )
82 sdl? ( media-libs/libsdl[X] )
83 sdl-sound? ( media-libs/libsdl )
84 >=media-libs/speex-1.2.0
85 media-libs/speexdsp
86 sys-libs/zlib
87 >=sys-devel/libtool-2.2
88 mysql? ( virtual/mysql )
89 lirc? ( app-misc/lirc )
90 dbus? ( sys-apps/dbus )
91 ssh? ( >=net-libs/libssh-0.4[server] )
92 ssl? (
93 libressl? ( dev-libs/libressl:0= )
94 !libressl? ( dev-libs/openssl:0= )
95 )
96 vaapi? ( x11-libs/libva[opengl?] )
97 "
98DEPEND="${RDEPEND}
99 virtual/pkgconfig
100 nls? ( sys-devel/gettext )
101 gnome? ( app-text/rarian )
102 nsplugin? ( net-misc/npapi-sdk )
103 test? ( dev-util/dejagnu )
104 ${PYTHON_DEPS}
105"
106# Tests hang with sandbox, bug #321017
107RESTRICT="test"
108
109pkg_setup() {
110 python-any-r1_pkg_setup
111
112 if use !ffmpeg; then
113 ewarn "You are trying to build Gnash without choosing a media handler."
114 ewarn "Sound and video playback will not work."
115 fi
116}
117
118src_unpack() {
119 default
120 # rename git snapshot directory to what portage expects
121 mv ${PN}-*/ ${P} || die
122}
123
124src_prepare() {
125 default
126
127 xdg_environment_reset # 591014
128
129 # Fix paths for klash, bug #339610
130 eapply "${FILESDIR}"/${PN}-0.8.9-klash.patch
131
132 # Use external dejagnu for tests, bug #321017
133 eapply "${FILESDIR}"/${PN}-0.8.9-external-dejagnu.patch
134
135 # Fix building on ppc64, bug #342535
136 use ppc64 && append-flags -mminimal-toc
137
138 # Fix kde multilib library path, bug #391283
139 eapply "${FILESDIR}"/${PN}-0.8.9-kde4-libdir.patch
140
141 # Fix libamf includes
142 eapply "${FILESDIR}"/${PN}-0.8.10-amf-include.patch
143
144 # Fix new adjacent_tokens_only() in >=boost-1.59 (bug 579142)
145 # See https://savannah.gnu.org/bugs/?46148
146 eapply "${FILESDIR}"/${PN}-0.8.10_p20150316-boost-1.60.patch
147
148 eautoreconf
149}
150src_configure() {
151 local device gui input media myconf myext renderers
152
153 # Set nsplugin install directory.
154 use nsplugin && myconf="${myconf} --with-npapi-plugindir=/usr/$(get_libdir)/gnash/npapi/"
155
156 # Set hardware acceleration.
157 use X && device+=",x11"
158 use directfb && device+=",directfb"
159 use egl && device+=",egl"
160 use fbcon && device+=",rawfb"
161 use vaapi && device+=",vaapi"
162 [[ "${device}x" == "x" ]] && device+=",none"
163
164 # Set rendering engine.
165 use agg && renderers+=",agg"
166 use cairo && renderers+=",cairo"
167 use opengl && renderers+=",opengl"
168 use openvg && renderers+=",openvg"
169
170 # Set media handler.
171 use ffmpeg || media+=",none"
172 use ffmpeg && media+=",ffmpeg"
173
174 # Set gui.
175 use dump && gui+=",dump"
176 use fbcon && gui+=",fb"
177 use gtk && gui+=",gtk"
178 use sdl && gui+=",sdl"
179
180 if use sdl-sound; then
181 myconf="${myconf} --enable-sound=sdl"
182 else
183 myconf="${myconf} --enable-sound=none"
184 fi
185
186 # Set extensions
187 use mysql && myext=",mysql"
188 use gtk && myext="${myext},gtk"
189 use lirc && myext="${myext},lirc"
190 use dbus && myext="${myext},dbus"
191
192 # Strip extra comma from gui, myext, hwaccel and renderers.
193 device=$( echo $device | sed -e 's/,//' )
194 gui=$( echo $gui | sed -e 's/^,//' )
195 myext=$( echo $myext | sed -e 's/,//' )
196 renderers=$( echo $renderers | sed -e 's/,//' )
197 media=$( echo $media | sed -e 's/,//' )
198
199 econf \
200 --disable-kparts3 \
201 --disable-kparts4 \
202 --without-gconf \
203 $(use_enable cygnal) \
204 $(use_enable cygnal cgibins) \
205 $(use_enable doc docbook) \
206 $(use_enable gnome ghelp) \
207 $(use_enable harden) \
208 $(use_enable jemalloc) \
209 $(use_enable nls) \
210 $(use_enable nsplugin npapi) \
211 $(use_enable python) \
212 $(use_enable ssh) \
213 $(use_enable ssl) \
214 $(use_enable test testsuite) \
215 --enable-gui=${gui} \
216 --enable-device=${device} \
217 --enable-extensions=${myext} \
218 --enable-renderer=${renderers} \
219 --enable-media=${media} \
220 ${myconf}
221}
222src_test() {
223 local log=testsuite-results.txt
224 cd testsuite
225 emake check || die "make check failed"
226 ./anaylse-results.sh > $log || die "results analyze failed"
227 cat $log
228}
229src_install() {
230 emake DESTDIR="${D}" install || die "emake install failed"
231
232 # Install nsplugin in directory set by --with-npapi-plugindir.
233 if use nsplugin; then
234 emake DESTDIR="${D}" install-plugin || die "install plugins failed"
235 fi
236
237 # Create a symlink in /usr/$(get_libdir)/nsbrowser/plugins to the nsplugin install directory.
238 use nsplugin && inst_plugin /usr/$(get_libdir)/gnash/npapi/libgnashplugin.so
239
240 # Remove eglinfo, bug #463654
241 if use egl; then
242 rm -f "${D}"/usr/bin/eglinfo || die
243 fi
244
245 einstalldocs
246}
247pkg_postinst() {
248 if use !gnome || use !ffmpeg ; then
249 ewarn ""
250 ewarn "Gnash was built without a media handler and or http handler !"
251 ewarn ""
252 ewarn "If you want Gnash to support video then you will need to"
253 ewarn "rebuild Gnash with the ffmpeg and gnome use flags set."
254 ewarn ""
255 fi
256 ewarn "${PN} is still in heavy development"
257 ewarn "Please first report bugs on upstream gnashdevs and deal with them"
258 ewarn "And then report a Gentoo bug to the maintainer"
259}
diff --git a/www-plugins/gnash/metadata.xml b/www-plugins/gnash/metadata.xml
new file mode 100644
index 0000000..7c3def3
--- /dev/null
+++ b/www-plugins/gnash/metadata.xml
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4 <use>
5 <flag name="agg">Rendering based on the Anti-Grain Geometry Rendering Engine library</flag>
6 <flag name="cygnal">Enable building of the cygnal server</flag>
7 <flag name="dump">Enable dump output module for creating video from SWF</flag>
8 <flag name="egl">Enable EGL support for the OpenVG, OpenGL and X11 renderers</flag>
9 <flag name="gconf">Enable GConf configuration backend</flag>
10 <flag name="harden">Enable upstream recommended hardening build flags (may conflict with system ones)</flag>
11 <flag name="jemalloc">Use dev-libs/jemalloc for allocations</flag>
12 <flag name="openvg">Rendering based on the OpenVG graphics acceleration API</flag>
13 <flag name="sdl-sound">Enable SDL audio output for the standalone player</flag>
14 <flag name="ssh">Enable using SSH for network authentication in libnet</flag>
15 <flag name="ssl">Enable directly using OpenSSL in libnet (not needed for nsplugin ssl support)</flag>
16 </use>
17</pkgmetadata>
diff --git a/x11-plugins/lurch/Manifest b/x11-plugins/lurch/Manifest
new file mode 100644
index 0000000..7aa7fc6
--- /dev/null
+++ b/x11-plugins/lurch/Manifest
@@ -0,0 +1,9 @@
1DIST lurch-0.6.1-src.tar.gz 402942 BLAKE2B 8d73aa5c043c4784758cb80837120b18505c95f37fbe8b29dab17ba2fa33d58152dd93b1fbdf0d85c64cffd6d8583fe211d3f38537cdc3a237507b022d0615fa SHA512 a37de1f9bb9e4b65204d6c7405c2c51dc112d4be8cc9b2126512687f09419a543a63a6de944fcda43f84b2eeca3055b40a0087c8065bb8b39fdb9da6632b6a0a
2DIST lurch-0.6.5-src.tar.gz 426064 BLAKE2B e30ebea88016d89d938321b36dc34aa26938d7ad220f8f7c15257a93daf8b7945e83e6d0df6a2c18698aee005b379db8604a1012b4cfa5a761ba865012b83f5d SHA512 c0ff968935254e8cf7e039a843476fa5a4cc8d725c1eeb3e4f66932efada84232f03d6c7bbe3dc0466205a9554247fd1937e4ab4c9658c23ece6728b7277460f
3DIST lurch-0.6.6-src.tar.gz 414443 BLAKE2B d58898ba49776d87d47f9234d67b3268bc490f5f08896ab64f053b582985afef0e27c155951dc98dc93e9aea4496e511fe11e21dab58d49dc445dc10025eea91 SHA512 6fafcac75ab50090fde34163b34adc6ae38d8bf8386aebc555425e964d9daa52e020a0f2ad14739262bf4ede5e650e8faff9317a483ef78bafa731f6222bcc53
4DIST lurch-0.6.7-src.tar.gz 377646 BLAKE2B 0457f09743a1ba94f2a664c662f66d80918ceacdb2d5476d8609d2d9a057328d36a4ac3623ee02e14ffe61060b6797845318af6a8db1ca3b3d54b69ecb5ab1dd SHA512 c71a0049039eb2272f6fb7bf66a85d8b199f81bb0bdd4fb84c9c5526f7ae88b13614d9824a0887db5663aabed692c9e137de32db2599c1fd3e5c4309915b188f
5EBUILD lurch-0.6.1.ebuild 470 BLAKE2B 77d5834f941c8552d2cda078fe1872da28775bacfa92f76227b5ac5a13dc7805a3157ad0c91738f60fcd7ce68f9445046ed865ba60bc6fe8ebe6b0bd7d650428 SHA512 07567b8e5b628a0f218edcf8e78385de2c2d8acb4226c2d0350535e95e326d629603aba81a172e0ef6ed6f32668ccc10eb240272030074bf1eeed17c22ab3c2a
6EBUILD lurch-0.6.5.ebuild 484 BLAKE2B b7adea3d1d81b7e681ac8892d16a5a4dcb1b1f1fdb2f2455b0e9dcac0e21ec5316899521e35a0ae673d9e0140efa3fc1339a402dfb5bfd8b886de963970ee466 SHA512 00835d78b8db6011417ee3e55fc21a63b49ca5abd9b42c29bbe8575381dfeeef00f1418da554344da422f156c319ca4709160b17e4edd9ff164f1e76439f6c5f
7EBUILD lurch-0.6.6.ebuild 484 BLAKE2B b7adea3d1d81b7e681ac8892d16a5a4dcb1b1f1fdb2f2455b0e9dcac0e21ec5316899521e35a0ae673d9e0140efa3fc1339a402dfb5bfd8b886de963970ee466 SHA512 00835d78b8db6011417ee3e55fc21a63b49ca5abd9b42c29bbe8575381dfeeef00f1418da554344da422f156c319ca4709160b17e4edd9ff164f1e76439f6c5f
8EBUILD lurch-0.6.7.ebuild 481 BLAKE2B a5b65280bfd9b6d79a15c418be8613907dcd714c3aba84f6949892b2828f4b1032290e27d7b724a40b1bb0696d0ef7be44c543a06038cd2a93eaf23414f6ac62 SHA512 43303ee0102b5dce91f6e77aae98c07405cf9954dee7ffeb522acfb13a96695b73ed8b7da5739f1ab0c9a15ed5b5d118d9d5e6598c2d51cacaf3a109ade4a708
9MISC metadata.xml 339 BLAKE2B 42b5c728e007eafd30869ad171c888302f42e0ad32086fdb5046e9e9a11b161929339c4567df70b498c852d832b51aa9063c61635c4214cd597f650c1d4b3ce2 SHA512 b5b210e9f1232b0199a649ccbc02d3ffd2f88019cee02f341e1b2d3898fa7908a59c09e2d5f6e0a536abe725df16beb3c4e24b8109b60c005c3ba2ffe7127b0d
diff --git a/x11-plugins/lurch/lurch-0.6.1.ebuild b/x11-plugins/lurch/lurch-0.6.1.ebuild
new file mode 100644
index 0000000..a2b6392
--- /dev/null
+++ b/x11-plugins/lurch/lurch-0.6.1.ebuild
@@ -0,0 +1,22 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6DESCRIPTION="OMEMO for libpurple - interoperable with other OMEMO clients"
7HOMEPAGE="https://github.com/gkdr/lurch"
8SRC_URI="https://github.com/gkdr/lurch/releases/download/v${PV}/lurch-${PV}-src.tar.gz"
9
10S="${WORKDIR}"
11
12LICENSE="GPL-3"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17DEPEND="
18net-im/pidgin
19dev-libs/libxml2
20dev-db/sqlite"
21
22RDEPEND="${DEPEND}"
diff --git a/x11-plugins/lurch/lurch-0.6.5.ebuild b/x11-plugins/lurch/lurch-0.6.5.ebuild
new file mode 100644
index 0000000..52021f5
--- /dev/null
+++ b/x11-plugins/lurch/lurch-0.6.5.ebuild
@@ -0,0 +1,23 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6DESCRIPTION="OMEMO for libpurple - interoperable with other OMEMO clients"
7HOMEPAGE="https://github.com/gkdr/lurch"
8SRC_URI="https://github.com/gkdr/lurch/releases/download/v${PV}/lurch-${PV}-src.tar.gz"
9
10S="${WORKDIR}"
11
12LICENSE="GPL-3"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17DEPEND="
18net-im/pidgin
19dev-libs/libxml2
20dev-db/sqlite
21dev-libs/mxml"
22
23RDEPEND="${DEPEND}"
diff --git a/x11-plugins/lurch/lurch-0.6.6.ebuild b/x11-plugins/lurch/lurch-0.6.6.ebuild
new file mode 100644
index 0000000..52021f5
--- /dev/null
+++ b/x11-plugins/lurch/lurch-0.6.6.ebuild
@@ -0,0 +1,23 @@
1# Copyright 1999-2018 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6DESCRIPTION="OMEMO for libpurple - interoperable with other OMEMO clients"
7HOMEPAGE="https://github.com/gkdr/lurch"
8SRC_URI="https://github.com/gkdr/lurch/releases/download/v${PV}/lurch-${PV}-src.tar.gz"
9
10S="${WORKDIR}"
11
12LICENSE="GPL-3"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17DEPEND="
18net-im/pidgin
19dev-libs/libxml2
20dev-db/sqlite
21dev-libs/mxml"
22
23RDEPEND="${DEPEND}"
diff --git a/x11-plugins/lurch/lurch-0.6.7.ebuild b/x11-plugins/lurch/lurch-0.6.7.ebuild
new file mode 100644
index 0000000..aa6dba1
--- /dev/null
+++ b/x11-plugins/lurch/lurch-0.6.7.ebuild
@@ -0,0 +1,23 @@
1# Copyright 1999-2018 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6DESCRIPTION="OMEMO for libpurple - interoperable with other OMEMO clients"
7HOMEPAGE="https://github.com/gkdr/lurch"
8SRC_URI="https://github.com/gkdr/lurch/releases/download/v${PV}/lurch-${PV}-src.tar.gz"
9
10S="${WORKDIR}"
11
12LICENSE="GPL-3"
13SLOT="0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17DEPEND="
18net-im/pidgin
19dev-libs/libxml2
20dev-db/sqlite
21dev-libs/mxml"
22
23RDEPEND="${DEPEND}"
diff --git a/x11-plugins/lurch/lurch-9999.ebuild b/x11-plugins/lurch/lurch-9999.ebuild
new file mode 100644
index 0000000..1658951
--- /dev/null
+++ b/x11-plugins/lurch/lurch-9999.ebuild
@@ -0,0 +1,34 @@
1# Copyright 1999-2018 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6inherit git-r3 eutils
7
8DESCRIPTION="OMEMO for libpurple - interoperable with other OMEMO clients"
9HOMEPAGE="https://github.com/gkdr/lurch"
10EGIT_REPO_URI="https://github.com/gkdr/lurch"
11EGIT_BRANCH="dev"
12
13# S="${WORKDIR}"
14
15LICENSE="GPL-3"
16SLOT="0"
17KEYWORDS="~amd64 ~x86"
18IUSE=""
19
20DEPEND="
21 net-im/pidgin
22 dev-libs/libxml2
23 dev-db/sqlite
24 dev-libs/mxml"
25
26RDEPEND="${DEPEND}"
27
28src_compile() {
29 emake
30}
31
32src_install() {
33 emake DESTDIR="${D}" install || die "email install failed"
34}
diff --git a/x11-plugins/lurch/metadata.xml b/x11-plugins/lurch/metadata.xml
new file mode 100644
index 0000000..677f212
--- /dev/null
+++ b/x11-plugins/lurch/metadata.xml
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4 <maintainer type="person">
5 <email>paul.michel@fem.tu-ilmenau.de</email>
6 </maintainer>
7 <longdescription>
8 OMEMO for libpurple - interoperable with other OMEMO clients.
9 </longdescription>
10</pkgmetadata>