* [gentoo-user] question about portage capabilities
@ 2009-04-19 1:33 Denis
2009-04-19 2:23 ` Paul Hartman
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Denis @ 2009-04-19 1:33 UTC (permalink / raw
To: gentoo-user
Hello all,
I am using a package called Rasmol, which is used for visualization of
molecular structures. This software uses a certain table for atomic
sizes, and I need to change some values in that table - it is stored
in a header file within Rasmol source code. There is an ebuild for
Rasmol, and it works fine - but what I'm wondering is how I can tell
portage to STOP once it unpacks Rasmol in the temporary work directory
- so I can tweak some things in the source code - and then resume the
build, using what's already in the work directory. Looking at a
manpage for emerge, I didn't immediately get any creative ideas, but
might someone offer some advice for how to accomplish this?
Many thanks,
Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 1:33 [gentoo-user] question about portage capabilities Denis
@ 2009-04-19 2:23 ` Paul Hartman
2009-04-19 2:49 ` Jorge Morais
2009-04-19 2:27 ` Mike Kazantsev
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Paul Hartman @ 2009-04-19 2:23 UTC (permalink / raw
To: gentoo-user
On Sat, Apr 18, 2009 at 8:33 PM, Denis <denis.che@gmail.com> wrote:
> Hello all,
>
> I am using a package called Rasmol, which is used for visualization of
> molecular structures. This software uses a certain table for atomic
> sizes, and I need to change some values in that table - it is stored
> in a header file within Rasmol source code. There is an ebuild for
> Rasmol, and it works fine - but what I'm wondering is how I can tell
> portage to STOP once it unpacks Rasmol in the temporary work directory
> - so I can tweak some things in the source code - and then resume the
> build, using what's already in the work directory. Looking at a
> manpage for emerge, I didn't immediately get any creative ideas, but
> might someone offer some advice for how to accomplish this?
Hi Denis,
Use the "ebuild" command to execute the steps of emerging
separately... read the manpage for the available options, but for
example you can do something like:
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild unpack
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild prepare
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild configure
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild compile
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild preinst
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild install
ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild postinst
and in-between those steps you can change to your portage tmpdir and
edit the unpacked source files and do whatever you need to do to them.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 1:33 [gentoo-user] question about portage capabilities Denis
2009-04-19 2:23 ` Paul Hartman
@ 2009-04-19 2:27 ` Mike Kazantsev
2009-04-19 2:42 ` Jorge Morais
2009-04-19 7:50 ` Alan McKinnon
3 siblings, 0 replies; 7+ messages in thread
From: Mike Kazantsev @ 2009-04-19 2:27 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
On Sat, 18 Apr 2009 21:33:18 -0400
Denis <denis.che@gmail.com> wrote:
> I am using a package called Rasmol, which is used for visualization of
> molecular structures. This software uses a certain table for atomic
> sizes, and I need to change some values in that table - it is stored
> in a header file within Rasmol source code. There is an ebuild for
> Rasmol, and it works fine - but what I'm wondering is how I can tell
> portage to STOP once it unpacks Rasmol in the temporary work directory
> - so I can tweak some things in the source code - and then resume the
> build, using what's already in the work directory. Looking at a
> manpage for emerge, I didn't immediately get any creative ideas, but
> might someone offer some advice for how to accomplish this?
That's what 'ebuild' command is for.
Try this:
cd /usr/portage/some/package
ebuild package-ver.ebuild help
That command allows you to execute all the ebuild steps separately.
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 1:33 [gentoo-user] question about portage capabilities Denis
2009-04-19 2:23 ` Paul Hartman
2009-04-19 2:27 ` Mike Kazantsev
@ 2009-04-19 2:42 ` Jorge Morais
2009-04-19 7:50 ` Alan McKinnon
3 siblings, 0 replies; 7+ messages in thread
From: Jorge Morais @ 2009-04-19 2:42 UTC (permalink / raw
To: gentoo-user
On Sat, 18 Apr 2009 21:33:18 -0400
Denis <denis.che@gmail.com> wrote:
> Hello all,
>
> I am using a package called Rasmol, which is used for visualization of
> molecular structures. This software uses a certain table for atomic
> sizes, and I need to change some values in that table - it is stored
> in a header file within Rasmol source code. There is an ebuild for
> Rasmol, and it works fine - but what I'm wondering is how I can tell
> portage to STOP once it unpacks Rasmol in the temporary work directory
> - so I can tweak some things in the source code - and then resume the
> build, using what's already in the work directory. Looking at a
> manpage for emerge, I didn't immediately get any creative ideas, but
> might someone offer some advice for how to accomplish this?
man ebuild.
I assume you are talking of sci-chemistry/rasmol.
Then you can accomplish your hack with
ebuild /usr/portage/sci-chemistry/rasmol/rasmol-2.7.2.1.1-r1.ebuild unpack
<tweak>
ebuild /usr/portage/sci-chemistry/rasmol/rasmol-2.7.2.1.1-r1.ebuild install
But I am not sure this is a clean way to achieve your goal.
The standard way would be to write a patch, and modify the ebuild
to apply your patch. Alternatively, you can apply the patch to the distfile,
and modify the ebuild to use the new distfile.
Do you know how to write a patch?
Note: if you are going to modify your ebuild, it is a good idea to
put it in an overlay
It would be something like this
mkdir --parents /usr/local/denisoverlay/sci-chemistry/rasmol
cp -rv /usr/portage/sci-chemistry/rasmol/* /usr/local/denisoverlay/sci-chemistry/rasmol/
tweak files in /usr/portage/sci-chemistry/rasmol to your heart's content.
Add "/usr/local/denisoverlay" to the variable PORTDIR_OVERLAY in /etc/make.conf
For example:
PORTDIR_OVERLAY="/usr/local/denisoverlay"
--
Software is like sex: it is better when it is free. --Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 2:23 ` Paul Hartman
@ 2009-04-19 2:49 ` Jorge Morais
0 siblings, 0 replies; 7+ messages in thread
From: Jorge Morais @ 2009-04-19 2:49 UTC (permalink / raw
To: gentoo-user
On Sat, 18 Apr 2009 21:23:24 -0500
Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild unpack
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild prepare
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild configure
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild compile
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild preinst
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild install
> ebuild /usr/portage/foo-bar/yourpkg-1.2.3.ebuild postinst
One doesn't need to perform these steps explicitly; when one performs
a command like merge, ebuild also performs all commands that
normally precede merge.
So I think that if he wants to tweak the source code before compiling,
the easier way would be to issue a unpack command, tweak the source,
then issue a merge command.
But I think it would be much better to write a patch,
or simply modify the distfile and create a new ebuild that
uses the modified distfile.
--
Software is like sex: it is better when it is free. --Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 1:33 [gentoo-user] question about portage capabilities Denis
` (2 preceding siblings ...)
2009-04-19 2:42 ` Jorge Morais
@ 2009-04-19 7:50 ` Alan McKinnon
2009-04-19 18:19 ` Denis
3 siblings, 1 reply; 7+ messages in thread
From: Alan McKinnon @ 2009-04-19 7:50 UTC (permalink / raw
To: gentoo-user
On Sunday 19 April 2009 03:33:18 Denis wrote:
> Hello all,
>
> I am using a package called Rasmol, which is used for visualization of
> molecular structures. This software uses a certain table for atomic
> sizes, and I need to change some values in that table - it is stored
> in a header file within Rasmol source code. There is an ebuild for
> Rasmol, and it works fine - but what I'm wondering is how I can tell
> portage to STOP once it unpacks Rasmol in the temporary work directory
> - so I can tweak some things in the source code - and then resume the
> build, using what's already in the work directory. Looking at a
> manpage for emerge, I didn't immediately get any creative ideas, but
> might someone offer some advice for how to accomplish this?
Doing this manually is a pain. Copy the ebuild to your personal overlay and
modify it to do what you want.
Full detials are in man 5 ebuild, including a full list of all functions
available to you and the various stages with hooks that portage provides.
You will be wanting to perform a sed in src_prepare, methinks.
Or manipulate ECONF in src_compile if the package provides a way to adjust the
values you are interested in.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] question about portage capabilities
2009-04-19 7:50 ` Alan McKinnon
@ 2009-04-19 18:19 ` Denis
0 siblings, 0 replies; 7+ messages in thread
From: Denis @ 2009-04-19 18:19 UTC (permalink / raw
To: gentoo-user
I would like to thank everyone who responded for taking the time and
explaining ways how my goal can be accomplished.
I did look into how a patch may be written, but basically, in my case,
I just needed to tweak a couple constants in the Rasmol source code.
I haven't educated myself on how to patch or deal with patches yet,
and I'm sort of pressed for time, so I just tweaked the source code
and installed the package by performing ebuild steps manually.
While that may not be a satisfying method in general, my task was very
simple, and this did the job quickly. If I had a more massive task,
or series of tasks, then I'd certainly look into how to deal with
patches and overlays.
Again, thanks to this wonderful community :-)
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-19 18:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-19 1:33 [gentoo-user] question about portage capabilities Denis
2009-04-19 2:23 ` Paul Hartman
2009-04-19 2:49 ` Jorge Morais
2009-04-19 2:27 ` Mike Kazantsev
2009-04-19 2:42 ` Jorge Morais
2009-04-19 7:50 ` Alan McKinnon
2009-04-19 18:19 ` Denis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox