spek

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

commit 6f604f585086988c0e3b0346743d01ac107c2c56
parent c2d983eda323ed3f68925c8af875b6e789fa2bbf
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Sun, 20 Jun 2010 20:16:41 +0900

[osx] Add bockbuild as a git module

Diffstat:
A.gitmodules | 3+++
Abockbuild | 1+
Dbockbuild/packages/spek.py | 9---------
Dbockbuild/profiles/spek/packages.py | 74--------------------------------------------------------------------------
Dbockbuild/profiles/spek/profile.darwin.py | 40----------------------------------------
Dbockbuild/profiles/spek/skeleton.darwin/.DS_Store | 0
Dbockbuild/profiles/spek/skeleton.darwin/Contents/Info.plist | 30------------------------------
Dbockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek | 83-------------------------------------------------------------------------------
Dbockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc | 325-------------------------------------------------------------------------------
Dbockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run | 0
Mbundle.sh | 8+-------
11 files changed, 5 insertions(+), 568 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "bockbuild"] + path = bockbuild + url = git://github.com/alexkay/bockbuild.git diff --git a/bockbuild b/bockbuild @@ -0,0 +1 @@ +Subproject commit 14e4b3fda61dddf3bd86d2689674388db1baa1e5 diff --git a/bockbuild/packages/spek.py b/bockbuild/packages/spek.py @@ -1,9 +0,0 @@ -class SpekPackage (Package): - def __init__ (self): - Package.__init__ (self, 'spek', '0.4') - - self.sources = [ - 'http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2' - ] - -SpekPackage () diff --git a/bockbuild/profiles/spek/packages.py b/bockbuild/profiles/spek/packages.py @@ -1,74 +0,0 @@ -import os -from bockbuild.darwinprofile import DarwinProfile - -class SpekPackages: - def __init__ (self): - # Toolchain - self.packages.extend ([ - 'autoconf.py', - 'automake.py', - 'libtool.py', - 'gettext.py', - 'pkg-config.py', - ]) - - # Base Libraries - self.packages.extend ([ -# 'libiconv.py', - 'libpng.py', - 'libjpeg.py', - 'libxml2.py', - 'freetype.py', - 'fontconfig.py', - 'pixman.py', - 'cairo.py', - 'glib.py', - 'pango.py', - 'atk.py', - 'intltool.py', - 'gtk+.py', - 'libproxy.py', - 'libsoup.py', - ]) - - # Theme - self.packages.extend ([ - 'librsvg.py', - 'icon-naming-utils.py', - 'hicolor-icon-theme.py', -# 'tango-icon-theme.py', - 'murrine.py', - ]) - - # Codecs - self.packages.extend ([ - 'libogg.py', - 'libvorbis.py', - 'flac.py', - 'libtheora.py', - 'speex.py', - 'wavpack.py', - 'taglib.py', - ]) - - # GStreamer - self.packages.extend ([ - 'liboil.py', - 'gstreamer.py', - 'gst-plugins-base.py', - 'gst-plugins-good.py', - 'gst-plugins-bad.py', - 'gst-plugins-ugly.py', - 'gst-ffmpeg.py', - ]) - - if isinstance (self, DarwinProfile): - self.packages.extend ([ - 'ige-mac-integration.py' - ]) - - if self.cmd_options.release_build: - self.packages.append ('spek.py') - - self.packages = [os.path.join ('..', '..', 'packages', p) - for p in self.packages] diff --git a/bockbuild/profiles/spek/profile.darwin.py b/bockbuild/profiles/spek/profile.darwin.py @@ -1,40 +0,0 @@ -#!/usr/bin/python -B - -import os -import sys - -sys.path.append ('../..') - -from bockbuild.darwinprofile import DarwinProfile -from packages import SpekPackages - -class SpekDarwinProfile (DarwinProfile, SpekPackages): - def __init__ (self): - DarwinProfile.__init__ (self) - SpekPackages.__init__ (self) - - self_dir = os.path.realpath (os.path.dirname (sys.argv[0])) - self.bundle_skeleton_dir = os.path.join (self_dir, 'skeleton.darwin') - self.bundle_output_dir = os.path.join (self_dir, 'bundle.darwin') - - self.bundle_from_build = [ - 'bin/spek', - 'lib/pango', - 'lib/gtk-2.0/2.10.0/loaders', - 'lib/gtk-2.0/2.10.0/engines', - 'lib/gtk-2.0/2.10.0/immodules', - 'lib/gstreamer-0.10', - 'share/spek', -# 'share/locale', - 'share/icons/hicolor/index.theme', -# 'share/icons/Tango/index.theme', - ] - - self.bundle_from_build.extend ([ - 'share/icons/%s/%sx%s' % (theme, size, size) - for size in [16, 22, 32, 48] -# for theme in ['hicolor', 'Tango'] - for theme in ['hicolor'] - ]) - -SpekDarwinProfile ().build () diff --git a/bockbuild/profiles/spek/skeleton.darwin/.DS_Store b/bockbuild/profiles/spek/skeleton.darwin/.DS_Store Binary files differ. diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/Info.plist b/bockbuild/profiles/spek/skeleton.darwin/Contents/Info.plist @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>Spek</string> - <key>CFBundleGetInfoString</key> - <string>Spek 0.4</string> - <key>CFBundleIconFile</key> - <string>Spek.icns</string> - <key>CFBundleIdentifier</key> - <string>org.spek-project</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>0.4</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>0.4</string> - <key>NSHumanReadableCopyright</key> - <string>Copyright (c) 2010 Alexander Kojevnikov</string> - <key>LSMinimumSystemVersion</key> - <string>10.4</string> -</dict> -</plist> diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek b/bockbuild/profiles/spek/skeleton.darwin/Contents/MacOS/Spek @@ -1,83 +0,0 @@ -#!/bin/bash - -APP_ROOT="$PWD/$(dirname "$0")" -for ((i=0; i<2; i++)); do APP_ROOT="$(dirname "$APP_ROOT")"; done -APP_ROOT="${APP_ROOT/\/\/}" - -# Bundle directories -CONTENTS_DIR="$APP_ROOT/Contents" -RES_DIR="$CONTENTS_DIR/Resources" -ETC_DIR="$RES_DIR/etc" -LIB_DIR="$RES_DIR/lib" -BIN_DIR="$RES_DIR/bin" -DATA_DIR="$RES_DIR/share" - -# Shell environment -export PATH="/bin:/usr/bin:$BIN_DIR" -export BUNDLE_BIN_DIR="$BIN_DIR" -export BUNDLE_LIB_DIR="$LIB_DIR" - -# XDG environment -export XDG_CONFIG_DIRS="$ETC_DIR/xdg" -export XDG_DATA_DIRS="$DATA_DIR" -export XDG_CONFIG_HOME="$HOME/.config" - -# GTK environment -export GTK_PATH="$RES_DIR" -export GTK_EXE_PREFIX="$RES_DIR" -export GTK_DATA_PREFIX="$RES_DIR" -export GTK2_RC_FILES="$ETC_DIR/gtk-2.0/gtkrc" -export GTK_IM_MODULE_FILE="$ETC_DIR/gtk-2.0/gtk.immodules" -export GDK_PIXBUF_MODULE_FILE="$ETC_DIR/gtk-2.0/gdk-pixbuf.loaders" -export PANGO_RC_FILE="$ETC_DIR/pango/pangorc" - -# Spek/GStreamer environment -export DYLD_LIBRARY_PATH="$LIB_DIR" -export GST_PLUGIN_SYSTEM_PATH="$LIB_DIR/gstreamer-0.10" -export SPEK_CONFIG_DIR="$XDG_CONFIG_HOME/spek" -SPEK_OPTIONS="" -SPEK_EXEC_NAME=Spek -SPEK_BIN="$BIN_DIR/spek" - -# FIXME -# pango.modules sucks - it doesn't like paths with spaces, -# so even though everything else works fine, we still -# will explode, so instead I'm just showing this lame dialog. -if [[ "$APP_ROOT" =~ [[:space:]] ]]; then - osascript &>/dev/null <<EOF - tell application "System Events" - activate - display dialog "A space was detected in the path to Spek. Currently this is unsupported.\n\nRename or move Spek.app to a path without spaces.\n\nPath: $APP_ROOT" with title "Error" with icon caution buttons { "OK" } default button 1 - end tell -EOF - exit 1 -fi - -mkdir -p "$SPEK_CONFIG_DIR" - -if [ -f "$RES_DIR/first-run" ]; then - echo "Appears to be first run of this application bundle." - rm -f -- "$RES_DIR/first-run" - PREVIOUS_APP_ROOT="" -else - PREVIOUS_APP_ROOT="$(cat "$SPEK_CONFIG_DIR/app-bundle-location" 2>/dev/null)" -fi - -if [ ! "$APP_ROOT" = "$PREVIOUS_APP_ROOT" ]; then - echo "Application bundle has moved. Adjusting bundle..." - - # Adjust config files that need absolute paths to things - # in the bundle (e.g. pango, GDK pixbuf loaders...) - IFS=$'\n' - for file in $(find "$ETC_DIR" -name \*.in); do - sed "s|\${APP_RESOURCES}|${RES_DIR}|g" \ - < "${file}" \ - > "${file%.in}" - done - unset IFS - - # Store the new location of the bundle - echo "$APP_ROOT" > "$SPEK_CONFIG_DIR/app-bundle-location" -fi - -exec -a $SPEK_EXEC_NAME "$SPEK_BIN" diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc b/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/etc/gtk-2.0/gtkrc @@ -1,325 +0,0 @@ -# Mac OS X friendly theme -# Written by Aaron Bockover <abockover@novell.com> -# Copyright 2010 Novell, Inc. -# Released under the MIT/X11 license - -include "gtkrc.key.mac" - -gtk-color-scheme = -"base_color: #fff -bg_color: #ededed -fg_color: #000 -text_color: #000 -selected_bg_color: #7b8ea0 -selected_fg_color: #fff -tooltip_bg_color: #f7f4b8 -tooltip_fg_color: #000 -" -gtk-font-name = "Lucida Grande 14" -gtk-icon-theme-name = "Tango" -gtk-menu-popup-delay = 1 -gtk-button-images = 0 -gtk-menu-images = 0 -gtk-enable-mnemonics = 0 - -style "murrine-default" { - xthickness = 1 - ythickness = 1 - - GtkCheckButton::indicator-size = 14 - GtkPaned::handle-size = 6 - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 - GtkButton::default-border = { 0, 0, 0, 0 } - - GtkRange::trough-border = 2 - GtkRange::slider-width = 14 - GtkRange::stepper-size = 13 - - GtkScale::slider-length = 15 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 35 - GtkScrollbar::has-forward-stepper = 1 - GtkScrollbar::has-backward-stepper = 0 - GtkScrollbar::has-secondary-forward-stepper = 0 - GtkScrollbar::has-secondary-backward-stepper = 1 - - GtkExpander::expander-size = 16 - GtkToolbar::internal-padding = 0 - GtkTreeView::expander-size = 14 - # GtkTreeView::vertical-separator = 0 - - GtkMenuBar::internal-padding = 0 - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - GtkMenuItem::horizontal-padding = 10 - - fg[NORMAL] = @fg_color - fg[PRELIGHT] = @fg_color - fg[SELECTED] = @selected_fg_color - fg[ACTIVE] = @fg_color - fg[INSENSITIVE] = darker (@bg_color) - - bg[NORMAL] = @bg_color - bg[PRELIGHT] = shade (1.02, @bg_color) - bg[SELECTED] = @selected_bg_color - bg[INSENSITIVE] = @bg_color - bg[ACTIVE] = shade (1.04, @bg_color) - - base[NORMAL] = @base_color - base[PRELIGHT] = shade (0.95, @bg_color) - base[ACTIVE] = shade (0.92, @selected_bg_color) - base[SELECTED] = shade (0.93, @selected_bg_color) - base[INSENSITIVE] = @bg_color - - text[NORMAL] = @text_color - text[PRELIGHT] = @text_color - text[ACTIVE] = @selected_fg_color - text[SELECTED] = @selected_fg_color - text[INSENSITIVE] = darker (@bg_color) - - engine "murrine" { - profile = MURRINE - - contrast = 0.7 - glazestyle = 3 - roundness = 3 - reliefstyle = 2 - gradients = TRUE - gradient_shades = { 1.15, 1.07, 1.02, 0.9 } - lightborder_shade = 1.36 - lightborderstyle = 1 - highlight_shade = 1.07 - - menubarstyle = 0 - menubaritemstyle = 0 - menuitemstyle = 0 - menustyle = 0 - - scrollbarstyle = 0 - stepperstyle = 1 - toolbarstyle = 2 - sliderstyle = 0 - - listviewheaderstyle = 1 - listviewstyle = 1 - } -} - -style "murrine-wide" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = @selected_bg_color -} - -style "murrine-wider" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @selected_bg_color -} - -style "murrine-button" = "murrine-wider" { - bg[NORMAL] = shade (1.127, @bg_color) - bg[PRELIGHT] = shade (1.15, @bg_color) - bg[ACTIVE] = shade (0.90, @bg_color) - bg[INSENSITIVE] = shade (1.055, @bg_color) - - engine "murrine" { - contrast = 0.925 - lightborder_shade = 1.7 - gradient_shades = {1.15,1.07,1.0185,0.885} - gradients = TRUE - } -} - -style "murrine-scale" = "murrine-button" { - GtkRange::slider-width = 14 - engine "murrine" { - roundness = 7 - } -} - -style "murrine-hscale" { } -style "murrine-vscale" { } - -style "murrine-entry" = "murrine-wider" { } - -style "murrine-scrollbar" { - engine "murrine" { - roundness = 8 - gradient_shades = { 1.11, 1.07, 1.065, 0.92 } - } -} - -style "murrine-hscrollbar" { } -style "murrine-vscrollbar" { } - -style "murrine-progressbar" -{ - xthickness = 0 - ythickness = 0 - - fg[PRELIGHT] = lighter (@selected_fg_color) - bg[NORMAL] = shade (0.98, @bg_color) - bg[SELECTED] = @selected_bg_color - - engine "murrine" { - roundness = 1 - lightborder_shade = 1.36 - lightborderstyle = 0 - } -} - -style "murrine-notebook" = "murrine-wider" { - bg[ACTIVE] = shade (0.925, @bg_color) - bg[NORMAL] = shade (1.135, @bg_color) - bg[SELECTED] = @selected_bg_color - fg[ACTIVE] = shade (0.5, @bg_color) - - engine "murrine" { - contrast = 0.95 - } -} - -style "murrine-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (1.15, @bg_color) - - engine "murrine" { - roundness = 0 - glazestyle = 0 - highlight_shade = 1.0 - } -} - -style "murrine-menu-item" { - xthickness = 0 - ythickness = 3 - - fg[PRELIGHT] = @selected_fg_color - bg[SELECTED] = shade (0.98, @selected_bg_color) - - engine "murrine" { - roundness = 0 - gradient_shades = { 1.07, 1.05, 1.04, 1.01 } - highlight_shade = 1.0 - gradients = TRUE - glow_shade = 1.3 - glowstyle = 0 - contrast = 0.8 - } -} - -style "murrine-separator-menu-item" { } - -style "murrine-treeview" { - bg[SELECTED] = @selected_bg_color -} - -style "murrine-treeview-header" = "murrine-default" { - bg[NORMAL] = shade (1.08, @bg_color) - bg[PRELIGHT] = shade (1.11, @bg_color) - bg[ACTIVE] = shade (0.92, @bg_color) - bg[INSENSITIVE] = shade (1.04, @bg_color) -} - -style "murrine-frame-title" { - fg[NORMAL] = lighter (@fg_color) -} - -style "murrine-tooltips" = "murrine-wider" { - bg[NORMAL] = @tooltip_bg_color - fg[NORMAL] = @tooltip_fg_color -} - -style "murrine-toolbar" { - engine "murrine" { - gradient_shades = { 1.0, 0.98, 0.96, 0.928 } - gradients = TRUE - highlight_shade = 1.00 - contrast = 0.96 - } -} - -style "murrine-statusbar" { } -style "murrine-comboboxentry" { } -style "murrine-spinbutton" { } - -style "murrine-radiocheck" = "murrine-default" { - text[NORMAL] = "#FFFFFF" - text[PRELIGHT] = "#FFFFFF" -} - -style "smaller-text" { -# font_name = "7" -} - -style "handle" { - bg[NORMAL] = "#232323" -} - -class "GtkRadio*" style "murrine-radiocheck" -class "GtkCheck*" style "murrine-radiocheck" - -class "GtkWidget" style "murrine-default" - -class "GtkToolbar" style "murrine-toolbar" -class "GtkRange" style "murrine-wide" -class "GtkFrame" style "murrine-wide" -class "GtkSeparator" style "murrine-wide" -class "GtkEntry" style "murrine-entry" - -class "GtkSpinButton" style "murrine-spinbutton" -class "GtkScale" style "murrine-scale" -class "GtkVScale" style "murrine-vscale" -class "GtkHScale" style "murrine-hscale" -class "GtkScrollbar" style "murrine-scrollbar" -class "GtkVScrollbar" style "murrine-vscrollbar" -class "GtkHScrollbar" style "murrine-hscrollbar" - -widget_class "*<GtkNotebook>*<GtkEventBox>" style "murrine-notebook" -widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "murrine-notebook" -widget_class "*<GtkNotebook>*<GtkLayout>" style "murrine-notebook" -widget_class "*<GtkNotebook>*<GtkLabel>" style "murrine-notebook" - -widget_class "*<GtkButton>" style "murrine-button" -widget_class "*<GtkNotebook>" style "murrine-notebook" -widget_class "*<GtkStatusbar>*" style "murrine-statusbar" - -widget_class "*<GtkComboBoxEntry>*" style "murrine-comboboxentry" -widget_class "*<GtkCombo>*" style "murrine-comboboxentry" - -widget_class "*<GtkMenu>*" style "murrine-menu" -widget_class "*<GtkMenuItem>*" style "murrine-menu-item" -widget_class "*<GtkSeparatorMenuItem>*" style "murrine-separator-menu-item" - -widget_class "*.<GtkFrame>.<GtkLabel>" style "murrine-frame-title" -widget_class "*.<GtkTreeView>*" style "murrine-treeview" - -widget_class "*<GtkProgressBar>" style "murrine-progressbar" - -widget_class "*.<GtkTreeView>.<GtkButton>" style "murrine-treeview-header" -widget_class "*.<GtkCTree>.<GtkButton>" style "murrine-treeview-header" -widget_class "*.<GtkList>.<GtkButton>" style "murrine-treeview-header" -widget_class "*.<GtkCList>.<GtkButton>" style "murrine-treeview-header" - -widget_class "*ToolButton*" style "smaller-text" -widget_class "*Statusbar*" style "smaller-text" - -widget "gtk-tooltip*" style "murrine-tooltips" - -style "murrine-menuitem-text-is-fg-color-workaround" { - text[NORMAL] = @fg_color - text[PRELIGHT] = @selected_fg_color - text[SELECTED] = @selected_fg_color - text[ACTIVE] = @fg_color - text[INSENSITIVE] = darker (@bg_color) -} - -widget "*.gtk-combobox-popup-menu.*" style "murrine-menuitem-text-is-fg-color-workaround" diff --git a/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run b/bockbuild/profiles/spek/skeleton.darwin/Contents/Resources/first-run diff --git a/bundle.sh b/bundle.sh @@ -1,7 +1,6 @@ #!/bin/sh # This script creates a Mac OS X app bundle and a DMG image from it using bockbuild. -# The bockbuild package should already be installed in ../../bockbuild # TODO: create these packages for GStreamer: # BAD: orc, schroedinger, faad2, libdca, libmodplug, libmpcdec, xvid @@ -10,8 +9,6 @@ # TODO: # - DS_Store # - Check which gtkrc other projects are using -# - deps above -# - credit bockbuild pushd $(dirname $0) @@ -23,11 +20,8 @@ case "$(uname)" in ;; esac -# Copy Spek packages to bockbuild -cp -prv bockbuild .. - # Build Spek and all its dependencies -pushd ../bockbuild/profiles/spek +pushd bockbuild/profiles/spek ./profile."$profile_name".py -bvr # Build Solitary