1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/devel/sdl12/Makefile

134 lines
3.2 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: SDL
# Date created: 1 April 2000
# Whom: Maxim Sobolev <sobomax@FreeBSD.org>
#
1999-08-25 05:57:29 +00:00
# $FreeBSD$
#
PORTNAME= sdl
2005-01-16 18:37:05 +00:00
PORTVERSION= 1.2.8
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
DISTNAME= SDL-${PORTVERSION}
2005-01-16 20:14:43 +00:00
MAINTAINER= krion@FreeBSD.org
COMMENT= Cross-platform multi-media development API
LIB_DEPENDS= aa.1:${PORTSDIR}/graphics/aalib
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
INSTALLS_SHLIB= yes
USE_REINPLACE= yes
2005-01-16 18:37:05 +00:00
USE_LIBTOOL_VER=15
WANT_GNOME= yes
CONFIGURE_ENV= NASM="${LOCALBASE}/bin/nasm" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --enable-video-aalib
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_XLIB= yes
.if !defined(NOPORTDOCS)
PORTDOCS= *
.endif
OPTIONS= NAS "Include support for the Network Audio System" Off \
GL "Include support for OpenGL" On
.include <bsd.port.pre.mk>
2005-01-16 18:37:05 +00:00
.if ${OSVERSION} < 500000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_video_SDL__yuv__mmx.c
.endif
.if exists(/usr/lib/libvgl.so.3)
CONFIGURE_ARGS+=--enable-video-vgl
DISPLAY_MSG= ${CAT} ${PKGMESSAGE}
.else
CONFIGURE_ARGS+=--disable-video-vgl
PKGMESSAGE= none
DISPLAY_MSG= ${DO_NADA}
.endif
.if defined(WITH_NAS)
2004-04-10 17:26:55 +00:00
LIB_DEPENDS+= audio.2:${PORTSDIR}/audio/nas
.else
CONFIGURE_ARGS+=--disable-nas
.endif
.if defined(WITHOUT_GL)
2000-10-05 05:19:38 +00:00
CONFIGURE_ARGS+=--disable-video-opengl
.else
2003-11-07 16:51:18 +00:00
USE_GL= yes
2000-10-05 05:19:38 +00:00
CONFIGURE_ARGS+=--enable-video-opengl
.endif
.if exists(/usr/include/libusbhid.h)
CONFIGURE_ENV+= USB_LIBS=-lusbhid
CFLAGS+= -DHAVE_LIBUSBHID_H
.else
CONFIGURE_ENV+= USB_LIBS=-lusb
.endif
MAN3!= ${CAT} ${FILESDIR}/man3
2000-09-28 07:21:21 +00:00
.if (${ARCH} != "i386")
WITHOUT_SVGALIB= yes
.endif
.if ${HAVE_GNOME:Mesound}!=""
USE_GNOME+= esound
.else
CONFIGURE_ARGS+=--disable-esd --disable-esdtest
.endif
.if !defined(WITHOUT_SVGALIB)
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+=--enable-video-svga
.endif
.if (exists(${LOCALBASE}/bin/artsc-config) || defined(WITH_ARTS)) && !defined(WITHOUT_ARTS)
LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts
CONFIGURE_ARGS+=--enable-arts
.else
CONFIGURE_ARGS+=--disable-arts
.endif
post-patch:
@${REINPLACE_CMD} 's|sdl-config|sdl11-config|g' \
${WRKSRC}/test/configure
@${RM} ${WRKSRC}/test/configure.bak
pre-configure:
@${FIND} ${WRKSRC} -type f -name Makefile.in | ${XARGS} ${TOUCH}
post-configure:
@cd ${WRKSRC} && \
${CP} sdl-config sdl11-config && \
${CP} sdl.m4 sdl11.m4
@${REINPLACE_CMD} 's|^deplibs_check_method=.*|deplibs_check_method=pass_all|' \
${WRKSRC}/libtool
post-install:
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/test/* ${EXAMPLESDIR}
@${INSTALL_SCRIPT} ${WRKSRC}/test/configure ${EXAMPLESDIR}
@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/docs
.for f in BUGS COPYING CREDITS README README-SDL.txt WhatsNew docs.html
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
@cd ${WRKSRC}/docs; ${TAR} cf - `${ECHO_CMD} [^Mm]*` | \
(cd ${DOCSDIR}/docs; ${TAR} --unlink -xf - )
.endif
@${DISPLAY_MSG}
2000-09-28 07:21:21 +00:00
.include <bsd.port.post.mk>