1 |
commit: a44b54f8614f3cf31561c049d2a1385833fcc490 |
2 |
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 4 07:10:01 2018 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 4 07:10:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a44b54f8 |
7 |
|
8 |
dev-tcltk/snack: EAPI 6, maybe fix bug #455370 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/455370 |
11 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
13 |
|
14 |
dev-tcltk/snack/files/alsa-undef-sym.patch | 6 +- |
15 |
dev-tcltk/snack/snack-2.2.10-r7.ebuild | 96 ++++++++++++++++++++++++++++++ |
16 |
2 files changed, 99 insertions(+), 3 deletions(-) |
17 |
|
18 |
diff --git a/dev-tcltk/snack/files/alsa-undef-sym.patch b/dev-tcltk/snack/files/alsa-undef-sym.patch |
19 |
index 77a222754fe..c46b9371c75 100644 |
20 |
--- a/dev-tcltk/snack/files/alsa-undef-sym.patch |
21 |
+++ b/dev-tcltk/snack/files/alsa-undef-sym.patch |
22 |
@@ -1,5 +1,5 @@ |
23 |
---- unix/jkAudIO_alsa.c 2005-12-14 12:29:38.000000000 +0100 |
24 |
-+++ unix/jkAudIO_alsa.c 2008-09-01 22:51:20.000000000 +0200 |
25 |
+--- a/unix/jkAudIO_alsa.c 2005-12-14 12:29:38.000000000 +0100 |
26 |
++++ b/unix/jkAudIO_alsa.c 2008-09-01 22:51:20.000000000 +0200 |
27 |
@@ -49,6 +49,8 @@ |
28 |
|
29 |
static int minNumChan = 1; |
30 |
@@ -46,4 +46,4 @@ |
31 |
+ return (played); |
32 |
} |
33 |
|
34 |
- void |
35 |
\ No newline at end of file |
36 |
+ void |
37 |
|
38 |
diff --git a/dev-tcltk/snack/snack-2.2.10-r7.ebuild b/dev-tcltk/snack/snack-2.2.10-r7.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..964ec12d5b4 |
41 |
--- /dev/null |
42 |
+++ b/dev-tcltk/snack/snack-2.2.10-r7.ebuild |
43 |
@@ -0,0 +1,96 @@ |
44 |
+# Copyright 1999-2018 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=6 |
48 |
+ |
49 |
+PYTHON_COMPAT=( python2_7 pypy ) |
50 |
+ |
51 |
+inherit autotools distutils-r1 multilib |
52 |
+ |
53 |
+DESCRIPTION="The Snack Sound Toolkit (Tcl)" |
54 |
+HOMEPAGE="http://www.speech.kth.se/snack/" |
55 |
+SRC_URI="http://www.speech.kth.se/snack/dist/${PN}${PV}.tar.gz" |
56 |
+ |
57 |
+LICENSE="GPL-2" |
58 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
59 |
+SLOT="0" |
60 |
+IUSE="alsa examples python vorbis" |
61 |
+ |
62 |
+RESTRICT="test" # Bug 78354 |
63 |
+ |
64 |
+DEPEND=" |
65 |
+ dev-lang/tcl:0= |
66 |
+ dev-lang/tk:0= |
67 |
+ alsa? ( media-libs/alsa-lib ) |
68 |
+ python? ( ${PYTHON_DEPS} ) |
69 |
+ vorbis? ( media-libs/libvorbis )" |
70 |
+RDEPEND="${DEPEND}" |
71 |
+ |
72 |
+S="${WORKDIR}/${PN}${PV}/unix" |
73 |
+ |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/alsa-undef-sym.patch |
76 |
+ "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch |
77 |
+ ) |
78 |
+ |
79 |
+HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*" |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ # adds -install_name (soname on Darwin) |
83 |
+ [[ ${CHOST} == *-darwin* ]] && PATCHES+=( "${FILESDIR}"/${P}-darwin.patch ) |
84 |
+ |
85 |
+ sed \ |
86 |
+ -e "s:ar cr:$(tc-getAR) cr:g" \ |
87 |
+ -e "s:-O:${CFLAGS}:g" \ |
88 |
+ -i Makefile.in || die |
89 |
+ |
90 |
+ cd .. |
91 |
+ |
92 |
+ default |
93 |
+ |
94 |
+ sed \ |
95 |
+ -e 's|^\(#define roundf(.*\)|//\1|' \ |
96 |
+ -i generic/jkFormatMP3.c || die |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ local myconf="" |
101 |
+ |
102 |
+ use alsa && myconf+=" --enable-alsa" |
103 |
+ |
104 |
+ use vorbis && \ |
105 |
+ myconf+=" --with-ogg-include="${EPREFIX}"/usr/include" |
106 |
+ myconf+=" --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir)" |
107 |
+ |
108 |
+ econf \ |
109 |
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \ |
110 |
+ --includedir="${EPREFIX}"/usr/include \ |
111 |
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \ |
112 |
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) \ |
113 |
+ $myconf |
114 |
+} |
115 |
+ |
116 |
+src_compile() { |
117 |
+ default |
118 |
+} |
119 |
+ |
120 |
+HTMML_DOCS="" |
121 |
+ |
122 |
+src_install() { |
123 |
+ default |
124 |
+ |
125 |
+ if use python ; then |
126 |
+ cd "${S}"/../python || die |
127 |
+ distutils-r1_src_install |
128 |
+ fi |
129 |
+ |
130 |
+ cd "${S}"/.. || die |
131 |
+ |
132 |
+ if use examples ; then |
133 |
+ docinto examples |
134 |
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die |
135 |
+ dodoc -r demos/tcl |
136 |
+ |
137 |
+ use python && dodoc -r demos/python |
138 |
+ fi |
139 |
+} |