From patchwork Wed Dec 6 00:45:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19283 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8FF38C322E for ; Wed, 6 Dec 2023 00:45:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4092861D9F; Wed, 6 Dec 2023 01:45:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701823509; bh=20tRpUEVHNyGqBSnxmCnpZixc6NaDA33hJZM7/dPuhE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=EZfM4lyJTOTBSBY4nGqAuvBBW4dQXcFsbRRDU4a6B3tl9/ADD1RTrZUp7K1Be+kxK /GFMYuRosU+OlF+Ofu9rQaByFzDI61KlUqTFjiveunsyKu9CuhtjulqsSy5h25Tl1B 2skOrtTL7NQhwWMeVowNWEa4+IepF5UdxlCn4bX7pfKzVbSQtUybG9TfQHstQSvjvG hei80uTp4P1TBJ2ZgBrK9mU8MfXmjdukyO1QCvB0L5ByToUfNdHLZpsiQH/UuPaoEC bFlZTMfa6jtaH7Z0SEMtr5QS+Vs87VAxl44LS8ySnD2hF0rKoFrqBnoMn66QRENPZ2 D23I/hcPNaYsA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A8CF61D9C for ; Wed, 6 Dec 2023 01:45:07 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eWU9FCLk"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1029F14DC for ; Wed, 6 Dec 2023 01:44:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701823467; bh=20tRpUEVHNyGqBSnxmCnpZixc6NaDA33hJZM7/dPuhE=; h=From:To:Subject:Date:From; b=eWU9FCLkBjlHEG2xPGJ2c/IECozr5OKci7CO0yzBia+L6LIGWKptLsV7T4qZBUCzV YC0bBOk4hACvxs7Z7bbduZ+SeanrkZHaZT0z6mCq4Wp0JmvSWMwCSyd7QMh1n0kdXJ 7Um+oHjn3rBo9e20dG8rTtXVpLY2bIljPIldwiIE= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 02:45:14 +0200 Message-ID: <20231206004514.18474-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] meson: Tag all installed files X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Meson uses tags to sort installed files in categories, and makes it possible to install a subset of the files using the '--tags' argument to 'meson install'. This is typically used by distributions to split the runtime, development and documentation files into separate packages. By default, meson tries to guess the correct tag for installed files, but can't always do so properly. Mark the install targets that meson can't guess with the correct install_tag. As the feature has been introduced in meson 0.60, bump the minimum meson version. The latest LTS release of all major distributions that libcamera currently targets ship a recent enough meson version. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- Documentation/meson.build | 6 ++++-- README.rst | 2 +- meson.build | 2 +- src/apps/cam/meson.build | 3 ++- src/apps/lc-compliance/meson.build | 3 ++- src/apps/qcam/meson.build | 1 + src/ipa/ipu3/data/meson.build | 3 ++- src/ipa/meson.build | 3 ++- src/ipa/rkisp1/data/meson.build | 3 ++- src/ipa/rpi/vc4/data/meson.build | 3 ++- src/ipa/vimc/data/meson.build | 3 ++- src/libcamera/pipeline/rpi/vc4/data/meson.build | 3 ++- src/py/libcamera/meson.build | 5 ++++- src/v4l2/meson.build | 3 ++- 14 files changed, 29 insertions(+), 14 deletions(-) base-commit: 4eba2dc73c096d037a8a6390ff4a91ebbf1cedd4 diff --git a/Documentation/meson.build b/Documentation/meson.build index 3eb2897e6b2b..7a58fec8dc29 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -49,7 +49,8 @@ if doxygen.found() and dot.found() output : 'api-html', command : [doxygen, doxyfile], install : true, - install_dir : doc_install_dir) + install_dir : doc_install_dir, + install_tag : 'doc') endif # @@ -91,7 +92,8 @@ if sphinx.found() output : 'html', build_by_default : true, install : true, - install_dir : doc_install_dir) + install_dir : doc_install_dir, + install_tag : 'doc') custom_target('documentation-linkcheck', command : [sphinx, '-W', '-b', 'linkcheck', meson.current_source_dir(), '@OUTPUT@'], diff --git a/README.rst b/README.rst index 4cb996375a9a..4db454de4e02 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ A C++ toolchain: [required] Either {g++, clang} Meson Build system: [required] - meson (>= 0.57) ninja-build pkg-config + meson (>= 0.60) ninja-build pkg-config for the libcamera core: [required] libyaml-dev python3-yaml python3-ply python3-jinja2 diff --git a/meson.build b/meson.build index ee57cb780149..e49de4c259f2 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: CC0-1.0 project('libcamera', 'c', 'cpp', - meson_version : '>= 0.57', + meson_version : '>= 0.60', version : '0.1.0', default_options : [ 'werror=true', diff --git a/src/apps/cam/meson.build b/src/apps/cam/meson.build index 48c834ace71b..c70ca3cd2f8f 100644 --- a/src/apps/cam/meson.build +++ b/src/apps/cam/meson.build @@ -58,4 +58,5 @@ cam = executable('cam', cam_sources, libyaml, ], cpp_args : cam_cpp_args, - install : true) + install : true, + install_tag : 'bin') diff --git a/src/apps/lc-compliance/meson.build b/src/apps/lc-compliance/meson.build index 51d9075ac30b..dd7b73abbcef 100644 --- a/src/apps/lc-compliance/meson.build +++ b/src/apps/lc-compliance/meson.build @@ -26,4 +26,5 @@ lc_compliance = executable('lc-compliance', lc_compliance_sources, libevent, libgtest, ], - install : true) + install : true, + install_tag : 'bin-devel') diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build index 2e77146cf73c..6cf4c171e668 100644 --- a/src/apps/qcam/meson.build +++ b/src/apps/qcam/meson.build @@ -63,6 +63,7 @@ resources = qt5.preprocess(moc_headers : qcam_moc_headers, qcam = executable('qcam', qcam_sources, resources, install : true, + install_tag : 'bin', link_with : apps_lib, dependencies : [ libatomic, diff --git a/src/ipa/ipu3/data/meson.build b/src/ipa/ipu3/data/meson.build index 1f50b6301f77..0f7cd5c64caa 100644 --- a/src/ipa/ipu3/data/meson.build +++ b/src/ipa/ipu3/data/meson.build @@ -5,4 +5,5 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : ipa_data_dir / 'ipu3') + install_dir : ipa_data_dir / 'ipu3', + install_tag : 'runtime') diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 903eb52ba60f..48793e07e04c 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -72,5 +72,6 @@ if ipa_sign_module # install time, which invalidates the signatures. meson.add_install_script('ipa-sign-install.sh', ipa_priv_key.full_path(), - enabled_ipa_modules) + enabled_ipa_modules, + install_tag : 'runtime') endif diff --git a/src/ipa/rkisp1/data/meson.build b/src/ipa/rkisp1/data/meson.build index f5e9fa75eaa1..7150e1550422 100644 --- a/src/ipa/rkisp1/data/meson.build +++ b/src/ipa/rkisp1/data/meson.build @@ -8,4 +8,5 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : ipa_data_dir / 'rkisp1') + install_dir : ipa_data_dir / 'rkisp1', + install_tag : 'runtime') diff --git a/src/ipa/rpi/vc4/data/meson.build b/src/ipa/rpi/vc4/data/meson.build index bcf5658ba5d2..b4e45ad8d204 100644 --- a/src/ipa/rpi/vc4/data/meson.build +++ b/src/ipa/rpi/vc4/data/meson.build @@ -23,4 +23,5 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : ipa_data_dir / 'rpi' / 'vc4') + install_dir : ipa_data_dir / 'rpi' / 'vc4', + install_tag : 'runtime') diff --git a/src/ipa/vimc/data/meson.build b/src/ipa/vimc/data/meson.build index 42ec651ce81f..628d6a29e3ed 100644 --- a/src/ipa/vimc/data/meson.build +++ b/src/ipa/vimc/data/meson.build @@ -5,4 +5,5 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : ipa_data_dir / 'vimc') + install_dir : ipa_data_dir / 'vimc', + install_tag : 'runtime') diff --git a/src/libcamera/pipeline/rpi/vc4/data/meson.build b/src/libcamera/pipeline/rpi/vc4/data/meson.build index cca5e3885a4e..179feebc136d 100644 --- a/src/libcamera/pipeline/rpi/vc4/data/meson.build +++ b/src/libcamera/pipeline/rpi/vc4/data/meson.build @@ -5,4 +5,5 @@ conf_files = files([ ]) install_data(conf_files, - install_dir : pipeline_data_dir / 'rpi' / 'vc4') + install_dir : pipeline_data_dir / 'rpi' / 'vc4', + install_tag : 'runtime') diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build index 31af63ec0dc6..4807ca7d75ed 100644 --- a/src/py/libcamera/meson.build +++ b/src/py/libcamera/meson.build @@ -90,6 +90,7 @@ pycamera = shared_module('_libcamera', pycamera_sources, install : true, install_dir : destdir, + install_tag : 'python-runtime', name_prefix : '', dependencies : pycamera_deps, cpp_args : pycamera_args) @@ -105,7 +106,9 @@ run_command('ln', '-fsrT', meson.current_source_dir() / 'utils', meson.current_build_dir() / 'utils', check : true) -install_data(['__init__.py'], install_dir : destdir) +install_data(['__init__.py'], + install_dir : destdir, + install_tag : 'python-runtime') # \todo Generate stubs when building. See https://peps.python.org/pep-0484/#stub-files # Note: Depends on pybind11-stubgen. To generate pylibcamera stubs: diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index ab4b35dd0e6b..e88e0b33c51c 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -44,4 +44,5 @@ cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / libcamera_libexecdir / 'v4 configure_file(input : 'libcamerify.in', output : 'libcamerify', configuration : cdata, - install_dir : get_option('bindir')) + install_dir : get_option('bindir'), + install_tag : 'bin')