Re: [homebrew] Install parts of a formula keg-only
- From:
- Max Howell
- Date:
- 2011-08-26 @ 09:21
> Julian's post about emacs quashing ctags reminded me of a question I
meant to ask. Do we have a way to install *part* of a formula keg-only?
Yes as Charlie said, the simplest way is just to coax the bits you want
keg-only out of the standard directories (bin, lib, et cetera) as only
these are symlinked back to the brew prefix.
Max
Re: [homebrew] Install parts of a formula keg-only
- From:
- Misty De Meo
- Date:
- 2011-08-26 @ 14:38
Thanks. I'll do what Charlie and Max suggest and submit a new version of the
formula. /kegonly/lib seems like a reasonably self-descriptive path.
On Fri, Aug 26, 2011 at 4:21 AM, Max Howell <max@methylblue.com> wrote:
> > Julian's post about emacs quashing ctags reminded me of a question I
> meant to ask. Do we have a way to install *part* of a formula keg-only?
>
> Yes as Charlie said, the simplest way is just to coax the bits you want
> keg-only out of the standard directories (bin, lib, et cetera) as only these
> are symlinked back to the brew prefix.
>
> Max
>
>
Re: [homebrew] Install parts of a formula keg-only
- From:
- Adam Vandenberg
- Date:
- 2011-08-26 @ 14:40
We typically use a folder named "libexec" for private stuff.
On Fri, Aug 26, 2011 at 7:38 AM, Misty De Meo <mistydemeo@gmail.com> wrote:
> Thanks. I'll do what Charlie and Max suggest and submit a new version of the
> formula. /kegonly/lib seems like a reasonably self-descriptive path.
> On Fri, Aug 26, 2011 at 4:21 AM, Max Howell <max@methylblue.com> wrote:
>>
>> > Julian's post about emacs quashing ctags reminded me of a question I
>> > meant to ask. Do we have a way to install *part* of a formula keg-only?
>>
>> Yes as Charlie said, the simplest way is just to coax the bits you want
>> keg-only out of the standard directories (bin, lib, et cetera) as only these
>> are symlinked back to the brew prefix.
>>
>> Max
>>
>
>
Re: [homebrew] Install parts of a formula keg-only
- From:
- Max Howell
- Date:
- 2011-08-26 @ 14:45
Typicallt libexec is: System daemons and system utilities (executed by
other programs).
Though I guess it's one of those directories you can be a little flexible with.
> We typically use a folder named "libexec" for private stuff.
>
> On Fri, Aug 26, 2011 at 7:38 AM, Misty De Meo <mistydemeo@gmail.com> wrote:
>> Thanks. I'll do what Charlie and Max suggest and submit a new version of the
>> formula. /kegonly/lib seems like a reasonably self-descriptive path.
>> On Fri, Aug 26, 2011 at 4:21 AM, Max Howell <max@methylblue.com> wrote:
>>>
>>>> Julian's post about emacs quashing ctags reminded me of a question I
>>>> meant to ask. Do we have a way to install *part* of a formula keg-only?
>>>
>>> Yes as Charlie said, the simplest way is just to coax the bits you want
>>> keg-only out of the standard directories (bin, lib, et cetera) as only these
>>> are symlinked back to the brew prefix.
>>>
>>> Max
Re: [homebrew] Install parts of a formula keg-only
- From:
- Adam Vandenberg
- Date:
- 2011-08-26 @ 14:52
Max is correct, but Homebrew has a history of abusing libexec in kegs
for private-use stuff of any sort.
On Fri, Aug 26, 2011 at 7:45 AM, Max Howell <max@methylblue.com> wrote:
> Typicallt libexec is: System daemons and system utilities (executed by
other programs).
>
> Though I guess it's one of those directories you can be a little flexible with.
>
>> We typically use a folder named "libexec" for private stuff.
>>
>> On Fri, Aug 26, 2011 at 7:38 AM, Misty De Meo <mistydemeo@gmail.com> wrote:
>>> Thanks. I'll do what Charlie and Max suggest and submit a new version of the
>>> formula. /kegonly/lib seems like a reasonably self-descriptive path.
>>> On Fri, Aug 26, 2011 at 4:21 AM, Max Howell <max@methylblue.com> wrote:
>>>>
>>>>> Julian's post about emacs quashing ctags reminded me of a question I
>>>>> meant to ask. Do we have a way to install *part* of a formula keg-only?
>>>>
>>>> Yes as Charlie said, the simplest way is just to coax the bits you want
>>>> keg-only out of the standard directories (bin, lib, et cetera) as only these
>>>> are symlinked back to the brew prefix.
>>>>
>>>> Max
>
Re: [homebrew] Install parts of a formula keg-only
- From:
- Misty De Meo
- Date:
- 2011-08-26 @ 14:42
OK, I'll use libexec instead in that case.
On Fri, Aug 26, 2011 at 9:40 AM, Adam Vandenberg <flangy@gmail.com> wrote:
> We typically use a folder named "libexec" for private stuff.
>
> On Fri, Aug 26, 2011 at 7:38 AM, Misty De Meo <mistydemeo@gmail.com>
> wrote:
> > Thanks. I'll do what Charlie and Max suggest and submit a new version of
> the
> > formula. /kegonly/lib seems like a reasonably self-descriptive path.
> > On Fri, Aug 26, 2011 at 4:21 AM, Max Howell <max@methylblue.com> wrote:
> >>
> >> > Julian's post about emacs quashing ctags reminded me of a question I
> >> > meant to ask. Do we have a way to install *part* of a formula
> keg-only?
> >>
> >> Yes as Charlie said, the simplest way is just to coax the bits you want
> >> keg-only out of the standard directories (bin, lib, et cetera) as only
> these
> >> are symlinked back to the brew prefix.
> >>
> >> Max
> >>
> >
> >
>
Re: [homebrew] Install parts of a formula keg-only
- From:
- Charlie Sharpsteen
- Date:
- 2011-08-25 @ 19:18
On Thu, Aug 25, 2011 at 11:58 AM, Misty De Meo <mistydemeo@gmail.com> wrote:
> Julian's post about emacs quashing ctags reminded me of a question I meant
> to ask. Do we have a way to install *part* of a formula keg-only?
>
> As discussed in https://github.com/mxcl/homebrew/pull/6240, cdparanoia on
> Mac has some problems that makes linking against it very iffy and
> unreliable. Leaving the shared libraries around for configure scripts to
> find is probably quite dangerous, but it would be nice to continue building
> shared libraries so that programs that build nicely against the Mac version
> have that option.
>
> As far as I can tell, we don't have an option right now to make parts of a
> formula keg-only - e.g., link the bin into /usr/local, but tuck the libs
> away where they have to be explicitly looked for. Am I wrong? (That would be
> awesome.) If not, maybe that would be worth considering.
>
> Misty
>
Two ways to do it that I can think of. One is to jail the parts you don't
want linked by prefixing them with another folder--i.e.
`dont-link-this/lib`, `dont-link-this/bin`, etc. This works because Homebrew
only links stuff in the standard folders, `bin`, `lib`, `etc`, `var`, etc.
See the formula for GCC in Homebrew-alt for an example of this:
https://github.com/adamv/homebrew-alt/blob/master/duplicates/gcc.rb#L89-94
The second way is what Dave suggested: Flag the entire formula as `keg_only`
so Homebrew skips the links it would form by default. Then explicitly call
`bin.link`, `lib.link`, etc on the pieces that you do want to be linked.
-Charlie
Re: [homebrew] Install parts of a formula keg-only
- From:
- Dave Bayer
- Date:
- 2011-08-25 @ 19:11
On Aug 25, 2011, at 11:58 AM, Misty De Meo wrote:
> As far as I can tell, we don't have an option right now to make parts of
a formula keg-only - e.g., link the bin into /usr/local, but tuck the libs
away where they have to be explicitly looked for. Am I wrong? (That would
be awesome.) If not, maybe that would be worth considering.
As a rookie code-reader, I'd rephrase this that there's no "top level
interface" way to do this. However, all the code Homebrew uses is there.
One sees formula code drop down a level to call a Homebrew routine. A
typical example is dealing with a newer version of a library that is
already provided by Apple: One installs it privately into one's temporary
build directory, prepends it into one's PATH, and afterwards it gets taken
out with the trash.
Rather than doing this entirely ad-hoc, the formulas make appropriate
calls to the Homebrew code, and take advantage of the support already
there.
Here, you'd declare the formula keg-only, then call the "down one level"
Homebrew code to symlink the parts you want.