mpg123.mk 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ################################################################################
  2. #
  3. # mpg123
  4. #
  5. ################################################################################
  6. MPG123_VERSION = 1.32.3
  7. MPG123_SOURCE = mpg123-$(MPG123_VERSION).tar.bz2
  8. MPG123_SITE = https://downloads.sourceforge.net/project/mpg123/mpg123/$(MPG123_VERSION)
  9. MPG123_INSTALL_STAGING = YES
  10. MPG123_LICENSE = LGPL-2.1
  11. MPG123_LICENSE_FILES = COPYING
  12. MPG123_CPE_ID_VENDOR = mpg123
  13. MPG123_DEPENDENCIES = host-pkgconf
  14. # mpg123 has some assembly function that is not present in Thumb mode:
  15. # Error: selected processor does not support `smull r3,ip,r2,r10' in Thumb mode
  16. # so, we deactivate Thumb mode
  17. ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
  18. MPG123_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
  19. endif
  20. MPG123_CPU = $(if $(BR2_SOFT_FLOAT),generic_nofpu,generic_fpu)
  21. ifeq ($(BR2_aarch64),y)
  22. MPG123_CPU = aarch64
  23. endif
  24. ifeq ($(BR2_arm),y)
  25. ifeq ($(or $(BR2_ARM_CPU_HAS_NEON),$(BR2_ARM_CPU_HAS_VFPV2)),y)
  26. MPG123_CPU = arm_fpu
  27. else
  28. MPG123_CPU = arm_nofpu
  29. endif
  30. endif
  31. ifeq ($(BR2_i386),y)
  32. MPG123_CPU = x86
  33. endif
  34. ifeq ($(BR2_powerpc),y)
  35. ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
  36. MPG123_CPU = altivec
  37. endif
  38. ifeq ($(BR2_SOFT_FLOAT),y)
  39. MPG123_CPU = ppc_nofpu
  40. endif
  41. endif # powerpc
  42. ifeq ($(BR2_x86_64),y)
  43. MPG123_CPU = x86-64
  44. endif
  45. MPG123_CONF_OPTS += --with-cpu=$(MPG123_CPU)
  46. MPG123_AUDIO = dummy oss
  47. ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
  48. MPG123_AUDIO += portaudio
  49. MPG123_CONF_OPTS += --with-default-audio=portaudio
  50. MPG123_DEPENDENCIES += portaudio
  51. # configure script does NOT use pkg-config to figure out how to link
  52. # with portaudio, breaking static linking as portaudio uses pthreads
  53. MPG123_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs portaudio-2.0`"
  54. endif
  55. ifeq ($(BR2_PACKAGE_SDL),y)
  56. MPG123_AUDIO += sdl
  57. MPG123_CONF_OPTS += --with-default-audio=sdl
  58. MPG123_DEPENDENCIES += sdl
  59. endif
  60. ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
  61. MPG123_AUDIO += alsa
  62. MPG123_CONF_OPTS += --with-default-audio=alsa
  63. MPG123_DEPENDENCIES += alsa-lib
  64. # configure script does NOT use pkg-config to figure out how to link
  65. # with alsa, breaking static linking as alsa uses pthreads
  66. MPG123_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs alsa`"
  67. endif
  68. MPG123_CONF_OPTS += --with-audio=$(subst $(space),$(comma),$(MPG123_AUDIO))
  69. # output modules are loaded with dlopen()
  70. ifeq ($(BR2_STATIC_LIBS),y)
  71. MPG123_CONF_OPTS += --disable-modules
  72. else
  73. MPG123_CONF_OPTS += --enable-modules
  74. endif
  75. $(eval $(autotools-package))