ports/129045: [PATCH] Add documentation to x11/hs-x11-ghc port
Ashish Shukla
wahjava at gmail.com
Fri Nov 21 13:50:01 UTC 2008
>Number: 129045
>Category: ports
>Synopsis: [PATCH] Add documentation to x11/hs-x11-ghc port
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 21 13:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Ashish Shukla
>Release: 8.0-CURRENT
>Organization:
N/A
>Environment:
FreeBSD monte-cristo.france 8.0-CURRENT FreeBSD 8.0-CURRENT #21: Mon Nov 10 21:19:13 IST 2008 root at monte-cristo.france:/usr/obj/usr/src/sys/ULE amd64
>Description:
This patch enables port to install HTML documentation (generated from haddock) if NOPORTDOCS is not defined.
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/x11/hs-x11-ghc/Makefile hs-x11-ghc/Makefile
--- /usr/ports/x11/hs-x11-ghc/Makefile 2008-07-19 01:35:16.000000000 +0530
+++ hs-x11-ghc/Makefile 2008-11-21 17:57:50.000000000 +0530
@@ -6,7 +6,7 @@
PORTNAME= x11
PORTVERSION= 1.4.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= x11 haskell
MASTER_SITES= http://hackage.haskell.org/packages/archive/X11/${PORTVERSION}/
PKGNAMEPREFIX= hs-
@@ -36,8 +36,13 @@
# 'owned' by lang/ghc:
CABALDIR= ${PREFIX}/lib/ghc-${GHC_VERSION}/cabal
CABALCMD= ${LOCALBASE}/bin/runghc Setup.hs
+DOCSDIR= ${PREFIX}/share/doc/X11-${PORTVERSION}
SUBDIR= ${PORTNAME}${PKGNAMESUFFIX}
+.ifndef (NOPORTDOCS)
+BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
+.endif
+
do-configure:
cd ${WRKSRC} && ${CABALCMD} configure --ghc --prefix=${PREFIX} --libdir=${CABALDIR} \
--libsubdir='' --datasubdir=''
@@ -45,6 +50,9 @@
do-build:
cd ${WRKSRC} && ${CABALCMD} build \
&& ${CABALCMD} --gen-script register
+.ifndef (NOPORTDOCS)
+ cd ${WRKSRC} && ${CABALCMD} haddock
+.endif
do-install:
cd ${WRKSRC} && ${CABALCMD} install \
diff -urN /usr/ports/x11/hs-x11-ghc/pkg-plist hs-x11-ghc/pkg-plist
--- /usr/ports/x11/hs-x11-ghc/pkg-plist 2007-12-30 20:36:11.000000000 +0530
+++ hs-x11-ghc/pkg-plist 2008-11-21 17:48:28.000000000 +0530
@@ -1,31 +1,57 @@
+%%SUBDIR%%/Graphics/X11.hi
+%%SUBDIR%%/Graphics/X11/Types.hi
%%SUBDIR%%/Graphics/X11/Xinerama.hi
-%%SUBDIR%%/Graphics/X11/Xlib/Extras.hi
-%%SUBDIR%%/include/XlibExtras.h
+%%SUBDIR%%/Graphics/X11/Xlib.hi
%%SUBDIR%%/Graphics/X11/Xlib/Atom.hi
%%SUBDIR%%/Graphics/X11/Xlib/Color.hi
%%SUBDIR%%/Graphics/X11/Xlib/Context.hi
%%SUBDIR%%/Graphics/X11/Xlib/Display.hi
%%SUBDIR%%/Graphics/X11/Xlib/Event.hi
+%%SUBDIR%%/Graphics/X11/Xlib/Extras.hi
%%SUBDIR%%/Graphics/X11/Xlib/Font.hi
+%%SUBDIR%%/Graphics/X11/Xlib/Image.hi
%%SUBDIR%%/Graphics/X11/Xlib/Misc.hi
%%SUBDIR%%/Graphics/X11/Xlib/Region.hi
%%SUBDIR%%/Graphics/X11/Xlib/Screen.hi
%%SUBDIR%%/Graphics/X11/Xlib/Types.hi
%%SUBDIR%%/Graphics/X11/Xlib/Window.hi
-%%SUBDIR%%/Graphics/X11/Xlib/Image.hi
-%%SUBDIR%%/Graphics/X11/Types.hi
-%%SUBDIR%%/Graphics/X11/Xlib.hi
-%%SUBDIR%%/Graphics/X11.hi
-%%SUBDIR%%/libHSX11-%%PORTVERSION%%.a
%%SUBDIR%%/HSX11-%%PORTVERSION%%.o
%%SUBDIR%%/include/HsXlib.h
+%%SUBDIR%%/include/XlibExtras.h
+%%SUBDIR%%/libHSX11-%%PORTVERSION%%.a
%%SUBDIR%%/%%PORTNAME%%-register.sh
-share/doc/X11-1.4.1/LICENSE
- at dirrm share/doc/X11-1.4.1
+%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Types.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xinerama.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Atom.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Color.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Context.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Display.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Event.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Extras.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Font.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Image.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Misc.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Region.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Screen.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Types.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib-Window.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11-Xlib.html
+%%PORTDOCS%%%%DOCSDIR%%/html/Graphics-X11.html
+%%PORTDOCS%%%%DOCSDIR%%/html/X11.haddock
+%%PORTDOCS%%%%DOCSDIR%%/html/doc-index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/haddock-util.js
+%%PORTDOCS%%%%DOCSDIR%%/html/haddock.css
+%%PORTDOCS%%%%DOCSDIR%%/html/haskell_icon.gif
+%%PORTDOCS%%%%DOCSDIR%%/html/index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/minus.gif
+%%PORTDOCS%%%%DOCSDIR%%/html/plus.gif
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
+ at dirrm %%DOCSDIR%%
+ at dirrmtry %%SUBDIR%%/include
@dirrm %%SUBDIR%%/Graphics/X11/Xlib
@dirrm %%SUBDIR%%/Graphics/X11
@dirrmtry %%SUBDIR%%/Graphics
- at dirrmtry %%SUBDIR%%/include
@exec /bin/sh %D/%%SUBDIR%%/%%PORTNAME%%-register.sh
@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
@unexec %D/bin/ghc-pkg unregister X11
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list