2001-03-04 20:33:24 +00:00
|
|
|
# New ports collection makefile for: allegro
|
|
|
|
# Date created: 23-Feb-2001
|
|
|
|
# Whom: Jimmy Olgeni <olgeni@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= allegro
|
2005-11-13 15:16:30 +00:00
|
|
|
DISTVERSION= 4.2.0
|
2001-03-04 20:33:24 +00:00
|
|
|
CATEGORIES= devel
|
2002-02-23 21:21:49 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= alleg
|
2001-03-04 20:33:24 +00:00
|
|
|
|
2006-04-09 13:08:16 +00:00
|
|
|
MAINTAINER= alepulver@FreeBSD.org
|
2003-02-20 17:07:10 +00:00
|
|
|
COMMENT= A cross-platform library for games and multimedia programming
|
2001-03-04 20:33:24 +00:00
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
USE_AUTOTOOLS= autoconf:259
|
2005-11-13 15:16:30 +00:00
|
|
|
USE_GMAKE= yes
|
2002-11-06 16:51:46 +00:00
|
|
|
USE_XLIB= yes
|
|
|
|
WANT_GNOME= yes
|
2005-06-30 17:46:46 +00:00
|
|
|
|
2005-11-13 15:16:30 +00:00
|
|
|
OPTIONS= ARTS "Enable Arts support" off \
|
2006-04-24 20:53:10 +00:00
|
|
|
DEBUG "Build debugging library" off \
|
|
|
|
DEVEL "Build development utilities" on \
|
2005-11-13 15:16:30 +00:00
|
|
|
ESOUND "Enable Esound support" off \
|
|
|
|
OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
|
2006-04-24 20:53:10 +00:00
|
|
|
PROFILE "Build profiling library" off \
|
2005-11-13 15:16:30 +00:00
|
|
|
THREADS "Enable threads" on
|
2005-06-30 17:46:46 +00:00
|
|
|
|
2001-03-04 20:33:24 +00:00
|
|
|
MAKEFILE= makefile
|
2003-12-13 01:41:30 +00:00
|
|
|
ALL_TARGET= full-build
|
2001-03-04 20:33:24 +00:00
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.include "Makefile.man"
|
|
|
|
|
|
|
|
INFO= allegro
|
|
|
|
|
2005-11-13 15:16:30 +00:00
|
|
|
INSTALLS_SHLIB= yes
|
|
|
|
SHLIB_VER= 42
|
2002-11-06 16:51:46 +00:00
|
|
|
PLIST_SUB= SHLIB_VER="${SHLIB_VER}"
|
2003-03-30 03:04:33 +00:00
|
|
|
DEMO= demo.c demo.dat demo.h music.txt ../readme.txt
|
2002-11-06 16:51:46 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-11-13 15:16:30 +00:00
|
|
|
.if ${ARCH} == "alpha" && ${OSVERSION} < 500000
|
|
|
|
EXTRA_PATCHES= ${FILESDIR}/extra-patch-include-allegro-inline-fmaths.in
|
2001-03-04 20:33:24 +00:00
|
|
|
.endif
|
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.if defined(WITH_ARTS)
|
2003-12-13 01:41:30 +00:00
|
|
|
LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-artsdigi
|
2003-12-13 01:41:30 +00:00
|
|
|
PLIST_SUB+= ARTS=""
|
|
|
|
.else
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-artsdigi
|
2003-12-13 01:41:30 +00:00
|
|
|
PLIST_SUB+= ARTS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.if defined(WITH_DEBUG)
|
|
|
|
CONFIGURE_ARGS+=--enable-dbglib
|
|
|
|
PLIST_SUB+= DEBUG=""
|
2002-11-06 16:51:46 +00:00
|
|
|
.else
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-dbglib
|
|
|
|
PLIST_SUB+= DEBUG="@comment "
|
2005-11-13 15:16:30 +00:00
|
|
|
.endif
|
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.if !defined(WITHOUT_DEVEL)
|
2002-11-06 16:51:46 +00:00
|
|
|
INSTALL_TARGET= full-install install-man install-info
|
2006-04-24 20:53:10 +00:00
|
|
|
PLIST_SUB+= DEVEL=""
|
2005-11-13 15:16:30 +00:00
|
|
|
.else
|
|
|
|
INSTALL_TARGET= mini-install install-man install-info
|
2006-04-24 20:53:10 +00:00
|
|
|
PLIST_SUB+= DEVEL="@comment "
|
2002-10-21 17:48:49 +00:00
|
|
|
.endif
|
2002-01-07 04:07:09 +00:00
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.if defined(WITH_ESOUND)
|
2005-11-13 15:16:30 +00:00
|
|
|
USE_GNOME+= esound
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-esddigi
|
2005-11-13 15:16:30 +00:00
|
|
|
PLIST_SUB+= ESOUND=""
|
|
|
|
.else
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-esddigi
|
2005-11-13 15:16:30 +00:00
|
|
|
PLIST_SUB+= ESOUND="@comment "
|
|
|
|
.endif
|
|
|
|
|
2006-04-24 20:53:10 +00:00
|
|
|
.if defined(WITH_PROFILE)
|
|
|
|
CONFIGURE_ARGS+=--enable-proflib
|
|
|
|
PLIST_SUB+= PROFILE=""
|
2005-11-13 15:16:30 +00:00
|
|
|
.else
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-proflib
|
|
|
|
PLIST_SUB+= PROFILE="@comment "
|
2005-11-13 15:16:30 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_THREADS)
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-pthreads
|
2005-11-13 15:16:30 +00:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -DHAVE_LIBPTHREAD" \
|
|
|
|
LDFLAGS="${PTHREAD_LIBS}"
|
|
|
|
.else
|
2006-04-24 20:53:10 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-pthreads
|
2003-03-30 03:04:33 +00:00
|
|
|
.endif
|
|
|
|
|
2002-11-06 16:51:46 +00:00
|
|
|
post-patch:
|
2005-11-13 15:16:30 +00:00
|
|
|
# Change "x.y.z" into "xy" in the shared library version.
|
|
|
|
@${REINPLACE_CMD} -e 's|${PORTVERSION}|${SHLIB_VER}|g' \
|
|
|
|
${WRKSRC}/makefile.ver
|
|
|
|
|
|
|
|
# Remove architecture specific optimizations.
|
|
|
|
@${REINPLACE_CMD} -e 's|$$TARGET_ARCH||g' \
|
|
|
|
${CONFIGURE_WRKSRC}/configure.in
|
|
|
|
|
|
|
|
# Remove "-ffast-math" flag on alpha, because it breaks.
|
|
|
|
.if ${ARCH} == "alpha"
|
|
|
|
@${REINPLACE_CMD} -e 's|-ffast-math||g' \
|
|
|
|
${CONFIGURE_WRKSRC}/configure.in
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Enable/disable compilation optimizations.
|
|
|
|
.if defined(WITHOUT_OPTIMIZED_CFLAGS)
|
|
|
|
@${REINPLACE_CMD} -e 's|-O2||g ; \
|
|
|
|
s|-ffast-math||g ; \
|
|
|
|
s|-fomit-frame-pointer||g ; \
|
|
|
|
s|-funroll-loops||g' \
|
2006-04-24 20:53:10 +00:00
|
|
|
${CONFIGURE_WRKSRC}/configure.in
|
2005-11-13 15:16:30 +00:00
|
|
|
.endif
|
2001-03-04 20:33:24 +00:00
|
|
|
|
|
|
|
post-install:
|
2005-11-13 15:16:30 +00:00
|
|
|
# Documentation.
|
2002-09-18 00:31:23 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2002-10-21 17:48:49 +00:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2005-11-13 15:16:30 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/html/*.html ${DOCSDIR}
|
2003-03-30 03:04:33 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/html/*.css ${DOCSDIR}
|
2005-11-13 15:16:30 +00:00
|
|
|
|
|
|
|
# Examples.
|
2003-03-30 03:04:33 +00:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/demo/demo ${EXAMPLESDIR}
|
2005-11-13 15:16:30 +00:00
|
|
|
. for f in ${DEMO}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/demo/${f} ${EXAMPLESDIR}
|
|
|
|
. endfor
|
2001-03-04 20:33:24 +00:00
|
|
|
.endif
|
|
|
|
|
2002-11-06 16:51:46 +00:00
|
|
|
.include <bsd.port.post.mk>
|