You are not logged in.

#1 2014-02-16 22:32:42

jantonio2992
Member
Registered: 2013-06-14
Posts: 37

How to know all the build options of a package

Hello,

This is probably such an easy to answer question but i can't seem to answer it myself.

So:
Like many of us that use Arch, i was happy just doing " pacman -S <package>", say, vim or zsh. But i would like to be able to specify with what options the package was compiled, for example, i think i remember reading that for example w3m was being compiled with X11 dep, so i suppose some compile option made some feature work but needed X11. I would like to be able to specify these features. I think this is possible by grabbing the source of a package and then compile it, but, and here's the first question:

    1 - Building a package with ABS you should be able to specify the build options right?

    Now, my main question is:

     2 - How can i know all the available build options of a certain package?

    For example with vim its possible to compile with X and GUI and to do so i believe the options '--with-x' and '--enable-gui', would have to be passed, and these can be understood by looking at the PKGBUILD at the ABS tree, but for sure there are other right?

    Further reading totally welcomed smile, specially RTFM, for i may have overlooked something.

   I guess i should say I am trying to do this on a virtual fresh install x86.

  Thank you in advance.
P.S.: Even tough we're using Arch, i don't know if compiling is Newbie stuff... but i thought this should be an easy enough question.

Offline

#2 2014-02-16 22:42:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,605
Website

Re: How to know all the build options of a package

You need to manually inspect the options of configure or the like.  makepkg is just a wrapper and will do what your PKGBUILD tells it to do.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2014-02-16 23:16:57

saultdon
Member
From: Treaty 08
Registered: 2013-06-25
Posts: 41

Re: How to know all the build options of a package

graysky wrote:

You need to manually inspect the options of configure or the like.  makepkg is just a wrapper and will do what your PKGBUILD tells it to do.

translated as...

You can't really figure out the build options from makepkg.

It depends on the source package type. In your case, it's going to be using a ./configure type of build.
So what you have to do is search in a couple of places:

  • Extract the source package and cd into the source directory where the configure executable is and issue: ./configure --help and check the output near the end for some options.

  • Explore the contents of the README and INSTALL files also in that source directory. The software devs could include special notes in INSTALL specifically.

  • Ask on the mailing list or other public channels because if the above two don't give anything useful there could be undocumented options that those two don't reveal.

If you're compiling a package that uses cmake instead, it's usually easy enough to just explore the often cryptic (but tolerable) contents of CMakeLists.txt that's also in the source directory.


"We don't inherit the land from our ancestors - we borrow it from our children."

Offline

#4 2014-02-16 23:17:44

jantonio2992
Member
Registered: 2013-06-14
Posts: 37

Re: How to know all the build options of a package

graysky wrote:

You need to manually inspect the options of configure or the like.  makepkg is just a wrapper and will do what your PKGBUILD tells it to do.

Then i would need to install the source for every package i want to do this?

But then, if i want to do this with a reasonable amount of packages i would just not need a "dependency manager" like apt-get or pacman no, and simply compile every package?

Offline

#5 2014-02-16 23:22:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,611
Website

Re: How to know all the build options of a package

There is no need to compile them - and certainly no need to install them.  Just get the source and inspect as described.

Last edited by Trilby (2014-02-16 23:22:43)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2014-02-16 23:28:33

saultdon
Member
From: Treaty 08
Registered: 2013-06-25
Posts: 41

Re: How to know all the build options of a package

jantonio2992 wrote:

Then i would need to install the source for every package i want to do this?

But then, if i want to do this with a reasonable amount of packages i would just not need a "dependency manager" like apt-get or pacman no, and simply compile every package?

If you have a PKGBUILD ready, in that directory, you can use makepkg -o or makepkg --verifysource to just get the source tar ball and get started inspecting. Those two options don't actually start compiling. Check the output of makepkg --help for details smile

There's even the handy updpkgsums utility mentioned at https://wiki.archlinux.org/index.php/ma … _checksums


"We don't inherit the land from our ancestors - we borrow it from our children."

Offline

Board footer

Powered by FluxBB