Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graphics package to existing switches #12674

Merged
merged 3 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/conf-libX11/conf-libX11.1/files/pkg-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [ -n "$PKG_CONFIG_PATH" ] ; then
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:
fi

PKG_CONFIG_PATH=$PKG_CONFIG_PATH/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig pkg-config x11
22 changes: 22 additions & 0 deletions packages/conf-libX11/conf-libX11.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "2.0"
maintainer: "David Allsopp <[email protected]>"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
authors: ["X.Org Foundation"]
homepage: "https://www.x.org"
license: "MIT"
build: [
["pkg-config" "x11"] {os != "macos"}
["./pkg-osx.sh"] {os = "macos"}
]
depends: ["conf-pkg-config" {build}]
depexts: [
["libx11-dev"] {os-distribution = "debian" | os-distribution = "ubuntu"}
["libX11-devel"] {os-distribution = "centos" | os-distribution = "oraclelinux" | os-distribution = "fedora" | os-distribution = "opensuse"}
["libx11-dev"] {os-distribution = "alpine"}
["libx11`"] {os-distribution = "archlinux"}
["libX11-dev"] {os-distribution = "cygwin"}
]
synopsis: "Virtual package relying on an Xlib system installation"
description:
"This package can only install if Xlib (libX11) is installed on the system."
extra-files: ["pkg-osx.sh" "md5=af634765ff5d52ee1b858b679f0e5c28"]
6 changes: 6 additions & 0 deletions packages/graphics/graphics.3.07+1/files/META
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = "3.07+1"
description = "Portable drawing primitives"
archive(byte) = "graphics.cma"
archive(native) = "graphics.cmxa"
plugin(byte) = "graphics.cma"
plugin(native) = "graphics.cmxs"
68 changes: 68 additions & 0 deletions packages/graphics/graphics.3.07+1/files/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/sh

if test -e "`ocamlopt -where 2>/dev/null || ocamlc -where`/graphics.cmi" ; then
# Graphics library already installed
exit 0
fi

VERSION=`ocamlopt -version 2>/dev/null || ocamlc -version`
VERSION=`echo $VERSION | sed -e 's/[+.]//g'`

# Installation variables in the Makefile altered with 4.02.0
if test $VERSION -ge 4020 ; then
K_LIBDIR=INSTALL_LIBDIR
K_STUBLIBDIR=INSTALL_STUBLIBDIR
else
K_LIBDIR=LIBDIR
K_STUBLIBDIR=STUBLIBDIR
fi

if test "$1" = "build" ; then
# For system compilers, use the real OCaml LIBDIR, otherwise use the opam one
if $2 ; then
OCAML_LIBDIR="`ocamlopt -where 2>/dev/null || ocamlc -where`"
else
OCAML_LIBDIR="$3"
fi

# Configure the source tree
if test $VERSION -ge 3090 ; then
if test $VERSION -ge 4040 ; then
# reconfigure target introduced in 4.04.0
cp "$OCAML_LIBDIR/Makefile.config" config/Makefile
$4 reconfigure
else
# Otherwise, execute the first line from Makefile.config (which includes
# the arguments used)
`sed -ne '1s/# generated by //p' "$OCAML_LIBDIR/Makefile.config"`
fi
else
# Prior to OCaml 3.09.0, config/Makefile wasn't installed, so we just have
# to make a buest guess
./configure -libdir "$OCAML_LIBDIR"
fi

# Build the library
$4 -C otherlibs/graph CAMLC=ocamlc CAMLOPT=ocamlopt MKLIB=ocamlmklib all $5

if ! $2 ; then
# System compilers must always have META installed (since ocamlfind either
# won't have installed it, or won't create it when installed), but otherwise
# it should only be installed if ocamlfind is already installed (since a
# subsequent installation will detect the graphics library and install META)
if ! test -e "$3/topfind" ; then
rm META
fi
fi
else
if test -e META ; then
mkdir -p "$3"
cp -f META "$3/META"
fi

if $2 ; then
$4 "$K_LIBDIR=$3" "$K_STUBLIBDIR=$5" -C otherlibs/graph install $6
else
$4 -C otherlibs/graph install $6
fi
fi
42 changes: 42 additions & 0 deletions packages/graphics/graphics.3.07+1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
opam-version: "2.0"
maintainer: "David Allsopp <[email protected]>"
bug-reports: "https://caml.inria.fr/mantis"
dev-repo: "git+https://github.com/ocaml/ocaml.git"
authors: [ "Xavier Leroy"
"Jun Furuse"
"J-M Geffroy"
"Jacob Navia"
"Pierre Weis" ]
homepage: "https://ocaml.org"
license: "LGPL-2.1 with OCaml linking exception"
build: [
["chmod" "+x" "install.sh"]
["./install.sh" "build" "%{ocaml:preinstalled}%" "%{ocaml:lib}%" make "allopt" {ocaml:native}]
]
install: [
["./install.sh" "install" "%{ocaml:preinstalled}%" "%{_:lib}%" make stublibs "installopt" {ocaml:native}]
]
depends: [
"conf-libX11"
"ocaml" {= "3.07+1"}
]
synopsis: "The OCaml graphics library"
description:
"Ensures that the OCaml graphics library is available, building it if needed."
extra-files: [
["META" "md5=f6e58fde0430a780b9328f930fa23e34"]
["install.sh" "md5=62f8421d654b8ed18b72c693bd58aef7"]]
url {
src: "https://caml.inria.fr/pub/distrib/ocaml-3.07/ocaml-3.07.tar.gz"
checksum: "md5=2dd038055f5e1350078ad81270411b78"
}
patches: ["ocaml-3.07-patch1.diffs" "PR5477.patch"]
extra-source "ocaml-3.07-patch1.diffs" {
src: "https://caml.inria.fr/pub/distrib/ocaml-3.07/ocaml-3.07-patch1.diffs"
checksum: "md5=50e158dee599e00a4b9b93041ea9d21f"
}
extra-source "PR5477.patch" {
src:
"https://raw.githubusercontent.com/metastack/ocaml-legacy/master/PR5477-to-3.09.3.patch"
checksum: "md5=0431293b171ef2d09a5dd456dfe43629"
}
6 changes: 6 additions & 0 deletions packages/graphics/graphics.3.07+2/files/META
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = "3.07+2"
description = "Portable drawing primitives"
archive(byte) = "graphics.cma"
archive(native) = "graphics.cmxa"
plugin(byte) = "graphics.cma"
plugin(native) = "graphics.cmxs"
68 changes: 68 additions & 0 deletions packages/graphics/graphics.3.07+2/files/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/sh

if test -e "`ocamlopt -where 2>/dev/null || ocamlc -where`/graphics.cmi" ; then
# Graphics library already installed
exit 0
fi

VERSION=`ocamlopt -version 2>/dev/null || ocamlc -version`
VERSION=`echo $VERSION | sed -e 's/[+.]//g'`

# Installation variables in the Makefile altered with 4.02.0
if test $VERSION -ge 4020 ; then
K_LIBDIR=INSTALL_LIBDIR
K_STUBLIBDIR=INSTALL_STUBLIBDIR
else
K_LIBDIR=LIBDIR
K_STUBLIBDIR=STUBLIBDIR
fi

if test "$1" = "build" ; then
# For system compilers, use the real OCaml LIBDIR, otherwise use the opam one
if $2 ; then
OCAML_LIBDIR="`ocamlopt -where 2>/dev/null || ocamlc -where`"
else
OCAML_LIBDIR="$3"
fi

# Configure the source tree
if test $VERSION -ge 3090 ; then
if test $VERSION -ge 4040 ; then
# reconfigure target introduced in 4.04.0
cp "$OCAML_LIBDIR/Makefile.config" config/Makefile
$4 reconfigure
else
# Otherwise, execute the first line from Makefile.config (which includes
# the arguments used)
`sed -ne '1s/# generated by //p' "$OCAML_LIBDIR/Makefile.config"`
fi
else
# Prior to OCaml 3.09.0, config/Makefile wasn't installed, so we just have
# to make a buest guess
./configure -libdir "$OCAML_LIBDIR"
fi

# Build the library
$4 -C otherlibs/graph CAMLC=ocamlc CAMLOPT=ocamlopt MKLIB=ocamlmklib all $5

if ! $2 ; then
# System compilers must always have META installed (since ocamlfind either
# won't have installed it, or won't create it when installed), but otherwise
# it should only be installed if ocamlfind is already installed (since a
# subsequent installation will detect the graphics library and install META)
if ! test -e "$3/topfind" ; then
rm META
fi
fi
else
if test -e META ; then
mkdir -p "$3"
cp -f META "$3/META"
fi

if $2 ; then
$4 "$K_LIBDIR=$3" "$K_STUBLIBDIR=$5" -C otherlibs/graph install $6
else
$4 -C otherlibs/graph install $6
fi
fi
42 changes: 42 additions & 0 deletions packages/graphics/graphics.3.07+2/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
opam-version: "2.0"
maintainer: "David Allsopp <[email protected]>"
bug-reports: "https://caml.inria.fr/mantis"
dev-repo: "git+https://github.com/ocaml/ocaml.git"
authors: [ "Xavier Leroy"
"Jun Furuse"
"J-M Geffroy"
"Jacob Navia"
"Pierre Weis" ]
homepage: "https://ocaml.org"
license: "LGPL-2.1 with OCaml linking exception"
build: [
["chmod" "+x" "install.sh"]
["./install.sh" "build" "%{ocaml:preinstalled}%" "%{ocaml:lib}%" make "allopt" {ocaml:native}]
]
install: [
["./install.sh" "install" "%{ocaml:preinstalled}%" "%{_:lib}%" make stublibs "installopt" {ocaml:native}]
]
depends: [
"conf-libX11"
"ocaml" {= "3.07+2"}
]
synopsis: "The OCaml graphics library"
description:
"Ensures that the OCaml graphics library is available, building it if needed."
extra-files: [
["META" "md5=1a7f3c4e05f1149a33cde0c99a825cf2"]
["install.sh" "md5=62f8421d654b8ed18b72c693bd58aef7"]]
url {
src: "https://caml.inria.fr/pub/distrib/ocaml-3.07/ocaml-3.07.tar.gz"
checksum: "md5=2dd038055f5e1350078ad81270411b78"
}
patches: ["ocaml-3.07-patch2.diffs" "PR5477.patch"]
extra-source "ocaml-3.07-patch2.diffs" {
src: "https://caml.inria.fr/pub/distrib/ocaml-3.07/ocaml-3.07-patch2.diffs"
checksum: "md5=f91d1f1e531f77011bd554817dbbc12a"
}
extra-source "PR5477.patch" {
src:
"https://raw.githubusercontent.com/metastack/ocaml-legacy/master/PR5477-to-3.09.3.patch"
checksum: "md5=0431293b171ef2d09a5dd456dfe43629"
}
6 changes: 6 additions & 0 deletions packages/graphics/graphics.3.07/files/META
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = "3.07"
description = "Portable drawing primitives"
archive(byte) = "graphics.cma"
archive(native) = "graphics.cmxa"
plugin(byte) = "graphics.cma"
plugin(native) = "graphics.cmxs"
68 changes: 68 additions & 0 deletions packages/graphics/graphics.3.07/files/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/sh

if test -e "`ocamlopt -where 2>/dev/null || ocamlc -where`/graphics.cmi" ; then
# Graphics library already installed
exit 0
fi

VERSION=`ocamlopt -version 2>/dev/null || ocamlc -version`
VERSION=`echo $VERSION | sed -e 's/[+.]//g'`

# Installation variables in the Makefile altered with 4.02.0
if test $VERSION -ge 4020 ; then
K_LIBDIR=INSTALL_LIBDIR
K_STUBLIBDIR=INSTALL_STUBLIBDIR
else
K_LIBDIR=LIBDIR
K_STUBLIBDIR=STUBLIBDIR
fi

if test "$1" = "build" ; then
# For system compilers, use the real OCaml LIBDIR, otherwise use the opam one
if $2 ; then
OCAML_LIBDIR="`ocamlopt -where 2>/dev/null || ocamlc -where`"
else
OCAML_LIBDIR="$3"
fi

# Configure the source tree
if test $VERSION -ge 3090 ; then
if test $VERSION -ge 4040 ; then
# reconfigure target introduced in 4.04.0
cp "$OCAML_LIBDIR/Makefile.config" config/Makefile
$4 reconfigure
else
# Otherwise, execute the first line from Makefile.config (which includes
# the arguments used)
`sed -ne '1s/# generated by //p' "$OCAML_LIBDIR/Makefile.config"`
fi
else
# Prior to OCaml 3.09.0, config/Makefile wasn't installed, so we just have
# to make a buest guess
./configure -libdir "$OCAML_LIBDIR"
fi

# Build the library
$4 -C otherlibs/graph CAMLC=ocamlc CAMLOPT=ocamlopt MKLIB=ocamlmklib all $5

if ! $2 ; then
# System compilers must always have META installed (since ocamlfind either
# won't have installed it, or won't create it when installed), but otherwise
# it should only be installed if ocamlfind is already installed (since a
# subsequent installation will detect the graphics library and install META)
if ! test -e "$3/topfind" ; then
rm META
fi
fi
else
if test -e META ; then
mkdir -p "$3"
cp -f META "$3/META"
fi

if $2 ; then
$4 "$K_LIBDIR=$3" "$K_STUBLIBDIR=$5" -C otherlibs/graph install $6
else
$4 -C otherlibs/graph install $6
fi
fi
38 changes: 38 additions & 0 deletions packages/graphics/graphics.3.07/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
opam-version: "2.0"
maintainer: "David Allsopp <[email protected]>"
bug-reports: "https://caml.inria.fr/mantis"
dev-repo: "git+https://github.com/ocaml/ocaml.git"
authors: [ "Xavier Leroy"
"Jun Furuse"
"J-M Geffroy"
"Jacob Navia"
"Pierre Weis" ]
homepage: "https://ocaml.org"
license: "LGPL-2.1 with OCaml linking exception"
build: [
["chmod" "+x" "install.sh"]
["./install.sh" "build" "%{ocaml:preinstalled}%" "%{ocaml:lib}%" make "allopt" {ocaml:native}]
]
install: [
["./install.sh" "install" "%{ocaml:preinstalled}%" "%{_:lib}%" make stublibs "installopt" {ocaml:native}]
]
depends: [
"conf-libX11"
"ocaml" {= "3.07"}
]
synopsis: "The OCaml graphics library"
description:
"Ensures that the OCaml graphics library is available, building it if needed."
extra-files: [
["META" "md5=9eb0c8a52e8471b88e9e409a1c957e12"]
["install.sh" "md5=62f8421d654b8ed18b72c693bd58aef7"]]
url {
src: "https://caml.inria.fr/pub/distrib/ocaml-3.07/ocaml-3.07.tar.gz"
checksum: "md5=2dd038055f5e1350078ad81270411b78"
}
extra-source "PR5477.patch" {
src:
"https://raw.githubusercontent.com/metastack/ocaml-legacy/master/PR5477-to-3.09.3.patch"
checksum: "md5=0431293b171ef2d09a5dd456dfe43629"
}
patches: ["PR5477.patch"]
6 changes: 6 additions & 0 deletions packages/graphics/graphics.3.08.0/files/META
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = "3.08.0"
description = "Portable drawing primitives"
archive(byte) = "graphics.cma"
archive(native) = "graphics.cmxa"
plugin(byte) = "graphics.cma"
plugin(native) = "graphics.cmxs"
Loading