Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

root/trunk/dports/audio/lame/Portfile

Revision 42170, 3.0 KB (checked in by ram@…, 8 weeks ago)

audio/lame: fix livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1# $Id$
2
3PortSystem        1.0
4
5name              lame
6version           3.98.2
7categories        audio
8platforms         darwin freebsd
9maintainers       ram openmaintainer
10
11description       Lame Ain't an MP3 Encoder
12long_description  LAME is an educational tool to be used for learning \
13  about MP3 encoding. The goal of the LAME project is to use the open \
14  source model to improve the psycho acoustics, noise shaping and speed \
15  of MP3. LAME is not for everyone - it is distributed as source code \
16  only and requires the ability to use a C compiler.
17
18homepage          http://lame.sourceforge.net/
19master_sites      sourceforge:lame
20distname          ${name}-398-2
21
22depends_lib       port:ncurses
23
24checksums         md5 719dae0ee675d0c16e0e89952930ed35 \
25                  sha1 b2db41dbc9c0824caa102e8c932b820c79ccd5ec \
26                  rmd160 767dd94271eef221170469535db2bf388149715a
27
28configure.args    --mandir=${prefix}/share/man
29
30set my_universal_archs {i386 ppc}
31set first_arch [lindex ${my_universal_archs} 0]
32
33set my_worksrcpaths ${worksrcpath}
34
35variant universal {
36  set my_worksrcpaths {}
37  foreach arch ${my_universal_archs} {
38    lappend my_worksrcpaths ${workpath}/${arch}
39  }
40
41  post-patch {
42    foreach arch ${my_universal_archs} {
43      if {[string equal ${arch} ${first_arch}]} {
44        move ${worksrcpath} ${workpath}/${first_arch}
45      } else {
46        copy ${workpath}/${first_arch} ${workpath}/${arch}
47      }
48    }
49  }
50
51  configure {
52    foreach arch ${my_universal_archs} {
53      set my_arch_flag "-arch ${arch}"
54      set my_cflags "${configure.cflags} -isysroot ${sysroot} ${my_arch_flag} -I${prefix}/include -L${prefix}/lib"
55      set my_ldflags "${configure.ldflags} ${my_arch_flag}"
56      set pcp "{prefix}/lib/pkgconfig"
57            set my_configure_args "CC=\"gcc -arch ${arch}\""
58      system "cd ${workpath}/${arch} && CFLAGS=\"${my_cflags}\" CXXFLAGS=\"${my_cflags}\" LDFLAGS=\"${my_ldflags}\" PKG_CONFIG_PATH=\"${pcp}\" ${configure.cmd} ${configure.pre_args} ${configure.args} ${my_configure_args}"
59    }
60  }
61
62  build {
63    foreach arch ${my_universal_archs} {
64      system "cd ${workpath}/${arch} && ${build.cmd} ${build.pre_args}"
65    }
66  }
67
68  destroot {
69    system "cd ${workpath}/${first_arch} && ${destroot.cmd} ${destroot.pre_args} ${destroot.post_args}"
70    foreach lib [list [file readlink ${workpath}/${first_arch}/libmp3lame/.libs/libmp3lame.dylib] libmp3lame.a] {
71      set output_lib ${destroot}${prefix}/lib/${lib}
72      set lipo_args {}
73      foreach arch ${my_universal_archs} {
74        lappend lipo_args -arch ${arch} ${workpath}/${arch}/libmp3lame/.libs/${lib}
75      }
76      lappend lipo_args -create -output ${output_lib}
77      delete ${output_lib}
78      system "lipo ${lipo_args}"
79    }
80    set output_bin ${destroot}${prefix}/bin/lame
81    set lipo_args {}
82    foreach arch ${my_universal_archs} {
83      lappend lipo_args -arch ${arch} ${workpath}/${arch}/frontend/lame
84    }
85    lappend lipo_args -create -output ${output_bin}
86    delete ${output_bin}
87    system "lipo ${lipo_args}"
88  }
89}
Note: See TracBrowser for help on using the browser.