Ticket #12896: Portfile.2

File Portfile.2, 1.4 KB (added by jmroot (Joshua Root), 17 years ago)

improved portfile

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem  1.0
5
6name        fpc
7version     2.2.0
8categories  lang
9platforms   darwin
10maintainers tds.net:jwbacon
11description Free Pascal
12long_description    Free Pascal compiler compatible with Borland
13homepage    http://www.freepascal.org/
14
15distfiles       fpc-${version}.source.tar.gz:fpcsrc \
16                fpcbins.tar.gz:fpcbin
17master_sites    sourceforge:freepascal:fpcsrc \
18                http://personalpages.tds.net/~jwbacon/Ports/distfiles/:fpcbin
19checksums   fpc-2.2.0.source.tar.gz md5 870965d5352ef23dccc1cf277e6edfee \
20            fpc-2.2.0.source.tar.gz sha1 1ea9e9a4b674b7c53e7fb65a6ea01dee60cb7db1 \
21            fpcbins.tar.gz md5 7a88ca3e6f61c02e017b188d54953648 \
22            fpcbins.tar.gz sha1 2d6bed54502d664b8931cc07e7e075cdd677e2f4
23
24use_configure   no
25worksrcdir  fpc-2.2.0
26
27if {! [string compare ${os.arch} powerpc]} {
28    set binname ppcppc
29} else {
30    set binname ppc386
31}
32
33build.target    build FPC=${workpath}/fpcbins/${binname}
34
35destroot {
36    system "cd ${worksrcpath} && ${build.cmd} install FPC=${workpath}/fpcbins/${binname} INSTALL_PREFIX=${destroot}${prefix}"
37    system "ln -s ${prefix}/lib/fpc/${version}/${binname} ${destroot}${prefix}/bin"
38    file mkdir ${destroot}${prefix}/etc
39    system "${destroot}${prefix}/lib/fpc/${version}/samplecfg ${prefix}/lib/fpc/${version} ${destroot}${prefix}/etc"
40}