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
/
inkscape.py
117 lines (112 loc) · 3.65 KB
/
inkscape.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
from gub import build
from gub import context
from gub import misc
from gub import target
class Inkscape (target.AutoBuild):
source = 'svn:https://inkscape.svn.sourceforge.net/svnroot/inkscape&module=inkscape&branch=trunk&revision=22714'
branch = 'trunk'
dependencies = [
'cross/gcc-c++-runtime',
'tools::automake',
'tools::gettext',
'tools::intltool',
'tools::pkg-config',
'boost-devel',
'glibmm-devel',
'gtkmm-devel',
'gtk+-devel',
'gsl-devel',
'lcms-devel',
'poppler-devel',
'popt-devel',
'libgc-devel',
'libpng-devel',
'librsvg-devel',
'libsig++-devel',
'libxml2-devel',
'libxslt-devel',
]
configure_flags = (target.AutoBuild.configure_flags
+ ' --enable-lcms'
+ ' --enable-binreloc=yes'
)
configure_variables = (target.AutoBuild.configure_variables
+ ' CXXFLAGS=-fpermissive'
)
def __init__ (self, settings, source):
target.AutoBuild.__init__ (self, settings, source)
build.add_dict (self,
{'ACLOCAL_FLAGS': ' -I '.join ([''] + self.aclocal_path ()), })
source.is_tracking = misc.bind_method (lambda x: True, source)
def patch (self):
target.AutoBuild.patch (self)
self.file_sub ([('AC_PATH_PROG\(PKG_CONFIG,',
'AC_PATH_PROG(ARE_YOU_FREAKING_MAD__OVERRIDING_PKG_CONFIG,')],
'%(srcdir)s/configure.ac')
class Inkscape__mingw (Inkscape):
parallel_build_broken = True # linking breaks: two simultaneous
# inkscape.exe linking processes!?
patches = [
'inkscape-mingw.patch',
'inkscape-mingw-DATADIR.h.patch',
]
dependencies = [x for x in Inkscape.dependencies
if 'poppler' not in x]
configure_flags = (Inkscape.configure_flags
+ ' --disable-poppler-cairo')
class Inkscape__freebsd (Inkscape):
configure_variables = (Inkscape.configure_variables
+ ' CFLAGS=-pthread'
+ ' CXXFLAGS="-fpermissive -pthread"')
dependencies = Inkscape.dependencies + ['cross/gcc-runtime']
class Inkscape__freebsd__x86 (Inkscape__freebsd):
patches = [
'inkscape-isfinite.patch',
'inkscape-wstring.patch',
#'inkscape-round.patch',
'inkscape-round-2.patch',
]
def patch (self):
Inkscape__freebsd.patch (self)
self.file_sub ([
('wchar_t', 'char'),
('WCHAR_T', 'CHAR'),
],
'%(srcdir)s/src/util/ucompose.hpp')
def configure (self):
Inkscape__freebsd.configure (self)
self.file_sub ([
('(/[*] config.h. Generated)', r'''
#ifndef C99_ROUND
#define C99_ROUND
#ifdef __cplusplus
extern "C" {
#endif
double floor (double);
int sscanf(const char *str, const char *format, ...);
#ifdef __cplusplus
}
#endif
static inline double
round (double x)
{
return (floor (x - 0.5) + 1.0);
}
static inline long long
atoll (char const *s)
{
long long _l = 0LL;
sscanf(s, "%%lld", &_l);
return _l;
}
#define fmin(x,y) (x<y? x : y)
#define fmax(x,y) (x>y? x : y)
#define INFINITY (__builtin_inff())
#endif /* C99_ROUND */
\1'''),],
'%(builddir)s/config.h')
class Inkscape__darwin (Inkscape):
dependencies = [x for x in Inkscape.dependencies
if x.replace ('-devel', '') not in [
'libxml2', # Included in darwin-sdk, hmm?
]]