pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/haskell



Module Name:    pkgsrc
Committed By:   pho
Date:           Mon Feb  7 02:39:41 UTC 2022

Modified Files:
        pkgsrc/mk/haskell: build-type.awk gen-setup.sh

Log Message:
Handle the case where *.cabal lacks the field "Build-Type"


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/mk/haskell/build-type.awk \
    pkgsrc/mk/haskell/gen-setup.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/haskell/build-type.awk
diff -u pkgsrc/mk/haskell/build-type.awk:1.1 pkgsrc/mk/haskell/build-type.awk:1.2
--- pkgsrc/mk/haskell/build-type.awk:1.1        Sat May  1 15:06:26 2021
+++ pkgsrc/mk/haskell/build-type.awk    Mon Feb  7 02:39:41 2022
@@ -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 @@ buildTypeLine {
     print tolower($1);
     exit
 }
+
+END {
+    # The package description didn't have Build-Type. Default to "Simple".
+    print "simple"
+}
Index: pkgsrc/mk/haskell/gen-setup.sh
diff -u pkgsrc/mk/haskell/gen-setup.sh:1.1 pkgsrc/mk/haskell/gen-setup.sh:1.2
--- pkgsrc/mk/haskell/gen-setup.sh:1.1  Sat May  1 15:06:26 2021
+++ pkgsrc/mk/haskell/gen-setup.sh      Mon Feb  7 02:39:41 2022
@@ -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 @@ case "$1" in
         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