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.

146 lines
4.0 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. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=squeezelite
  7. PKG_VERSION:=1.8.4-743
  8. PKG_RELEASE=2
  9. PKG_LICENSE:=GPL-3.0
  10. PKG_LICENSE_FILES:=LICENSE.txt
  11. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=b6ea4a11366330790f5e36bd875b45bb19a9772dfc984c462f436dfca30256c0
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_BUILD_DEPENDS:=libflac libvorbis libmpg123 libfaad2 SQUEEZELITE_WMA:libffmpeg-audio-dec
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/squeezelite/default
  22. SECTION:=sound
  23. CATEGORY:=Sound
  24. TITLE:=Headless squeezebox emulator
  25. PROVIDES:=squeezelite
  26. URL:=https://github.com/ralph-irving/squeezelite
  27. DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr
  28. MENU:=1
  29. endef
  30. define Package/squeezelite-full
  31. $(call Package/squeezelite/default)
  32. TITLE+= (full)
  33. DEPENDS+= +libflac +libvorbis +libmpg123 +libfaad2 \
  34. +SQUEEZELITE_WMA:libffmpeg-audio-dec
  35. VARIANT:=full
  36. endef
  37. define Package/squeezelite-mini
  38. $(call Package/squeezelite/default)
  39. TITLE+= (minimal)
  40. VARIANT:=mini
  41. endef
  42. define Package/squeezelite/config/default
  43. config SQUEEZELITE_WMA
  44. bool "WMA/ALAC decode support"
  45. help
  46. Include WMA and ALAC decoding using ffmpeg
  47. default n
  48. config SQUEEZELITE_RESAMPLE
  49. bool "Resample support"
  50. help
  51. Include support for resampling using libsoxr
  52. default n
  53. config SQUEEZELITE_DSD
  54. bool "DSD playback over PCM (DoP)"
  55. help
  56. Include support for DSD over PCM for compatible DAC"
  57. default n
  58. endef
  59. define Package/squeezelite-full/config
  60. if PACKAGE_squeezelite-full
  61. $(call Package/squeezelite/config/default)
  62. endif
  63. endef
  64. define Package/squeezelite-mini/config
  65. if PACKAGE_squeezelite-mini
  66. $(call Package/squeezelite/config/default)
  67. endif
  68. endef
  69. define Package/squeezelite/description/default
  70. Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
  71. It is aimed at supporting high quality audio at multiple sample rates including
  72. 44.1/48/88.2/96/176.4/192k/352.8/384kHz
  73. Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
  74. Native support for PCM builtin
  75. Optional support of DSD playback via PCM for DoP capable DAC
  76. Optional resampling to match sound device
  77. endef
  78. define Package/squeezelite/description
  79. $(call Package/squeezelite/description/default)
  80. .
  81. This package has all the audio codecs compiled in.
  82. endef
  83. define Package/squeezelite-mini/description
  84. $(call Package/squeezelite/description/default)
  85. .
  86. This package will dynamically load installed codecs.
  87. endef
  88. #ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  89. # PKG_BUILD_DEPENDS+= libffmpeg-audio-dec
  90. #endif
  91. TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE
  92. ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
  93. TARGET_CFLAGS+= -DFFMPEG
  94. endif
  95. ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
  96. TARGET_CFLAGS+= -DDSD
  97. endif
  98. ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
  99. TARGET_CFLAGS+= -DRESAMPLE
  100. endif
  101. TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt
  102. ifeq ($(BUILD_VARIANT),full)
  103. TARGET_CFLAGS+= -DLINKALL
  104. TARGET_LDFLAGS+= -lvorbis -logg
  105. endif
  106. define Package/squeezelite/install
  107. $(INSTALL_DIR) $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
  109. $(INSTALL_DIR) $(1)/etc/init.d
  110. $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite
  111. $(INSTALL_DIR) $(1)/etc/config
  112. $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite
  113. endef
  114. Package/squeezelite-mini/install=$(Package/squeezelite/install)
  115. Package/squeezelite-full/install=$(Package/squeezelite/install)
  116. $(eval $(call BuildPackage,squeezelite-mini))
  117. $(eval $(call BuildPackage,squeezelite-full))