Ticket #53887: Portfile

File Portfile, 2.3 KB (added by janstary (Jan Starý), 7 years ago)

upgrade mandoc to 1.14.1

Line 
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
3PortSystem          1.0
4
5name                mandoc
6version             1.14.1
7description         UNIX manpage compiler
8homepage            http://mdocml.bsd.lv/
9categories          textproc
10license             ISC
11maintainers         eitanadler.com:lists openmaintainer
12platforms           openbsd freebsd netbsd darwin
13
14long_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
19master_sites        http://mdocml.bsd.lv/snapshots/
20
21livecheck.name      mdocml
22distname            mdocml-${version}
23checksums           rmd160  2e2d593e3f6cfcde3bdf57b090947b355ce2b2e8 \
24                    sha256  356954f141ec6f5635e938c826f2e16e4619bb361c64d84a31f6775d030a615b
25
26pre-configure {
27    set filename "${worksrcpath}/configure.local"
28    set content [subst {
29
30PREFIX="${prefix}"
31
32MANM_MANCONF="mandoc.conf"
33MANM_MAN="mandoc_man"
34MANM_MDOC="mandoc_mdoc"
35MANM_ROFF="mandoc_roff"
36MANM_EQN="mandoc_eqn"
37MANM_TBL="mandoc_tbl"
38
39BINM_MAN="mman"
40BINM_APROPOS="mapropos"
41BINM_WHATIS="mwhatis"
42BINM_MAKEWHATIS="mandocdb"
43BINM_SOELIM="msoelim"
44
45INSTALL_PROGRAM="${configure.install} -m 0755"
46INSTALL_LIB="${configure.install} -m 0644"
47INSTALL_MAN="${configure.install} -m 0644"
48INSTALL_DATA="${configure.install} -m 0644"
49
50INSTALL_LIBMANDOC=0
51BUILD_CGI=0
52BUILD_CATMAN=0
53
54CC="${configure.cc}"
55CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]"
56LDFLAGS="${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.
70variant universal   {}
71
72build.env           CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
73                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
74build.args          CC="${configure.cc}"