Ticket #1221: Portfile.2

File Portfile.2, 1.6 KB (added by pguyot (Paul Guyot), 21 years ago)

Portfile for libmatroska-0.6.1

Line 
1PortSystem 1.0
2name                    libmatroska
3version                 0.6.1
4revision                0
5categories              multimedia
6maintainers             pguyot@kallisys.net
7description             Matroska is an extensible open standard audio/video container format.
8long_description        \
9                                Matroska is an extensible open standard audio/video container \
10                                format. This library is there to support this format and has \
11                                been written by the Matroska project team.
12                               
13homepage                http://www.matroska.org/
14platforms               darwin
15master_sites    http://matroska.free.fr/downloads/libmatroska/
16checksums               md5 61d5665e7c1050aa934aecc57cf392cd
17
18# depends on libebml
19depends_build           lib:libebml.a:libebml
20
21# No configuration step.
22configure       {}
23
24# The linux Makefile will do it.
25post-extract {
26        cd "${worksrcpath}/make"
27        system "cp -r linux darwin"
28}
29
30# The makefile is not at the root of the archive.
31# Also, PREFIX is spelled prefix
32# I'm all for tests, but it won't work with destrootification.
33# So I run them in the work directory.
34# I'm not sure if I can compare the output of test8 with some master file which I cannot find.
35build           {
36        cd "${worksrcpath}/make/darwin"
37        system "make prefix=${prefix} LIBEBML_INCLUDE_DIR=${prefix}/include LIBEBML_LIB_DIR=${prefix}/lib lib"
38}
39test {
40        cd "${worksrcpath}/make/darwin"
41        system "make prefix=${destroot}${prefix} LIBEBML_INCLUDE_DIR=${prefix}/include LIBEBML_LIB_DIR=${prefix}/lib test"
42        system "./test6"
43        system "./test8"
44        system "./test9"
45}
46destroot        {
47        cd "${worksrcpath}/make/darwin"
48        # We need -p for install because ld will ask for ranlib if the modification date changes.
49        system "make prefix=${destroot}${prefix} INSTALL_OPTS_LIB='-m 644 -p' install"
50}