Import graphics/ocaml-graphics

This was formally shipped with the OCaml compiler distribution,
but is now a seperate project.

ok jca@, krw@, sthen@
This commit is contained in:
chrisz 2019-09-26 09:33:14 +00:00
parent 5c00cd5abd
commit a05a0ef62b
6 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# $OpenBSD: Makefile,v 1.1.1.1 2019/09/26 09:33:14 chrisz Exp $
COMMENT = graphics library providing basic drawing primitives
CATEGORIES = graphics
V = 5.0.0
DISTNAME = graphics-$V
PKGNAME = ocaml-graphics-$V
# LGPL 2.1 with linking exception
PERMIT_PACKAGE = Yes
WANTLIB += X11
MASTER_SITES = https://github.com/ocaml/graphics/releases/download/${V}/
EXTRACT_SUFX = .tbz
MODULES = lang/ocaml
BUILD_DEPENDS = devel/dune
MAKE_ENV = CPATH=${X11BASE}/include \
LIBRARY_PATH=${X11BASE}/lib
ALL_TARGET = default
post-install:
mv ${PREFIX}/doc/graphics ${PREFIX}/share/doc/ocaml-graphics
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (graphics-5.0.0.tbz) = Lc9g1VKusri/bB/hlkxa/+i/44vEuGJZ7k3L66IwFV0=
SIZE (graphics-5.0.0.tbz) = 39856

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_unix_open_c,v 1.1.1.1 2019/09/26 09:33:14 chrisz Exp $
Index: src/unix/open.c
--- src/unix/open.c.orig
+++ src/unix/open.c
@@ -365,7 +365,7 @@ value caml_gr_sigio_handler(void)
/* Processing of graphic errors */
-static value * graphic_failure_exn = NULL;
+const static value * graphic_failure_exn = NULL;
void caml_gr_fail(const char *fmt, const char *arg)
{

View File

@ -0,0 +1,2 @@
The Graphics module provides portable basic drawing primitives.
It used to be distributed with the OCaml compiler up to OCaml 4.08.

View File

@ -0,0 +1,6 @@
@comment $OpenBSD: PFRAG.native,v 1.1.1.1 2019/09/26 09:33:14 chrisz Exp $
lib/ocaml/graphics/graphics.a
lib/ocaml/graphics/graphics.cmx
lib/ocaml/graphics/graphics.cmxa
lib/ocaml/graphics/graphics.cmxs
lib/ocaml/graphics/graphicsX11.cmx

View File

@ -0,0 +1,25 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/09/26 09:33:14 chrisz Exp $
@pkgpath lang/ocaml,-graphics
%%native%%
doc/
lib/ocaml/graphics/
lib/ocaml/graphics/META
lib/ocaml/graphics/dune-package
lib/ocaml/graphics/graphics.cma
lib/ocaml/graphics/graphics.cmi
lib/ocaml/graphics/graphics.cmt
lib/ocaml/graphics/graphics.cmti
lib/ocaml/graphics/graphics.ml
lib/ocaml/graphics/graphics.mli
lib/ocaml/graphics/graphicsX11.cmi
lib/ocaml/graphics/graphicsX11.cmt
lib/ocaml/graphics/graphicsX11.cmti
lib/ocaml/graphics/graphicsX11.ml
lib/ocaml/graphics/graphicsX11.mli
lib/ocaml/graphics/libgraphics_stubs.a
lib/ocaml/graphics/opam
lib/ocaml/stublibs/dllgraphics_stubs.so
share/doc/ocaml-graphics/
share/doc/ocaml-graphics/CHANGES.md
share/doc/ocaml-graphics/LICENSE
share/doc/ocaml-graphics/README.md