source: trunk/dports/textproc/mandoc/Portfile @ 134595

Last change on this file since 134595 was 134595, checked in by ionic@…, 5 years ago

mandoc: new port. Fixes: #47308.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
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# $Id: Portfile 134595 2015-03-31 04:58:29Z ionic@macports.org $
3
4PortSystem          1.0
5
6name                mandoc
7version             1.13.3
8categories          textproc
9license             ISC
10maintainers         eitanadler.com:lists openmaintainer
11description         The mandoc UNIX manpage compiler toolset
12homepage            http://mdocml.bsd.lv/
13platforms           darwin freebsd
14
15long_description    mandoc is a suite of tools compiling mdoc, \
16                    the roff macro language of choice for \
17                    BSD manual pages, and man, the predominant \
18                    historical language for UNIX manuals.
19
20master_sites        http://mdocml.bsd.lv/snapshots/
21
22distname            mdocml-${version}
23checksums           rmd160  47d1096708b45b15d8f198404fd6608d164bb66a \
24                    sha256  23ccab4800d50bf4c327979af5d4aa1a6a2dc490789cb67c4c3ac1bd40b8cad8
25
26depends_lib         port:sqlite3
27
28# Without declaring a universal variant before using get_canonical_archflags,
29# only non-universal arch flags are returned.
30# This works around it.
31# Another way around the problem would be setting build.env in pre-build.
32# Kudos to jmr and ryandesign for explaining that.
33variant universal   {}
34
35build.env           CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
36                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
37build.args          CC="${configure.cc}"
38
39pre-configure {
40    set filename "${worksrcpath}/configure.local"
41    set content [subst {
42CC="${configure.cc}"
43CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]"
44LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
45DBLIB="-lsqlite3"
46HAVE_SQLITE3="1"
47BUILD_DB="1"
48BUILD_CGI="0"
49
50# Rename mandoc binaries (and their manpages.)
51BINM_APROPOS="mapropos"
52BINM_MAN="mman"
53BINM_WHATIS="mwhatis"
54BINM_MAKEWHATIS="mmakewhatis"
55
56# Rename mandoc manpages.
57MANM_MAN="mandoc_man"
58MANM_ROFF="mandoc_roff"
59MANM_EQN="mandoc_eqn"
60MANM_TBL="mandoc_tbl"
61
62PREFIX="${prefix}"
63BINDIR="${prefix}/bin"
64SBINDIR="${prefix}/sbin"
65INCLUDEDIR="${prefix}/include"
66LIBDIR="${prefix}/lib"
67MANDIR="${prefix}/share/man"
68EXAMPLEDIR="${prefix}/share/examples/mandoc"
69
70INSTALL_PROGRAM="${configure.install} -m 0755"}
71    ]
72
73    set fd [open "${filename}" "w"]
74
75    puts -nonewline "${fd}" "${content}"
76
77    close "${fd}"
78}
Note: See TracBrowser for help on using the repository browser.