jack2: Add package
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/wscript
|
||||
+++ b/wscript
|
||||
@@ -224,7 +224,7 @@ def configure(conf):
|
||||
conf.env.append_unique('CCDEFINES', '_POSIX')
|
||||
conf.env.append_unique('CXXDEFINES', '_POSIX')
|
||||
if Options.options.platform in ('msys', 'win32'):
|
||||
- conf.env.append_value('INCLUDES', ['/mingw64/include'])
|
||||
+ #conf.env.append_value('INCLUDES', ['/mingw64/include'])
|
||||
conf.check(
|
||||
header_name='pa_asio.h',
|
||||
msg='Checking for PortAudio ASIO support',
|
||||
10
mingw-w64-jack2/0002-fix-pkgconfig-file.patch
Normal file
10
mingw-w64-jack2/0002-fix-pkgconfig-file.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/jack.pc.in
|
||||
+++ b/jack.pc.in
|
||||
@@ -8,5 +8,5 @@ jack_implementation=jack2
|
||||
Name: jack
|
||||
Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server
|
||||
Version: @JACK_VERSION@
|
||||
-Libs: -L@LIBDIR@ -l@CLIENTLIB@
|
||||
-Cflags: -I@INCLUDEDIR@
|
||||
+Libs: -L${libdir} -l@CLIENTLIB@
|
||||
+Cflags: -I${includedir}
|
||||
26
mingw-w64-jack2/0003-relocate-plugins-libdir.patch
Normal file
26
mingw-w64-jack2/0003-relocate-plugins-libdir.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
--- a/common/JackDriverLoader.cpp
|
||||
+++ b/common/JackDriverLoader.cpp
|
||||
@@ -49,13 +49,17 @@ static wchar_t* locate_dll_driver_dir()
|
||||
// For WIN32 ADDON_DIR is defined in JackConstants.h as relative path
|
||||
wchar_t driver_dir_storage[512];
|
||||
if (3 < GetModuleFileNameW(libjack_handle, driver_dir_storage, 512)) {
|
||||
- wchar_t *p = wcsrchr(driver_dir_storage, L'\\');
|
||||
- if (p && (p != driver_dir_storage)) {
|
||||
- *p = 0;
|
||||
- }
|
||||
- jack_info("Drivers/internals found in : %S", driver_dir_storage);
|
||||
- wcscat(driver_dir_storage, L"\\");
|
||||
+ wchar_t *bindir = wcsrchr(driver_dir_storage, L'\\');
|
||||
+ if (bindir && (bindir != driver_dir_storage)) {
|
||||
+ *bindir = L'\0';
|
||||
+ }
|
||||
+ wchar_t *prefix = wcsrchr(driver_dir_storage, L'\\');
|
||||
+ if (prefix && (prefix != driver_dir_storage)) {
|
||||
+ *prefix = L'\0';
|
||||
+ }
|
||||
+ wcscat(driver_dir_storage, L"\\lib\\");
|
||||
wcscat(driver_dir_storage, ADDON_DIRW);
|
||||
+ jack_info("Drivers/internals found in : %S", driver_dir_storage);
|
||||
return wcsdup(driver_dir_storage);
|
||||
} else {
|
||||
jack_error("Cannot get JACK dll directory : %d", GetLastError());
|
||||
22
mingw-w64-jack2/0004-relocate-jackd-path.patch
Normal file
22
mingw-w64-jack2/0004-relocate-jackd-path.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/windows/JackWinServerLaunch.cpp
|
||||
+++ b/windows/JackWinServerLaunch.cpp
|
||||
@@ -154,7 +154,18 @@ static int start_server_aux(const char* server_name)
|
||||
}
|
||||
|
||||
if (!good) {
|
||||
- strcpy(buffer, JACK_LOCATION "/jackd.exe");
|
||||
+ HMODULE libjack_handle = NULL;
|
||||
+ GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||
+ reinterpret_cast<LPCSTR>(start_server_aux), &libjack_handle);
|
||||
+ if (3 < GetModuleFileNameA(libjack_handle, buffer, MAX_PATH)) {
|
||||
+ char *bindir = strrchr(buffer, '\\');
|
||||
+ if (bindir && (bindir != buffer)) {
|
||||
+ *bindir = '\0';
|
||||
+ }
|
||||
+ strcat(buffer, "\\jackd.exe");
|
||||
+ }
|
||||
+ else
|
||||
+ strcpy(buffer, "jackd.exe");
|
||||
command = (char*)malloc((strlen(buffer))+1);
|
||||
strcpy(command, buffer);
|
||||
strncpy(arguments, "jackd.exe -S -d " JACK_DEFAULT_DRIVER, 255);
|
||||
68
mingw-w64-jack2/PKGBUILD
Normal file
68
mingw-w64-jack2/PKGBUILD
Normal file
@@ -0,0 +1,68 @@
|
||||
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
|
||||
|
||||
_realname=jack2
|
||||
pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.9.20
|
||||
pkgrel=1
|
||||
pkgdesc='The JACK low-latency audio server (mingw-w64)'
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
url='https://jackaudio.org/'
|
||||
license=('GPL2')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-celt"
|
||||
"${MINGW_PACKAGE_PREFIX}-db"
|
||||
"${MINGW_PACKAGE_PREFIX}-libsystre"
|
||||
"${MINGW_PACKAGE_PREFIX}-opus"
|
||||
"${MINGW_PACKAGE_PREFIX}-portaudio"
|
||||
"${MINGW_PACKAGE_PREFIX}-readline"
|
||||
"${MINGW_PACKAGE_PREFIX}-libsamplerate"
|
||||
"${MINGW_PACKAGE_PREFIX}-libsndfile")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"python")
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://github.com/jackaudio/jack2/archive/v${pkgver}.tar.gz"
|
||||
0001-wscript-remove-hardcoded-includedir.patch
|
||||
0002-fix-pkgconfig-file.patch
|
||||
0003-relocate-plugins-libdir.patch
|
||||
0004-relocate-jackd-path.patch)
|
||||
sha256sums=('915ad2900992159bdb729b9fc4ea134b962ce32b2df0b384fee40a2c5808835d'
|
||||
'5a343bfee863dd648e40161f59f197823092e215dd1daa04511ac4dbfb7bcf63'
|
||||
'24e22bf6a8591090f86c094d7e644f4015d7a44b5976e22c0dac3e78ac4932b6'
|
||||
'797adc210372c18a49f3c02a91a27d615c843b1eacca29c738ccac2c8664dfe3'
|
||||
'a81826c43991b5add021b259abbf86f623808b7e1ed1c5cc6d8b6cb06b7ad1d5')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/0001-wscript-remove-hardcoded-includedir.patch"
|
||||
patch -p1 -i "${srcdir}/0002-fix-pkgconfig-file.patch"
|
||||
|
||||
# TODO: If posible replace these with pathtools
|
||||
patch -p1 -i "${srcdir}/0003-relocate-plugins-libdir.patch"
|
||||
patch -p1 -i "${srcdir}/0004-relocate-jackd-path.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
export LINKFLAGS="${LDFLAGS}"
|
||||
|
||||
/usr/bin/python ./waf configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--check-c-compiler=${CC} \
|
||||
--check-cxx-compiler=${CXX} \
|
||||
--platform=win32 \
|
||||
--example-tools=no \
|
||||
--out="${srcdir}/build-${MSYSTEM}"
|
||||
|
||||
/usr/bin/python ./waf build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
/usr/bin/python ./waf install --destdir="${pkgdir}"
|
||||
|
||||
# Workaround: Move jack DLLs to bindir but not the plugins
|
||||
mv -v "${pkgdir}${MINGW_PREFIX}"/lib/*.dll "${pkgdir}${MINGW_PREFIX}/bin/"
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
|
||||
}
|
||||
Reference in New Issue
Block a user