aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.sdl.mk
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-02-04 12:27:04 +0800
committermarcus <marcus@FreeBSD.org>2004-02-04 12:27:04 +0800
commitf687852f8f35b5067f8978d6405346545b01be3a (patch)
treeb75886547ee6bc169108714705c701bbe7cbe30f /Mk/bsd.sdl.mk
parent3bbad975e2d47d23570aa292dd917d43c85f6e96 (diff)
downloadfreebsd-ports-gnome-f687852f8f35b5067f8978d6405346545b01be3a.tar.gz
freebsd-ports-gnome-f687852f8f35b5067f8978d6405346545b01be3a.tar.zst
freebsd-ports-gnome-f687852f8f35b5067f8978d6405346545b01be3a.zip
* Add a new bsd.php.mk that takes the place of lang/php4/bsd.php.mk [1]
* Remove trailing whitespace from bsd.port.mk [2] * Enhanced OPTIONS handling [3] * Add a USE_ICONV macro [4] * Add a USE_GETTEXT macro [5] * Add support for p5-Module::Build [6] * Enhance bsd.sdl.mk with WANT_SDL [7] * Remove NetBSD and OpenBSD bits from bsd.port.mk [8] * Correct a type in PKGDIR description in bsd.port.mk [9] * Add new DIRNAME macro [10] * Cleanup bsd.port.mk [11] * The default Perl for -CURRENT has been updated to 5.8.2 [12] * Optimize recursive operations on the ports tree [13] * Do not attempt to remove _CPUCFLAGS from CFLAGS if _CPUCFLAGS is not defined [14] * Remove sysutils/rc_subr dependency on -CURRENT [15] * Add MySQL 5.X support to the ports system [16] * Fix a comment typo related to MySQL [17] * Change PTHREAD_{CFLAGS,LIBS} behavior [18] * Do not check distfile size on FreeBSD < 4.8 [19] * Do not install ports with security vulnerabilities [20] * Use ${LOCALBASE}/sbin/pkg_* tools if found [21] * A new net-mgmt physical category has been added [22] * Stop relying on port.mkversion [23] * Fix a regression in checksum processing [24] * Allow PLIST_{DIRS,FILES} to make use of PLIST_SUB [25] * Switch to root to run config and rmconfig targets [26] * Add SIZE attributes for distfiles by default [27] PR: 61683 [3] 62131 [4] 61992 [5] 61621 [6] 61877 [7] 61401 [8] 61684 [10] 61684 61955 [11] 61857 [12] 61757 [14] 61454 [15] 60559 [16] 62039 [20] 62039 [21] 61856 [23] 61972 [27] Submitted by: ale [1] marcus [2] eik [3] trevor [4] trevor [5] skv [6] edwin [7] Markus Brueffer <brueffer@phoenix-systems.de> [8] trevor [9] eik [10] eik des [11] des [12] kris [13] marcus [14] Sergey Matveychuk <sem@ciam.ru> [15] ale [16] linimon [17] eischen netchild [18] marcus netchild [20] eik [21] wollman [22] des [23] marcus eik [24] marcus [25] marcus [26] trevor [27]
Diffstat (limited to 'Mk/bsd.sdl.mk')
-rw-r--r--Mk/bsd.sdl.mk59
1 files changed, 49 insertions, 10 deletions
diff --git a/Mk/bsd.sdl.mk b/Mk/bsd.sdl.mk
index a51b4abaaedf..7b60959f1330 100644
--- a/Mk/bsd.sdl.mk
+++ b/Mk/bsd.sdl.mk
@@ -16,14 +16,22 @@
# the standard SDL and SDL_sound, use "USE_SDL=sdl sound" and the
# required libraries are included in your LIB_DEPENDS.
#
+# If you want to check for the availability for certain SDL ports, you
+# can set WANT_SDL and run it through bsd.port.pre.mk:
+# WANT_SDL= yes
+# USE_SDL= sdl
+# .include <bsd.port.pre.mk>
+# .if ${HAVE_SDL:Mgraphics}
+# USE_SDL+= graphics
+# .endif
+# .include <bsd.port.post.mk>
+# Run "make -V USE_SDL" to see which libs are asked for at the end.
+#
#
# $FreeBSD$
#
-.if !defined(SDL_Include)
-
-SDL_Include= bsd.sdl.mk
SDL_Include_MAINTAINER= edwin@FreeBSD.org
#
@@ -32,13 +40,6 @@ SDL_Include_MAINTAINER= edwin@FreeBSD.org
_USE_SDL_ALL= gfx gui image mixer ldbad mm net sdl sound ttf
#
-# Keep some backward compatibility
-#
-.if ${USE_SDL}=="yes"
-USE_SDL=sdl
-.endif
-
-#
# Variables used to determine what is needed:
# _VERSION_xxx version of the shared library (required)
# _SUBDIR_xxx subdirectory below ${PORTSDIR} (required)
@@ -107,6 +108,42 @@ _REQUIRES_${component}=
.endfor
#
+# If WANT_SDL is defined, check for the available libraries
+#
+.if !defined(AFTERPORTMK)
+.if !defined(SDL_Include_pre)
+
+SDL_Include_pre= bsd.sdl.mk
+
+HAVE_SDL?=
+.if defined(WANT_SDL)
+.for component in ${_USE_SDL_ALL}
+.if exists(${LOCALBASE}/lib/lib${_LIB_${component}}.so.${_VERSION_${component}})
+HAVE_SDL+= ${component}
+.endif
+.endfor
+.endif
+
+.endif
+.endif
+
+#
+# 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
+
+#
# Check if all the values given in USE_SDL are valid.
#
_USE_SDL=
@@ -143,3 +180,5 @@ CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG}
MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG}
.endif
+.endif
+.endif