openbsd-ports/devel/sdl/Makefile
2004-11-24 00:11:03 +00:00

104 lines
2.2 KiB
Makefile

# $OpenBSD: Makefile,v 1.35 2004/11/24 00:11:03 espie Exp $
# Uses pthreads
COMMENT= "cross-platform multimedia library"
VERSION= 1.2.7
DISTNAME= SDL-${VERSION}
PKGNAME= ${DISTNAME:L}
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= X11 Xext m usbhid
MASTER_SITES= ${HOMEPAGE}release/ \
http://www.devolution.com/~slouken/SDL/release/
MASTER_SITES0= http://dev.beastie.hu/ \
http://www.beastie.hu/
FLAVORS= sun esd arts aa caca no_x11
FLAVOR?= sun
AUTOCONF_VERSION= 2.59
SEPARATE_BUILD= concurrent
CONFIGURE_STYLE= autoconf
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/test
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
.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:Msun}
CONFIGURE_ARGS+= --enable-openbsdaudio
.else
CONFIGURE_ARGS+= --disable-openbsdaudio
.endif
.if ${FLAVOR:L:Mesd}
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
CONFIGURE_ARGS+= --enable-arts
.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.6-libcaca0.9.diff:0
LIB_DEPENDS+= caca::graphics/libcaca
CONFIGURE_ARGS+= --enable-video-caca
.endif
.if ${FLAVOR:L:Mno_x11}
CONFIGURE_ARGS+= --without-x \
--disable-video-x11
.else
USE_X11= Yes
.endif
NO_REGRESS= Yes
MAKE_FLAGS= libSDL_la_LDFLAGS="-version-info 3:0:0"
.include <bsd.port.mk>