This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
forked from EddyPronk/gub
-
Notifications
You must be signed in to change notification settings - Fork 17
/
glib.py
83 lines (75 loc) · 4.17 KB
/
glib.py
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
from gub import misc
from gub import tools
from gub import target
from gub import w32
class Glib (target.AutoBuild):
## 2.12.4 : see bug http://bugzilla.gnome.org/show_bug.cgi?id=362918
source = 'http://ftp.gnome.org/pub/GNOME/platform/2.22/2.22.0/sources/glib-2.16.1.tar.bz2'
source = 'http://ftp.gnome.org/pub/GNOME/platform/2.25/2.25.5/sources/glib-2.19.5.tar.gz'
def _get_build_dependencies (self):
if 'stat' in misc.librestrict ():
return ['tools::glib', 'gettext-devel', 'libtool']
return ['gettext-devel', 'libtool']
def config_cache_overrides (self, str):
return str + '''
glib_cv_stack_grows=${glib_cv_stack_grows=no}
'''
def update_libtool (self): # linux-x86, linux-ppc, freebsd-x86
target.AutoBuild.update_libtool (self)
#URGME, 2.19.5: relinking libgio is broken, /usr/lib is inserted
'''root/usr/lib/usr/lib -L/usr/lib -lgobject-2.0 -L/home/janneke/vc/gub/target/linux-ppc/install/glib-2.19.5-root/usr/lib/home/janneke/vc/gub/target/linux-ppc/build/glib-2.19.5/gmodule/.libs -lgmodule-2.0 -ldl -lglib-2.0 -Wl,-soname -Wl,libgio-2.0.so.0 -Wl,-version-script -Wl,.libs/libgio-2.0.ver -o .libs/libgio-2.0.so.0.1905.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: skipping incompatible /usr/lib/libgobject-2.0.so when searching for -lgobject-2.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: skipping incompatible /usr/lib/libgobject-2.0.a when searching for -lgobject-2.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: cannot find -lgobject-2.0
collect2: ld returned 1 exit status
libtool: install: error: relink `libgio-2.0.la' with the above command before installing it
make[5]: *** [install-libLTLIBRARIES] Error 1
'''
self.map_locate (w32.libtool_disable_relink, '%(builddir)s', 'libtool')
def install (self):
target.AutoBuild.install (self)
self.system ('rm -f %(install_prefix)s/lib/charset.alias')
class Glib__darwin (Glib):
def configure (self):
Glib.configure (self)
self.file_sub ([('nmedit', '%(target_architecture)s-nmedit')],
'%(builddir)s/libtool')
class Glib__darwin__x86 (Glib__darwin):
source = 'http://ftp.gnome.org/pub/GNOME/platform/2.26/2.26.3/sources/glib-2.20.4.tar.gz'
def compile (self):
self.file_sub ([('(SUBDIRS = .*) tests', r'\1'),
(r'GTESTER = \$.*', ''),
('(am__EXEEXT(_[0-9])? = )gtester.*', r'\1'),
('(am__append(_[0-9])? = )gtester', r'\1')],
'%(builddir)s/glib/Makefile', must_succeed=True)
Glib__darwin.compile (self)
class Glib__mingw (Glib):
source = 'http://ftp.gnome.org/pub/GNOME/platform/2.26/2.26.3/sources/glib-2.20.4.tar.gz'
def _get_build_dependencies (self):
return Glib._get_build_dependencies (self) + ['libiconv-devel']
class Glib__freebsd (Glib):
def _get_build_dependencies (self):
return Glib._get_build_dependencies (self) + ['libiconv-devel']
def configure_command (self):
return Glib.configure_command (self) + ' CFLAGS=-pthread'
class Glib__freebsd__x86 (Glib__freebsd):
def makeflags (self):
# MUST include -pthread in lib flags, because our *most*
# *beloved* libtool (2.2.6a) thinks it knows best and strips
# -pthread if it thinks it's a compile flag.
# FIXME: should add fixup to update_libtool ()
return ' G_THREAD_LIBS=-pthread G_THREAD_LIBS_FOR_GTHREAD=-pthread '
class Glib__linux__64 (Glib):
source = 'http://ftp.gnome.org/pub/GNOME/platform/2.26/2.26.3/sources/glib-2.20.4.tar.gz'
class Glib__tools (tools.AutoBuild, Glib):
def install (self):
tools.AutoBuild.install (self)
self.system ('rm -f %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/lib/charset.alias')
def configure_command (self):
return (tools.AutoBuild.configure_command (self)
+ ''' LDFLAGS='-L%(system_prefix)s/lib %(rpath)s -Wl,-rpath -Wl,%(system_prefix)s/lib' ''')
def _get_build_dependencies (self):
return [
'gettext',
'libtool',
]