Permalink
Browse files

mandoc: new port. Fixes: https://trac.macports.org/ticket/47308.

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@134595 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information...
Ionic committed Mar 31, 2015
1 parent b61aa24 commit f7092bfe28646fadb8d6610fe8358dc3b1a3ad9b
Showing with 78 additions and 0 deletions.
  1. +78 −0 textproc/mandoc/Portfile
View
@@ -0,0 +1,78 @@
# -*- 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
# $Id$
PortSystem 1.0
name mandoc
version 1.13.3
categories textproc
license ISC
maintainers eitanadler.com:lists openmaintainer
description The mandoc UNIX manpage compiler toolset
homepage http://mdocml.bsd.lv/
platforms darwin freebsd
long_description mandoc is a suite of tools compiling mdoc, \
the roff macro language of choice for \
BSD manual pages, and man, the predominant \
historical language for UNIX manuals.
master_sites http://mdocml.bsd.lv/snapshots/
distname mdocml-${version}
checksums rmd160 47d1096708b45b15d8f198404fd6608d164bb66a \
sha256 23ccab4800d50bf4c327979af5d4aa1a6a2dc490789cb67c4c3ac1bd40b8cad8
depends_lib port:sqlite3
# Without declaring a universal variant before using get_canonical_archflags,
# only non-universal arch flags are returned.
# This works around it.
# Another way around the problem would be setting build.env in pre-build.
# Kudos to jmr and ryandesign for explaining that.
variant universal {}
build.env CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
build.args CC="${configure.cc}"
pre-configure {
set filename "${worksrcpath}/configure.local"
set content [subst {
CC="${configure.cc}"
CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]"
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
DBLIB="-lsqlite3"
HAVE_SQLITE3="1"
BUILD_DB="1"
BUILD_CGI="0"
# Rename mandoc binaries (and their manpages.)
BINM_APROPOS="mapropos"
BINM_MAN="mman"
BINM_WHATIS="mwhatis"
BINM_MAKEWHATIS="mmakewhatis"
# Rename mandoc manpages.
MANM_MAN="mandoc_man"
MANM_ROFF="mandoc_roff"
MANM_EQN="mandoc_eqn"
MANM_TBL="mandoc_tbl"
PREFIX="${prefix}"
BINDIR="${prefix}/bin"
SBINDIR="${prefix}/sbin"
INCLUDEDIR="${prefix}/include"
LIBDIR="${prefix}/lib"
MANDIR="${prefix}/share/man"
EXAMPLEDIR="${prefix}/share/examples/mandoc"
INSTALL_PROGRAM="${configure.install} -m 0755"}
]
set fd [open "${filename}" "w"]
puts -nonewline "${fd}" "${content}"
close "${fd}"
}

0 comments on commit f7092bf

Please sign in to comment.