Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # |
| 3 | # sox |
| 4 | # |
| 5 | ################################################################################ |
| 6 | |
Arnout Vandecappelle (Essensium/Mind) | c7eefe1 | 2021-02-05 09:01:14 +0100 | [diff] [blame] | 7 | SOX_VERSION = 7524160b29a476f7e87bc14fddf12d349f9a3c5e |
Markus Mayer | 6626bf7 | 2022-04-01 14:56:53 -0700 | [diff] [blame] | 8 | SOX_SITE = https://git.code.sf.net/p/sox/code |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 9 | SOX_SITE_METHOD = git |
| 10 | SOX_DEPENDENCIES = host-autoconf-archive host-pkgconf |
Rahul Bedarkar | 30a3e8d | 2017-03-30 19:13:34 +0530 | [diff] [blame] | 11 | SOX_LICENSE = GPL-2.0+ (sox binary), LGPL-2.1+ (libraries) |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 12 | SOX_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL |
Fabrice Fontaine | 048dac0 | 2021-01-28 18:21:22 +0100 | [diff] [blame] | 13 | SOX_CPE_ID_VENDOR = sound_exchange_project |
| 14 | SOX_CPE_ID_PRODUCT = sound_exchange |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 15 | # From git and we're patching configure.ac |
| 16 | SOX_AUTORECONF = YES |
| 17 | SOX_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive |
Adrian Amaglio | b6ff11f | 2021-09-09 11:14:53 +0200 | [diff] [blame] | 18 | SOX_INSTALL_STAGING = YES |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 19 | |
| 20 | SOX_IGNORE_CVES += CVE-2017-11332 CVE-2017-11358 CVE-2017-11359 \ |
| 21 | CVE-2017-15370 CVE-2017-15371 CVE-2017-15372 CVE-2017-15642 \ |
| 22 | CVE-2017-18189 CVE-2019-8354 CVE-2019-8355 CVE-2019-8356 \ |
| 23 | CVE-2019-8357 CVE-2019-13590 |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 24 | |
Yann Droneaud | 4653d27 | 2019-10-25 15:42:42 +0200 | [diff] [blame] | 25 | SOX_CONF_OPTS = \ |
| 26 | --with-distro="Buildroot" \ |
Yann Droneaud | 4653d27 | 2019-10-25 15:42:42 +0200 | [diff] [blame] | 27 | --disable-stack-protector |
Vicente Olivert Riera | 1834024 | 2016-02-29 16:39:42 +0000 | [diff] [blame] | 28 | |
Giulio Benetti | dd8a8cf | 2022-09-10 00:15:59 +0200 | [diff] [blame] | 29 | SOX_CFLAGS = $(TARGET_CFLAGS) |
| 30 | |
| 31 | ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) |
| 32 | SOX_CFLAGS += -O0 |
| 33 | endif |
| 34 | |
| 35 | SOX_CONF_ENV += CFLAGS="$(SOX_CFLAGS)" |
| 36 | |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 37 | ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) |
| 38 | SOX_DEPENDENCIES += alsa-lib |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 39 | SOX_CONF_OPTS += --enable-alsa |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 40 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 41 | SOX_CONF_OPTS += --disable-alsa |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 42 | endif |
| 43 | |
| 44 | ifeq ($(BR2_PACKAGE_FILE),y) |
| 45 | SOX_DEPENDENCIES += file |
Fabrice Fontaine | c5f3c6f | 2021-03-23 07:50:50 +0100 | [diff] [blame] | 46 | SOX_CONF_OPTS += --enable-magic |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 47 | else |
Fabrice Fontaine | c5f3c6f | 2021-03-23 07:50:50 +0100 | [diff] [blame] | 48 | SOX_CONF_OPTS += --disable-magic |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 49 | endif |
| 50 | |
| 51 | ifeq ($(BR2_PACKAGE_FLAC),y) |
| 52 | SOX_DEPENDENCIES += flac |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 53 | SOX_CONF_OPTS += --enable-flac |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 54 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 55 | SOX_CONF_OPTS += --disable-flac |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 56 | endif |
| 57 | |
| 58 | ifeq ($(BR2_PACKAGE_LAME),y) |
| 59 | SOX_DEPENDENCIES += lame |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 60 | SOX_CONF_OPTS += --with-lame |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 61 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 62 | SOX_CONF_OPTS += --without-lame |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 63 | endif |
| 64 | |
| 65 | ifeq ($(BR2_PACKAGE_LIBAO),y) |
| 66 | SOX_DEPENDENCIES += libao |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 67 | SOX_CONF_OPTS += --enable-ao |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 68 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 69 | SOX_CONF_OPTS += --disable-ao |
| 70 | endif |
| 71 | |
| 72 | ifeq ($(BR2_PACKAGE_LIBGSM),y) |
| 73 | SOX_DEPENDENCIES += libgsm |
| 74 | SOX_CONF_OPTS += --enable-gsm |
| 75 | else |
| 76 | SOX_CONF_OPTS += --disable-gsm |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 77 | endif |
| 78 | |
| 79 | ifeq ($(BR2_PACKAGE_LIBID3TAG),y) |
| 80 | SOX_DEPENDENCIES += libid3tag |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 81 | SOX_CONF_OPTS += --with-id3tag |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 82 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 83 | SOX_CONF_OPTS += --without-id3tag |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 84 | endif |
| 85 | |
| 86 | ifeq ($(BR2_PACKAGE_LIBMAD),y) |
| 87 | SOX_DEPENDENCIES += libmad |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 88 | SOX_CONF_OPTS += --with-mad |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 89 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 90 | SOX_CONF_OPTS += --without-mad |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 91 | endif |
| 92 | |
| 93 | ifeq ($(BR2_PACKAGE_LIBPNG),y) |
| 94 | SOX_DEPENDENCIES += libpng |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 95 | SOX_CONF_OPTS += --with-png |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 96 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 97 | SOX_CONF_OPTS += --without-png |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 98 | endif |
| 99 | |
| 100 | ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) |
| 101 | SOX_DEPENDENCIES += libsndfile |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 102 | SOX_CONF_OPTS += --enable-sndfile |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 103 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 104 | SOX_CONF_OPTS += --disable-sndfile |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 105 | endif |
| 106 | |
| 107 | ifeq ($(BR2_PACKAGE_LIBVORBIS),y) |
| 108 | SOX_DEPENDENCIES += libvorbis |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 109 | SOX_CONF_OPTS += --enable-oggvorbis |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 110 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 111 | SOX_CONF_OPTS += --disable-oggvorbis |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 112 | endif |
| 113 | |
| 114 | ifeq ($(BR2_PACKAGE_OPENCORE_AMR),y) |
| 115 | SOX_DEPENDENCIES += opencore-amr |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 116 | SOX_CONF_OPTS += --enable-amrwb --enable-amrnb |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 117 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 118 | SOX_CONF_OPTS += --disable-amrwb --disable-amrnb |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 119 | endif |
| 120 | |
Gustavo Zacarias | 34efcd0 | 2015-02-25 10:06:26 -0300 | [diff] [blame] | 121 | ifeq ($(BR2_PACKAGE_OPUSFILE),y) |
| 122 | SOX_DEPENDENCIES += opusfile |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 123 | SOX_CONF_OPTS += --enable-opus |
Gustavo Zacarias | 34efcd0 | 2015-02-25 10:06:26 -0300 | [diff] [blame] | 124 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 125 | SOX_CONF_OPTS += --disable-opus |
Gustavo Zacarias | 34efcd0 | 2015-02-25 10:06:26 -0300 | [diff] [blame] | 126 | endif |
| 127 | |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 128 | ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) |
| 129 | SOX_DEPENDENCIES += pulseaudio |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 130 | SOX_CONF_OPTS += --enable-pulseaudio |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 131 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 132 | SOX_CONF_OPTS += --disable-pulseaudio |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 133 | endif |
| 134 | |
| 135 | ifeq ($(BR2_PACKAGE_TWOLAME),y) |
| 136 | SOX_DEPENDENCIES += twolame |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 137 | SOX_CONF_OPTS += --with-twolame |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 138 | else |
Thomas De Schampheleire | aaffd20 | 2014-09-27 21:32:44 +0200 | [diff] [blame] | 139 | SOX_CONF_OPTS += --without-twolame |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 140 | endif |
| 141 | |
| 142 | ifeq ($(BR2_PACKAGE_WAVPACK),y) |
| 143 | SOX_DEPENDENCIES += wavpack |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 144 | SOX_CONF_OPTS += --enable-wavpack |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 145 | else |
Fabrice Fontaine | b6871f9 | 2021-02-03 21:00:49 +0100 | [diff] [blame] | 146 | SOX_CONF_OPTS += --disable-wavpack |
Gustavo Zacarias | d2b1151 | 2014-06-27 22:38:54 -0300 | [diff] [blame] | 147 | endif |
| 148 | |
| 149 | $(eval $(autotools-package)) |