1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name mandoc |
---|
6 | version 1.14.1 |
---|
7 | description UNIX manpage compiler |
---|
8 | homepage http://mdocml.bsd.lv/ |
---|
9 | categories textproc |
---|
10 | license ISC |
---|
11 | maintainers eitanadler.com:lists openmaintainer |
---|
12 | platforms openbsd freebsd netbsd darwin |
---|
13 | |
---|
14 | long_description mandoc is a suite of tools compiling mdoc, \ |
---|
15 | the roff macro language of choice for \ |
---|
16 | BSD manual pages, and man, the predominant \ |
---|
17 | historical language for UNIX manuals. |
---|
18 | |
---|
19 | master_sites http://mdocml.bsd.lv/snapshots/ |
---|
20 | |
---|
21 | livecheck.name mdocml |
---|
22 | distname mdocml-${version} |
---|
23 | checksums rmd160 2e2d593e3f6cfcde3bdf57b090947b355ce2b2e8 \ |
---|
24 | sha256 356954f141ec6f5635e938c826f2e16e4619bb361c64d84a31f6775d030a615b |
---|
25 | |
---|
26 | pre-configure { |
---|
27 | set filename "${worksrcpath}/configure.local" |
---|
28 | set content [subst { |
---|
29 | |
---|
30 | PREFIX="${prefix}" |
---|
31 | |
---|
32 | MANM_MANCONF="mandoc.conf" |
---|
33 | MANM_MAN="mandoc_man" |
---|
34 | MANM_MDOC="mandoc_mdoc" |
---|
35 | MANM_ROFF="mandoc_roff" |
---|
36 | MANM_EQN="mandoc_eqn" |
---|
37 | MANM_TBL="mandoc_tbl" |
---|
38 | |
---|
39 | BINM_MAN="mman" |
---|
40 | BINM_APROPOS="mapropos" |
---|
41 | BINM_WHATIS="mwhatis" |
---|
42 | BINM_MAKEWHATIS="mandocdb" |
---|
43 | BINM_SOELIM="msoelim" |
---|
44 | |
---|
45 | INSTALL_PROGRAM="${configure.install} -m 0755" |
---|
46 | INSTALL_LIB="${configure.install} -m 0644" |
---|
47 | INSTALL_MAN="${configure.install} -m 0644" |
---|
48 | INSTALL_DATA="${configure.install} -m 0644" |
---|
49 | |
---|
50 | INSTALL_LIBMANDOC=0 |
---|
51 | BUILD_CGI=0 |
---|
52 | BUILD_CATMAN=0 |
---|
53 | |
---|
54 | CC="${configure.cc}" |
---|
55 | CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" |
---|
56 | LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" |
---|
57 | |
---|
58 | } ] |
---|
59 | |
---|
60 | set fd [open "${filename}" "w"] |
---|
61 | puts -nonewline "${fd}" "${content}" |
---|
62 | close "${fd}" |
---|
63 | } |
---|
64 | |
---|
65 | # Without declaring a universal variant before using get_canonical_archflags, |
---|
66 | # only non-universal arch flags are returned. |
---|
67 | # This works around it. |
---|
68 | # Another way around the problem would be setting build.env in pre-build. |
---|
69 | # Kudos to jmr and ryandesign for explaining that. |
---|
70 | variant universal {} |
---|
71 | |
---|
72 | build.env CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \ |
---|
73 | LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" |
---|
74 | build.args CC="${configure.cc}" |
---|