How do binary packages get added to pkg.freebsd.org?

Exactly what the title says.

How do binary packages for FreeBSD get built and posted to pkg.freebsd.org?

My question specifically concerns graphics/php56-gd, which has compile-time switches to enable or disable XPM and t1lib support. Enabling these two options pulls in a whole bunch of X11 dependencies. But they are also the default options for the port, which means the binary package is built using these options.

I know I have the option to build the port myself (which I did), but it got me curious: how do packages get added to pkg.freebsd.org? Are they automatically built from the entire ports-tree? Is it possible to create two versions of a package on pkg.freebsd.org where one uses the default switches and the other is a "nox11" variant that does the same thing but without X? Or, are nox11 versions completely different ports or source distributions?
 
Not really what I asked.

EDIT: I did some digging in ports tree and found this:
Code:
# find . -type d -maxdepth 2 -name '*-nox11'
./editors/emacs-nox11
./emulators/open-vm-tools-nox11
./emulators/virtualbox-ose-additions-nox11
./emulators/virtualbox-ose-nox11
./games/freeciv-nox11
./games/nethack33-nox11
./games/nethack34-nox11
./games/nethack36-nox11
./graphics/libwmf-nox11
./graphics/ImageMagick-nox11
./graphics/ImageMagick7-nox11
./lang/ocaml-nox11
./math/ploticus-nox11
./net-p2p/qbittorrent-nox11
./net-p2p/zetacoin-nox11
./net/mtr-nox11
./net/unison-nox11

What makes these ports special, that they need custom "nox11" versions, instead of e.g. graphics/php56-gd which has config switches to enable/disable X11 dependencies?
 
You asked if were possible to have two versions of the same package in the official repository. There are default settings for all ports, and all packages should always be built using those settings.

So, no, it is not possible to have two versions of the same package. Unless, maybe, a very specific/corner case I do not know.

EDIT: the idea is, if someone need or want to deviate from the default port settings he/she should use ports instead of packages.
 
Yes, I know. Like I said, I already built a non-default from ports.

Okay, let me try asking my questions again.
1. Where do packages "come from"? Are they built from ALL ports, or just some subset of ports? Are there any packages that do NOT come from a port, or any instances of multiple packages built off a single port?

2. What is the purpose of '-nox11' ports in the ports tree, instead of making those into config options? Similarly, there are '-lite', '-nogui', and some others. Why are they separate ports entirely?
 
Yes, I know. Like I said, I already built a non-default from ports.

Okay, let me try asking my questions again.
1. Where do packages "come from"? Are they built from ALL ports, or just some subset of ports? Are there any packages that do NOT come from a port, or any instances of multiple packages built off a single port?

2. What is the purpose of '-nox11' ports in the ports tree, instead of making those into config options? Similarly, there are '-lite', '-nogui', and some others. Why are they separate ports entirely?

1) Packages are built from the Ports tree. The packages are a sub-set of the ports tree because some of the software in the ports tree have licenses that prevent distribution of binaries. The packages are built using the defaults defined in the ports tree. These are chosen by the port maintainer and usually the same as those chosen by the original source (but not always).

2) Some packages are duplicates of the same source software but with different default options. This is where the -nox11, -nogui, and -lite extensions come from. Each one is a separate port in the ports tree. These exist because the port maintainer recognizes that there is enough demand for the variants to warrant different default settings.


So, if you feel that there is enough demand for a -nox11 of php56-gd to warrant the effort of there being a php56-gd-nox11 port, you might want to discuss it with the port maintainer. But be prepared for the answer to be something along the lines of "you can make one if you want but you will need to get yourself added as a port maintainer".
 
Back
Top