summaryrefslogtreecommitdiff
path: root/mk/haskell.mk
AgeCommit message (Collapse)AuthorFilesLines
2020-07-01mk/haskell.mk: clean up _VARGROUPS section and unused variablesrillig1-10/+22
2020-07-01mk/haskell.mk: remove variable HASKELL_COMPILER, clean up documentationrillig1-126/+37
There was only a single valid value for HASKELL_COMPILER, therefore the variable was useless. It only made the implementation more complicated than necessary.
2020-06-29mk/haskell.mk: regenerate PLIST if it is outdatedrillig1-9/+9
Now that haskell.mk distinguishes between plain and outdated PLIST files, this is possible again. When haskell.mk knew only missing and outdated, this was still ambiguous and therefore skipped.
2020-06-29mk/haskell.mk: fix PLIST status detectionrillig1-4/+3
As seen in devel/hs-hashable/PLIST r1.1, which listed only the package-description but not the package-id.
2020-06-29mk/haskell.mk: only add PLIST_SUBST and PRINT_PLIST_AWK if usefulrillig1-13/+15
The PLIST_SUBST and PLIST_PRINT_AWK definitions for Haskell library packages are only useful if the package-description file exists. If that file is absent though, these are skipped. The test whether the file exists is made as late as possible since that file does not yet exist at the point where the package Makefile is parsed. This also affects the show-all-haskell target, which only shows these values after the install phase. This is not perfect but good enough for practical cases.
2020-06-29mk/haskell.mk: fix PLIST status detectionrillig1-1/+3
Before, running "HS_UPDATE_PLIST=yes bmake update" in wm/xmonad did not apply the proper substitutions to the generated PLIST file since the PLIST file was created empty during the GENERATE_PLIST command, and that empty PLIST file changed the status to "plain" instead of "missing". Because of that, the HS_INTF and related placeholders were not defined. The 2 conditions for the status "missing" had to be written in separate .if clauses because of a bug in bmake that was introduced in 2015 and will be fixed with the next bmake update. For further details, see src/usr.bin/make/unit-tests/cond-short.mk.
2020-06-21mk/haskell.mk: fix PLIST generation for Haskell packagesrillig1-20/+30
The package textproc/hs-cgrep does not install a Haskell library. This was unexpected to mk/haskell.mk, which generated an obviously wrong PLIST file for that package, and for 3 other packages. Noticed by wiz.
2020-05-10mk/haskell.mk: allow to generate PLIST filesrillig1-17/+64
Since GHC 7.10 or 7.8, the Haskell packages are installed in directories whose name contains the package hash. This made it harder to predict the exact pathname. Havin the exact pathnames in the PLIST file is the ideal, it also helps to record the general structure of the installed files to see whether some file unexpectedly appear or disappear. To enable this for Haskell packages, the various base directories are replaced with placeholders during print-PLIST. These placeholders are translated back to their respective paths when the +PLIST is generated from the PLIST in the package directory. Except for 2 packages, all Haskell packages in main pkgsrc had their package PLIST file removed. To help in adding them back, the pkgsrc developer can set HS_UPDATE_PLIST=yes in mk.conf, which will generate the PLIST directly into ${PKGDIR}/PLIST upon installation. Most packages in pkgsrc-wip still have their old PLIST, and these are migrated automatically as well.
2020-03-30Missed a spot -- set MAKE_ENV during haddock build too.riastradh1-1/+2
2020-03-30In Haskell packages, set MAKE_ENV while running ./Setup build.riastradh1-1/+2
2020-03-30New package variable HASKELL_PKG_NAME.riastradh1-2/+4
Used to form _HASKELL_PKG_DESCR_DIR. Defaults to DISTNAME, but for some packages (hledger, incoming), the same DISTNAME is shared by multiple packages. So let the package define it explicitly if need be.
2020-03-24Don't use normal memory size limits with GHC for module builds.joerg1-7/+10
2020-01-20Build ${WRKSRC}/Setup in the do-configure phasepho1-10/+6
Doing it in pre-configure makes it unable to do SUBST in that phase.
2020-01-19Use _MAKE_JOBS_N defined in build/build.mkpho1-14/+3
2020-01-18Configurable optimization level and compilation parallelismpho1-4/+28
2020-01-11Switch from ghc7 to ghc88pho1-2/+2
2020-01-09Use hashed package keys for (un)installing Cabal packagespho1-6/+14
Starting from somewhere around GHC 7.8, Cabal installs packages with a hashed package key instead of just "{NAME}-{VERSION}". In other words, the pair of the plain package name and the version is no longer unique in the package DB, and using it for uninstallation may also remove packages that we didn't mean to remove. This is paricularly problematic because GHC comes with several bundled Cabal packages. Installing and uninstalling a package with the same name could break GHC itself, if the uninstallation is performed without hashed keys.
2020-01-02Be explicit about shared librariespho1-2/+6
Recent versions of Cabal appears to build shared libraries by default unless --disable-shared is explicitly given.
2020-01-02Pass -v to ./Setup when PKG_VERBOSE is definedpho1-7/+7
2020-01-01Suppress an error occurs when buildlink is not presentpho1-2/+2
2020-01-01Remove unused variablespho1-9/+4
2019-12-31For "Setup" try dynamic linkage firstpho1-9/+11
2019-12-29Support GHC 7.10.x and laterpho1-42/+38
2016-04-10Remove support for USE_DESTDIR=no.joerg1-12/+5
2015-02-17rpath flag and directory are one option, don't pass the path withoutjoerg1-3/+2
-Wl prefix.
2014-04-18Some improvements and changes for Haskell Cabal support.obache1-8/+48
* HASKELL_ENABLE_LIBRARY_PROFILING and HASKELL_ENABLE_HADDOCK_DOCUMENTATION are "User-settable variables", not "Package-settable variables". * Change to HASKELL_ENABLE_HADDOCK_DOCUMENTATION=yes by default. * Add HASKELL_ENABLE_SHARED_LIBRARY("yes" by default), to enable shlib support. * Add support for dynamically conditional PLIST entries handling for HASKELL_ENABLE_SHARED_LIBRARY and HASKELL_ENABLE_LIBRARY_PROFILING. discussed with pho@ and szptvlfn@.
2014-02-05add Haskell Cabal support files.obache1-0/+238