1
0

fix-mp3lame.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index b1b49e9..ae8ebec 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -174,7 +174,7 @@ set_package_properties (FLAC PROPERTIES
  6. DESCRIPTION "Free Lossless Audio Codec Library"
  7. PURPOSE "Enables FLAC support"
  8. )
  9. -set_package_properties (Lame PROPERTIES
  10. +set_package_properties (mp3lame PROPERTIES
  11. TYPE RECOMMENDED
  12. URL "https://lame.sourceforge.io/"
  13. DESCRIPTION "High quality MPEG Audio Layer III (MP3) encoder"
  14. @@ -237,20 +237,7 @@ if (INSTALL_PKGCONFIG_MODULE)
  15. endif ()
  16. if (ENABLE_MPEG)
  17. set (EXTERNAL_MPEG_REQUIRE "libmpg123")
  18. - get_filename_component(LAME_WE ${LAME_LIBRARY} NAME_WE)
  19. - if (LAME_HIP_LIBRARY)
  20. - get_filename_component(LAME_HIP_WE ${LAME_HIP_LIBRARY} NAME_WE)
  21. - endif ()
  22. - if (CMAKE_IMPORT_LIBRARY_PREFIX)
  23. - string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_WE_NO_PREFIX ${LAME_WE})
  24. - if (LAME_HIP_LIBRARY)
  25. - string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_HIP_WE_NO_PREFIX ${LAME_HIP_WE})
  26. - endif ()
  27. - endif ()
  28. - set (EXTERNAL_MPEG_LIBS "-l${LAME_WE_NO_PREFIX}")
  29. - if (LAME_HIP_LIBRARY)
  30. - set (EXTERNAL_MPEG_LIBS "${MPEG_LIBS} -l${LAME_HIP_WE}")
  31. - endif ()
  32. + set (EXTERNAL_MPEG_LIBS "-lmp3lame")
  33. endif ()
  34. configure_file (sndfile.pc.in sndfile.pc @ONLY)
  35. @@ -411,7 +398,7 @@ target_link_libraries (sndfile
  36. $<$<AND:$<BOOL:${ENABLE_EXPERIMENTAL}>,$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>,$<BOOL:${HAVE_SPEEX}>>:Speex::Speex>
  37. $<$<BOOL:${HAVE_EXTERNAL_XIPH_LIBS}>:Opus::opus>
  38. $<$<BOOL:${HAVE_MPEG}>:MPG123::libmpg123>
  39. - $<$<BOOL:${HAVE_MPEG}>:Lame::Lame>
  40. + $<$<BOOL:${HAVE_MPEG}>:mp3lame::mp3lame>
  41. )
  42. set_target_properties (sndfile PROPERTIES
  43. PUBLIC_HEADER "${sndfile_HDRS}"
  44. diff --git a/cmake/SndFileChecks.cmake b/cmake/SndFileChecks.cmake
  45. index f5d5994..2e09ba6 100644
  46. --- a/cmake/SndFileChecks.cmake
  47. +++ b/cmake/SndFileChecks.cmake
  48. @@ -56,9 +56,9 @@ else ()
  49. set (HAVE_EXTERNAL_XIPH_LIBS 0)
  50. endif ()
  51. -find_package (Lame)
  52. +find_package (mp3lame)
  53. find_package (Mpg123 1.25.10)
  54. -if (LAME_FOUND AND (TARGET MPG123::libmpg123))
  55. +if (TARGET mp3lame::mp3lame AND (TARGET MPG123::libmpg123))
  56. set (HAVE_MPEG_LIBS 1)
  57. else ()
  58. set (HAVE_MPEG_LIBS 0)
  59. diff --git a/cmake/SndFileConfig.cmake.in b/cmake/SndFileConfig.cmake.in
  60. index 1d5463a..0c98e7e 100644
  61. --- a/cmake/SndFileConfig.cmake.in
  62. +++ b/cmake/SndFileConfig.cmake.in
  63. @@ -18,7 +18,7 @@ if (SndFile_WITH_EXTERNAL_LIBS AND NOT @BUILD_SHARED_LIBS@)
  64. endif ()
  65. if (SndFile_WITH_MPEG AND NOT @BUILD_SHARED_LIBS@)
  66. - find_dependency (Lame)
  67. + find_dependency (mp3lame)
  68. find_dependency (MPG123)
  69. endif ()