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