2012-05-23 08:17:49 +00:00
|
|
|
#-*- tab-width: 4; -*-
|
2004-01-20 09:14:50 +00:00
|
|
|
# ex:ts=4
|
|
|
|
#
|
|
|
|
# bsd.sdl.mk - Support for SDL-based ports.
|
|
|
|
#
|
|
|
|
# Created by: Edwin Groothuis <edwin@freebsd.org>
|
|
|
|
#
|
|
|
|
# For FreeBSD committers:
|
|
|
|
# - Changes in the version number of the shared libraries are encouraged.
|
|
|
|
# - For the rest, please try to run them via the maintainer but feel free
|
|
|
|
# to commit themselves if nothing breaks.
|
|
|
|
#
|
|
|
|
# For ports-developers:
|
|
|
|
# If your port needs SDL or one of the SDL modules, you can easily
|
|
|
|
# include them with the "USE_SDL=" statement. For example if you need
|
|
|
|
# the standard SDL and SDL_sound, use "USE_SDL=sdl sound" and the
|
|
|
|
# required libraries are included in your LIB_DEPENDS.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2017-02-12 20:39:55 +00:00
|
|
|
SDL_Include_MAINTAINER= ports@FreeBSD.org
|
2004-01-20 09:14:50 +00:00
|
|
|
|
|
|
|
#
|
2013-06-21 19:56:27 +00:00
|
|
|
# These are the current supported SDL1.2 modules
|
2004-01-20 09:14:50 +00:00
|
|
|
#
|
2013-06-21 19:56:27 +00:00
|
|
|
_USE_SDL_ALL= console gfx image mixer mm net pango sdl sound ttf
|
|
|
|
#
|
|
|
|
# These are the current supported SDL2 modules
|
|
|
|
#
|
2013-11-13 18:15:08 +00:00
|
|
|
_USE_SDL_ALL+= gfx2 image2 mixer2 net2 sdl2 ttf2
|
2004-01-20 09:14:50 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Variables used to determine what is needed:
|
|
|
|
# _SUBDIR_xxx subdirectory below ${PORTSDIR} (required)
|
2015-10-15 07:36:38 +00:00
|
|
|
# _PORTDIR_xxx subdirectory below ${PORTSDIR}/${_SUBDIR_xxx}
|
2014-05-02 14:45:32 +00:00
|
|
|
# _LIB_xxx name of the shared lib
|
2004-01-20 09:14:50 +00:00
|
|
|
# _REQUIRES_xxx also needs these SDL libraries
|
2005-01-09 10:12:07 +00:00
|
|
|
#
|
2004-01-20 09:14:50 +00:00
|
|
|
|
2008-04-28 23:20:54 +00:00
|
|
|
_SUBDIR_console= devel
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_console= sdl_console
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_console= libSDL_console.so
|
2008-04-28 23:20:54 +00:00
|
|
|
_REQUIRES_console= sdl
|
|
|
|
|
2004-01-20 09:14:50 +00:00
|
|
|
_SUBDIR_gfx= graphics
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_gfx= sdl_gfx
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_gfx= libSDL_gfx.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_gfx= sdl
|
|
|
|
|
|
|
|
_SUBDIR_image= graphics
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_image= sdl_image
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_image= libSDL_image.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_image=sdl
|
|
|
|
|
|
|
|
_SUBDIR_mixer= audio
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_mixer= sdl_mixer
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_mixer= libSDL_mixer.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_mixer=sdl
|
|
|
|
|
2008-03-13 13:52:27 +00:00
|
|
|
_SUBDIR_mm= devel
|
2004-01-21 10:01:54 +00:00
|
|
|
_PORTDIR_mm= sdlmm
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_mm= libSDLmm.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_mm= sdl
|
|
|
|
|
|
|
|
_SUBDIR_net= net
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_net= sdl_net
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_net= libSDL_net.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_net= sdl
|
|
|
|
|
2006-10-31 21:37:05 +00:00
|
|
|
_SUBDIR_pango= x11-toolkits
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_pango= sdl_pango
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_pango= libSDL_Pango.so
|
2006-10-31 21:37:05 +00:00
|
|
|
_REQUIRES_pango=sdl
|
|
|
|
|
2004-01-20 09:14:50 +00:00
|
|
|
_SUBDIR_sdl= devel
|
|
|
|
_PORTDIR_sdl= sdl12
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_sdl= libSDL.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_sdl=
|
2004-01-20 09:14:50 +00:00
|
|
|
|
|
|
|
_SUBDIR_sound= audio
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_sound= sdl_sound
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_sound= libSDL_sound.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_sound=sdl
|
|
|
|
|
|
|
|
_SUBDIR_ttf= graphics
|
2013-06-21 19:56:27 +00:00
|
|
|
_PORTDIR_ttf= sdl_ttf
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_ttf= libSDL_ttf.so
|
2004-01-20 09:14:50 +00:00
|
|
|
_REQUIRES_ttf= sdl
|
|
|
|
|
2013-11-13 18:15:08 +00:00
|
|
|
_SUBDIR_gfx2= graphics
|
|
|
|
_PORTDIR_gfx2= sdl2_gfx
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_gfx2= libSDL2_gfx.so
|
2013-11-13 18:15:08 +00:00
|
|
|
_REQUIRES_gfx2= sdl2
|
|
|
|
|
2013-06-21 19:56:27 +00:00
|
|
|
_SUBDIR_image2= graphics
|
|
|
|
_PORTDIR_image2= sdl2_image
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_image2= libSDL2_image.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_image2= sdl2
|
|
|
|
|
|
|
|
_SUBDIR_mixer2= audio
|
|
|
|
_PORTDIR_mixer2= sdl2_mixer
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_mixer2= libSDL2_mixer.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_mixer2= sdl2
|
|
|
|
|
|
|
|
_SUBDIR_net2= net
|
|
|
|
_PORTDIR_net2= sdl2_net
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_net2= libSDL2_net.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_net2= sdl2
|
|
|
|
|
|
|
|
_SUBDIR_sdl2= devel
|
|
|
|
_PORTDIR_sdl2= sdl20
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_sdl2= libSDL2.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_sdl2=
|
|
|
|
|
|
|
|
_SUBDIR_ttf2= graphics
|
|
|
|
_PORTDIR_ttf2= sdl2_ttf
|
2014-05-02 14:45:32 +00:00
|
|
|
_LIB_ttf2= libSDL2_ttf.so
|
2013-06-21 19:56:27 +00:00
|
|
|
_REQUIRES_ttf2= sdl2
|
2004-01-20 09:14:50 +00:00
|
|
|
|
2004-02-04 04:27:04 +00:00
|
|
|
#
|
|
|
|
# If USE_SDL is defined, make dependencies for the libraries
|
|
|
|
#
|
|
|
|
.if !defined(BEFOREPORTMK)
|
|
|
|
.if !defined(SDL_Include_post)
|
|
|
|
.if defined(USE_SDL)
|
|
|
|
|
|
|
|
SDL_Include_post= bsd.sdl.mk
|
|
|
|
|
|
|
|
#
|
|
|
|
# Keep some backward compatibility
|
|
|
|
#
|
|
|
|
.if ${USE_SDL}=="yes"
|
|
|
|
USE_SDL= sdl
|
|
|
|
.endif
|
|
|
|
|
2004-01-20 09:14:50 +00:00
|
|
|
#
|
|
|
|
# Check if all the values given in USE_SDL are valid.
|
|
|
|
#
|
|
|
|
_USE_SDL=
|
|
|
|
.for component in ${USE_SDL}
|
|
|
|
. if ${_USE_SDL_ALL:M${component}}==""
|
* Change all bogus uses of BROKEN to IGNORE. Note: the BROKEN_WITH_*
forms are retained for compatibility but deprecated [1]
* Add sha256 to CHECKSUM_ALGORITHMS [2]
* Remove some whitespace [2]
* Add USE_SCONS and bsd.scons.mk for the Python-based SCons build system [3]
* Fix USE_LDCONFIG with non-default PREFIX [4]
* Add USE_WX and friends, and bsd.wx.mk, for common code for WxWidgets
support [5]
* Add 'make missing' to show missing dependencies [6]
* Fix DESKTOP_ENTRIES processing on 4.x [7]
PR: 92445 [1], 98206 [2], 98731 [3], 99370 [4], 89398 [5],
93601 [6], 98891 [7]
Submitted by: linimon [1], edwin [2], alex at foxybanana dot com [3],
gerald [4], flz [4], alepulver [5], alex at fafula dot com [6],
shaun [7]
2006-07-05 02:18:09 +00:00
|
|
|
IGNORE= cannot install: unknown SDL component ${component}
|
2004-01-20 09:14:50 +00:00
|
|
|
. endif
|
|
|
|
_USE_SDL+= ${_REQUIRES_${component}} ${component}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# Uniquefy[sp] the list of libs required
|
|
|
|
#
|
|
|
|
__USE_SDL=
|
|
|
|
.for component in ${_USE_SDL}
|
|
|
|
. if ${__USE_SDL:M${component}}==""
|
|
|
|
__USE_SDL+= ${component}
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# Finally make the list of libs required
|
|
|
|
#
|
|
|
|
.for component in ${__USE_SDL}
|
2016-03-27 01:23:25 +00:00
|
|
|
LIB_DEPENDS+= ${_LIB_${component}}:${_SUBDIR_${component}}/${_PORTDIR_${component}}
|
2004-01-20 09:14:50 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# "Normal" dependencies and variables
|
|
|
|
#
|
2013-06-21 19:56:27 +00:00
|
|
|
.if ${__USE_SDL:Msdl} != ""
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${SDL_CONFIG}:${_SUBDIR_sdl}/${_PORTDIR_sdl}
|
2006-09-20 11:21:59 +00:00
|
|
|
SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config
|
2004-01-20 09:14:50 +00:00
|
|
|
CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG}
|
|
|
|
MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG}
|
2013-06-21 19:56:27 +00:00
|
|
|
.endif
|
|
|
|
.if ${__USE_SDL:Msdl2} != ""
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${SDL2_CONFIG}:${_SUBDIR_sdl2}/${_PORTDIR_sdl2}
|
2013-06-21 19:56:27 +00:00
|
|
|
SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config
|
|
|
|
CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG}
|
|
|
|
MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG}
|
|
|
|
.endif
|
2004-01-20 09:14:50 +00:00
|
|
|
|
|
|
|
.endif
|
2004-02-04 04:27:04 +00:00
|
|
|
.endif
|
|
|
|
.endif
|