[packages/ocaml-lablgtk3] - don't try to regenarate tools using non-existing objects - added rsvg subpackage
baggins
baggins at pld-linux.org
Sat Apr 25 11:05:41 CEST 2026
commit 68c4fbb4fb2bf0e45a02e24548ca1818d0a594bc
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Apr 25 13:04:57 2026 +0200
- don't try to regenarate tools using non-existing objects
- added rsvg subpackage
dont-regenate-tools.patch | 23 +++++++++++++++++
ocaml-lablgtk3.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 87 insertions(+), 2 deletions(-)
---
diff --git a/ocaml-lablgtk3.spec b/ocaml-lablgtk3.spec
index e8daf34..1f3986e 100644
--- a/ocaml-lablgtk3.spec
+++ b/ocaml-lablgtk3.spec
@@ -17,6 +17,7 @@ Group: Libraries
#Source0Download: https://github.com/garrigue/lablgtk/releases
Source0: https://github.com/garrigue/lablgtk/archive/%{version}/lablgtk-%{version}.tar.gz
# Source0-md5: b00a4871c7b285d1c1c62a5c04c1ed84
+Patch0: dont-regenate-tools.patch
URL: http://lablgtk.forge.ocamlcore.org/
BuildRequires: camlp5
BuildRequires: goocanvas2-devel >= 2.0.4
@@ -24,6 +25,7 @@ BuildRequires: gtk+3-devel >= 3.18
BuildRequires: gtksourceview3-devel >= 3.18
BuildRequires: gtkspell3-devel >= 3.0.4
BuildRequires: help2man
+BuildRequires: librsvg-devel
BuildRequires: ocaml >= 1:4.05.0
BuildRequires: ocaml-cairo2-devel >= 0.6
BuildRequires: ocaml-dune >= 1.8
@@ -159,6 +161,39 @@ Wiązania GTK+3 dla OCamla, wsparcie dla GtkSourceView. Pakiet ten
zawiera pliki niezbędne do tworzenia programów używających
LablGtk-GtkSourceView.
+%package rsvg
+Summary: GTK+3 binding for OCaml - librsvg support
+Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla librsvg
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: librsvg
+%requires_eq ocaml
+
+%description rsvg
+GTK+3 binding for OCaml, librsvg support. This package contains
+files needed to run bytecode OCaml programs using librsvg.
+
+%description rsvg -l pl.UTF-8
+Wiązania GTK+3 dla OCamla, wsparcie dla librsvg. Pakiet ten
+zawiera binaria potrzebne do uruchamiania programów używających
+librsvg.
+
+%package rsvg-devel
+Summary: GTK+3 binding for OCaml - librsvg, development part
+Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla librsvg, część programistyczna
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+%requires_eq ocaml
+
+%description rsvg-devel
+GTK+3 binding for OCaml, librsvg support. This package contains
+files needed to develop OCaml programs using librsvg.
+
+%description rsvg-devel -l pl.UTF-8
+Wiązania GTK+3 dla OCamla, wsparcie dla librsvg. Pakiet ten
+zawiera pliki niezbędne do tworzenia programów używających
+librsvg.
+
%package tools
Summary: GTK+ binding for OCaml - tools
Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - narzędzia
@@ -176,12 +211,14 @@ lablgtk.
%prep
%setup -q -n lablgtk-%{version}
+%patch -P0 -p1
-for p in lablgtk3 lablgtk3-gtkspell3 lablgtk3-sourceview3; do
- echo -e "\nversion: \"%{version}\"" >> ${p}.opam
+for p in lablgtk3 lablgtk3-goocanvas2 lablgtk3-gtkspell3 lablgtk3-rsvg2 lablgtk3-sourceview3; do
+ echo -e "\nversion: \"%{version}\"" >> ${p}.opam
done
%build
+export LABLGTK_EXTRA_FLAGS=-g
dune build --verbose %{?_smp_mflags}
help2man -N --version-string=%{version} -o gdk_pixbuf_mlsource3.1 _build/install/default/bin/gdk_pixbuf_mlsource3
@@ -312,6 +349,31 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/ocaml/lablgtk3-sourceview3/dune-package
%{_libdir}/ocaml/lablgtk3-sourceview3/opam
+%files rsvg
+%defattr(644,root,root,755)
+%dir %{_libdir}/ocaml/lablgtk3-rsvg2
+%{_libdir}/ocaml/lablgtk3-rsvg2/META
+%{_libdir}/ocaml/lablgtk3-rsvg2/lablgtk3_rsvg2.cma
+%if %{with ocaml_opt}
+%attr(755,root,root) %{_libdir}/ocaml/lablgtk3-rsvg2/lablgtk3_rsvg2.cmxs
+%endif
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_rsvg2_stubs.so
+
+%files rsvg-devel
+%defattr(644,root,root,755)
+%{_libdir}/ocaml/lablgtk3-rsvg2/*.cmi
+%{_libdir}/ocaml/lablgtk3-rsvg2/*.cmt
+%{_libdir}/ocaml/lablgtk3-rsvg2/*.cmti
+%{_libdir}/ocaml/lablgtk3-rsvg2/*.mli
+%{_libdir}/ocaml/lablgtk3-rsvg2/liblablgtk3_rsvg2_stubs.a
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/lablgtk3-rsvg2/*.cmx
+%{_libdir}/ocaml/lablgtk3-rsvg2/lablgtk3_rsvg2.a
+%{_libdir}/ocaml/lablgtk3-rsvg2/lablgtk3_rsvg2.cmxa
+%endif
+%{_libdir}/ocaml/lablgtk3-rsvg2/dune-package
+%{_libdir}/ocaml/lablgtk3-rsvg2/opam
+
%files tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/gdk_pixbuf_mlsource3
diff --git a/dont-regenate-tools.patch b/dont-regenate-tools.patch
new file mode 100644
index 0000000..9f7340d
--- /dev/null
+++ b/dont-regenate-tools.patch
@@ -0,0 +1,23 @@
+--- lablgtk-3.1.5/tools/dune~ 2024-06-10 05:22:38.000000000 +0200
++++ lablgtk-3.1.5/tools/dune 2026-04-25 12:54:20.433341677 +0200
+@@ -2,20 +2,6 @@
+ ; Common setup and tools ;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+-; We use a bash rule to ensure we call the byte version and thus we
+-; avoid the auto-printer selection in Camlp4AutoPrinter.
+-(rule
+- (targets varcc.ml)
+- (deps (:source varcc.ml4))
+- (mode promote)
+- (action (bash "camlp5o o_keywords.cmo pr_o.cmo -impl %{source} -o %{targets}")))
+-
+-(rule
+- (targets propcc.ml)
+- (deps (:source propcc.ml4))
+- (mode promote)
+- (action (bash "camlp5o o_keywords.cmo pr_o.cmo -impl %{source} -o %{targets}")))
+-
+ (executables
+ (names varcc propcc)
+ (modules varcc propcc)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-lablgtk3.git/commitdiff/68c4fbb4fb2bf0e45a02e24548ca1818d0a594bc
More information about the pld-cvs-commit
mailing list