New upstream version 2.18.10.

Also:
- Add -fno-common patch to fix build with gcc 10.
- Link shared objects with $RPM_OPT_FLAGS.
- Use %license macro.
- Drop ancient Obsoletes/Provides; package was obsoleting itself.
- Add man pages.
This commit is contained in:
Jerry James 2020-01-24 10:12:53 -07:00
parent 5dad938258
commit aedd648728
4 changed files with 80 additions and 23 deletions

View File

@ -0,0 +1,22 @@
--- a/src/ml_gdk.c
+++ b/src/ml_gdk.c
@@ -55,6 +55,8 @@
#define GDK_WINDOW_TYPE_HINT_DOCK GDK_WINDOW_TYPE_HINT_NORMAL
#endif
+lookup_info *ml_table_extension_events;
+
CAMLprim void ml_raise_gdk (const char *errmsg)
{
static const value * exn = NULL;
--- a/src/ml_gdk.h
+++ b/src/ml_gdk.h
@@ -102,7 +102,7 @@ CAMLexport value Val_GdkEvent (GdkEvent
CAMLexport int OptFlags_GdkModifier_val (value);
CAMLexport int Flags_GdkModifier_val (value);
CAMLexport int Flags_Event_mask_val (value);
-CAMLexport lookup_info *ml_table_extension_events;
+CAMLextern lookup_info *ml_table_extension_events;
#define Extension_events_val(key) ml_lookup_to_c(ml_table_extension_events,key)
#define GdkDragContext_val(val) check_cast(GDK_DRAG_CONTEXT,val)

8
ocaml-lablgtk.rpmlintrc Normal file
View File

@ -0,0 +1,8 @@
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
# The dictionary is missing some technical terms
addFilter(r'W: spelling-error .* gtk')
# The gnomeui shared objects do not invoke any glibc symbols
addFilter(r'E: library-not-linked-against-libc .*lablgnomeui')

View File

@ -1,7 +1,7 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
Name: ocaml-lablgtk
Version: 2.18.9
Version: 2.18.10
Release: 1%{?dist}
Summary: Objective Caml interface to gtk+
@ -9,24 +9,25 @@ Summary: Objective Caml interface to gtk+
License: LGPLv2 with exceptions
URL: http://lablgtk.forge.ocamlcore.org/
Source: https://github.com/garrigue/lablgtk/releases/download/lablgtk2188/lablgtk-%{version}.tar.gz
Source: https://github.com/garrigue/lablgtk/archive/%{version}/lablgtk-%{version}.tar.gz
# Fix the build with -fno-common
# https://github.com/garrigue/lablgtk/pull/105
Patch0: %{name}-fno-common.patch
Obsoletes: lablgtk <= 2.6.0-7
Provides: lablgtk = 2.6.0-7
BuildRequires: ncurses-devel
BuildRequires: gtk2-devel
BuildRequires: gtksourceview2-devel
BuildRequires: gtkspell-devel
BuildRequires: libXmu-devel
BuildRequires: libglade2-devel
BuildRequires: libgnomecanvas-devel
BuildRequires: libgnomeui-devel
BuildRequires: librsvg2-devel
BuildRequires: help2man
BuildRequires: ocaml >= 3.12.1-3
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
BuildRequires: zlib-devel
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(gtksourceview-2.0)
BuildRequires: pkgconfig(gtkspell-2.0)
BuildRequires: pkgconfig(libglade-2.0)
BuildRequires: pkgconfig(libgnomecanvas-2.0)
BuildRequires: pkgconfig(libgnomeui-2.0)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(zlib)
%global __ocaml_requires_opts -i GtkSourceView2_types
@ -42,8 +43,8 @@ gtk+.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: gtk2-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: gtk2-devel%{?_isa}
%description devel
The %{name}-devel package contains libraries and signature files for
@ -51,14 +52,19 @@ developing applications that use %{name}.
%prep
%setup -q -n lablgtk-%{version}
%autosetup -n lablgtk-%{version} -p1
# Remove spurious executable bits
chmod a-x README*
%build
# Parallel builds don't work.
unset MAKEFLAGS
%configure --enable-debug
perl -pi -e "s|-O|$RPM_OPT_FLAGS|" src/Makefile
sed -e "s|-O|$RPM_OPT_FLAGS|" \
-e "s|-shared|& -ccopt \"$RPM_LD_FLAGS\"|" \
-e "s|(CAMLMKLIB)|& -ldopt \"$RPM_LD_FLAGS\"|" \
-i src/Makefile
%if %{opt}
make world CAMLOPT="ocamlopt.opt -g"
make opt CAMLOPT="ocamlopt.opt -g"
@ -80,7 +86,7 @@ make install \
LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk2 \
DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk2
cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk2
# Remove ld.conf (part of main OCaml dist).
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
@ -98,9 +104,19 @@ popd
# Remove .cvsignore files from examples directory.
find examples -name .cvsignore -exec rm {} \;
# Generate man pages
export LD_LIBRARY_PATH=$PWD/src
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
cp -p src/lablgladecc src/lablgladecc2
for bin in gdk_pixbuf_mlsource lablgladecc2 lablgtk2; do
help2man -N --version-string=%{version} src/$bin > \
$RPM_BUILD_ROOT%{_mandir}/man1/$bin.1
done
%files
%doc README COPYING CHANGES
%doc README CHANGES
%license COPYING LGPL
%dir %{_libdir}/ocaml/lablgtk2
%{_libdir}/ocaml/lablgtk2/*.cmi
%{_libdir}/ocaml/lablgtk2/*.cma
@ -111,10 +127,13 @@ find examples -name .cvsignore -exec rm {} \;
%{_bindir}/gdk_pixbuf_mlsource
%{_bindir}/lablgladecc2
%{_bindir}/lablgtk2
%{_mandir}/man1/gdk_pixbuf_mlsource.1*
%{_mandir}/man1/lablgladecc2.1*
%{_mandir}/man1/lablgtk2.1*
%files devel
%doc README COPYING CHANGES
%doc CHANGES.API
%dir %{_libdir}/ocaml/lablgtk2
%{_libdir}/ocaml/lablgtk2/META
%{_libdir}/ocaml/lablgtk2/*.a
@ -139,6 +158,14 @@ find examples -name .cvsignore -exec rm {} \;
%changelog
* Fri Jan 24 2020 Jerry James <loganjerry@gmail.com> - 2.18.10-1
- New upstream version 2.18.10
- Add -fno-common patch to fix build with gcc 10
- Link shared objects with RPM_OPT_FLAGS
- Use %%license macro
- Drop ancient Obsoletes/Provides; package was obsoleting itself
- Add man pages
* Mon Jan 20 2020 Richard W.M. Jones <rjones@redhat.com> - 2.18.9-1
- New upstream version 2.18.9.
- Remove patch which has equivalent fix upstream.

View File

@ -1 +1 @@
SHA512 (lablgtk-2.18.9.tar.gz) = b7fff586410d9385721be08a1b73c9a091ad0feef9cd17f714ec448a247eac63bdf608308f10e86e6f99c3bfdce66ae7255378a9183d537c81ff7058bfa506a7
SHA512 (lablgtk-2.18.10.tar.gz) = 73705aaa80db433d11a28df5f6f5d10bd282e477e90916152a87e71865ccfcd7dfbdbe77350ecadf61ba2ccc7a188de1c68f1e6385e20c75f167969001e8418d