* [gentoo-dev] RFC: findlib/ocamlfind eclass
@ 2004-08-19 19:44 Matthieu Sozeau
2004-08-20 0:36 ` Aron Griffis
0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Sozeau @ 2004-08-19 19:44 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 306 bytes --]
Hi,
i'd like to add an eclass for ocaml packages using the findlib
mechanism to install themselves. It's short and useful. I'll add it if
there's no objections.
--
BOFH Excuse #369: Virus transmitted from computer to sysadmins.
Gentoo Developer (ml, emacs) - http://dev.gentoo.org/~mattam
[-- Attachment #1.2: findlib.eclass --]
[-- Type: text/plain, Size: 890 bytes --]
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/eclass/mono.eclass,v 1.1 2003/02/27 16:50:51 foser Exp $
#
# Author : Matthieu Sozeau <mattam@gentoo.org>
#
# ocamlfind (a.k.a. findlib) eclass
#
ECLASS="findlib"
INHERITED="$INHERITED $ECLASS"
DEPEND="dev-ml/findlib"
# Prepare the image for a findlib installation.
# We use the stublibs style, so no ld.conf needs to be
# updated when a package installs C shared libraries.
findlib_src_preinst() {
# destdir is the ocaml sitelib
local destdir=`ocamlfind printconf destdir`
dodir ${destdir}
export OCAMLFIND_DESTDIR=${D}${destdir}
# stublibs style
dodir ${destdir}/stublibs
}
# Install with a properly setup findlib
findlib_src_install() {
findlib_src_preinst
make DESTDIR=${D} $@ install
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] RFC: findlib/ocamlfind eclass
2004-08-20 0:36 ` Aron Griffis
@ 2004-08-20 0:35 ` Matthieu Sozeau
0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Sozeau @ 2004-08-20 0:35 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
On Thu, Aug 19, 2004 at 08:36:35PM -0400, Aron Griffis wrote:
> Matthieu Sozeau wrote: [Thu Aug 19 2004, 03:44:41PM EDT]
> > local destdir=`ocamlfind printconf destdir`
> > dodir ${destdir}
>
> Shouldn't ocamlfind be checked for failure before running dodir?
ocamlfind should be properly installed if findlib is merged, but you're
right, i could also be broken :)
>
> > make DESTDIR=${D} $@ install
>
> You probably want $@ in double-quotes: "$@" Here is the relevant
> section from the bash man-page:
>
> @ Expands to the positional parameters, starting from one. When
> the expansion occurs within double quotes, each parameter
> expands to a separate word. That is, "$@" is equivalent to "$1"
> "$2" ... When there are no positional parameters, "$@" and $@
> expand to nothing (i.e., they are removed).
Thanks for the tip!
--
BOFH Excuse #6: global warming
Gentoo Developer (ml, emacs) - http://dev.gentoo.org/~mattam
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] RFC: findlib/ocamlfind eclass
2004-08-19 19:44 [gentoo-dev] RFC: findlib/ocamlfind eclass Matthieu Sozeau
@ 2004-08-20 0:36 ` Aron Griffis
2004-08-20 0:35 ` Matthieu Sozeau
0 siblings, 1 reply; 3+ messages in thread
From: Aron Griffis @ 2004-08-20 0:36 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
Matthieu Sozeau wrote: [Thu Aug 19 2004, 03:44:41PM EDT]
> local destdir=`ocamlfind printconf destdir`
> dodir ${destdir}
Shouldn't ocamlfind be checked for failure before running dodir?
> make DESTDIR=${D} $@ install
You probably want $@ in double-quotes: "$@" Here is the relevant
section from the bash man-page:
@ Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter
expands to a separate word. That is, "$@" is equivalent to "$1"
"$2" ... When there are no positional parameters, "$@" and $@
expand to nothing (i.e., they are removed).
Regards,
Aron
--
Aron Griffis
Gentoo Linux Developer
[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-20 0:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 19:44 [gentoo-dev] RFC: findlib/ocamlfind eclass Matthieu Sozeau
2004-08-20 0:36 ` Aron Griffis
2004-08-20 0:35 ` Matthieu Sozeau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox