source: trunk/dports/textproc/colorer/Portfile @ 112479

Last change on this file since 112479 was 112479, checked in by ryandesign@…, 6 years ago

colorer: ensure we're UsingTheRightCompiler and -arch flags, even when not building universal; blacklist clang for now

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 112479 2013-10-24 09:36:43Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            colorer
6version         take5.be5
7revision        1
8license         MPL-1.1 GPL-2 LGPL-2.1
9categories      textproc devel
10platforms       darwin
11maintainers     nomaintainer
12description     A library that provides source text syntax highlighting services
13
14long_description \
15    Colorer take5 is a syntax highlighting and text parsing library, that \
16    provides services of text parsing in host editor systems in real-time and \
17    transforming results into colored text. Result information allows to \
18    search and build outlined lists of functions, structures, and to search \
19    and indent programming language constructions (brackets, paired tags).
20
21homepage        http://colorer.sourceforge.net/
22master_sites    sourceforge:project/colorer/Library%20sources/Colorer-${version}
23distname        Colorer-${version}
24use_zip         yes
25
26checksums       md5     075ede3afc260766fe13c71850a5e6c0 \
27                sha1    53cd454779621c09954ce70b6d06a4e1903ed6af \
28                rmd160  87c9ad2b99343c19e74211e658eb73ebcf0bcea9
29
30post-extract {
31    copy \
32        ${worksrcpath}/src/libcolorer/linux/Makefile.in \
33        ${worksrcpath}
34}
35
36variant universal {}
37
38patchfiles      patch-Makefile.in.diff
39
40post-patch {
41    # Use makefile.macos for colorer
42    reinplace {/\/colorer/s/gcc/macos/} ${worksrcpath}/Makefile.in
43
44    # error: cast from 'int*' to 'int' loses precision
45    reinplace s/int(/bool(/ ${worksrcpath}/src/shared/unicode/BitArray.cpp
46
47    # Libraries extension is ".dylib" on Darwin, not ".so"
48    reinplace {s/\.so/.dylib/} \
49        ${worksrcpath}/Makefile.in \
50        ${worksrcpath}/src/libcolorer/makefile.gcc
51
52    # The flag to build dynamic libraries on Darwin is -dynamiclib
53    # Furthermore we need to write down libcolorer install name
54    reinplace \
55        "s:-shared:-dynamiclib -install_name ${prefix}/lib/\$(TARGET):" \
56        ${worksrcpath}/src/libcolorer/makefile.gcc
57
58    # Do not force installation as root
59    reinplace {s/-g 0 -o 0//} ${worksrcpath}/Makefile.in
60
61    # Install documentation in an unversioned directory
62    reinplace s:doc/colorer-take5:doc/colorer: ${worksrcpath}/Makefile.in
63
64    reinplace "/^CPPFLAGS/s:\$: [get_canonical_archflags cc]:" \
65        ${worksrcpath}/src/shared/makefile.colorer.gcc
66    reinplace -E "/^(LIB)?FLAGS/s:\$: [get_canonical_archflags ld]:" \
67        ${worksrcpath}/src/colorer/makefile.macos \
68        ${worksrcpath}/src/libcolorer/makefile.gcc
69}
70
71# error: taking the address of a temporary object of type 'DString'
72compiler.blacklist *clang*
73
74configure.cmd   sh src/libcolorer/linux/configure
75configure.args  --srcdir=.
76
77build.target colorer
78# Yes, this build system uses "CPP" for the C compiler and "LINK" for the C++ compiler.
79build.args          CPP=${configure.cc} \
80                    LINK=${configure.cxx}
81use_parallel_build yes
82
83destroot.destdir    prefix=${destroot}${prefix}
84destroot.args       -B
85
86livecheck.type  regex
87livecheck.url   ${homepage}whatsnew/history.html
88livecheck.regex {<h2>([^,]*), Latest}
Note: See TracBrowser for help on using the repository browser.