From 40935c4e407a6e6c08e7ed007da812833597e9be Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 26 Jun 2017 13:31:09 -0700 Subject: [speex] init port #958 --- ports/speex/CMakeLists.txt | 105 +++++++++++++++++++++++++++++++++++++++++++++ ports/speex/CONTROL | 3 ++ ports/speex/portfile.cmake | 26 +++++++++++ 3 files changed, 134 insertions(+) create mode 100644 ports/speex/CMakeLists.txt create mode 100644 ports/speex/CONTROL create mode 100644 ports/speex/portfile.cmake diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt new file mode 100644 index 000000000..1c1a42a80 --- /dev/null +++ b/ports/speex/CMakeLists.txt @@ -0,0 +1,105 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libspeex) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}) +set(SPEEX_PATH ${SOURCE_PATH}/include/speex) +set(LIBSPEEX_PATH ${SOURCE_PATH}/libspeex) + +option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) +if(MSVC) + add_definitions(-DHAVE_CONFIG_H) + if(USE_SSE) + add_definitions(-DUSE_SSE -DFLOATING_POINT) + else() + add_definitions(-DFIXED_POINT) + endif() +endif() + + +set(LIB_HEADERS + "${LIBSPEEX_PATH}/cb_search.h" + "${SOURCE_PATH}/win32/config.h" + "${LIBSPEEX_PATH}/fftwrap.h" + "${LIBSPEEX_PATH}/filters.h" + "${LIBSPEEX_PATH}/filters_sse.h" + "${LIBSPEEX_PATH}/kiss_fft.h" + "${LIBSPEEX_PATH}/kiss_fftr.h" + "${LIBSPEEX_PATH}/lpc.h" + "${LIBSPEEX_PATH}/arch.h" + "${LIBSPEEX_PATH}/lsp.h" + "${LIBSPEEX_PATH}/ltp.h" + "${LIBSPEEX_PATH}/ltp_sse.h" + "${LIBSPEEX_PATH}/math_approx.h" + "${LIBSPEEX_PATH}/modes.h" + "${LIBSPEEX_PATH}/nb_celp.h" + "${LIBSPEEX_PATH}/quant_lsp.h" + "${LIBSPEEX_PATH}/sb_celp.h" + "${LIBSPEEX_PATH}/stack_alloc.h" + "${LIBSPEEX_PATH}/vbr.h" + "${LIBSPEEX_PATH}/vq.h" +) +set( + SPEEX_HEADERS + "${SPEEX_PATH}/speex.h" + "${SPEEX_PATH}/speex_bits.h" + "${SPEEX_PATH}/speex_callbacks.h" + "${SPEEX_PATH}/speex_header.h" + "${SPEEX_PATH}/speex_stereo.h" + "${SPEEX_PATH}/speex_types.h" +) +set(SRC + "${LIBSPEEX_PATH}/bits.c" + "${LIBSPEEX_PATH}/cb_search.c" + "${LIBSPEEX_PATH}/exc_10_16_table.c" + "${LIBSPEEX_PATH}/exc_10_32_table.c" + "${LIBSPEEX_PATH}/exc_20_32_table.c" + "${LIBSPEEX_PATH}/exc_5_256_table.c" + "${LIBSPEEX_PATH}/exc_5_64_table.c" + "${LIBSPEEX_PATH}/exc_8_128_table.c" + "${LIBSPEEX_PATH}/fftwrap.c" + "${LIBSPEEX_PATH}/filters.c" + "${LIBSPEEX_PATH}/gain_table.c" + "${LIBSPEEX_PATH}/gain_table_lbr.c" + "${LIBSPEEX_PATH}/hexc_10_32_table.c" + "${LIBSPEEX_PATH}/hexc_table.c" + "${LIBSPEEX_PATH}/high_lsp_tables.c" + "${LIBSPEEX_PATH}/kiss_fft.c" + "${LIBSPEEX_PATH}/kiss_fftr.c" + "${LIBSPEEX_PATH}/lpc.c" + "${LIBSPEEX_PATH}/lsp.c" + "${LIBSPEEX_PATH}/lsp_tables_nb.c" + "${LIBSPEEX_PATH}/ltp.c" + "${LIBSPEEX_PATH}/modes.c" + "${LIBSPEEX_PATH}/modes_wb.c" + "${LIBSPEEX_PATH}/nb_celp.c" + "${LIBSPEEX_PATH}/quant_lsp.c" + "${LIBSPEEX_PATH}/sb_celp.c" + "${LIBSPEEX_PATH}/smallft.c" + "${LIBSPEEX_PATH}/speex.c" + "${LIBSPEEX_PATH}/speex_callbacks.c" + "${LIBSPEEX_PATH}/speex_header.c" + "${LIBSPEEX_PATH}/stereo.c" + "${LIBSPEEX_PATH}/vbr.c" + "${LIBSPEEX_PATH}/vq.c" + "${LIBSPEEX_PATH}/window.c" +) + +file(COPY ${LIB_HEADERS} DESTINATION ${COMMON_INCLUDES}/) +file(COPY ${SPEEX_HEADERS} DESTINATION ${COMMON_INCLUDES}/speex) + + +include_directories(${COMMON_INCLUDES}) +add_library (libspeex STATIC ${SRC}) + + +install( + TARGETS libspeex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL new file mode 100644 index 000000000..64514910e --- /dev/null +++ b/ports/speex/CONTROL @@ -0,0 +1,3 @@ +Source: speex +Version: +Description: diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake new file mode 100644 index 000000000..96e8526ab --- /dev/null +++ b/ports/speex/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic ) + message(STATUS "Speex support visibility on Win32 ye. Building static.") + message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speex + REF cae5026cfd88782c7051af6e685059223578b7e9 + SHA512 93385363561c41f5c6bb7fce8e7cd1954520191a4741a8618daaf0a0bfa0c5c5de9926b989f1ae85b99bf4307afb445f307a01a9487abcc0d4ffa690711b8e49 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) -- cgit v1.2.3 From 78349d7a0c4cd0d2df1f120cbe58be9fa873757c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 15:27:08 -0700 Subject: [speex] Simplify CMakeLists.txt --- ports/speex/CMakeLists.txt | 121 +++++++++++++++++---------------------------- ports/speex/portfile.cmake | 7 +-- 2 files changed, 48 insertions(+), 80 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 1c1a42a80..eff1d585a 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required (VERSION 3.8.0) -project (libspeex) +project (libspeex C) + +if(BUILD_SHARED_LIBS) + message(FATAL_ERROR "This CMake buildsystem only supports static builds") +endif() set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) -set(SOURCE_PATH ${PROJECT_SOURCE_DIR}) -set(SPEEX_PATH ${SOURCE_PATH}/include/speex) -set(LIBSPEEX_PATH ${SOURCE_PATH}/libspeex) option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) if(MSVC) @@ -16,82 +17,48 @@ if(MSVC) endif() endif() +include_directories(win32 include) + +set(CMAKE_DEBUG_POSTFIX d) -set(LIB_HEADERS - "${LIBSPEEX_PATH}/cb_search.h" - "${SOURCE_PATH}/win32/config.h" - "${LIBSPEEX_PATH}/fftwrap.h" - "${LIBSPEEX_PATH}/filters.h" - "${LIBSPEEX_PATH}/filters_sse.h" - "${LIBSPEEX_PATH}/kiss_fft.h" - "${LIBSPEEX_PATH}/kiss_fftr.h" - "${LIBSPEEX_PATH}/lpc.h" - "${LIBSPEEX_PATH}/arch.h" - "${LIBSPEEX_PATH}/lsp.h" - "${LIBSPEEX_PATH}/ltp.h" - "${LIBSPEEX_PATH}/ltp_sse.h" - "${LIBSPEEX_PATH}/math_approx.h" - "${LIBSPEEX_PATH}/modes.h" - "${LIBSPEEX_PATH}/nb_celp.h" - "${LIBSPEEX_PATH}/quant_lsp.h" - "${LIBSPEEX_PATH}/sb_celp.h" - "${LIBSPEEX_PATH}/stack_alloc.h" - "${LIBSPEEX_PATH}/vbr.h" - "${LIBSPEEX_PATH}/vq.h" -) -set( - SPEEX_HEADERS - "${SPEEX_PATH}/speex.h" - "${SPEEX_PATH}/speex_bits.h" - "${SPEEX_PATH}/speex_callbacks.h" - "${SPEEX_PATH}/speex_header.h" - "${SPEEX_PATH}/speex_stereo.h" - "${SPEEX_PATH}/speex_types.h" -) set(SRC - "${LIBSPEEX_PATH}/bits.c" - "${LIBSPEEX_PATH}/cb_search.c" - "${LIBSPEEX_PATH}/exc_10_16_table.c" - "${LIBSPEEX_PATH}/exc_10_32_table.c" - "${LIBSPEEX_PATH}/exc_20_32_table.c" - "${LIBSPEEX_PATH}/exc_5_256_table.c" - "${LIBSPEEX_PATH}/exc_5_64_table.c" - "${LIBSPEEX_PATH}/exc_8_128_table.c" - "${LIBSPEEX_PATH}/fftwrap.c" - "${LIBSPEEX_PATH}/filters.c" - "${LIBSPEEX_PATH}/gain_table.c" - "${LIBSPEEX_PATH}/gain_table_lbr.c" - "${LIBSPEEX_PATH}/hexc_10_32_table.c" - "${LIBSPEEX_PATH}/hexc_table.c" - "${LIBSPEEX_PATH}/high_lsp_tables.c" - "${LIBSPEEX_PATH}/kiss_fft.c" - "${LIBSPEEX_PATH}/kiss_fftr.c" - "${LIBSPEEX_PATH}/lpc.c" - "${LIBSPEEX_PATH}/lsp.c" - "${LIBSPEEX_PATH}/lsp_tables_nb.c" - "${LIBSPEEX_PATH}/ltp.c" - "${LIBSPEEX_PATH}/modes.c" - "${LIBSPEEX_PATH}/modes_wb.c" - "${LIBSPEEX_PATH}/nb_celp.c" - "${LIBSPEEX_PATH}/quant_lsp.c" - "${LIBSPEEX_PATH}/sb_celp.c" - "${LIBSPEEX_PATH}/smallft.c" - "${LIBSPEEX_PATH}/speex.c" - "${LIBSPEEX_PATH}/speex_callbacks.c" - "${LIBSPEEX_PATH}/speex_header.c" - "${LIBSPEEX_PATH}/stereo.c" - "${LIBSPEEX_PATH}/vbr.c" - "${LIBSPEEX_PATH}/vq.c" - "${LIBSPEEX_PATH}/window.c" + "libspeex/bits.c" + "libspeex/cb_search.c" + "libspeex/exc_10_16_table.c" + "libspeex/exc_10_32_table.c" + "libspeex/exc_20_32_table.c" + "libspeex/exc_5_256_table.c" + "libspeex/exc_5_64_table.c" + "libspeex/exc_8_128_table.c" + "libspeex/fftwrap.c" + "libspeex/filters.c" + "libspeex/gain_table.c" + "libspeex/gain_table_lbr.c" + "libspeex/hexc_10_32_table.c" + "libspeex/hexc_table.c" + "libspeex/high_lsp_tables.c" + "libspeex/kiss_fft.c" + "libspeex/kiss_fftr.c" + "libspeex/lpc.c" + "libspeex/lsp.c" + "libspeex/lsp_tables_nb.c" + "libspeex/ltp.c" + "libspeex/modes.c" + "libspeex/modes_wb.c" + "libspeex/nb_celp.c" + "libspeex/quant_lsp.c" + "libspeex/sb_celp.c" + "libspeex/smallft.c" + "libspeex/speex.c" + "libspeex/speex_callbacks.c" + "libspeex/speex_header.c" + "libspeex/stereo.c" + "libspeex/vbr.c" + "libspeex/vq.c" + "libspeex/window.c" ) -file(COPY ${LIB_HEADERS} DESTINATION ${COMMON_INCLUDES}/) -file(COPY ${SPEEX_HEADERS} DESTINATION ${COMMON_INCLUDES}/speex) - - -include_directories(${COMMON_INCLUDES}) -add_library (libspeex STATIC ${SRC}) - +add_library(libspeex ${SRC}) install( TARGETS libspeex @@ -101,5 +68,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h") + install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 96e8526ab..75841d7d0 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic ) - message(STATUS "Speex support visibility on Win32 ye. Building static.") +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Speex doesn't support visibility on Win32 yet. Building static.") message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") - set(VCPKG_LIBRARY_LINKAGE dynamic) + set(VCPKG_LIBRARY_LINKAGE static) endif() vcpkg_from_github( @@ -18,6 +18,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 76ca4cb60e75ed30357dc7d91e6f803146f78684 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 15:36:09 -0700 Subject: Add description and version name --- ports/speex/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 64514910e..bec6229e1 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: -Description: +Version: 2017-06-28-cae5026cfd88782c7051af6e685059223578b7e9 +Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From e6d1f16038824274a8797f2bff1179c178eee23c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 16:12:00 -0700 Subject: use CMake's autoexport --- ports/speex/CMakeLists.txt | 5 +---- ports/speex/portfile.cmake | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index eff1d585a..839222ae6 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required (VERSION 3.8.0) project (libspeex C) -if(BUILD_SHARED_LIBS) - message(FATAL_ERROR "This CMake buildsystem only supports static builds") -endif() - set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) @@ -56,6 +52,7 @@ set(SRC "libspeex/vbr.c" "libspeex/vq.c" "libspeex/window.c" + "win32/libspeex.def" ) add_library(libspeex ${SRC}) diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 75841d7d0..f6d2108e0 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,11 +1,5 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Speex doesn't support visibility on Win32 yet. Building static.") - message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/speex -- cgit v1.2.3 From 5c955c301924d73a5ff9d159124ce2acc2d22a27 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 11:19:37 -0700 Subject: [speex] user official tags --- ports/speex/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index f6d2108e0..6eed0cfc9 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/speex - REF cae5026cfd88782c7051af6e685059223578b7e9 - SHA512 93385363561c41f5c6bb7fce8e7cd1954520191a4741a8618daaf0a0bfa0c5c5de9926b989f1ae85b99bf4307afb445f307a01a9487abcc0d4ffa690711b8e49 + REF Speex-1.2.0 + SHA512 612dfd67a9089f929b7f2a613ed3a1d2fda3d3ec0a4adafe27e2c1f4542de1870b42b8042f0dcb16d52e08313d686cc35b76940776419c775417f5bad18b448f HEAD_REF master ) -- cgit v1.2.3 From 6f287235ca75926697d785f83cba7028024110cf Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 11:21:03 -0700 Subject: [speex] user official tags --- ports/speex/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index bec6229e1..cb11e2e10 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 2017-06-28-cae5026cfd88782c7051af6e685059223578b7e9 +Version: Speex-1.2.0 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From 5427ef1c034992b79fdc6cd3dc12dd21a05c2610 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Jun 2017 14:27:54 -0700 Subject: [speex] Use simple version --- ports/speex/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index cb11e2e10..680dcdf13 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: Speex-1.2.0 +Version: 1.2.0 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3