Permalink
Browse files

mandoc:

 - Update to version 1.14.1
 - mentions more platfroms (the *BSDs use this in base)
 - drops the sqlite dependency (mandoc no longer uses it)
 - augments, edits and reorders various settings to fit the current configure.local;
  in particular, renames mandoc's soelim(1) which otherwise clashes with groff's soelim(1).
 - beside install -m 755 for binaries, does -m 644 for others
 - explicitly does not do libmandoc, cgi and catman
 - moves the build section after the configure section
 - sets proper livecheck.name

Closes: https://trac.macports.org/ticket/53887
  • Loading branch information...
mf2k committed May 2, 2017
1 parent 3869e56 commit 2945233da57266a36ef2b8efe80a9d661848a7e7
Showing with 41 additions and 43 deletions.
  1. +41 −43 textproc/mandoc/Portfile
View
@@ -3,13 +3,13 @@
PortSystem 1.0
name mandoc
version 1.13.3
version 1.14.1
description UNIX manpage compiler
homepage http://mdocml.bsd.lv/
categories textproc
license ISC
maintainers eitanadler.com:lists stare.cz:hans openmaintainer
description The mandoc UNIX manpage compiler toolset
homepage http://mdocml.bsd.lv/
platforms darwin freebsd
platforms openbsd freebsd netbsd darwin
long_description mandoc is a suite of tools compiling mdoc, \
the roff macro language of choice for \
@@ -18,60 +18,58 @@ long_description mandoc is a suite of tools compiling mdoc, \
master_sites http://mdocml.bsd.lv/snapshots/
livecheck.name mdocml
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}"
checksums rmd160 2e2d593e3f6cfcde3bdf57b090947b355ce2b2e8 \
sha256 356954f141ec6f5635e938c826f2e16e4619bb361c64d84a31f6775d030a615b
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"
PREFIX="${prefix}"
MANDIR="${prefix}/share/man"
# Rename mandoc manpages.
MANM_MANCONF="mandoc.conf"
MANM_MAN="mandoc_man"
MANM_MDOC="mandoc_mdoc"
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"
BINM_MAN="mman"
BINM_APROPOS="mapropos"
BINM_WHATIS="mwhatis"
BINM_MAKEWHATIS="mandocdb"
BINM_SOELIM="msoelim"
INSTALL_PROGRAM="${configure.install} -m 0755"}
]
INSTALL_PROGRAM="${configure.install} -m 0755"
INSTALL_LIB="${configure.install} -m 0644"
INSTALL_MAN="${configure.install} -m 0644"
INSTALL_DATA="${configure.install} -m 0644"
set fd [open "${filename}" "w"]
INSTALL_LIBMANDOC=0
BUILD_CGI=0
BUILD_CATMAN=0
puts -nonewline "${fd}" "${content}"
CC="${configure.cc}"
CFLAGS="${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]"
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
} ]
set fd [open "${filename}" "w"]
puts -nonewline "${fd}" "${content}"
close "${fd}"
}
# 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}"

0 comments on commit 2945233

Please sign in to comment.