freebsd-ports/audio/musicpd/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

131 lines
2.7 KiB
Makefile

# New ports collection makefile for: musicpd
# Date created: Tue Oct 02 2003
# Whom: Mark Reidel <ports@mark.reidel.info>
#
# $FreeBSD$
#
PORTNAME= musicpd
PORTVERSION= 0.13.1
PORTREVISION= 2
CATEGORIES= audio ipv6
MASTER_SITES= http://musicpd.org/uploads/files/ \
http://redundancy.redundancy.org/mirror/
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= mpd-${PORTVERSION}
MAINTAINER= jo.lindqvist@gmail.com
COMMENT= A remote-controllable music-daemon
LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad
USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_RC_SUBR= musicpd.sh
PKGMESSAGE= ${WRKDIR}/pkg-message
OPTIONS= FLAC "Support for FLAC Audio" on \
VORBIS "Support for OGG Vorbis Audio" on \
WAV "Support for WAV Audio" on \
AAC "Support for MP4/AAC Audio" off \
MUSEPACK "Support for MPC Audio" off \
MOD "Support for MOD Audio" off \
ICONV "Support for international characters" on \
ID3TAG "Support for id3v1 tag encoding" off \
IPV6 "Support for IPV6" on \
AO "Support for libao" off \
PULSE "Support for PulseAudio" off \
SHOUT "Support for Icecast and Shoutcast" on
.include <bsd.port.pre.mk>
.ifdef(WITHOUT_FLAC)
CONFIGURE_ARGS+=--disable-flac \
--disable-oggflac
.else
LIB_DEPENDS+= FLAC.10:${PORTSDIR}/audio/flac
.endif
.ifdef(WITHOUT_VORBIS)
CONFIGURE_ARGS+=--disable-ogg
.else
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
.endif
.ifdef(WITHOUT_WAV)
CONFIGURE_ARGS+=--disable-audiofile
.else
LIB_DEPENDS+= audiofile.0:${PORTSDIR}/audio/libaudiofile
.endif
.ifdef(WITH_AAC)
LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad
.else
CONFIGURE_ARGS+=--disable-aac
.endif
.ifdef(WITH_MUSEPACK)
LIB_DEPENDS+= mpcdec.5:${PORTSDIR}/audio/libmpcdec
.else
CONFIGURE_ARGS+=--disable-mpc
.endif
.ifdef(WITH_MOD)
LIB_DEPENDS+= mikmod.2:${PORTSDIR}/audio/libmikmod
.else
CONFIGURE_ARGS+=--disable-mod
.endif
.ifdef(WITHOUT_ICONV)
CONFIGURE_ARGS+=--disable-iconv
.else
USE_ICONV= yes
.endif
.ifdef(WITH_ID3TAG)
LIB_DEPENDS+= id3tag.0:${PORTSDIR}/audio/libid3tag
CONFIGURE_ARGS+=--enable-mpd-id3tag
.endif
.ifdef(WITHOUT_IPV6)
CONFIGURE_ARGS+=--disable-ipv6
.endif
.ifdef(WITH_AO)
CONFIGURE_ARGS+=--enable-ao
LIB_DEPENDS+= ao.3:${PORTSDIR}/audio/libao
.endif
.ifdef(WITHOUT_PULSE)
CONFIGURE_ARGS+=--disable-pulse
.else
LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
.endif
.ifdef(WITHOUT_SHOUT)
CONFIGURE_ARGS+=--disable-shout
.endif
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CFLAGS+= -I${PREFIX}/include
MAN1= mpd.1
MAN5= mpd.conf.5
DOCSDIR= ${PREFIX}/share/doc/mpd
DOCS= COMMANDS \
mpdconf.example \
README \
UPGRADING
SED_SCRIPT+= -e 's,%%PREFIX%%,${PREFIX},g'
post-build:
@${SED} ${SED_SCRIPT} ${MASTERDIR}/pkg-message >${PKGMESSAGE}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>