Ticket #46477: Portfile2

File Portfile2, 1.4 KB (added by ranauei@…, 9 years ago)

Updated source location. Different arrangement to accomodate universal building

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                stm32flash
7version             0.4
8categories          devel
9maintainers         openmaintainer gmail.com:ranauei
10platforms           darwin
11license             GPL-2
12description         Flash program for the STM32 bootloader
13long_description    Open source flash program for the STM32 ARM processors \
14                    using the ST serial bootloader over UART or I2C
15homepage            http://sourceforge.net/p/stm32flash/wiki/Home/
16master_sites        sourceforge
17
18checksums           rmd160  f40648bd6baf5943c781c955ab260851c9cee744 \
19                    sha256  023f28b01f644edc235c8815a4352e359d3ebdbe6368aaf6bbc28bab3e6ffa5b
20
21worksrcdir          ${name}
22
23use_configure       no
24
25variant universal {}
26
27patchfiles          patch-stm32.c.diff
28
29post-patch {
30     reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile
31     reinplace "s|\$\(AR\) rc|\$\(AR\) rcs|g" ${worksrcpath}/parsers/Makefile
32}
33
34pre-build {
35     if {[variant_isset universal]} {
36          build.env-append CFLAGS="${configure.universal_cflags}" \
37                           LDFLAGS="${configure.universal_ldflags}"
38     }
39     build.args-append CC=${configure.cc}
40     build.env-append  MAKE=${build.cmd} \
41                       INSTALL=${configure.install}
42}