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

Last change on this file since 62612 was 62612, checked in by nox@…, 10 years ago

Create new port colorer

Colorer take5 is a syntax highlighting and text parsing library, that
provides services of text parsing in host editor systems in real-time
and transforming results into colored text. Result information allows to
search and build outlined lists of functions, structures, and to search
and indent programming language constructions (brackets, paired tags).

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