From 9dfa9c84ebf772a2020df3ae1bebba6e5774cff0 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 21 Nov 2022 15:10:07 -0500 Subject: [PATCH] 2022-11-21 Fred Gleason * Modified build system to use pkg-config(1) to detect ALSA and JACK support elements in 'configure'. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ cae/Makefile.am | 4 ++-- configure.ac | 17 ++++++++--------- ripcd/Makefile.am | 4 ++-- rivendell.spec.in | 10 +++++----- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9228179c..329048fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23709,3 +23709,6 @@ 2022-11-18 Fred Gleason * Added the 'fop-static' package to the list of required build packages for RHEL-8 and RHEL-9. +2022-11-21 Fred Gleason + * Modified build system to use pkg-config(1) to detect ALSA and + JACK support elements in 'configure'. diff --git a/cae/Makefile.am b/cae/Makefile.am index 049187eb..0824f2fa 100644 --- a/cae/Makefile.am +++ b/cae/Makefile.am @@ -19,7 +19,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ @IMAGEMAGICK_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ @IMAGEMAGICK_CFLAGS@ @LIBJACK_CFLAGS@ LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi MOC = @QT_MOC@ @@ -46,7 +46,7 @@ nodist_caed_SOURCES = moc_cae.cpp\ caed_LDADD = @LIB_RDLIBS@\ @LIBALSA@\ @LIBHPI@\ - @LIBJACK@\ + @LIBJACK_LIBS@\ @LIBSRC@\ @LIBVORBIS@\ @QT5_LIBS@\ diff --git a/configure.ac b/configure.ac index 3c5340b7..a8280f02 100644 --- a/configure.ac +++ b/configure.ac @@ -386,8 +386,6 @@ if test $DOCBOOK_STYLESHEETS ; then ln -s $DOCBOOK_STYLESHEETS helpers/docbook fi -#AC_SUBST(DOCBOOK_STYLESHEETS,$DOCBOOK_STYLESHEETS) - # # RDXport Debug # @@ -432,8 +430,8 @@ fi # Setup Sound API Dependencies # AC_CHECK_HEADER(asihpi/hpi.h,[HPI_FOUND=yes],[]) -AC_CHECK_HEADER(jack/jack.h,[JACK_FOUND=yes],[]) -AC_CHECK_HEADER(alsa/asoundlib.h,[ALSA_FOUND=yes],[]) +PKG_CHECK_MODULES(LIBJACK,jack,[JACK_FOUND=yes],[]) +PKG_CHECK_MODULES(ASOUNDLIB,alsa,[ALSA_FOUND=yes],[]) if test $HPI_FOUND ; then if test -z $HPI_DISABLED ; then USING_HPI=yes @@ -465,14 +463,15 @@ if test $JACK_FOUND ; then AC_MSG_ERROR([*** libsamplerate not found, but is needed for JACK support ***]) fi AC_DEFINE(JACK,yes) - AC_SUBST(LIBJACK,-ljack) SRC_NEEDED=yes USING_JACK=yes - else - AC_SUBST(LIBJACK,"") - fi + else + AC_SUBST(JACK_CFLAGS,"") + AC_SUBST(JACK_LIBS,"") +fi else - AC_SUBST(LIBJACK,"") + AC_SUBST(JACK_CFLAGS,"") + AC_SUBST(JACK_LIBS,"") fi if test $ALSA_FOUND ; then diff --git a/ripcd/Makefile.am b/ripcd/Makefile.am index 01140cfb..e2e7e5d4 100644 --- a/ripcd/Makefile.am +++ b/ripcd/Makefile.am @@ -20,7 +20,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ @IMAGEMAGICK_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ @IMAGEMAGICK_CFLAGS@ @LIBJACK_CFLAGS@ LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi MOC = @QT_MOC@ @@ -133,7 +133,7 @@ ripcd_LDADD = @LIB_RDLIBS@\ @LIBVORBIS@\ @QT5_LIBS@\ @LIBHPI@\ - @LIBJACK@\ + @LIBJACK_LIBS@\ @MUSICBRAINZ_LIBS@\ @IMAGEMAGICK_LIBS@ diff --git a/rivendell.spec.in b/rivendell.spec.in index d8529398..e1184f24 100644 --- a/rivendell.spec.in +++ b/rivendell.spec.in @@ -21,7 +21,7 @@ ## # So python bytecompilation works correctly -%define __python /usr/bin/python3.6 +%define __python /usr/bin/python3 Summary: Radio Broadcast Automation System Name: rivendell @@ -33,7 +33,7 @@ Source: rivendell-@VERSION@.tar.gz Requires: @MYSQL_PKG@ @QT_MYSQL_PKG@ @APACHE_PKG@ curl @USERMODE_PKG@ rsyslog qt5-qtstyleplugins qt5-qttranslations @PYPAD_DEPS@ libxslt icedax BuildRequires: qt5-qtbase-devel qt5-linguist BuildRoot: /var/tmp/rivendell-@VERSION@ -Obsoletes: rivendell-base rivendell-opsguide rivendell-pypad +Obsoletes: rivendell-base < 4.0.0 rivendell-opsguide < 4.0.0 rivendell-pypad < 4.0.0 Conflicts: rivendell-opsguide %package importers @@ -112,7 +112,7 @@ This package contains the WebGet audio fetching tool for Rivendell. %build -export PYTHON=/usr/bin/python3.6 +export PYTHON=/usr/bin/python3 %configure --libexecdir=@libexecdir@ --sysconfdir=@sysconfdir@ @RDXPORTDEBUG@ make -j @CPUS_AVAIL@ @@ -218,7 +218,7 @@ cp scripts/engine_conv.py $RPM_BUILD_ROOT/@DOC_PATH@ cp scripts/init_template_host.py $RPM_BUILD_ROOT/@DOC_PATH@ rm -f $RPM_BUILD_ROOT/etc/auto.rd.audiostore rm -rf $RPM_BUILD_ROOT%{_libdir}/rivendell/pypad/__pycache__ -rm -rf $RPM_BUILD_ROOT%{_libdir}/python3.6/site-packages/__pycache__ +rm -rf $RPM_BUILD_ROOT%{_libdir}/python@PYTHON_VERSION@/site-packages/__pycache__ %post @@ -476,7 +476,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/librd.la %{_libdir}/librd.so %{_libdir}/rivendell/pypad/* -%{_libdir}/python3.6/site-packages/rivendellaudio/* +%{_libdir}/python@PYTHON_VERSION@/site-packages/rivendellaudio/* %{_sbindir}/rdservice %{_sbindir}/caed %{_sbindir}/ripcd