pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/cabal-install Fix the installation path for man p...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c6be488f9ebc
branches:  trunk
changeset: 440612:c6be488f9ebc
user:      pho <pho%pkgsrc.org@localhost>
date:      Tue Oct 13 12:08:10 2020 +0000

description:
Fix the installation path for man pages

diffstat:

 misc/cabal-install/Makefile               |   9 ++++++++-
 misc/cabal-install/distinfo               |   3 ++-
 misc/cabal-install/patches/patch-Setup.hs |  29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)

diffs (72 lines):

diff -r 9f9e84230437 -r c6be488f9ebc misc/cabal-install/Makefile
--- a/misc/cabal-install/Makefile       Tue Oct 13 11:17:14 2020 +0000
+++ b/misc/cabal-install/Makefile       Tue Oct 13 12:08:10 2020 +0000
@@ -1,13 +1,20 @@
-# $NetBSD: Makefile,v 1.1 2020/01/19 07:51:26 pho Exp $
+# $NetBSD: Makefile,v 1.2 2020/10/13 12:08:10 pho Exp $
 
 DISTNAME=      cabal-install-3.0.0.0
 PKGNAME=       ${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    misc
 
 MAINTAINER=    pho%cielonegro.org@localhost
 COMMENT=       Command-line interface for Cabal and Hackage
 LICENSE=       modified-bsd
 
+SUBST_CLASSES+=                mandir
+SUBST_STAGE.mandir=    pre-configure
+SUBST_MESSAGE.mandir=  Fixing man page installation path
+SUBST_FILES.mandir+=   Setup.hs
+SUBST_VARS.mandir+=    PKGMANDIR
+
 .include "../../devel/hs-async/buildlink3.mk"
 .include "../../converters/hs-base16-bytestring/buildlink3.mk"
 .include "../../security/hs-cryptohash-sha256/buildlink3.mk"
diff -r 9f9e84230437 -r c6be488f9ebc misc/cabal-install/distinfo
--- a/misc/cabal-install/distinfo       Tue Oct 13 11:17:14 2020 +0000
+++ b/misc/cabal-install/distinfo       Tue Oct 13 12:08:10 2020 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.1 2020/01/19 07:51:26 pho Exp $
+$NetBSD: distinfo,v 1.2 2020/10/13 12:08:10 pho Exp $
 
 SHA1 (cabal-install-3.0.0.0.tar.gz) = 2fe37726db987af6c23b933bb0e9b81446061449
 RMD160 (cabal-install-3.0.0.0.tar.gz) = 7217d6334bdf98f18341fb0aff8208b20717f695
 SHA512 (cabal-install-3.0.0.0.tar.gz) = 0b15313fc11bc6b6018e01b6a3a65242306977c16ce9333ea1191c1ce0020b180451235a7a65b47bc01791e05d1b246bf9d573fc7e981a46fcfc7da0fed04cca
 Size (cabal-install-3.0.0.0.tar.gz) = 654045 bytes
 SHA1 (patch-Distribution_Client_Security_HTTP.hs) = ba58ab3c0481b2b269e401121f2dc6f2b2bcf503
+SHA1 (patch-Setup.hs) = 0785a7a574d17447f8109263bbf52acec909fef6
 SHA1 (patch-cabal-install.cabal) = 33633ae6970f52fcdf2a842bdc98f641c308957b
diff -r 9f9e84230437 -r c6be488f9ebc misc/cabal-install/patches/patch-Setup.hs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/cabal-install/patches/patch-Setup.hs Tue Oct 13 12:08:10 2020 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-Setup.hs,v 1.1 2020/10/13 12:08:10 pho Exp $
+
+Install man pages under PKGMANDIR. It's unfortunate that ./Setup has
+no options for changing the directory. The module
+Distribution.Simple.InstallDirs is a part of GHC, and we also don't
+want to change its default mandir because GHC isn't meant to be used
+solely within pkgsrc.
+
+Be careful not to modify this patch after running "bmake
+configure". It will break the patch.
+
+--- Setup.hs.orig      2020-10-13 11:50:11.049290780 +0000
++++ Setup.hs
+@@ -5,7 +5,7 @@ import Distribution.Simple ( defaultMain
+                            , postCopy
+                            , postInst
+                            )
+-import Distribution.Simple.InstallDirs ( mandir
++import Distribution.Simple.InstallDirs ( prefix
+                                        , CopyDest (NoCopyDest)
+                                        )
+ import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo(..)
+@@ -59,5 +59,5 @@ buildManpage lbi verbosity = do
+ 
+ installManpage :: PackageDescription -> LocalBuildInfo -> Verbosity -> CopyDest -> IO ()
+ installManpage pkg lbi verbosity copy = do
+-  let destDir = mandir (absoluteInstallDirs pkg lbi copy) </> "man1"
++  let destDir = prefix (absoluteInstallDirs pkg lbi copy) </> "@PKGMANDIR@" </> "man1"
+   installOrdinaryFiles verbosity destDir [(buildDir lbi </> "cabal", "cabal.1")]



Home | Main Index | Thread Index | Old Index