Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ocaml-cairo for openSUSE:Factory checked in at 2022-06-21 16:32:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocaml-cairo (Old) and /work/SRC/openSUSE:Factory/.ocaml-cairo.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-cairo" Tue Jun 21 16:32:54 2022 rev:4 rq:984127 version:0.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ocaml-cairo/ocaml-cairo.changes 2021-04-29 01:37:06.286468252 +0200 +++ /work/SRC/openSUSE:Factory/.ocaml-cairo.new.1548/ocaml-cairo.changes 2022-06-21 16:33:05.351870759 +0200 @@ -1,0 +2,6 @@ +Mon Jun 13 13:13:13 UTC 2022 - oher...@suse.de + +- Update to version 0.6.3 + See included CHANGES.md for details + +------------------------------------------------------------------- Old: ---- ocaml-cairo-0.6.2.tar.xz New: ---- ocaml-cairo-0.6.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-cairo.spec ++++++ --- /var/tmp/diff_new_pack.zW0GgC/_old 2022-06-21 16:33:05.915871587 +0200 +++ /var/tmp/diff_new_pack.zW0GgC/_new 2022-06-21 16:33:05.919871592 +0200 @@ -1,7 +1,7 @@ # # spec file for package ocaml-cairo # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,16 @@ Name: ocaml-cairo -Version: 0.6.2 +Version: 0.6.3 Release: 0 Summary: Binding to Cairo, a 2D Vector Graphics Library. License: LGPL-3.0-or-later Group: Development/Languages/OCaml URL: https://opam.ocaml.org/packages/cairo2 -Source: %{name}-%{version}.tar.xz +Source: %name-%version.tar.xz BuildRequires: ocaml -BuildRequires: ocaml-dune -BuildRequires: ocaml-rpm-macros >= 20210121 +BuildRequires: ocaml-dune >= 2.7 +BuildRequires: ocaml-rpm-macros >= 20220409 BuildRequires: pkg-config BuildRequires: ocamlfind(bigarray) BuildRequires: ocamlfind(dune-configurator) @@ -42,13 +42,13 @@ This is an OCaml binding for the Cairo library, a 2D graphics library with support for multiple output devices. %package devel -Summary: Development files for %{name} +Summary: Development files for %name Group: Development/Languages/OCaml -Requires: %{name} = %{version} +Requires: %name = %version %description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. +The %name-devel package contains libraries and signature files for +developing applications that use %name. %prep %autosetup -p1 @@ -66,8 +66,8 @@ dune_test_tolerate_fail='dune_test_tolerate_fail issue#19' %ocaml_dune_test -%files -f %{name}.files +%files -f %name.files -%files devel -f %{name}.files.devel +%files devel -f %name.files.devel %changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.zW0GgC/_old 2022-06-21 16:33:05.955871645 +0200 +++ /var/tmp/diff_new_pack.zW0GgC/_new 2022-06-21 16:33:05.959871651 +0200 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="filename">ocaml-cairo</param> - <param name="revision">202674a8d0c533b689ceacdb523ca167611e1b4c</param> + <param name="revision">cd80c793e3c6406fdc50376201fc1b0a3b4cc5c5</param> <param name="scm">git</param> <param name="submodules">disable</param> <param name="url">https://github.com/Chris00/ocaml-cairo.git</param> ++++++ ocaml-cairo-0.6.2.tar.xz -> ocaml-cairo-0.6.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/.github/workflows/main.yml new/ocaml-cairo-0.6.3/.github/workflows/main.yml --- old/ocaml-cairo-0.6.2/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-cairo-0.6.3/.github/workflows/main.yml 2022-05-22 09:20:40.000000000 +0200 @@ -0,0 +1,57 @@ +name: Continuous Integration + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-version: + - 4.12.0 + include: + - ocaml-version: 4.02.x + os: ubuntu-latest + skip_test: true + - ocaml-version: 4.08.1 + os: ubuntu-latest + skip_test: true + - ocaml-version: 4.11.1 + os: ubuntu-latest + skip_test: true + - ocaml-version: 4.13.0 + os: ubuntu-latest + skip_test: true + - ocaml-version: 4.13.0 + arch: armv6 + os: ubuntu-latest + + runs-on: ${{ matrix.os }} + + env: + SKIP_TEST: ${{ matrix.skip_test }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up OCaml ${{ matrix.ocaml-version }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-version }} + + - run: brew install xquartz + if: matrix.os == 'macos-latest' + - run: opam install . --deps-only --with-test + - run: opam install graphics + - run: opam exec -- dune build @install @examples @tutorial + - name: run test suite + run: opam exec -- dune build @runtest + if: env.SKIP_TEST != 'true' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/.gitignore new/ocaml-cairo-0.6.3/.gitignore --- old/ocaml-cairo-0.6.2/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-cairo-0.6.3/.gitignore 2022-05-22 09:20:40.000000000 +0200 @@ -0,0 +1,6 @@ +# -*-conf-unix-*- +.merlin +_build/ +*.install +packages +*.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/.travis.yml new/ocaml-cairo-0.6.3/.travis.yml --- old/ocaml-cairo-0.6.2/.travis.yml 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -language: c -sudo: required -install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh -script: bash -ex .travis-opam.sh -env: - global: - - PACKAGE=cairo2 - - DEPOPTS='conf-freetype' - - PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig - matrix: - - OCAML_VERSION=4.02 - - OCAML_VERSION=4.03 - - OCAML_VERSION=4.04 - - OCAML_VERSION=4.05 - - OCAML_VERSION=4.06 - - OCAML_VERSION=4.07 -os: - - linux - - osx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/CHANGES.md new/ocaml-cairo-0.6.3/CHANGES.md --- old/ocaml-cairo-0.6.2/CHANGES.md 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/CHANGES.md 2022-05-22 09:20:40.000000000 +0200 @@ -1,3 +1,9 @@ +0.6.3 2022-05-20 +---------------- + +- Fix bug in `Path.fold`. +- Extend `Image.get_data*` to bigarrays with externally managed payload. + 0.6.2 2020-11-23 ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/README.md new/ocaml-cairo-0.6.3/README.md --- old/ocaml-cairo-0.6.2/README.md 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/README.md 2022-05-22 09:20:40.000000000 +0200 @@ -1,5 +1,4 @@ -[![Build Status](https://travis-ci.org/Chris00/ocaml-cairo.svg?branch=master)](https://travis-ci.org/Chris00/ocaml-cairo) -[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/5dp8aftaq7ohyflq?svg=true)](https://ci.appveyor.com/project/Chris00/ocaml-cairo) +![Continuous Integration](https://github.com/Chris00/ocaml-cairo/actions/workflows/main.yml/badge.svg) OCaml interface to Cairo ======================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/appveyor.yml new/ocaml-cairo-0.6.3/appveyor.yml --- old/ocaml-cairo-0.6.2/appveyor.yml 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -platform: - - x64 - -environment: - global: - PACKAGE: cairo2 -# DEPOPTS: "*" - CYG_ROOT: "C:\\cygwin" - CYG_BASH: "%CYG_ROOT%\\bin\\bash -lc" - FORK_USER: ocaml - PRE_INSTALL_HOOK: opam depext -i lablgtk && opam install lablgtk - -init: - - 'echo System architecture: %PLATFORM%' - -install: - - appveyor DownloadFile https://raw.githubusercontent.com/%FORK_USER%/ocaml-ci-scripts/master/appveyor-opam.sh - - "%CYG_ROOT%\\setup-x86.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P rsync -P patch -P make -P unzip -P git -P perl -P mingw64-x86_64-gcc-core" - - curl -L -o C:/cygwin/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-win32.exe - -build_script: - - "%CYG_BASH% '${APPVEYOR_BUILD_FOLDER}/appveyor-opam.sh'" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/cairo2-gtk.opam new/ocaml-cairo-0.6.3/cairo2-gtk.opam --- old/ocaml-cairo-0.6.2/cairo2-gtk.opam 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/cairo2-gtk.opam 2022-05-22 09:20:40.000000000 +0200 @@ -16,7 +16,7 @@ depends: [ "ocaml" {>= "4.02"} "base-bigarray" - "dune" + "dune" {>= "2.0.0"} "conf-pkg-config" {build} "conf-cairo" "cairo2" {= version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/cairo2-pango.opam new/ocaml-cairo-0.6.3/cairo2-pango.opam --- old/ocaml-cairo-0.6.2/cairo2-pango.opam 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/cairo2-pango.opam 2022-05-22 09:20:40.000000000 +0200 @@ -16,7 +16,7 @@ depends: [ "ocaml" {>= "4.02"} "base-bigarray" - "dune" + "dune" {>= "2.7.0"} "conf-pkg-config" {build} "conf-cairo" "cairo2" {= version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/cairo2.opam new/ocaml-cairo-0.6.3/cairo2.opam --- old/ocaml-cairo-0.6.2/cairo2.opam 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/cairo2.opam 2022-05-22 09:20:40.000000000 +0200 @@ -17,8 +17,8 @@ depends: [ "ocaml" {>= "4.02"} "base-bigarray" - "dune" - "dune-configurator" + "dune" {>= "2.7.0"} + "dune-configurator" {>= "2.7.0"} "conf-cairo" ] depopts: [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/config/discover.ml new/ocaml-cairo-0.6.3/config/discover.ml --- old/ocaml-cairo-0.6.2/config/discover.ml 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/config/discover.ml 2022-05-22 09:20:40.000000000 +0200 @@ -16,8 +16,14 @@ let c_header_has_ft () = let fh = open_in "cairo_ocaml.h.p" in - let s = really_input_string fh (in_channel_length fh) in + let buf = Buffer.create 4096 in + let b = Bytes.create 4096 in + let n = ref 0 in + while n := input fh b 0 4096; !n > 0 do + Buffer.add_subbytes buf b 0 !n + done; close_in fh; + let s = Buffer.contents buf in let re = Str.regexp "/\\* *#define *OCAML_CAIRO_HAS_FT .*\\*/" in let s = Str.global_replace re "#define OCAML_CAIRO_HAS_FT 1" s in let fh = open_out "cairo_ocaml.h" in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/src/cairo_stubs.c new/ocaml-cairo-0.6.3/src/cairo_stubs.c --- old/ocaml-cairo-0.6.2/src/cairo_stubs.c 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/src/cairo_stubs.c 2022-05-22 09:20:40.000000000 +0200 @@ -393,7 +393,7 @@ for(i = 0; i < path->num_data; i += path->data[i].header.length) { data = &path->data[i]; PATH_DATA_ASSIGN(vdata, data); - vdata = caml_callback2(fn, vacc, vdata); + vacc = caml_callback2(fn, vacc, vdata); } CAMLreturn(vacc); } @@ -1564,6 +1564,7 @@ return(CAIRO_STATUS_SUCCESS); if (b->proxy != NULL) { /* If b is already a proxy, increment refcount. */ + /* FIXME, use caml_atomic_refcount_incr if available. */ ++ b->proxy->refcount; } else { @@ -1624,13 +1625,19 @@ \ if (data == NULL) \ invalid_argument("Cairo.Image.get_data: not an image surface."); \ - if (proxy == NULL) \ - invalid_argument("Cairo.Image.get_data: not created from a bigarray"); \ - vb = caml_ba_alloc(CAML_BA_##type | CAML_BA_C_LAYOUT | CAML_BA_MANAGED, \ - num_dims, data, dim); \ - /* Attach the proxy of the surface to the bigarray */ \ - ++ proxy->refcount; \ - (Caml_ba_array_val(vb))->proxy = proxy; \ + if (proxy == NULL) { \ + /* We assume the payload is externally managed */ \ + vb = caml_ba_alloc(CAML_BA_##type | CAML_BA_C_LAYOUT \ + | CAML_BA_EXTERNAL, \ + num_dims, data, dim); \ + } else { \ + vb = caml_ba_alloc(CAML_BA_##type | CAML_BA_C_LAYOUT \ + | CAML_BA_MANAGED, \ + num_dims, data, dim); \ + /* Attach the proxy of the surface to the bigarray */ \ + ++ proxy->refcount; \ + (Caml_ba_array_val(vb))->proxy = proxy; \ + } \ CAMLreturn(vb); \ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-cairo-0.6.2/tests/test_path.ml new/ocaml-cairo-0.6.3/tests/test_path.ml --- old/ocaml-cairo-0.6.2/tests/test_path.ml 2020-11-25 11:41:22.000000000 +0100 +++ new/ocaml-cairo-0.6.3/tests/test_path.ml 2022-05-22 09:20:40.000000000 +0200 @@ -25,6 +25,8 @@ line_to cr 100. 100.; let p = Path.to_array (Path.copy cr) in printf "Current path: %a\n%!" print_path p; + let p_rev = Path.fold (Path.copy cr) (fun l x -> x :: l) [] in + assert(Array.to_list p = List.rev p_rev); let q = [| LINE_TO(110., 200.); LINE_TO(50., 150.) |] in Path.append cr (Path.of_array q);