aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/config_meson.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-08-11 06:09:23 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-08-12 01:49:33 -0400
commitf459b2f57b111d2a7d6a50ba04bf680310d7c4d9 (patch)
treed71560ff280d244c1a0cd65c651fc85e68ffca8a /org/config_meson.org
parentspine search and configuration related (diff)
configuration reorganized into config files
- spine_build_scaffold broken up into many files
Diffstat (limited to 'org/config_meson.org')
-rw-r--r--org/config_meson.org485
1 files changed, 485 insertions, 0 deletions
diff --git a/org/config_meson.org b/org/config_meson.org
new file mode 100644
index 0000000..52cfa51
--- /dev/null
+++ b/org/config_meson.org
@@ -0,0 +1,485 @@
+-*- mode: org -*-
+#+TITLE: configuration meson
+#+DESCRIPTION: documents - structuring, various output representations & search
+#+FILETAGS: :spine:hub:
+#+AUTHOR: Ralph Amissah
+#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
+#+COPYRIGHT: Copyright (C) 2015 - 2021 Ralph Amissah
+#+LANGUAGE: en
+#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
+#+PROPERTY: header-args :exports code
+#+PROPERTY: header-args+ :noweb yes
+#+PROPERTY: header-args+ :eval no
+#+PROPERTY: header-args+ :results no
+#+PROPERTY: header-args+ :cache no
+#+PROPERTY: header-args+ :padline no
+#+PROPERTY: header-args+ :mkdirp yes
+
+* spine
+** version info VERSION :version:set:project:
+*** project
+
+#+NAME: version_spine
+#+BEGIN_SRC sh
+0.11.3
+#+END_SRC
+
+*** subprojects
+
+- d2sqlite3
+ https://code.dlang.org/packages/d2sqlite3
+
+#+NAME: version_d2sqlite3
+#+BEGIN_SRC sh
+0.19.1
+#+END_SRC
+
+- imageformats
+ https://code.dlang.org/packages/imageformats
+
+#+NAME: version_imageformats
+#+BEGIN_SRC sh
+7.0.2
+#+END_SRC
+
+- dyaml
+ https://code.dlang.org/packages/dyaml
+
+#+NAME: version_dyaml
+#+BEGIN_SRC sh
+0.8.3
+#+END_SRC
+
+- tinyendian
+ https://code.dlang.org/packages/tinyendian
+
+#+NAME: version_tinyendian
+#+BEGIN_SRC sh
+0.2.0
+#+END_SRC
+
+*** build tools if specified
+
+- meson
+
+#+NAME: version_meson
+#+BEGIN_SRC sh
+0.46
+#+END_SRC
+
+- soversion
+
+#+NAME: version_soversion
+#+BEGIN_SRC sh
+0
+#+END_SRC
+
+** meson REVISIT :meson:build:
+*** notes
+
+https://mesonbuild.com/D.html
+https://mesonbuild.com/Dependencies.html#Dub
+- create and move to subdirectory
+ rm -r build; mkdir build && cd build
+
+- build
+
+ - regular build (faster compile time):
+ meson && ninja
+
+ - optimized build (faster program run time):
+ meson --buildtype=debugoptimized && ninja
+
+ - time build
+ time ( meson --buildtype=debugoptimized && ninja )
+
+- other
+ - flags
+ DFLAGS= DC=ldc2 meson ..
+
+**** projects :project:
+
+ls -1 ./src/*/**/*.d
+tree -fi ./src |rg "\.d$"
+fdfind -e .d
+
+tree -if src | rg ".+\.d$" > spine_sources.txt && \
+for i in spine_sources.txt; do; \
+sed -i "s/\(.\+\.d$\)/ '\1',/g" $i; done && \
+cat spine_sources.txt
+
+***** project meson.build :filelist:
+
+#+HEADER: :tangle ../meson.build
+#+BEGIN_SRC sh
+project('spine', 'd',
+ license: 'AGPL-3',
+ version: '<<version_spine>>',
+ meson_version: '>=<<version_meson>>'
+)
+#if meson.get_compiler('d').get_id() == 'gcc'
+# error('spine cannot be compiled with GDC at time. Sorry.')
+#endif
+spine_src = [
+ 'src/doc_reform/spine.d',
+ 'src/doc_reform/conf/compile_time_info.d',
+ 'src/doc_reform/io_in/paths_source.d',
+ 'src/doc_reform/io_in/read_config_files.d',
+ 'src/doc_reform/io_in/read_source_files.d',
+ 'src/doc_reform/io_out/cgi_sqlite_search_form.d',
+ 'src/doc_reform/io_out/create_zip_file.d',
+ 'src/doc_reform/io_out/defaults.d',
+ 'src/doc_reform/io_out/epub3.d',
+ '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',
+ 'src/doc_reform/io_out/rgx.d',
+ 'src/doc_reform/io_out/source_pod.d',
+ 'src/doc_reform/io_out/sqlite.d',
+ 'src/doc_reform/io_out/xmls_css.d',
+ 'src/doc_reform/io_out/xmls.d',
+ 'src/doc_reform/meta/conf_make_meta_json.d',
+ 'src/doc_reform/meta/conf_make_meta_structs.d',
+ 'src/doc_reform/meta/conf_make_meta_yaml.d',
+ 'src/doc_reform/meta/defaults.d',
+ 'src/doc_reform/meta/doc_debugs.d',
+ 'src/doc_reform/meta/metadoc.d',
+ 'src/doc_reform/meta/metadoc_from_src.d',
+ 'src/doc_reform/meta/metadoc_harvest.d',
+ 'src/doc_reform/meta/metadoc_harvests_authors.d',
+ 'src/doc_reform/meta/metadoc_harvests_topics.d',
+ 'src/doc_reform/meta/metadoc_object_setter.d',
+ 'src/doc_reform/meta/metadoc_show_config.d',
+ 'src/doc_reform/meta/metadoc_show_make.d',
+ 'src/doc_reform/meta/metadoc_show_metadata.d',
+ 'src/doc_reform/meta/metadoc_show_summary.d',
+ 'src/doc_reform/meta/package.d',
+ 'src/doc_reform/meta/rgx.d',
+ 'src/doc_reform/share/defaults.d',
+]
+source_root = meson.source_root()
+src_dir = include_directories('src/')
+# Dependencies
+dep_tinyendian = dependency('tinyendian', version: '>= <<version_tinyendian>>', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub')
+dep_dyaml = dependency('dyaml', version: '>= <<version_dyaml>>', fallback: ['dyaml', 'dyaml_dep'], method: 'dub')
+dep_d2sqlite3 = dependency('d2sqlite3', version: '>= <<version_d2sqlite3>>', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub')
+dep_imageformats = dependency('imageformats', version: '>= <<version_imageformats>>', fallback: ['imageformats', 'imageformats_dep'], method: 'dub')
+# Executable
+spine_exe = executable('spine',
+ [spine_src],
+ include_directories : [src_dir],
+ d_import_dirs: [include_directories('views')],
+ dependencies : [
+ dep_tinyendian,
+ dep_dyaml,
+ dep_d2sqlite3,
+ dep_imageformats,
+ ],
+ install : true
+)
+#+END_SRC
+
+*** meson subprojects [taken care of using dub] :subprojects:
+**** README
+
+#+HEADER: :tangle ../subprojects/README
+#+BEGIN_SRC txt
+- d2sqlite3
+ - dub
+ - https://code.dlang.org/packages/d2sqlite3
+ - upstream
+ - https://github.com/dlang-community/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
+ - https://code.dlang.org/packages/tinyendian
+ - upstream git clone
+ - https://github.com/dlang-community/tinyendian.git
+#+END_SRC
+
+**** d2sqlite3 :d2sqlite3:
+***** wrap
+
+#+HEADER: :tangle ../subprojects/d2sqlite3.wrap
+#+BEGIN_SRC sh
+[wrap-git]
+directory = d2sqlite3
+url = https://github.com/dlang-community/d2sqlite3.git
+revision = head
+#+END_SRC
+
+***** meson.build
+
+#+HEADER: :NO-tangle ../subprojects/d2sqlite3.meson.build
+#+BEGIN_SRC sh
+project('d2sqlite3', 'd',
+ meson_version: '>=<<version_meson>>',
+ license: 'BSL-1.0',
+ version: '<<version_d2sqlite3>>'
+)
+
+project_soversion = '<<version_soversion>>'
+
+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 :dyaml:
+***** wrap
+
+#+HEADER: :tangle ../subprojects/dyaml.wrap
+#+BEGIN_SRC sh
+[wrap-git]
+directory = dyaml
+url = https://github.com/dlang-community/D-YAML.git
+revision = head
+#+END_SRC
+
+***** meson.build (provided by upstream)
+
+Upstream provides meson.build
+
+#+HEADER: :NO-tangle ../subprojects/D-YAML/meson.build
+#+BEGIN_SRC sh
+project('D-YAML', 'd',
+ meson_version: '>=<<version_meson>>',
+ subproject_dir: 'contrib',
+ version: '<<version_dyaml>>'
+)
+
+project_soversion = '<<version_soversion>>'
+
+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: '>=<<version_tinyendian>>', 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 :imageformats:
+***** wrap
+
+#+HEADER: :tangle ../subprojects/imageformats.wrap
+#+BEGIN_SRC sh
+[wrap-git]
+directory = imageformats
+url = https://github.com/lgvz/imageformats.git
+revision = head
+#+END_SRC
+
+***** meson.build
+
+#+HEADER: :NO-tangle ../subprojects/imageformats.meson.build
+#+BEGIN_SRC sh
+project('imageformats', 'd',
+ meson_version: '>=<<version_meson>>',
+ license: 'BSL-1.0',
+ version: '<<version_imageformats>>'
+)
+
+project_soversion = '<<version_soversion>>'
+
+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) :tinyendian:
+***** wrap
+
+#+HEADER: :tangle ../subprojects/tinyendian.wrap
+#+BEGIN_SRC sh
+[wrap-git]
+directory = tinyendian
+url = https://github.com/dlang-community/tinyendian.git
+revision = head
+#+END_SRC
+
+***** meson.build (provided by upstream)
+
+Upstream provides meson.build
+
+#+HEADER: :NO-tangle ../subprojects/tinyendian/meson.build
+#+BEGIN_SRC sh
+# -*- mode: python; -*-
+
+project(
+ 'tinyendian',
+ 'd',
+ meson_version: '>=<<version_meson>>',
+ version: '<<version_tinyendian>>',
+ 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