Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 364057
Collapse All | Expand All

(-)a/SConstruct (-8 / +10 lines)
Lines 106-111 Link Here
106
vars.AddVariables(
106
vars.AddVariables(
107
	BoolVariable('debug', 'Compile the program with debug information', 0),
107
	BoolVariable('debug', 'Compile the program with debug information', 0),
108
	BoolVariable('release', 'Compile the program with optimizations', 0),
108
	BoolVariable('release', 'Compile the program with optimizations', 0),
109
	BoolVariable('libnotify', 'Enable notifications through libnotify', 1),
109
	BoolVariable('profile', 'Compile the program with profiling information', 0),
110
	BoolVariable('profile', 'Compile the program with profiling information', 0),
110
	PathVariable('PREFIX', 'Compile the program with PREFIX as the root for installation', '/usr/local', PathVariable.PathIsDir),
111
	PathVariable('PREFIX', 'Compile the program with PREFIX as the root for installation', '/usr/local', PathVariable.PathIsDir),
111
	('FAKE_ROOT', 'Make scons install the program under a fake root', '')
112
	('FAKE_ROOT', 'Make scons install the program under a fake root', '')
Lines 263-276 Link Here
263
		conf.env.Append(CPPDEFINES = 'HAVE_IFADDRS_H')
264
		conf.env.Append(CPPDEFINES = 'HAVE_IFADDRS_H')
264
265
265
	# TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies
266
	# TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies
266
	if not conf.CheckPKG('libnotify >= 0.4.1'):
267
	if env.get('libnotify'):
267
		print '\tlibnotify >= 0.4.1 not found, disabling notifications.'
268
		if not conf.CheckPKG('libnotify >= 0.4.1'):
268
		print '\tNote: You might have the lib but not the headers'
269
			print '\tlibnotify >= 0.4.1 not found, disabling notifications.'
269
	else:
270
			print '\tNote: You might have the lib but not the headers'
270
		conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY')
271
		else:
271
		conf.env.ParseConfig('pkg-config --libs libnotify')
272
			conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY')
272
		if conf.CheckPKG('libnotify >= 0.7'):
273
			conf.env.ParseConfig('pkg-config --libs libnotify')
273
			conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7')
274
			if conf.CheckPKG('libnotify >= 0.7'):
275
				conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7')
274
276
275
	conf.CheckBZRRevision()
277
	conf.CheckBZRRevision()

Return to bug 364057