|
|
@ -89,7 +89,7 @@ opt_split = 1
|
|
|
|
opt_releasegil = 0
|
|
|
|
opt_releasegil = 0
|
|
|
|
opt_tracing = 0
|
|
|
|
opt_tracing = 0
|
|
|
|
opt_static = 0
|
|
|
|
opt_static = 0
|
|
|
|
opt_kdebasedir = None
|
|
|
|
opt_tdebasedir = None
|
|
|
|
opt_kdelibdir = None
|
|
|
|
opt_kdelibdir = None
|
|
|
|
opt_kdeincdir = None
|
|
|
|
opt_kdeincdir = None
|
|
|
|
opt_dep_warnings = 0
|
|
|
|
opt_dep_warnings = 0
|
|
|
@ -270,7 +270,7 @@ def inform_user(stage):
|
|
|
|
print
|
|
|
|
print
|
|
|
|
|
|
|
|
|
|
|
|
elif stage == 1:
|
|
|
|
elif stage == 1:
|
|
|
|
sipconfig.inform ("KDE base directory is %s" % opt_kdebasedir)
|
|
|
|
sipconfig.inform ("KDE base directory is %s" % opt_tdebasedir)
|
|
|
|
sipconfig.inform ("KDE include directory is %s" % opt_kdeincdir)
|
|
|
|
sipconfig.inform ("KDE include directory is %s" % opt_kdeincdir)
|
|
|
|
sipconfig.inform ("KDE lib directory is %s" % opt_kdelibdir)
|
|
|
|
sipconfig.inform ("KDE lib directory is %s" % opt_kdelibdir)
|
|
|
|
sipconfig.inform ("lib directory is %s" % opt_libdir)
|
|
|
|
sipconfig.inform ("lib directory is %s" % opt_libdir)
|
|
|
@ -306,7 +306,7 @@ def create_config(module, template):
|
|
|
|
"pykde_sip_dir": opt_pykdesipdir,
|
|
|
|
"pykde_sip_dir": opt_pykdesipdir,
|
|
|
|
"pykde_modules": pykde_modules,
|
|
|
|
"pykde_modules": pykde_modules,
|
|
|
|
"pykde_kde_sip_flags": kde_sip_flags,
|
|
|
|
"pykde_kde_sip_flags": kde_sip_flags,
|
|
|
|
"kdebasedir": opt_kdebasedir,
|
|
|
|
"tdebasedir": opt_tdebasedir,
|
|
|
|
"kdelibdir": opt_kdelibdir,
|
|
|
|
"kdelibdir": opt_kdelibdir,
|
|
|
|
"libdir": opt_libdir,
|
|
|
|
"libdir": opt_libdir,
|
|
|
|
"kdeincdir": opt_kdeincdir,
|
|
|
|
"kdeincdir": opt_kdeincdir,
|
|
|
@ -387,9 +387,9 @@ def search (target, searchPath):
|
|
|
|
return path
|
|
|
|
return path
|
|
|
|
|
|
|
|
|
|
|
|
def discoverKDE3 ():
|
|
|
|
def discoverKDE3 ():
|
|
|
|
global opt_kdeincdir, opt_kdebasedir, opt_kdelibdir, opt_libdir
|
|
|
|
global opt_kdeincdir, opt_tdebasedir, opt_kdelibdir, opt_libdir
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdebasedir:
|
|
|
|
if not opt_tdebasedir:
|
|
|
|
kdeSearchPaths = []
|
|
|
|
kdeSearchPaths = []
|
|
|
|
libSearchPaths = []
|
|
|
|
libSearchPaths = []
|
|
|
|
incSearchPaths = []
|
|
|
|
incSearchPaths = []
|
|
|
@ -401,16 +401,16 @@ def discoverKDE3 ():
|
|
|
|
kdeSearchPaths.append (os.path.join ("/opt", "trinity"))
|
|
|
|
kdeSearchPaths.append (os.path.join ("/opt", "trinity"))
|
|
|
|
kdeSearchPaths.append ("/usr")
|
|
|
|
kdeSearchPaths.append ("/usr")
|
|
|
|
|
|
|
|
|
|
|
|
opt_kdebasedir = search (None, kdeSearchPaths)
|
|
|
|
opt_tdebasedir = search (None, kdeSearchPaths)
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdelibdir:
|
|
|
|
if not opt_kdelibdir:
|
|
|
|
libSearchPaths = [os.path.join (opt_kdebasedir, "lib"), os.path.join (opt_kdebasedir, "lib64"), os.path.join (opt_kdebasedir, opt_libdir)]
|
|
|
|
libSearchPaths = [os.path.join (opt_tdebasedir, "lib"), os.path.join (opt_tdebasedir, "lib64"), os.path.join (opt_tdebasedir, opt_libdir)]
|
|
|
|
# print opt_libdir
|
|
|
|
# print opt_libdir
|
|
|
|
opt_kdelibdir = search ("libtdecore.so", libSearchPaths)
|
|
|
|
opt_kdelibdir = search ("libtdecore.so", libSearchPaths)
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdeincdir:
|
|
|
|
if not opt_kdeincdir:
|
|
|
|
incSearchPaths = [os.path.join (opt_kdebasedir, "include")]
|
|
|
|
incSearchPaths = [os.path.join (opt_tdebasedir, "include")]
|
|
|
|
incSearchPaths.append (os.path.join (opt_kdebasedir, "include", "kde")) # Red Hat
|
|
|
|
incSearchPaths.append (os.path.join (opt_tdebasedir, "include", "kde")) # Red Hat
|
|
|
|
opt_kdeincdir = search ("kapplication.h", incSearchPaths)
|
|
|
|
opt_kdeincdir = search ("kapplication.h", incSearchPaths)
|
|
|
|
|
|
|
|
|
|
|
|
def check_kde_installation():
|
|
|
|
def check_kde_installation():
|
|
|
@ -421,24 +421,24 @@ def check_kde_installation():
|
|
|
|
|
|
|
|
|
|
|
|
discoverKDE3 ()
|
|
|
|
discoverKDE3 ()
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdebasedir:
|
|
|
|
if not opt_tdebasedir:
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 base directory")
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 base directory")
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdeincdir:
|
|
|
|
if not opt_kdeincdir:
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 include directory (%s is KDE base)" % opt_kdebasedir)
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 include directory (%s is KDE base)" % opt_tdebasedir)
|
|
|
|
|
|
|
|
|
|
|
|
if not opt_kdelibdir:
|
|
|
|
if not opt_kdelibdir:
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 lib directory (%s is KDE base)" % opt_kdebasedir)
|
|
|
|
sipconfig.error ("Couldn't locate KDE3 lib directory (%s is KDE base)" % opt_tdebasedir)
|
|
|
|
|
|
|
|
|
|
|
|
kdeversion_h = os.path.join(opt_kdeincdir, "kdeversion.h")
|
|
|
|
tdeversion_h = os.path.join(opt_kdeincdir, "tdeversion.h")
|
|
|
|
|
|
|
|
|
|
|
|
inform_user (1)
|
|
|
|
inform_user (1)
|
|
|
|
|
|
|
|
|
|
|
|
if not os.access(kdeversion_h, os.F_OK):
|
|
|
|
if not os.access(tdeversion_h, os.F_OK):
|
|
|
|
sipconfig.error("kdeversion.h could not be found in %s." % opt_kdeincdir)
|
|
|
|
sipconfig.error("tdeversion.h could not be found in %s." % opt_kdeincdir)
|
|
|
|
|
|
|
|
|
|
|
|
# Get the KDE version number.
|
|
|
|
# Get the KDE version number.
|
|
|
|
getKDEVersion(kdeversion_h)
|
|
|
|
getKDEVersion(tdeversion_h)
|
|
|
|
|
|
|
|
|
|
|
|
inform_user (2)
|
|
|
|
inform_user (2)
|
|
|
|
|
|
|
|
|
|
|
@ -827,7 +827,7 @@ def main(argv):
|
|
|
|
global opt_debug, opt_concat, opt_releasegil
|
|
|
|
global opt_debug, opt_concat, opt_releasegil
|
|
|
|
global opt_split, opt_tracing, opt_startModName
|
|
|
|
global opt_split, opt_tracing, opt_startModName
|
|
|
|
global opt_startmod, opt_endmod
|
|
|
|
global opt_startmod, opt_endmod
|
|
|
|
global opt_kdebasedir, opt_kdelibdir, opt_kdeincdir, opt_libdir
|
|
|
|
global opt_tdebasedir, opt_kdelibdir, opt_kdeincdir, opt_libdir
|
|
|
|
global pykde_modules, opt_dep_warnings, opt_dist_name
|
|
|
|
global pykde_modules, opt_dep_warnings, opt_dist_name
|
|
|
|
global pykde_imports, kde_includes
|
|
|
|
global pykde_imports, kde_includes
|
|
|
|
|
|
|
|
|
|
|
@ -866,7 +866,7 @@ def main(argv):
|
|
|
|
usage()
|
|
|
|
usage()
|
|
|
|
|
|
|
|
|
|
|
|
elif opt == "-k":
|
|
|
|
elif opt == "-k":
|
|
|
|
opt_kdebasedir = arg
|
|
|
|
opt_tdebasedir = arg
|
|
|
|
|
|
|
|
|
|
|
|
elif opt == "-L":
|
|
|
|
elif opt == "-L":
|
|
|
|
opt_libdir = arg
|
|
|
|
opt_libdir = arg
|
|
|
|