1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/devel/allegro/Makefile
Alejandro Pulver 3e3f01799b - Remove USE_REINPLACE.
- Rename some OPTIONS to more standard names:
  DEBUG_LIB -> DEBUG
  DEV_UTILS -> DEVEL
  PROFILE_LIB -> PROFILE
- Remove unavoidable auto-detection of OPTIONS.
- Format tabs, sort variables.

Approved by:	garga (mentor)
2006-04-24 20:53:10 +00:00

138 lines
3.2 KiB
Makefile

# New ports collection makefile for: allegro
# Date created: 23-Feb-2001
# Whom: Jimmy Olgeni <olgeni@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= allegro
DISTVERSION= 4.2.0
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= alleg
MAINTAINER= alepulver@FreeBSD.org
COMMENT= A cross-platform library for games and multimedia programming
USE_AUTOTOOLS= autoconf:259
USE_GMAKE= yes
USE_XLIB= yes
WANT_GNOME= yes
OPTIONS= ARTS "Enable Arts support" off \
DEBUG "Build debugging library" off \
DEVEL "Build development utilities" on \
ESOUND "Enable Esound support" off \
OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
PROFILE "Build profiling library" off \
THREADS "Enable threads" on
MAKEFILE= makefile
ALL_TARGET= full-build
.include "Makefile.man"
INFO= allegro
INSTALLS_SHLIB= yes
SHLIB_VER= 42
PLIST_SUB= SHLIB_VER="${SHLIB_VER}"
DEMO= demo.c demo.dat demo.h music.txt ../readme.txt
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha" && ${OSVERSION} < 500000
EXTRA_PATCHES= ${FILESDIR}/extra-patch-include-allegro-inline-fmaths.in
.endif
.if defined(WITH_ARTS)
LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts
CONFIGURE_ARGS+=--enable-artsdigi
PLIST_SUB+= ARTS=""
.else
CONFIGURE_ARGS+=--disable-artsdigi
PLIST_SUB+= ARTS="@comment "
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=--enable-dbglib
PLIST_SUB+= DEBUG=""
.else
CONFIGURE_ARGS+=--disable-dbglib
PLIST_SUB+= DEBUG="@comment "
.endif
.if !defined(WITHOUT_DEVEL)
INSTALL_TARGET= full-install install-man install-info
PLIST_SUB+= DEVEL=""
.else
INSTALL_TARGET= mini-install install-man install-info
PLIST_SUB+= DEVEL="@comment "
.endif
.if defined(WITH_ESOUND)
USE_GNOME+= esound
CONFIGURE_ARGS+=--enable-esddigi
PLIST_SUB+= ESOUND=""
.else
CONFIGURE_ARGS+=--disable-esddigi
PLIST_SUB+= ESOUND="@comment "
.endif
.if defined(WITH_PROFILE)
CONFIGURE_ARGS+=--enable-proflib
PLIST_SUB+= PROFILE=""
.else
CONFIGURE_ARGS+=--disable-proflib
PLIST_SUB+= PROFILE="@comment "
.endif
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+=--enable-pthreads
CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -DHAVE_LIBPTHREAD" \
LDFLAGS="${PTHREAD_LIBS}"
.else
CONFIGURE_ARGS+=--disable-pthreads
.endif
post-patch:
# 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' \
${CONFIGURE_WRKSRC}/configure.in
.endif
post-install:
# Documentation.
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/html/*.html ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/html/*.css ${DOCSDIR}
# Examples.
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_PROGRAM} ${WRKSRC}/demo/demo ${EXAMPLESDIR}
. for f in ${DEMO}
${INSTALL_DATA} ${WRKSRC}/demo/${f} ${EXAMPLESDIR}
. endfor
.endif
.include <bsd.port.post.mk>