# $Id: Portfile 49321 2009-04-07 14:25:28Z raimue@macports.org $

PortSystem 1.0

name             taglib
version          1.5
categories       audio
maintainers      nomaintainer
description      TagLib Audio Meta-Data Library
long_description \
    TagLib is a library for reading and editing the meta-data of \
    several popular audio formats. Currently it supports both ID3v1 \
    and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and \
    Vorbis comments in FLAC files.
homepage         http://developer.kde.org/~wheeler/taglib.html
platforms        darwin
master_sites     http://developer.kde.org/~wheeler/files/src/
checksums        sha1 0f57d4763af82a3d87f6c3f8875ca5d87ead918f

if {[variant_isset universal]} {
   depends_lib   port:libtool port:autoconf
}

configure.ccache no

pre-configure {
   if {[variant_isset universal]} {
      delete ${worksrcpath}/autom4te.cache
      if {[file exists ${prefix}/share/libtool/config/ltmain.sh]} {
         copy -force ${prefix}/share/libtool/config/ltmain.sh ${worksrcpath}/admin
      } else {
         copy -force ${prefix}/share/libtool/ltmain.sh ${worksrcpath}/admin
      }
      copy -force ${prefix}/share/aclocal/libtool.m4 ${worksrcpath}/admin/libtool.m4.in
      system "cd ${worksrcpath} && autoreconf"
   }
}

