kumquat-buildroot/package/libmad/libmad.mk
Dario Binacchi 47caba65a0 package/libmad: update the patches to be applied with fuzz 0
Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum
fuzz factor to 0") reduced the fuzz factor.

Due to this change, libmad fails to build with output:

    Applying mips-gcc4.4.diff using series:
    patching file fixed.h
    Hunk #1 FAILED at 297.
    1 out of 1 hunk FAILED -- saving rejects to file fixed.h.rej

The package applied the patches in two steps, first the local ones and
then the official ones downloaded from the repository. The commit fixes
the issue by reversing the order of patch application steps.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
(cherry picked from commit b21184a87733f2f2ccee69cade6875c507e439dc)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-07-09 19:03:35 +02:00

57 lines
1.8 KiB
Makefile

################################################################################
#
# libmad
#
################################################################################
LIBMAD_VERSION = 0.15.1b
LIBMAD_PATCH = libmad_$(LIBMAD_VERSION)-10.diff.gz
LIBMAD_SOURCE = libmad_$(LIBMAD_VERSION).orig.tar.gz
LIBMAD_SITE = \
http://snapshot.debian.org/archive/debian/20190310T213528Z/pool/main/libm/libmad
LIBMAD_INSTALL_STAGING = YES
LIBMAD_LICENSE = GPL-2.0+
LIBMAD_LICENSE_FILES = COPYING
define LIBMAD_APPLY_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
$(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.patch; \
fi
endef
LIBMAD_PRE_PATCH_HOOKS += LIBMAD_APPLY_DEBIAN_PATCHES
# debian/patches/md_size.diff
LIBMAD_IGNORE_CVES += CVE-2017-8372 CVE-2017-8373
# debian/patches/length-check.patch
LIBMAD_IGNORE_CVES += CVE-2017-8374
# Force autoreconf to be able to use a more recent libtool script, that
# is able to properly behave in the face of a missing C++ compiler.
LIBMAD_AUTORECONF = YES
# libmad has some assembly function that is not present in Thumb mode:
# Error: selected processor does not support `smull r6,r7,r3,r1' in Thumb mode
# so, we desactivate Thumb mode
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
LIBMAD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
endif
define LIBMAD_INSTALL_STAGING_PC
$(INSTALL) -D package/libmad/mad.pc \
$(STAGING_DIR)/usr/lib/pkgconfig/mad.pc
endef
LIBMAD_POST_INSTALL_STAGING_HOOKS += LIBMAD_INSTALL_STAGING_PC
LIBMAD_CONF_OPTS = \
--disable-debugging \
$(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED),--enable-speed) \
$(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY),--enable-accuracy) \
--$(if $(BR2_PACKAGE_LIBMAD_SSO),enable,disable)-sso \
--$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso \
--$(if $(BR2_PACKAGE_LIBMAD_STRICT_ISO),enable,disable)-strict-iso
$(eval $(autotools-package))