2010-11-06 06:18:38 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.25 2010/11/06 10:18:38 espie Exp $
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2010-06-18 16:42:03 -04:00
|
|
|
COMMENT-main = documentation-generation tool for Haskell libraries
|
|
|
|
COMMENT-lib = haddock library
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2010-04-22 17:49:12 -04:00
|
|
|
DISTNAME = haddock-2.7.2
|
2010-07-17 09:54:30 -04:00
|
|
|
PKGNAME-main = ${DISTNAME}
|
2010-10-28 09:51:00 -04:00
|
|
|
REVISION-main = 4
|
2010-06-18 16:42:03 -04:00
|
|
|
PKGNAME-lib = hs-${DISTNAME}
|
2010-11-03 18:12:01 -04:00
|
|
|
REVISION-lib = 2
|
2010-04-22 17:49:12 -04:00
|
|
|
CATEGORIES = devel
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2010-04-22 17:49:12 -04:00
|
|
|
HOMEPAGE = http://www.haskell.org/haddock/
|
2007-07-21 13:20:20 -04:00
|
|
|
|
2010-06-18 16:42:03 -04:00
|
|
|
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
|
2007-07-21 13:20:20 -04:00
|
|
|
|
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 ?=
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2010-04-22 17:49:12 -04:00
|
|
|
.if ! ${FLAVOR:L:Mno_deps}
|
|
|
|
MODULES = lang/ghc converters/libiconv
|
2010-06-18 16:42:03 -04:00
|
|
|
MODGHC_BUILD = cabal hackage register
|
2003-07-30 21:11:14 -04:00
|
|
|
|
2010-06-18 16:42:03 -04:00
|
|
|
LIB_DEPENDS-lib =
|
|
|
|
LIB_DEPENDS-main = ${LIB_DEPENDS} \
|
2010-07-17 09:54:30 -04:00
|
|
|
::devel/gmp
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2010-11-06 06:18:38 -04:00
|
|
|
WANTLIB-lib =
|
|
|
|
WANTLIB-main = ${WANTLIB} \
|
|
|
|
c gmp m pthread util
|
2010-08-26 18:05:05 -04:00
|
|
|
|
2010-04-22 17:49:12 -04:00
|
|
|
BUILD_DEPENDS += ::devel/alex \
|
|
|
|
::devel/happy \
|
2010-06-15 13:38:17 -04:00
|
|
|
::devel/hs-ghc-paths \
|
2010-06-18 17:34:23 -04:00
|
|
|
::lang/ghc,-doc \
|
2010-04-22 17:49:12 -04:00
|
|
|
::textproc/docbook \
|
|
|
|
::textproc/docbook-xsl \
|
|
|
|
::textproc/libxslt \
|
|
|
|
${RUN_DEPENDS}
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2007-07-21 13:20:20 -04:00
|
|
|
# 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,-,/,}/
|
2010-08-26 18:05:05 -04:00
|
|
|
|
|
|
|
do-build:
|
|
|
|
@echo "*** The no_deps FLAVOR is not meant to be built at all, it is"
|
|
|
|
@echo "*** only used by lang/ghc to get a copy of the haddock sources."
|
|
|
|
@false
|
2010-04-22 17:49:12 -04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-build:
|
2007-08-01 17:59:55 -04:00
|
|
|
@cd ${WRKBUILD}/doc && exec ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} html
|
2010-06-18 16:42:03 -04:00
|
|
|
@cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \
|
2010-06-18 17:05:06 -04:00
|
|
|
${MODGHC_SETUP_PROG} \
|
|
|
|
--with-haddock=${WRKBUILD}/dist/build/haddock/haddock \
|
|
|
|
haddock --haddock-option=-l${WRKBUILD}
|
2003-07-24 20:26:13 -04:00
|
|
|
|
2007-07-21 13:20:20 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc
|
2007-08-01 17:59:55 -04:00
|
|
|
cd ${WRKBUILD}/doc && umask 022 && pax -rw haddock ${PREFIX}/share/doc
|
2003-07-24 20:26:13 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|