File: linux-settings.py

package info (click to toggle)
yafray 0.0.9+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,856 kB
  • ctags: 4,334
  • sloc: cpp: 26,560; python: 418; makefile: 208; sh: 118
file content (89 lines) | stat: -rw-r--r-- 2,133 bytes parent folder | download | duplicates (3)
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
import shutil
import re
import os
import globalinfo

srcroot = os.getcwd()
prefix = ''

def init(args): 
	global prefix
	prefix = args.get('prefix','/usr/local')

def get_libpath(args): return prefix+"/lib"
def get_pluginpath(args): return prefix+"/lib/yafray"
def get_binpath(args): return prefix+"/bin"
def get_confpath(args): return prefix+"/etc"
def get_cxxflags(args):
	debug=args.get('debug',0)
	arch=args.get('arch','')
	tune=args.get('tune','')
	flags='-Wall -DHAVE_CONFIG_H -D_PTHREADS'
	if debug:
		flags+=' -O3 -ffast-math -ggdb'
	else:
		flags+=' -O3 -ffast-math -fomit-frame-pointer'
	if arch!='':
		flags+=' -march='+arch
	if tune!='':
		flags+=' -mtune='+tune
	return flags

class exr(globalinfo.library):
	PATH = '/usr'
	C_ID = 'EXR'
	def present(args):
		exr.PATH = args.get('exr_path','/usr')
		if exr.PATH != None and os.path.exists(exr.PATH + "/include/OpenEXR/half.h"):
			return True
		else:
			return False
		
	def get_include(args): return [ exr.PATH + "/include/OpenEXR" ]
	def get_libpath(args): return [ exr.PATH + "/lib" ]
	def get_libs(args): return ['IlmImf', 'Imath', 'Iex', 'Half']

class jpeg(globalinfo.library):
	C_ID = 'JPEG'

	def present(args): return os.path.exists("/usr/include/jpeglib.h")
	def get_include(args): return []
	def get_libpath(args): return []
	def get_libs(args): return ['jpeg']

class pthread(globalinfo.library):
	C_ID = 'PTHREAD'

	def present(args): return True
	def get_include(args): return []
	def get_libpath(args): return []
	def get_libs(args): return ['pthread']

class zlib(globalinfo.library):
	C_ID = 'ZLIB'

	def present(args): return True
	def get_include(args): return []
	def get_libpath(args): return []
	def get_libs(args): return ['z']

class dynload(globalinfo.library):
	C_ID = 'DL'

	def present(args): return True
	def get_include(args): return []
	def get_libpath(args): return []
	def get_libs(args): return ['dl']

def derive_shared_env(common_env):
	return common_env.Copy()

def derive_plugin_env(common_env):
	return common_env.Copy()

def derive_program_env(common_env):
	return common_env.Copy()

def package_rule(args):
	return (None, None)