1# cdrtools-native OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc.  All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4SUMMARY = "A set of tools for CD recording, including cdrecord"
5HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
6DESCRIPTION = "cdrecord tool is Highly portable CD/DVD/BluRay command line recording software."
7SECTION = "console/utils"
8LICENSE = "GPL-2.0-only & CDDL-1.0 & LGPL-2.1-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
10
11DEPENDS += "gnu-config-native"
12
13SRC_URI = " \
14	${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${PV}.tar.bz2 \
15	file://0001-Don-t-set-uid-gid-during-install.patch \
16	file://riscv64-linux-gcc.rul \
17	file://gcc14-fix.patch \
18	"
19
20SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
21SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
22
23EXTRA_OEMAKE = "-e MAKEFLAGS= CPPOPTX='${CPPFLAGS}' COPTX='${CFLAGS}' C++OPTX='${CXXFLAGS}' LDOPTX='${LDFLAGS}' GMAKE_NOWARN='true'"
24
25# Stop failures when 'cc' can't be found
26export ac_cv_prog_CC = "${CC}"
27
28inherit native
29
30# Use -std=gnu89 to build with gcc-14 (https://bugs.gentoo.org/903876)
31# this needs to be after native inherit (which sets CFLAGS to BUILD_CFLAGS)
32CFLAGS += "-std=gnu89"
33
34do_configure() {
35        # cdda2wav does not build with GCC 14
36        rm -f ${S}/TARGETS/55cdda2wav
37
38        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/autoconf
39        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/autoconf
40        install -m 0644 ${UNPACKDIR}/riscv64-linux-gcc.rul ${S}/RULES/
41}
42
43do_install() {
44	make install GMAKE_NOWARN=true INS_BASE=${prefix} DESTDIR=${D}
45}
46