Magellan Linux

Annotation of /branches/magellan-next/core/x264/x264-20100905_2245-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6607 - (hide annotations) (download)
Mon Sep 6 20:25:24 2010 UTC (13 years, 9 months ago) by niro
File size: 1804 byte(s)
-re-diffed patches
1 niro 6605 # $Id: x264-20091128_2245-r1.smage2 4168 2009-11-29 22:42:21Z niro $
2    
3     PNAME="x264"
4     PVER="20100905_2245"
5     PBUILD="r1"
6    
7     PCATEGORIE="media-libs"
8     STATE="unstable"
9    
10     DESCRIPTION="x264 is a free AVC/H.264 video encoder library."
11     HOMEPAGE="http://developers.videolan.org/x264.html"
12    
13     DEPEND=">= virtual/glibc"
14    
15     # i*86 needs nasm
16     SDEPENDS_x86=">= dev-lang/nasm-2"
17    
18     # x86_64 needs yasm
19     SDEPENDS_x86_64=">= dev-lang/yasm-0.7"
20    
21     # very dirty trick to get the dependencies right
22     # ';' is the IFS, tr replaces ';' with an crlfs
23     # the var is finally decided via our common eval+echo magic
24     SDEPEND="\$(eval echo \\\$SDEPENDS_\${ARCH/i*86/x86} | tr ';' '\n')"
25    
26     # these vars must be exported to the mage file to get all things right
27     SPECIAL_VARS="SDEPENDS_x86_64 SDEPENDS_x86"
28    
29     SRCFILE="${PNAME}-snapshot-${PVER/_/-}.tar.bz2"
30     SRCDIR="${BUILDDIR}/${PNAME}-snapshot-${PVER/_/-}"
31    
32     sminclude mbuild
33    
34     SRC_URI=(
35     ftp://ftp.videolan.org/pub/videolan/${PNAME}/snapshots/${SRCFILE}
36     mirror://${PNAME}/${SRCFILE}
37 niro 6607 mirror://${PNAME}/${PNAME}-${PVER}-only-libs.patch
38 niro 6605 )
39    
40     # do not autoupdate this package as it has daily snapshots
41     UP2DATE="echo ${PVER}"
42    
43     # note: we build a seperate lib and util package to prevent depwalker loops
44     # when resolving packages:
45     # gpac needs ffmpeg, ffmpeg needs x264, but x264 needs gpac to compile
46    
47     src_prepare()
48     {
49     munpack ${SRCFILE} || die
50     cd ${SRCDIR}
51    
52     # fix the makefile to only build and install the lib
53 niro 6607 mpatch ${PNAME}-${PVER}-only-libs.patch || die
54 niro 6605 }
55    
56     src_compile()
57     {
58     cd ${SRCDIR}
59     mconfigure \
60     --enable-pic \
61     --enable-shared \
62     --enable-pthread \
63     --disable-mp4-output \
64     || die
65     mmake || die
66     }
67    
68     postinstall()
69     {
70     echo
71     echo "Please note that this package only installs the"
72     echo "x264 libraries. In order to have the encoder,"
73     echo "please install 'media-video/x264-encoder'."
74     echo
75     }