Skip to content
Snippets Groups Projects
Commit cf876cf9 authored by rubicon's avatar rubicon Committed by alice
Browse files

testing/ocamlnet: new aport

parent 4147dbef
No related branches found
No related tags found
1 merge request!34403testing/ocaml-*: upgrade Reason ML, add OCamlnet and LablGtk3
# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocamlnet
pkgver=4.1.9
pkgrel=0
pkgdesc="Network and system programming library for OCaml"
url="http://projects.camlcity.org/projects/ocamlnet.html"
arch="all !riscv64" # restricted by ocaml
license="zlib-acknowledgement, BSD-3-Clause and GPL-2.0-only"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="
ocaml
ocaml-camlzip-dev
ocaml-compiler-libs
ocaml-dev
ocaml-findlib
ocaml-pcre-dev
gnutls-dev
pcre-dev
tcl-dev
"
subpackages="$pkgname-tcl $pkgname-dev"
source="http://download.camlcity.org/download/ocamlnet-4.1.9.tar.gz
fix-version-number.patch
"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
export C_INCLUDE_PATH=/usr/lib/ocaml
./configure \
-datadir /usr/share/"$pkgname" \
-enable-pcre \
-enable-gnutls \
-enable-zip \
-with-nethttpd \
-enable-tcl \
-equeue-tcl-defs -I/usr/include \
-equeue-tcl-libs -ltcl8.6
msg "Building Ocamlnet bytecode libraries"
make -j1 all
msg "Building Ocamlnet native code libraries"
make opt
}
package() {
export DESTDIR="$pkgdir"
export OCAMLFIND_DESTDIR="$pkgdir"/usr/lib/ocaml
mkdir -vp "$pkgdir"/usr/share/"$pkgname" \
"$OCAMLFIND_DESTDIR"/stublibs
make install
}
tcl() {
pkgdesc="$pkgdesc (Tcl event system)"
amove usr/lib/ocaml/equeue-tcl \
usr/lib/ocaml/stublibs/dllequeue_tcl*
}
dev() {
default_dev
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
}
sha512sums="
a251724deb35e756c81d2d3ac836d413b659acdce6c0acf479a4fca48934ab62ad399a884197d00dbb7e7558132a56be1c8efd553c0a644d329418272f809a46 ocamlnet-4.1.9.tar.gz
0fd0e8e51229a126ebf96fdac957d2ed69e8b3511b11b2d0a7b6d4a6f77018a4f79370f59f5ce460ad5847dc727cdddce96b2aa1da7180baff1245aee35939f4 fix-version-number.patch
"
--- a/configure
+++ b/configure
@@ -73,7 +73,7 @@
ocamlc=`get_path ocamlc`
set_defaults
-version="$(sed -ne 's/^version: *"\(.*\)\.git".*/\1/p' ../opam)"
+version="4.1.9"
exec_suffix=""
path_sep=":"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment