.Creating a Port for a Hackage-hosted Haskell Application
[example]
====
-When preparing a Haskell Cabal port, the package:devel/hs-cabal-install[] program is required, so make sure it is installed beforehand.
+When preparing a Haskell Cabal port, the package:devel/hs-cabal-install[] and package:ports-mgmt/hs-cabal2tuple[] programs are required, so make sure they are installed beforehand.
First we need to define common ports variables that allows cabal-install to fetch the package distribution file:
[.programlisting]
@@ -982,7 +982,7 @@
.include <bsd.port.mk>
....
-This minimal Makefile allows us to fetch the distribution file:
+This minimal Makefile fetches the distribution file with the `cabal-extract` helper target:
[source,shell]
....
@@ -995,49 +995,33 @@
Unpacking to ShellCheck-0.6.0/
....
-Now we have ShellCheck.cabal package description file, which allows us to fetch all package's dependencies, including transitive ones:
+Now that we have ShellCheck.cabal package description file under `${WRKSRC}`, we can use `cabal-configure` to generate the build plan:
[source,shell]
....
-% make cabal-extract-deps
+% make cabal-configure
[...]
Resolving dependencies...
-Downloading base-orphans-0.8.2
-Downloaded base-orphans-0.8.2
-Downloading primitive-0.7.0.0
-Starting base-orphans-0.8.2 (lib)
-Building base-orphans-0.8.2 (lib)
-Downloaded primitive-0.7.0.0
-Downloading dlist-0.8.0.7
+Build profile: -w ghc-8.10.7 -O1
+In order, the following would be built (use -v for more details):