diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-01-06 15:23:56 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-01-06 15:23:56 +0100 |
commit | b62c08e2d7f41fabb4ff11f2a839fd32c73ff79f (patch) | |
tree | 2a41f3dc35554276429c394f10a4e1d767eb115b /pkgs/applications/graphics/fluxus | |
parent | 83481b87082efe630b6bcd3c5089f488d90be51f (diff) |
fluxus: migrate to scons_latest
Diffstat (limited to 'pkgs/applications/graphics/fluxus')
-rw-r--r-- | pkgs/applications/graphics/fluxus/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/graphics/fluxus/fix-build.patch | 88 |
2 files changed, 85 insertions, 5 deletions
diff --git a/pkgs/applications/graphics/fluxus/default.nix b/pkgs/applications/graphics/fluxus/default.nix index 70d35ed671bb7..535b177bd7bd2 100644 --- a/pkgs/applications/graphics/fluxus/default.nix +++ b/pkgs/applications/graphics/fluxus/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation rec { openssl.dev racket_7_9 ]; - nativeBuildInputs = [ sconsPackages.scons_3_1_2 ]; + nativeBuildInputs = [ sconsPackages.scons_latest ]; patches = [ ./fix-build.patch ]; sconsFlags = [ diff --git a/pkgs/applications/graphics/fluxus/fix-build.patch b/pkgs/applications/graphics/fluxus/fix-build.patch index 7810dd59e3572..b19ed9c2cbc7b 100644 --- a/pkgs/applications/graphics/fluxus/fix-build.patch +++ b/pkgs/applications/graphics/fluxus/fix-build.patch @@ -1,11 +1,20 @@ diff --git a/SConstruct b/SConstruct -index 32cb644..0b3a208 100644 +index 32cb644..650333a 100644 --- a/SConstruct +++ b/SConstruct -@@ -225,6 +225,11 @@ if env['PLATFORM'] == 'posix': +@@ -6,7 +6,7 @@ + # application, then calls the sconscripts for libfluxus and + # the fluxus Racket modules + +-import os, os.path, sys, commands, subprocess ++import os, os.path, sys, subprocess + + MajorVersion = "0" + MinorVersion = "19" +@@ -225,13 +225,18 @@ if env['PLATFORM'] == 'posix': ["asound", "alsa/asoundlib.h"], ["openal", "AL/al.h"]] - + +env.Append(ENV={'PATH': ' ' + os.environ['PATH'], }) +env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':')) +env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE','')) @@ -13,4 +22,75 @@ index 32cb644..0b3a208 100644 + ################################################################################ # Make sure we have these libraries availible - + + if not GetOption('clean'): +- print '--------------------------------------------------------' +- print 'Fluxus: Configuring Build Environment' +- print '--------------------------------------------------------' ++ print('--------------------------------------------------------') ++ print('Fluxus: Configuring Build Environment') ++ print('--------------------------------------------------------') + # detect ode precision + if not GetOption('clean'): + try: +@@ -240,27 +245,27 @@ if not GetOption('clean'): + if isinstance(ode_str[0], str): + env.MergeFlags(ode_str[0]) + except: +- print 'WARNING: unable to run ode-config, cannot detect ODE precision' ++ print('WARNING: unable to run ode-config, cannot detect ODE precision') + + conf = Configure(env) + + # check Racket and OpenAL frameworks on osx + if env['PLATFORM'] == 'darwin': + if not conf.CheckHeader('scheme.h'): +- print "ERROR: 'racket3m' must be installed!" ++ print("ERROR: 'racket3m' must be installed!") + Exit(1) + if racket_framework: + LibList = filter(lambda x: x[0] != 'racket3m', LibList) + # OpenAL should be installed everywhere + if not conf.CheckHeader('OpenAL/al.h'): +- print "ERROR: 'OpenAL' must be installed!" ++ print("ERROR: 'OpenAL' must be installed!") + Exit(1) + + # all libraries are required, and some of them require each other, + # hence the order is important, and autoadd=1 + for (lib,headers) in LibList: + if not conf.CheckLibWithHeader(lib, headers, 'C', autoadd = 1): +- print "ERROR: '%s' must be installed!" % (lib) ++ print("ERROR: '%s' must be installed!" % (lib)) + Exit(1) + + if not conf.CheckFunc("dInitODE2"): +@@ -334,7 +339,7 @@ if not GetOption('clean'): + ]) + + if raco_status != 0: +- print "ERROR: Failed to run command 'raco'" ++ print("ERROR: Failed to run command 'raco'") + Exit(1) + + +@@ -377,8 +382,8 @@ if not GetOption('clean') and static_modules: + + app_env['LIBS'].remove("pthread") + app_env['LIBS'].remove("dl") +- app_env['LIBS'].remove("ode") +- app_env['LIBS'].remove("sndfile") ++ app_env['LIBS'].remove("ode") ++ app_env['LIBS'].remove("sndfile") + + # now go through the rest of the libs, removing them from + # the environment at the same time +@@ -425,7 +430,7 @@ SConscript(dirs = build_dirs, + if not GetOption('clean'): + helpmap_status = subprocess.call(["racket", "makehelpmap.scm"], cwd="docs/helpmap") + if helpmap_status != 0: +- print "ERROR: Failed to build 'docs/helpmap'" ++ print("ERROR: Failed to build 'docs/helpmap'") + Exit(1) + + ################################################################################ |