source: trunk/dports/textproc/colorer/Portfile

Last change on this file was 125530, checked in by ryandesign@…, 3 years ago

colorer: fix build on Snow Leopard and earlier whose libstdc++.dylib is not in /usr/lib

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
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: Portfile 125530 2014-09-20 02:48:34Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name            colorer
7version         take5.be5
8revision        2
9license         MPL-1.1 GPL-2 LGPL-2.1
10categories      textproc devel
11platforms       darwin
12maintainers     ryandesign openmaintainer
13description     A library that provides source text syntax highlighting services
14
15long_description \
16    Colorer take5 is a syntax highlighting and text parsing library, that \
17    provides services of text parsing in host editor systems in real-time and \
18    transforming results into colored text. Result information allows to \
19    search and build outlined lists of functions, structures, and to search \
20    and indent programming language constructions (brackets, paired tags).
21
22homepage        http://colorer.sourceforge.net/
23master_sites    sourceforge:project/colorer/Library%20sources/Colorer-${version}
24distname        Colorer-${version}
25use_zip         yes
26
27checksums       md5     075ede3afc260766fe13c71850a5e6c0 \
28                sha1    53cd454779621c09954ce70b6d06a4e1903ed6af \
29                rmd160  87c9ad2b99343c19e74211e658eb73ebcf0bcea9
30
31post-extract {
32    copy \
33        ${worksrcpath}/src/libcolorer/linux/Makefile.in \
34        ${worksrcpath}
35}
36
37variant universal {}
38
39patchfiles      patch-Makefile.in.diff \
40                patch-src-colorer-makefile.gcc.diff \
41                patch-src-libcolorer-makefile.gcc.diff
42
43post-patch {
44    # error: cast from 'int*' to 'int' loses precision
45    reinplace s/int(/bool(/ ${worksrcpath}/src/shared/unicode/BitArray.cpp
46
47    # Do not force installation as root
48    reinplace {s/-g 0 -o 0//} ${worksrcpath}/Makefile.in
49}
50
51configure.cmd   sh src/libcolorer/linux/configure
52configure.args  --srcdir=.
53
54set extra_cflags "[get_canonical_archflags cc]"
55if {[string match *clang* ${configure.compiler}]} {
56    append extra_cflags " -Wno-error=address-of-temporary"
57}
58
59build.target colorer
60# Yes, this build system uses "CPP" for the C compiler and "LINK" for the C++ compiler.
61build.args          ARCHFLAGS="[get_canonical_archflags]" \
62                    CPP=${configure.cc} \
63                    CPPFLAGS_CUSTOM="${extra_cflags}" \
64                    FLAGS= \
65                    LIBINC="[regsub {^lib} ${configure.cxx_stdlib} {-l}]" \
66                    LINK=${configure.cxx} \
67                    prefix=${prefix}
68use_parallel_build yes
69
70destroot.destdir    prefix=${destroot}${prefix}
71destroot.args       -B
72
73livecheck.type  regex
74livecheck.url   ${homepage}whatsnew/history.html
75livecheck.regex {<h2>([^,]*), Latest}
Note: See TracBrowser for help on using the repository browser.