jakemsr 99fccde5bc - make artsd audio output work by linking with libartsc instead
of trying to dlopen() it.  also fix a couple bugs in the artsd
  output module: when artsd is "suspended", it only means that
  it it not accessing the soundcard at the moment, not that it
  will not accept data.  fix output latency by setting parameters
  that actually are settable, instead of trying to set read-only(!)
  parameters.

- allow the default audio output method to be chosen with the
  SDL_AUDIO_DRIVER environment variable.  choices are 'arts',
  'esd' and 'audio'.  'audio' selects audio(4) output, and is
  the default if SDL_AUDIO_DRIVER is not set.

ok pvalchev@
2008-03-19 13:33:29 +00:00

114 lines
2.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.62 2008/03/19 13:33:29 jakemsr Exp $
COMMENT= cross-platform multimedia library
VERSION= 1.2.13
DISTNAME= SDL-${VERSION}
PKGNAME= ${DISTNAME:L}p1
CATEGORIES= devel
HOMEPAGE= http://www.libsdl.org/
MAINTAINER= Peter Valchev <pvalchev@openbsd.org>
# LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= m usbhid
MASTER_SITES= ftp://ftp.fr.freebsd.org/pub/FreeBSD/distfiles/ \
${HOMEPAGE}release/
MASTER_SITES0= http://dev.beastie.hu/ \
http://www.beastie.hu/
FLAVORS= esd arts aa caca no_x11 altivec
FLAVOR?=
USE_LIBTOOL= Yes
MODULES= converters/libiconv
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= gnu
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/test
SHARED_LIBS= SDL 8.0
CONFIGURE_ENV+= X11BASE="${X11BASE}" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
# in case devel/usb is installed, don't pick it up.
CONFIGURE_ENV+= ac_cv_lib_usb_hid_init=no \
ac_cv_header_usb_h=no
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--disable-oss \
--disable-ltdl \
--enable-pthread-sem \
--enable-sunaudio
.include <bsd.own.mk>
USE_GCC3?=No
# XXX gcc 3/nasm issue.
.if (${MACHINE_ARCH} == "i386") && (${CC} != "egcc" && ${USE_GCC3:L} != "yes")
BUILD_DEPENDS+= nasm::devel/nasm
CONFIGURE_ARGS+= --enable-nasm
.else
CONFIGURE_ARGS+= --disable-nasm
.endif
.if ${FLAVOR:L:Mesd}
# used via dlopen()
LIB_DEPENDS+= esd.>=2::audio/esound
CONFIGURE_ARGS+= --enable-esd
.else
CONFIGURE_ARGS+= --disable-esd
.endif
.if ${FLAVOR:L:Marts}
LIB_DEPENDS+= artsc::x11/kde/arts3
WANTLIB+= glib-2.0 gmodule-2.0 gthread-2.0 intl pcre stdc++
CONFIGURE_ARGS+= --enable-arts --disable-arts-shared
.else
CONFIGURE_ARGS+= --disable-arts
.endif
.if ${FLAVOR:L:Maa}
LIB_DEPENDS+= aa::graphics/aalib
CONFIGURE_ARGS+= --enable-video-aalib
.else
CONFIGURE_ARGS+= --disable-video-aalib
.endif
.if ${FLAVOR:L:Mcaca}
PATCH_DIST_STRIP= -p1
PATCHFILES= patch-libsd1.2.7-libcaca0.9.diff:0
LIB_DEPENDS+= caca::graphics/libcaca
CONFIGURE_ARGS+= --enable-video-caca
.else
SUPDISTFILES+= patch-libsd1.2.7-libcaca0.9.diff:0
.endif
.if ${FLAVOR:L:Mno_x11}
CONFIGURE_ARGS+= --without-x \
--disable-video-x11
.else
USE_X11= Yes
WANTLIB+= X11.>=10 Xau Xdmcp Xext Xrandr Xrender
.endif
.if ${FLAVOR:L:Maltivec}
ONLY_FOR_ARCHS= powerpc
CONFIGURE_ARGS+=--enable-altivec
# XXX Segmentation fault
# Blit_RGB888_RGB565Altivec at SDL_blit_N.c:203
BROKEN= segfault when altivec is enabled
.else
CONFIGURE_ARGS+=--disable-altivec
.endif
NO_REGRESS= Yes
.include <bsd.port.mk>