1 |
commit: 47f24d452aeedd33500516cc43c0206fb5de1790 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 2 19:03:31 2013 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 2 19:03:31 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=47f24d45 |
7 |
|
8 |
app-cdr/cdrtools-3.01_alpha17: fix bug #486782 |
9 |
|
10 |
--- |
11 |
app-cdr/cdrtools/cdrtools-3.01_alpha17-r99.ebuild | 159 +++++++++++++++++++++ |
12 |
.../files/cdrtools-3.01-rename-clone.patch | 69 +++++++++ |
13 |
app-cdr/cdrtools/metadata.xml | 10 ++ |
14 |
3 files changed, 238 insertions(+) |
15 |
|
16 |
diff --git a/app-cdr/cdrtools/cdrtools-3.01_alpha17-r99.ebuild b/app-cdr/cdrtools/cdrtools-3.01_alpha17-r99.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..d6d1176 |
19 |
--- /dev/null |
20 |
+++ b/app-cdr/cdrtools/cdrtools-3.01_alpha17-r99.ebuild |
21 |
@@ -0,0 +1,159 @@ |
22 |
+# Copyright 1999-2013 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdrtools/cdrtools-3.01_alpha17.ebuild,v 1.2 2013/09/28 19:50:34 ago Exp $ |
25 |
+ |
26 |
+EAPI=5 |
27 |
+ |
28 |
+inherit fcaps multilib eutils toolchain-funcs flag-o-matic |
29 |
+ |
30 |
+MY_P="${P/_alpha/a}" |
31 |
+ |
32 |
+DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord" |
33 |
+HOMEPAGE="http://cdrecord.berlios.de/private/cdrecord.html" |
34 |
+SRC_URI="ftp://ftp.berlios.de/pub/cdrecord/$([[ -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 ~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" |
39 |
+IUSE="acl nls unicode" |
40 |
+ |
41 |
+RDEPEND="acl? ( virtual/acl ) |
42 |
+ nls? ( virtual/libintl ) |
43 |
+ !app-cdr/cdrkit" |
44 |
+DEPEND="${RDEPEND} |
45 |
+ nls? ( >=sys-devel/gettext-0.18.1.1 )" |
46 |
+ |
47 |
+S=${WORKDIR}/${P/_alpha[0-9][0-9]} |
48 |
+ |
49 |
+FILECAPS=( |
50 |
+ 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 -- |
51 |
+ cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav -- |
52 |
+ cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd |
53 |
+) |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ # Avoid collision with clone() system call, bug #486782 |
57 |
+ epatch "${FILESDIR}"/${PN}-3.01-rename-clone.patch |
58 |
+ |
59 |
+ # Remove profiled make files. |
60 |
+ rm -f $(find . -name '*_p.mk') || die "rm profiled" |
61 |
+ |
62 |
+ # Adjusting hardcoded paths. |
63 |
+ sed -i -e 's:opt/schily:usr:' \ |
64 |
+ $(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \ |
65 |
+ || die "sed opt/schily" |
66 |
+ |
67 |
+ sed -i -e "s:\(^INSDIR=\t\tshare/doc/\):\1${PF}/:" \ |
68 |
+ $(find ./ -type f -exec grep -l 'INSDIR.\+doc' '{}' '+') \ |
69 |
+ || die "sed doc" |
70 |
+ |
71 |
+ # Respect libdir. |
72 |
+ sed -i -e "s:\(^INSDIR=\t\t\)lib:\1$(get_libdir):" \ |
73 |
+ $(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \ |
74 |
+ || die "sed multilib" |
75 |
+ |
76 |
+ # Do not install static libraries. |
77 |
+ sed -i -e 's:include\t\t.*rules.lib::' \ |
78 |
+ $(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \ |
79 |
+ || die "sed rules" |
80 |
+ |
81 |
+ # Respect CC/CXX variables. |
82 |
+ cd "${S}"/RULES |
83 |
+ local tcCC=$(tc-getCC) |
84 |
+ local tcCXX=$(tc-getCXX) |
85 |
+ sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \ |
86 |
+ rules1.top || die "sed rules1.top" |
87 |
+ sed -i -e "/^\(CC\|DYNLD\|LDCC\|MKDEP\)/s|gcc|${tcCC}|" \ |
88 |
+ -e "/^\(CC++\|DYNLDC++\|LDCC++\|MKC++DEP\)/s|g++|${tcCXX}|" \ |
89 |
+ -e "/COPTOPT=/s/-O//" \ |
90 |
+ -e 's/$(GCCOPTOPT)//' \ |
91 |
+ cc-gcc.rul || die "sed cc-gcc.rul" |
92 |
+ sed -i -e "s|^#CONFFLAGS +=\t-cc=\$(XCC_COM)$|CONFFLAGS +=\t-cc=${tcCC}|g" \ |
93 |
+ rules.cnf || die "sed rules.cnf" |
94 |
+ |
95 |
+ # Create additional symlinks needed for some archs (armv4l already created) |
96 |
+ local t |
97 |
+ for t in armv4tl armv5tel armv7l ppc64 s390x; do |
98 |
+ ln -s i586-linux-cc.rul ${t}-linux-cc.rul || die |
99 |
+ ln -s i586-linux-gcc.rul ${t}-linux-gcc.rul || die |
100 |
+ done |
101 |
+ |
102 |
+ # Schily make setup. |
103 |
+ cd "${S}"/DEFAULTS |
104 |
+ local os="linux" |
105 |
+ [[ ${CHOST} == *-darwin* ]] && os="mac-os10" |
106 |
+ |
107 |
+ sed -i \ |
108 |
+ -e "s:/opt/schily:/usr:g" \ |
109 |
+ -e "s:/usr/src/linux/include::g" \ |
110 |
+ -e "s:bin:root:g" \ |
111 |
+ Defaults.${os} || die "sed Schily make setup" |
112 |
+} |
113 |
+ |
114 |
+# skip obsolete configure script |
115 |
+src_configure() { : ; } |
116 |
+ |
117 |
+src_compile() { |
118 |
+ if use unicode; then |
119 |
+ local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)" |
120 |
+ if [[ -n ${flags} ]]; then |
121 |
+ append-flags ${flags} |
122 |
+ else |
123 |
+ ewarn "Your compiler does not support the options required to build" |
124 |
+ ewarn "cdrtools with unicode in USE. unicode flag will be ignored." |
125 |
+ fi |
126 |
+ fi |
127 |
+ |
128 |
+ if ! use filecaps; then |
129 |
+ CFLAGS="${CFLAGS} -DNO_LINUX_CAPS" |
130 |
+ fi |
131 |
+ |
132 |
+ if ! use acl; then |
133 |
+ CFLAGS="${CFLAGS} -DNO_ACL" |
134 |
+ fi |
135 |
+ |
136 |
+ # If not built with -j1, "sometimes" cdda2wav will not be built. |
137 |
+ emake -j1 CC="$(tc-getCC)" CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" \ |
138 |
+ LDOPTX="${LDFLAGS}" \ |
139 |
+ INS_BASE="${ED}/usr" INS_RBASE="${ED}" LINKMODE="dynamic" \ |
140 |
+ RUNPATH="" GMAKE_NOWARN="true" |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ # If not built with -j1, "sometimes" manpages are not installed. |
145 |
+ emake -j1 CC="$(tc-getCC)" CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" \ |
146 |
+ LDOPTX="${LDFLAGS}" \ |
147 |
+ INS_BASE="${ED}/usr" INS_RBASE="${ED}" LINKMODE="dynamic" \ |
148 |
+ RUNPATH="" GMAKE_NOWARN="true" install |
149 |
+ |
150 |
+ # These symlinks are for compat with cdrkit. |
151 |
+ dosym schily /usr/include/scsilib |
152 |
+ dosym ../scg /usr/include/schily/scg |
153 |
+ |
154 |
+ dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux |
155 |
+ |
156 |
+ cd "${S}"/cdda2wav |
157 |
+ docinto cdda2wav |
158 |
+ dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO |
159 |
+ |
160 |
+ cd "${S}"/mkisofs |
161 |
+ docinto mkisofs |
162 |
+ dodoc ChangeLog* TODO |
163 |
+ |
164 |
+ # Remove man pages related to the build system |
165 |
+ rm -rvf "${ED}"/usr/share/man/man5 |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ fcaps_pkg_postinst |
170 |
+ |
171 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
172 |
+ einfo |
173 |
+ einfo "Darwin/OS X use the following device names:" |
174 |
+ einfo |
175 |
+ einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" |
176 |
+ einfo |
177 |
+ einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" |
178 |
+ einfo |
179 |
+ fi |
180 |
+} |
181 |
|
182 |
diff --git a/app-cdr/cdrtools/files/cdrtools-3.01-rename-clone.patch b/app-cdr/cdrtools/files/cdrtools-3.01-rename-clone.patch |
183 |
new file mode 100644 |
184 |
index 0000000..483841b |
185 |
--- /dev/null |
186 |
+++ b/app-cdr/cdrtools/files/cdrtools-3.01-rename-clone.patch |
187 |
@@ -0,0 +1,69 @@ |
188 |
+diff -Naur cdrtools-3.01.orig/readcd/readcd.c cdrtools-3.01/readcd/readcd.c |
189 |
+--- cdrtools-3.01.orig/readcd/readcd.c 2013-05-30 16:56:24.000000000 -0400 |
190 |
++++ cdrtools-3.01/readcd/readcd.c 2013-10-02 14:54:49.697222392 -0400 |
191 |
+@@ -255,7 +255,7 @@ |
192 |
+ BOOL pifscan; |
193 |
+ BOOL plot; |
194 |
+ BOOL fulltoc; |
195 |
+-BOOL clone; |
196 |
++BOOL clonetoc; |
197 |
+ BOOL edc_corr; |
198 |
+ BOOL noerror; |
199 |
+ BOOL nocorr; |
200 |
+@@ -291,7 +291,7 @@ |
201 |
+ error(_("\t-plot Print data suitable for gnuplot\n")); |
202 |
+ #ifdef CLONE_WRITE |
203 |
+ error(_("\t-fulltoc Retrieve the full TOC\n")); |
204 |
+- error(_("\t-clone Retrieve the full TOC and all data\n")); |
205 |
++ error(_("\t-clonetoc Retrieve the full TOC and all data\n")); |
206 |
+ error(_("\t-edc-corr Try to do user level Reed Solomon repair (experimental)\n")); |
207 |
+ #endif |
208 |
+ error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); |
209 |
+@@ -317,7 +317,7 @@ |
210 |
+ } |
211 |
+ |
212 |
+ /* CSTYLED */ |
213 |
+-char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,sectors*,w,c2scan,cxscan,pi8scan,pifscan,plot,fulltoc,clone,edc-corr,noerror,nocorr,notrunc,retries#,factor,f*,speed#,ts&,overhead,meshpoints#"; |
214 |
++char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,sectors*,w,c2scan,cxscan,pi8scan,pifscan,plot,fulltoc,clonetoc,edc-corr,noerror,nocorr,notrunc,retries#,factor,f*,speed#,ts&,overhead,meshpoints#"; |
215 |
+ |
216 |
+ EXPORT int |
217 |
+ main(ac, av) |
218 |
+@@ -393,7 +393,7 @@ |
219 |
+ &scanbus, &dev, §ors, &do_write, |
220 |
+ &c2scan, &cxscan, &pi8scan, &pifscan, |
221 |
+ &plot, |
222 |
+- &fulltoc, &clone, |
223 |
++ &fulltoc, &clonetoc, |
224 |
+ &edc_corr, |
225 |
+ &noerror, &nocorr, |
226 |
+ ¬runc, &retries, &do_factor, &filename, |
227 |
+@@ -664,7 +664,7 @@ |
228 |
+ |
229 |
+ if (filename || sectors || c2scan || cxscan || pi8scan || pifscan || |
230 |
+ meshpoints || fulltoc || |
231 |
+- clone || edc_corr) { |
232 |
++ clonetoc || edc_corr) { |
233 |
+ dorw(scgp, filename, sectors); |
234 |
+ } else { |
235 |
+ doit(scgp); |
236 |
+@@ -879,9 +879,9 @@ |
237 |
+ if (params.name == NULL) |
238 |
+ params.name = "/dev/null"; |
239 |
+ read_ftoc(scgp, ¶ms, FALSE); |
240 |
+- } else if (clone || edc_corr) { |
241 |
++ } else if (clonetoc || edc_corr) { |
242 |
+ if (!is_mmc(scgp, NULL, NULL)) |
243 |
+- comerrno(EX_BAD, _("Unsupported device for clone mode.\n")); |
244 |
++ comerrno(EX_BAD, _("Unsupported device for clonetoc mode.\n")); |
245 |
+ if (!edc_corr) |
246 |
+ noerror = TRUE; |
247 |
+ if (retries == MAX_RETRY) |
248 |
+@@ -889,7 +889,7 @@ |
249 |
+ if (params.name == NULL) |
250 |
+ params.name = "/dev/null"; |
251 |
+ |
252 |
+- if (clone) |
253 |
++ if (clonetoc) |
254 |
+ if (read_ftoc(scgp, ¶ms, TRUE) < 0) |
255 |
+ comerrno(EX_BAD, _("Read fulltoc problems.\n")); |
256 |
+ readcd_disk(scgp, ¶ms); |
257 |
|
258 |
diff --git a/app-cdr/cdrtools/metadata.xml b/app-cdr/cdrtools/metadata.xml |
259 |
new file mode 100644 |
260 |
index 0000000..31e9f7e |
261 |
--- /dev/null |
262 |
+++ b/app-cdr/cdrtools/metadata.xml |
263 |
@@ -0,0 +1,10 @@ |
264 |
+<?xml version="1.0" encoding="UTF-8"?> |
265 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
266 |
+<pkgmetadata> |
267 |
+<herd>media-optical</herd> |
268 |
+<maintainer> |
269 |
+<email>billie@g.o</email> |
270 |
+<name>Daniel Pielmeier</name> |
271 |
+</maintainer> |
272 |
+<longdescription>CD and DVD command line recording and ripping tools.</longdescription> |
273 |
+</pkgmetadata> |