-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvagga.yaml
1409 lines (1063 loc) · 45.1 KB
/
vagga.yaml
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
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Vagga script to build latest GIMP (2.99)
# Requirements of the host machine:
# vagga installed (see web)
# uidmap installed
# >sudo apt-get install uidmap
# a chain of containers, to minimize rebuilding as changes are made.
# Each container depends on previous as specified by "!Container foo"
# Goal or current design of this script:
# 1) use latest packaged dependencies (e.g. glib) from the distribution of the container
# 2) build artifacts: babl, gegl, gimp
# 3) install build artifacts in the usual place (don't worry about polluting the container)
# i.e. not define any special GIMP_PREFIX
containers:
# basic OS with dev (compiling)
baseOS:
setup:
# 18.10- !Ubuntu cosmic
# 19.04- !Ubuntu disco
# 19.10- !Ubuntu eoan
# 20.4 LTS- !Ubuntu focal
# June 16, 2020 focal fails at dbus_cil package from glib2_test package
# 20.10- !Ubuntu groovy
# 21.04- !Ubuntu hirsute
# 21.10- !Ubuntu impish
- !Ubuntu jammy
# enable universe repository (where gimp lives)
- !UbuntuUniverse
# tools for dev (C compiler)
- !Install [build-essential]
- !Install [gdb]
# with required build tools
# Some tools are for optional build: meson, clang
baseWithTools:
setup:
- !Container baseOS
# GIMP build needs setuptools
- !Install [python3-setuptools]
# meson is a python3 app
# Install packaged version, which might be too old.
# Alternatively, get latest using pip
#- !Sh pip3 install meson
- !Install [meson]
# clang versus gcc
- !Install [clang]
# gnu ld vs llvm's lld (installs as ld.lld)
- !Install [lld]
# meson and autotools use pkg-config
- !Install [pkg-config]
# meson.build calls git
- !Install [git]
# meson will use cmake if available?
- !Install [cmake]
# build uses gobject introspection tools
- !Install [gobject-introspection]
# more tools
- !Install [ xsltproc]
# tool to build API docs
- !Install [gtk-doc-tools]
# specific to autotools build
- !Install [libtool]
# in8n internationalization
- !Install [intltool]
# build scripts call git and test to establish version
- !Sh which git
- !Sh which test
# with libraries required by gegl, babl, gimp (and other things we build)
# these are package names, might depend on distribution
# e.g. package names are different in alpine
gimpDeps:
setup:
- !Container baseWithTools
# babl, gegl, GIMP uses glib group of libraries
# package comprises glib, gobject, and gio
# Oct. 2020: fails for [glib2.0] with MONO exception. Use -dev
- !Install [glib2.0-dev]
# To debug glib, get debug symbols
# First, the repo for debug symbols
#- !UbuntuRepo
# url: http://ddebs.ubuntu.com
# suite: groovy
# components: [universe]
# Next a key
#- !AptTrust keys: [C8CAB6595FDFF622]
# Tried glib2.0- dbg, dbgsym, dbgsym.ddeb
# Tried libglib2.0- dbg
# Tried universe
#- !Install [libglib2.0-dbgsym]
# the builds deposit introspection data
# If omit, get can't find ...gir... when building gegl
- !Install [libgirepository1.0-dev]
# babl specific
# links against lcms2 (lite color mgt system) library, need the dev flavor
- !Install [liblcms2-dev]
# gegl specific
# depends on babl (which we build), and these libraries from packages
- !Install [libjson-glib-dev]
# gimp specific
# Somewhat in reverse order of complain by build
# interpreters
# Python3 PyGObject. See earlier, installed Python3
- !Install [ python3-gi]
# lua
- !Install [ luajit]
- !Install [ lua-lgi ]
# javascript
- !Install [ gjs]
# plugins, mainly file format plugins?
# JPEG format
- !Install [ libjpeg-dev]
# TIFF format
- !Install [ libtiff-dev]
# PDF format
- !Install [ libpoppler-glib-dev]
- !Install [ poppler-data]
# file compressors
- !Install [ liblzma-dev]
- !Install [ libbz2-dev]
# ???
- !Install [ libxmu-dev]
- !Install [ libappstream-glib-dev]
- !Install [ librsvg2-dev]
# mypaint
- !Install [ mypaint-brushes]
- !Install [ libmypaint-dev]
# accessibility toolkit
- !Install [ libatk1.0-dev]
#image metadata
- !Install [ libgexiv2-dev]
# graphics toolkit: GTK and GDK
- !Install [ libgtk-3-dev]
# gtk-encode-symbolic-svg
# To search installed packages: dpkg -S gtk-encode-symbolic-svg
# To search Ubuntu in browser "Ubuntu Packages Search"
# Prior to Ubuntu 20.04: - !Install [ gtk-3-examples]
- !Install [libgtk-3-bin]
# ?
- !Install [ libgdk-pixbuf2.0-dev]
# renderers
- !Install [ libpango1.0-dev]
- !Install [ libcairo2-dev]
# optional but suppress warnings
- !Install [ libcanberra-gtk3-module ]
# optional for browsing API docs
- !Install [ yelp ]
# Ubuntu requires this else Gimp..Gtk crashes with: Icon 'image-missing' not present in theme Symbolic
- !Install [ gnome-icon-theme ]
# Since 2.99.2, Gimp requires vala compiler
- !Install [ valac ]
# avoid dbus error messages from gimp
- !Install [ dbus-x11 ]
# Needed for meson, clang build
- !Install [ libomp-dev ]
# Below not required by gimp, just required by my dev
# to run gimp in dbg in a gnome-terminal
- !Install [ gnome-terminal ]
# some my vagga commands want wget
- !Install [wget]
# gimp tests want x11 virtual frame buffer
- !Install [xvfb]
# New require for Gimp gettext stuff, June 2022
- !Install [ autopoint ]
# remove DNS file that vagga will recreate after build
# !!! You must do this last, and not at the beginning of a container build
- !Sh "rm /etc/resolv.conf"
# Larger /tmp for testing
# 100Mi is default, not enough to create many image files
volumes:
/tmp: !Tmpfs { size: 500Mi, mode: 0o1777 }
environ:
HOME: /work/.home
# with babl, gegl source
# gimp requires latest babl, gegl, so we build instead of install
# These are relatively stable compared to gimp source
gimpDepsSource:
setup:
- !Container gimpDeps
# This causes build to fail, can't find git_version.h because this gets only the files, not .git
#- !Git
# url: https://gitlab.gnome.org/GNOME/babl.git
# path: /home/babl
# OR use git to clone the repository
- !Sh |
git clone https://gitlab.gnome.org/GNOME/babl.git /home/babl
# OR most most recent GIMP release archive
# 1.72=>1.74=>1.78=>1.84=>1.86
# When you change this, also change below the cd
#- !Tar
# url: https://download.gimp.org/pub/babl/0.1/babl-0.1.86.tar.xz
# path: /home
# PR get tarball from babl project, the very latest i.e. master
# Fail with "unexpected compression" https://gitlab.gnome.org/GNOME/babl/repository/archive.tar.gz
# Get a specific sha i.e. commit sha256: 69e6b09067f2bbca7ac0dfda0131042d7d1f448c
#- !Tar
# url: https://gitlab.gnome.org/GNOME/babl/master/archive.tar.gz
# path: /home
#- !Git
# url: https://gitlab.gnome.org/GNOME/babl
# path: /home/babl
# revision: 69e6b090
# Gimp depends on latest gegl which might not be released by gegl.org
# i.e. get from gimp.org OR get from gegl.org
# !!! If you change this, also change below the cd to the gegl dir, named differently
# Get from gimp.org
#- !Tar
# url: https://download.gimp.org/pub/gegl/0.4/gegl-0.4.18.tar.xz
# url: https://download.gimp.org/pub/gegl/0.4/gegl-0.4.24.tar.xz
# path: /home
# Get latest, bleeding, from shared, bare repository at gegl.org
# !!! Must specify a revision, else vagga will, the first time get the latest
# !!! and subsequently cache it indefinitely. See vagga docs.
# !!! But you can't get the latest revision until it is released.
# So delete contents of the cache ~/.cache/vagga/cache when gegl changes
# Or delete the directory ...cache/git
# Or specify the revision that GIMP wants
# Fail: revision: 4.27
# Only a specific commit seems to work, look it up at gitlab gegl
- !Sh |
echo "about to git gegl"
# Fails on SSL certificate expired
# 0.4.34
#- !Git
# url: https://gitlab.gnome.org/GNOME/gegl
# path: /home/gegl
# revision: 9aaf6b35
# 0.4.?? revision: 63b8e5f9
- !Sh |
git clone https://gitlab.gnome.org/GNOME/gegl.git /home/gegl
# starting about Dec. 2021, require gexiv2 > 12.2 which is not present in Ubuntu
- !Sh |
git clone https://gitlab.gnome.org/GNOME/gexiv2.git /home/gexiv2
# With built babl, gegl, gexiv2
bablGeglDev:
setup:
- !Container gimpDepsSource
# Build (from source) certain prereqs of gimp: babl, gegl
# We don't set GIMP_PREFIX. Instead we install to default place.
# If Debian, need the architecture label
# TODO not working, see below, hardcoded
- !Sh echo "Determine architecture"
- !Sh dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null
- !Env
MY_ARCH: dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null
- !Sh echo $MY_ARCH
# Used by GIMP build to detect the build dependencies
# E.G. gegl depends on babl installed and uses pkgconfig to find it
# This has Debian path prepended
# TODO "${GIMP_PREFIX}/lib/${MY_ARCH}/pkgconfig:${GIMP_PREFIX}/lib/pkgconfig:${GIMP_PREFIX}/share/pkgconfig"
#- !Env
# PKG_CONFIG_PATH: "/home/lib/x86_64-linux-gnu/pkgconfig:/home/lib/pkgconfig:/home/share/pkgconfig"
- !Sh echo $PKG_CONFIG_PATH
# Note babl and gegl build the same
# WAS: cd /home/babl-0.1.86
# Failed attempt to create missing file
#- !GitDescribe
# repo: /home/babl
# output-file: /git-version.h
# Interferes with gegl build
# -Db_sanitize=address,undefined \
# -Db_lto=true
- !Sh |
cd /home/babl
meson _build \
--buildtype=debug \
-Dwith-docs=false
cd _build
ninja
ninja install
# Partial check of installed artifacts, installed in default location
#- !Sh test -d /usr/local/share/gir-1.0/babl/Babl-0.1.gir
# build gegl
# When it builds, it lists options that will be built, according to installed libraries it finds
# e.g. won't build umfpack if libumfpack5 is not installed
# Then at GIMP runtime, it may complain of missing GEGL ops
# Used to find the glib-introspection dependencies.
# gegl builds its introspection data.
# To do so, it must find Babl-0.1.gir
# was XDG_DATA_DIRS: "/home/share:/usr/share:$XDG_DATA_DIRS"
# was XDG_DATA_DIRS: "/usr/local/shared"
- !Env
XDG_DATA_DIRS: "/usr/local/share:/usr/share"
- !Sh echo ">>>>>> XDG_DATA_DIRS" $XDG_DATA_DIRS
# !!! Not using --prefix=${GIMP_PREFIX} \
# Use cd /home/gegl-0.4.xx for a tar pull
# Use cd /home/gegl for a git pull
# May 2021 add sanitize, release=>debug. Does not affect AM build
# but prevents meson build of GIMP, fails at GIR generation
# -Db_sanitize=address,undefined \
# -Dintrospection=false \
# -Db_lto=true
#
- !Sh |
cd /home/gegl
meson _build \
--buildtype=debug \
-Ddocs=false \
-Dgtk-doc=false
cd _build
ninja
ninja install
#
- !Sh |
cd /home/gexiv2
meson _build \
--buildtype=debug
cd _build
ninja
ninja install
# remove DNS file that vagga will recreate after build
- !Sh "rm /etc/resolv.conf"
# Using !Git, but that does not create a git repository so this doesn't work
# cd /home/gegl
# git status
# !!! Note the containers branch here.
# Later, choose one of these on which to build gimpLocal
# container with gimp configure to build in a parallel or VPATH dir not in the container
gimpAMReady:
setup:
- !Container bablGeglDev
- !Sh mkdir /work/gimpAMGccBuild
- !Sh |
# cd to the build dir
cd /work/gimpAMGccBuild
# configure from the source dir
# --disable-docs obsolete?
# CFLAGS="-fsanitize=address -fno-omit-frame-pointer" /work/gimp/autogen.sh --enable-debug --disable-gi-docgen --without-vala --with-pdbgen
# /work/gimp/autogen.sh --enable-debug --disable-gi-docgen --without-vala --with-pdbgen
CFLAGS="-fno-stack-clash-protection -fstack-check" /work/gimp/autogen.sh --enable-debug --disable-gi-docgen --without-vala --with-pdbgen
# With built gimp
# Uses AM automake variant of build system for Gimp
# Formerly copied source into container
# Try not to alter this container, it is stock container after GIMP build
# Note that /usr/local/lib/gimp/2.99/plug-ins/python does not exist
gimpAMDev:
setup:
- !Container bablGeglDev
# rebuild container when changed: local clone of gimp repository (in /work i.e. project directory )
# !!! The build must not put the _build directory in this directory, else container will fail
# with: Can't write image usage info: No such file or directory (os error 2)
# meaning the dependency changed during container build
- !Depends gimp
# Get Gimp sources
# latest, bleeding
#- !Git
# url: https://gitlab.gnome.org/GNOME/gimp.git
# path: /home/gimp
# Options
# See INSTALL or INSTALL.in file in repository. Seems definitive
- !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib"
- !Env XDG_DATA_DIRS: "/usr/local/share:/usr/share"
# echo environment
- !Sh echo "home ->" $HOME
- !Sh echo "library path ->" $LD_LIBRARY_PATH
- !Sh echo "introspection path ->" $XDG_DATA_DIRS
- !Sh echo "binary path ->" $PATH
# TEMP for debug
# - !Install [strace]
# TEMP to test autoconf 2.70 Mar 20, 2021
# missing command makeinfo
#- !Install [ texinfo, help2man ]
#- !Git
# url: http://git.sv.gnu.org/r/autoconf.git
# path: /home/autoconf
#- !Tar
# url: ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz
# path: /work
# autoreconf -vi
#- !Sh |
# cd /work/autoconf-2.71
# ./configure
# make
# make install
# autoconf --version
# Build gimp
# My customization of the bare commands
# disabling docs, python, vector-icons
# --jobs=4 or -j4
# ??? make distclean to alleviate "unrecognized file format"
# --disable-python ?? what does that prevent? PyGimp, or build Python interpreter, or install Python plugins
# --disable-docs ?? user manual?
# --disable-gtk-doc ?? programmers reference manual (libgimp API and PDB?)
# --disable-vector-icons was working until Jan. 12
# preface: CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
# option to rebuild PDB autogen.sh --with-pdbgen
# make -j4
# Build in a directory copied into the container (in tree since it creates _build?)
- !Copy
source: /work/gimp
path: /home/gimp
# address,bounds,bounds-strict,alignment,object-size
#CFLAGS="-fsanitize=address -fno-omit-frame-pointer" ./autogen.sh --disable-docs --enable-debug --with-pdbgen --disable-gi-docgen
# OR: ./autogen.sh --disable-docs --enable-debug --disable-gi-docgen
- !Sh |
cd /home/gimp
./autogen.sh --disable-docs --enable-debug --disable-gi-docgen --without-vala
make all-am -j4
make install
# Build out of source tree, but build in the container
# This doesn't work yet.
#- !EnsureDir /gimpBuild
#- !Sh |
# cd gimpBuild
# export SRCTREE=/work/gimp
# CFLAGS="-fsanitize=address -fno-omit-frame-pointer" ./autogen.sh --disable-docs --enable-debug --with-pdbgen
# /work/gimp/configure
# make all-am -j4
# make install
# remove DNS file that vagga will recreate after build
- !Sh "rm /etc/resolv.conf"
# mount directories from outside the container
# /volumes/ is defined in .config/vagga/settings.html
# This is mounting plugin directories kept in ~/git/testGimpPDB
# /root: means to mount it in .vagga/container/work ???
# /root/testGimpPDB: means to mount it ???
volumes:
/work/testGimpPDB: !BindRO /volumes/testGimpPDB
/work/testGimpExportImport: !BindRO /volumes/testGimpExportImport
/work/testGimpScriptFuBinding: !BindRO /volumes/testGimpScriptFuBinding
# Larger /tmp for testing
# 100Mi is default, not enough to create many image files
/tmp: !Tmpfs { size: 500Mi, mode: 0o1777 }
# env that GIMP expects
environ:
HOME: /work/.home
GIMP_PREFIX: /usr/local
GEGL_PATH: /usr/local/lib/x86_64-linux-gnu/gegl-0.4
GI_TYPELIB_PATH: /usr/local/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/girepository-1.0
NO_AT_BRIDGE: 1
LD_LIBRARY_PATH: /usr/local/lib/x86_64-linux-gnu:/usr/local/lib:${LD_LIBRARY_PATH}
XDG_DATA_DIRS: /usr/local/share:/usr/share
PATH: /usr/local/bin:/usr/bin:/bin
# Generate documentation for Python language bindings to Gimp, etc.
# Same documents for GLib, GObj, Gio webbed at "PyGObject API Reference"
#
# - !Sh g-ir-doc-tool --language=Python -o /work/.home/gimp-doc /usr/local/share/gir-1.0/Gimp-3.0.gir
#- !Sh g-ir-doc-tool --language=Python -o /work/.home/gimpui-doc /usr/local/share/gir-1.0/GimpUi-3.0.gir
#- !Sh g-ir-doc-tool --language=Python -o /work/.home/glib-doc /usr/share/gir-1.0/GLib-2.0.gir
#- !Sh g-ir-doc-tool --language=Python -o /work/.home/gobj-doc /usr/share/gir-1.0/GObject-2.0.gir
## crashes: - !Sh g-ir-doc-tool --language=Python -o /work/.home/gio-doc /usr/share/gir-1.0/Gio-2.0.gir
# pgi-docgen produces nicer documents
# See my static html copy at ~/PythonGIDocs
# Generate latest copy only for Gimp
# WIP needs pgi-docgen and many dependencies
#- !Sh |
# pgi-docgen create /work/.home/_docs Gimp-3.0
# pgi-docgen build /work/.home/_docs /work/.home/_docs/_build
# Container ready to build GIMP
# Build directory is not in the container.
# GIMP is not built or installed in the container
# Local custom Gimp plugins not in the container.
# The container should NOT automatically rebuild if /work/gimp source changes
# But if you change a meson.build file, you need to rebuild this container??
# use --wipe to insure any changes take effect, but you can't use wipe the first time
# Can use env prefixes
# LDFLAGS=--verbose
# More meson options
# -Db_lto=true
# -Db_sanitize=address,undefined
# unrecognized: shared-libasan
gimpMesonDev:
setup:
- !Container bablGeglDev
# This container NOT depend on changed gimp source
# Note that meson builds out of tree, i.e. does not touch gimp directory
# Except that it does, it puts pdbgen files back in the source tree
# resolve FAILED: cursors/gimp-tool-cursors.c Related to vector icons?
- !Env XDG_DATA_DIRS: "/usr/local/share:/usr/share"
# resolve ../plug-ins/common/file-pdf-load.c:32:10: fatal error: poppler.h: No such file or directory
- !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib"
- !Install [ valgrind ]
#### Options for GIMP build
# -Dpoppler=false => -Dpdf=false is not correct
# -Dpoppler=false still fails to build
# if GEGL is asan, then this needs asan? else "library not first, use PRELOAD"
# see later, at compile time -Db_sanitize=address,undefined
# LDFLAGS=--verbose
# !!! If you use clang for setup, use the same env at meson compile, else g-ir-scanner fails
# Fail: CC=clang CXX=clang CC_LD=lld CXX_LD=lld meson setup /work/mesonClangBuild \
# Fail: CC=clang CXX=clang CC_LD=clang CXX_LD=clang meson setup /work/mesonClangBuild \
# setup build outside the source tree
# meson and clang
# --buildtype=debug \
# -Db_lundef=false \
# --wipe \
- !Sh |
cd /work/gimp
CC=clang CXX=clang CC_LD=lld CXX_LD=lld meson setup /work/gimpMesonClangBuild \
-Db_sanitize=address \
-Djavascript=false \
-Dlua=false \
-Dpython=true \
-Dvala-plugins=disabled \
-Dg-ir-doc=false
# meson and gcc
# !!! This won't reconfigure the build dir, when you change the options
- !Sh |
cd /work/gimp
meson setup /work/mesonGccBuild \
-Djavascript=false \
-Dlua=true \
-Dpython=true \
-Dvala-plugins=disabled \
-Dg-ir-doc=false
# Force reconfigure
# FAIL: meson --reconfigure /work/mesonGccBuild
# FAIL: ninja reconfigure /work/mesonGccBuild
# FAIL: meson setup --wipe /work/mesonGccBuild
#- !Sh |
# meson setup --wipe /work/mesonGccBuild
#- !Sh |
# ls /work/mesonGccBuild
# Also volumes for test plugins
volumes:
/work/testGimpPDB: !BindRO /volumes/testGimpPDB
# Container with meson and clang built GIMP installed
# !!! source and build dirs not in the container, but container depends on it.
# vagga will rebuild container if gimp source changes.
gimpMesonClangInstalled:
setup:
- !Container gimpMesonDev
# Tells vagga to rebuild this container when this file is touched.
# Depends requires a single file, we can't use the entire /gimp directory
# - !Depends touchToRebuild
# resolve FAILED: cursors/gimp-tool-cursors.c Related to vector icons?
- !Env XDG_DATA_DIRS: "/usr/local/share:/usr/share"
# resolve ../plug-ins/common/file-pdf-load.c:32:10: fatal error: poppler.h: No such file or directory
# - !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib"
- !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib:/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux"
# Build from the build directory.
# Installs into the container
# defaults:
# jobs 3?? For more, use: -j 4
# print one line per command, for verbose use -v
# ninja -v -j 1 to limit to sequential jobs
# FAIL: export LD_PRELOAD=$(gcc -print-file-name=libasan.so)
# ,undefined
# meson configure -Db_sanitize=address
- !Sh |
cd /work/mesonClangBuild
# ninja -n -v -j 1 -d explain
#meson configure -Db_sanitize=address
#ninja -v -d explain -j 1 install
#ninja -v -j 3 install
echo "libclang" $(clang -print-file-name=libclang_rt.asan-x86_64.so)
# Fail: CLANG_ASAN_PRELOAD=$(clang -print-file-name=libclang_rt.asan-x86_64.so) CC=clang CXX=clang CC_LD=lld CXX_LD=lld meson install
# Fail: CC=clang CXX=clang CC_LD=clang CXX_LD=clang meson install
# Fail: export LDFLAGS="-Wl,-z,undefs -fsanitize=address"
#CC=clang CXX=clang LDFLAGS=--verbose CC_LD=lld CXX_LD=lld meson install
CC=clang CXX=clang LDFLAGS=--verbose CC_LD=lld CXX_LD=lld ninja -v -j 1 install
# Also volumes for test plugins
volumes:
/work/testGimpPDB: !BindRO /volumes/testGimpPDB
/work/testGimpExportImport: !BindRO /volumes/testGimpExportImport
/work/testGimpScriptFuBinding: !BindRO /volumes/testGimpScriptFuBinding
# Larger /tmp for testing
# 100Mi is default, not enough to create many image files
/tmp: !Tmpfs { size: 500Mi, mode: 0o1777 }
# env that GIMP expects
environ:
HOME: /work/.home
GIMP_PREFIX: /usr/local
GEGL_PATH: /usr/local/lib/x86_64-linux-gnu/gegl-0.4
GI_TYPELIB_PATH: /usr/local/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/girepository-1.0
NO_AT_BRIDGE: 1
LD_LIBRARY_PATH: /usr/local/lib/x86_64-linux-gnu:/usr/local/lib:${LD_LIBRARY_PATH}
XDG_DATA_DIRS: /usr/local/share:/usr/share
PATH: /usr/local/bin:/usr/bin
gimpMesonGccInstalled:
setup:
- !Container gimpMesonDev
# Tells vagga to rebuild this container when this file is touched.
# Depends requires a single file, we can't use the entire /gimp directory
# - !Depends touchToRebuild
# resolve FAILED: cursors/gimp-tool-cursors.c Related to vector icons?
- !Env XDG_DATA_DIRS: "/usr/local/share:/usr/share"
# resolve ../plug-ins/common/file-pdf-load.c:32:10: fatal error: poppler.h: No such file or directory
# - !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib"
- !Env LD_LIBRARY_PATH: "/usr/local/lib/x86_64-linux-gnu:/usr/lib:/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux"
- !Sh |
cd /work/mesonGccBuild
meson install
# Also volumes for test plugins
volumes:
/work/testGimpPDB: !BindRO /volumes/testGimpPDB
/work/testGimpExportImport: !BindRO /volumes/testGimpExportImport
/work/testGimpScriptFuBinding: !BindRO /volumes/testGimpScriptFuBinding
# Larger /tmp for testing
# 100Mi is default, not enough to create many image files
/tmp: !Tmpfs { size: 500Mi, mode: 0o1777 }
# env that GIMP expects
environ:
HOME: /work/.home
GIMP_PREFIX: /usr/local
GEGL_PATH: /usr/local/lib/x86_64-linux-gnu/gegl-0.4
GI_TYPELIB_PATH: /usr/local/lib/x86_64-linux-gnu/girepository-1.0:/usr/local/lib/girepository-1.0
NO_AT_BRIDGE: 1
LD_LIBRARY_PATH: /usr/local/lib/x86_64-linux-gnu:/usr/local/lib:${LD_LIBRARY_PATH}
XDG_DATA_DIRS: /usr/local/share:/usr/share
PATH: /usr/local/bin:/usr/bin
# Cruft
# Gimp will put it in the PYTHONPATH, we don't want to find its contents
# EmptyDir is not correct, it keeps the directory empty is all child containers
# - !EmptyDir /usr/local/lib/gimp/2.99/python
#- !Sh "rm -rf /usr/local/lib/gimp/2.99/python/*"
# gimp typelib in /usr/local/lib/girepository-1.0
# gegl, babl typelib in /usr/local/lib/x86_64-linux-gnu/gi...
commands:
# baseOS does not contain many tools
testOSSanity: !Command
description: Test sanity of OS in container baseOS. Expect only "which" is found
container: baseOS
run: |
which which
which pkg-config
python -V
wget --version
curl --version
# test the container with most dev tools installed
testMesonSanity: !Command
description: Test sanity of meson in container baseWithTools
container: baseWithTools
run: |
meson -h
which pkg-config
which python3
which intltool
python3 -V
wget --version
echo "gold linker"
which gold
echo "libasan path" $(gcc -print-file-name=libasan.so)
echo "which git"; which git
testSourceSanity: !Command
description: List contents of source babl and gegl
container: gimpDepsSource
run: |
echo "Contents of /babl"
ls /home/babl
echo "Contents of /gegl"; ls /home/gegl
which git
echo "trying: pkg-config gegl"
pkg-config gegl-0.4 --modversion
getVersionsBablGegl: !Command
description: Get version of built babl and gegl in bablGeglDev
container: bablGeglDev
run: |
echo "$PKG_CONFIG_PATH:" $PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
echo "$PKG_CONFIG_PATH is:" $PKG_CONFIG_PATH# Show that it installed .so
echo "Listing /usr/local/lib/x86_64-linux-gnu"
ls /usr/local/lib/x86_64-linux-gnu
echo "Version of babl using: pkg-config gegl"
pkg-config --modversion babl-0.1
echo "Version of gegl using: pkg-config gegl"
pkg-config --modversion gegl-0.4
echo "Version of autoconf"
autoconf --version
echo "which autopoint"
which autopoint
# It doesn't seems to matter that /usr/local/lib/x86_64-linux-gnu/pkgconfig is not in PKG_CONFIG_PATH
getVersionsGimpAM: !Command
description: describe versions of stuff in container gimpAMDev (AM built Gimp)
container: gimpAMDev
run: |
echo "LD_LIBRARY_PATH" $LD_LIBRARY_PATH
autoconf --version
/usr/local/bin/gimp-2.99 --version
getVersionsGimpMeson: !Command
description: describe versions in container gimpMesonInstalled (meson built Gimp)
container: gimpMesonInstalled
run: |
echo "LD_LIBRARY_PATH" $LD_LIBRARY_PATH
# Note gegl is not in dpkg
#echo "Gegl version from dpkg"
#dpkg -l | grep gegl
echo "Gegl version from pkg-config"
pkg-config --modversion gegl-0.4
echo "GLib version from pkg-config"
pkg-config --modversion glib-2.0
echo "Gimp version from pkg-config"
pkg-config --modversion gimp-3.0
echo "Python version from python3 --version"
python3 --version
echo "PyGObject version from python"
python3 -c "from gi.repository import GObject
GObject.pygobject_version"
echo "Gimp version from gimp-2.99 --version"
/usr/local/bin/gimp-2.99 --version
getConfigGimpAM: !Command
description: Get build config options of gimp in gimpAMDev container
container: gimpAMDev
run: |
cd /home/gimp
./configure --help
installMyPluginsToHome: !Command
description: Install a set of plugins to .home/.config/GIMP/2.99/plug-ins (seen by all containers)
container: gimpMesonDev
run: |
# Copy some plugins from volumes of the container
echo "Not clearing plugins"
#echo "Removing old plugins and gimpfu source"
#rm -rf /work/.home/.config/GIMP/2.99/plug-ins/*
# local plugins in /work/.home/.config/GIMP/2.99/plug-ins
# !!! outside the container
mkdir /work/.home/.config/GIMP/2.99/plug-ins
# Refresh installation of gimpfu from development gimp_directory
# Copy entire directory
echo "Copying gimpfu"
cp -rv /work/gimpfu /work/.home/.config/GIMP/2.99/plug-ins
# Refresh installation of testGIMPPDB
echo "Copying testGimpPDB"
#mkdir /work/.home/.config/GIMP/2.99/plug-ins/testGimpPDB
cp -r /work/testGimpPDB /work/.home/.config/GIMP/2.99/plug-ins
chmod +x /work/.home/.config/GIMP/2.99/plug-ins/testGimpPDB/testGimpPDB.py
echo "Copying selected scriptfu scripts"
# cp -rv /work/gimpTestPlugins/scriptFu/testUndefinedFunc.scm /work/.home/.config/GIMP/2.99/scripts
#cp -rv /work/gimpTestPlugins/scriptFu/testUndefinedFunc.scm /work/.home/.config/GIMP/2.99/scripts
#cp -rv /work/plugins/nonGimpFu/testGeglOp.scm /work/.home/.config/GIMP/2.99/scripts
#cp -rv /work/plugins/nonGimpFu/defectsript-v01.scm /work/.home/.config/GIMP/2.99/scripts
#cp -r /work/plugins/nonGimpFu/testNumericName.scm /work/.home/.config/GIMP/2.99/scripts
#echo "Copying testGimpExportImport"
# Copy from a volume of the container
#mkdir /work/.home/.config/GIMP/2.99/plug-ins/testGimpExportImport
#cp -r /work/testGimpExportImport/* /work/.home/.config/GIMP/2.99/plug-ins/testGimpExportImport
#echo "Copying testGimpScriptFuBinding"
#mkdir /work/.home/.config/GIMP/2.99/plug-ins/testGimpScriptFuBinding
#cp -r /work/testGimpScriptFuBinding/* /work/.home/.config/GIMP/2.99/plug-ins/testGimpScriptFuBinding
#echo "Copying all test plugins"
#cp -rv /work/gimpTestPlugins/test/* /work/.home/.config/GIMP/2.99/plug-ins
#echo "Copying all my test plugins"
#cp -r /work/plugins/test/* /work/.home/.config/GIMP/2.99/plug-ins
#echo "Copying all wild test plugins"
#cp -r /work/plugins/wild/* /work/.home/.config/GIMP/2.99/plug-ins
#cp -r /work/plugins/wild/plugin-resynth-tileset /work/.home/.config/GIMP/2.99/plug-ins
echo "Copying selected test plugins"
# copy a directory containing a plugin.py
# One of these is WIP
#cp -rv /work/gimpTestPlugins/test/dumpPDB /work/.home/.config/GIMP/2.99/plug-ins
#cp -rv /work/gimpTestPlugins/test/dump_pdb /work/.home/.config/GIMP/2.99/plug-ins
#echo "Copying selected nonGimpfu plugins"
#cp -r /work/plugins/nonGimpFu/myMinPlugin /work/.home/.config/GIMP/2.99/plug-ins
#cp -r /work/plugins/nonGimpFu/testGegl /work/.home/.config/GIMP/2.99/plug-ins
#echo "Chmoding test plugins"
# find -D exec /work/.home/.config/GIMP/2.99/plug-ins -name *.py -exec chmod +x '{}' + -print
#find -D exec /work/.home/.config/GIMP/2.99/plug-ins -type f -name "*.py" -exec chmod +x {} \; -print