diff --git a/Cabal.cabal b/Cabal.cabal
--- a/Cabal.cabal
+++ b/Cabal.cabal
@@ -1,6 +1,6 @@
 cabal-version: >=1.10
 name:          Cabal
-version:       3.0.1.0
+version:       3.0.2.0
 copyright:     2003-2019, Cabal Development Team (see AUTHORS file)
 license:       BSD3
 license-file:  LICENSE
diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,9 @@
+# 3.0.2.0 [Herbert Valerio Riedel](mailto:hvr@gnu.org) April 2020
+  * Disallow spaces around colon `:` in Dependency `build-depends` syntax
+    ([#6538](https://github.com/haskell/cabal/pull/6538)).
+  * Make `configure` accept any `pkg-config --modversion` output
+    ([#6541](https://github.com/haskell/cabal/pull/6541)).
+
 # 3.0.1.0 [Herbert Valerio Riedel](mailto:hvr@gnu.org) April 2020
   * Add GHC-8.8 flags to `normaliseGhcFlags`
     ([#6379](https://github.com/haskell/cabal/pull/6379)).
diff --git a/Distribution/Simple/Configure.hs b/Distribution/Simple/Configure.hs
--- a/Distribution/Simple/Configure.hs
+++ b/Distribution/Simple/Configure.hs
@@ -79,6 +79,7 @@
 import Distribution.Simple.LocalBuildInfo
 import Distribution.Types.ExeDependency
 import Distribution.Types.LegacyExeDependency
+import Distribution.Types.PkgconfigVersion
 import Distribution.Types.PkgconfigDependency
 import Distribution.Types.PkgconfigVersionRange
 import Distribution.Types.LocalBuildInfo
@@ -118,7 +119,7 @@
 import qualified Data.ByteString            as BS
 import qualified Data.ByteString.Lazy.Char8 as BLC8
 import Data.List
-    ( (\\), partition, inits, stripPrefix, intersect )
+    ( (\\), partition, inits, stripPrefix, intersect, dropWhileEnd )
 import Data.Either
     ( partitionEithers )
 import qualified Data.Map as Map
@@ -1612,13 +1613,11 @@
       version <- pkgconfig ["--modversion", pkg]
                  `catchIO`   (\_ -> die' verbosity notFound)
                  `catchExit` (\_ -> die' verbosity notFound)
-      case simpleParsec version of
-        Nothing -> die' verbosity
-                   "parsing output of pkg-config --modversion failed"
-        Just v | not (withinPkgconfigVersionRange v range) ->
-                 die' verbosity (badVersion v)
-               | otherwise ->
-                 info verbosity (depSatisfied v)
+      let trim = dropWhile isSpace . dropWhileEnd isSpace
+      let v = PkgconfigVersion (toUTF8BS $ trim version)
+      if not (withinPkgconfigVersionRange v range)
+      then die' verbosity (badVersion v)
+      else info verbosity (depSatisfied v)
       where
         notFound     = "The pkg-config package '" ++ pkg ++ "'"
                     ++ versionRequirement
diff --git a/Distribution/Types/Dependency.hs b/Distribution/Types/Dependency.hs
--- a/Distribution/Types/Dependency.hs
+++ b/Distribution/Types/Dependency.hs
@@ -57,9 +57,9 @@
 
 instance Pretty Dependency where
     pretty (Dependency name ver sublibs) = pretty name
-                                       <+> optionalMonoid
-                                             (sublibs /= Set.singleton LMainLibName)
-                                             (PP.colon <+> PP.braces prettySublibs)
+                                       <<>> optionalMonoid
+                                            (sublibs /= Set.singleton LMainLibName)
+                                            (PP.colon <<>> PP.braces prettySublibs)
                                        <+> pretty ver
       where
         optionalMonoid True x = x
@@ -81,12 +81,40 @@
   else
     expr
 
+-- |
+--
+-- >>> simpleParsec "mylib:sub" :: Maybe Dependency
+-- Just (Dependency (PackageName "mylib") AnyVersion (fromList [LSubLibName (UnqualComponentName "sub")]))
+--
+-- >>> simpleParsec "mylib:{sub1,sub2}" :: Maybe Dependency
+-- Just (Dependency (PackageName "mylib") AnyVersion (fromList [LSubLibName (UnqualComponentName "sub1"),LSubLibName (UnqualComponentName "sub2")]))
+--
+-- >>> simpleParsec "mylib:{ sub1 , sub2 }" :: Maybe Dependency
+-- Just (Dependency (PackageName "mylib") AnyVersion (fromList [LSubLibName (UnqualComponentName "sub1"),LSubLibName (UnqualComponentName "sub2")]))
+--
+-- >>> simpleParsec "mylib:{ sub1 , sub2 } ^>= 42" :: Maybe Dependency
+-- Just (Dependency (PackageName "mylib") (MajorBoundVersion (mkVersion [42])) (fromList [LSubLibName (UnqualComponentName "sub1"),LSubLibName (UnqualComponentName "sub2")]))
+--
+-- Spaces around colon are not allowed:
+--
+-- >>> simpleParsec "mylib: sub" :: Maybe Dependency
+-- Nothing
+--
+-- >>> simpleParsec "mylib :sub" :: Maybe Dependency
+-- Nothing
+--
+-- >>> simpleParsec "mylib: {sub1,sub2}" :: Maybe Dependency
+-- Nothing
+--
+-- >>> simpleParsec "mylib :{sub1,sub2}" :: Maybe Dependency
+-- Nothing
+--
 instance Parsec Dependency where
     parsec = do
-        name <- lexemeParsec
+        name <- parsec
 
         libs <- option [LMainLibName]
-              $ (char ':' *> spaces *>)
+              $ (char ':' *>)
               $ versionGuardMultilibs
               $ pure <$> parseLib name <|> parseMultipleLibs name
 
diff --git a/Distribution/Types/PkgconfigVersion.hs b/Distribution/Types/PkgconfigVersion.hs
--- a/Distribution/Types/PkgconfigVersion.hs
+++ b/Distribution/Types/PkgconfigVersion.hs
@@ -39,6 +39,14 @@
 instance Pretty PkgconfigVersion where
     pretty (PkgconfigVersion bs) = PP.text (BS8.unpack bs)
 
+-- |
+--
+-- >>> simpleParsec "1.0.2n" :: Maybe PkgconfigVersion
+-- Just (PkgconfigVersion "1.0.2n")
+--
+-- >>> simpleParsec "0.3.5+ds" :: Maybe PkgconfigVersion
+-- Nothing
+--
 instance Parsec PkgconfigVersion where
     parsec = PkgconfigVersion . BS8.pack <$> P.munch1 predicate where
         predicate c = isAsciiAlphaNum c || c == '.' || c == '-'
diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -13,7 +13,7 @@
 sys.path.insert(0, os.path.abspath('.'))
 import cabaldomain
 
-version = "3.0.1.0"
+version = "3.0.2.0"
 
 extensions = ['sphinx.ext.extlinks', 'sphinx.ext.todo']
 
diff --git a/tests/ParserTests/regressions/issue-5846.format b/tests/ParserTests/regressions/issue-5846.format
--- a/tests/ParserTests/regressions/issue-5846.format
+++ b/tests/ParserTests/regressions/issue-5846.format
@@ -5,7 +5,7 @@
 library
     default-language: Haskell2010
     build-depends:
-        lib1 : {a, b} -any,
-        lib2 : {c} -any,
-        lib3 : {d} >=1,
-        lib4 : {a, b} >=1
+        lib1:{a, b} -any,
+        lib2:{c} -any,
+        lib3:{d} >=1,
+        lib4:{a, b} >=1
