Compare commits

...

64 Commits

Author SHA1 Message Date
Richard W.M. Jones b96cd2394b OCaml 4.12.0 build 2021-03-01 15:16:09 +00:00
Fedora Release Engineering e03186ef19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:53:52 +00:00
Richard W.M. Jones 316123a0c6 OCaml 4.11.1 rebuild 2020-09-01 20:33:11 +01:00
Richard W.M. Jones 1e1607a1a2 OCaml 4.11.0 rebuild 2020-08-21 12:23:24 +01:00
Fedora Release Engineering a8a04d3a1a - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 12:06:11 +00:00
Richard W.M. Jones 038e803b6d OCaml 4.11.0+dev2-2020-04-22 rebuild 2020-05-05 00:01:00 +01:00
Richard W.M. Jones da40730c49 OCaml 4.11.0 pre-release attempt 2 2020-04-21 19:49:04 +01:00
Richard W.M. Jones 1a657b8382 Update all OCaml dependencies for RPM 4.16. 2020-04-03 13:38:13 +01:00
Richard W.M. Jones f14e0978dc OCaml 4.10.0 final. 2020-02-26 16:25:11 +00:00
Fedora Release Engineering d4108b9c97 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 19:30:38 +00:00
Jerry James 49983471ca Add -fno-common patch to fix builds of consuming packages with GCC 10. 2020-01-29 11:02:58 -07:00
Jerry James 0e09496d77 A few minor updates to Requires for the -devel subpackages. 2020-01-29 10:06:54 -07:00
Jerry James 6cebf913a5 Add -test patch until upstream weighs in on GC issues. 2020-01-28 16:15:35 -07:00
Jerry James d219020c52 New upstream version 0.6.1.
Also:
- Add -gtk and -pango subpackages corresponding to upstream's opam packages.
- Add -gtk-devel and -pango-devel subpackages to manage dependencies.
- Add %check script.
2020-01-22 20:37:06 -07:00
Richard W.M. Jones 1c4773546b OCaml 4.10.0+beta1 rebuild. 2020-01-19 22:41:27 +00:00
Richard W.M. Jones fa219f08ee OCaml 4.09.0 for riscv64 2020-01-09 21:14:05 +00:00
Richard W.M. Jones e9249a2086 OCaml 4.09.0 (final) rebuild. 2019-12-06 15:31:38 +00:00
Richard W.M. Jones 403e77d03c OCaml 4.08.1 (final) rebuild. 2019-08-16 17:38:41 +01:00
Richard W.M. Jones 43b746b3a9 OCaml 4.08.1 (rc2) rebuild. 2019-08-01 08:42:43 +01:00
Fedora Release Engineering 4097d645a4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 22:48:53 +00:00
Fedora Release Engineering b6357bc3f3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 16:46:31 +00:00
Fedora Release Engineering b26cbe3b42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 14:41:03 +00:00
Richard W.M. Jones 999b915b05 OCaml 4.07.0 (final) rebuild. 2018-07-11 18:54:18 +01:00
Richard W.M. Jones 0904b3794d OCaml 4.07.0-rc1 rebuild. 2018-06-20 20:07:18 +01:00
Fedora Release Engineering 4fc6d2b044 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 08:46:20 +00:00
Richard W.M. Jones bb1710fd57 OCaml 4.06.0 rebuild. 2017-11-17 23:41:59 +00:00
Richard W.M. Jones c982f2f993 OCaml 4.05.0 rebuild. 2017-08-08 20:31:54 +01:00
Fedora Release Engineering 8e00dab7ca - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 04:13:31 +00:00
Fedora Release Engineering c8bc6a147b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 01:26:09 +00:00
Richard W.M. Jones 502885076c OCaml 4.04.2 rebuild. 2017-06-26 22:33:15 +01:00
Richard W.M. Jones 5b15dd1f39 OCaml 4.04.1 rebuild. 2017-05-12 15:28:03 +01:00
Fedora Release Engineering e531a350dd - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 00:29:19 +00:00
Richard W.M. Jones 1591f77243 Move to latest git commit upstream. 2016-11-05 09:28:26 +00:00
Fedora Release Engineering dd5b099a30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 11:04:46 +00:00
Richard W.M. Jones 6a5a82dc1b OCaml 4.02.3 rebuild. 2015-07-28 18:04:26 +01:00
Richard W.M. Jones 88f545ca37 Move to latest git commit upstream.
- Enable bytecode builds.
2015-07-22 17:20:03 +01:00
Richard W.M. Jones 5b30dcf322 ocaml-4.02.2 final rebuild. 2015-06-24 20:08:14 +01:00
Richard W.M. Jones 1aa572414c ocaml-4.02.2 rebuild. 2015-06-17 20:00:12 +01:00
Richard W.M. Jones dc649ed982 Switch bindings to https://github.com/Chris00/ocaml-cairo
- See: https://lists.fedoraproject.org/pipermail/devel/2015-March/209182.html
2015-03-19 16:26:08 +00:00
Richard W.M. Jones df7e8eab04 ocaml-4.02.1 rebuild. 2015-02-17 09:29:08 +00:00
Orion Poplawski f2b096289d Update to latest git 2014-10-31 09:47:28 -06:00
Richard W.M. Jones fb86f96d98 ocaml-4.02.0 final rebuild. 2014-08-30 20:54:05 +01:00
Richard W.M. Jones 11f64ac1b7 ocaml-4.02.0+rc1 rebuild. 2014-08-23 18:43:58 +01:00
Peter Robinson c58e19f810 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 12:44:24 +00:00
Richard W.M. Jones ff653ec468 ocaml-4.02.0-0.8.git10e45753.fc22 rebuild. 2014-08-02 08:52:58 +01:00
Richard W.M. Jones 20e32c2947 OCaml 4.02.0 beta rebuild. 2014-07-23 12:19:25 +01:00
Orion Poplawski 867909a8bc Rebuild for OCaml 4.02 2014-07-14 10:05:47 -06:00
Dennis Gilmore da47478d2d - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 10:31:22 -05:00
Richard W.M. Jones 4f909ea2f2 Rebuild for OCaml 4.01.0.
- Enable debuginfo.
- Modernize the spec file.
2013-09-14 14:53:07 +01:00
Dennis Gilmore 8aa4eddc90 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 09:47:54 -05:00
Dennis Gilmore 36872f074b - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 02:55:02 -06:00
Orion Poplawski b31617aa9e Rebuild for OCaml 4.00.1. 2012-10-17 09:56:45 -06:00
Dennis Gilmore 23e5f92fbc - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-20 00:50:50 -05:00
Orion Poplawski 6cf4b08d27 Rebuild for OCaml 4.00.0. 2012-06-08 09:38:43 -06:00
Richard W.M. Jones cfac2c6384 Update to git commit 08b40192975 (dated 2011-09-11).
- Rebuild for OCaml 3.12.1.
2012-01-06 18:04:19 +00:00
Dennis Gilmore 02f9b3f86f - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 19:38:41 -06:00
Orion Poplawski 585af31f98 - Rebuild for OCaml 3.12 2011-01-05 09:09:04 -07:00
Fedora Release Engineering c44912cadc dist-git conversion 2010-07-29 04:42:43 +00:00
Richard W.M. Jones 1ddfa5d7c4 Rebuild for OCaml 3.11.2 2009-12-30 13:47:49 +00:00
Richard W.M. Jones ee7b375532 - So we are wrong, version numbers did NOT roll backwards.
- Revert to current git head (a5c5ee9f) which is a pre-release of 1.2.0
    (RHBZ#541542).
- Replace %%define with %%global.
- Patch0 is now upstream.
- Checked package with rpmlint - no problems.
2009-12-07 15:00:58 +00:00
Richard W.M. Jones 7835afdf71 ocaml-cairo-devel requires ocaml-lablgtk-devel (RHBZ#541427). 2009-11-26 09:39:41 +00:00
Bill Nottingham 4a62c458e4 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:56:27 +00:00
Richard W.M. Jones e93d5262d9 - New upstream version 1.0.0.
- Yes, version number really did roll backwards, so now we're using Epoch.
- Patch for compatibility with OCaml 3.11.1 (renamed bigarray structs).
2009-10-08 11:51:35 +00:00
Richard W.M. Jones d871c01fbd Force rebuild against newer lablgtk. 2009-09-29 15:16:06 +00:00
9 changed files with 552 additions and 101 deletions

View File

@ -1 +0,0 @@
ocaml-cairo-1.2.0.cvs20080301.tar.gz

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
ocaml-cairo-1.2.0-gita5c5ee9f.tar.gz
/ocaml-cairo-1.2.0-git08b40192975.tar.gz
/ocaml-cairo-1.2.0-git872c9bc92e6.tar.gz
/ocaml-cairo-5c1df1516ad99bde444bf5717801e7df75252a6c.tar.gz
/ocaml-cairo-675e51b639824f97e06683b080d57f2037064738.tar.gz
/ocaml-cairo-be5a298c28d90b2c44b7c00066902b53834720b3.tar.gz
/cairo2-*.tbz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ocaml-cairo
# $Id$
NAME := ocaml-cairo
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,11 +0,0 @@
name = "cairo-ocaml"
description = "Bindings to the cairo library."
archive(byte) = "cairo.cma"
archive(native) = "cairo.cmxa"
requires = "bigarray"
package "lablgtk2" (
requires = "cairo lablgtk2"
archive(byte) = "cairo_lablgtk.cma"
archive(native) = "cairo_lablgtk.cmxa"
)

View File

@ -0,0 +1,126 @@
diff --git a/src/cairo_ocaml.h.p b/src/cairo_ocaml.h.p
index 4192aed..78a02e2 100644
--- a/src/cairo_ocaml.h.p
+++ b/src/cairo_ocaml.h.p
@@ -25,7 +25,7 @@
/* cairo_t
***********************************************************************/
#define CAIRO_VAL(v) (* (cairo_t **) Data_custom_val(v))
-struct custom_operations caml_cairo_ops;
+CAMLextern struct custom_operations caml_cairo_ops;
void caml_cairo_raise_Error(cairo_status_t status);
/* raise [Cairo.Error] if the status indicates a failure. */
@@ -33,7 +33,7 @@ void caml_cairo_raise_Error(cairo_status_t status);
/* cairo_pattern_t
***********************************************************************/
#define PATTERN_VAL(v) (* (cairo_pattern_t **) Data_custom_val(v))
-struct custom_operations caml_pattern_ops;
+CAMLextern struct custom_operations caml_pattern_ops;
#define EXTEND_VAL(v) ((cairo_extend_t) Int_val(v))
#define VAL_EXTEND(v) Val_int(v)
@@ -45,12 +45,12 @@ struct custom_operations caml_pattern_ops;
***********************************************************************/
#define FONT_OPTIONS_VAL(v) (* (cairo_font_options_t**) Data_custom_val(v))
-struct custom_operations caml_font_options_ops;
+CAMLextern struct custom_operations caml_font_options_ops;
/* cairo_font_type_t
***********************************************************************/
-value caml_cairo_font_type[5];
+CAMLextern value caml_cairo_font_type[5];
cairo_font_type_t caml_cairo_font_type_val(value vft);
@@ -61,13 +61,13 @@ cairo_font_type_t caml_cairo_font_type_val(value vft);
***********************************************************************/
#define SCALED_FONT_VAL(v) (* (cairo_scaled_font_t**) Data_custom_val(v))
-struct custom_operations caml_scaled_font_ops;
+CAMLextern struct custom_operations caml_scaled_font_ops;
/* cairo_surface_t
***********************************************************************/
#define SURFACE_VAL(v) (* (cairo_surface_t **) Data_custom_val(v))
-struct custom_operations caml_surface_ops;
+CAMLextern struct custom_operations caml_surface_ops;
/* Type cairo_content_t */
@@ -93,7 +93,7 @@ struct custom_operations caml_surface_ops;
***********************************************************************/
#define PATH_VAL(v) (* (cairo_path_t **) Data_custom_val(v))
-struct custom_operations caml_path_ops;
+CAMLextern struct custom_operations caml_path_ops;
#define PATH_DATA_ASSIGN(vdata, data) \
switch (data->header.type) { \
@@ -151,10 +151,10 @@ struct custom_operations caml_path_ops;
#include <cairo-ft.h>
#define FT_LIBRARY_VAL(v) (* (FT_Library*) Data_custom_val(v))
-struct custom_operations caml_cairo_ft_library_ops;
+CAMLextern struct custom_operations caml_cairo_ft_library_ops;
#define FT_FACE_VAL(v) (* (FT_Face*) Data_custom_val(v))
-struct custom_operations caml_cairo_ft_face_ops;
+CAMLextern struct custom_operations caml_cairo_ft_face_ops;
#endif /* OCAML_CAIRO_HAS_FT */
diff --git a/src/cairo_ocaml_types.h b/src/cairo_ocaml_types.h
index b850ae2..b036142 100644
--- a/src/cairo_ocaml_types.h
+++ b/src/cairo_ocaml_types.h
@@ -267,14 +267,6 @@ static intnat caml_cairo_font_options_hash(value v)
return(cairo_font_options_hash(FONT_OPTIONS_VAL(v)));
}
-struct custom_operations caml_font_options_ops = {
- "font_options_t", /* identifier for serialization and deserialization */
- &caml_cairo_font_options_finalize,
- &caml_cairo_font_options_compare,
- &caml_cairo_font_options_hash,
- custom_serialize_default,
- custom_deserialize_default };
-
/* caml_cairo_font_type is defined in "cairo_ocaml.h". */
CAMLexport value caml_cairo_font_type_init(value unit)
diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c
index de35aca..60fae71 100644
--- a/src/cairo_stubs.c
+++ b/src/cairo_stubs.c
@@ -34,6 +34,27 @@
#include "cairo_macros.h"
#include "cairo_ocaml_types.h"
+CAMLexport value caml_cairo_font_type[5];
+
+CAMLexport struct custom_operations caml_cairo_ops;
+CAMLexport struct custom_operations caml_pattern_ops;
+CAMLexport struct custom_operations caml_scaled_font_ops;
+CAMLexport struct custom_operations caml_surface_ops;
+CAMLexport struct custom_operations caml_path_ops;
+
+#ifdef OCAML_CAIRO_HAS_FT
+CAMLexport struct custom_operations caml_cairo_ft_library_ops;
+CAMLexport struct custom_operations caml_cairo_ft_face_ops;
+#endif
+
+CAMLexport struct custom_operations caml_font_options_ops = {
+ "font_options_t", /* identifier for serialization and deserialization */
+ &caml_cairo_font_options_finalize,
+ &caml_cairo_font_options_compare,
+ &caml_cairo_font_options_hash,
+ custom_serialize_default,
+ custom_deserialize_default };
+
/* cairo_t functions.
***********************************************************************/

21
ocaml-cairo-test.patch Normal file
View File

@ -0,0 +1,21 @@
--- a/tests/image_create.ml
+++ b/tests/image_create.ml
@@ -2,14 +2,15 @@ open Printf
open Cairo
open Bigarray
-let create() =
- let data = Array1.create int8_unsigned c_layout 360_000 in
+let create data =
Gc.finalise (fun _ -> eprintf "DESTROY bigarray 'data'\n%!") data;
let surf = Image.create_for_data8 data Image.RGB24 ~w:300 ~h:300 in
Cairo.create surf
+let data = Array1.create int8_unsigned c_layout 360_000;;
+
let () =
- let cr = create() in
+ let cr = create data in
set_source_rgb cr 1. 1. 1.;
rectangle cr 0. 0. ~w:300. ~h:300.;
fill cr;

8
ocaml-cairo.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 .* (compositing|stateful)')
# The documentation is in the main package
addFilter(r'ocaml-cairo-(gtk|pango)(-devel)?\.[^:]+: W: no-documentation')

View File

@ -1,44 +1,43 @@
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
# Important note!
# There are at least two quite separate OCaml cairo projects.
#
# This is (packaged in Fedora >= 23):
# http://forge.ocamlcore.org/projects/cairo/
# https://github.com/Chris00/ocaml-cairo
#
# The other one (which used to be packaged in Fedora <= 22) is:
# http://cairographics.org/cairo-ocaml/
# There are no source releases for ocaml-cairo. To get the source
# matching this you have to do:
#
# cvs -d:pserver:anonymous@cvs.cairographics.org:/cvs/cairo co -D 2008-03-01 cairo-ocaml
# tar zcf /tmp/ocaml-cairo-1.2.0.cvs20080301.tar.gz --exclude CVS cairo-ocaml
#
# Whether you'll get precisely the same tarball by this method is
# questionable. If files get checked out in a different order then
# you might need to use 'diff -urN' instead of comparing MD5 hashes.
%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif
Name: ocaml-cairo
Version: 1.2.0.cvs20080301
Release: 10%{?dist}
Epoch: 2
Version: 0.6.1
Release: 11%{?dist}
Summary: OCaml library for accessing cairo graphics
Group: Development/Libraries
License: LGPLv2
URL: http://cairographics.org/cairo-ocaml/
Source0: ocaml-cairo-%{version}.tar.gz
Source1: ocaml-cairo-META
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: sparc64 s390 s390x
License: LGPLv3+
URL: https://github.com/Chris00/%{name}
BuildRequires: ocaml >= 3.10.0
Source0: %{url}/releases/download/%{version}/cairo2-%{version}.tbz
# Avoid a GC-related segfault. See:
# https://github.com/Chris00/ocaml-cairo/issues/19
Patch0: %{name}-test.patch
# Fix builds of consuming packages with -fno-common.
# https://github.com/Chris00/ocaml-cairo/pull/20
Patch1: %{name}-fno-common.patch
BuildRequires: ocaml >= 4.02
BuildRequires: ocaml-dune-devel
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-lablgtk-devel
BuildRequires: cairo-devel
BuildRequires: automake
BuildRequires: gtk2-devel
BuildRequires: chrpath
BuildRequires: pkgconfig(cairo) >= 1.2.0
BuildRequires: pkgconfig(gtk+-2.0)
%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
%global _description %{expand:
Cairo is a multi-platform library providing anti-aliased vector-based
rendering for multiple target backends. Paths consist of line segments
and cubic splines and can be rendered at any width with various join
@ -50,13 +49,18 @@ Cairo exports a stateful rendering API similar in spirit to the path
construction, text, and painting operators of PostScript, (with the
significant addition of translucence in the imaging model). When
complete, the API is intended to support the complete imaging model of
PDF 1.4.
PDF 1.4.}
%description
%_description
This package contains OCaml bindings for Cairo.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: cairo-devel%{?_isa}
%description devel
@ -64,61 +68,379 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%package gtk
Summary: OCaml library to render cairo on a gtk2 canvas
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description gtk
%_description
This package contains OCaml bindings for rendering cairo on a gtk2 canvas.
%package gtk-devel
Summary: Development files for %{name}-gtk
Requires: %{name}-gtk%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: ocaml-lablgtk-devel%{?_isa}
%description gtk-devel
The %{name}-gtk-devel package contains libraries and signature files for
developing applications that use %{name}-gtk.
%package pango
Summary: OCaml library to use pango with cairo
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%description pango
%_description
This package contains OCaml bindings to use pango with cairo.
%package pango-devel
Summary: Development files for %{name}-pango
Requires: %{name}-pango%{?_isa} = %{epoch}:%{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
Requires: pango-devel%{?_isa}
%description pango-devel
The %{name}-pango-devel package contains libraries and signature files
for developing applications that use %{name}-pango.
%prep
%setup -q -n cairo-ocaml
aclocal -I support
autoconf
./configure --libdir=%{_libdir}
cp %{SOURCE1} META
%autosetup -n cairo2-%{version} -p1
%build
make
make doc
cairo_cflags="$(pkgconf --cflags cairo)"
cairo_libs="$(pkgconf --libs cairo)"
gtk_cflags="$(pkgconf --cflags gtk+-2.0)"
gtk_libs="$(pkgconf --libs gtk+-2.0)"
export CAIRO_CFLAGS="%{optflags} $cairo_cflags"
export CAIRO_LIBS="$RPM_LD_FLAGS $cairo_libs"
export GTK_CFLAGS="%{optflags} $gtk_cflags"
export GTK_LIBS="$RPM_LD_FLAGS $gtk_libs"
dune build
# Dune passes RPM_LD_FLAGS to ocamlmklib without -ldopt, resulting in "Unknown
# option" warnings from ocamlmklib and a library that has not been linked with
# the correct flags. We can't add -ldopt ourselves, since that breaks
# compilation of the cmxs files. This seems to be a weakness of dune; linker
# flags and libraries to be linked with have to be specified together, and
# nothing takes care of separating them and adding ldopt as necessary. We
# relink manually to address the problem.
pushd _build/default/src
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" $cairo_libs -o cairo_stubs cairo_stubs.o
cd ../gtk
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" $gtk_libs -o cairo_gtk_stubs cairo_gtk_stubs.o
cd ../pango
ocamlmklib -g -ldopt "$RPM_LD_FLAGS" $gtk_libs -o cairo_pango_stubs cairo_pango_stubs.o
popd
%install
rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
dune install --destdir=%{buildroot}
ocamlfind install cairo src/{*.mli,*.cmi,*.cma,*.a,*.cmxa,*.cmx,dll*.so} META
# This just contains the README, LICENSE, and CHANGES files, 3 times, in
# directories with names other than the ones we want.
rm -rf %{buildroot}%{_prefix}/doc
strip $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dll*.so
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dll*.so
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
chmod a+x %{buildroot}%{_libdir}/ocaml/*/*.cmxs
%endif
# Remove files we do not need to package
rm %{buildroot}%{_libdir}/ocaml/*/*.ml
%clean
rm -rf $RPM_BUILD_ROOT
%check
dune runtest
%files
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/ocaml/cairo
%if %opt
%exclude %{_libdir}/ocaml/cairo/*.a
%exclude %{_libdir}/ocaml/cairo/*.cmxa
%exclude %{_libdir}/ocaml/cairo/*.cmx
%doc CHANGES.md README.md
%license GPL3.md LICENSE.md
%dir %{_libdir}/ocaml/cairo2
%{_libdir}/ocaml/cairo2/META
%{_libdir}/ocaml/cairo2/cairo.cma
%{_libdir}/ocaml/cairo2/cairo.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2/cairo.cmxs
%endif
%exclude %{_libdir}/ocaml/cairo/*.mli
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%{_libdir}/ocaml/stublibs/dllcairo_stubs.so
%files devel
%defattr(-,root,root,-)
%doc COPYING ChangeLog README doc/html
%if %opt
%{_libdir}/ocaml/cairo/*.a
%{_libdir}/ocaml/cairo/*.cmxa
%{_libdir}/ocaml/cairo/*.cmx
# XXX The tutorial doesn't build.
%doc examples
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2/cairo.a
%{_libdir}/ocaml/cairo2/cairo.cmx
%{_libdir}/ocaml/cairo2/cairo.cmxa
%endif
%{_libdir}/ocaml/cairo/*.mli
%{_libdir}/ocaml/cairo2/cairo.cmt
%{_libdir}/ocaml/cairo2/cairo.cmti
%{_libdir}/ocaml/cairo2/cairo.mli
%{_libdir}/ocaml/cairo2/cairo_ocaml.h
%{_libdir}/ocaml/cairo2/dune-package
%{_libdir}/ocaml/cairo2/libcairo_stubs.a
%{_libdir}/ocaml/cairo2/opam
%files gtk
%dir %{_libdir}/ocaml/cairo2-gtk
%{_libdir}/ocaml/cairo2-gtk/META
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cma
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmxs
%endif
%{_libdir}/ocaml/stublibs/dllcairo_gtk_stubs.so
%files gtk-devel
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.a
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmx
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmxa
%endif
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmt
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmti
%{_libdir}/ocaml/cairo2-gtk/cairo_gtk.mli
%{_libdir}/ocaml/cairo2-gtk/dune-package
%{_libdir}/ocaml/cairo2-gtk/libcairo_gtk_stubs.a
%{_libdir}/ocaml/cairo2-gtk/opam
%files pango
%dir %{_libdir}/ocaml/cairo2-pango
%{_libdir}/ocaml/cairo2-pango/META
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cma
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmi
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmxs
%endif
%{_libdir}/ocaml/stublibs/dllcairo_pango_stubs.so
%files pango-devel
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/cairo2-pango/cairo_pango.a
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmx
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmxa
%endif
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmt
%{_libdir}/ocaml/cairo2-pango/cairo_pango.cmti
%{_libdir}/ocaml/cairo2-pango/cairo_pango.mli
%{_libdir}/ocaml/cairo2-pango/dune-package
%{_libdir}/ocaml/cairo2-pango/libcairo_pango_stubs.a
%{_libdir}/ocaml/cairo2-pango/opam
%changelog
* Mon Mar 1 15:16:08 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-11
- OCaml 4.12.0 build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.6.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-9
- OCaml 4.11.1 rebuild
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-8
- OCaml 4.11.0 rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 04 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-6
- OCaml 4.11.0+dev2-2020-04-22 rebuild
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-5
- OCaml 4.11.0 pre-release attempt 2
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-4
- Update all OCaml dependencies for RPM 4.16.
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.6.1-3
- OCaml 4.10.0 final.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 22 2020 Jerry James <loganjerry@gmail.com> - 2:0.6.1-1
- New upstream version 0.6.1
- Add -gtk and -pango subpackages corresponding to upstream's opam packages
- Add -gtk-devel and -pango-devel subpackages to manage dependencies
- Add %%check script
- Add -test patch until upstream weighs in on GC issues
- Add -fno-common patch to fix builds of consuming packages with GCC 10
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.28.gitbe5a298
- OCaml 4.10.0+beta1 rebuild.
* Thu Jan 09 2020 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.27.gitbe5a298
- OCaml 4.09.0 for riscv64
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.26.gitbe5a298
- OCaml 4.09.0 (final) rebuild.
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.25.gitbe5a298
- OCaml 4.08.1 (final) rebuild.
* Thu Aug 01 2019 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.24.gitbe5a298
- OCaml 4.08.1 (rc2) rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.23.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.22.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.21.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.20.gitbe5a298
- OCaml 4.07.0 (final) rebuild.
* Wed Jun 20 2018 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.19.gitbe5a298
- OCaml 4.07.0-rc1 rebuild.
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.18.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Nov 17 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.17.gitbe5a298
- OCaml 4.06.0 rebuild.
* Tue Aug 08 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.16.gitbe5a298
- OCaml 4.05.0 rebuild.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.15.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.14.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.13.gitbe5a298
- OCaml 4.04.2 rebuild.
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.12.gitbe5a298
- OCaml 4.04.1 rebuild.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.11.gitbe5a298
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Nov 05 2016 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.10
- Move to latest git commit upstream.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.4.7-0.9.git675e51b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.8.git675e51b
- OCaml 4.02.3 rebuild.
* Wed Jul 22 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.7.git675e51b
- Move to latest git commit upstream.
- Enable bytecode builds.
* Wed Jun 24 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.6.git5c1df15
- ocaml-4.02.2 final rebuild.
* Wed Jun 17 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.5.git5c1df15
- ocaml-4.02.2 rebuild.
* Thu Mar 19 2015 Richard W.M. Jones <rjones@redhat.com> - 2:0.4.7-0.4.git5c1df15
- Switch bindings to https://github.com/Chris00/ocaml-cairo
- See: https://lists.fedoraproject.org/pipermail/devel/2015-March/209182.html
* Tue Feb 17 2015 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.20.git872c9bc92e6
- ocaml-4.02.1 rebuild.
* Fri Oct 31 2014 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.19.git872c9bc92e6
- Update to latest git
* Sat Aug 30 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.18.git08b40192975
- ocaml-4.02.0 final rebuild.
* Sat Aug 23 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.17.git08b40192975
- ocaml-4.02.0+rc1 rebuild.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.16.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Aug 02 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.15.git08b40192975
- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
* Wed Jul 23 2014 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.14.git08b40192975
- OCaml 4.02.0 beta rebuild.
* Mon Jul 14 2014 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.13.git08b40192975
- Rebuild for OCaml 4.02
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.12.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Sep 14 2013 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.11.git08b40192975
- Rebuild for OCaml 4.01.0.
- Enable debuginfo.
- Modernize the spec file.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.10.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.9.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Oct 17 2012 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.8.git08b40192975
- Rebuild for OCaml 4.00.1.
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.7.git08b40192975
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 8 2012 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.6.git08b40192975
- Rebuild for OCaml 4.00.0.
* Fri Jan 6 2012 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.5.git08b40192975
- Update to git commit 08b40192975 (dated 2011-09-11).
- Rebuild for OCaml 3.12.1.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2.0-0.4.gita5c5ee9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jan 5 2011 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.3.gita5c5ee9f
- Rebuild for OCaml 3.12
* Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.2.gita5c5ee9f
- Rebuild for OCaml 3.11.2.
* Mon Dec 7 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.2.0-0.1.gita5c5ee9f
- So we are wrong, version numbers did NOT roll backwards.
- Revert to current git head (a5c5ee9f) which is a pre-release of 1.2.0
(RHBZ#541542).
- Replace %%define with %%global.
- Patch0 is now upstream.
- Checked package with rpmlint - no problems.
* Thu Nov 26 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.0-2
- ocaml-cairo-devel requires ocaml-lablgtk-devel (RHBZ#541427).
* Thu Oct 8 2009 Richard W.M. Jones <rjones@redhat.com> - 1:1.0.0-1
- New upstream version 1.0.0.
- Yes, version number really did roll backwards, so now we're using Epoch.
- Patch for compatibility with OCaml 3.11.1 (renamed bigarray structs).
* Tue Sep 29 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.0.cvs20080301-11
- Force rebuild against newer lablgtk.
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0.cvs20080301-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
a4a91f25a2c18d5d26f2f19cf5b12980 ocaml-cairo-1.2.0.cvs20080301.tar.gz
SHA512 (cairo2-0.6.1.tbz) = d09274624854a45cf914ffbe984f1bcdd30db6283e7a0fd73aeec2a19226ff8f68d3f7139bbab72ca5698b58b840d6fd8a35570efc228391a7c5d031421f5c1f