Hello community, here is the log from the commit of package mm-common for openSUSE:Factory checked in at 2020-06-11 10:00:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mm-common (Old) and /work/SRC/openSUSE:Factory/.mm-common.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mm-common" Thu Jun 11 10:00:20 2020 rev:7 rq:811865 version:1.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/mm-common/mm-common.changes 2019-11-03 11:54:01.227107765 +0100 +++ /work/SRC/openSUSE:Factory/.mm-common.new.3606/mm-common.changes 2020-06-11 10:00:39.882381149 +0200 @@ -1,0 +2,9 @@ +Thu Jun 4 18:48:44 UTC 2020 - Bjørn Lie <[email protected]> + +- Update to version 1.0.1: + + Make libstdc++.tag retrieval work for Windows + + skeletonmm/meson.build: Check if .git is a directory or a file + + util: Add check-dllexport-usage.py to check gmmproc version + + skeletonmm: Improve the Meson build system + +------------------------------------------------------------------- Old: ---- mm-common-1.0.0.tar.xz New: ---- mm-common-1.0.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mm-common.spec ++++++ --- /var/tmp/diff_new_pack.TyQARn/_old 2020-06-11 10:00:41.098385065 +0200 +++ /var/tmp/diff_new_pack.TyQARn/_new 2020-06-11 10:00:41.098385065 +0200 @@ -1,7 +1,7 @@ # # spec file for package mm-common # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2016 Bjørn Lie, Bryne, Norway. # # All modifications and additions to the file contributed by third parties @@ -18,13 +18,13 @@ Name: mm-common -Version: 1.0.0 +Version: 1.0.1 Release: 0 Summary: Common build files of the GNOME C++ bindings License: GPL-2.0-or-later Group: Development/Libraries/C and C++ URL: https://gtkmm.org -Source: http://download.gnome.org/sources/%{name}/1.0/%{name}-%{version}.tar.xz +Source: https://download.gnome.org/sources/%{name}/1.0/%{name}-%{version}.tar.xz Source99: mm-common-rpmlintrc BuildRequires: meson BuildRequires: pkgconfig ++++++ mm-common-1.0.0.tar.xz -> mm-common-1.0.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/ChangeLog new/mm-common-1.0.1/ChangeLog --- old/mm-common-1.0.0/ChangeLog 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/ChangeLog 2020-06-04 19:02:07.421745000 +0200 @@ -1,3 +1,79 @@ +2020-06-04 Kjell Ahlstedt <[email protected]> + + 1.0.1 + +2020-06-02 Kjell Ahlstedt <[email protected]> + + skeletonmm: Remove PERL_PATH from Doxygen.in + + Doxygen since version 1.8.0 does not use PERL_PATH and MSCGEN_PATH. + +2020-04-28 Kjell Ahlstedt <[email protected]> + + skeletonmm/skeleton/meson.build: Minor fix of generated .pc file + + libdir=${exec_prefix}/lib, as when it's generated with Autotools. + +2020-04-15 Kjell Ahlstedt <[email protected]> + + skeletonmm: Some fixes in the Meson build system + + * meson.build: Remove dist-cmd.py from the skeletonmm tarball. + * skeletonmm/doc/reference/meson.build: + * skeletonmm/skeleton/skeletonmm/meson.build: Don't use dist-cmd.py. + * skeletonmm/meson.build: Don't use dist-cmd.py. Add a better error message + if mm-common-get is required but not found. If not maintainer-mode, check + that generate-binding.py exists. + * skeletonmm/meson_options.txt: Default value of warnings is 'min'. + Add dist-warnings. + * skeletonmm/tools/dist-cmd.py: Removed file. It's not necessary in + add_dist_script() when the first parameter is python3.path(). + +2020-04-04 Chun-wei Fan <[email protected]> + + util: Add script to check gmmproc version + + This adds a new utility script for Meson builds to check on what gmmproc + version was used (or is to be used) to generate the sources, so that we + can know whether we are ready to use compiler directives to export + symbols by defining macros during the build of the various -mm C++ + modules. + +2020-01-13 Kjell Ahlstedt <[email protected]> + + skeletonmm Meson build: Improve internal dependencies + + * skeletonmm/doc/reference/meson.build: Less difference between + maintainer-mode and not maintainer-mode. + * keletonmm/skeleton/skeletonmm/meson.build: Make separate lists of + built .h files and built .cc files. + +2020-01-02 Kjell Ahlstedt <[email protected]> + + skeletonmm/doc/reference/meson.build: Check if perl is found + + Don't use perl.path() when configuring Doxyfile, if perl is not found. + Perl is not required, if build-documentation=false. + See https://github.com/libsigcplusplus/libsigcplusplus/issues/53 + +2019-12-27 Kjell Ahlstedt <[email protected]> + + skeletonmm/meson.build: Check if .git is a directory or a file + + In a git worktree, .git is a regular file. + + See MR pangomm!8 + +2019-12-20 Chun-wei Fan <[email protected]> + + Make libstdc++.tag retrieval work for Windows + + With this, the mm-common package will now build for Windows/MSVC; it + is still a long way to go to actually make it usable for Windows + + This ensures that we use the curl.exe and wget.exe that we happen to + find, and the corresponding DLLs of the libraries can be loaded. + 2019-10-29 Kjell Ahlstedt <[email protected]> 1.0.0 @@ -1558,83 +1634,3 @@ (MM_ARG_DISABLE_DEPRECATED_API): New M4 macro for use by C++ bindings in order to allow deprecated API to be omitted from the library build. -2009-08-17 Daniel Elstner <[email protected]> - - Strip '+' from tag file name for configure option - - * macros/mm-doc.m4 (MM_ARG_WITH_TAGFILE_DOC): Correct the regular - expression used to strip off the suffix of the tag file name in order - to produce a suitable name for the configure option. Specifically, - properly handle the case of both '++' and '-d.d' occuring together. - -2009-08-16 Daniel Elstner <[email protected]> - - Be more consistent about trailing slashes - - * build/doc-reference.am (htmlrefpub): Do append a trailing slash - after all, and say so in the documentation comment (Hi David!). - Although Doxygen adds the slash implicitly, doc-install.pl currently - does not, and explicit use of the slash is more consistent anyway. - (dist_devhelpDATA_INSTALL): Append a slash after $(htmlrefdir) for - consistency with the default $(htmlrefpub) value for --book-base. - * doctags/mm-common-libstdc++.pc.in (htmlrefpub): Append a slash. - * doctags/mm-common-libstdc++-uninstalled.pc.in (htmlrefpub): ditto. - -2009-08-15 Daniel Elstner <[email protected]> - - Briefly document _MM_ARG_ENABLE_WARNINGS_OPTION - -2009-08-15 Daniel Elstner <[email protected]> - - Bump version to mm-common 0.4 - - * configure.ac (AC_INIT): Increment version number to 0.4. - * NEWS: Change top entry to mention version 0.4, but state that - there has not actually been a release yet. - -2009-08-15 Daniel Elstner <[email protected]> - - Make MM_INIT_MODULE version argument optional - - * macros/mm-module.m4 (MM_INIT_MODULE): If no version argument has - been specified, use the expansion of AC_PACKAGE_VERSION as default - value. - -2009-08-15 Daniel Elstner <[email protected]> - - Reorganize and clean up MM_ARG_ENABLE_WARNINGS - - * macros/mm-warnings.m4 (_MM_ARG_ENABLE_WARNINGS_OPTION): Move the - AC_ARG_ENABLE() call from MM_ARG_ENABLE_WARNINGS() to this separate - macro, in order to use it via AC_REQUIRE(). Although Autoconf deals - correctly with duplicated calls to AC_ARG_ENABLE(), it is made more - explicit this way and avoids repeating the variable assignment. - (MM_ARG_ENABLE_WARNINGS): Require _MM_ARG_ENABLE_WARNINGS_OPTION and - _MM_PRE_INIT. If the current language could not be detected as C or - C++ at runtime, bail out with an error message instead of silently - ignoring the request to gather compiler warning flags. Also, avoid - emitting dead shell commands if the deprecation-prefixes argument is - not used. - -2009-08-15 Daniel Elstner <[email protected]> - - Restructure and comment MM_ARG_WITH_TAGFILE_DOC - - * macros/mm-doc.m4 (_MM_ARG_WITH_TAGFILE_DOC): Add a fourth parameter - pkg-variable to avoid repeating the M4 expression to select between - the ${htmlrefdir} and ${htmlrefpub} values for @DOXYGEN_TAGFILES@. - Simplify the AS_CASE logic used to test for a trailing slash. Move - the code which appends a trailing slash to ${htmlrefpub} to a later - point in the shell execution, in order to correctly append the slash - to a user-supplied local path as well. - (MM_ARG_WITH_TAGFILE_DOC): Pass the additional pkg-variable argument - to _MM_ARG_WITH_TAGFILE_DOC(). - -2009-08-15 Daniel Elstner <[email protected]> - - Require _MM_PRE_INIT in MM_PKG_CONFIG_SUBST - -2009-08-15 Daniel Elstner <[email protected]> - - Remove _MM_PRE_INIT from mm-module.m4 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/Makefile.am new/mm-common-1.0.1/Makefile.am --- old/mm-common-1.0.0/Makefile.am 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/Makefile.am 2020-06-04 19:02:07.241744300 +0200 @@ -30,6 +30,7 @@ am_include/dist-changelog.am \ am_include/doc-reference.am \ am_include/generate-binding.am \ + util/build_scripts/check-dllexport-usage.py \ util/build_scripts/dist-build-scripts.py \ util/build_scripts/dist-changelog.py \ util/build_scripts/doc-reference.py \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/NEWS new/mm-common-1.0.1/NEWS --- old/mm-common-1.0.0/NEWS 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/NEWS 2020-06-04 19:02:07.241744300 +0200 @@ -1,3 +1,15 @@ +mm-common 1.0.1 (2020-06-04) + +* Make libstdc++.tag retrieval work for Windows + (Chun-wei Fan) Merge request !3 +* skeletonmm/meson.build: Check if .git is a directory or a file + (Kjell Ahlstedt) Merge request pangomm!8 (Ting-Wei Lan) +* util: Add check-dllexport-usage.py to check gmmproc version + (Chun-wei Fan) Merge request !5 +* skeletonmm: Improve the Meson build system + (Kjell Ahlstedt) + + mm-common 1.0.0 (2019-10-29) * Rename directory build/ to am_include/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/README new/mm-common-1.0.1/README --- old/mm-common-1.0.0/README 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/README 2020-06-04 19:02:07.241744300 +0200 @@ -221,6 +221,11 @@ not checked into the git repository. All .gitignore files and an empty build/ directory are removed +util/build_scripts/check-dllexport-usage.py: + Command that checks on the gmmproc version that is to be used or been used + to generate the sources, to check whether to use compiler directives to + export symbols. Only used for Visual Studio or clang-cl builds. + Documentation utilities (Meson and Autotools) --------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/configure.ac new/mm-common-1.0.1/configure.ac --- old/mm-common-1.0.0/configure.ac 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/configure.ac 2020-06-04 19:02:07.245744500 +0200 @@ -15,7 +15,7 @@ ## You should have received a copy of the GNU General Public License ## along with mm-common. If not, see <http://www.gnu.org/licenses/>. -AC_INIT([mm-common], [1.0.0], [https://gitlab.gnome.org/GNOME/mm-common/issues/], +AC_INIT([mm-common], [1.0.1], [https://gitlab.gnome.org/GNOME/mm-common/issues/], [mm-common], [http://www.gtkmm.org/]) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([util/mm-common-prepare.in]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/meson.build new/mm-common-1.0.1/meson.build --- old/mm-common-1.0.0/meson.build 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/meson.build 2020-06-04 19:02:07.245744500 +0200 @@ -1,7 +1,7 @@ # This file is part of mm-common. project('mm-common', - version: '1.0.0', + version: '1.0.1', meson_version: '>= 0.50.0', # required for python3.path() license: 'GPLv2+' ) @@ -73,6 +73,7 @@ # These are installed so that mm-common-get can copy them # into projects at Meson setup or configure time. meson_build_support_basefiles = [ + 'check-dllexport-usage.py', 'dist-build-scripts.py', 'dist-changelog.py', 'doc-reference.py', @@ -236,7 +237,6 @@ 'tests/meson.build', 'tests/test1/main.cc', 'tests/test2/main.cc', - 'tools/dist-cmd.py', 'tools/generate_defs_and_docs.sh', 'tools/extra_defs_gen/generate_defs_skeleton.cc', 'tools/extra_defs_gen/meson.build', @@ -274,10 +274,11 @@ download_cmd = 'none' if get_option('use-network') curl = find_program('curl', required: false) - download_cmd = 'curl' - if not curl.found() + if curl.found() + download_cmd = curl.path() + else wget = find_program('wget', required: true) - download_cmd = 'wget' + download_cmd = wget.path() endif endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/doc/reference/Doxyfile.in new/mm-common-1.0.1/skeletonmm/doc/reference/Doxyfile.in --- old/mm-common-1.0.0/skeletonmm/doc/reference/Doxyfile.in 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/doc/reference/Doxyfile.in 2020-06-04 19:02:07.273744600 +0200 @@ -311,12 +311,10 @@ ALLEXTERNALS = NO EXTERNAL_GROUPS = NO EXTERNAL_PAGES = YES -PERL_PATH = @PERL@ #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES -MSCGEN_PATH = DIA_PATH = HIDE_UNDOC_RELATIONS = NO HAVE_DOT = YES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/doc/reference/meson.build new/mm-common-1.0.1/skeletonmm/doc/reference/meson.build --- old/mm-common-1.0.0/skeletonmm/doc/reference/meson.build 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/doc/reference/meson.build 2020-06-04 19:02:07.309744600 +0200 @@ -1,8 +1,8 @@ # doc/reference -# Input: built_files_root, project_source_root, skeletonmm_pcname, perl, -# hg_ccg_basenames, extra_h_files, built_file_targets, install_datadir, -# dist_cmd, python3 +# Input: built_files_root, project_source_root, skeletonmm_pcname, python3, +# hg_ccg_basenames, extra_h_files, built_h_file_targets, install_datadir, +# doc_reference # Output: install_docdir, install_devhelpdir tag_file_modules = [ @@ -44,7 +44,6 @@ doc_conf_data.set('abs_top_srcdir', project_source_root) doc_conf_data.set('SKELETONMM_MODULE_NAME', book_name) doc_conf_data.set('DOXYGEN_TAGFILES', doxygen_tagfiles) -doc_conf_data.set('PERL', perl.path()) configure_file( input: 'Doxyfile.in', @@ -81,40 +80,34 @@ doctool_dir = project_source_root / 'untracked' / 'doc' # MMDOCTOOLDIR doctool_dist_dir = 'untracked' / 'doc' # Relative to MESON_DIST_ROOT -if built_file_targets.length() > 0 +doc_h_files = src_h_files +if built_h_file_targets.length() > 0 # .h files have been generated from .hg files (maintainer mode). - tag_file = custom_target('html_and_tag', - input: src_h_files, - output: book_name + '.tag', - command: [ - python3, doc_reference, 'doxygen', - doctool_dir, - '@OUTPUT@', - built_h_files, - '@INPUT@', - ], - build_by_default: build_documentation, - depends: built_file_targets, - install: true, - install_dir: install_reference_docdir, - ) + # Use built_h_file_targets instead of built_h_files here, or else Meson won't + # know that Doxygen must not be executed until the .h files have been built. + doc_h_files += built_h_file_targets else # All .h files are stored in the source tree (not maintainer mode). - tag_file = custom_target('html_and_tag', - input: src_h_files + built_h_files, - output: book_name + '.tag', - command: [ - python3, doc_reference, 'doxygen', - doctool_dir, - '@OUTPUT@', - '@INPUT@', - ], - build_by_default: build_documentation, - install: true, - install_dir: install_reference_docdir, - ) + doc_h_files += built_h_files endif +# Can't use @INPUT@ in the command. It requires absolute file paths. +# Paths in built_h_file_targets are relative to project_build_root. +tag_file = custom_target('html_and_tag', + input: doc_h_files, + output: book_name + '.tag', + command: [ + python3, doc_reference, 'doxygen', + doctool_dir, + '@OUTPUT@', + src_h_files, + built_h_files, + ], + build_by_default: build_documentation, + install: true, + install_dir: install_reference_docdir, +) + devhelp_file = custom_target('devhelp', input: tag_file, output: book_name + '.devhelp2', @@ -143,7 +136,6 @@ # Distribute built files and files copied by mm-common-prepare. # (add_dist_script() is not allowed in a subproject) meson.add_dist_script( - python3.path(), dist_cmd, python3.path(), doc_reference, 'dist_doc', doctool_dir, doctool_dist_dir, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/meson.build new/mm-common-1.0.1/skeletonmm/meson.build --- old/mm-common-1.0.0/skeletonmm/meson.build 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/meson.build 2020-06-04 19:02:07.309744600 +0200 @@ -44,22 +44,29 @@ endif # Do we build from a git repository? -# Suppose we do if and only if a .git directory exists. +# Suppose we do if and only if a '.git' directory or file exists. cmd_py = ''' import os import sys -sys.exit(0 if os.path.isdir("@0@") else 1) +sys.exit(os.path.isdir("@0@") or os.path.isfile("@0@")) '''.format(project_source_root / '.git') -is_git_build = run_command(python3, '-c', cmd_py).returncode() == 0 -# In Unix-like system, an alternative is -# is_git_build = run_command('test', '-d', project_source_root / '.git').returncode() == 0 -# Python code can be used in all operating sytems where Meson can run. +is_git_build = run_command(python3, '-c', cmd_py).returncode() != 0 + +# Are we testing a dist tarball while it's being built? +is_dist_check = project_source_root.contains('dist-unpack') and \ + project_build_root.contains('dist-build') # Options. maintainer_mode_opt = get_option('maintainer-mode') maintainer_mode = maintainer_mode_opt == 'true' or \ (maintainer_mode_opt == 'if-git-build' and is_git_build) -warning_level = get_option('warnings') +if is_dist_check + message('Looks like a tarball is being tested. ' + \ + 'Option "dist-warnings" is used instead of "warnings".') + warning_level = get_option('dist-warnings') +else + warning_level = get_option('warnings') +endif build_deprecated_api = get_option('build-deprecated-api') build_documentation_opt = get_option('build-documentation') build_documentation = build_documentation_opt == 'true' or \ @@ -90,7 +97,10 @@ # Some dependencies are required only in maintainer mode and/or if # reference documentation shall be built. -mm_common_get = find_program('mm-common-get', required: maintainer_mode) +mm_common_get = find_program('mm-common-get', required: false) +if maintainer_mode and not mm_common_get.found() + error('mm-common-get not found. mm-common >= 1.0.0 is required.') +endif m4 = find_program('m4', required: maintainer_mode) # Used by gmmproc (in glibmm) perl = find_program('perl', required: maintainer_mode or build_documentation) doxygen = find_program('doxygen', required: build_documentation) @@ -100,17 +110,28 @@ # Where to find gmmproc and generate_wrap_init.pl. gmmproc_dir = glibmm_dep.get_pkgconfig_variable('gmmprocdir') +# Script files copied to 'untracked' by mm-common-get. script_dir = project_source_root / 'untracked' / 'build_scripts' generate_binding = script_dir / 'generate-binding.py' doc_reference = script_dir / 'doc-reference.py' dist_changelog = script_dir / 'dist-changelog.py' dist_build_scripts = script_dir / 'dist-build-scripts.py' -dist_cmd = project_source_root / 'tools' / 'dist-cmd.py' # Must be committed to git. +check_dllexport_usage = script_dir / 'check-dllexport-usage.py' -if maintainer_mode and mm_common_get.found() +if maintainer_mode # Copy files to untracked/build_scripts and untracked/doc. run_command(mm_common_get, '--force', script_dir, project_source_root / 'untracked' / 'doc') +else + cmd_py = ''' +import os +import sys +sys.exit(os.path.isfile("@0@")) +'''.format(generate_binding) + file_exists = run_command(python3, '-c', cmd_py).returncode() != 0 + if not file_exists + error('Missing files in untracked/. You must enable maintainer-mode.') + endif endif cpp_compiler = meson.get_compiler('cpp') @@ -143,14 +164,12 @@ # Add a ChangeLog file to the distribution directory. # (add_dist_script() is not allowed in a subproject) meson.add_dist_script( - python3.path(), dist_cmd, python3.path(), dist_changelog, project_source_root, ) # Add build scripts to the distribution directory, and delete .gitignore # files and an empty $MESON_DIST_ROOT/build/ directory. meson.add_dist_script( - python3.path(), dist_cmd, python3.path(), dist_build_scripts, project_source_root, 'untracked' / 'build_scripts', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/meson_options.txt new/mm-common-1.0.1/skeletonmm/meson_options.txt --- old/mm-common-1.0.0/skeletonmm/meson_options.txt 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/meson_options.txt 2020-06-04 19:02:07.309744600 +0200 @@ -1,7 +1,9 @@ option('maintainer-mode', type: 'combo', choices: ['false', 'if-git-build', 'true'], value: 'if-git-build', description: 'Generate source code from .hg and .ccg files') -option('warnings', type: 'combo', choices: ['no', 'min', 'max', 'fatal'], value: 'fatal', - description: 'Compiler warning level') +option('warnings', type: 'combo', choices: ['no', 'min', 'max', 'fatal'], + value: 'min', description: 'Compiler warning level') +option('dist-warnings', type: 'combo', choices: ['no', 'min', 'max', 'fatal'], + value: 'fatal', description: 'Compiler warning level when a tarball is created') option('build-deprecated-api', type: 'boolean', value: true, description: 'Build deprecated API and include it in the library') option('build-documentation', type: 'combo', choices: ['false', 'if-maintainer-mode', 'true'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/skeleton/meson.build new/mm-common-1.0.1/skeletonmm/skeleton/meson.build --- old/mm-common-1.0.0/skeletonmm/skeleton/meson.build 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/skeleton/meson.build 2020-06-04 19:02:07.309744600 +0200 @@ -9,7 +9,7 @@ pkg_conf_data = configuration_data() pkg_conf_data.set('prefix', install_prefix) pkg_conf_data.set('exec_prefix', '${prefix}') -pkg_conf_data.set('libdir', '${prefix}' / install_libdir) +pkg_conf_data.set('libdir', '${exec_prefix}' / install_libdir) pkg_conf_data.set('datarootdir', '${prefix}' / install_datadir) pkg_conf_data.set('datadir', '${datarootdir}') pkg_conf_data.set('includedir', '${prefix}' / install_includedir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/skeleton/skeletonmm/meson.build new/mm-common-1.0.1/skeletonmm/skeleton/skeletonmm/meson.build --- old/mm-common-1.0.0/skeletonmm/skeleton/skeletonmm/meson.build 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/skeleton/skeletonmm/meson.build 2020-06-04 19:02:07.309744600 +0200 @@ -2,8 +2,8 @@ # Input: skeletonmm_build_dep, skeletonmm_pcname, maintainer_mode, project_source_root, # generate_binding, m4_files, skeletonmm_libversion, install_includedir, -# dist_cmd, python3 -# Output: hg_ccg_basenames, extra_h_files, built_file_targets, built_files_root, +# python3 +# Output: hg_ccg_basenames, extra_h_files, built_h_file_targets, built_files_root, # skeletonmm_dep defs_basefiles = [ @@ -43,6 +43,11 @@ # doc/reference/meson.build needs this. built_files_root = project_build_root + built_h_file_targets = [] + + # Force meson+ninja to generate source files before anything is compiled. + # Compilation must depend on these targets. + built_cc_file_targets = [] hg_files = [] foreach file : hg_ccg_basenames @@ -50,7 +55,7 @@ endforeach # Create wrap_init.cc in project_build_root/skeleton/skeletonmm. - wrap_init_target = custom_target('wrap_init.cc', + built_cc_file_targets += custom_target('wrap_init.cc', input: hg_files, output: 'wrap_init.cc', command: [ @@ -64,17 +69,13 @@ install: false, ) - # Force meson+ninja to generate source files before anything is compiled. - # Compilation must depend on these targets. - built_file_targets = [] - # Create .h/_p.h/.cc files from .hg/.ccg files in project_build_root/skeleton/skeletonmm. foreach file : hg_ccg_basenames hg_file = '..' / 'src' / file + '.hg' ccg_file = '..' / 'src' / file + '.ccg' - built_file_targets += custom_target(file + '.cc', + built_file_target = custom_target(file + '.cc', input: [hg_file, ccg_file], - output: [file + '.stamp', file + '.cc'], + output: [file + '.stamp', file + '.cc', file + '.h'], command: [ python3, generate_binding, 'gmmproc', gmmproc_dir, @@ -87,11 +88,13 @@ build_by_default: maintainer_mode, install: false, ) + built_cc_file_targets += built_file_target[1] + built_h_file_targets += built_file_target[2] endforeach extra_include_dirs = ['..'] skeletonmm_library = library(skeletonmm_pcname, - wrap_init_target, built_file_targets, extra_cc_files, + built_cc_file_targets, built_h_file_targets, extra_cc_files, version: skeletonmm_libversion, include_directories: extra_include_dirs, dependencies: skeletonmm_build_dep, @@ -106,8 +109,8 @@ # project_source_root/untracked/skeleton/skeletonmm. # doc/reference/meson.build needs these. - built_file_targets = [] built_files_root = project_source_root / 'untracked' + built_h_file_targets = [] # Two cases: # 1. The source code comes from a tarball, where the built files @@ -155,7 +158,6 @@ # Distribute built files. # (add_dist_script() is not allowed in a subproject) meson.add_dist_script( - python3.path(), dist_cmd, python3.path(), generate_binding, 'dist_built_files', built_h_cc_dir, untracked_skeletonmm, @@ -166,6 +168,7 @@ # This is useful in the main project when skeletonmm is used as a subproject. # It's also used when building example programs and test programs. skeletonmm_dep = declare_dependency( + sources: built_h_file_targets, link_with: skeletonmm_library, include_directories: extra_include_dirs, dependencies: skeletonmm_build_dep diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/tools/dist-cmd.py new/mm-common-1.0.1/skeletonmm/tools/dist-cmd.py --- old/mm-common-1.0.0/skeletonmm/tools/dist-cmd.py 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/tools/dist-cmd.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 - -# External command, intended to be called with meson.add_dist_script() in meson.build. -# meson.add_dist_script() can't call a script that's not committed to git. -# This script shall be committed. It can be used for calling other non-committed scripts. - -# dist-cmd.py <cmd> <args>... - -import sys -import subprocess - -sys.exit(subprocess.run(sys.argv[1:]).returncode) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/skeletonmm/untracked/README new/mm-common-1.0.1/skeletonmm/untracked/README --- old/mm-common-1.0.0/skeletonmm/untracked/README 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/skeletonmm/untracked/README 2020-06-04 19:02:07.313744500 +0200 @@ -19,7 +19,8 @@ doc-postprocess.pl doxygen-extra.css tagfile-to-devhelp2.xsl -untracked/build_scripts/dist-build-scripts.py +untracked/build_scripts/check-dllexport-usage.py + dist-build-scripts.py dist-changelog.py doc-reference.py generate-binding.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/util/build_scripts/check-dllexport-usage.py new/mm-common-1.0.1/util/build_scripts/check-dllexport-usage.py --- old/mm-common-1.0.0/util/build_scripts/check-dllexport-usage.py 1970-01-01 01:00:00.000000000 +0100 +++ new/mm-common-1.0.1/util/build_scripts/check-dllexport-usage.py 2020-06-04 19:02:07.313744500 +0200 @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +# +# Check for the first line in a file generated with gmmproc, +# to see which gmmproc version was used, to see whether +# to enable __declspec(dllexport to export symbols). This +# is *not* intended for source files that are not generated +# with gmmproc. +# +# Author: Chun-wei Fan April 2, 2020 + +import argparse +import os +import sys + +min_required_gmmproc_ver = '2.64.3' + +parser = argparse.ArgumentParser(description='Check gmmproc version used.') +parser.add_argument('--file', + dest='file', + help='Generated .cc/.h file to check gmmproc version') +parser.add_argument('--gmmprocdir', + dest='gmmprocdir', + help='Directory where gmmproc is located') +args = parser.parse_args() + +if args.file is None and args.gmmprocdir is None: + raise ValueError('Either --file or --gmmprocdir must be specified') + +if args.gmmprocdir is not None: + # gmmprocdir is specified: Check version string in gmmproc + gmmproc_path = os.path.join(args.gmmprocdir, 'gmmproc') + if not os.path.exists(gmmproc_path): + raise ValueError('A valid directory to locate gmmproc must be ' \ + 'specified with --gmmprocdir=<directory>') + + gmmproc_ver_str = None + with open(gmmproc_path, 'r') as f: + for line in f: + if line.startswith(' $main::glibmm_version = '): + gmmproc_ver_str = line[line.find('\"') + 1:line.rfind('\"')] + + if gmmproc_ver_str is None: + raise ValueError('The gmmproc at %s is invalid' % gmmproc_path) + + gmmproc_ver = gmmproc_ver_str.split('.') +else: + # A pre-generated file is specified via --file + if not os.path.exists(args.file): + raise FileNotFoundError('File specified with --file does not exist') + + # We only allow .h/.cc files to run this check + if not args.file.endswith('.cc') and \ + not args.file.endswith('.h'): + raise ValueError('Only .cc/.h files are accepted here') + + # Now grab the first line of the file we are checking for + f = open(args.file) + firstline = f.readline() + f.close() + + # Check for gmmproc signature... + if not firstline.startswith('// Generated by gmmproc '): + raise ValueError('Specified file is not generated by gmmproc') + + tokens = firstline.split() + gmmproc_ver = tokens[tokens.index('gmmproc') + 1].split('.') + +# Now compare the gmmproc version against the one we want +# (2.64.3 or later) +gmmproc_major = int(gmmproc_ver[0]) +gmmproc_minor = int(gmmproc_ver[1]) +gmmproc_micro = int(gmmproc_ver[2]) + +min_required_ver = min_required_gmmproc_ver.split('.') +min_major_ver = int(min_required_ver[0]) +min_minor_ver = int(min_required_ver[1]) +min_micro_ver = int(min_required_ver[2]) + +if gmmproc_major > min_major_ver or \ + (gmmproc_major == min_major_ver and \ + gmmproc_minor > min_minor_ver) or \ + (gmmproc_major == min_major_ver and \ + gmmproc_minor == min_minor_ver and \ + gmmproc_micro >= min_micro_ver): + sys.exit(0) +else: + sys.exit(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/util/build_scripts/dist-build-scripts.py new/mm-common-1.0.1/util/build_scripts/dist-build-scripts.py --- old/mm-common-1.0.0/util/build_scripts/dist-build-scripts.py 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/util/build_scripts/dist-build-scripts.py 2020-06-04 19:02:07.313744500 +0200 @@ -19,6 +19,7 @@ # Distribute files that mm-common-get has copied to src_script_dir. files = [ + 'check-dllexport-usage.py', 'dist-build-scripts.py', 'dist-changelog.py', 'doc-reference.py', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/util/meson_aux/libstdcxx-tag.py new/mm-common-1.0.1/util/meson_aux/libstdcxx-tag.py --- old/mm-common-1.0.0/util/meson_aux/libstdcxx-tag.py 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/util/meson_aux/libstdcxx-tag.py 2020-06-04 19:02:07.313744500 +0200 @@ -22,7 +22,7 @@ def curl(): cmd = [ - 'curl', + subcommand, '--compressed', '--connect-timeout', '300', '--globoff', @@ -43,7 +43,7 @@ def wget(): cmd = [ - 'wget', + subcommand, '--timestamping', '--no-directories', '--timeout=300', @@ -70,8 +70,9 @@ return 0 # ----- Main ----- -if subcommand == 'curl': +subcommand_base = os.path.splitext(os.path.basename(os.path.normpath(subcommand)))[0] +if subcommand_base == 'curl': sys.exit(curl()) -if subcommand == 'wget': +if subcommand_base == 'wget': sys.exit(wget()) sys.exit(dont_download_tag_file()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/util/mm-common-get.1.in new/mm-common-1.0.1/util/mm-common-get.1.in --- old/mm-common-1.0.0/util/mm-common-get.1.in 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/util/mm-common-get.1.in 2020-06-04 19:02:07.313744500 +0200 @@ -30,6 +30,8 @@ .BI "Meson build scripts copied to " BUILDSCRIPT-DIR : .PD 0 .IP +.I check-dllexport-usage.py +.IP .I dist-build-scripts.py .IP .I dist-changelog.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mm-common-1.0.0/util/mm-common-get.in new/mm-common-1.0.1/util/mm-common-get.in --- old/mm-common-1.0.0/util/mm-common-get.in 2019-10-29 18:37:45.000000000 +0100 +++ new/mm-common-1.0.1/util/mm-common-get.in 2020-06-04 19:02:07.313744500 +0200 @@ -41,7 +41,7 @@ print(progname + ': putting Meson build scripts in ' + buildscriptdir) # Create the destination directory, if it does not exist. os.makedirs(buildscriptdir, exist_ok=True) -for file in ['dist-build-scripts.py', 'dist-changelog.py', 'doc-reference.py', 'generate-binding.py']: +for file in ['check-dllexport-usage.py', 'dist-build-scripts.py', 'dist-changelog.py', 'doc-reference.py', 'generate-binding.py']: src_file = os.path.join(pkgdatadir, 'build', file) dest_file = os.path.join(buildscriptdir, file) # Don't update the timestamp of dest_file, if it's equal to src_file.
