Skip to content

Commit

Permalink
Merge branch 'remove-libbse'
Browse files Browse the repository at this point in the history
* remove-libbse:
  BUILD: Makefile.am: remove libbse related code for tidy check
  JACK: Makefile.am: remove libbse related code
  INSPECTOR: remove libbse related code
  INSTEDIT: Makefile.am: remove libbse related code
  LV2: Makefile.am: remove libbse related code
  CLAP: Makefile.am: remove libbse related code
  VST: Makefile.am: remove libbse related code
  GLUI: Makefile.am: remove libbse related code
  INSPECTOR: Makefile.am: remove libbse related code
  BUILD: Makefile.decl: remove libbse related code
  TOOLS: Makefile.am: remove libbse related code
  TESTS: Makefile.am: remove libbse related code
  GUI: Makefile.am: remove libbse related code
  SRC: Makefile.am: remove libbse related code
  LIB: Makefile.am: remove libbse related code
  LIB: MiniResampler: remove libbse code
  LIB: smmain.cc: remove libbse related code
  BUILD: configure.ac: remove libbse related stuff

Signed-off-by: Stefan Westerfeld <stefan@space.twc.de>
  • Loading branch information
swesterfeld committed May 30, 2024
2 parents 1db2339 + 4bba2a8 commit 168bc10
Show file tree
Hide file tree
Showing 18 changed files with 89 additions and 175 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ rebuild-meta-headers:
make -Cgui rebuild-spectmorphgui-hh

tidy:
clang-tidy-17 $(shell git ls-tree --name-only HEAD -r | grep -v ^3rdparty | grep -e '.cc') -- -DPUGL_HAVE_GL -DPUGL_HAVE_CAIRO $(BSE_CFLAGS) -std=c++17 -I. -I3rdparty/minizip -I3rdparty -Ilib -Iglui -Isrc -Igui -Ijack $(CAIRO_CFLAGS) $(QT_CFLAGS)
clang-tidy-17 $(shell git ls-tree --name-only HEAD -r | grep -v ^3rdparty | grep -e '.cc') -- -DPUGL_HAVE_GL -DPUGL_HAVE_CAIRO $(GLIB_CFLAGS) -std=c++17 -I. -I3rdparty/minizip -I3rdparty -Ilib -Iglui -Isrc -Igui -Ijack $(CAIRO_CFLAGS) $(QT_CFLAGS)
2 changes: 1 addition & 1 deletion Makefile.decl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ STATIC_PLUGIN_LIBS = \
$(top_builddir)/glui/.libs/libspectmorphglui.a \
$(top_builddir)/glui/pugl/.libs/libspectmorphpugl.a \
$(top_builddir)/lib/.libs/libspectmorph.a \
$(BSE_LIBS) $(FFTW_LIBS) $(CAIRO_LIBS) $(FREETYPE_LIBS) $(SNDFILE_LIBS) $(ZLIB_LIBS)
$(GLIB_LIBS) $(FFTW_LIBS) $(CAIRO_LIBS) $(FREETYPE_LIBS) $(SNDFILE_LIBS) $(ZLIB_LIBS)

if COND_LINUX
STATIC_PLUGIN_LIBS += $(GL_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion clap/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui $(CFLAG_VISIBILITY) -I$(top_srcdir)/3rdparty
AM_CXXFLAGS += $(GLIB_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui $(CFLAG_VISIBILITY) -I$(top_srcdir)/3rdparty

spectmorph_clapdir = $(libdir)/clap

Expand Down
41 changes: 0 additions & 41 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,6 @@ Debian users: aptitude install libglib2.0-dev
AC_SUBST(GLIB_LIBS)
])
dnl
dnl libbse
dnl
AC_DEFUN([AC_BSE_REQUIREMENTS],
[
dnl check for libbse only if --with-beast was used
if test "x$with_beast" = "xyes"; then
PKG_CHECK_MODULES(BSE, [[bse >= 0.9]])
else
with_beast=no
fi
if test "x$with_beast" = "xno"; then
SPECTMORPH_HAVE_BSE=0
BSE_CFLAGS="$GLIB_CFLAGS"
BSE_LIBS="$GLIB_LIBS"
else
SPECTMORPH_HAVE_BSE=1
BSE_VERSION=`pkg-config --modversion bse`
AC_SUBST(BSE_VERSION)
bseplugindir=`pkg-config --variable=plugindir bse`
AC_SUBST(bseplugindir)
fi
AC_SUBST(BSE_CFLAGS)
AC_SUBST(BSE_LIBS)
AC_DEFINE_UNQUOTED(SPECTMORPH_HAVE_BSE, $SPECTMORPH_HAVE_BSE, [Whether libbse is available])
AM_CONDITIONAL([COND_WITH_BEAST], [test "$with_beast" != no])
])
dnl
dnl libqt5
dnl
AC_DEFUN([AC_QT_REQUIREMENTS],
Expand Down Expand Up @@ -294,13 +265,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Check requirement sets
AC_GLIB_REQUIREMENTS

dnl -------------------- libbse dependency can be disabled -------------------
AC_ARG_WITH([beast], AS_HELP_STRING([--with-beast], [developer only: build against libbse]))

AC_BSE_REQUIREMENTS

dnl -------------------------------------------------------------------------

dnl -------------------- lv2 support is optional ----------------------------
AC_ARG_WITH([lv2], [AS_HELP_STRING([--with-lv2], [build support for LV2])])
if test "x$with_lv2" != "xno"; then
Expand Down Expand Up @@ -540,11 +504,6 @@ if test "x$asan_flags_ok" != "xno"; then
fi

echo " Install prefix . . . . .: $prefix"

if test "x$with_beast" = "xyes"; then
echo
echo " * building against libbse (this is a developer only option, not recommended)"
fi
echo
echo "Now type 'make', followed by 'make install' as root."
echo
8 changes: 4 additions & 4 deletions glui/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ SMHDRS = smlabel.hh smslider.hh smwidget.hh smwindow.hh smframe.hh \

libspectmorphglui_la_SOURCES = $(SMSRCS) $(SMHDRS)
libspectmorphglui_la_CXXFLAGS = $(AM_CXXFLAGS)
libspectmorphglui_la_LIBADD = $(SPECTMORPH_LIBS) $(PUGL_LIBS) $(FREETYPE_LIBS) $(CAIRO_LIBS) $(BSE_LIBS)
libspectmorphglui_la_LIBADD = $(SPECTMORPH_LIBS) $(PUGL_LIBS) $(FREETYPE_LIBS) $(CAIRO_LIBS) $(GLIB_LIBS)
libspectmorphglui_la_LDFLAGS = -no-undefined $(PUGL_LDFLAGS)
libspectmorphglui_la_LIBTOOLFLAGS = --tag CXX

AM_CXXFLAGS += $(BSE_CFLAGS) $(SNDFILE_CFLAGS) $(FREETYPE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/glui -DPUGL_HAVE_GL -DPUGL_HAVE_CAIRO -I$(top_srcdir)/vst
AM_CXXFLAGS += $(GLIB_CFLAGS) $(SNDFILE_CFLAGS) $(FREETYPE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/glui -DPUGL_HAVE_GL -DPUGL_HAVE_CAIRO -I$(top_srcdir)/vst

smuitest_SOURCES = smuitest.cc
smuitest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
smuitest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(GLIB_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
smuitest_LDFLAGS = $(PUGL_LDFLAGS)

smscrolltest_SOURCES = smscrolltest.cc
smscrolltest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
smscrolltest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(GLIB_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
smscrolltest_LDFLAGS = $(PUGL_LDFLAGS)

noinst_PROGRAMS = smuitest smscrolltest
Expand Down
4 changes: 2 additions & 2 deletions gui/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(SNDFILE_CFLAGS) $(QT_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src
AM_CXXFLAGS += $(GLIB_CFLAGS) $(SNDFILE_CFLAGS) $(QT_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src

SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la

Expand All @@ -17,7 +17,7 @@ lib_LTLIBRARIES = libspectmorphgui.la
libspectmorphgui_la_SOURCES = $(SMSRCS) $(SMHDRS)
nodist_libspectmorphgui_la_SOURCES = $(SMMOCS)
libspectmorphgui_la_CXXFLAGS = $(AM_CXXFLAGS)
libspectmorphgui_la_LIBADD = $(BSE_LIBS) $(SPECTMORPH_LIBS) $(QT_LIBS)
libspectmorphgui_la_LIBADD = $(GLIB_LIBS) $(SPECTMORPH_LIBS) $(QT_LIBS)

smguiincludedir = $(includedir)/spectmorph/smgui
smguiinclude_HEADERS = $(SMHDRS) spectmorphgui.hh
Expand Down
6 changes: 3 additions & 3 deletions inspector/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(QT_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/gui \
AM_CXXFLAGS += $(GLIB_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(QT_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/gui \
-I$(top_srcdir)/jack

SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la $(top_builddir)/gui/libspectmorphgui.la
Expand Down Expand Up @@ -35,11 +35,11 @@ nodist_libsminspector_la_SOURCES = $(SMMOCS)
libsminspector_la_CXXFLAGS = $(AM_CXXFLAGS)

sminspector_SOURCES = sminspector.cc
sminspector_LDADD = libsminspector.la $(BSE_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_JACK_LIBS) $(QT_LIBS)
sminspector_LDADD = libsminspector.la $(GLIB_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_JACK_LIBS) $(QT_LIBS)
sminspector_CXXFLAGS = $(AM_CXXFLAGS)

testinspector_SOURCES = testinspector.cc
testinspector_LDADD = libsminspector.la $(BSE_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_JACK_LIBS) $(QT_LIBS)
testinspector_LDADD = libsminspector.la $(GLIB_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_JACK_LIBS) $(QT_LIBS)
testinspector_CXXFLAGS = $(AM_CXXFLAGS)

moc_smnavigator.cc: smnavigator.hh
Expand Down
33 changes: 0 additions & 33 deletions inspector/smtimefreqview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,39 +120,6 @@ TimeFreqView::set_position (int new_position)
Q_EMIT spectrum_changed();
}

#if 0
void
TimeFreqView::load (const string& filename)
{
BseErrorType error;
BseWaveFileInfo *wave_file_info = bse_wave_file_info_load (filename.c_str(), &error);
if (!wave_file_info)
{
fprintf (stderr, "%s: can't open the input file %s: %s\n", options.program_name.c_str(), filename.c_str(), bse_error_blurb (error));
exit (1);
}

BseWaveDsc *waveDsc = bse_wave_dsc_load (wave_file_info, 0, FALSE, &error);
if (!waveDsc)
{
fprintf (stderr, "%s: can't open the input file %s: %s\n", options.program_name.c_str(), filename.c_str(), bse_error_blurb (error));
exit (1);
}

GslDataHandle *dhandle = bse_wave_handle_create (waveDsc, 0, &error);
if (!dhandle)
{
fprintf (stderr, "%s: can't open the input file %s: %s\n", options.program_name.c_str(), filename.c_str(), bse_error_blurb (error));
exit (1);
}
AnalysisParams params;
params.transform_type = SM_TRANSFORM_FFT;
params.frame_size_ms = 40;
params.frame_step_ms = 10;
load (dhandle, filename, NULL, params);
}
#endif

int
TimeFreqView::get_frames()
{
Expand Down
4 changes: 2 additions & 2 deletions instedit/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui
AM_CXXFLAGS += $(GLIB_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui

SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la
SPECTMORPH_GLUI_LIBS = $(top_builddir)/glui/libspectmorphglui.la
Expand All @@ -10,4 +10,4 @@ SPECTMORPH_GLUI_LIBS = $(top_builddir)/glui/libspectmorphglui.la
noinst_PROGRAMS = sminstedit

sminstedit_SOURCES = sminstedit.cc
sminstedit_LDADD = $(BSE_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_GLUI_LIBS) $(CAIRO_LIBS)
sminstedit_LDADD = $(GLIB_LIBS) $(JACK_LIBS) $(SPECTMORPH_LIBS) $(SPECTMORPH_GLUI_LIBS) $(CAIRO_LIBS)
2 changes: 1 addition & 1 deletion jack/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui
AM_CXXFLAGS += $(GLIB_CFLAGS) $(JACK_CFLAGS) $(SNDFILE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui

SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la
SPECTMORPH_GLUI_LIBS = $(top_builddir)/glui/libspectmorphglui.la
Expand Down
4 changes: 2 additions & 2 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(FFTW_CFLAGS) $(SNDFILE_CFLAGS) -I$(top_srcdir)/3rdparty/minizip \
AM_CXXFLAGS += $(GLIB_CFLAGS) $(FFTW_CFLAGS) $(SNDFILE_CFLAGS) -I$(top_srcdir)/3rdparty/minizip \
-I$(top_srcdir)/3rdparty

SMHDRS = smaudio.hh smencoder.hh smnoisedecoder.hh smsinedecoder.hh \
Expand Down Expand Up @@ -54,7 +54,7 @@ libspectmorph_la_SOURCES = smaudio.cc smencoder.cc smnoisedecoder.cc smsinedecod
smmorphkeytrack.cc smmorphkeytrackmodule.cc smcurve.cc smmorphenvelope.cc \
smmorphenvelopemodule.cc

libspectmorph_la_LIBADD = $(LTLIBICONV) $(LAPACK_LIBS) $(FFTW_LIBS) $(BSE_LIBS) $(SNDFILE_LIBS) $(top_builddir)/3rdparty/minizip/libminizip.la
libspectmorph_la_LIBADD = $(LTLIBICONV) $(LAPACK_LIBS) $(FFTW_LIBS) $(GLIB_LIBS) $(SNDFILE_LIBS) $(top_builddir)/3rdparty/minizip/libminizip.la
libspectmorph_la_LDFLAGS = -no-undefined
libspectmorph_la_LIBTOOLFLAGS = --tag CXX

Expand Down
7 changes: 0 additions & 7 deletions lib/smmain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#include <locale.h>
#include <thread>

#if SPECTMORPH_HAVE_BSE
#include <bse/bsemain.hh>
#endif

using std::string;
using std::vector;
using std::function;
Expand Down Expand Up @@ -133,9 +129,6 @@ Main::Main (int *argc_p, char ***argv_p)
{
/* internationalized string printf */
setlocale (LC_ALL, "");
#if SPECTMORPH_HAVE_BSE
bse_init_inprocess (argc_p, *argv_p, NULL);
#endif
sm_plugin_init();
}

Expand Down
7 changes: 1 addition & 6 deletions lib/smminiresampler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@

#include "config.h"

#if SPECTMORPH_HAVE_BSE
#include <bse/gsldatautils.hh>
#endif

using std::vector;
using std::min;

using namespace SpectMorph;

MiniResampler::MiniResampler (const WavData& wav_data, double speedup_factor)
{
#if !SPECTMORPH_HAVE_BSE
g_printerr ("SpectMorph::MiniResampler: not supported without libbse\n");
g_assert_not_reached();
#else
#if 0
const vector<float>& samples = wav_data.samples();
GslDataHandle *dhandle = gsl_data_handle_new_mem (1, 32, wav_data.mix_freq(), 440, samples.size(), &samples[0], NULL);

Expand Down
2 changes: 1 addition & 1 deletion lv2/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(LV2_CFLAGS) $(BSE_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui $(CFLAG_VISIBILITY)
AM_CXXFLAGS += $(LV2_CFLAGS) $(GLIB_CFLAGS) $(SNDFILE_CFLAGS) $(JACK_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/glui $(CFLAG_VISIBILITY)

spectmorph_lv2dir = $(libdir)/lv2/spectmorph.lv2

Expand Down
12 changes: 6 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.decl

AM_CXXFLAGS += $(BSE_CFLAGS) $(AO_CFLAGS) $(SNDFILE_CFLAGS) -I$(top_srcdir)/lib
AM_CXXFLAGS += $(GLIB_CFLAGS) $(AO_CFLAGS) $(SNDFILE_CFLAGS) -I$(top_srcdir)/lib

SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la

Expand All @@ -14,19 +14,19 @@ endif
SMHDRS = stwutils.hh

smenc_SOURCES = smenc.cc $(SMHDRS)
smenc_LDADD = $(BSE_LIBS) $(SPECTMORPH_LIBS)
smenc_LDADD = $(GLIB_LIBS) $(SPECTMORPH_LIBS)

if COND_WITH_AO
smplay_SOURCES = smplay.cc $(SMHDRS)
smplay_LDADD = $(BSE_LIBS) $(AO_LIBS) $(SPECTMORPH_LIBS)
smplay_LDADD = $(GLIB_LIBS) $(AO_LIBS) $(SPECTMORPH_LIBS)
bin_PROGRAMS += smplay
endif

smtool_SOURCES = smtool.cc $(SMHDRS)
smtool_LDADD = $(BSE_LIBS) $(SPECTMORPH_LIBS)
smtool_LDADD = $(GLIB_LIBS) $(SPECTMORPH_LIBS)

smstrip_SOURCES = smstrip.cc $(SMHDRS)
smstrip_LDADD = $(BSE_LIBS) $(SPECTMORPH_LIBS)
smstrip_LDADD = $(GLIB_LIBS) $(SPECTMORPH_LIBS)

smwavset_SOURCES = smwavset.cc $(SMHDRS)
smwavset_LDADD = $(BSE_LIBS) $(SPECTMORPH_LIBS)
smwavset_LDADD = $(GLIB_LIBS) $(SPECTMORPH_LIBS)
Loading

0 comments on commit 168bc10

Please sign in to comment.