tag 394305 patch usertag 393405 supplied-patch thanks Hi,
I have prepared a little patch which fixes the FTBFS. The patch is attached. Greetings Arjan
diff -u hs-plugins-0.9.10/debian/changelog hs-plugins-0.9.10/debian/changelog
--- hs-plugins-0.9.10/debian/changelog
+++ hs-plugins-0.9.10/debian/changelog
@@ -1,3 +1,15 @@
+hs-plugins (0.9.10-3.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * debian/control: also use ${haskell:Depends} for the dependency on
+ ghc6.
+ * debian/patches/30fix-for-ghc-6.6.dpatch: add -$(VERSION) to
+ -package-name $(PKG) to fix FTBFS. (Closes: 394305)
+ * debian/mk-haskell-depends: added to generate the dependencies on the
+ other libghc6-*-dev packages and the dependency on ghc6.
+
+ -- Arjan Oosting <[EMAIL PROTECTED]> Wed, 25 Oct 2006 01:29:22 +0200
+
hs-plugins (0.9.10-3.2) unstable; urgency=medium
* Non-maintainer upload.
diff -u hs-plugins-0.9.10/debian/rules hs-plugins-0.9.10/debian/rules
--- hs-plugins-0.9.10/debian/rules
+++ hs-plugins-0.9.10/debian/rules
@@ -13,14 +13,6 @@
CFLAGS += -O2
endif
-CABAL_VERSION := $(strip $(shell dpkg-query --showformat='$${Version}' -W libghc6-cabal-dev))
-SRC_EXTS_VERSION := $(strip $(shell dpkg-query --showformat='$${Version}' -W libghc6-src-exts-dev))
-
-HASKELL_DEPENDS := libghc6-src-exts-dev (>= $(SRC_EXTS_VERSION)), libghc6-src-exts-dev (<< $(shell echo '$(SRC_EXTS_VERSION)' | sed -e 's/-[^-]*$$/+/'))
-ifneq (,$(CABAL_VERSION))
-HASKELL_DEPENDS += , libghc6-cabal-dev (>= $(CABAL_VERSION)), libghc6-cabal-dev (<< $(shell echo '$(CABAL_VERSION)' | sed -e 's/-[^-]*$$/+/'))
-endif
-
VERSION = 0.9.10
config.status: configure.ac patch-stamp
@@ -79,7 +71,8 @@
dh_fixperms
dh_installdeb
dh_shlibdeps
- dh_gencontrol -- -Vhaskell:Depends="$(HASKELL_DEPENDS)"
+ debian/mk-haskell-depends
+ dh_gencontrol
dh_md5sums
dh_builddeb
diff -u hs-plugins-0.9.10/debian/control hs-plugins-0.9.10/debian/control
--- hs-plugins-0.9.10/debian/control
+++ hs-plugins-0.9.10/debian/control
@@ -8,7 +8,7 @@
Package: libghc6-plugins-dev
Section: libdevel
Architecture: i386 amd64
-Depends: ghc6 (>= 6.4.2), ghc6 (<< 6.4.2-999), ${haskell:Depends}
+Depends: ${haskell:Depends}
Description: Dynamically Loaded Haskell Modules
hs-plugins is a library for loading plugins written in Haskell into an
application at runtime. It also provides a mechanism for (re)compiling
diff -u hs-plugins-0.9.10/debian/patches/00list hs-plugins-0.9.10/debian/patches/00list
--- hs-plugins-0.9.10/debian/patches/00list
+++ hs-plugins-0.9.10/debian/patches/00list
@@ -1,0 +2 @@
+30fix-for-ghc-6.6
reverted:
--- hs-plugins-0.9.10/hs-plugins-0.9.10/debian/README.Debian
+++ hs-plugins-0.9.10.orig/hs-plugins-0.9.10/debian/README.Debian
@@ -1,11 +0,0 @@
-hs-plugins for Debian
-=====================
-
-hs-plugins documentation in HTML form can be found at:
- http://www.cse.unsw.edu.au/~dons/hs-plugins/
-
-The HTML documentation is not included in the Debian package as building it
-requires tex2page which is not available on all architectures supported by
-Debian.
-
- -- Jérémy Bobbio <[EMAIL PROTECTED]> Sat, 30 Sep 2006 13:27:10 +0200
reverted:
--- hs-plugins-0.9.10/=
+++ hs-plugins-0.9.10.orig/=
@@ -1 +0,0 @@
-HASKELL_DEPENDS=libghc6-src-exts-dev ( ), libghc6-src-exts-dev (
reverted:
--- hs-plugins-0.9.10/README.Debian
+++ hs-plugins-0.9.10.orig/README.Debian
@@ -1,11 +0,0 @@
-hs-plugins for Debian
-=====================
-
-hs-plugins documentation in HTML form can be found at:
- http://www.cse.unsw.edu.au/~dons/hs-plugins/
-
-The HTML documentation is not included in the Debian package as building it
-requires tex2page which is not available on all architectures supported by
-Debian.
-
- -- Jérémy Bobbio <[EMAIL PROTECTED]> Sat, 30 Sep 2006 13:27:10 +0200
only in patch2:
unchanged:
--- hs-plugins-0.9.10.orig/debian/mk-haskell-depends
+++ hs-plugins-0.9.10/debian/mk-haskell-depends
@@ -0,0 +1,183 @@
+#! /bin/sh
+#
+# Determine package dependencies from installed-pkg-config file
+#
+# Copyright (C) 2006 Arjan Oosting <[EMAIL PROTECTED]>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of either:
+#
+# 1) The terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# 2) BSD 3-clause license.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# * The names of contributors may not be used to endorse or promote
+# products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -e
+
+sort_uniq(){
+ {
+ for i in "$@" ; do
+ echo $i
+ done
+ } | sort -u | tr "\n" " "
+}
+
+dependency(){
+ deb=$1
+ version=`dpkg-query --showformat='${Version}' -W $deb`
+ next_upstream_version=`echo $version | sed -e 's/-[^-]*$/+/'`
+ echo "$deb (>= $version), $deb (<< $next_upstream_version)"
+}
+
+providing_package_for_ghc6(){
+ dep=$1
+ dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ for dir in $dirs ; do
+ if [ -e "$dir/lib$lib.a" ] ; then
+ deb=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+ continue
+ fi
+ done
+ echo $deb
+}
+
+providing_package_for_ghc6_prof(){
+ dep=$1
+ dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ for dir in $dirs ; do
+ if [ -e "$dir/lib$lib_p.a" ] ; then
+ deb=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+ continue
+ fi
+ done
+ echo $deb
+}
+
+
+depends_for_ghc6(){
+ config=$1
+ cabal_depends=`grep-dctrl -n -i -s Depends "" $config | tr "," " "`
+
+ for dep in $cabal_depends ; do
+ debs="$debs `providing_package_for_ghc6 $dep`"
+ done
+
+ for deb in `sort_uniq $debs` ; do
+ deps="$deps, `dependency $deb`"
+ done
+
+ echo $deps | sed -e 's/^,[ ]*//'
+}
+
+depends_for_ghc6_prof(){
+ config=$1
+ cabal_depends=`grep-dctrl -n -i -s Depends "" $config | tr "," " "`
+
+ for dep in $cabal_depends ; do
+ debs="$debs `providing_package_for_ghc6_prof $dep`"
+ done
+
+ for deb in `sort_uniq $debs` ; do
+ deps="$deps, `dependency $deb`"
+ done
+
+ echo $deps | sed -e 's/^,[ ]*//'
+}
+
+find_config_for_ghc6(){
+ pkg=$1
+ case "$pkg" in
+ libghc6-*-prof)
+ pkg=`echo $pkg | sed -e 's/-prof$/-dev$/'`
+ ;;
+ *)
+ ;;
+ esac
+ for f in debian/$pkg/usr/lib/haskell-packages/ghc6/lib/*/installed-pkg-config ; do
+ if [ -f "$f" ] ; then
+ echo $f
+ break
+ fi
+ done
+}
+
+
+if [ `which grep-dctrl > /dev/null` ] ; then
+ echo "grep-dctrl is missing" >&2
+ exit 1
+fi
+
+for pkg in `dh_listpackages [EMAIL PROTECTED]; do
+ sfile=debian/$pkg.substvars
+ touch $sfile
+
+ case "$pkg" in
+ libghc6-*-prof)
+ grep -v ^haskell:Depends $sfile > $sfile.tmp || true
+ config=`find_config_for_ghc6 $pkg`
+ if [ -f "$config" ] ; then
+ echo "haskell:Depends=`depends_for_ghc6_prof $config`" >> $sfile.tmp
+ else
+ echo "haskell:Depends=`dependency ghc6-prof`" >> $sfile.tmp
+ fi
+ mv $sfile.tmp $sfile
+ ;;
+
+ libghc6-*-dev)
+ grep -v ^haskell:Depends $sfile > $sfile.tmp || true
+ config=`find_config_for_ghc6 $pkg`
+ if [ -f "$config" ] ; then
+ echo "haskell:Depends=`depends_for_ghc6 $config`" >> $sfile.tmp
+ else
+ echo "haskell:Depends=`dependency ghc6`" >> $sfile.tmp
+ fi
+ mv $sfile.tmp $sfile
+ ;;
+
+ *)
+ ;;
+ esac
+done
+
only in patch2:
unchanged:
--- hs-plugins-0.9.10.orig/debian/patches/30fix-for-ghc-6.6.dpatch
+++ hs-plugins-0.9.10/debian/patches/30fix-for-ghc-6.6.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_fix-for-ghc-6.6.patch.dpatch by Arjan Oosting <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
[EMAIL PROTECTED]@
+diff -urNad hs-plugins-0.9.10~/Makefile hs-plugins-0.9.10/Makefile
+--- hs-plugins-0.9.10~/Makefile 2005-07-06 07:39:03.000000000 +0200
++++ hs-plugins-0.9.10/Makefile 2006-10-25 01:34:20.000000000 +0200
+@@ -77,6 +77,7 @@
+ find examples -name '*.a' -exec rm {} \;
+ find examples -name '*~' -exec rm {} \;
+ find examples -name 'a.out' -exec rm {} \;
++ find examples -name 'Main' -exec rm {} \;
+ find examples -name '*.hi' -exec rm {} \;
+ find examples -name '*.o' -exec rm {} \;
+ find examples -name '*.core' -exec rm {} \;
+diff -urNad hs-plugins-0.9.10~/src/build.mk hs-plugins-0.9.10/src/build.mk
+--- hs-plugins-0.9.10~/src/build.mk 2006-10-25 01:30:59.000000000 +0200
++++ hs-plugins-0.9.10/src/build.mk 2006-10-25 01:33:33.000000000 +0200
+@@ -30,7 +30,7 @@
+ GHCI_LIBRARY = $(patsubst lib%.a,%.o,$(LIBRARY))
+ OBJS = $(UPKG).o $(UPKG)/*.o
+
+-HC_OPTS += -package-name $(PKG)
++HC_OPTS += -package-name $(PKG)-$(VERSION)
+ HC_OPTS += -O -Wall -Werror -fno-warn-missing-signatures $(GHC_EXTRA_OPTS)
+ HC_OPTS += -threaded
+
signature.asc
Description: Dit berichtdeel is digitaal ondertekend

