freebsd-ports/devel/directfb/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

86 lines
1.9 KiB
Makefile

# New ports collection makefile for: DirectFB
# Date created: 19 October 2002
# Whom: Devaux Fabien <fab@gcu.info>
#
# $FreeBSD$
#
PORTNAME= directfb
PORTVERSION= 1.1.1
CATEGORIES= devel
MASTER_SITES= http://www.directfb.org/downloads/Core/ \
http://www.directfb.org/downloads/Old/
DISTNAME= DirectFB-${PORTVERSION}
MAINTAINER= anatoly.borodin@gmail.com
COMMENT= Graphic development lightweight API
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png
CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}" LDFLAGS="${PTHREAD_LIBS}"
USE_AUTOTOOLS= libtool:15
USE_SDL= sdl
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GNOME= gnomehack
USE_LDCONFIG= yes
USE_PERL5= yes
PLIST_SUB+= DIRECTFB_VERSION=${PORTVERSION} DIRECTFB_VER=1.1-0
.if exists(${LOCALBASE}/lib/libfreetype.so.9)
WITH_FREETYPE2= yes
.endif
.if defined(WITH_FREETYPE2)
LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
CONFIGURE_ARGS+= --enable-freetype
PLIST_SUB+= FREETYPE2=""
.else
CONFIGURE_ARGS+= --disable-freetype
PLIST_SUB+= FREETYPE2="@comment "
.endif
.if defined(WITH_X11)
USE_XORG+= x11 xproto
CONFIGURE_ARGS+= --enable-x11
PLIST_SUB+= X11=""
.else
CONFIGURE_ARGS+= --disable-x11
PLIST_SUB+= X11="@comment "
.endif
.if defined(WITH_SDL)
USE_SDL+= sdl
CONFIGURE_ARGS+= --enable-sdl
PLIST_SUB+= SDL="" GFXDRIVERS=""
.else
CONFIGURE_ARGS+= --disable-sdl
PLIST_SUB+= SDL="@comment " GFXDRIVERS="@comment "
.endif
.if defined(WITH_SDL) || defined(WITH_X11)
PLIST_SUB+= INPUTDRIVERS=""
.else
PLIST_SUB+= INPUTDRIVERS="@comment "
.endif
MAN1= directfb-csource.1 dfbg.1
MAN5= directfbrc.5
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha"
BROKEN= Does not compile on alpha
.endif
.if ${OSVERSION} < 600000
BROKEN= 5.x not supported
.endif
post-patch:
@${REINPLACE_CMD} -e 's/-lc_r/${PTHREAD_LIBS}/g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' ${WRKSRC}/configure.in
.include <bsd.port.post.mk>