summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg2theora/patches/patch-SConstruct
blob: dc2c3ad553e88b4021cbc2827defd321e2faf1d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
$NetBSD: patch-SConstruct,v 1.3 2017/10/22 12:59:33 tron Exp $

- Preserve environment
- Fix build with scons 3.0.0 or newer

--- SConstruct.orig	2016-01-10 04:35:56.000000000 +0000
+++ SConstruct	2017-10-22 13:56:55.000000000 +0100
@@ -21,7 +21,7 @@
 try:
     EnsureSConsVersion(*scons_version)
 except TypeError:
-    print 'SCons %d.%d.%d or greater is required, but you have an older version' % scons_version
+    print ('SCons %d.%d.%d or greater is required, but you have an older version' % scons_version)
     Exit(2)
 
 opts = Variables()
@@ -38,7 +38,7 @@
   BoolVariable('libkate', 'enable libkate support', 1),
   BoolVariable('crossmingw', 'Set to 1 for crosscompile with mingw', 0)
 )
-env = Environment(options = opts)
+env = Environment(options = opts, ENV=os.environ)
 Help(opts.GenerateHelpText(env))
 
 pkg_flags="--cflags --libs"
@@ -119,29 +119,29 @@
 if not env.GetOption('clean'):
   pkgconfig_version='0.15.0'
   if not conf.CheckPKGConfig(pkgconfig_version): 
-     print 'pkg-config >= %s not found.' % pkgconfig_version 
+     print ('pkg-config >= %s not found.' % pkgconfig_version)
      Exit(1)
 
   if not conf.CheckPKG("ogg >= 1.1"): 
-    print 'ogg >= 1.1 missing'
+    print ('ogg >= 1.1 missing')
     Exit(1) 
 
   if not conf.CheckPKG("vorbis"): 
-    print 'vorbis missing'
+    print ('vorbis missing')
     Exit(1) 
 
   if not conf.CheckPKG("vorbisenc"): 
-    print 'vorbisenc missing'
+    print ('vorbisenc missing')
     Exit(1) 
 
   if not conf.CheckPKG("theoraenc >= 1.1.0"): 
-    print 'theoraenc >= 1.1.0 missing'
+    print ('theoraenc >= 1.1.0 missing')
     Exit(1) 
 
   XIPH_LIBS="ogg >= 1.1 vorbis vorbisenc theoraenc >= 1.1.0"
 
   if not conf.CheckPKG(XIPH_LIBS): 
-    print 'some xiph libs are missing, ffmpeg2theora depends on %s' % XIPH_LIBS
+    print ('some xiph libs are missing, ffmpeg2theora depends on %s' % XIPH_LIBS)
     Exit(1) 
   ParsePKGConfig(env, XIPH_LIBS)
 
@@ -177,13 +177,13 @@
     FFMPEG_LIBS.append('libavresample')
 
   if not conf.CheckPKG(' '.join(FFMPEG_LIBS)): 
-    print """
+    print ("""
         Could not find %s.
         You can install it via
          sudo apt-get install %s
         or update PKG_CONFIG_PATH to point to ffmpeg's source folder
         or run ./get_ffmpeg.sh (for more information see INSTALL)
-    """ %(" ".join(FFMPEG_LIBS), " ".join(["%s-dev"%l.split()[0] for l in FFMPEG_LIBS]))
+    """ %(" ".join(FFMPEG_LIBS), " ".join(["%s-dev"%l.split()[0] for l in FFMPEG_LIBS])))
     Exit(1) 
 
   for lib in FFMPEG_LIBS:
@@ -204,11 +204,11 @@
       ParsePKGConfig(env, KATE_LIBS)
       env.Append(CCFLAGS=['-DHAVE_KATE', '-DHAVE_OGGKATE'])
     else:
-      print """
+      print ("""
           Could not find libkate. Subtitles support will be disabled.
           You can also run ./get_libkate.sh (for more information see INSTALL)
           or update PKG_CONFIG_PATH to point to libkate's source folder
-      """
+      """)
 
   if conf.CheckCHeader('iconv.h'):
       env.Append(CCFLAGS=[