You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.9 KiB

squeezelite: Specify all libraries to link against squeezelite needs to link against libvorbis and libogg, some external toolchains may not be able to automatically pull these dependencies in, resulting the such linking errors: mipsel-linux-gnu-gcc main.o slimproto.o buffer.o stream.o utils.o output.o output_alsa.o output_pa.o output_stdout.o output_pack.o decode.o flac.o pcm.o mad.o vorbis.o faad.o -L/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/lib -L/home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/lib -L/home/florian/dev/toolchains/stbgcc-4.8-1.5/usr/lib -L/home/florian/dev/toolchains/stbgcc-4.8-1.5/lib -znow -zrelro -lasound -lpthread -lm -lrt -lasound -lpthread -lm -lrt -lFLAC -lmad -lvorbisfile -lfaad -o squeezelite /home/florian/dev/toolchains/stbgcc-4.8-1.5/bin/../lib/gcc/mipsel-linux-gnu/4.8.5/../../../../mipsel-linux-gnu/bin/ld: warning: libvorbis.so.0, needed by /home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/lib/libvorbisfile.so, not found (try using -rpath or -rpath-link) /home/florian/dev/toolchains/stbgcc-4.8-1.5/bin/../lib/gcc/mipsel-linux-gnu/4.8.5/../../../../mipsel-linux-gnu/bin/ld: warning: libogg.so.0, needed by /home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/lib/libvorbisfile.so, not found (try using -rpath or -rpath-link) /home/florian/dev/openwrt/trunk/staging_dir/target-mipsel-unknown-linux-gnu_glibc/usr/lib/libvorbisfile.so: undefined reference to `ogg_stream_reset' collect2: error: ld returned 1 exit status Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years ago
  1. #
  2. # Copyright (C) 2015-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=squeezelite
  9. PKG_VERSION:=1.8.4-743
  10. PKG_RELEASE=1
  11. PKG_LICENSE:=GPL-3.0
  12. PKG_LICENSE_FILES:=LICENSE.txt
  13. PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_BUILD_DEPENDS:=libflac libvorbis libmad libfaad2 SQUEEZELITE_WMA:libffmpeg-audio-dec
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/squeezelite/default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. TITLE:=Headless squeezebox emulator
  26. PROVIDES:=squeezelite
  27. URL:=https://github.com/ralph-irving/squeezelite
  28. DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr
  29. MENU:=1
  30. endef
  31. define Package/squeezelite-full
  32. $(call Package/squeezelite/default)
  33. TITLE+= (full)
  34. DEPENDS+= +libflac +libvorbis +libmad +libfaad2 \
  35. +SQUEEZELITE_WMA:libffmpeg-audio-dec
  36. VARIANT:=full
  37. endef
  38. define Package/squeezelite-mini
  39. $(call Package/squeezelite/default)
  40. TITLE+= (minimal)
  41. VARIANT:=mini
  42. endef
  43. define Package/squeezelite/config/default
  44. config SQUEEZELITE_WMA
  45. bool "WMA/ALAC decode support"
  46. help
  47. Include WMA and ALAC decoding using ffmpeg
  48. default n
  49. config SQUEEZELITE_RESAMPLE
  50. bool "Resample support"
  51. help
  52. Include support for resampling using libsoxr
  53. default n
  54. config SQUEEZELITE_DSD
  55. bool "DSD playback over PCM (DoP)"
  56. help
  57. Include support for DSD over PCM for compatible DAC"
  58. default n
  59. endef
  60. define Package/squeezelite-full/config
  61. if PACKAGE_squeezelite-full
  62. $(call Package/squeezelite/config/default)
  63. endif
  64. endef
  65. define Package/squeezelite-mini/config
  66. if PACKAGE_squeezelite-mini
  67. $(call Package/squeezelite/config/default)
  68. endif
  69. endef
  70. define Package/squeezelite/description/default
  71. Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
  72. It is aimed at supporting high quality audio at multiple sample rates including
  73. 44.1/48/88.2/96/176.4/192k/352.8/384kHz
  74. Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
  75. Native support for PCM builtin
  76. Optional support of DSD playback via PCM for DoP capable DAC
  77. Optional resampling to match sound device
  78. endef
  79. define Package/squeezelite/description
  80. $(call Package/squeezelite/description/default)
  81. .
  82. This package has all the audio codecs compiled in.
  83. endef
  84. define Package/squeezelite-mini/description
  85. $(call Package/squeezelite/description/default)
  86. .
  87. This package will dynamically load installed codecs.
  88. endef
  89. #ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  90. # PKG_BUILD_DEPENDS+= libffmpeg-audio-dec
  91. #endif
  92. TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE
  93. ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  94. TARGET_CFLAGS+= -DFFMPEG
  95. endif
  96. ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
  97. TARGET_CFLAGS+= -DDSD
  98. endif
  99. ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
  100. TARGET_CFLAGS+= -DRESAMPLE
  101. endif
  102. TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt
  103. ifeq ($(BUILD_VARIANT),full)
  104. TARGET_CFLAGS+= -DLINKALL
  105. TARGET_LDFLAGS+= -lvorbis -logg
  106. endif
  107. define Package/squeezelite/install
  108. $(INSTALL_DIR) $(1)/usr/bin
  109. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
  110. $(INSTALL_DIR) $(1)/etc/init.d
  111. $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
  112. $(INSTALL_DIR) $(1)/etc/config
  113. $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
  114. endef
  115. Package/squeezelite-mini/install=$(Package/squeezelite/install)
  116. Package/squeezelite-full/install=$(Package/squeezelite/install)
  117. $(eval $(call BuildPackage,squeezelite-mini))
  118. $(eval $(call BuildPackage,squeezelite-full))