The X11 implementation available in The Ports Collection
is X.Org. If the application depends on X components, add
USES= xorg
and set
USE_XORG
to the list of required
components. A full list can be found in Section 17.94, “xorg
”.
The Mesa Project is an effort to provide free OpenGL
implementation. To specify a dependency on various
components of this project, use USES= gl
and USE_GL
. See
Section 17.32, “gl
” for a full list of available
components. For backwards compatibility, the value of
yes
maps to glu
.
USES= imake | The port uses imake . |
XMKMF | Set to the path of xmkmf if
not in the PATH . Defaults to
xmkmf -a . |
If the port requires a Motif library, define
USES= motif
in the
Makefile
. Default Motif implementation
is
x11-toolkits/open-motif.
Users can choose
x11-toolkits/lesstif
instead by setting WANT_LESSTIF
in their make.conf
.
MOTIFLIB
will be set by
motif.mk
to reference the
appropriate Motif library. Please patch the source of the
port to use ${MOTIFLIB}
wherever
the Motif library is referenced in the original
Makefile
or
Imakefile
.
There are two common cases:
If the port refers to the Motif library as
-lXm
in its
Makefile
or
Imakefile
, substitute
${MOTIFLIB}
for it.
If the port uses XmClientLibs
in
its Imakefile
, change it to
${MOTIFLIB} ${XTOOLLIB}
${XLIB}
.
Note that MOTIFLIB
(usually) expands
to -L/usr/local/lib -lXm -lXp
or
/usr/local/lib/libXm.a
, so there is no
need to add -L
or -l
in front.
If the port installs fonts for the X Window System, put
them in
LOCALBASE/lib/X11/fonts/local
.
Some applications require a working X11 display for
compilation to succeed. This poses a problem for machines
that operate headless. When this variable is used,
the build infrastructure will start the virtual framebuffer
X server. The working DISPLAY
is then passed
to the build. See USES=display
for the possible arguments.
USES= display
Desktop entries (a Freedesktop standard) provide a way to automatically adjust desktop features when a new program is installed, without requiring user intervention. For example, newly-installed programs automatically appear in the application menus of compatible desktop environments. Desktop entries originated in the GNOME desktop environment, but are now a standard and also work with KDE and Xfce. This bit of automation provides a real benefit to the user, and desktop entries are encouraged for applications which can be used in a desktop environment.
Ports that include predefined
must include those files in *
.desktoppkg-plist
and install them in the
$LOCALBASE/share/applications
directory. The INSTALL_DATA
macro is useful for installing these
files.
If a port has a MimeType entry in its
,
the desktop database must be updated after install and
deinstall. To do this, define portname
.desktopUSES
=
desktop-file-utils.
Desktop entries can be easily created for applications
by using DESKTOP_ENTRIES
. A
file named
will be created, installed, and added to
name
.desktoppkg-plist
automatically. Syntax
is:
DESKTOP_ENTRIES= "NAME" "COMMENT" "ICON" "COMMAND" "CATEGORY" StartupNotify
The list of possible categories is available on the
Freedesktop
website. StartupNotify
indicates whether the application is compatible with
startup notifications. These are
typically a graphic indicator like a clock that appear at
the mouse pointer, menu, or panel to give the user an
indication when a program is starting. A program that is
compatible with startup notifications clears the indicator
after it has started. Programs that are not compatible
with startup notifications would never clear the indicator
(potentially confusing and infuriating the user), and
must have StartupNotify
set to
false
so the indicator is not shown at
all.
Example:
DESKTOP_ENTRIES= "ToME" "Roguelike game based on JRR Tolkien's work" \ "${DATADIR}/xtra/graf/tome-128.png" \ "tome -v -g" "Application;Game;RolePlaying;" \ false
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.