spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit d4a5f322f0f9911ab64b13d147d3e2cc3681c9f2
parent ed15610270f5927583f67513d1c2c96767700351
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Sun,  5 Aug 2012 15:13:03 -0700

Remove all references to Vala

Diffstat:
MMakefile.am | 5+----
Mconfigure.ac | 36+++++++-----------------------------
Msrc/Makefile.am | 29++---------------------------
Asrc/spek.cc | 6++++++
Dvapi/Makefile.am | 8--------
Dvapi/config.vapi | 16----------------
Dvapi/spek-audio.vapi | 29-----------------------------
Dvapi/spek-fft.vapi | 16----------------
Dvapi/spek-platform.vapi | 10----------
9 files changed, 16 insertions(+), 139 deletions(-)

diff --git a/Makefile.am b/Makefile.am @@ -1,11 +1,8 @@ -# Makefile.am - SUBDIRS = \ data \ man \ po \ - src \ - vapi + src EXTRA_DIST = \ intltool-extract.in \ diff --git a/configure.ac b/configure.ac @@ -1,42 +1,22 @@ -# configure.ac - AC_INIT([spek],[0.7]) -AC_CONFIG_SRCDIR([src/spek.vala]) +AC_CONFIG_SRCDIR([src/spek.cc]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz]) - -# Enable silent rules is available -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) +AM_SILENT_RULES AM_MAINTAINER_MODE -AC_PROG_CC -AC_PROG_CC_STDC -AM_PROG_VALAC([0.12.0]) +AC_PROG_CC_C99 +AC_PROG_CXX AC_PROG_INSTALL IT_PROG_INTLTOOL([0.35]) -pkg_modules="gtk+-2.0 >= 2.18.0 libavformat >= 52.111 libavcodec >= 52.123 libavutil" +pkg_modules="libavformat >= 52.111 libavcodec >= 52.123 libavutil" PKG_CHECK_MODULES(SPEK, [$pkg_modules]) AC_SUBST(SPEK_CFLAGS) AC_SUBST(SPEK_LIBS) -SPEK_PACKAGES="--pkg gtk+-2.0 --pkg gio-2.0" -AC_SUBST(SPEK_PACKAGES) - AC_CHECK_LIB(m, log10) -AC_CHECK_LIB(gthread-2.0, g_thread_init) - -# Check for GDK Quartz and MacOSX integration package -_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0` -AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz]) -if test "x$_gdk_tgt" = xquartz; then - PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration) - IGE_MAC_LIBS="$IGE_MAC_LIBS -framework CoreFoundation -framework ApplicationServices" - AC_SUBST(IGE_MAC_LIBS) - AC_SUBST(IGE_MAC_CFLAGS) - AC_DEFINE(G_OS_DARWIN, 1, [Platform detection macro missing in GLib]) -fi GETTEXT_PACKAGE=spek AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package]) @@ -61,7 +41,6 @@ AC_CONFIG_FILES([ man/spek.1 po/Makefile.in src/Makefile - vapi/Makefile web/version ]) -AC_OUTPUT -\ No newline at end of file +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am @@ -1,39 +1,14 @@ bin_PROGRAMS = spek spek_SOURCES = \ - spek.vala \ - spek-audio.c \ - spek-fft.c \ - spek-pipeline.vala \ - spek-platform.c \ - spek-preferences.vala \ - spek-preferences-dialog.vala \ - spek-ruler.vala \ - spek-spectrogram.vala \ - spek-window.vala + spek.cc AM_CPPFLAGS = \ -include config.h \ $(SPEK_CFLAGS) \ - $(IGE_MAC_CFLAGS) \ -DLOCALEDIR=\""$(localedir)"\" \ -DPKGDATADIR=\""$(pkgdatadir)"\" \ -DPKGLIBDIR=\""$(pkglibdir)"\" -VALAFLAGS = \ - --thread \ - --vapidir=$(srcdir)/../vapi \ - --pkg config \ - --pkg spek-audio \ - --pkg spek-fft \ - --pkg spek-platform \ - @SPEK_PACKAGES@ - spek_LDADD = \ - $(SPEK_LIBS) \ - $(IGE_MAC_LIBS) - -EXTRA_DIST = \ - spek-audio.h \ - spek-fft.h \ - spek-platform.h + $(SPEK_LIBS) diff --git a/src/spek.cc b/src/spek.cc @@ -0,0 +1,6 @@ +#include <cstdio> + +int main() +{ + printf("Hello, world!\n"); +} diff --git a/vapi/Makefile.am b/vapi/Makefile.am @@ -1,8 +0,0 @@ -noinst_DATA = \ - config.vapi \ - spek-audio.vapi \ - spek-fft.vapi \ - spek-platform.vapi - -EXTRA_DIST = \ - $(noinst_DATA) diff --git a/vapi/config.vapi b/vapi/config.vapi @@ -1,16 +0,0 @@ -[CCode (prefix = "", lower_case_cprefix = "", cheader_filename = "config.h")] -namespace Config { - /* Package information */ - public const string PACKAGE_NAME; - public const string PACKAGE_STRING; - public const string PACKAGE_VERSION; - - /* Gettext package */ - public const string GETTEXT_PACKAGE; - - /* Configured paths - these variables are not present in config.h, they are - * passed to underlying C code as cmd line macros. */ - public const string LOCALEDIR; /* /usr/local/share/locale */ - public const string PKGDATADIR; /* /usr/local/share/spek */ - public const string PKGLIBDIR; /* /usr/local/lib/spek */ -} diff --git a/vapi/spek-audio.vapi b/vapi/spek-audio.vapi @@ -1,29 +0,0 @@ -[CCode (cprefix = "SpekAudio", lower_case_cprefix = "spek_audio_", cheader_filename = "spek-audio.h")] -namespace Spek.Audio { - [Compact] - [CCode (free_function = "spek_audio_close")] - public class Context { - public string file_name; - public string codec_name; - public string error; - public int bit_rate; - public int sample_rate; - public int bits_per_sample; - public int width; - public bool fp; - public int channels; - public double duration; - public uint8 *buffer; - public int64 frames_per_interval; - public int64 error_per_interval; - public int64 error_base; - - [CCode (cname = "spek_audio_open")] - public Context (string file_name); - [CCode (cname = "spek_audio_start")] - public int start (int samples); - [CCode (cname = "spek_audio_read")] - public int read (); - } - public static void init (); -} diff --git a/vapi/spek-fft.vapi b/vapi/spek-fft.vapi @@ -1,16 +0,0 @@ -[CCode (cprefix = "SpekFft", lower_case_cprefix = "spek_fft_", cheader_filename = "spek-fft.h")] -namespace Spek.Fft { - [Compact] - [CCode (free_function = "spek_fft_destroy")] - public class Plan { - [CCode (array_length = false)] - public unowned float[] input; - [CCode (array_length = false)] - public unowned float[] output; - - [CCode (cname = "spek_fft_plan_new")] - public Plan (int n, int threshold); - [CCode (cname = "spek_fft_execute")] - public void execute (); - } -} diff --git a/vapi/spek-platform.vapi b/vapi/spek-platform.vapi @@ -1,10 +0,0 @@ -[CCode (cprefix = "SpekPlatform", lower_case_cprefix = "spek_platform_", cheader_filename = "spek-platform.h")] -namespace Spek.Platform { - public static void init (); - public static void fix_args (string[] args); - public static void fix_ui (Gtk.UIManager ui); - public static unowned string locale_dir (); - public static void show_uri (string uri); - public static string read_line (string uri); - public static double get_font_scale (); -}