From owner-freebsd-ports@FreeBSD.ORG Sat Jul 29 19:42:08 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08CAE16A4DE; Sat, 29 Jul 2006 19:42:08 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BC7C43D5F; Sat, 29 Jul 2006 19:42:07 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [217.118.83.1] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1G6uow-0003j5-VU; Sat, 29 Jul 2006 23:50:05 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 0781311B6A; Sat, 29 Jul 2006 23:27:29 +0400 (MSD) Date: Sat, 29 Jul 2006 23:27:22 +0400 From: Stanislav Sedov To: freebsd-ports@freebsd.org, argentoff@gmail.com, lioux@FreeBSD.org, stephane@FreeBSD.org, mukai@jmuk.org, djulien.bsd@gmail.com Message-ID: <20060729232722.7791c5c0@localhost> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_1TaIEwmbc0ebTROlIvxp8Qe; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.5.2 Cc: Subject: OCaml language support in ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2006 19:42:08 -0000 --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 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. =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--