summaryrefslogtreecommitdiff
blob: 93626d7135c575b7a9de128c7c3a3db175005e0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/media-libs/id3lib/id3lib-3.8.0_pre2-r3.ebuild,v 1.1 2002/06/07 03:25:45 lostlogic Exp $

A=${PN}-3.8.0pre2.tar.gz
S=${WORKDIR}/${PN}-3.8.0pre2
DESCRIPTION="Id3 library for C/C++"
SRC_URI="mirror://sourceforge/id3lib/${A}"
HOMEPAGE="http://id3lib.sourceforge.net/"
LICENSE=GPL

DEPEND="virtual/glibc"
RDEPEND="${DEPEND}"

src_unpack() {

	unpack ${A}

	if [ "`gcc --version | cut -f1 -d.`" -eq 3 ] ||
	   ([ -n "${CXX}" ] && [ "`${CXX} --version | cut -f1 -d.`" -eq 3 ]) ||
	   [ "`gcc --version|grep gcc|cut -f1 -d.|cut -f3 -d\ `" -eq 3 ]
	then
		cd ${S}
		# Patch for compilation with gcc-3.0.x thanks to Dirk Jagdmann (doj),
		# and me (fixed the const char** in utils.cpp)
		#
		# Azarah - 5 May 2002
		patch -p1 <${FILESDIR}/${P}-gcc3.patch || die
	fi
}

src_compile() {

	CPPFLAGS="${CPPFLAGS} -Wno-deprecated" \
		 ./configure \
		 --host=${CHOST} \
		 --prefix=/usr || die

	emake || die
}

src_install() {

	make DESTDIR=${D} install || die

	dodoc AUTHORS COPYING ChangeLog HISTORY INSTALL README THANKS TODO
#	some example programs to be placed in docs dir.
	make clean
	cp -a examples ${D}/usr/share/doc/${PF}/examples
}