summaryrefslogtreecommitdiff
path: root/devel/SDL
diff options
context:
space:
mode:
authortron <tron>2009-09-13 15:51:47 +0000
committertron <tron>2009-09-13 15:51:47 +0000
commite8211117f40d1d93f264046d25675216f749b563 (patch)
treeb64ec231be676aa4f723344c3bf2df1b1237f0b0 /devel/SDL
parent042f96cf9e75b33913686bc13a7be253d58d16a8 (diff)
downloadpkgsrc-e8211117f40d1d93f264046d25675216f749b563.tar.gz
SDL used a deprecated audio API that is no longer available under
Mac OS X Snow Leopard. Work around that by building the package using the Mac OS X Leopard SDK that is provided by Xcode. This allows the "mplayer" package to build with SDL support. The resulting binary can play video and audio if the SDL video and audio driver are manually selected.
Diffstat (limited to 'devel/SDL')
-rw-r--r--devel/SDL/hacks.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/devel/SDL/hacks.mk b/devel/SDL/hacks.mk
new file mode 100644
index 00000000000..0fc5752ee3f
--- /dev/null
+++ b/devel/SDL/hacks.mk
@@ -0,0 +1,24 @@
+# $NetBSD: hacks.mk,v 1.1 2009/09/13 15:51:47 tron Exp $
+
+.if !defined(SDL_HACKS_MK)
+SDL_HACKS_MK= defined
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+# SDL doesn't build with the API's provided by Mac OS X Snow Leopard:
+#
+# http://www.mail-archive.com/fink-users@lists.sourceforge.net/msg30617.html
+#
+# Work around that by using the Leopard SDK which is part of Xcode.
+
+XCODE_LEOPARD_SDK= /Developer/SDKs/MacOSX10.5.sdk
+
+.if !empty(MACHINE_PLATFORM:MDarwin-??.*-*) && \
+ exists(/Developer/SDKs/MacOSX10.5.sdk)
+PKG_HACKS+= sdl-snow-leopard
+
+CFLAGS+= -mmacosx-version-min=10.5 -isysroot ${XCODE_LEOPARD_SDK}
+LDFLAGS+= -mmacosx-version-min=10.5 -Wl,-syslibroot,${XCODE_LEOPARD_SDK}
+.endif
+
+.endif # SDL_HACKS_MK