From 5179aedac79038c8ded2ff55f7df2b0ca4eb6e3c7596ad99bc1ba06c5d839be8 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 21 Feb 2024 10:06:17 +0000 Subject: [PATCH] Accepting request 1148371 from home:rrahl0 OBS-URL: https://build.opensuse.org/request/show/1148371 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/text-engine?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + add-soversion.patch | 22 +++++++++++ fix-Wreturn-type.patch | 14 +++++++ text-engine-0.1.0.tar.gz | 3 ++ text-engine.changes | 4 ++ text-engine.spec | 81 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 148 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 add-soversion.patch create mode 100644 fix-Wreturn-type.patch create mode 100644 text-engine-0.1.0.tar.gz create mode 100644 text-engine.changes create mode 100644 text-engine.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/add-soversion.patch b/add-soversion.patch new file mode 100644 index 0000000..7f4b619 --- /dev/null +++ b/add-soversion.patch @@ -0,0 +1,22 @@ +From 99c16f50f70c6ba2766f284d7b4ad6dc59517f91 Mon Sep 17 00:00:00 2001 +From: Jeremy Bicha +Date: Wed, 20 Apr 2022 12:39:45 -0400 +Subject: [PATCH] meson: set soversion + +This sets up the symlinked shared library as expected +--- + src/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/meson.build b/src/meson.build +index faff7ad..92e0a0b 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -47,6 +47,7 @@ text_engine_deps = [ + text_engine_lib = shared_library('text-engine-' + api_version, + text_engine_sources, + dependencies: text_engine_deps, ++ soversion: 0, + install: true, + ) + diff --git a/fix-Wreturn-type.patch b/fix-Wreturn-type.patch new file mode 100644 index 0000000..adfb008 --- /dev/null +++ b/fix-Wreturn-type.patch @@ -0,0 +1,14 @@ +diff --color -ru a/src/layout/layout.c b/src/layout/layout.c +--- a/src/layout/layout.c 2022-03-28 00:11:30.000000000 +0600 ++++ b/src/layout/layout.c 2023-03-30 16:22:07.915027532 +0600 +@@ -126,8 +126,8 @@ + TextFrame *frame, + int width) + { +- g_return_if_fail (TEXT_IS_LAYOUT (self)); +- g_return_if_fail (TEXT_IS_FRAME (frame)); ++ g_return_val_if_fail (TEXT_IS_LAYOUT (self), NULL); ++ g_return_val_if_fail (TEXT_IS_FRAME (frame), NULL); + + TextLayoutBox *root = text_layout_box_new (); + do_layout_recursive (self, root, context, TEXT_ITEM (frame), width); diff --git a/text-engine-0.1.0.tar.gz b/text-engine-0.1.0.tar.gz new file mode 100644 index 0000000..7b4ad75 --- /dev/null +++ b/text-engine-0.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e515d7c7ca73df0239c9badf12d80846aa1479c6e084fd8c791881e17db540d +size 15728 diff --git a/text-engine.changes b/text-engine.changes new file mode 100644 index 0000000..b81b143 --- /dev/null +++ b/text-engine.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Feb 16 23:39:47 UTC 2024 - Richard Rahl + +- initial packaging diff --git a/text-engine.spec b/text-engine.spec new file mode 100644 index 0000000..7f97b2d --- /dev/null +++ b/text-engine.spec @@ -0,0 +1,81 @@ +# +# spec file for package text-engine +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%define soversion 0_1-0 +Name: text-engine +Version: 0.1.0 +Release: 0 +Summary: A lightweight rich text framework for GTK +License: MPL-2.0 OR LGPL-2.1-or-later +URL: https://github.com/mjakeman/text-engine +Source: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: fix-Wreturn-type.patch +Patch1: add-soversion.patch +BuildRequires: meson +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(gio-2.0) + +%description +Text Engine is a rich-text editing framework for GTK 4. The primary user of this +library is bluetype but it can be used wherever rich text display and editing is +needed. + +%package -n lib%{name}-%{soversion} +Summary: %{summary} + +%description -n lib%{name}-%{soversion} +%{summary}. + +%package -n lib%{name}-devel +Summary: Development files for %{name} +Requires: lib%{name}-%{soversion} >= %{version} + +%description -n lib%{name}-devel +%{summary}. + +%prep +%autosetup -p1 + +%build +%meson +%meson_build + +%install +%meson_install +rm %{buildroot}%{_bindir}/text-engine-demo + +%post -n lib%{name}-%{soversion} +ldconfig + +%postun -n lib%{name}-%{soversion} +ldconfig + +%files -n lib%{name}-%{soversion} +%license COPYING +%doc README.md +%{_libdir}/lib%{name}*.so.* + +%files -n lib%{name}-devel +%{_includedir}/text-engine +%{_libdir}/pkgconfig/text-engine-0.1.pc +%{_libdir}/lib%{name}*.so + +%changelog