diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-11-13 13:10:00 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-11-13 13:10:00 +0000 |
commit | e9d044d4b9b71200a96adfa280848858c0f468c9 (patch) | |
tree | 1bd8ef816043a8cd340f1d774e79553a1a7d31d8 /app-cdr/cdrtools | |
parent | fc2f1018fc323ef2c6572734a9b130427cba76a6 (diff) |
gentoo resync : 13.11.2021
Diffstat (limited to 'app-cdr/cdrtools')
-rw-r--r-- | app-cdr/cdrtools/Manifest | 1 | ||||
-rw-r--r-- | app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild | 295 |
2 files changed, 296 insertions, 0 deletions
diff --git a/app-cdr/cdrtools/Manifest b/app-cdr/cdrtools/Manifest index c3cccbcb65d0..48f261f073b5 100644 --- a/app-cdr/cdrtools/Manifest +++ b/app-cdr/cdrtools/Manifest @@ -1,5 +1,6 @@ AUX cdrtools-fix-clone-uclibc.patch 2405 BLAKE2B 6fe443e87aafee2a6e4b9ef5d6d6e9b01f8b77095ce7e6b249338264b75adf6b600afd1c4758fb1d684f01fdbd30b9285bac132064df21cca52e6ed644d69c4e SHA512 17c184d90f10f7ebde0c621b349255eb284f9b940ec6cd63427249a9bd6e16d998f06a8eab930fa03afb4ed1589421b6e57f0b183e3d4aa837c0ad65ad413727 DIST cdrtools-3.02a09.tar.bz2 2156745 BLAKE2B 3e7a7ed65faffc67d53df8dff78562dd28f2e71bb01c36f9c57c033a4a812e6a5579a212322a15c8abb5c8005d38e6e9ba5a5bfab46d9a729a673aa8ce3425e7 SHA512 59c31186f163c7aaa96083efeb0bc31e697c5d53d3343ec487eddd90dc8df6cfee50a69859a64a7004585c73a081cc453cc647c563b32ef74070d075039342d4 EBUILD cdrtools-3.02_alpha09-r3.ebuild 8532 BLAKE2B 1f2d7b54c7cebc61b7fbef87aabf423e57590030957642d172e692ad9fe4361382e9ecf4395edeea59eeb952c9b5eaa5d0077dbc840bdf38e8779a163d5669cf SHA512 5fc3afdc2eeb32aa570f36c6164ff32053b408c383f78a239f859872f4192c94f63e8a048f0ae591a53a904c27f4b286190637097dbad006c6bf918d1f34738d +EBUILD cdrtools-3.02_alpha09-r4.ebuild 8976 BLAKE2B 0a1e0a464891b395c307879b147f4fa0a1c428edacfca89fcdaffafd23baf7c468ea03127c636a46561a6e4c92eba2cc020e0555475b93704c992f2e18c643af SHA512 7519a96a0cb796e7aee9ca6e32abb092801b0e319f7010b5bf82ce05ae093a0129027bd80a347744e9b66d8376a19cc7720cf3fa9c0f8fcf49a4b82f03872c61 EBUILD cdrtools-3.02_alpha09.ebuild 8236 BLAKE2B 99d3f9a6c0fc5de0aa400ef78fcbf0cc0c3ae10588746809bfa5c3fdae4324591469283f5a30b363a7b5cfa9d404187b923248f654d878a3ea2e11b5d7d3af8e SHA512 691e96a7f6bf86bf65c4535556836f2c44db63107e7b38fc5282e38a457dfeef1c6a0af452107c870add82f666b5bd52b9241e122c073ea0a0265048040279dd MISC metadata.xml 445 BLAKE2B 43f12bca87633d1b039beed2fb401b652eafb937afc8a27d9d84885d306636bc29978beb17426dc782cb7c2e7ba9333b9346b6455fa72db2b778800f39995476 SHA512 c552eae00d8560d482fcb02799f064f5481e67ec12107760c841620db2d3023826377e186f5dc1b3555eea9b40964b4c7020b1deb82574ff1ff3ad7fd957bde9 diff --git a/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild b/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild new file mode 100644 index 000000000000..34da04ffdca0 --- /dev/null +++ b/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild @@ -0,0 +1,295 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps multilib toolchain-funcs flag-o-matic gnuconfig + +MY_P="${P/_alpha/a}" + +DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord" +HOMEPAGE="https://sourceforge.net/projects/cdrtools/" +SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1 CDDL-Schily" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="acl caps nls unicode selinux" + +BDEPEND=" + nls? ( >=sys-devel/gettext-0.18.1.1 ) + x11-misc/makedepend +" +RDEPEND=" + acl? ( virtual/acl ) + caps? ( sys-libs/libcap ) + nls? ( virtual/libintl ) + !app-cdr/cdrkit + selinux? ( sec-policy/selinux-cdrecord ) +" +DEPEND=" + ${RDEPEND} +" + +S=${WORKDIR}/${P/_alpha[0-9][0-9]} + +FILECAPS=( + 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 -- + cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav -- + cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd +) + +cdrtools_os() { + local os="linux" + [[ ${CHOST} == *-darwin* ]] && os="mac-os10" + [[ ${CHOST} == *-freebsd* ]] && os="freebsd" + echo "${os}" +} + +src_prepare() { + default + + gnuconfig_update + + # This fixes a clash with clone() on uclibc. Upstream isn't + # going to include this so let's try to carry it forward. + # Contact me if it needs updating. Bug #486782. + # Anthony G. Basile <blueness@gentoo.org>. + use elibc_uclibc && eapply "${FILESDIR}"/${PN}-fix-clone-uclibc.patch + + # Remove profiled make files. + find -name '*_p.mk' -delete || die "delete *_p.mk" + + # Adjusting hardcoded paths. + sed -i -e "s|opt/schily|usr|" \ + $(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \ + || die "sed opt/schily" + + sed -i -e "s|\(^INSDIR=\t\tshare/doc/\)|\1${PF}/|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+doc' '{}' '+') \ + || die "sed doc" + + # Respect libdir. + sed -i -e "s|\(^INSDIR=\t\t\)lib|\1$(get_libdir)|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \ + || die "sed multilib" + + # Do not install static libraries. + sed -i -e "s|include\t\t.*rules.lib||" \ + $(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \ + || die "sed rules" + + # Enable verbose build. + sed -i -e '/@echo.*==>.*;/s:@echo[^;]*;:&set -x;:' \ + RULES/*.rul RULES/rules.prg RULES/rules.inc \ + || die "sed verbose rules" + + # Respect CC/CXX variables. + cd "${S}"/RULES || die + local tcCC=$(tc-getCC) + local tcCXX=$(tc-getCXX) + # fix RISC-V build err, bug 811375 + ln -s i586-linux-cc.rul riscv-linux-cc.rul || die + ln -s i586-linux-cc.rul riscv64-linux-cc.rul || die + + sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \ + rules1.top || die "sed rules1.top" + sed -i -e "/^CC_COM_DEF=/s|gcc|${tcCC}|" \ + -e "/^CC++_COM_DEF=/s|g++|${tcCXX}|" \ + -e "/COPTOPT=/s|-O||" \ + -e 's|$(GCCOPTOPT)||' \ + cc-gcc.rul || die "sed cc-gcc.rul" + sed -i -e "s|^#\(CONFFLAGS +=\).*|\1\t-cc=${tcCC}|" \ + rules.cnf || die "sed rules.cnf" + + # Add support for arm64 + ln -sf i586-linux-cc.rul aarch64_be-linux-cc.rul + ln -sf i586-linux-clang.rul aarch64_be-linux-clang.rul + ln -sf i586-linux-clang32.rul aarch64_be-linux-clang32.rul + ln -sf i586-linux-clang64.rul aarch64_be-linux-clang64.rul + ln -sf i586-linux-gcc.rul aarch64_be-linux-gcc.rul + ln -sf i586-linux-gcc32.rul aarch64_be-linux-gcc32.rul + ln -sf i586-linux-gcc64.rul aarch64_be-linux-gcc64.rul + + # Schily make setup. + cd "${S}"/DEFAULTS || die + local os=$(cdrtools_os) + + sed -i \ + -e "s|^\(DEFLINKMODE=\).*|\1\tdynamic|" \ + -e "s|^\(LINUX_INCL_PATH=\).*|\1|" \ + -e "s|^\(LDPATH=\).*|\1|" \ + -e "s|^\(RUNPATH=\).*|\1|" \ + -e "s|^\(INS_BASE=\).*|\1\t${ED}/usr|" \ + -e "s|^\(INS_RBASE=\).*|\1\t${ED}|" \ + -e "s|^\(DEFINSGRP=\).*|\1\t0|" \ + -e '/^DEFUMASK/s,002,022,g' \ + Defaults.${os} || die "sed Schily make setup" + # re DEFUMASK above: + # bug 486680: grsec TPE will block the exec if the directory is + # group-writable. This is painful with cdrtools, because it makes a bunch of + # group-writable directories during build. Change the umask on their + # creation to prevent this. +} + +ac_cv_sizeof() { + cat <<-EOF >"${T}"/test.c + #include <inttypes.h> + #include <stddef.h> + #include <stdint.h> + #include <sys/types.h> + int main () { + static int test_array [1 - 2 * !((sizeof(TYPE)) == LEN)]; + test_array [0] = 0; + return test_array [0]; + } + EOF + + local i=1 + while [[ ${i} -lt 20 ]] ; do + if ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o /dev/null -DTYPE="$1" -DLEN=$i 2>/dev/null; then + echo ${i} + return 0 + fi + : $(( i += 1 )) + done + return 1 +} + +src_configure() { + use acl || export ac_cv_header_sys_acl_h="no" + use caps || export ac_cv_lib_cap_cap_get_proc="no" + export ac_cv_header_pulse_pulseaudio_h="no" + export ac_cv_header_alsa_asoundlib_h="no" + export ac_cv_lib_asound_snd_pcm_open="no" + + # skip obsolete configure script + if tc-is-cross-compiler ; then + # Cache known values for targets. #486680 + + tc-export CC + local var val t types=( + char "short int" int "long int" "long long" + "unsigned char" "unsigned short int" "unsigned int" + "unsigned long int" "unsigned long long" + float double "long double" size_t ssize_t ptrdiff_t + mode_t uid_t gid_t pid_t dev_t time_t wchar_t + "char *" "unsigned char *" + ) + for t in "${types[@]}" ; do + var="ac_cv_sizeof_${t// /_}" + var=${var//[*]/p} + val=$(ac_cv_sizeof "${t}") || die "could not compute ${t}" + export "${var}=${val}" + einfo "Computing sizeof(${t}) as ${val}" + done + # We don't have these types. + export ac_cv_sizeof___int64=0 + export ac_cv_sizeof_unsigned___int64=0 + export ac_cv_sizeof_major_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_minor_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_wchar=${ac_cv_sizeof_wchar_t} + + export ac_cv_type_prototypes="yes" + export ac_cv_func_mlock{,all}="yes" + export ac_cv_func_{e,f,g}cvt=$(usex elibc_glibc) + export ac_cv_func_dtoa_r="no" + export ac_cv_func_sys_siglist{,_def}="no" + export ac_cv_func_printf_{j,ll}="yes" + export ac_cv_realloc_null="yes" + export ac_cv_no_user_malloc="no" + export ac_cv_var_timezone="yes" + export ac_cv_var___progname{,_full}="yes" + export ac_cv_fnmatch_igncase="yes" + export ac_cv_file__dev_{fd_{0,1,2},null,std{err,in,out},tty,zero}="yes" + export ac_cv_file__usr_src_linux_include="no" + + case $(cdrtools_os) in + linux) + export ac_cv_func_bsd_{g,s}etpgrp="no" + export ac_cv_hard_symlinks="yes" + export ac_cv_link_nofollow="yes" + export ac_cv_access_e_ok="no" + + export ac_cv_dev_minor_noncontig="yes" + case ${ac_cv_sizeof_long_int} in + 4) export ac_cv_dev_minor_bits="32";; + 8) export ac_cv_dev_minor_bits="44";; + esac + + cat <<-EOF >"${T}"/test.c + struct { + char start[6]; + unsigned char x1:4; + unsigned char x2:4; + char end[5]; + } a = { + .start = {'S', 't', 'A', 'r', 'T', '_'}, + .x1 = 5, + .x2 = 4, + .end = {'_', 'e', 'N', 'd', 'X'}, + }; + EOF + ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + if grep -q 'StArT_E_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="no" + elif grep -q 'StArT_T_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="yes" + fi + ;; + esac + fi +} + +src_compile() { + if use unicode; then + local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)" + if [[ -n ${flags} ]]; then + append-flags ${flags} + else + ewarn "Your compiler does not support the options required to build" + ewarn "cdrtools with unicode in USE. unicode flag will be ignored." + fi + fi + + # If not built with -j1, "sometimes" cdda2wav will not be built. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" +} + +src_install() { + # If not built with -j1, "sometimes" manpages are not installed. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install + + # These symlinks are for compat with cdrkit. + dosym schily /usr/include/scsilib + dosym ../scg /usr/include/schily/scg + + dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux + + cd "${S}"/cdda2wav || die + docinto cdda2wav + dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO + + cd "${S}"/mkisofs || die + docinto mkisofs + dodoc ChangeLog* TODO + + # Remove man pages related to the build system + rm -rvf "${ED}"/usr/share/man/man5 || die +} + +pkg_postinst() { + fcaps_pkg_postinst + + if [[ ${CHOST} == *-darwin* ]] ; then + einfo + einfo "Darwin/OS X use the following device names:" + einfo + einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" + einfo + einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" + einfo + fi +} |