Imitial import of codec2 1.2.0

This commit is contained in:
Chris Gorman
2024-06-30 19:40:32 -04:00
parent e78c9bf738
commit d0ad8dcc01
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- codec2-1.2.0/cmake/GetDependencies.cmake.in.orig 2024-05-21 11:45:57.619470700 -0400
+++ codec2-1.2.0/cmake/GetDependencies.cmake.in 2024-05-21 11:49:24.486553500 -0400
@@ -11,7 +11,7 @@
set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@)
set(CODEC2_DLL ${CMAKE_BINARY_DIR}/src/libcodec2.dll)
-include(${CMAKE_SOURCE_DIR}/cmake/GetPrerequisites.cmake)
+include(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
get_prerequisites(${CODEC2_DLL} _deps 1 0 "" "")
foreach(_runtime ${_deps})
message("Looking for ${_runtime}")

44
mingw-w64-codec2/PKGBUILD Normal file
View File

@@ -0,0 +1,44 @@
# Maintainer: Chris Gorman <chrisjohgorman@gmail.com>
_realname=codec2
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.2.0
pkgrel=1
pkgdesc="Open source speech codec designed for communications quality speech between 450 and 3200 bit/s (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/drowe67/codec2'
license=('LGPL2.1')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("$url/archive/$pkgver/$_realname-$pkgver.tar.gz"
0001-GetDependencies_point_to_correct_file.patch)
sha256sums=('cbccae52b2c2ecc5d2757e407da567eb681241ff8dadce39d779a7219dbcf449'
'2379f3dfc592c27111cfab1e52f6d4fd73341f39819eac119a5fed367ec87e50')
prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
patch -Np1 -i "${srcdir}"/0001-GetDependencies_point_to_correct_file.patch
}
build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_PREFIX}"/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_SKIP_RPATH=YES \
-DBUILD_SHARED_LIBS=ON \
-S "${_realname}-${pkgver}" \
-B "build-${MSYSTEM}"
"${MINGW_PREFIX}"/bin/cmake.exe --build "build-${MSYSTEM}"
}
package() {
DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install "build-${MSYSTEM}"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}