summaryrefslogtreecommitdiff
blob: 08ca4beae222a16ca60880e67ae68ccdb9124fb6 (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
52
53
54
55
56
57
58
59
60
61
62
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/avifile-0.6.0.20011026.ebuild,v 1.2 2001/12/29 17:41:37 danarmak Exp $

P0=${PN}-0.6.0-20011026
S=${WORKDIR}/${PN}0.6-0.6.4
DESCRIPTION="Library for AVI-Files"

SRC_URI="http://avifile.sourceforge.net/${P0}.tgz
	 http://avifile.sourceforge.net/binaries-011002.tgz"

HOMEPAGE="http://divx.euro.ru/"

DEPEND="virtual/glibc qt? ( >=x11-libs/qt-2.2.2 ) >=media-libs/libsdl-1.1.5  app-arch/unzip >=media-libs/divx4linux-20011025"
RDEPEND="virtual/glibc qt? ( >=x11-libs/qt-2.2.2 ) >=media-libs/libsdl-1.1.5 >=media-libs/divx4linux-20011025"

src_unpack() {
  unpack ${P0}.tgz
  patch -p0 < ${FILESDIR}/${P}-gentoo.diff
}

src_compile() {
    local myconf
    if [ -z "`use qt`" ] ; then
      myconf="$myconf --disable-qt"
    else
      myconf="$myconf --with-qt-dir=/usr/qt/2"
    fi
    if [ "`use nas`" ] ; then
	LDFLAGS="-L/usr/X11R6/lib -lXt"
    fi
    export CFLAGS=${CFLAGS/-O?/-O2}
    export LDFLAGS
    ./configure --prefix=/usr --host=${CHOST} \
	--enable-quiet --disable-tsc $myconf || die
#    cp Makefile Makefile.orig
#    sed -e "s:/usr/lib/win32:${D}/usr/lib/win32:" \
#	Makefile.orig > Makefile
    make || die
}

src_install () {

    dodir /usr/lib /usr/bin
    dodir /usr/lib/win32

    make prefix=${D}/usr install

    cd ${D}/usr/lib/win32
    unzip ${DISTDIR}/binaries-011002.zip
    cd ${S}
    dodoc COPYING README
    cd doc
    dodoc CREDITS EXCEPTIONS FreeBSD LICENSING TODO
    dodoc VIDEO-PERFORMANCE WARNINGS
}