openbsd-ports/devel/haddock/Makefile

65 lines
1.6 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.16 2010/06/18 20:42:03 kili Exp $
COMMENT-main = documentation-generation tool for Haskell libraries
COMMENT-lib = haddock library
2010-04-22 17:49:12 -04:00
DISTNAME = haddock-2.7.2
PKGNAME-main = ${DISTNAME}p2
PKGNAME-lib = hs-${DISTNAME}
2010-04-22 17:49:12 -04:00
CATEGORIES = devel
2010-04-22 17:49:12 -04:00
HOMEPAGE = http://www.haskell.org/haddock/
MULTI_PACKAGES = -main -lib
2010-04-22 17:49:12 -04:00
# BSD3
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
2010-04-22 17:49:12 -04:00
# This pseudo flavor is needed to let ghc extract the haddock sources
# without pulling in haddocks own build dependencies (which would
# include ghc).
PSEUDO_FLAVORS = no_deps
FLAVOR ?=
WANTLIB-main = c m util
2010-04-22 17:49:12 -04:00
.if ! ${FLAVOR:L:Mno_deps}
MODULES = lang/ghc converters/libiconv
MODGHC_BUILD = cabal hackage register
LIB_DEPENDS-lib =
LIB_DEPENDS-main = ${LIB_DEPENDS} \
gmp::devel/gmp
2010-04-22 17:49:12 -04:00
BUILD_DEPENDS += ::devel/alex \
::devel/happy \
::devel/hs-ghc-paths \
2010-04-22 17:49:12 -04:00
::textproc/docbook \
::textproc/docbook-xsl \
::textproc/libxslt \
${RUN_DEPENDS}
# Required for building the documentation:
2010-04-22 17:49:12 -04:00
USE_GMAKE = Yes
CONFIGURE_STYLE = autoconf no-autoheader
AUTOCONF_VERSION = 2.61
AUTOCONF_DIR = ${WRKSRC}/doc
WRKCONF = ${AUTOCONF_DIR}
.else
MASTER_SITES = http://hackage.haskell.org/packages/archive/${DISTNAME:S,-,/,}/
.endif
post-build:
@cd ${WRKBUILD}/doc && exec ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} html
@cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \
${MODGHC_SETUP_PROG} haddock
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc
cd ${WRKBUILD}/doc && umask 022 && pax -rw haddock ${PREFIX}/share/doc
.include <bsd.port.mk>