flat assembler
Message board for the users of flat assembler.

Index > Linux > HOWTO: fasm ebuild

Author
Thread Post new topic Reply to topic
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 25 Jan 2007, 14:58
HOWTO: fasm ebuild
currently maintined by scientica, please post bugs, suggestions or comments regarding the ebuild here.

Overview
This HOWTO is intended for gentoo users who want to add fasm to the list of what's emergable. Smile

For the time beeing the probablillity of getting the fasm ebuild in to the portage is, well, unlikely. But luckily for us who use gentoo we can use portage overlays to still be abel to use emerge to get fasm.
If you're familiar with gentoo overlays you can safely skip the first part, you might want to read up on the USE-flags section before downloading the ebuild and emerging.

Portage overlay
I will not explain the details of an portage overlay nor portage it self, for that I refer to the gentoo docs (HOWTO: Installing 3rd Party Ebuilds).
Following these steps will create an overlay in /usr/local/portage. You'll probably need to be root to do most of these steps.
  1. Download the attached file, save it somewhere (/tmp is good if you're not sure where to put it).
  2. run "mkdir -p /usr/local/portage/dev-lang/" to create the needed dirs. Then cd to it ("cd /usr/local/portage/dev-lang/").
  3. now, we're gonna extract the goodies (namley the ebuild, digest, maifest and two optional patches), type:
    Code:
    tar xvfj /path/to/the/downloaded/attachment/fasm-overlay.tbz2    
    .
  4. Now we're almost done. Fire up your favourite text editor and open /etc/make.conf . Add the following line to the file:
    Code:
    PORTDIR_OVERLAY="/usr/local/portage"    

    save and exit the editor.
  5. Now you should be ready to rock 'n' roll, type: "emerge -pv fasm" (harmless command, won't do anything but show some text) in a terminal of choice, you'll see a screen looking something like this:
    Code:
    These are the packages that I would merge, in order:
    
    Calculating dependencies ...done!
    [ebuild  N    ] dev-lang/fasm-1.67-r18 USE="-fasm_permissions -libc -rebuild" 0 kB [1] 
    
    Total size of downloads: 0 kB
    Portage overlays:
     [1] /usr/local/portage
        

    This means the overlay is propperly installed, you can now "emerge fasm" if you wish. But before you do I'd recomend taking a look at the USE flags bellow.


USE-flags
For details on the usage of USE flags in gentoo please see USE flags (Gentoo Handbook).

The following USE flags are defined/used in the ebuild:
  • rebuild will rebuild fasm using it self, requires fasm already to be installed. (and in your $PATH)
  • libc install the unix/libc version of fasm, implies rebuild.
  • no_usr_bin don't create the /usr/bin/fasm -> /opt/fasm/fasm symlink. (if you don't know what this implies you should leave it alone)


Description:
Download
Filename: fasm-overlay.tbz2
Filesize: 2.49 KB
Downloaded: 724 Time(s)


_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn


Last edited by scientica on 25 Jan 2007, 19:15; edited 1 time in total
Post 25 Jan 2007, 14:58
View user's profile Send private message Visit poster's website Reply with quote
billium



Joined: 13 Feb 2007
Posts: 1
Location: UK
billium 16 Feb 2007, 15:34
Hello scientica

This works well. I had to chage the size, and encoding sums of fasm-1.67.tgz

Billy
Post 16 Feb 2007, 15:34
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 16 Feb 2007, 22:12
gonna install soon, thanks.
Post 16 Feb 2007, 22:12
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bszente



Joined: 14 Jan 2007
Posts: 2
Location: Timisoara, Romania
bszente 20 Mar 2007, 09:30
Hello all,

Thanks scientica for the ebuild. It would be nice to merge it to the official Portage tree. I would like to make a few remarks regarding your ebuild.

I played today a little bit with your ebuild, and I found that in src_unpack() the "|| use ~amd64" is not needed. (Portage gives a warning message otherwise, because the ebuild does not have the ~amd64 keyword.) This should be enough:
Code:
if use amd64 ; then
  einfo "Notice: You'll need IA32 emulation support... [text deleted]"
fi    

On the other hand wouldn't be better to move the "dodir /usr/bin" into the if, and change "/opt" to "${D}/opt" (as a solution for your 'is this "legal" for ebuilds?' question), like this?
Code:
if ! use no_usr_bin ; then
  dodir /usr/bin
  ln -s ${D}/opt/fasm/fasm ${D}/usr/bin/fasm
fi    

Adjusting the permissions might not be necessary. I tested the ebuild with those 3 lines commented, and it works well. I personally don't like to have executable permissions on text and source files.

What do you think about these remarks? Please tell me your opinions. Thanks.

Regards,
bszente
Post 20 Mar 2007, 09:30
View user's profile Send private message Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.