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