aboutsummaryrefslogtreecommitdiff
path: root/devel/clanlib/Makefile
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2007-09-09 23:31:03 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2007-09-09 23:31:03 +0000
commitd8986754ee959151f65bddb2bb499fe93ac14d8d (patch)
tree6bbbff8362d303935ad2655e46fea0b19537a673 /devel/clanlib/Makefile
parentf57317e7400da1f652171311a436cd808c36af3d (diff)
downloadports-d8986754ee959151f65bddb2bb499fe93ac14d8d.tar.gz
ports-d8986754ee959151f65bddb2bb499fe93ac14d8d.zip
Notes
Diffstat (limited to 'devel/clanlib/Makefile')
-rw-r--r--devel/clanlib/Makefile118
1 files changed, 81 insertions, 37 deletions
diff --git a/devel/clanlib/Makefile b/devel/clanlib/Makefile
index 7645394d986e..32404f14b5f1 100644
--- a/devel/clanlib/Makefile
+++ b/devel/clanlib/Makefile
@@ -2,58 +2,102 @@
# Date created: 10 May 2000
# Whom: Maxim Sobolev <sobomax@FreeBSD.org>
#
+# $Carpetsmoker: ports/devel/clanlib/Makefile,v 1.2 2007/07/22 00:53:05 carpetsmoker Exp $
# $FreeBSD$
#
PORTNAME= clanlib
-PORTVERSION= 0.6.5.1
-PORTREVISION= 3
+PORTVERSION= 0.8.0
PORTEPOCH= 1
CATEGORIES= devel
-MASTER_SITES= http://clanlib.org/download/legacy/ \
- http://freebsd.nsu.ru/distfiles/
-DISTNAME= ClanLib-${PORTVERSION:R}-${PORTVERSION:E}
+MASTER_SITES= http://www.clanlib.org/download/releases-0.8/ \
+ http://www.carpetsmoker.net/distfiles/ \
+ http://www.xs4all.nl/~tournoij/distfiles/
+DISTNAME= ClanLib-${PORTVERSION}
+EXTRACT_SUFX= .tgz
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= carpetsmoker@xs4all.nl
COMMENT= Cross-platform game SDK
-LIB_DEPENDS= Hermes:${PORTSDIR}/graphics/Hermes \
- jpeg:${PORTSDIR}/graphics/jpeg \
- png:${PORTSDIR}/graphics/png \
- freetype:${PORTSDIR}/print/freetype2 \
- mikmod:${PORTSDIR}/audio/libmikmod \
- vorbis:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
+ png.5:${PORTSDIR}/graphics/png
-# conflicts with devel/clanlib-devel
-CONFLICTS= clanlib-0.7.*
+WRKSRC= ${WRKDIR}/ClanLib-${PORTVERSION}
+CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
+USE_AUTOTOOLS= libtool:15
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS= --disable-clanJavaScript --disable-docs
+USE_GMAKE= yes
+USE_XLIB= yes
+USE_GNOME= gnomehack gnometarget pkgconfig
+USE_LDCONFIG= yes
-WRKSRC= ${WRKDIR}/ClanLib-${PORTVERSION:R}
+.include <bsd.port.pre.mk>
-USE_XLIB= yes
+# Is this still true for 0.8? Removed until we've got some
+# confirmation on this.
+#.if ${ARCH} != "i386" && ${ARCH} != "amd64"
+#BROKEN= "Does not compile on !i386 and !amd64"
+#.endif
+
+.if ${OSVERSION} < 500032
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
+RUN_DEPENDS+= ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
+CPPFLAGS+= -I${LOCALBASE}/include/stlport
+LDFLAGS+= -lstlport_gcc
+CFLAGS+= -O0
+.endif
+
+.if defined(WITHOUT_SDL)
+CONFIGURE_ARGS+=--disable-clanSDL
+PLIST_SUB+= SDL="@comment "
+.else
+USE_SDL= gfx
+CONFIGURE_ARGS+=--disable-sdltest
+PLIST_SUB+= SDL=""
+.endif
+
+.if defined(WITHOUT_OPENGL)
+CONFIGURE_ARGS+=--disable-clanGL
+PLIST_SUB+= OPENGL="@comment "
+.else
USE_GL= yes
-GNU_CONFIGURE= yes
-USE_GMAKE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
- LDFLAGS="-L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --disable-directfb --disable-lua
-INSTALLS_SHLIB= yes
-
-.if !defined(NOPORTDOCS)
-USE_PERL5_BUILD= yes
-ALL_TARGET= all docs
-INSTALL_TARGET= install docs_install
+PLIST_SUB+= OPENGL=""
+.endif
+
+.if defined(WITHOUT_MIKMOD)
+CONFIGURE_ARGS+=--disable-clanMikMod
+PLIST_SUB+= LIBMIKMOD="@comment "
+.else
+LIB_DEPENDS+= mikmod:${PORTSDIR}/audio/libmikmod
+PLIST_SUB+= LIBMIKMOD=""
+.endif
+
+.if defined(WITHOUT_VORBIS)
+CONFIGURE_ARGS+=--disable-clanVorbis
+PLIST_SUB+= LIBVORBIS="@comment "
+.else
+LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
+PLIST_SUB+= LIBVORBIS=""
.endif
+pre-everything::
+ @${ECHO_MSG} "ClanLib has the following tunables options:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " WITHOUT_SDL=yes Turns off SDL support"
+ @${ECHO_MSG} " WITHOUT_OPENGL=yes Turns off OpenGL support"
+ @${ECHO_MSG} " WITHOUT_MIKMOD=yes Turns off libmikmod support"
+ @${ECHO_MSG} " WITHOUT_VORBIS=yes Turns off libvorbis support"
+ @${ECHO_MSG} ""
+
post-patch:
- @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
- ${WRKSRC}/Sources/TTF/font_ttf.cpp
- @${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|; s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
- ${WRKSRC}/Setup/Unix/clanlib-config.in
- @${REINPLACE_CMD} -e 's|%%PERL%%|${PERL}|' \
- ${WRKSRC}/Documentation/FAQ.theme \
- ${WRKSRC}/Documentation/Reference/pce2 \
- ${WRKSRC}/Documentation/Utilities/transform.sh
- @${REINPLACE_CMD} -e 's|@perl_exec@|${PERL}|' \
+ @${GREP} -lR "SDL/SDL" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
+ 's|SDL/SDL|SDL|g'
+ @${REINPLACE_CMD} -e 's|(CLvoid)|()|' \
+ ${WRKSRC}/Sources/API/GL/opengl_wrap.h
+ @${REINPLACE_CMD} -e 's|@perl_exec@|${PERL}|g' \
${WRKSRC}/Documentation/Utilities/webbuilder.pl.in
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>