Browse Source

qjackctl: build using cmake as autotools is deprecated by upstream

This allows correctly detecting jack features like metadata.
Drop the patch as qjackctl cmake build system takes care of the required
macro.

Also use new MacOS package procedure which include Info.plist and icons
without needing to add them manually.
pull/25/head
Alexis Murzeau Filipe Coelho <falktx@falktx.com> 1 year ago
parent
commit
bcbb4fa2a9
5 changed files with 21 additions and 67 deletions
  1. +16
    -17
      build-jack2.sh
  2. +5
    -15
      pack-jack2.sh
  3. +0
    -12
      patches/qjackctl/01-fix-win32-build.patch
  4. BIN
      patches/qjackctl/QjackCtl.icns
  5. +0
    -23
      patches/qjackctl/macos/01-fix-build.patch

+ 16
- 17
build-jack2.sh View File

@@ -7,7 +7,7 @@ PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
JACK_ROUTER_VERSION=${JACK_ROUTER_VERSION:=6c2e532bb05d2ba59ef210bef2fe270d588c2fdf}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.4}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.5}

# ---------------------------------------------------------------------------------------------------------------------

@@ -126,26 +126,25 @@ fi
if [ -f "${PAWPAW_PREFIX}/bin/moc" ]; then
download qjackctl "${QJACKCTL_VERSION}" https://download.sourceforge.net/qjackctl

if [ "${WIN64}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack64 -Wl,-Bstatic /'
elif [ "${WIN32}" -eq 1 ]; then
patch_file qjackctl "${QJACKCTL_VERSION}" "configure" 's/-ljack /-Wl,-Bdynamic -ljack -Wl,-Bstatic /'
fi

if [ "${MACOS}" -eq 1 ]; then
qjackctl_extra_args="--with-jack="${jack2_prefix}${jack2_extra_prefix}""
elif [ "${WIN32}" -eq 1 ]; then
qjackctl_extra_args="--enable-portaudio"
fi

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
export EXTRA_CXXFLAGS="-std=gnu++11"
# Join $2+ arguments into a string separated by $1
function join() {
local IFS=$1
shift
echo "$*"
}

if [ "${CROSS_COMPILING}" -eq 1 ]; then
# Use system's Qt tools for translations
qjackctl_CMAKE_PREFIX_PATH="${PAWPAW_PREFIX}/lib/cmake;$(join ';' /usr/{lib/$(gcc -print-multiarch),lib*,share}/cmake)"
echo "Using CMake prefix: ${qjackctl_CMAKE_PREFIX_PATH}"
else
qjackctl_CMAKE_PREFIX_PATH="${PAWPAW_PREFIX}/lib/cmake"
fi

build_autoconf qjackctl "${QJACKCTL_VERSION}" "--enable-jack-version ${qjackctl_extra_args}"
build_cmake qjackctl "${QJACKCTL_VERSION}" "-DCMAKE_PREFIX_PATH=${qjackctl_CMAKE_PREFIX_PATH} -DJack_ROOT=${jack2_prefix}${jack2_extra_prefix} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"

if [ "${WIN32}" -eq 1 ]; then
copy_file qjackctl "${QJACKCTL_VERSION}" "src/release/qjackctl.exe" "${jack2_prefix}/bin/qjackctl.exe"
copy_file qjackctl "${QJACKCTL_VERSION}" "build/src/qjackctl.exe" "${jack2_prefix}/bin/qjackctl.exe"
fi
fi



+ 5
- 15
pack-jack2.sh View File

@@ -7,7 +7,7 @@ PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
JACK_ROUTER_VERSION=${JACK_ROUTER_VERSION:=6c2e532bb05d2ba59ef210bef2fe270d588c2fdf}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.0}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.5}

# ---------------------------------------------------------------------------------------------------------------------

@@ -99,22 +99,12 @@ elif [ "${MACOS}" -eq 1 ]; then
jack2_lastversion=$(cat jack2/wscript | awk 'sub("VERSION=","")' | tr -d "'")
./jack2/macosx/generate-pkg.sh "${jack2_prefix}${jack2_extra_prefix}/"

qjackctl_app="${PAWPAW_PREFIX}/bin/qjackctl.app"
qjackctl_app="${PAWPAW_PREFIX}/bin/QjackCtl.app"
qjackctl_dir="${qjackctl_app}/Contents/MacOS"
patch_osx_qtapp qjackctl "${QJACKCTL_VERSION}" "${qjackctl_app}"
patch_osx_binary_libs "${qjackctl_dir}/qjackctl"

cp "${PAWPAW_ROOT}/patches/qjackctl/QjackCtl.icns" "${qjackctl_app}/Contents/Resources/QjackCtl.icns"
sed -i -e 's|Created by Qt/QMake|JACK Audio Connection Kit Qt GUI Interface|' "${qjackctl_app}/Contents/Info.plist"
sed -i -e 's|com.yourcompany.qjackctl|org.rncbc.QjackCtl|' "${qjackctl_app}/Contents/Info.plist"
sed -i -e 's|string>qjackctl</string>|string>QjackCtl</string>|' "${qjackctl_app}/Contents/Info.plist"
sed -i -e 's|<string></string>|<string>QjackCtl.icns</string>|' "${qjackctl_app}/Contents/Info.plist"
sed -i -e 's|NOTE|NSMicrophoneUsageDescription|' "${qjackctl_app}/Contents/Info.plist"
sed -i -e 's|This file was generated by Qt/QMake.|JACK requires microphone permissions for audio input.|' "${qjackctl_app}/Contents/Info.plist"
rm "${qjackctl_app}/Contents/Info.plist-e"
mv "${qjackctl_app}/Contents/MacOS/qjackctl" "${qjackctl_app}/Contents/MacOS/QjackCtl"

rm -rf jack2/macosx/qjackctl.app
patch_osx_binary_libs "${qjackctl_dir}/QjackCtl"

rm -rf jack2/macosx/QjackCtl.app
cp -rv "${qjackctl_app}" jack2/macosx/QjackCtl.app

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then


+ 0
- 12
patches/qjackctl/01-fix-win32-build.patch View File

@@ -1,12 +0,0 @@
diff --git a/src/qjackctlGraph.cpp b/src/qjackctlGraph.cpp
index bd0ca71..fe45f1f 100644
--- a/src/qjackctlGraph.cpp
+++ b/src/qjackctlGraph.cpp
@@ -51,6 +51,7 @@
#include <algorithm>
+#define _USE_MATH_DEFINES
#include <cmath>

BIN
patches/qjackctl/QjackCtl.icns View File


+ 0
- 23
patches/qjackctl/macos/01-fix-build.patch View File

@@ -1,23 +0,0 @@
diff --git a/src/.obj/qjackctlPaletteForm.o b/src/.obj/qjackctlPaletteForm.o
index e853f8c..d9a3976 100644
Binary files a/src/.obj/qjackctlPaletteForm.o and b/src/.obj/qjackctlPaletteForm.o differ
diff --git a/src/qjackctlPaletteForm.cpp b/src/qjackctlPaletteForm.cpp
index 33feae7..635ac6d 100644
--- a/src/qjackctlPaletteForm.cpp
+++ b/src/qjackctlPaletteForm.cpp
@@ -1203,14 +1203,10 @@ void qjackctlPaletteForm::ColorDelegate::updateEditorGeometry ( QWidget *editor,
void qjackctlPaletteForm::ColorDelegate::paint ( QPainter *painter,
- const QStyleOptionViewItem& option, const QModelIndex& index ) const
+ const QStyleOptionViewItem& opt, const QModelIndex& index ) const
{
- QStyleOptionViewItem opt = option;
-
const bool masked
= index.model()->data(index, Qt::EditRole).value<bool>();
- if (index.column() == 0 && masked)
- opt.font.setBold(true);
QItemDelegate::paint(painter, opt, index);

Loading…
Cancel
Save