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