-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-lx.xml
590 lines (498 loc) · 20 KB
/
build-lx.xml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
<!--
* Inkscape build file.
*
* See buildtool.cpp for use.
*
* Authors:
* Bob Jamison
* Others
*
* Copyright (C) 2006-2008 Inkscape.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<!--
########################################################################
## P R O J E C T : I N K S C A P E
########################################################################
-->
<project name="Inkscape" default="dist" basedir=".">
<description>
Build file for the Inkscape SVG editor. This version
is configured for Unix/Linux, but hopefully we can merge
in the future.
</description>
<!-- set global properties for this build -->
<property name="version" value="0.92pre1"/>
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="build" location="build"/>
<property name="dist" location="inkscape"/>
<!-- Use these settings for Unix -->
<!-- -->
<property name="arch" value=""/>
<property name="archutil" value=""/>
<property name="devlibs" location="/usr"/>
<property name="datadir" location="${dist}/share"/>
<!-- -->
<!-- Use these settings for the MinGW native compiler -->
<!--
<property name="arch" value="mingw32-"/>
<property name="archutil" value=""/>
<property name="devlibs" location="c:/devlibs"/>
-->
<!-- Use these settings for the MinGW cross compiler -->
<!--
<property name="arch" value="i686-pc-mingw32-"/>
<property name="archutil" value="${arch}"/>
<property name="gtk" location="/target"/>
-->
<!-- Extra properties -->
<property name="refresh" value="false"/>
<!--
This is for package-config. With these two settings, pkg-config
queries can be as simple as ${pcc.packageName} for cflags, and
${pcl.packageName} for libs. Dependencies are calculated automatically.
-->
<property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
<property name="pkg-config-prefix" location="${devlibs}"/>
<!--
########################################################################
## T A R G E T : I N I T
########################################################################
-->
<target name="init"
description=
"Do all preparatory tasks, like make directories and copy files">
<mkdir dir="${build}"/>
<mkdir dir="${build}/java"/>
<mkdir dir="${build}/java/classes"/>
<mkdir dir="${build}/java/lib"/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<copy file="${src}/helper/sp-marshal.h.mingw"
tofile="${src}/helper/sp-marshal.h"/>
<copy file="${src}/helper/sp-marshal.cpp.mingw"
tofile="${src}/helper/sp-marshal.cpp"/>
<makefile file="inkscape_version.h">
#define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
</makefile>
<makefile file="config.h">
#ifndef _CONFIG_H_
#define _CONFIG_H_
/*######################################
## This is for require-config.h, whose
## purpose I cannot fathom.
######################################*/
#define PACKAGE_TARNAME
/*######################################
#### RESOURCE DIRECTORIES
######################################*/
#define INKSCAPE_DATADIR "."
#define PACKAGE_LOCALE_DIR "locale"
/*######################################
#### OTHER DEFINITIONS
######################################*/
#define GETTEXT_PACKAGE "inkscape"
#define PACKAGE_STRING VERSION
#define HAVE_GETOPT_H 1
#define HAVE_STRING_H 1
#define HAVE_LIBINTL_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_ZLIB_H 1
#define ENABLE_LCMS 1
#define WITH_GTKMM_2_24 1
#define ENABLE_NLS 1
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
/* make us relocatable */
#define BR_PTHREADS 1
#define ENABLE_BINRELOC 1
/* CairoPDF options */
#define HAVE_CAIRO_PDF 1
#define PANGO_ENABLE_ENGINE 1
#define RENDER_WITH_PANGO_CAIRO 1
#define HAVE_GTK_WINDOW_FULLSCREEN 1
/* internal interpreter */
#define WITH_PYTHON 1
/* use poppler for pdf import? */
#define HAVE_POPPLER 1
#define HAVE_POPPLER_CAIRO 1
/* do we want bitmap manipulation? */
#define WITH_IMAGE_MAGICK 1
/* Allow reading WordPerfect? */
#define WITH_LIBWPG 1
/* Default to libwpg 0.1.x */
#define WITH_LIBWPG01 1
#endif /* _CONFIG_H_ */
</makefile>
</target>
<!--
########################################################################
## T A R G E T : T O U C H A B O U T
########################################################################
-->
<target name="touchabout"
description="update the modification time of aboutbox.cpp">
<!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
<!-- better -->
<delete file="${build}/obj/ui/dialog/aboutbox.o"/>
<delete file="inkscape_version.h"/>
</target>
<!--
########################################################################
## T A R G E T : C O M P I L E
########################################################################
-->
<target name="compile" depends="init"
description="compile the source to .o" >
<!-- Compile from source to build -->
<cc cc="${arch}gcc" cxx="${arch}g++"
destdir="${build}/obj"
continueOnError="false"
refreshCache="${refresh}">
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="2geom/chebyshev.cpp"/>
<exclude name="ast/.*"/>
<exclude name="bonobo/.*"/>
<exclude name="deptool.cpp"/>
<exclude name="test-all.cpp"/>
<exclude name="display/testnr.cpp"/>
<exclude name="display/bezier-utils-test.cpp"/>
<exclude name="extension/api.cpp"/>
<exclude name="extension/dxf2svg/.*"/>
<exclude name="extension/implementation/plugin.cpp"/>
<exclude name="extension/script/bindtest.cpp"/>
<exclude name="extension/script/cpptest.cpp"/>
<exclude name="extension/plugin/.*"/>
<exclude name="extract-uri-test.cpp"/>
<exclude name="helper/units-test.cpp"/>
<!-- exclude name="inkview.cpp"/-->
<exclude name="libnr/test-nr.cpp"/>
<exclude name="libnr/test-nr-main.cpp"/>
<exclude name="libnr/testnr.cpp"/>
<exclude name="libnr/in-svg-plane-test.cpp"/>
<exclude name="libnr/nr-compose-reference.cpp"/>
<exclude name="libnr/nr-compose-test.cpp"/>
<exclude name="libnr/nr-matrix-test.cpp"/>
<exclude name="libnr/nr-point-fns-test.cpp"/>
<exclude name="libnr/nr-rotate-fns-test.cpp"/>
<exclude name="libnr/nr-rotate-test.cpp"/>
<exclude name="libnr/nr-scale-test.cpp"/>
<exclude name="libnr/nr-translate-test.cpp"/>
<exclude name="libnr/nr-types-test.cpp"/>
<exclude name="livarot/Path-test.cpp"/>
<exclude name="mod360-test.cpp"/>
<exclude name="trace/potrace/potest.cpp"/>
<exclude name="round-test.cpp"/>
<exclude name="sp-gradient-test.cpp"/>
<exclude name="svg/ftos.cpp"/>
<exclude name="svg/test-svg.cpp"/>
<exclude name="svg/test-svg-main.cpp"/>
<exclude name="widgets/test-widgets.cpp"/>
<exclude name="xml/quote-test.cpp"/>
<exclude name="xml/repr-action-test.cpp"/>
<exclude name="xml/test-xml.cpp"/>
<exclude name="xml/test-xml-main.cpp"/>
<exclude name="io/streamtest.cpp"/>
<!--OVERLAP-->
<exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
<exclude name="removeoverlap/placement_SolveVPSC.h"/>
<exclude name="removeoverlap/test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
<!--WIN32 -->
<exclude name="registrytool.cpp"/>
<exclude name="extension/internal/win32.cpp"/>
<exclude name="libgdl/gdl-win32.c"/>
</fileset>
<excludeinc dir="${src}">
<file name="extension/param"/>
</excludeinc>
<flags>
-Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
-O2
</flags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
-D_INTL_REDIRECT_INLINE
-DHAVE_SSL
-DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
</defines>
<includes>
-I${devlibs}/include
<!-- GTK / GTKMM -->
${pcc.gtkmm-2.4}
<!-- OTHER -->
${pcc.libxslt}
${pcc.freetype2}
${pcc.cairo}
${pcc.poppler}
-I${devlibs}/include/gc
${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
<!-- PYTHON -->
-I${devlibs}/python/include
<!-- JAVA -->
-I${src}/bind/javainc -I${src}/bind/javainc/linux
</includes>
</cc>
</target>
<!--
########################################################################
## T A R G E T : L I B
########################################################################
-->
<target name="lib" depends="compile"
description="create a static library">
<staticlib command="${archutil}ar crsv"
file="${build}/libinkscape.a">
<fileset dir="${build}/obj">
<exclude name="main.o"/>
<exclude name="winmain.o"/>
<exclude name="inkview.o"/>
</fileset>
</staticlib>
</target>
<!--
########################################################################
## T A R G E T : I 1 8 N
########################################################################
-->
<target name="i18n" depends="compile"
description="compile gettext .po files to .mo">
<msgfmt todir="${build}/locale" owndir="true"
out="LC_MESSAGES/inkscape.mo">
<fileset dir="po">
</fileset>
</msgfmt>
</target>
<!--
########################################################################
## T A R G E T : L I N K
########################################################################
-->
<target name="link" depends="lib"
description="link objects and library to create executable">
<link command="${arch}g++" out="${build}/inkscape"
strip="true" symfile="${build}/inkscape.dbg"
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
<flags>
</flags>
<fileset dir="${build}">
<include name="obj/main.o"/>
<include name="libinkscape.a"/>
</fileset>
<libs>
-L${devlibs}/lib
${pcl.poppler} ${pcl.poppler-cairo} ${pcl.poppler-glib}
${pcl.gtkmm-2.4}
${pcl.cairo} ${pcl.cairomm-1.0}
${pcl.gthread-2.0}
${pcl.libxslt}
${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
${pcl.ImageMagick++}
${pcl.fontconfig} ${pcl.freetype2}
${pcl.lcms}
${pcl.gsl}
-lssl -lcrypto
-lpng -ljpeg -ltiff -lpopt -lz
-lgc -lm
</libs>
</link>
</target>
<!--
########################################################################
## T A R G E T : L I N K I N K V I E W
########################################################################
-->
<target name="linkinkview" depends="lib"
description="link objects and library to create Inkview executable">
<link command="${arch}g++" out="${build}/inkview"
strip="true" symfile="${build}/inkview.dbg"
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
<flags>
</flags>
<fileset dir="${build}">
<include name="obj/inkview.o"/>
<include name="libinkscape.a"/>
</fileset>
<libs>
-L${devlibs}/lib
${pcl.poppler}
${pcl.gtkmm-2.4}
${pcl.cairo} ${pcl.cairomm-1.0}
<!-- PERL -->
-L${devlibs}/perl/lib/CORE -lperl58
<!-- PYTHON -->
-L${devlibs}/python/libs -lpython25
-lxml2 -lxslt
-lwpg-0.1 -lwpg-stream-0.1
${pcl.ImageMagick++}
${pcl.fontconfig} ${pcl.freetype2}
${pcl.lcms}
-lssl -lcrypto
-lpng -ljpeg -ltiff -lpopt -lz
-lgc
-lintl -liconv -lm
</libs>
</link>
</target>
<!--
########################################################################
## T A R G E T : D I S T
########################################################################
-->
<target name="dist" depends="link,i18n"
description="generate the distribution directory with all needed files">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/bin"/>
<mkdir dir="${dist}/lib"/>
<!-- Copy Inkscape files -->
<copy file="${build}/inkscape" todir="${dist}/bin"/>
<copy file="${build}/inkscape.dbg" todir="${dist}/bin"/>
<copy file="AUTHORS" todir="${dist}"/>
<copy file="COPYING" todir="${dist}"/>
<copy file="GPL2.txt" todir="${dist}"/>
<copy file="GPL3.txt" todir="${dist}"/>
<copy file="LGPL2.1.txt" todir="${dist}"/>
<copy file="NEWS" todir="${dist}"/>
<copy file="README" todir="${dist}"/>
<copy file="TRANSLATORS" todir="${dist}"/>
<copy todir="${datadir}/inkscape">
<fileset dir="share/attributes"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/clipart"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/examples"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/extensions"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/fonts"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/gradients"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/icons"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/keys"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/markers"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/palettes"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/patterns"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/screens"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/symbols"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/templates"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/tutorials"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}/inkscape">
<fileset dir="share/ui"> <exclude name=".*\.am"/> </fileset>
</copy>
<copy todir="${datadir}">
<fileset dir="${build}/locale"> <exclude name=".*\.am"/> </fileset>
</copy>
<!-- Copy devlibs files -->
</target>
<!--
########################################################################
## T A R G E T : JAVAC
########################################################################
-->
<target name="javac" depends="init"
description="compile java binding classes">
<javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
</target>
<!--
########################################################################
## T A R G E T : JAR
########################################################################
-->
<target name="jar" depends="javac"
description="pack java classes and resources into a jar file">
<copy todir="${build}/java/classes"> <fileset dir="bind/data"/></copy>
<jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
</target>
<!--
########################################################################
## T A R G E T : BINDDIST
########################################################################
-->
<target name="binddist" depends="jar"
description="pack java classes and resources into a jar file">
<copy todir="${datadir}/inkscape/bind"> <fileset dir="bind/java"/> </copy>
<copy todir="${datadir}/inkscape/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
</target>
<!--
########################################################################
## T A R G E T : BINDCLEAN
########################################################################
-->
<target name="bindclean" depends=""
description="clean up java binding classes">
<delete dir="${build}/java"/>
</target>
<!--
########################################################################
## T A R G E T : D I S T - A L L
########################################################################
-->
<target name="dist-all" depends="dist"
description="generate the distribution, along with inkview" >
<copy file="${build}/inkview" todir="${dist}/bin"/>
<copy file="${build}/inkview.dbg" todir="${dist}/bin"/>
</target>
<!--
########################################################################
## T A R G E T : C L E A N
########################################################################
-->
<target name="clean" depends="bindclean"
description="clean up. deleting build and distro dirs" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete file="build.dep"/>
<delete file="config.h"/>
<delete file="inkscape_version.h"/>
</target>
</project>
<!--
########################################################################
## E N D
########################################################################
-->