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

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

Fix library install name in colorer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 62651 2010-01-13 14:05:43Z nox@macports.org $
2
3PortSystem      1.0
4
5name            colorer
6version         take5.be5
7revision        1
8license         MPL-1.1 GPL-2.0 LGPL-2.1
9categories      textproc devel
10platforms       darwin
11maintainers     nox openmaintainer
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
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
36patchfiles      patch-Makefile.in.diff
37
38post-patch {
39    # Use makefile.macos for colorer
40    reinplace {/\/colorer/s/gcc/macos/} ${worksrcpath}/Makefile.in
41
42    # error: cast from 'int*' to 'int' loses precision
43    reinplace s/int(/bool(/ ${worksrcpath}/src/shared/unicode/BitArray.cpp
44
45    # Libraries extension is ".dylib" on Darwin, not ".so"
46    reinplace {s/\.so/.dylib/} \
47        ${worksrcpath}/Makefile.in \
48        ${worksrcpath}/src/libcolorer/makefile.gcc
49
50    # The flag to build dynamic libraries on Darwin is -dynamiclib
51    # Furthermore we need to write down libcolorer install name
52    reinplace \
53        "s:-shared:-dynamiclib -install_name ${prefix}/lib/\$(TARGET):" \
54        ${worksrcpath}/src/libcolorer/makefile.gcc
55
56    # Do not force installation as root
57    reinplace {s/-g 0 -o 0//} ${worksrcpath}/Makefile.in
58
59    # Install documentation in an unversioned directory
60    reinplace s:doc/colorer-take5:doc/colorer: ${worksrcpath}/Makefile.in
61}
62
63configure.cmd   sh src/libcolorer/linux/configure
64configure.args  --srcdir=.
65
66build.target colorer
67use_parallel_build yes
68
69destroot.destdir    prefix=${destroot}${prefix}
70destroot.args       -B
71
72if {[variant_isset universal]} {
73    post-patch {
74        # Use MacPorts universal flags
75        reinplace "/^CPPFLAGS/s:\$: ${configure.universal_cflags}:" \
76            ${worksrcpath}/src/shared/makefile.colorer.gcc
77        reinplace -E "/^(LIB)?FLAGS/s:\$: ${configure.universal_ldflags}:" \
78            ${worksrcpath}/src/colorer/makefile.macos \
79            ${worksrcpath}/src/libcolorer/makefile.gcc
80    }
81}
82
83livecheck.type  regex
84livecheck.url   ${homepage}whatsnew/history.html
85livecheck.regex {<h2>([^,]*), Latest}
Note: See TracBrowser for help on using the repository browser.