[Pkg-haskell-commits] darcs: ghc: Import of ghc6_6.10.1+dfsg1-9.dsc
Kari Pahula
kaol at debian.org
Sat Jan 15 06:06:05 UTC 2011
Tue Feb 17 10:52:37 UTC 2009 Kari Pahula <kaol at debian.org>
* Import of ghc6_6.10.1+dfsg1-9.dsc
M ./changelog +28
M ./control -1 +2
M ./ghc6-doc.postinst.in -2 +30
A ./ghc6-doc.triggers
A ./mk_provided_substvars
M ./rules -57 +25
Tue Feb 17 10:52:37 UTC 2009 Kari Pahula <kaol at debian.org>
* Import of ghc6_6.10.1+dfsg1-9.dsc
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog 2011-01-15 06:06:04.728185430 +0000
+++ new-ghc/changelog 2011-01-15 06:06:05.000199759 +0000
@@ -1,3 +1,31 @@
+ghc6 (6.10.1+dfsg1-9) unstable; urgency=low
+
+ * Made ghc6-doc's postinst only call haddock on haddock files that are
+ actually installed.
+
+ -- Kari Pahula <kaol at debian.org> Tue, 17 Feb 2009 12:52:37 +0200
+
+ghc6 (6.10.1+dfsg1-8) unstable; urgency=low
+
+ * Moved xsltproc, docbook-xsl, docbook-xml back as Build-Depends.
+
+ -- Kari Pahula <kaol at debian.org> Tue, 17 Feb 2009 09:52:55 +0200
+
+ghc6 (6.10.1+dfsg1-7) unstable; urgency=low
+
+ * Set build deps related to doc building as Build-Depends-Indep.
+ * Set BUILD_HADDOCK_DOCS at build time, depending on haddock's
+ presence. See debian/rules for rationale.
+ * Replaced /usr/lib/ghc6-doc/gen_contents_index with a symlink to
+ /bin/true.
+ * Amended ghc6-doc's "postinst triggered" to perform what g_c_i did.
+ * Added GhcDebugged=YES and some other flags to build.mk on ia64 and hppa.
+ * Moved provided-{dev,prof,doc} generation to its own script and catch
+ errors in it. (Closes: #514085, #514086)
+ * Further cleanups to debian/rules.
+
+ -- Kari Pahula <kaol at debian.org> Mon, 16 Feb 2009 12:28:56 +0200
+
ghc6 (6.10.1+dfsg1-6) experimental; urgency=low
* This time actually change the build on ia64 to be unregisterised.
diff -rN -u old-ghc/control new-ghc/control
--- old-ghc/control 2011-01-15 06:06:04.728185430 +0000
+++ new-ghc/control 2011-01-15 06:06:04.996199549 +0000
@@ -3,7 +3,8 @@
Priority: optional
Maintainer: Kari Pahula <kaol at debian.org>
Standards-Version: 3.8.0
-Build-Depends: debhelper (>= 4), libgmp3-dev, xsltproc, libedit-dev, devscripts, ghc6, grep-dctrl, autotools-dev, docbook-xsl, docbook-xml, gcc (>= 4:4.2), procps | hurd, quilt, libffi-dev, autoconf, pkg-config, haddock (>= 2.4.1-2) [i386 amd64]
+Build-Depends: debhelper (>= 4), libgmp3-dev, libedit-dev, devscripts, ghc6, grep-dctrl, autotools-dev, gcc (>= 4:4.2), procps | hurd, quilt, libffi-dev, autoconf, pkg-config, xsltproc, docbook-xsl, docbook-xml
+Build-Depends-Indep: haddock (>= 2.4.1-2)
Homepage: http://haskell.org/
Package: ghc6
diff -rN -u old-ghc/ghc6-doc.postinst.in new-ghc/ghc6-doc.postinst.in
--- old-ghc/ghc6-doc.postinst.in 2011-01-15 06:06:04.728185430 +0000
+++ new-ghc/ghc6-doc.postinst.in 2011-01-15 06:06:04.996199549 +0000
@@ -22,10 +22,38 @@
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
+gen_contents_index () {
+ NAMES=
+ HADDOCK_ARGS=
+ for CABAL in `ghc-pkg list --global --simple-output` ; do
+ PKG=`echo $CABAL | perl -ne 'm((.*)-[^-]*$); print $1;' | tr 'A-Z' 'a-z'`
+ if [ $PKG != ghc ] && echo $NAMES | grep -vq " $PKG " ; then
+ NAMES=" $NAMES $PKG "
+ HADDOCK_FILE=`ghc-pkg field $CABAL haddock-interfaces | cut -d' ' -f 2-`
+ if [ -e $HADDOCK_FILE ] ; then
+ HTML=`ghc-pkg field $CABAL haddock-html | cut -d' ' -f 2-`
+ HPATH=
+ if echo $HTML | egrep -q '^/usr/share/doc/[^/]*-doc/html/' ; then
+ HPATH="../../`echo $HTML | cut -d/ -f 5-`" ;
+ elif echo $HTML | egrep -q '^/usr/share/doc/ghc6-doc/libraries/' ; then
+ HPATH="`echo $HTML | cut -d/ -f 7-`" ;
+ fi
+ if [ -n "$HPATH" ] ; then
+ HADDOCK_ARGS="$HADDOCK_ARGS --read-interface=$HPATH,$HADDOCK_FILE"
+ fi
+ fi
+ fi
+ done
+ /usr/bin/haddock --gen-index --gen-contents \
+ -o /usr/share/doc/ghc6-doc/libraries/ \
+ -t "Haskell Hierarchical Libraries" \
+ -p /usr/share/doc/ghc6-doc/libraries/prologue.txt \
+ $HADDOCK_ARGS
+}
+
case "$1" in
triggered)
- cd /usr/share/doc/ghc6-doc/libraries
- "$libdir"/gen_contents_index
+ gen_contents_index
;;
configure|abort-upgrade|abort-remove|abort-deconfigure)
;;
diff -rN -u old-ghc/ghc6-doc.triggers new-ghc/ghc6-doc.triggers
--- old-ghc/ghc6-doc.triggers 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/ghc6-doc.triggers 2011-01-15 06:06:04.992199338 +0000
@@ -0,0 +1,3 @@
+interest /usr/share/doc/ghc6-doc/libraries
+interest /usr/share/ghc6-doc/haddock
+interest /usr/lib/ghc6-doc/haddock
diff -rN -u old-ghc/mk_provided_substvars new-ghc/mk_provided_substvars
--- old-ghc/mk_provided_substvars 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc/mk_provided_substvars 2011-01-15 06:06:04.980198706 +0000
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+set -e
+
+test -x utils/ghc-pkg/dist-inplace/build/ghc-pkg/ghc-pkg
+test -n $1
+
+{
+ utils/ghc-pkg/dist-inplace/build/ghc-pkg/ghc-pkg \
+ list --global-conf debian/tmp/usr/lib/ghc-$1/package.conf.shipped \
+ --simple-output | tr ' A-Z' '\na-z' | \
+ sed -e "s/([^)]*)//g" -e "s/-[0-9]\+\(\.[0-9]\+\)*//g" \
+ -e "s/^ *//" -e "s/ *$$//" -e "s/ */, /g" ;
+} |
+{ read PACKAGES
+ {
+ echo -n "provided-devs="
+ echo "$PACKAGES" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-dev/g" ;
+ } >> debian/ghc6.substvars
+ {
+ echo -n "provided-profs="
+ echo "$PACKAGES" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-prof/g" ;
+ } >> debian/ghc6-prof.substvars
+ {
+ echo -n "provided-docs="
+ echo "$$PACKAGE" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-doc/g" ;
+ } >> debian/ghc6-doc.substvars ;
+}
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules 2011-01-15 06:06:04.728185430 +0000
+++ new-ghc/rules 2011-01-15 06:06:04.996199549 +0000
@@ -23,8 +23,19 @@
GHC=$(firstword $(shell bash -c "type -p ghc6 ghc"))
EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)"
-# "YES" if yes
-BUILD_HADDOCK_DOCS=$(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -qe '^(i386|amd64)$$' && echo YES || echo NO)
+
+# This thing violates the principle that builds should work the same
+# way or fail uniformly and not be otherwise affected by what packages
+# are installed. Optimally, the rules file should have a
+# configure-indep target that would add HADDOCK_DOCS=YES to
+# mk/build.mk. But as long as we can't use build-arch on buildds,
+# this is IMHO the best option. I don't want to build GHC as root,
+# via binary-arch, nor make a build target that doesn't actually build
+# docs when B-D-I are present. A plain Build-Depends on haddock is an
+# option, but as haddock Build-Depends on ghc6, I'd rather break the
+# loop.
+BUILD_HADDOCK_DOCS=$(shell test -x /usr/bin/haddock && echo YES || echo NO)
+$(warning BUILD_HADDOCK_DOCS set at build time to $(BUILD_HADDOCK_DOCS))
configure: configure-stamp
configure-stamp: patch
@@ -35,19 +46,16 @@
rm -f mk/build.mk
echo "XMLDocWays := html" >> mk/build.mk
echo "HADDOCK_DOCS := $(BUILD_HADDOCK_DOCS)" >> mk/build.mk
-# echo "GhcRTSWays += debug_p thr_debug thr_debug_p" >> mk/build.mk
echo "XSLTPROC_OPTS += --nonet" >> mk/build.mk
-ifeq '$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), i386 amd64 powerpc kfreebsd-i386)' ''
+ifeq (,$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), i386 amd64 kfreebsd-i386 powerpc))
echo "GhcUnregisterised=YES" >> mk/build.mk
endif
-# echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
-# echo "GhcWithInterpreter=NO" >> mk/build.mk
-# echo "SplitObjs=NO" >> mk/build.mk
-# Let's see if we could do without this with 6.10.1.
-# # The threaded RTS doesn't seem happy on non-x86/amd64
-# echo 'GhcRTSWays := $$(shell echo $$(GhcRTSWays) | sed "s/\<[a-z_]*thr[a-z_]*\>//g")' >> mk/build.mk
-# echo "GhcNotThreaded=YES" >> mk/build.mk
-#endif
+ifneq (,$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), hppa ia64))
+ echo "GhcWithInterpreter=NO" >> mk/build.mk
+ echo "SplitObjs=NO" >> mk/build.mk
+ echo "GhcThreaded=NO" >> mk/build.mk
+ echo "GhcDebugged=YES" >> mk/build.mk
+endif
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
echo "SRC_HC_OPTS += -H32m -O0" >> mk/build.mk
echo "GhcHcOpts += -Rghc-timing -DDEBUG" >> mk/build.mk
@@ -111,8 +119,6 @@
dh_clean -k
dh_installdirs
-# echo "readline=`grep-status -r -FProvides '\<libreadline-dev\>' -a -FStatus installed -s Package -n | tr '\n' ,`" >> debian/ghc6.substvars
-
# Install the basic stuff
$(MAKE) DESTDIR=`pwd`/debian/tmp install
$(MAKE) DESTDIR=`pwd`/debian/tmp install-docs
@@ -129,16 +135,7 @@
# Sort out the package.conf files
mv debian/tmp/usr/lib/ghc-$(ProjectVersion)/package.conf \
debian/tmp/usr/lib/ghc-$(ProjectVersion)/package.conf.shipped
- PACKAGE=`utils/ghc-pkg/ghc-pkg-inplace list -f debian/tmp/usr/lib/ghc-$(ProjectVersion)/package.conf.shipped | perl -ne 'print if $$foo; $$foo = 1 if /^debian/' | tr '\n,A-Z' ' a-z' | sed -e "s/([^)]*)//g" -e "s/-[0-9]\+\(\.[0-9]\+\)*//g" -e "s/^ *//" -e "s/ *$$//" -e "s/ */, /g"`; \
- { echo -n "provided-devs="; \
- echo "$$PACKAGE" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-dev/g"; } \
- >> debian/ghc6.substvars; \
- { echo -n "provided-profs="; \
- echo "$$PACKAGE" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-prof/g"; } \
- >> debian/ghc6-prof.substvars; \
- { echo -n "provided-docs="; \
- echo "$$PACKAGE" | sed -e "s/\([a-z0-9.-]\+\)/libghc6-\1-doc/g"; } \
- >> debian/ghc6-doc.substvars
+ sh -c "debian/mk_provided_substvars $(ProjectVersion)"
# Sort out the binaries
mkdir debian/tmp/usr/bin
@@ -154,12 +151,9 @@
done
rm -f debian/tmp/usr/bin/*-$(ProjectVersion)6
rm -f debian/tmp/usr/bin/runhaskell6
- # gen_contents_index is a script, so move it into /usr/lib
- mkdir debian/tmp/usr/lib/ghc6-doc
-ifeq ($(BUILD_HADDOCK_DOCS),YES)
- mv debian/tmp/usr/share/doc/ghc6-doc/libraries/gen_contents_index \
- debian/tmp/usr/lib/ghc6-doc
-endif
+
+ mkdir -p debian/tmp/usr/lib/ghc6-doc
+ ln -s /bin/true debian/tmp/usr/lib/ghc6-doc/gen_contents_index
# manpages
ProjectVersion=$(ProjectVersion) $(MAKE) -f debian/scripts.mk all
@@ -168,12 +162,6 @@
cp utils/hp2ps/hp2ps.1 debian/hp2ps-ghc6.1
echo debian/*.1 > debian/ghc6.manpages
- # varfile
- echo 'ghc6_arches="alpha amd64 arm hppa i386 ia64 kfreebsd-i386 m68k mips mipsel powerpc ppc64 s390 sparc"' > debian/ghc6_vars
- echo 'ghc6_lib_bdeps="ghc6 (>= $(ProjectVersion)) [$$ghc6_arches], ghc6 (<< $(ProjectVersion)+) [$$ghc6_arches]"' >> debian/ghc6_vars
- echo 'ghc6_lib_deps="ghc6 (>= $(ProjectVersion)), ghc6 (<< $(ProjectVersion)+)"' >> debian/ghc6_vars
- echo 'ghc6_app_bdeps="ghc6 [$$ghc6_arches]"' >> debian/ghc6_vars
-
# ####################
# Now all the files are sorted, create the package filelists
@@ -204,18 +192,14 @@
rm -f debian/*.install
rm -f debian/*.1
rm -f debian/ghc6.manpages
- rm -f debian/ghc6_vars
rm -f mk/build.mk
$(MAKE) -f debian/scripts.mk clean
rm -rf debian/testghc
# Hacks:
- rm -f compiler/stage2/ghc-6.8.2
rm -f libraries/editline/config.status
rm -f compiler/stage1/ghc_boot_platform.h
rm -f compiler/stage2/ghc_boot_platform.h
- rm -f compiler/stage1/ghc-inplace.o
- rm -f compiler/stage2/ghc-inplace.o
rm -f ghc/inplace-datadir/package.conf
rm -f utils/pwd/pwd utils/pwd/pwd.hi utils/pwd/pwd.o
@@ -237,28 +221,12 @@
dh_installexamples
dh_install --fail-missing
dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installcatalogs
-# dh_installpam
-# dh_installmime
-# dh_installinit
dh_installman
-# dh_installcron
-# dh_installinfo
-# dh_undocumented
dh_strip
dh_link
dh_compress -X.haddock
dh_fixperms
-# dh_perl
-# dh_python
-# dh_makeshlibs
dh_installdeb
-ifeq ($(BUILD_HADDOCK_DOCS),YES)
- echo "interest /usr/share/doc/ghc6-doc/libraries" > debian/ghc6-doc/DEBIAN/triggers
-endif
dh_shlibdeps
dh_gencontrol
dh_md5sums
@@ -276,4 +244,4 @@
binary-arch: binary-common-stamp
binary: binary-indep binary-arch
-.PHONY: build install clean binary-indep binary-arch binary-common binary
+.PHONY: build install clean binary-indep binary-arch binary-common binary patch
More information about the Pkg-haskell-commits
mailing list