Mercurial > vanilla
changeset 1048:bc1d97842cff
audio/cdrdao: initial import, closes #1224
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 30 Aug 2019 22:25:32 +0200 |
parents | 94040ea55db2 |
children | 80f33a477a65 |
files | audio/cdrdao/cdrdao.sh audio/cdrdao/cdrdao.sha1 |
diffstat | 2 files changed, 85 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio/cdrdao/cdrdao.sh Fri Aug 30 22:25:32 2019 +0200 @@ -0,0 +1,84 @@ +#!/bin/busybox sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=cdrdao +PKGVERSION=1.2.4 +PKGREVISION=1 +PKGLICENSE="GPLv20" +PKGSUMMARY="write audio/data CD-Rs in disk-at-once mode" +PKGDOWNLOAD="https://sourceforge.net/projects/cdrdao/files/$PKGNAME-$PKGVERSION.tar.bz2" +PKGDEPENDS="" +PKGOPTIONS="MP3 OGG" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} +: ${MP3:=lame mad} # Note: can be lame, mad or yes (both). + +if [ "$OGG" = "yes" ]; then + PKGDEPENDS="libvorbis $PKGDEPENDS" + with_ogg="--with-ogg-support" +else + with_ogg="--without-ogg-support" +fi + +if [ -z "${MP3##*mad*}" ] || [ "$MP3" = "yes" ]; then + PKGDEPENDS="libmad $PKGDEPENDS" + with_mad="--with-mp3-support" +else + with_mad="--without-mp3-support" +fi + +if [ -z "${MP3##*lame*}" ] || [ "$MP3" = "yes" ]; then + PKGDEPENDS="lame $PKGDEPENDS" + with_lame="--with-lame" +else + with_lame="--without-lame" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.bz2 + cd $PKGNAME-$PKGVERSION + + # TODO: --without-gcdmaster: missing dependencies. + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix= \ + --without-gcdmaster \ + $with_ogg \ + $with_mad \ + $with_lame + make + make install DESTDIR=$DESTDIR + + cd .. + rm -rf $PKGNAME-$PKGVERSION +}