# New ports collection makefile for:   soundtracker
# Date created:        28 November 1999
# Whom:                kzentner
#
# $FreeBSD: ports/audio/soundtracker/Makefile,v 1.9 2000/10/05 07:22:27 reg Exp $
#

PORTNAME=	soundtracker
PORTVERSION=	0.5.7
CATEGORIES=	audio gnome
MASTER_SITES=	ftp://ftp.soundtracker.org/pub/soundtracker/v0.5/

MAINTAINER=	kzentner@u.washington.edu

USE_X_PREFIX=	yes
USE_GTK=	yes
USE_ESOUND=	yes
WANT_GNOME=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LIBS="-L${LOCALBASE}/lib"

.include <bsd.port.pre.mk>

.if defined(HAVE_GNOME)
USE_GNOME=	yes
CONFIGURE_ARGS+=--enable-gnome
.else
CONFIGURE_ARGS+=--disable-gnome
.endif

pre-patch:
	@${PERL} -pi -e 's^-l(pthread|c_r)^-pthread^g ; \
		 s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
	@find ${WRKSRC} -name "Makefile.in" | xargs ${PERL} -pi -e \
		's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
		 s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'

.include <bsd.port.post.mk>
