commit b94d70eedb4ce4c48e0f5be403aa9ef7569cbd3624e0b2ed3b817f4dfd9d7eab Author: Richard Rahl Date: Fri Nov 22 09:14:52 2024 +0000 - fix CFLAGS in the correct manner with -Wno-incompatible-pointer-types OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/text-engine?expand=0&rev=8 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-0.1.1.tar.gz b/text-engine-0.1.1.tar.gz new file mode 100644 index 0000000..e773a28 --- /dev/null +++ b/text-engine-0.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf540d2c0150a46e8ec81c4532550357707c5d07b6116dc52e3869b1902f515f +size 16568 diff --git a/text-engine.changes b/text-engine.changes new file mode 100644 index 0000000..61e5998 --- /dev/null +++ b/text-engine.changes @@ -0,0 +1,26 @@ +------------------------------------------------------------------- +Fri Nov 22 09:13:26 UTC 2024 - Richard Rahl + +- fix CFLAGS in the correct manner with -Wno-incompatible-pointer-types + +------------------------------------------------------------------- +Thu Aug 29 01:22:11 UTC 2024 - Richard Rahl + +- fix build by using -Wno-unused-parameter -Wno-unused-variable + -Wno-deprecated-declarations -Wno-incompatible-pointer-types + +------------------------------------------------------------------- +Tue Jul 30 08:27:03 UTC 2024 - ming li + +- Update to version 0.1.1 + * Relicense to LGPL + +------------------------------------------------------------------- +Wed Feb 21 10:11:51 UTC 2024 - Dirk Müller + +- use ldconfig_scriptlets + +------------------------------------------------------------------- +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..2a7c85f --- /dev/null +++ b/text-engine.spec @@ -0,0 +1,79 @@ +# +# 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.1 +Release: 0 +Summary: A lightweight rich text framework for GTK +License: LGPL-2.1-or-later OR MPL-2.0 +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(gio-2.0) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(pango) + +%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 +export CFLAGS="%{optflags} -Wno-incompatible-pointer-types" +%meson +%meson_build + +%install +%meson_install +rm %{buildroot}%{_bindir}/text-engine-demo + +%ldconfig_scriptlets -n lib%{name}-%{soversion} + +%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