1 |
commit: 303c1f3f3097c60f76800f229eb4807ea3a448e4 |
2 |
Author: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 4 15:06:23 2017 +0000 |
4 |
Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 4 15:07:15 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=303c1f3f |
7 |
|
8 |
app-cdr/cdrtools: Do not link cdda2wav to pulseaudio libraries. |
9 |
|
10 |
This fixes bug #593078. Thanks to David Flogeras for the report and coyote |
11 |
for the patch. |
12 |
|
13 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
14 |
|
15 |
app-cdr/cdrtools/cdrtools-3.02_alpha07-r1.ebuild | 273 +++++++++++++++++++++++ |
16 |
1 file changed, 273 insertions(+) |
17 |
|
18 |
diff --git a/app-cdr/cdrtools/cdrtools-3.02_alpha07-r1.ebuild b/app-cdr/cdrtools/cdrtools-3.02_alpha07-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..3521e7ceba3 |
21 |
--- /dev/null |
22 |
+++ b/app-cdr/cdrtools/cdrtools-3.02_alpha07-r1.ebuild |
23 |
@@ -0,0 +1,273 @@ |
24 |
+# Copyright 1999-2017 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+inherit fcaps multilib toolchain-funcs flag-o-matic gnuconfig |
30 |
+ |
31 |
+MY_P="${P/_alpha/a}" |
32 |
+ |
33 |
+DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord" |
34 |
+HOMEPAGE="https://sourceforge.net/projects/cdrtools/" |
35 |
+SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2" |
36 |
+ |
37 |
+LICENSE="GPL-2 LGPL-2.1 CDDL-Schily" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
40 |
+IUSE="acl caps nls unicode" |
41 |
+ |
42 |
+RDEPEND="acl? ( virtual/acl ) |
43 |
+ caps? ( sys-libs/libcap ) |
44 |
+ nls? ( virtual/libintl ) |
45 |
+ !app-cdr/cdrkit" |
46 |
+DEPEND="${RDEPEND} |
47 |
+ x11-misc/makedepend |
48 |
+ nls? ( >=sys-devel/gettext-0.18.1.1 )" |
49 |
+ |
50 |
+S=${WORKDIR}/${P/_alpha[0-9][0-9]} |
51 |
+ |
52 |
+FILECAPS=( |
53 |
+ cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord -- |
54 |
+ cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav -- |
55 |
+ cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd |
56 |
+) |
57 |
+ |
58 |
+cdrtools_os() { |
59 |
+ local os="linux" |
60 |
+ [[ ${CHOST} == *-darwin* ]] && os="mac-os10" |
61 |
+ [[ ${CHOST} == *-freebsd* ]] && os="freebsd" |
62 |
+ echo "${os}" |
63 |
+} |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ default |
67 |
+ |
68 |
+ gnuconfig_update |
69 |
+ |
70 |
+ # This fixes a clash with clone() on uclibc. Upstream isn't |
71 |
+ # going to include this so let's try to carry it forward. |
72 |
+ # Contact me if it needs updating. Bug #486782. |
73 |
+ # Anthony G. Basile <blueness@g.o>. |
74 |
+ use elibc_uclibc && epatch "${FILESDIR}"/${PN}-fix-clone-uclibc.patch |
75 |
+ |
76 |
+ # Remove profiled make files. |
77 |
+ find -name '*_p.mk' -delete || die "delete *_p.mk" |
78 |
+ |
79 |
+ # Adjusting hardcoded paths. |
80 |
+ sed -i -e "s|opt/schily|usr|" \ |
81 |
+ $(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \ |
82 |
+ || die "sed opt/schily" |
83 |
+ |
84 |
+ sed -i -e "s|\(^INSDIR=\t\tshare/doc/\)|\1${PF}/|" \ |
85 |
+ $(find ./ -type f -exec grep -l '^INSDIR.\+doc' '{}' '+') \ |
86 |
+ || die "sed doc" |
87 |
+ |
88 |
+ # Respect libdir. |
89 |
+ sed -i -e "s|\(^INSDIR=\t\t\)lib|\1$(get_libdir)|" \ |
90 |
+ $(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \ |
91 |
+ || die "sed multilib" |
92 |
+ |
93 |
+ # Do not install static libraries. |
94 |
+ sed -i -e "s|include\t\t.*rules.lib||" \ |
95 |
+ $(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \ |
96 |
+ || die "sed rules" |
97 |
+ |
98 |
+ # Enable verbose build. |
99 |
+ sed -i -e '/@echo.*==>.*;/s:@echo[^;]*;:&set -x;:' \ |
100 |
+ RULES/*.rul RULES/rules.prg RULES/rules.inc \ |
101 |
+ || die "sed verbose rules" |
102 |
+ |
103 |
+ # Respect CC/CXX variables. |
104 |
+ cd "${S}"/RULES || die |
105 |
+ local tcCC=$(tc-getCC) |
106 |
+ local tcCXX=$(tc-getCXX) |
107 |
+ sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \ |
108 |
+ rules1.top || die "sed rules1.top" |
109 |
+ sed -i -e "/^CC_COM_DEF=/s|gcc|${tcCC}|" \ |
110 |
+ -e "/^CC++_COM_DEF=/s|g++|${tcCXX}|" \ |
111 |
+ -e "/COPTOPT=/s|-O||" \ |
112 |
+ -e 's|$(GCCOPTOPT)||' \ |
113 |
+ cc-gcc.rul || die "sed cc-gcc.rul" |
114 |
+ sed -i -e "s|^#\(CONFFLAGS +=\).*|\1\t-cc=${tcCC}|" \ |
115 |
+ rules.cnf || die "sed rules.cnf" |
116 |
+ |
117 |
+ # Schily make setup. |
118 |
+ cd "${S}"/DEFAULTS || die |
119 |
+ local os=$(cdrtools_os) |
120 |
+ |
121 |
+ sed -i \ |
122 |
+ -e "s|^\(DEFLINKMODE=\).*|\1\tdynamic|" \ |
123 |
+ -e "s|^\(LINUX_INCL_PATH=\).*|\1|" \ |
124 |
+ -e "s|^\(LDPATH=\).*|\1|" \ |
125 |
+ -e "s|^\(RUNPATH=\).*|\1|" \ |
126 |
+ -e "s|^\(INS_BASE=\).*|\1\t${ED}/usr|" \ |
127 |
+ -e "s|^\(INS_RBASE=\).*|\1\t${ED}|" \ |
128 |
+ -e "s|^\(DEFINSGRP=\).*|\1\t0|" \ |
129 |
+ -e '/^DEFUMASK/s,002,022,g' \ |
130 |
+ Defaults.${os} || die "sed Schily make setup" |
131 |
+ # re DEFUMASK above: |
132 |
+ # bug 486680: grsec TPE will block the exec if the directory is |
133 |
+ # group-writable. This is painful with cdrtools, because it makes a bunch of |
134 |
+ # group-writable directories during build. Change the umask on their |
135 |
+ # creation to prevent this. |
136 |
+} |
137 |
+ |
138 |
+ac_cv_sizeof() { |
139 |
+ cat <<-EOF >"${T}"/test.c |
140 |
+ #include <inttypes.h> |
141 |
+ #include <stddef.h> |
142 |
+ #include <stdint.h> |
143 |
+ #include <sys/types.h> |
144 |
+ int main () { |
145 |
+ static int test_array [1 - 2 * !((sizeof(TYPE)) == LEN)]; |
146 |
+ test_array [0] = 0; |
147 |
+ return test_array [0]; |
148 |
+ } |
149 |
+ EOF |
150 |
+ |
151 |
+ local i=1 |
152 |
+ while [[ ${i} -lt 20 ]] ; do |
153 |
+ if ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o /dev/null -DTYPE="$1" -DLEN=$i 2>/dev/null; then |
154 |
+ echo ${i} |
155 |
+ return 0 |
156 |
+ fi |
157 |
+ : $(( i += 1 )) |
158 |
+ done |
159 |
+ return 1 |
160 |
+} |
161 |
+ |
162 |
+src_configure() { |
163 |
+ use acl || export ac_cv_header_sys_acl_h="no" |
164 |
+ use caps || export ac_cv_lib_cap_cap_get_proc="no" |
165 |
+ export ac_cv_header_pulse_pulseaudio_h="no" |
166 |
+ |
167 |
+ # skip obsolete configure script |
168 |
+ if tc-is-cross-compiler ; then |
169 |
+ # Cache known values for targets. #486680 |
170 |
+ |
171 |
+ tc-export CC |
172 |
+ local var val t types=( |
173 |
+ char "short int" int "long int" "long long" |
174 |
+ "unsigned char" "unsigned short int" "unsigned int" |
175 |
+ "unsigned long int" "unsigned long long" |
176 |
+ float double "long double" size_t ssize_t ptrdiff_t |
177 |
+ mode_t uid_t gid_t pid_t dev_t time_t wchar_t |
178 |
+ "char *" "unsigned char *" |
179 |
+ ) |
180 |
+ for t in "${types[@]}" ; do |
181 |
+ var="ac_cv_sizeof_${t// /_}" |
182 |
+ var=${var//[*]/p} |
183 |
+ val=$(ac_cv_sizeof "${t}") || die "could not compute ${t}" |
184 |
+ export "${var}=${val}" |
185 |
+ einfo "Computing sizeof(${t}) as ${val}" |
186 |
+ done |
187 |
+ # We don't have these types. |
188 |
+ export ac_cv_sizeof___int64=0 |
189 |
+ export ac_cv_sizeof_unsigned___int64=0 |
190 |
+ export ac_cv_sizeof_major_t=${ac_cv_sizeof_dev_t} |
191 |
+ export ac_cv_sizeof_minor_t=${ac_cv_sizeof_dev_t} |
192 |
+ export ac_cv_sizeof_wchar=${ac_cv_sizeof_wchar_t} |
193 |
+ |
194 |
+ export ac_cv_type_prototypes="yes" |
195 |
+ export ac_cv_func_mlock{,all}="yes" |
196 |
+ export ac_cv_func_{e,f,g}cvt=$(usex elibc_glibc) |
197 |
+ export ac_cv_func_dtoa_r="no" |
198 |
+ export ac_cv_func_sys_siglist{,_def}="no" |
199 |
+ export ac_cv_func_printf_{j,ll}="yes" |
200 |
+ export ac_cv_realloc_null="yes" |
201 |
+ export ac_cv_no_user_malloc="no" |
202 |
+ export ac_cv_var_timezone="yes" |
203 |
+ export ac_cv_var___progname{,_full}="yes" |
204 |
+ export ac_cv_fnmatch_igncase="yes" |
205 |
+ export ac_cv_file__dev_{fd_{0,1,2},null,std{err,in,out},tty,zero}="yes" |
206 |
+ export ac_cv_file__usr_src_linux_include="no" |
207 |
+ |
208 |
+ case $(cdrtools_os) in |
209 |
+ linux) |
210 |
+ export ac_cv_func_bsd_{g,s}etpgrp="no" |
211 |
+ export ac_cv_hard_symlinks="yes" |
212 |
+ export ac_cv_link_nofollow="yes" |
213 |
+ export ac_cv_access_e_ok="no" |
214 |
+ |
215 |
+ export ac_cv_dev_minor_noncontig="yes" |
216 |
+ case ${ac_cv_sizeof_long_int} in |
217 |
+ 4) export ac_cv_dev_minor_bits="32";; |
218 |
+ 8) export ac_cv_dev_minor_bits="44";; |
219 |
+ esac |
220 |
+ |
221 |
+ cat <<-EOF >"${T}"/test.c |
222 |
+ struct { |
223 |
+ char start[6]; |
224 |
+ unsigned char x1:4; |
225 |
+ unsigned char x2:4; |
226 |
+ char end[5]; |
227 |
+ } a = { |
228 |
+ .start = {'S', 't', 'A', 'r', 'T', '_'}, |
229 |
+ .x1 = 5, |
230 |
+ .x2 = 4, |
231 |
+ .end = {'_', 'e', 'N', 'd', 'X'}, |
232 |
+ }; |
233 |
+ EOF |
234 |
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o |
235 |
+ if grep -q 'StArT_E_eNdX' "${T}"/test.o ; then |
236 |
+ export ac_cv_c_bitfields_htol="no" |
237 |
+ elif grep -q 'StArT_T_eNdX' "${T}"/test.o ; then |
238 |
+ export ac_cv_c_bitfields_htol="yes" |
239 |
+ fi |
240 |
+ ;; |
241 |
+ esac |
242 |
+ fi |
243 |
+} |
244 |
+ |
245 |
+src_compile() { |
246 |
+ if use unicode; then |
247 |
+ local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)" |
248 |
+ if [[ -n ${flags} ]]; then |
249 |
+ append-flags ${flags} |
250 |
+ else |
251 |
+ ewarn "Your compiler does not support the options required to build" |
252 |
+ ewarn "cdrtools with unicode in USE. unicode flag will be ignored." |
253 |
+ fi |
254 |
+ fi |
255 |
+ |
256 |
+ # If not built with -j1, "sometimes" cdda2wav will not be built. |
257 |
+ emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ |
258 |
+ LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" |
259 |
+} |
260 |
+ |
261 |
+src_install() { |
262 |
+ # If not built with -j1, "sometimes" manpages are not installed. |
263 |
+ emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ |
264 |
+ LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install |
265 |
+ |
266 |
+ # These symlinks are for compat with cdrkit. |
267 |
+ dosym schily /usr/include/scsilib |
268 |
+ dosym ../scg /usr/include/schily/scg |
269 |
+ |
270 |
+ dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux |
271 |
+ |
272 |
+ cd "${S}"/cdda2wav || die |
273 |
+ docinto cdda2wav |
274 |
+ dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO |
275 |
+ |
276 |
+ cd "${S}"/mkisofs || die |
277 |
+ docinto mkisofs |
278 |
+ dodoc ChangeLog* TODO |
279 |
+ |
280 |
+ # Remove man pages related to the build system |
281 |
+ rm -rvf "${ED}"/usr/share/man/man5 || die |
282 |
+} |
283 |
+ |
284 |
+pkg_postinst() { |
285 |
+ fcaps_pkg_postinst |
286 |
+ |
287 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
288 |
+ einfo |
289 |
+ einfo "Darwin/OS X use the following device names:" |
290 |
+ einfo |
291 |
+ einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" |
292 |
+ einfo |
293 |
+ einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" |
294 |
+ einfo |
295 |
+ fi |
296 |
+} |