Date: Sat, 29 Jul 2006 23:27:22 +0400 From: Stanislav Sedov <ssedov@mbsd.msk.ru> To: freebsd-ports@freebsd.org, argentoff@gmail.com, lioux@FreeBSD.org, stephane@FreeBSD.org, mukai@jmuk.org, djulien.bsd@gmail.com Subject: OCaml language support in ports Message-ID: <20060729232722.7791c5c0@localhost>
next in thread | raw e-mail | index | archive | help
--Sig_1TaIEwmbc0ebTROlIvxp8Qe Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable We have a lot of OCaml ports that provides additional language packages for OCaml language. Installing of such pacakge requites a lot of steps, e.g. running ocamlfind utility on install/deinstall with correct enviropment, updating OCaml-specific ld.conf on install/deinstall and other. As result ports become a bit complex and very large. You can see working examples in devel/ocaml-equeue, devel/ocaml-sem etc. This ports do similar work "by-hand" via pmake constructs and pkg-install script. I have submitted include to support OCaml language recently (http://www.freebsd.org/cgi/query-pr.cgi?pr=3D101029). This include simplifies creation on such ports. For example, the port for ocaml-xstr might look like this (this port isn't in ports collection yet): PORTNAME=3D xstr PORTVERSION=3D 0.2.1 CATEGORIES=3D devel MASTER_SITES=3D http://www.ocaml-programming.de/packages/ PKGNAMEPREFIX=3D ocaml- MAINTAINER=3D ssedov@mbsd.msk.ru COMMENT=3D Thread-safe implementation of string searching/ma= tching WRKSRC=3D ${WRKDIR}/${PORTNAME} USE_GMAKE=3D yes USE_OCAML=3D yes USE_OCAML_FINDLIB=3D yes USE_OCAML_LDCONFIG=3D yes .include <bsd.port.mk> And pkg-plist: %%OCAML_SITELIBDIR%%/xstr/META %%OCAML_SITELIBDIR%%/xstr/xstr.cma %%OCAML_SITELIBDIR%%/xstr/xstr_match.cmi %%OCAML_SITELIBDIR%%/xstr/xstr_match.mli %%OCAML_SITELIBDIR%%/xstr/xstr_search.cmi %%OCAML_SITELIBDIR%%/xstr/xstr_search.mli %%OCAML_SITELIBDIR%%/xstr/xstr_split.cmi %%OCAML_SITELIBDIR%%/xstr/xstr_split.mli Simple, isn't it? Compare with ocaml-sem - it does the same steps. The include doesn't interfere with ports available, and sufficient for ocaml-* ports needs (hopely). I paid a great deal of attention to make ports to honor PREFIX -=20 current findlib ports doesn't do this. This include will automatically honor PREFIX - but in case of non-standard on you should handle SITELIBDIR deletion by hand. Additionally, include automatically adds OCAML_SITELIBDIR to PLIST_SUB. It would be nice to have your opinions/suggestions/blames/flames here. Especially, ocaml-* ports maintainers. Thanks! --=20 Stanislav Sedov MBSD labs, Inc. <ssedov@mbsd.msk.ru> =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_1TaIEwmbc0ebTROlIvxp8Qe Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEy7agK/VZk+smlYERAijuAJ9O9GDdeGW6pvdoTcBinxbggk9d9gCfSQGw vnAeShY8TOhwwqffBaGMUmc= =bWzY -----END PGP SIGNATURE----- --Sig_1TaIEwmbc0ebTROlIvxp8Qe--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060729232722.7791c5c0>