From a8abbdfdcccf45171d43566210df4d2208d44585 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 25 Mar 2016 14:23:20 -0400 Subject: [PATCH] Remove scons build files Signed-off-by: Anna Schumaker --- Sconstruct | 59 -------------------------------------- core/Sconscript | 11 ------- core/playlists/Sconscript | 4 --- core/tags/Sconscript | 6 ---- gui/Sconscript | 8 ------ include/Sconscript | 18 ------------ tests/Music/Sconscript | 11 ------- tests/Sconscript | 48 ------------------------------- tests/core/Sconscript | 43 --------------------------- tests/core/tags/Sconscript | 21 -------------- tests/gui/Sconscript | 41 -------------------------- 11 files changed, 270 deletions(-) delete mode 100644 Sconstruct delete mode 100644 core/Sconscript delete mode 100644 core/playlists/Sconscript delete mode 100644 core/tags/Sconscript delete mode 100644 gui/Sconscript delete mode 100644 include/Sconscript delete mode 100644 tests/Music/Sconscript delete mode 100644 tests/Sconscript delete mode 100644 tests/core/Sconscript delete mode 100644 tests/core/tags/Sconscript delete mode 100644 tests/gui/Sconscript diff --git a/Sconstruct b/Sconstruct deleted file mode 100644 index 764a2261..00000000 --- a/Sconstruct +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/python -import os - -CONFIG_VERSION = "6.4.20" - - -# Set up default environment -CONFIG_DEBUG = os.path.exists(".debug") -CONFIG_CCFLAGS = [ "-O2" ] -if CONFIG_DEBUG == True: - CONFIG_CCFLAGS = [ "-Wall", "-Werror", "-g", "-DCONFIG_DEBUG" ] - -class OEnvironment(Environment): - def __init__(self, CCFLAGS = CONFIG_CCFLAGS): - Environment.__init__(self, CCFLAGS = CCFLAGS) - self.Append(CXXFLAGS = "-std=c++11"); - self.Append(CPPPATH = os.path.abspath("include")) - self.Append(CXXCOMSTR = "C++ $TARGET") - self.Append(CCCOMSTR = "CC $TARGET") - self.Append(LINKCOMSTR = "Linking $TARGET") - if "DISPLAY" in os.environ.keys(): - self.Append(ENV = { "DISPLAY" : os.environ["DISPLAY"] }) - self.Debug = CONFIG_DEBUG - self.Version = CONFIG_VERSION - - def UsePackage(self, name): - self.ParseConfig("pkg-config --cflags --libs %s" % name) - -env = OEnvironment() -Export("env") - - -include = SConscript("include/Sconscript") -core = SConscript("core/Sconscript") -gui = SConscript("gui/Sconscript") - -if os.path.isdir("tests"): - tests = SConscript("tests/Sconscript") - - -ocarina = env.Program("bin/ocarina", core + gui) -Default(ocarina) -Clean(ocarina, "bin/") - - -def ocarina_release(target, source, env): - o_vers = "ocarina-%s" % CONFIG_VERSION - os.popen("git archive --prefix=%s/ -o %s.tar.gz HEAD" % (o_vers, o_vers)) - print os.popen("sha1sum %s.tar.gz" % o_vers).read() -Command("release", None, ocarina_release) - - -env.Install("/usr/bin", "bin/ocarina") -env.Install("/usr/share", "share/ocarina/") -env.Install("/usr/share/applications", "share/applications/ocarina.desktop") - -install = Alias("install", [ "/usr/bin", "/usr/share", "/usr/share/applications" ]) -Depends(install, ocarina) -Clean(install, "/usr/share/ocarina") diff --git a/core/Sconscript b/core/Sconscript deleted file mode 100644 index 3e0bc1c6..00000000 --- a/core/Sconscript +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -Import("env") - -res = Glob("*.c") -res += SConscript("tags/Sconscript") -res += SConscript("playlists/Sconscript") - -env.UsePackage("gstreamer-1.0") -env.UsePackage("libmusicbrainz5"); -env.UsePackage("libcoverart"); -Return("res") diff --git a/core/playlists/Sconscript b/core/playlists/Sconscript deleted file mode 100644 index 4812aaf3..00000000 --- a/core/playlists/Sconscript +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/python - -res = Glob("*.c") -Return("res") diff --git a/core/tags/Sconscript b/core/tags/Sconscript deleted file mode 100644 index 33d0a110..00000000 --- a/core/tags/Sconscript +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/python -Import("env") - -env.UsePackage("taglib_c") -res = Glob("*.c") -Return("res") diff --git a/gui/Sconscript b/gui/Sconscript deleted file mode 100644 index 79d29955..00000000 --- a/gui/Sconscript +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python -Import("env") - -env.UsePackage("gtk+-3.0") -env.UsePackage("gmodule-export-2.0"); - -res = Glob("*.c") -Return("res") diff --git a/include/Sconscript b/include/Sconscript deleted file mode 100644 index dd1d5a03..00000000 --- a/include/Sconscript +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/python -import subprocess -Import("env") - -version = str(env.Version) -if env.Debug == True: - version += "-debug" - -try: - devnull = open("/dev/null", "w") - diff = subprocess.check_output("git diff $(git describe --abbrev=0)", - stderr=devnull, shell=True) - if diff != "": - version += "+" -except: - pass - -env.Append( CCFLAGS = [ "-DCONFIG_VERSION='\"%s\"'" % version ] ) diff --git a/tests/Music/Sconscript b/tests/Music/Sconscript deleted file mode 100644 index 5fed9173..00000000 --- a/tests/Music/Sconscript +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import subprocess -import sys - -albums = [ "Hyrule_Symphony.album" ] -albums += [ "Ocarina_of_Time.album" ] - -for album in albums: - ret = subprocess.call(["sh", "gen_tracks.sh", album]) - if ret != 0: - sys.exit(ret) diff --git a/tests/Sconscript b/tests/Sconscript deleted file mode 100644 index 5a05be6b..00000000 --- a/tests/Sconscript +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python -import sys, os -Import("env") - -tests = [] - -for arg in sys.argv[1:]: - if arg.find("tests") == 0: - tests += [ arg ] - -if len(tests) == 0: - Return() - -def testing_group(group): - group = [ "tests" ] + group - for arg in tests: - if arg in set(group + [ g + "/" for g in group]): - return True - return False -check_sanity = testing_group([]) - -env.Append(CCFLAGS = [ "-DCONFIG_TESTING", "-DCONFIG_TESTING_DIR=\"\"" ]) -env.UsePackage("glib-2.0") -test_o = env.Object("test", "test.c") - -def UnitTest(test, sources): - name = os.path.basename(test) - make = env.Program(name, sources + [ test_o ]) - run = Command("%s.fake" % name, [], "tests/%s" % test, ENV = os.environ) - Depends(run, make) - Alias("tests/%s" % test, run) - return run -Export("UnitTest", "testing_group") - -#Generate empty audio files -SConscript("Music/Sconscript") - -res = UnitTest("sanity", [ "sanity.c" ]) -res += SConscript("core/Sconscript") - -if "DISPLAY" in os.environ.keys(): - res += SConscript("gui/Sconscript") - -if check_sanity == True: - for t in res[1:]: - Depends(t, res[0]) - -Return("res") diff --git a/tests/core/Sconscript b/tests/core/Sconscript deleted file mode 100644 index c45a822f..00000000 --- a/tests/core/Sconscript +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python -import os -Import("env", "UnitTest", "testing_group") - -res = [] -core_objs = [] -ignore = open(".gitignore", "w") - -def CoreTest(name): - global core_objs - - ignore.write("%s\n" % name) - source = "%s.c" % name.split("/")[-1] - test = os.path.abspath(source) - core = os.path.sep.join([x for x in test.split("/") if x != "tests"]) - if os.path.exists(core): - core_objs += [ env.Object(core) ] - - run = UnitTest("core/%s" % name, [ test ] + core_objs) - Alias("tests/core", run) - if len(res) > 0 and testing_group(["tests/core"]): - Depends(run, res[-1]) - return run -Export("core_objs", "CoreTest") - - -core_objs += [ env.Object("../../core/string.c") ] -core_objs += [ env.Object("../../core/file.c") ] -core_objs += [ env.Object("../../core/date.c") ] -core_objs += [ env.Object("../../core/idle.c") ] -core_objs += [ env.Object("../../core/database.c") ] - -res += SConscript("tags/Sconscript") -core_objs += [ env.Object("../../core/queue.c") ] - -res += SConscript("playlists/Sconscript") -core_objs += [ env.Object("../../core/playlist.c") ] -core_objs += [ env.Object("../../core/tempq.c") ] -core_objs += [ env.Object("../../core/core.c") ] -core_objs += [ env.Object("../../core/audio.c") ] - -ignore.close() -Return("res") diff --git a/tests/core/tags/Sconscript b/tests/core/tags/Sconscript deleted file mode 100644 index 55db7df1..00000000 --- a/tests/core/tags/Sconscript +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python -Import("env", "CoreTest", "core_objs", "testing_group") - -res = [] - -def TagTest(name): - run = CoreTest("tags/%s" % name) - Alias("tests/core/tags", run) - if len(res) > 0 and testing_group([ "tests/core/tags" ]): - Depends(run, res[-1]) - return run - -env.UsePackage("taglib_c") -core_objs += [ env.Object("../../../core/tags/artist.c") ] -core_objs += [ env.Object("../../../core/tags/album.c") ] -core_objs += [ env.Object("../../../core/tags/genre.c") ] -core_objs += [ env.Object("../../../core/tags/library.c") ] -core_objs += [ env.Object("../../../core/tags/tags.c") ] -core_objs += [ env.Object("../../../core/tags/track.c") ] - -Return("res") diff --git a/tests/gui/Sconscript b/tests/gui/Sconscript deleted file mode 100644 index 4f67a8ee..00000000 --- a/tests/gui/Sconscript +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python -import os -Import("env", "UnitTest", "testing_group", "core_objs") - -res = [] -gui_objs = [] -ignore = open(".gitignore", "w") - -def GuiTest(name): - global gui_objs - - ignore.write("%s\n" % name) - source = "%s.c" % name - test = os.path.abspath(source) - gui = os.path.sep.join([x for x in test.split("/") if x != "tests"]) - if os.path.exists(gui): - gui_objs += [ env.Object(gui) ] - - run = UnitTest("gui/%s" % name, [ test ] + gui_objs + core_objs) - Alias("tests/gui", run) - if len(res) > 0 and testing_group(["tests/gui"]): - Depends(run, res[-1]) - return run - - -env.UsePackage("gmodule-export-2.0") -gui_objs += [ env.Object("../../gui/builder.c") ] -gui_objs += [ env.Object("../../gui/settings.c") ] -gui_objs += [ env.Object("../../gui/model.c") ] -gui_objs += [ env.Object("../../gui/view.c") ] -gui_objs += [ env.Object("../../gui/queue.c") ] -gui_objs += [ env.Object("../../gui/window.c") ] -gui_objs += [ env.Object("../../gui/idle.c") ] -gui_objs += [ env.Object("../../gui/sidebar.c") ] -gui_objs += [ env.Object("../../gui/playlist.c") ] -gui_objs += [ env.Object("../../gui/collection.c") ] -gui_objs += [ env.Object("../../gui/artwork.c") ] -gui_objs += [ env.Object("../../gui/auido.c") ] - -ignore.close() -Return("res")