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.

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