6.19. Using SDL

USE_SDL is used to autoconfigure the dependencies for ports which use an SDL based library like devel/sdl12 and graphics/sdl_image.

These SDL libraries for version 1.2 are recognized:

These SDL libraries for version 2.0 are recognized:

Therefore, if a port has a dependency on net/sdl_net and audio/sdl_mixer, the syntax will be:

USE_SDL=	net mixer

The dependency devel/sdl12, which is required by net/sdl_net and audio/sdl_mixer, is automatically added as well.

Using USE_SDL with entries for SDL 1.2, it will automatically:

Using USE_SDL with entries for SDL 2.0, it will automatically:

To check whether an SDL library is available, use WANT_SDL:

WANT_SDL=	yes

.include <bsd.port.pre.mk>

.if ${HAVE_SDL:Mmixer}!=""
USE_SDL+=	mixer
.endif

.include <bsd.port.post.mk>

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <[email protected]>.
Send questions about this document to <[email protected]>.