Compare commits

...

10 Commits

Author SHA1 Message Date
David Abdurachmanov 10a853fcd0
Disable IPA
[..]
RPM build errors:
error: Directory not found: /builddir/build/BUILDROOT/libcamera-0.2.0-1.fc40.riscv64/usr/share/libcamera
error: Directory not found: /builddir/build/BUILDROOT/libcamera-0.2.0-1.fc40.riscv64/usr/lib64/libcamera
    Directory not found: /builddir/build/BUILDROOT/libcamera-0.2.0-1.fc40.riscv64/usr/share/libcamera
    Directory not found: /builddir/build/BUILDROOT/libcamera-0.2.0-1.fc40.riscv64/usr/lib64/libcamera
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-01-11 14:01:46 +02:00
Javier Martinez Canillas d3cc5ec78a
Update to version 0.2.0
Resolves: rhbz#2257601

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2024-01-10 19:08:12 +01:00
Terje Rosten 2d8a953446 Rebuild for gtest 1.14.0 2023-10-31 19:53:30 +01:00
Terje Rosten 4fe125b84b Add patch from upstream to build with sphinx 7.0+ 2023-10-21 18:53:03 +02:00
Miroslav Suchý b24ec75e78 fix typo from previous commit 2023-10-09 22:19:37 +02:00
Miroslav Suchý cb0af6441f Migrate to SPDX license
And clarify license according to COPYING and REUSE data in sources.

This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2
2023-09-18 05:48:02 +00:00
Javier Martinez Canillas 30d7f34f79
Update to version 0.1.0
Resolves: rhbz#2192455

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2023-07-30 12:26:34 +02:00
Fedora Release Engineering d3c9e59621 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 10:25:46 +00:00
Yaakov Selkowitz 8427a57b83 Disable qcam on RHEL 10
RHEL 10 is dropping support for Qt 5.
2023-07-11 17:37:31 -04:00
Yaakov Selkowitz 555acc4bdd Fix build with Python 3.12
utils/ipc/mojo is imported from Chromium, so it will take some
time to get this upstreamed.
2023-07-11 17:34:37 -04:00
4 changed files with 228 additions and 10 deletions

View File

@ -0,0 +1,41 @@
commit 6cb92b523bd60bd7718df134cc5b1eff51cf42e5
Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Fri Jul 28 22:11:45 2023 +0300
Documentation: theme: Fix compilation with Sphinx >= 7.0.0
Sphinx 7.0.0 has dropped support for the deprecated 'style' variable
(https://github.com/sphinx-doc/sphinx/pull/11381). This breaks
compilation of the documentation:
/usr/bin/sphinx-build -D release=v0.1.0+16-eed6a079 -q -W -b html Documentation Documentation/html
Theme error:
An error happened in rendering the page api-html/index.
Reason: UndefinedError("'style' is undefined")
The recommended replacement is 'styles[-1]'. However, this resolves to
'_static/css/theme.css', which is part of the 'css_styles' variable, and
results in the stylesheet being included twice. To avoid that and fix
the compilation error, simply drop the first reference.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html
index fcc6d221..4fffefab 100644
--- a/Documentation/theme/layout.html
+++ b/Documentation/theme/layout.html
@@ -33,11 +33,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0
{% endif %}
- {# RTD hosts this file, so just load on non RTD builds #}
- {% if not READTHEDOCS %}
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
- {% endif %}
-
{% for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{% endfor %}

View File

@ -1,9 +1,11 @@
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
Name: libcamera
Version: 0.0.5
Release: 3%{?dist}
Version: 0.2.0
Release: 1.0.riscv64%{?dist}
Summary: A library to support complex camera ISPs
# Library is LGPLv2.1+ and the cam tool is GPLv2
License: LGPLv2+ and GPLv2
# see .reuse/dep5 and COPYING for details
License: LGPL-2.1-or-later
URL: http://libcamera.org/
# libcamera is not expected to be used in these architectures
@ -19,8 +21,6 @@ Source0: %{name}-%{version}.tar.xz
Source1: qcam.desktop
Source2: qcam.metainfo.xml
Patch01: v4l2-Move-the-v4l2-compat-layer-to-libexec-libcamera.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: gtest-devel
@ -40,9 +40,11 @@ BuildRequires: libtiff-devel
BuildRequires: libyaml-devel
BuildRequires: lttng-ust-devel
BuildRequires: systemd-devel
%if %{with qt}
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
%endif
BuildRequires: pkgconfig(gstreamer-video-1.0)
BuildRequires: pkgconfig(gstreamer-allocators-1.0)
@ -64,32 +66,39 @@ Files for development with %{name}.
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
License: LGPL-2.1-or-later AND CC-BY-4.0
%description doc
HTML based documentation for %{name} including getting started and API.
%ifnarch riscv64
%package ipa
Summary: ISP Image Processing Algorithm Plugins for %{name}
License: LGPL-2.1-or-later AND BSD-2-Clause
Requires: %{name}%{?_isa} = %{version}-%{release}
%description ipa
Image Processing Algorithms plugins for interfacing with device
ISPs for %{name}
%endif
%package tools
Summary: Tools for %{name}
License: LGPL-2.1-or-later AND BSD-3-Clause
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tools
Command line tools for %{name}
%if %{with qt}
%package qcam
Summary: Graphical QCam application for %{name}
License: GPL-2.0-or-later AND MIT
Requires: %{name}%{?_isa} = %{version}-%{release}
%description qcam
Graphical QCam application for %{name}
%endif
%package gstreamer
Summary: GSTreamer plugin for %{name}
@ -124,7 +133,7 @@ export CFLAGS="${CFLAGS} -mabi=ieeelongdouble"
export CXXFLAGS="${CXXFLAGS} -mabi=ieeelongdouble"
%endif
%meson -Dv4l2=true
%meson -Dv4l2=true %{!?with_qt:-Dqcam=disabled}
%meson_build
# Stripping requires the re-signing of IPA libraries, manually
@ -139,6 +148,7 @@ export CXXFLAGS="${CXXFLAGS} -mabi=ieeelongdouble"
%install
%meson_install
%if %{with qt}
# Install Desktop Entry file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
%SOURCE1
@ -146,6 +156,7 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
# Install AppStream metainfo file
mkdir -p %{buildroot}/%{_metainfodir}/
cp -a %SOURCE2 %{buildroot}/%{_metainfodir}/
%endif
# Remove the Sphinx build leftovers
rm -rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-*/html/.buildinfo
@ -153,7 +164,8 @@ rm -rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-*/html/.doctrees
%files
%license COPYING.rst LICENSES/LGPL-2.1-or-later.txt
%{_libdir}/libcamera*.so.0.0.5
%{_libdir}/libcamera*.so.0.2
%{_libdir}/libcamera*.so.0.2.0
%files devel
%{_includedir}/%{name}/
@ -164,18 +176,22 @@ rm -rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-*/html/.doctrees
%files doc
%doc %{_docdir}/%{name}-*/
%ifnarch riscv64
%files ipa
%{_datadir}/libcamera/
%{_libdir}/libcamera/
%{_libexecdir}/libcamera/
%endif
%files gstreamer
%{_libdir}/gstreamer-1.0/libgstlibcamera.so
%if %{with qt}
%files qcam
%{_bindir}/qcam
%{_datadir}/applications/qcam.desktop
%{_metainfodir}/qcam.metainfo.xml
%endif
%files tools
%license LICENSES/GPL-2.0-only.txt
@ -187,6 +203,23 @@ rm -rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}-*/html/.doctrees
%{_libexecdir}/libcamera/v4l2-compat.so
%changelog
* Thu Jan 11 2024 David Abdurachmanov <davidlt@rivosinc.com> - 0.2.0-1.0.riscv64
- Disable IPA on riscv64 (empty package)
* Wed Jan 10 2024 Javier Martinez Canillas <javierm@redhat.com> - 0.2.0-1
- Update to version 0.2.0
- Resolves: rhbz#2257601
* Tue Oct 31 2023 Terje Rosten <terje.rosten@ntnu.no> - 0.1.0-3
- Rebuild for gtest 1.14.0
* Sun Jul 30 2023 Javier Martinez Canillas <javierm@redhat.com> - 0.1.0-1
- Update to version 0.1.0
- Resolves: rhbz#2192455
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed May 17 2023 Javier Martinez Canillas <javierm@redhat.com> - 0.0.5-3
- Fix path of key for IPA modules re-sign and drop unused env var

144
mojo-importlib.patch Normal file
View File

@ -0,0 +1,144 @@
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/fileutil.py b/utils/ipc/mojo/public/tools/mojom/mojom/fileutil.py
index bf626f54..e1c823da 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/fileutil.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/fileutil.py
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import errno
-import imp
import os.path
import sys
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/fileutil_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/fileutil_unittest.py
index ff5753a2..e754151f 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/fileutil_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/fileutil_unittest.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import shutil
import sys
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/generate/generator_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/generate/generator_unittest.py
index 32c884a8..f2064005 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/generate/generator_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/generate/generator_unittest.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
+import importlib.util
import os.path
import sys
import unittest
@@ -19,9 +19,7 @@ def _GetDirAbove(dirname):
return path
-try:
- imp.find_module("mojom")
-except ImportError:
+if importlib.util.find_spec("mojom") is None:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
from mojom.generate import generator
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/generate/translate_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/generate/translate_unittest.py
index 19905c8a..09724d88 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/generate/translate_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/generate/translate_unittest.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys
import unittest
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/parse/ast_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/parse/ast_unittest.py
index 62798631..4ab51033 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/parse/ast_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/parse/ast_unittest.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys
import unittest
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/parse/conditional_features_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/parse/conditional_features_unittest.py
index aa609be7..682ee5ce 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/parse/conditional_features_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/parse/conditional_features_unittest.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
+import importlib.util
import os
import sys
import unittest
@@ -19,9 +19,7 @@ def _GetDirAbove(dirname):
return path
-try:
- imp.find_module('mojom')
-except ImportError:
+if importlib.util.find_spec("mojom") is None:
sys.path.append(os.path.join(_GetDirAbove('pylib'), 'pylib'))
import mojom.parse.ast as ast
import mojom.parse.conditional_features as conditional_features
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer.py b/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer.py
index 3e084bbf..1e8b49f2 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer_unittest.py
index eadc6587..77976507 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/parse/lexer_unittest.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
+import importlib.util
import os.path
import sys
import unittest
@@ -22,9 +22,7 @@ def _GetDirAbove(dirname):
sys.path.insert(1, os.path.join(_GetDirAbove("mojo"), "third_party"))
from ply import lex
-try:
- imp.find_module("mojom")
-except ImportError:
+if importlib.util.find_spec("mojom") is None:
sys.path.append(os.path.join(_GetDirAbove("pylib"), "pylib"))
import mojom.parse.lexer
diff --git a/utils/ipc/mojo/public/tools/mojom/mojom/parse/parser_unittest.py b/utils/ipc/mojo/public/tools/mojom/mojom/parse/parser_unittest.py
index 6d6b7153..7e8acf43 100644
--- a/utils/ipc/mojo/public/tools/mojom/mojom/parse/parser_unittest.py
+++ b/utils/ipc/mojo/public/tools/mojom/mojom/parse/parser_unittest.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys
import unittest

View File

@ -1 +1 @@
SHA512 (libcamera-0.0.5.tar.xz) = d468f19bf7d0a1357611f654a16c900180f0a2ce97e8fcc6f7193b17fe3a7592b89b98e727d3d50567005b21c65092a5d80c57eed2516430e297d04c9de1efff
SHA512 (libcamera-0.2.0.tar.xz) = 93dd5aef7580c186b1482e5671cbc82b92f7b2e9598ed10c8c03802a09dd15f996d54d8acf0ba452e3e577fed5f33c4d9ef8784e8e0f456976c1bc2aaa066857