View | Details | Raw Unified | Return to bug 235561
Collapse All | Expand All

(-)Mk/Uses/sdl.mk (-143 / +70 lines)
Lines 1-185 Link Here
1
#-*- tab-width: 4; -*-
1
# $FreeBSD$
2
# ex:ts=4
3
#
2
#
4
# bsd.sdl.mk - Support for SDL-based ports.
3
# Support for SDL-based ports
5
#
4
#
6
# Created by: Edwin Groothuis <edwin@freebsd.org>
5
# Feature:	sdl
6
# Usage:	USES=sdl
7
#		USE_SDL=sdl console gfx image mixer mm net pango sound ttf
8
#		        sdl2 gfx2 image2 mixer2 net2 ttf2
7
#
9
#
8
# For FreeBSD committers:
10
#		USE_SDL specifies which SDL components to add as dependencies.
9
# - Changes in the version number of the shared libraries are encouraged.
11
#		Not specifying USE_SDL with USES=sdl is an error.
10
# - For the rest, please try to run them via the maintainer but feel free
12
#		USE_SDL=yes implies USE_SDL=sdl.  This is deprecated
11
#   to commit themselves if nothing breaks.
12
#
13
#
13
# For ports-developers:
14
# MAINTAINER:	amdmi3@FreeBSD.org
14
# If your port needs SDL or one of the SDL modules, you can easily
15
# include them with the "USE_SDL=" statement. For example if you need
16
# the standard SDL and SDL_sound, use "USE_SDL=sdl sound" and the
17
# required libraries are included in your LIB_DEPENDS.
18
#
19
15
20
#
16
.if !defined(_INCLUDE_USES_SDL_MK)
21
# $FreeBSD$
17
_INCLUDE_USES_SDL_MK=		yes
22
#
23
18
24
SDL_Include_MAINTAINER=		ports@FreeBSD.org
25
26
#
27
# These are the current supported SDL1.2 modules
19
# These are the current supported SDL1.2 modules
28
#
20
_SDL_USE_ALL=	sdl console gfx image mixer mm net pango sound ttf
29
_USE_SDL_ALL=	console gfx image mixer mm net pango sdl sound ttf
30
#
31
# These are the current supported SDL2 modules
32
#
33
_USE_SDL_ALL+=	gfx2 image2 mixer2 net2 sdl2 ttf2
34
21
35
#
22
_SDL_sdl_LIB_DEPENDS=		libSDL.so:devel/sdl12
36
# Variables used to determine what is needed:
37
# _SUBDIR_xxx	subdirectory below ${PORTSDIR} (required)
38
# _PORTDIR_xxx	subdirectory below ${PORTSDIR}/${_SUBDIR_xxx}
39
# _LIB_xxx		name of the shared lib
40
# _REQUIRES_xxx	also needs these SDL libraries
41
#
42
23
43
_SUBDIR_console=	devel
24
_SDL_console_LIB_DEPENDS=	libSDL_console.so:devel/sdl_console
44
_PORTDIR_console=	sdl_console
25
_SDL_console_REQUIRES=		sdl
45
_LIB_console=		libSDL_console.so
46
_REQUIRES_console=	sdl
47
26
48
_SUBDIR_gfx=	graphics
27
_SDL_gfx_LIB_DEPENDS=		libSDL_gfx.so:graphics/sdl_gfx
49
_PORTDIR_gfx=	sdl_gfx
28
_SDL_gfx_REQUIRES=		sdl
50
_LIB_gfx=	libSDL_gfx.so
51
_REQUIRES_gfx=	sdl
52
29
53
_SUBDIR_image=	graphics
30
_SDL_image_LIB_DEPENDS=		libSDL_image.so:graphics/sdl_image
54
_PORTDIR_image=	sdl_image
31
_SDL_image_REQUIRES=		sdl
55
_LIB_image=	libSDL_image.so
56
_REQUIRES_image=sdl
57
32
58
_SUBDIR_mixer=	audio
33
_SDL_mixer_LIB_DEPENDS=		libSDL_mixer.so:audio/sdl_mixer
59
_PORTDIR_mixer=	sdl_mixer
34
_SDL_mixer_REQUIRES=		sdl
60
_LIB_mixer=	libSDL_mixer.so
61
_REQUIRES_mixer=sdl
62
35
63
_SUBDIR_mm=	devel
36
_SDL_mm_LIB_DEPENDS=		libSDLmm.so:devel/sdlmm
64
_PORTDIR_mm=	sdlmm
37
_SDL_mm_REQUIRES=		sdl
65
_LIB_mm=	libSDLmm.so
66
_REQUIRES_mm=	sdl
67
38
68
_SUBDIR_net=	net
39
_SDL_net_LIB_DEPENDS=		libSDL_net.so:net/sdl_net
69
_PORTDIR_net=	sdl_net
40
_SDL_net_REQUIRES=		sdl
70
_LIB_net=	libSDL_net.so
71
_REQUIRES_net=	sdl
72
41
73
_SUBDIR_pango=	x11-toolkits
42
_SDL_pango_LIB_DEPENDS=		libSDL_Pango.so:x11-toolkits/sdl_pango
74
_PORTDIR_pango=	sdl_pango
43
_SDL_pango_REQUIRES=		sdl
75
_LIB_pango=	libSDL_Pango.so
76
_REQUIRES_pango=sdl
77
44
78
_SUBDIR_sdl=	devel
45
_SDL_sound_LIB_DEPENDS=		libSDL_sound.so:audio/sdl_sound
79
_PORTDIR_sdl=	sdl12
46
_SDL_sound_REQUIRES=		sdl
80
_LIB_sdl=	libSDL.so
81
_REQUIRES_sdl=
82
47
83
_SUBDIR_sound=	audio
48
_SDL_ttf_LIB_DEPENDS=		libSDL_ttf.so:graphics/sdl_ttf
84
_PORTDIR_sound=	sdl_sound
49
_SDL_ttf_REQUIRES=		sdl
85
_LIB_sound=	libSDL_sound.so
86
_REQUIRES_sound=sdl
87
50
88
_SUBDIR_ttf=	graphics
51
# These are the current supported SDL2 modules
89
_PORTDIR_ttf=	sdl_ttf
52
_SDL_USE_ALL+=	sdl2 gfx2 image2 mixer2 net2 ttf2
90
_LIB_ttf=	libSDL_ttf.so
91
_REQUIRES_ttf=	sdl
92
53
93
_SUBDIR_gfx2=	graphics
54
_SDL_sdl2_LIB_DEPENDS=		libSDL2.so:devel/sdl20
94
_PORTDIR_gfx2=	sdl2_gfx
95
_LIB_gfx2=	libSDL2_gfx.so
96
_REQUIRES_gfx2=	sdl2
97
55
98
_SUBDIR_image2=		graphics
56
_SDL_gfx2_LIB_DEPENDS=		libSDL2_gfx.so:graphics/sdl2_gfx
99
_PORTDIR_image2=	sdl2_image
57
_SDL_gfx2_REQUIRES=		sdl2
100
_LIB_image2=		libSDL2_image.so
101
_REQUIRES_image2=	sdl2
102
58
103
_SUBDIR_mixer2=		audio
59
_SDL_image2_LIB_DEPENDS=	libSDL2_image.so:graphics/sdl2_image
104
_PORTDIR_mixer2=	sdl2_mixer
60
_SDL_image2_REQUIRES=		sdl2
105
_LIB_mixer2=		libSDL2_mixer.so
106
_REQUIRES_mixer2=	sdl2
107
61
108
_SUBDIR_net2=	net
62
_SDL_mixer2_LIB_DEPENDS=	libSDL2_mixer.so:audio/sdl2_mixer
109
_PORTDIR_net2=	sdl2_net
63
_SDL_mixer2_REQUIRES=		sdl2
110
_LIB_net2=	libSDL2_net.so
111
_REQUIRES_net2=	sdl2
112
64
113
_SUBDIR_sdl2=	devel
65
_SDL_net2_LIB_DEPENDS=		libSDL2_net.so:net/sdl2_net
114
_PORTDIR_sdl2=	sdl20
66
_SDL_net2_REQUIRES=		sdl2
115
_LIB_sdl2=	libSDL2.so
116
_REQUIRES_sdl2=
117
67
118
_SUBDIR_ttf2=	graphics
68
_SDL_ttf2_LIB_DEPENDS=		libSDL2_ttf.so:graphics/sdl2_ttf
119
_PORTDIR_ttf2=	sdl2_ttf
69
_SDL_ttf2_REQUIRES=		sdl2
120
_LIB_ttf2=	libSDL2_ttf.so
121
_REQUIRES_ttf2=	sdl2
122
70
123
#
71
# Basic checks
124
# If USE_SDL is defined, make dependencies for the libraries
72
.if !empty(sdl_ARGS)
125
#
73
IGNORE=		USES=sdl takes no arguments
126
.if !defined(BEFOREPORTMK)
74
.endif
127
.if !defined(SDL_Include_post)
128
.if defined(USE_SDL)
129
75
130
SDL_Include_post=	bsd.sdl.mk
76
.if !defined(USE_SDL)
131
77
IGNORE=		need to specify sdl component(s) with USE_SDL
132
#
133
# Keep some backward compatibility
134
#
135
.if ${USE_SDL}=="yes"
136
USE_SDL=	sdl
137
.endif
78
.endif
138
79
139
#
80
# Expand implied dependencies on main SDL/SDL2 ports
140
# Check if all the values given in USE_SDL are valid.
141
#
142
_USE_SDL=
81
_USE_SDL=
143
.for component in ${USE_SDL}
82
.for _component in ${USE_SDL}
144
. if ${_USE_SDL_ALL:M${component}}==""
83
. if !${_SDL_USE_ALL:M${_component}}
145
IGNORE=	cannot install: unknown SDL component ${component}
84
IGNORE=		uses unknown SDL component ${_component}
85
. else
86
_USE_SDL+=	${_component} ${_SDL_${_component}_REQUIRES}
146
. endif
87
. endif
147
_USE_SDL+=	${_REQUIRES_${component}} ${component}
148
.endfor
88
.endfor
149
89
150
#
90
# Provide LIB_DEPENDS
151
# Uniquefy[sp] the list of libs required
91
.for _component in ${_USE_SDL:O:u}
152
#
92
LIB_DEPENDS+=	${_SDL_${_component}_LIB_DEPENDS}
153
__USE_SDL=
154
.for component in ${_USE_SDL}
155
. if ${__USE_SDL:M${component}}==""
156
__USE_SDL+= ${component}
157
. endif
158
.endfor
93
.endfor
159
94
160
#
95
# Provide dependency on main SDL ports
161
# Finally make the list of libs required
96
.if ${_USE_SDL:Msdl}
162
#
163
.for component in ${__USE_SDL}
164
LIB_DEPENDS+=	${_LIB_${component}}:${_SUBDIR_${component}}/${_PORTDIR_${component}}
165
.endfor
166
167
#
168
# "Normal" dependencies and variables
169
#
170
.if ${__USE_SDL:Msdl} != ""
171
BUILD_DEPENDS+=	${SDL_CONFIG}:${_SUBDIR_sdl}/${_PORTDIR_sdl}
172
SDL_CONFIG?=	${LOCALBASE}/bin/sdl-config
97
SDL_CONFIG?=	${LOCALBASE}/bin/sdl-config
98
BUILD_DEPENDS+=	${SDL_CONFIG}:devel/sdl12
173
CONFIGURE_ENV+=	SDL_CONFIG=${SDL_CONFIG}
99
CONFIGURE_ENV+=	SDL_CONFIG=${SDL_CONFIG}
174
MAKE_ENV+=		SDL_CONFIG=${SDL_CONFIG}
100
MAKE_ENV+=	SDL_CONFIG=${SDL_CONFIG}
175
.endif
101
.endif
176
.if ${__USE_SDL:Msdl2} != ""
102
177
BUILD_DEPENDS+=	${SDL2_CONFIG}:${_SUBDIR_sdl2}/${_PORTDIR_sdl2}
103
.if ${_USE_SDL:Msdl2}
178
SDL2_CONFIG?=	${LOCALBASE}/bin/sdl2-config
104
SDL2_CONFIG?=	${LOCALBASE}/bin/sdl2-config
105
BUILD_DEPENDS+=	${SDL2_CONFIG}:devel/sdl20
179
CONFIGURE_ENV+=	SDL2_CONFIG=${SDL2_CONFIG}
106
CONFIGURE_ENV+=	SDL2_CONFIG=${SDL2_CONFIG}
180
MAKE_ENV+=		SDL2_CONFIG=${SDL2_CONFIG}
107
MAKE_ENV+=	SDL2_CONFIG=${SDL2_CONFIG}
181
.endif
108
.endif
182
109
110
# _INCLUDE_USES_SDL_MK
183
.endif
111
.endif
184
.endif
112
185
.endif
(-)Mk/bsd.port.mk (-10 / +5 lines)
Lines 364-371 Link Here
364
#				 Append the cxxflags to CXXFLAGS only on the specified architecture
364
#				 Append the cxxflags to CXXFLAGS only on the specified architecture
365
##
365
##
366
# LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture
366
# LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture
367
# USE_SDL		- If set, this port uses the sdl libraries.
368
#				  See bsd.sdl.mk for more information.
369
##
367
##
370
# USE_OPENLDAP	- If set, this port uses the OpenLDAP libraries.
368
# USE_OPENLDAP	- If set, this port uses the OpenLDAP libraries.
371
#				  Implies: WANT_OPENLDAP_VER?=24
369
#				  Implies: WANT_OPENLDAP_VER?=24
Lines 1425-1430 Link Here
1425
USES+=	gl
1423
USES+=	gl
1426
.endif
1424
.endif
1427
1425
1426
.if defined(USE_SDL) && (!defined(USES) || !${USES:Msdl})
1427
DEV_WARNING+=	"Using USE_SDL alone is deprecated, please add USES=sdl."
1428
USES+=	sdl
1429
.endif
1430
1428
.if defined(USE_MYSQL)
1431
.if defined(USE_MYSQL)
1429
USE_MYSQL:=		${USE_MYSQL:N[yY][eE][sS]:Nclient}
1432
USE_MYSQL:=		${USE_MYSQL:N[yY][eE][sS]:Nclient}
1430
.if defined(WANT_MYSQL_VER)
1433
.if defined(WANT_MYSQL_VER)
Lines 1445-1454 Link Here
1445
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
1448
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
1446
.endif
1449
.endif
1447
1450
1448
.if defined(USE_SDL)
1449
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
1450
.endif
1451
1452
.if !defined(UID)
1451
.if !defined(UID)
1453
UID!=	${ID} -u
1452
UID!=	${ID} -u
1454
.endif
1453
.endif
Lines 1944-1953 Link Here
1944
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
1943
.include "${PORTSDIR}/Mk/bsd.ocaml.mk"
1945
.endif
1944
.endif
1946
1945
1947
.if defined(USE_SDL)
1948
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
1949
.endif
1950
1951
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} ))
1946
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} ))
1952
DEV_WARNING+=		"Using USE_PHP alone is deprecated, please use USES=php"
1947
DEV_WARNING+=		"Using USE_PHP alone is deprecated, please use USES=php"
1953
_USES_POST+=	php
1948
_USES_POST+=	php
(-)Mk/bsd.sanity.mk (+4 lines)
Lines 86-91 Link Here
86
DEV_ERROR+=	"USE_ZOPE=yes is unsupported, please use USES=zope instead"
86
DEV_ERROR+=	"USE_ZOPE=yes is unsupported, please use USES=zope instead"
87
.endif
87
.endif
88
88
89
.if defined(USE_SDL) && ${USE_SDL} == yes
90
DEV_ERROR+=	"USE_SDL=yes is unsupported, please use USE_SDL=sdl instead"
91
.endif
92
89
.if defined(USE_GITHUB) && defined(GH_COMMIT)
93
.if defined(USE_GITHUB) && defined(GH_COMMIT)
90
DEV_ERROR+=	"GH_COMMIT is unsupported, please convert GHL-\>GH in MASTER_SITES and set GH_TAGNAME to tag or commit hash and remove GH_COMMIT"
94
DEV_ERROR+=	"GH_COMMIT is unsupported, please convert GHL-\>GH in MASTER_SITES and set GH_TAGNAME to tag or commit hash and remove GH_COMMIT"
91
.endif
95
.endif
(-)Mk/bsd.sdl.mk (-185 lines)
Lines 1-185 Link Here
1
#-*- tab-width: 4; -*-
2
# ex:ts=4
3
#
4
# bsd.sdl.mk - Support for SDL-based ports.
5
#
6
# Created by: Edwin Groothuis <edwin@freebsd.org>
7
#
8
# For FreeBSD committers:
9
# - Changes in the version number of the shared libraries are encouraged.
10
# - For the rest, please try to run them via the maintainer but feel free
11
#   to commit themselves if nothing breaks.
12
#
13
# For ports-developers:
14
# If your port needs SDL or one of the SDL modules, you can easily
15
# include them with the "USE_SDL=" statement. For example if you need
16
# the standard SDL and SDL_sound, use "USE_SDL=sdl sound" and the
17
# required libraries are included in your LIB_DEPENDS.
18
#
19
20
#
21
# $FreeBSD$
22
#
23
24
SDL_Include_MAINTAINER=		ports@FreeBSD.org
25
26
#
27
# These are the current supported SDL1.2 modules
28
#
29
_USE_SDL_ALL=	console gfx image mixer mm net pango sdl sound ttf
30
#
31
# These are the current supported SDL2 modules
32
#
33
_USE_SDL_ALL+=	gfx2 image2 mixer2 net2 sdl2 ttf2
34
35
#
36
# Variables used to determine what is needed:
37
# _SUBDIR_xxx	subdirectory below ${PORTSDIR} (required)
38
# _PORTDIR_xxx	subdirectory below ${PORTSDIR}/${_SUBDIR_xxx}
39
# _LIB_xxx		name of the shared lib
40
# _REQUIRES_xxx	also needs these SDL libraries
41
#
42
43
_SUBDIR_console=	devel
44
_PORTDIR_console=	sdl_console
45
_LIB_console=		libSDL_console.so
46
_REQUIRES_console=	sdl
47
48
_SUBDIR_gfx=	graphics
49
_PORTDIR_gfx=	sdl_gfx
50
_LIB_gfx=	libSDL_gfx.so
51
_REQUIRES_gfx=	sdl
52
53
_SUBDIR_image=	graphics
54
_PORTDIR_image=	sdl_image
55
_LIB_image=	libSDL_image.so
56
_REQUIRES_image=sdl
57
58
_SUBDIR_mixer=	audio
59
_PORTDIR_mixer=	sdl_mixer
60
_LIB_mixer=	libSDL_mixer.so
61
_REQUIRES_mixer=sdl
62
63
_SUBDIR_mm=	devel
64
_PORTDIR_mm=	sdlmm
65
_LIB_mm=	libSDLmm.so
66
_REQUIRES_mm=	sdl
67
68
_SUBDIR_net=	net
69
_PORTDIR_net=	sdl_net
70
_LIB_net=	libSDL_net.so
71
_REQUIRES_net=	sdl
72
73
_SUBDIR_pango=	x11-toolkits
74
_PORTDIR_pango=	sdl_pango
75
_LIB_pango=	libSDL_Pango.so
76
_REQUIRES_pango=sdl
77
78
_SUBDIR_sdl=	devel
79
_PORTDIR_sdl=	sdl12
80
_LIB_sdl=	libSDL.so
81
_REQUIRES_sdl=
82
83
_SUBDIR_sound=	audio
84
_PORTDIR_sound=	sdl_sound
85
_LIB_sound=	libSDL_sound.so
86
_REQUIRES_sound=sdl
87
88
_SUBDIR_ttf=	graphics
89
_PORTDIR_ttf=	sdl_ttf
90
_LIB_ttf=	libSDL_ttf.so
91
_REQUIRES_ttf=	sdl
92
93
_SUBDIR_gfx2=	graphics
94
_PORTDIR_gfx2=	sdl2_gfx
95
_LIB_gfx2=	libSDL2_gfx.so
96
_REQUIRES_gfx2=	sdl2
97
98
_SUBDIR_image2=		graphics
99
_PORTDIR_image2=	sdl2_image
100
_LIB_image2=		libSDL2_image.so
101
_REQUIRES_image2=	sdl2
102
103
_SUBDIR_mixer2=		audio
104
_PORTDIR_mixer2=	sdl2_mixer
105
_LIB_mixer2=		libSDL2_mixer.so
106
_REQUIRES_mixer2=	sdl2
107
108
_SUBDIR_net2=	net
109
_PORTDIR_net2=	sdl2_net
110
_LIB_net2=	libSDL2_net.so
111
_REQUIRES_net2=	sdl2
112
113
_SUBDIR_sdl2=	devel
114
_PORTDIR_sdl2=	sdl20
115
_LIB_sdl2=	libSDL2.so
116
_REQUIRES_sdl2=
117
118
_SUBDIR_ttf2=	graphics
119
_PORTDIR_ttf2=	sdl2_ttf
120
_LIB_ttf2=	libSDL2_ttf.so
121
_REQUIRES_ttf2=	sdl2
122
123
#
124
# If USE_SDL is defined, make dependencies for the libraries
125
#
126
.if !defined(BEFOREPORTMK)
127
.if !defined(SDL_Include_post)
128
.if defined(USE_SDL)
129
130
SDL_Include_post=	bsd.sdl.mk
131
132
#
133
# Keep some backward compatibility
134
#
135
.if ${USE_SDL}=="yes"
136
USE_SDL=	sdl
137
.endif
138
139
#
140
# Check if all the values given in USE_SDL are valid.
141
#
142
_USE_SDL=
143
.for component in ${USE_SDL}
144
. if ${_USE_SDL_ALL:M${component}}==""
145
IGNORE=	cannot install: unknown SDL component ${component}
146
. endif
147
_USE_SDL+=	${_REQUIRES_${component}} ${component}
148
.endfor
149
150
#
151
# Uniquefy[sp] the list of libs required
152
#
153
__USE_SDL=
154
.for component in ${_USE_SDL}
155
. if ${__USE_SDL:M${component}}==""
156
__USE_SDL+= ${component}
157
. endif
158
.endfor
159
160
#
161
# Finally make the list of libs required
162
#
163
.for component in ${__USE_SDL}
164
LIB_DEPENDS+=	${_LIB_${component}}:${_SUBDIR_${component}}/${_PORTDIR_${component}}
165
.endfor
166
167
#
168
# "Normal" dependencies and variables
169
#
170
.if ${__USE_SDL:Msdl} != ""
171
BUILD_DEPENDS+=	${SDL_CONFIG}:${_SUBDIR_sdl}/${_PORTDIR_sdl}
172
SDL_CONFIG?=	${LOCALBASE}/bin/sdl-config
173
CONFIGURE_ENV+=	SDL_CONFIG=${SDL_CONFIG}
174
MAKE_ENV+=		SDL_CONFIG=${SDL_CONFIG}
175
.endif
176
.if ${__USE_SDL:Msdl2} != ""
177
BUILD_DEPENDS+=	${SDL2_CONFIG}:${_SUBDIR_sdl2}/${_PORTDIR_sdl2}
178
SDL2_CONFIG?=	${LOCALBASE}/bin/sdl2-config
179
CONFIGURE_ENV+=	SDL2_CONFIG=${SDL2_CONFIG}
180
MAKE_ENV+=		SDL2_CONFIG=${SDL2_CONFIG}
181
.endif
182
183
.endif
184
.endif
185
.endif

Return to bug 235561