blob: 3d0eb1dc7613dd7a5c0b2f18aa5da50c22af618d (
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
|
class GlibPackage (GnomePackage):
def __init__ (self):
GnomePackage.__init__ (self,
'glib',
version_major = '2.28',
version_minor = '1')
self.darwin = Package.profile.name == 'darwin'
self.macports_svn = 'http://svn.macports.org/repository/macports/trunk/dports/devel/glib2/files'
if Package.profile.name == 'darwin':
self.sources.extend (['%{macports_svn}/' + s for s in [
'config.h.ed',
'patch-configure.ac.diff',
'patch-glib-2.0.pc.in.diff',
'patch-glib_gunicollate.c.diff',
'patch-gi18n.h.diff',
'patch-gio_xdgmime_xdgmime.c.diff',
'patch-child-test.c.diff'
]])
def prep (self):
Package.prep (self)
if self.darwin:
for p in range (2, len (self.sources)):
self.sh ('patch -p0 < %{sources[' + str (p) + ']}')
def build (self):
if not self.darwin:
Package.build (self)
return
self.sh (
'autoconf',
'%{configure}',
'ed - config.h < %{sources[1]}',
'%{make}'
)
def install (self):
Package.install (self)
if self.darwin:
# FIXME: necessary?
self.sh ('rm %{prefix}/lib/charset.alias')
GlibPackage ()
|