From 503412b02356cd0dd92f0fc0900f48eab3afce24 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 7 Feb 2020 10:52:16 -0500 Subject: meson build --- .gitignore | 10 +- dub.sdl | 8 +- makefile | 26 ++- meson.build | 16 +- org/spine_build_scaffold.org | 354 ++++++++++++++++++++++++++++++----- subprojects/D-YAML.wrap | 4 + subprojects/README | 37 ++-- subprojects/d2sqlite3.wrap | 2 +- subprojects/d2sqlite3/.gitignore | 10 + subprojects/d2sqlite3/dub.sdl | 29 +++ subprojects/d2sqlite3/meson.build | 48 +++++ subprojects/dyaml.wrap | 4 + subprojects/dyaml/dub.json | 25 +++ subprojects/dyaml/meson.build | 70 +++++++ subprojects/imageformats-d.wrap | 4 - subprojects/imageformats.wrap | 4 + subprojects/imageformats/dub.sdl | 7 + subprojects/imageformats/meson.build | 40 ++++ subprojects/tinyendian.wrap | 4 + subprojects/tinyendian/.gitignore | 4 + subprojects/tinyendian/dub.json | 16 ++ subprojects/tinyendian/meson.build | 41 ++++ 22 files changed, 678 insertions(+), 85 deletions(-) create mode 100644 subprojects/D-YAML.wrap create mode 100644 subprojects/d2sqlite3/.gitignore create mode 100644 subprojects/d2sqlite3/dub.sdl create mode 100644 subprojects/d2sqlite3/meson.build create mode 100644 subprojects/dyaml.wrap create mode 100644 subprojects/dyaml/dub.json create mode 100644 subprojects/dyaml/meson.build delete mode 100644 subprojects/imageformats-d.wrap create mode 100644 subprojects/imageformats.wrap create mode 100644 subprojects/imageformats/dub.sdl create mode 100644 subprojects/imageformats/meson.build create mode 100644 subprojects/tinyendian.wrap create mode 100644 subprojects/tinyendian/.gitignore create mode 100644 subprojects/tinyendian/dub.json create mode 100644 subprojects/tinyendian/meson.build diff --git a/.gitignore b/.gitignore index 24284e2..32de0fa 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ !README !makefile !version.txt -!dub*.json +!dub.json !dub.sdl !meson.build !tangle @@ -33,8 +33,12 @@ !**/*.sst !**/*.ssm !subprojects -!**/*.wrap !subprojects/*.wrap +# !subprojects/dyaml +!subprojects/d2sqlite3 +!subprojects/imageformats +# !subprojects/tinyendian +subprojects/*/.gitignore !pod.manifest !sisu_document_make !config_local_site @@ -61,5 +65,5 @@ tmp/** #\#* #*.\#* #!debian -#!debian/* +#!debian/** #.reggae/** diff --git a/dub.sdl b/dub.sdl index e47a533..83606f8 100644 --- a/dub.sdl +++ b/dub.sdl @@ -10,11 +10,11 @@ stringImportPaths "./views" buildRequirements "allowWarnings" targetType "executable" platforms "posix" -dependency "d2sqlite3" version="~>0.18.3" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3.html +dependency "d2sqlite3" version="~>0.18.3" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3 subconfiguration "d2sqlite3" "all-included" -dependency "imageformats" version="~>7.0.1" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats -dependency "dyaml" version="~>0.8.0" -dependency "tinyendian" version="~>0.2.0" // for dyaml +dependency "imageformats" version="~>7.0.2" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats +dependency "dyaml" version="~>0.8.0" # https://code.dlang.org/packages/dyaml https://github.com/dlang-community/D-YAML +dependency "tinyendian" version="~>0.2.0" # http://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency configuration "default" { targetName "spine" postGenerateCommands "/usr/bin/notify-send -t 0 'D executable ready' 'spine'" diff --git a/makefile b/makefile index 28794c9..679f661 100644 --- a/makefile +++ b/makefile @@ -78,6 +78,8 @@ data/sisudir/media/text/through_the_looking_glass.lewis_carroll.sst \ data/sisudir/media/text/two_bits.christopher_kelty.sst \ data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980.sst \ data/sisudir/media/text/viral_spiral.david_bollier.sst +dub_upgrade: + $(DUB) upgrade default: ldc markup_samples: find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \ @@ -89,26 +91,28 @@ markup_dir_samples: all: dmd ldc gdc all_ver: dmd_ver ldc_ver gdc_ver all_debug: dmd_debug gdc_debug ldc_debug -meson: - rm -r build && mkdir build +meson: dub_upgrade + rm -r build; mkdir build meson --buildtype=debugoptimized build ninja -C build + notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' mesonredo: - rm -r build && mkdir build + rm -r build; mkdir build meson --buildtype=debugoptimized build ninja -C build -mesonclean: clean skel tangle +mesonclean: clean skel tangle dub_upgrade meson --buildtype=debugoptimized build ninja -C build all_clean: clean tangle dmd ldc gdc all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver -dmd: +dmd: dub_upgrade $(DUB) --compiler=dmd --config=dmd -b release + notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' dmd_debug: $(DUB) --compiler=dmd --config=dmd -b debug -dmd_ver: +dmd_ver: dub_upgrade $(DUB) --compiler=dmd --config=dmd-version mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' @@ -120,11 +124,12 @@ dmd_rel_tangle: tangle dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle dmd_debug_tangle: tangle $(DUB) --compiler=dmd --config=spine-dmd-debug -gdc: +gdc: dub_upgrade $(DUB) --compiler=gdc --config=gdc -b release + notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' gdc_debug: $(DUB) --compiler=gdc --config=gdc -b debug -gdc_ver: +gdc_ver: dub_upgrade $(DUB) --compiler=gdc --config=gdc-version mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' @@ -136,11 +141,12 @@ gdc_rel_tangle: tangle gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle gdc_debug_tangle: tangle $(DUB) --compiler=gdc --config=spine-gdc-debug -ldc: +ldc: dub_upgrade $(DUB) --compiler=ldc2 --config=ldc -b release + notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' ldc_debug: $(DUB) --compiler=ldc2 --config=ldc -b debug -ldc_ver: +ldc_ver: dub_upgrade $(DUB) --compiler=ldc2 --config=ldc-version mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' diff --git a/meson.build b/meson.build index 05be115..41d6db3 100644 --- a/meson.build +++ b/meson.build @@ -1,8 +1,11 @@ project('spine', 'd', license: 'AGPL3', - version: '0.26.5', + version: '0.9.2', meson_version: '>=0.46' ) +#if meson.get_compiler('d').get_id() == 'gcc' +# error('spine cannot be compiled with GDC at time. Sorry.') +#endif spine_sources = [ 'src/doc_reform/spine.d', 'src/doc_reform/conf/compile_time_info.d', @@ -15,6 +18,7 @@ spine_sources = [ 'src/doc_reform/io_out/html.d', 'src/doc_reform/io_out/hub.d', 'src/doc_reform/io_out/latex.d', + 'src/doc_reform/io_out/metadata.d', 'src/doc_reform/io_out/odt.d', 'src/doc_reform/io_out/package.d', 'src/doc_reform/io_out/paths_output.d', @@ -45,14 +49,16 @@ spine_sources = [ source_root = meson.source_root() sources_dir = include_directories('src/') # Dependencies -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.16.2', fallback: ['d2sqlite3', 'd2sqlite3_dep']) -dep_imageformats = dependency('imageformats-d', version: '>= 7.0.0', fallback: ['imageformats-d', 'imageformats_dep']) -# executable -spine_exe = executable('dr', +dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep']) +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep']) +dep_imageformats = dependency('imageformats', version: '>= 7.0.0', fallback: ['imageformats', 'imageformats_dep']) +# Executable +spine_exe = executable('spine', [spine_sources], include_directories : [sources_dir], d_import_dirs: [include_directories('views')], dependencies : [ + dep_dyaml, dep_d2sqlite3, dep_imageformats, ], diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index bbd23d5..cd21833 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -152,6 +152,11 @@ data/sisudir/media/text/viral_spiral.david_bollier.sst ****** all builds ******* default +#+BEGIN_SRC makefile :tangle ../makefile +dub_upgrade: + $(DUB) upgrade +#+END_SRC + #+BEGIN_SRC makefile :tangle ../makefile default: ldc #+END_SRC @@ -196,15 +201,16 @@ all_debug: dmd_debug gdc_debug ldc_debug ******** _meson_ build :meson: #+BEGIN_SRC makefile :tangle ../makefile -meson: - rm -r build && mkdir build +meson: dub_upgrade + rm -r build; mkdir build meson --buildtype=debugoptimized build ninja -C build + notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' mesonredo: - rm -r build && mkdir build + rm -r build; mkdir build meson --buildtype=debugoptimized build ninja -C build -mesonclean: clean skel tangle +mesonclean: clean skel tangle dub_upgrade meson --buildtype=debugoptimized build ninja -C build #+END_SRC @@ -235,8 +241,9 @@ all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver ******** default :default: #+BEGIN_SRC makefile :tangle ../makefile -dmd: +dmd: dub_upgrade $(DUB) --compiler=dmd --config=dmd -b release + notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' #+END_SRC ******** debug :debug: @@ -251,7 +258,7 @@ dmd_debug: - assumes git tags with program version #+BEGIN_SRC makefile :tangle ../makefile -dmd_ver: +dmd_ver: dub_upgrade $(DUB) --compiler=dmd --config=dmd-version mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' @@ -275,8 +282,9 @@ dmd_debug_tangle: tangle ******** default :default: #+BEGIN_SRC makefile :tangle ../makefile -gdc: +gdc: dub_upgrade $(DUB) --compiler=gdc --config=gdc -b release + notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' #+END_SRC ******** debug :debug: @@ -291,7 +299,7 @@ gdc_debug: - assumes git tags with program version #+BEGIN_SRC makefile :tangle ../makefile -gdc_ver: +gdc_ver: dub_upgrade $(DUB) --compiler=gdc --config=gdc-version mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' @@ -315,8 +323,9 @@ gdc_debug_tangle: tangle ******** default :default: #+BEGIN_SRC makefile :tangle ../makefile -ldc: +ldc: dub_upgrade $(DUB) --compiler=ldc2 --config=ldc -b release + notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' #+END_SRC ******** debug :debug: @@ -331,7 +340,7 @@ ldc_debug: - assumes git tags with program version #+BEGIN_SRC makefile :tangle ../makefile -ldc_ver: +ldc_ver: dub_upgrade $(DUB) --compiler=ldc2 --config=ldc-version mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc' @@ -851,11 +860,11 @@ stringImportPaths "./views" buildRequirements "allowWarnings" targetType "executable" platforms "posix" -dependency "d2sqlite3" version="~>0.18.3" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3.html +dependency "d2sqlite3" version="~>0.18.3" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3 subconfiguration "d2sqlite3" "all-included" -dependency "imageformats" version="~>7.0.1" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats -dependency "dyaml" version="~>0.8.0" -dependency "tinyendian" version="~>0.2.0" // for dyaml +dependency "imageformats" version="~>7.0.2" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats +dependency "dyaml" version="~>0.8.0" # https://code.dlang.org/packages/dyaml https://github.com/dlang-community/D-YAML +dependency "tinyendian" version="~>0.2.0" # http://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency #+END_SRC ** default @@ -999,14 +1008,18 @@ http://mesonbuild.com/Dependencies.html#Dub *** projects +ls -1 ./src/*/**/*.d tree -fi ./src |rg "\.d$" #+BEGIN_SRC sh :tangle ../meson.build project('spine', 'd', license: 'AGPL3', - version: '0.26.5', + version: '0.9.2', meson_version: '>=0.46' ) +#if meson.get_compiler('d').get_id() == 'gcc' +# error('spine cannot be compiled with GDC at time. Sorry.') +#endif spine_sources = [ 'src/doc_reform/spine.d', 'src/doc_reform/conf/compile_time_info.d', @@ -1019,6 +1032,7 @@ spine_sources = [ 'src/doc_reform/io_out/html.d', 'src/doc_reform/io_out/hub.d', 'src/doc_reform/io_out/latex.d', + 'src/doc_reform/io_out/metadata.d', 'src/doc_reform/io_out/odt.d', 'src/doc_reform/io_out/package.d', 'src/doc_reform/io_out/paths_output.d', @@ -1049,14 +1063,16 @@ spine_sources = [ source_root = meson.source_root() sources_dir = include_directories('src/') # Dependencies -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.16.2', fallback: ['d2sqlite3', 'd2sqlite3_dep']) -dep_imageformats = dependency('imageformats-d', version: '>= 7.0.0', fallback: ['imageformats-d', 'imageformats_dep']) -# executable -spine_exe = executable('dr', +dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep']) +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep']) +dep_imageformats = dependency('imageformats', version: '>= 7.0.0', fallback: ['imageformats', 'imageformats_dep']) +# Executable +spine_exe = executable('spine', [spine_sources], include_directories : [sources_dir], d_import_dirs: [include_directories('views')], dependencies : [ + dep_dyaml, dep_d2sqlite3, dep_imageformats, ], @@ -1066,42 +1082,290 @@ spine_exe = executable('dr', ** subprojects -#+BEGIN_SRC sh :tangle ../subprojects/README -d2sqlite3 -- dub - - https://code.dlang.org/packages/d2sqlite3 -- upstream - - https://github.com/biozic/d2sqlite3 -- mathias - - https://github.com/ximion/d2sqlite3.git - -imageformats -- dub - - https://code.dlang.org/packages/imageformats -- upstream - - https://github.com/lgvz/imageformats -- mathias - - https://github.com/ximion/imageformats.git +#+BEGIN_SRC txt :tangle ../subprojects/README +- d2sqlite3 + - dub + - https://code.dlang.org/packages/d2sqlite3 + - upstream + - https://github.com/biozic/d2sqlite3 +- dyaml + - dub + - https://code.dlang.org/packages/dyaml + - upstream + - https://github.com/dlang-community/D-YAML + - upstream git clone + - https://github.com/dlang-community/D-YAML.git +- imageformats + - dub + - https://code.dlang.org/packages/imageformats + - upstream git clone + - https://github.com/lgvz/imageformats +- tinyendian (dyaml dependency) + - dub + - http://code.dlang.org/packages/tinyendian + - upstream git clone + - https://github.com/dlang-community/tinyendian.git #+END_SRC *** d2sqlite3 +**** wrap #+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap [wrap-git] directory = d2sqlite3 -url = https://github.com/ximion/d2sqlite3.git +url = https://github.com/biozic/d2sqlite3.git +revision = head +#+END_SRC + +**** meson.build + +#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3/meson.build +project('d2sqlite3', 'd', + meson_version: '>=0.46', + license: 'BSL-1.0', + version: '0.18.3' +) + +project_soversion = '0' + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +sqlite_dep = dependency('sqlite3') + +d2sqlite3_src = [ + 'source/d2sqlite3/database.d', + 'source/d2sqlite3/internal/memory.d', + 'source/d2sqlite3/internal/util.d', + 'source/d2sqlite3/library.d', + 'source/d2sqlite3/package.d', + 'source/d2sqlite3/results.d', + 'source/d2sqlite3/sqlite3.d', + 'source/d2sqlite3/statement.d', +] +install_subdir('source/d2sqlite3/', install_dir: 'include/d/d2sqlite3/') + +d2sqlite3_lib = library('d2sqlite3', + [d2sqlite3_src], + include_directories: [src_dir], + dependencies: [sqlite_dep], + install: true, + version: meson.project_version(), + soversion: project_soversion +) + +pkgc.generate(name: 'd2sqlite3', + libraries: d2sqlite3_lib, + subdirs: 'd/d2sqlite3/', + version: meson.project_version(), + requires: ['sqlite3'], + description: 'A small wrapper around SQLite for the D programming language.' +) + +# for use by others which embed this as subproject +d2sqlite3_dep = declare_dependency( + link_with: [d2sqlite3_lib], + dependencies: [sqlite_dep], + include_directories: [src_dir] +) +#+END_SRC + +*** dyaml +**** wrap + +#+BEGIN_SRC sh :tangle ../subprojects/dyaml.wrap +[wrap-git] +directory = dyaml +url = https://github.com/dlang-community/D-YAML.git +revision = head +#+END_SRC + +**** meson.build (provided by upstream) + +#+BEGIN_SRC sh :NO-tangle ../subprojects/D-YAML/meson.build +project('D-YAML', 'd', + meson_version: '>=0.40.0', + subproject_dir: 'contrib', + version: '0.8.0' +) + +project_soversion = '0' + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +dyaml_src = [ + 'source/dyaml/composer.d', + 'source/dyaml/constructor.d', + 'source/dyaml/dumper.d', + 'source/dyaml/emitter.d', + 'source/dyaml/encoding.d', + 'source/dyaml/escapes.d', + 'source/dyaml/event.d', + 'source/dyaml/exception.d', + 'source/dyaml/linebreak.d', + 'source/dyaml/loader.d', + 'source/dyaml/node.d', + 'source/dyaml/package.d', + 'source/dyaml/parser.d', + 'source/dyaml/queue.d', + 'source/dyaml/reader.d', + 'source/dyaml/representer.d', + 'source/dyaml/resolver.d', + 'source/dyaml/scanner.d', + 'source/dyaml/serializer.d', + 'source/dyaml/style.d', + 'source/dyaml/tagdirective.d', + 'source/dyaml/test/common.d', + 'source/dyaml/test/compare.d', + 'source/dyaml/test/constructor.d', + 'source/dyaml/test/emitter.d', + 'source/dyaml/test/errors.d', + 'source/dyaml/test/inputoutput.d', + 'source/dyaml/test/reader.d', + 'source/dyaml/test/representer.d', + 'source/dyaml/test/resolver.d', + 'source/dyaml/test/tokens.d', + 'source/dyaml/token.d' +] +install_subdir('source/dyaml', install_dir: 'include/d/yaml/') + +tinyendian_dep = dependency('tinyendian', version: '>=0.2.0', fallback: ['tinyendian', 'tinyendian_dep']) + +dyaml_lib = library('dyaml', + [dyaml_src], + include_directories: [src_dir], + dependencies: [tinyendian_dep], + install: true, + version: meson.project_version(), + soversion: project_soversion +) +pkgc.generate(name: 'dyaml', + libraries: dyaml_lib, + subdirs: 'd/yaml/', + version: meson.project_version(), + description: 'YAML parser and emitter for the D programming language.' +) + +# Make D-YAML easy to use as subproject +dyaml_dep = declare_dependency( + link_with: dyaml_lib, + include_directories: [src_dir], + dependencies: [tinyendian_dep] +) +#+END_SRC + +*** imageformats +**** wrap + +#+BEGIN_SRC sh :tangle ../subprojects/imageformats.wrap +[wrap-git] +directory = imageformats +url = https://github.com/lgvz/imageformats.git revision = head #+END_SRC -*** imageformats-d +**** meson.build + +#+BEGIN_SRC sh :tangle ../subprojects/imageformats/meson.build +project('imageformats', 'd', + meson_version: '>=0.46', + license: 'BSL-1.0', + version: '7.0.0' +) + +project_soversion = '0' + +src_dir = include_directories('.') +pkgc = import('pkgconfig') + +imageformats_src = [ + 'imageformats/bmp.d', + 'imageformats/jpeg.d', + 'imageformats/package.d', + 'imageformats/png.d', + 'imageformats/tga.d' +] +install_subdir('imageformats/', install_dir: 'include/d/imageformats-d/') + +imageformats_lib = library('imageformats-d', + [imageformats_src], + include_directories: [src_dir], + install: true, + version: meson.project_version(), + soversion: project_soversion +) + +pkgc.generate(name: 'imageformats-d', + libraries: imageformats_lib, + subdirs: 'd/imageformats-d/', + version: meson.project_version(), + description: 'Decoders for PNG, TGA, BMP, JPEG and encoders for PNG, TGA, BMP.' +) + +# for use by others which embed this as subproject +imageformats_dep = declare_dependency( + link_with: [imageformats_lib], + include_directories: [src_dir] +) +#+END_SRC + +*** tinyendian (dyaml dependency) +**** wrap -#+BEGIN_SRC sh :tangle ../subprojects/imageformats-d.wrap +#+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian.wrap [wrap-git] -directory = imageformats-d -url = https://github.com/ximion/imageformats.git +directory = tinyendian +url = https://github.com/dlang-community/tinyendian.git revision = head #+END_SRC +**** meson.build (provided by upstream) + +#+BEGIN_SRC sh :NO-tangle ../subprojects/tinyendian/meson.build +# -*- mode: python; -*- + +project( + 'tinyendian', + 'd', + meson_version: '>=0.41', + version: '0.2.0', + default_options: ['buildtype=release'], +) + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +tinyendian_src = [ + 'source/tinyendian.d' +] + +install_headers(tinyendian_src, subdir: 'd/') + +tinyendian_lib = library( + meson.project_name(), + [tinyendian_src], + include_directories: [src_dir], + version: meson.project_version(), + pic: true, + install: true, +) + +pkgc.generate( + name: meson.project_name(), + libraries: tinyendian_lib, + subdirs: 'd/', + version: meson.project_version(), + description: 'Lightweight endianness library for D.' +) + +# Make Tinyendian easy to use as subproject +tinyendian_dep = declare_dependency( + link_with: tinyendian_lib, + include_directories: [src_dir] +) +#+END_SRC + * .gitignore :gitignore: #+BEGIN_SRC sh :tangle ../.gitignore @@ -1113,7 +1377,7 @@ revision = head !README !makefile !version.txt -!dub*.json +!dub.json !dub.sdl !meson.build !tangle @@ -1140,8 +1404,12 @@ revision = head !**/*.sst !**/*.ssm !subprojects -!**/*.wrap !subprojects/*.wrap +# !subprojects/dyaml +!subprojects/d2sqlite3 +!subprojects/imageformats +# !subprojects/tinyendian +subprojects/*/.gitignore !pod.manifest !sisu_document_make !config_local_site @@ -1168,7 +1436,7 @@ tmp/** #\#* #*.\#* #!debian -#!debian/* +#!debian/** #.reggae/** #+END_SRC diff --git a/subprojects/D-YAML.wrap b/subprojects/D-YAML.wrap new file mode 100644 index 0000000..8b3f503 --- /dev/null +++ b/subprojects/D-YAML.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = dyaml +url = https://github.com/dlang-community/D-YAML.git +revision = head diff --git a/subprojects/README b/subprojects/README index 59f89e7..c4d9dcc 100644 --- a/subprojects/README +++ b/subprojects/README @@ -1,15 +1,22 @@ -d2sqlite3 -- dub - - https://code.dlang.org/packages/d2sqlite3 -- upstream - - https://github.com/biozic/d2sqlite3 -- mathias - - https://github.com/ximion/d2sqlite3.git - -imageformats -- dub - - https://code.dlang.org/packages/imageformats -- upstream - - https://github.com/lgvz/imageformats -- mathias - - https://github.com/ximion/imageformats.git +- d2sqlite3 + - dub + - https://code.dlang.org/packages/d2sqlite3 + - upstream + - https://github.com/biozic/d2sqlite3 +- dyaml + - dub + - https://code.dlang.org/packages/dyaml + - upstream + - https://github.com/dlang-community/D-YAML + - upstream git clone + - https://github.com/dlang-community/D-YAML.git +- imageformats + - dub + - https://code.dlang.org/packages/imageformats + - upstream git clone + - https://github.com/lgvz/imageformats +- tinyendian (dyaml dependency) + - dub + - http://code.dlang.org/packages/tinyendian + - upstream git clone + - https://github.com/dlang-community/tinyendian.git diff --git a/subprojects/d2sqlite3.wrap b/subprojects/d2sqlite3.wrap index 04ce778..78643b5 100644 --- a/subprojects/d2sqlite3.wrap +++ b/subprojects/d2sqlite3.wrap @@ -1,4 +1,4 @@ [wrap-git] directory = d2sqlite3 -url = https://github.com/ximion/d2sqlite3.git +url = https://github.com/biozic/d2sqlite3.git revision = head diff --git a/subprojects/d2sqlite3/.gitignore b/subprojects/d2sqlite3/.gitignore new file mode 100644 index 0000000..8d7b4d4 --- /dev/null +++ b/subprojects/d2sqlite3/.gitignore @@ -0,0 +1,10 @@ +.dub +dub.selections.json +__test__* +d2sqlite3-test* +libd2sqlite3.a +TODO.txt +docs.json +docs +sqlite3.o +lib/*/*.lib diff --git a/subprojects/d2sqlite3/dub.sdl b/subprojects/d2sqlite3/dub.sdl new file mode 100644 index 0000000..f2bd29f --- /dev/null +++ b/subprojects/d2sqlite3/dub.sdl @@ -0,0 +1,29 @@ +name "d2sqlite3" +description "A thin wrapper around SQLite 3" +homepage "https://github.com/biozic/d2sqlite3" +authors "Nicolas Sicard" "Other contributors: see Github repo" +copyright "Copyright 2011-18 Nicolas Sicard" +license "BSL-1.0" +targetType "library" +configuration "with-lib" { + systemDependencies "SQLite version >= 3.8.7" + libs "sqlite3" + excludedSourceFiles "source/tests.d" +} +configuration "without-lib" { + excludedSourceFiles "source/tests.d" +} +configuration "all-included" { + libs "sqlite3" platform="windows" + copyFiles "lib/win32/sqlite3.dll" "lib/win32/sqlite3.lib" platform="windows-x86" + copyFiles "lib/win64/sqlite3.dll" "lib/win64/sqlite3.lib" platform="windows-x86_64" + preBuildCommands "make -C $PACKAGE_DIR -f sqlite3.mak" platform="posix" + sourceFiles "sqlite3.o" platform="posix" + libs "dl" platform="linux-gdc" + excludedSourceFiles "source/tests.d" +} +configuration "travis" { + preBuildCommands "make -C $PACKAGE_DIR -f sqlite3.mak" platform="posix" + sourceFiles "sqlite3.o" platform="posix" + versions "SqliteEnableColumnMetadata" "SqliteEnableUnlockNotify" +} diff --git a/subprojects/d2sqlite3/meson.build b/subprojects/d2sqlite3/meson.build new file mode 100644 index 0000000..1726952 --- /dev/null +++ b/subprojects/d2sqlite3/meson.build @@ -0,0 +1,48 @@ +project('d2sqlite3', 'd', + meson_version: '>=0.46', + license: 'BSL-1.0', + version: '0.18.3' +) + +project_soversion = '0' + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +sqlite_dep = dependency('sqlite3') + +d2sqlite3_src = [ + 'source/d2sqlite3/database.d', + 'source/d2sqlite3/internal/memory.d', + 'source/d2sqlite3/internal/util.d', + 'source/d2sqlite3/library.d', + 'source/d2sqlite3/package.d', + 'source/d2sqlite3/results.d', + 'source/d2sqlite3/sqlite3.d', + 'source/d2sqlite3/statement.d', +] +install_subdir('source/d2sqlite3/', install_dir: 'include/d/d2sqlite3/') + +d2sqlite3_lib = library('d2sqlite3', + [d2sqlite3_src], + include_directories: [src_dir], + dependencies: [sqlite_dep], + install: true, + version: meson.project_version(), + soversion: project_soversion +) + +pkgc.generate(name: 'd2sqlite3', + libraries: d2sqlite3_lib, + subdirs: 'd/d2sqlite3/', + version: meson.project_version(), + requires: ['sqlite3'], + description: 'A small wrapper around SQLite for the D programming language.' +) + +# for use by others which embed this as subproject +d2sqlite3_dep = declare_dependency( + link_with: [d2sqlite3_lib], + dependencies: [sqlite_dep], + include_directories: [src_dir] +) diff --git a/subprojects/dyaml.wrap b/subprojects/dyaml.wrap new file mode 100644 index 0000000..8b3f503 --- /dev/null +++ b/subprojects/dyaml.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = dyaml +url = https://github.com/dlang-community/D-YAML.git +revision = head diff --git a/subprojects/dyaml/dub.json b/subprojects/dyaml/dub.json new file mode 100644 index 0000000..07ee17e --- /dev/null +++ b/subprojects/dyaml/dub.json @@ -0,0 +1,25 @@ +{ + "name": "dyaml", + "description": "YAML parser and emitter", + "authors": [ + "Ferdinand Majerech", + "Cameron \"Herringway\" Ross" + ], + "license": "BSL-1.0", + "dependencies": { + "tinyendian" : "~>0.2.0" + }, + "homepage": "https://github.com/dlang-community/D-YAML", + "copyright": "Copyright © 2011-2018, Ferdinand Majerech", + "subPackages": [ + "examples/constructor", + "examples/getting_started", + "examples/representer", + "examples/resolver", + "examples/tojson", + "examples/yaml_bench", + "examples/yaml_gen", + "examples/yaml_stats", + "testsuite" + ] +} diff --git a/subprojects/dyaml/meson.build b/subprojects/dyaml/meson.build new file mode 100644 index 0000000..68d17c7 --- /dev/null +++ b/subprojects/dyaml/meson.build @@ -0,0 +1,70 @@ +project('D-YAML', 'd', + meson_version: '>=0.40.0', + subproject_dir: 'contrib', + version: '0.8.0' +) + +project_soversion = '0' + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +dyaml_src = [ + 'source/dyaml/composer.d', + 'source/dyaml/constructor.d', + 'source/dyaml/dumper.d', + 'source/dyaml/emitter.d', + 'source/dyaml/encoding.d', + 'source/dyaml/escapes.d', + 'source/dyaml/event.d', + 'source/dyaml/exception.d', + 'source/dyaml/linebreak.d', + 'source/dyaml/loader.d', + 'source/dyaml/node.d', + 'source/dyaml/package.d', + 'source/dyaml/parser.d', + 'source/dyaml/queue.d', + 'source/dyaml/reader.d', + 'source/dyaml/representer.d', + 'source/dyaml/resolver.d', + 'source/dyaml/scanner.d', + 'source/dyaml/serializer.d', + 'source/dyaml/style.d', + 'source/dyaml/tagdirective.d', + 'source/dyaml/test/common.d', + 'source/dyaml/test/compare.d', + 'source/dyaml/test/constructor.d', + 'source/dyaml/test/emitter.d', + 'source/dyaml/test/errors.d', + 'source/dyaml/test/inputoutput.d', + 'source/dyaml/test/reader.d', + 'source/dyaml/test/representer.d', + 'source/dyaml/test/resolver.d', + 'source/dyaml/test/tokens.d', + 'source/dyaml/token.d' +] +install_subdir('source/dyaml', install_dir: 'include/d/yaml/') + +tinyendian_dep = dependency('tinyendian', version: '>=0.2.0', fallback: ['tinyendian', 'tinyendian_dep']) + +dyaml_lib = library('dyaml', + [dyaml_src], + include_directories: [src_dir], + dependencies: [tinyendian_dep], + install: true, + version: meson.project_version(), + soversion: project_soversion +) +pkgc.generate(name: 'dyaml', + libraries: dyaml_lib, + subdirs: 'd/yaml/', + version: meson.project_version(), + description: 'YAML parser and emitter for the D programming language.' +) + +# Make D-YAML easy to use as subproject +dyaml_dep = declare_dependency( + link_with: dyaml_lib, + include_directories: [src_dir], + dependencies: [tinyendian_dep] +) diff --git a/subprojects/imageformats-d.wrap b/subprojects/imageformats-d.wrap deleted file mode 100644 index a5a9877..0000000 --- a/subprojects/imageformats-d.wrap +++ /dev/null @@ -1,4 +0,0 @@ -[wrap-git] -directory = imageformats-d -url = https://github.com/ximion/imageformats.git -revision = head diff --git a/subprojects/imageformats.wrap b/subprojects/imageformats.wrap new file mode 100644 index 0000000..09f342c --- /dev/null +++ b/subprojects/imageformats.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = imageformats +url = https://github.com/lgvz/imageformats.git +revision = head diff --git a/subprojects/imageformats/dub.sdl b/subprojects/imageformats/dub.sdl new file mode 100644 index 0000000..2814286 --- /dev/null +++ b/subprojects/imageformats/dub.sdl @@ -0,0 +1,7 @@ +name "imageformats" +description "Decoders for PNG, TGA, BMP, JPEG and encoders for PNG, TGA, BMP." +authors "Tero Hänninen" +license "BSL-1.0" +targetName "imageformats" +sourcePaths "imageformats" +importPaths "." diff --git a/subprojects/imageformats/meson.build b/subprojects/imageformats/meson.build new file mode 100644 index 0000000..584e2af --- /dev/null +++ b/subprojects/imageformats/meson.build @@ -0,0 +1,40 @@ +project('imageformats', 'd', + meson_version: '>=0.46', + license: 'BSL-1.0', + version: '7.0.0' +) + +project_soversion = '0' + +src_dir = include_directories('.') +pkgc = import('pkgconfig') + +imageformats_src = [ + 'imageformats/bmp.d', + 'imageformats/jpeg.d', + 'imageformats/package.d', + 'imageformats/png.d', + 'imageformats/tga.d' +] +install_subdir('imageformats/', install_dir: 'include/d/imageformats-d/') + +imageformats_lib = library('imageformats-d', + [imageformats_src], + include_directories: [src_dir], + install: true, + version: meson.project_version(), + soversion: project_soversion +) + +pkgc.generate(name: 'imageformats-d', + libraries: imageformats_lib, + subdirs: 'd/imageformats-d/', + version: meson.project_version(), + description: 'Decoders for PNG, TGA, BMP, JPEG and encoders for PNG, TGA, BMP.' +) + +# for use by others which embed this as subproject +imageformats_dep = declare_dependency( + link_with: [imageformats_lib], + include_directories: [src_dir] +) diff --git a/subprojects/tinyendian.wrap b/subprojects/tinyendian.wrap new file mode 100644 index 0000000..331a753 --- /dev/null +++ b/subprojects/tinyendian.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory = tinyendian +url = https://github.com/dlang-community/tinyendian.git +revision = head diff --git a/subprojects/tinyendian/.gitignore b/subprojects/tinyendian/.gitignore new file mode 100644 index 0000000..0ed3f58 --- /dev/null +++ b/subprojects/tinyendian/.gitignore @@ -0,0 +1,4 @@ +.dub +*.o +*.a +*.lib diff --git a/subprojects/tinyendian/dub.json b/subprojects/tinyendian/dub.json new file mode 100644 index 0000000..6313cdd --- /dev/null +++ b/subprojects/tinyendian/dub.json @@ -0,0 +1,16 @@ +{ + "name": "tinyendian", + "description": "Lightweight endianness handling library", + "authors": [ "Ferdinand Majerech" ], + "importPaths": ["source"], + "license": "Boost 1.0", + "homepage": "https://github.com/kiith-sa/tinyendian", + "copyright": "Copyright © 2014, Ferdinand Majerech", + + "buildTypes": + { + "debug": { "buildOptions": ["debugMode", "debugInfoC"] }, + "release": { "buildOptions": ["releaseMode", "optimize", "inline", "noBoundsCheck"] }, + "profile": { "buildOptions": ["releaseMode", "optimize", "noBoundsCheck", "debugInfoC"] }, + }, +} diff --git a/subprojects/tinyendian/meson.build b/subprojects/tinyendian/meson.build new file mode 100644 index 0000000..f666958 --- /dev/null +++ b/subprojects/tinyendian/meson.build @@ -0,0 +1,41 @@ +# -*- mode: python; -*- + +project( + 'tinyendian', + 'd', + meson_version: '>=0.41', + version: '0.2.0', + default_options: ['buildtype=release'], +) + +src_dir = include_directories('source/') +pkgc = import('pkgconfig') + +tinyendian_src = [ + 'source/tinyendian.d' +] + +install_headers(tinyendian_src, subdir: 'd/') + +tinyendian_lib = library( + meson.project_name(), + [tinyendian_src], + include_directories: [src_dir], + version: meson.project_version(), + pic: true, + install: true, +) + +pkgc.generate( + name: meson.project_name(), + libraries: tinyendian_lib, + subdirs: 'd/', + version: meson.project_version(), + description: 'Lightweight endianness library for D.' +) + +# Make Tinyendian easy to use as subproject +tinyendian_dep = declare_dependency( + link_with: tinyendian_lib, + include_directories: [src_dir] +) -- cgit v1.2.3