[Git][haskell-team/haskell-devscripts][master] 2 commits: Prefer Perl module for some calls in the CDBS module hlibrary.mk.

Felix Lechner (@lechner) gitlab at salsa.debian.org
Fri Apr 8 20:00:45 BST 2022



Felix Lechner pushed to branch master at Debian Haskell Group / haskell-devscripts


Commits:
731eaab6 by Felix Lechner at 2022-04-08T10:55:01-07:00
Prefer Perl module for some calls in the CDBS module hlibrary.mk.

- - - - -
d533666c by Felix Lechner at 2022-04-08T10:55:01-07:00
Restrict the functionality of the shell library to uses actually found in the archive.

The dh-haskell build system began to use the Perl library with version 0.6.2.
So do the dh_* scripts in these sources.

That should leave the CDBS module hlibrary.mk as the sole user, except there is
also a spurious use in pandoc-citeproc-preamble, as noted in the shell library.

All other functions are now inaccessible from the shell library. That way, the
Perl module can be cleaned up in the near future.

- - - - -


3 changed files:

- Dh_Haskell.sh
- debian/control
- hlibrary.mk


Changes:

=====================================
Dh_Haskell.sh
=====================================
@@ -23,174 +23,13 @@ recipe(){
         || exit
 }
 
-run () {
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-cpu(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-os(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-ghcjs_version(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-ghcjs_ghc_version(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_prefix(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_hc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_ext(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-packages_hc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_libdir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_libdir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_pkgdir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_pkgdir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_prefix(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_haddock(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_docdir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_htmldir(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-hc_hoogle(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-strip_hash(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-sort_uniq(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-dependency(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-ghc_pkg_field(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-providing_package_for_ghc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-providing_package_for_ghc_prof(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-cabal_package_ids(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-cabal_depends(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
+# sole use in
+# https://git.spwhitton.name/pandoc-citeproc-preamble/tree/debian/rules#n18
 hashed_dependency(){
     recipe "${FUNCNAME[0]}" "$@"
 }
 
-depends_for_ghc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-depends_for_ghc_prof(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-usable_ghc_pkg() {
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-tmp_package_db() {
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-provides_for_ghc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-provides_for_ghc_prof(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-package_id_to_virtual_package(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-depends_for_hugs(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-find_config_for_ghc(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-clean_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-make_setup_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-configure_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-build_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-check_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
-haddock_recipe(){
-    recipe "${FUNCNAME[0]}" "$@"
-}
-
+# the ones below are only used in the CDBS module hlibrary.mk
 extra_depends_recipe(){
     recipe "${FUNCNAME[0]}" "$@"
 }


=====================================
debian/control
=====================================
@@ -32,6 +32,7 @@ Depends: dctrl-tools
   , ${misc:Depends}
   , ${perl:Depends}
 Breaks: haskell-devscripts (<= 0.10.2.3)
+ , dh-haskell (<= 0.6.1)
 Replaces: haskell-devscripts (<= 0.10.2.3)
 Suggests: haskell-devscripts
 Description: Tools to help Debian developers build Haskell packages


=====================================
hlibrary.mk
=====================================
@@ -131,28 +131,23 @@ export MAKEFILE
 export GHC_HAS_SMP 
 
 clean::
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
-	clean_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'clean_recipe'
 
 $(DEB_SETUP_BIN_NAME):
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
-	make_setup_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'make_setup_recipe'
 
 configure-ghc-stamp: $(DEB_SETUP_BIN_NAME)
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
-	configure_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'configure_recipe'
 	touch $@
 
 build-ghc-stamp: configure-ghc-stamp
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
-	build_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'build_recipe'
 	touch $@
 
 ifeq ($(DEB_ENABLE_TESTS),yes)
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 check-ghc-stamp: build-ghc-stamp
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
-	check_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'check_recipe'
 	touch $@
 else
 check-ghc-stamp: build-ghc-stamp
@@ -170,8 +165,7 @@ build/libghc-$(CABAL_PACKAGE)-prof build/libghc-$(CABAL_PACKAGE)-dev:: build-ghc
 build/libghcjs-$(CABAL_PACKAGE)-prof build/libghcjs-$(CABAL_PACKAGE)-dev:: build-ghc-stamp check-ghc-stamp
 
 build-haddock-stamp:
-	. /usr/share/haskell-devscripts/Dh_Haskell.sh &&\
-	haddock_recipe
+	perl -d:Confess -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ -E 'haddock_recipe'
 	touch build-haddock-stamp
 
 build/libghc-$(CABAL_PACKAGE)-doc:: configure-ghc-stamp build-haddock-stamp



View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/9389c725ddfddbd35d0ec182a9de4d8a5d28fd80...d533666c789e3b2ee02247b2ba10e2cc8fba77c6

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/compare/9389c725ddfddbd35d0ec182a9de4d8a5d28fd80...d533666c789e3b2ee02247b2ba10e2cc8fba77c6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220408/a09f1a6f/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list