pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/haskell Handle the case where *.cabal lacks the fie...
details: https://anonhg.NetBSD.org/pkgsrc/rev/438eabc7f31a
branches: trunk
changeset: 373135:438eabc7f31a
user: pho <pho%pkgsrc.org@localhost>
date: Mon Feb 07 02:39:41 2022 +0000
description:
Handle the case where *.cabal lacks the field "Build-Type"
diffstat:
mk/haskell/build-type.awk | 7 ++++++-
mk/haskell/gen-setup.sh | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 8695cc091a40 -r 438eabc7f31a mk/haskell/build-type.awk
--- a/mk/haskell/build-type.awk Mon Feb 07 02:26:09 2022 +0000
+++ b/mk/haskell/build-type.awk Mon Feb 07 02:39:41 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: build-type.awk,v 1.1 2021/05/01 15:06:26 pho Exp $
+# $NetBSD: build-type.awk,v 1.2 2022/02/07 02:39:41 pho Exp $
#
# Extract the field "Build-Type" out of a Cabal package description.
#
@@ -21,3 +21,8 @@
print tolower($1);
exit
}
+
+END {
+ # The package description didn't have Build-Type. Default to "Simple".
+ print "simple"
+}
diff -r 8695cc091a40 -r 438eabc7f31a mk/haskell/gen-setup.sh
--- a/mk/haskell/gen-setup.sh Mon Feb 07 02:26:09 2022 +0000
+++ b/mk/haskell/gen-setup.sh Mon Feb 07 02:39:41 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gen-setup.sh,v 1.1 2021/05/01 15:06:26 pho Exp $
+# $NetBSD: gen-setup.sh,v 1.2 2022/02/07 02:39:41 pho Exp $
#
# Generate the standard Setup.hs script for a given Cabal package.
#
@@ -19,6 +19,6 @@
echo 'main = defaultMain'
;;
*)
- echo >&2 "Unknown Build-Type: $1"
+ echo >&2 "[mk/haskell/gen-setup.sh] Unknown Build-Type: $1"
exit 1
esac
Home |
Main Index |
Thread Index |
Old Index