diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index a85a7b62529b..d04d6f5ed3fe 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -1,294 +1,310 @@ # Provide support for building Haskell packages using Cabal. # # Feature: cabal # Usage: USES=cabal or USES=cabal:ARGS # Valid ARGS: hpack, nodefault # # hpack: The port doesn't have a .cabal file and needs devel/hs-hpack to # generate it from package.yaml file # nodefault: Do not fetch the default distribution file from Hackage. If # USE_GITHUB or USE_GITLAB is specified in the port, this argument # is implied. # # Variables, which can be set by the port: # # USE_CABAL List of Haskell packages required to build a port. # Should be listed along with version, like profunctors-5.3 # Package revision can be specified too with # usual "_" syntax: invariant-0.5.1_1 # When creating a new port, the initial list can be built # using make-use-cabal auxiliary target. # # CABAL_FLAGS List of Cabal flags to be passed verbatim into --flags # argument of cabal-install utility. Used for both # cabal configure and cabal build. # # EXECUTABLES List of executable Cabal targets to be built and installed. # default: ${PORTNAME} # # opt_USE_CABAL Variant of USE_CABAL to be used with options framework. # opt_CABAL_FLAGS Variant of CABAL_FLAGS to be used with options framework. # Note that it works a bit differently from CABAL_FLAGS: # it appends "${opt_CABAL_FLAGS}" when the option is enabled # and "-${opt_CABAL_FLAGS}" otherwise. # opt_EXECUTABLES Variant of EXECUTABLES to be used with options framework. # +# CABAL_WRAPPER_SCRIPTS A subset of ${EXECUTABLES} containing Haskell +# programs to be wrapped into a shell script that sets +# *_datadir environment variables before running the program. +# This is needed for Haskell programs that install their +# data files under share/ directory. +# # FOO_DATADIR_VARS Additional environment vars to add to FOO executable's # wrapper script. # # CABAL_PROJECT Sets how to treat existing cabal.project file. Possible # values are "remove" and "append". # # SKIP_CABAL_PLIST Set to "yes" to prevent Haskell executables from being # added to the pkg-plist automatically. # # MAINTAINER: haskell@FreeBSD.org .if !defined(_INCLUDE_USES_CABAL_MK) _INCLUDE_USES_CABAL_MK= yes _valid_ARGS= hpack nodefault _cabal_project_valid_VALUES= append remove . for arg in ${cabal_ARGS} . if !${_valid_ARGS:M${arg}} IGNORE= USES=cabal: invalid arguments: ${arg} . endif . endfor . if defined(CABAL_PROJECT) && !${_cabal_project_valid_VALUES:M${CABAL_PROJECT}} IGNORE= CABAL_PROJECT: invalid value: ${CABAL_PROJECT} . endif . if ${ARCH} == i386 && defined(USE_CABAL) && ${USE_CABAL:Mbasement-0.0.14} # Upstream issue: https://github.com/haskell-foundation/foundation/issues/565 BROKEN= basement-0.0.14 package doesn't compile on i386 . endif PKGNAMEPREFIX?= hs- EXECUTABLES?= ${PORTNAME} CABAL_CMD?= cabal CABAL_PORT= devel/hs-cabal-install CABAL_HOME= ${WRKDIR}/cabal-home CABAL_LIBEXEC= libexec/cabal CABAL_EXTRACT_SUFX= .tar.gz CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} CABAL_DEPSDIR= ${WRKSRC}/${CABAL_DEPS_SUBDIR} CABAL_DEPS_SUBDIR= _cabal_deps # A special cookie used to signify that the user is a maintainer updating the port # using cabal-* targets. The presense of this cookie disables cabal-post-patch. CABAL_COOKIE= ${WRKDIR}/.cabal_update_done.${PORTNAME}.${PREFIX:S/\//_/g} HPACK_CMD?= hpack _CABAL2TUPLE_CMD= cabal2tuple . if defined(BUILD_DEPENDS) && ${BUILD_DEPENDS:Mghc?*\:lang/ghc?*} CABAL_WITH_ARGS= --with-compiler=${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} \ --with-hsc2hs=${LOCALBASE}/bin/hsc2hs-${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} . else BUILD_DEPENDS+= ghc:lang/ghc . endif . if "${PORTNAME}" != "cabal-install" BUILD_DEPENDS+= cabal:${CABAL_PORT} . endif . if ${cabal_ARGS:Mhpack} EXTRACT_DEPENDS+= hpack:devel/hs-hpack . endif # Inherited via lang/ghc we need to depend on libffi.so and libgmp.so (stage q/a) LIB_DEPENDS+= libgmp.so:math/gmp \ libffi.so:devel/libffi DIST_SUBDIR?= cabal . if !defined(USE_GITHUB) && !defined(USE_GITLAB) && !${cabal_ARGS:Mnodefault} _hackage_is_default= yes . else _hackage_is_default= no . endif . if ${_hackage_is_default} == yes MASTER_SITES= https://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ \ http://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ DISTFILES+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} . endif _USES_extract= 701:cabal-post-extract _USES_patch= 701:cabal-post-patch _USES_configure=301:cabal-pre-configure _USES_stage= 751:cabal-post-install-script BUILD_TARGET?= ${EXECUTABLES:S/^/exe:&/} _use_cabal= ${USE_CABAL:O:u} . for package in ${_use_cabal} _PKG_GROUP= ${package:C/[\.-]//g} _PKG_WITHOUT_REV= ${package:C/_[0-9]+//} _REV= ${package:C/[^_]*//:S/_//} MASTER_SITES+= https://hackage.haskell.org/package/:${package:C/[\.-]//g} \ http://hackage.haskell.org/package/:${package:C/[\.-]//g} DISTFILES+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX}:${package:C/[\.-]//g} . if ${package:C/[^_]*//:S/_//} != "" DISTFILES+= ${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal:${package:C/[\.-]//g} . endif _CABAL_EXTRACT_ONLY+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX} . endfor . if !defined(EXTRACT_ONLY) EXTRACT_ONLY= ${_DISTFILES:N*\.cabal} . else . if !defined(SKIP_CABAL_EXTRACT) EXTRACT_ONLY+= ${_CABAL_EXTRACT_ONLY} . endif . endif # Auxiliary targets used during port creation/updating. # Populates Haskell package list from Hackage. # Fetches and unpacks package source from Hackage using only PORTNAME and PORTVERSION. # If Hackage isn't a default MASTER_SITE (for instance, when USE_GITHUB is present) # this target requires distinfo to be present too. cabal-extract: check-cabal . if ${_hackage_is_default} == no @${ECHO_MSG} "===> Recursing down to make extract" @${MAKE} -C ${.CURDIR} extract SKIP_CABAL_EXTRACT=yes ${RM} -rf ${CABAL_HOME} . endif @${ECHO_MSG} "===> Fetching Cabal package index into ${CABAL_HOME}/.cabal" @${SETENV} HOME=${CABAL_HOME} ${CABAL_CMD} update . if ${_hackage_is_default} == yes @cd ${WRKDIR} && \ ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} get ${PORTNAME}-${PORTVERSION} . else . if ${cabal_ARGS:Mhpack} @${ECHO_MSG} "===> Running ${HPACK_CMD} to generate .cabal file" @cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} ${HPACK_CMD} . endif . endif @${TOUCH} ${EXTRACT_COOKIE} ${CABAL_COOKIE} # Calls cabal configure on the Haskell package located in ${WRKSRC} cabal-configure: check-cabal cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} configure --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CONFIGURE_ARGS} # Calls cabal build on the Haskell package located in ${WRKSRC} cabal-build: check-cabal cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} # Generates USE_CABAL= ... line ready to be pasted into the port based on the plan.json file generated by cabal configure. make-use-cabal: check-cabal2tuple @${ECHO_MSG} "===> Processing plan.json" @${_CABAL2TUPLE_CMD} ${WRKSRC} || (${ECHO_CMD} "Did you forget to make cabal-configure ?" ; exit 1) check-cabal: @if ! type ${CABAL_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> cabal executable not found, install ${CABAL_PORT} or set CABAL_CMD"; exit 1; \ fi; \ check-cabal2tuple: @if ! type ${_CABAL2TUPLE_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> cabal2tuple executable not found, install \"ports-mgmt/hs-cabal2tuple\""; exit 1; \ fi # Main targets implementation. cabal-post-extract: . if !defined(SKIP_CABAL_EXTRACT) # Remove the project file as requested . if "${CABAL_PROJECT}" == "remove" ${RM} ${WRKSRC}/cabal.project . endif # Save the original project file so that users can patch them . if "${CABAL_PROJECT}" == "append" ${MV} ${WRKSRC}/cabal.project ${WRKSRC}/cabal.project.${PORTNAME} . endif @${TEST} ! -f ${WRKSRC}/cabal.project || \ (${ECHO_CMD} "cabal.project file is already present in WRKSRC! Set CABAL_PROJECT variable." && false) # Move extracted dependencies into ${CABAL_DEPSDIR} directory ${MKDIR} ${CABAL_DEPSDIR} . for package in ${_use_cabal} # Copy revised .cabal file if present . if ${package:C/[^_]*//:S/_//} != "" cp ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal `find ${WRKDIR}/${package:C/_[0-9]+//} -name '*.cabal' -depth 1` . endif # Move the dependency source itself cd ${WRKDIR} && \ mv ${package:C/_[0-9]+//} ${CABAL_DEPSDIR}/ . endfor # Create the cabal-install config ${MKDIR} ${CABAL_HOME}/.cabal ${ECHO_CMD} "jobs: ${MAKE_JOBS_NUMBER}" > ${CABAL_HOME}/.cabal/config . endif # SKIP_CABAL_EXTRACT cabal-post-patch: . if !defined(SKIP_CABAL_EXTRACT) @${TEST} ! -f ${CABAL_COOKIE} || \ (${ECHO_CMD} "===> Patching done, skipping cabal-post-patch" && false) # Create our own cabal.project ${ECHO_CMD} "packages:" > ${WRKSRC}/cabal.project . if "${CABAL_PROJECT}" != "append" ${ECHO_CMD} " ." >> ${WRKSRC}/cabal.project . endif . for package in ${_use_cabal} ${ECHO_CMD} " ${CABAL_DEPS_SUBDIR}/${package:C/_[0-9]+//}" >> ${WRKSRC}/cabal.project . endfor # Append the (possibly patched) original cabal.project, if requested . if "${CABAL_PROJECT}" == "append" ${CAT} ${WRKSRC}/cabal.project.${PORTNAME} >> ${WRKSRC}/cabal.project . endif . endif # SKIP_CABAL_EXTRACT && !CABAL_COOKIE cabal-pre-configure: # Generate .cabal file with hpack if requested . if ${cabal_ARGS:Mhpack} cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack . endif . if !target(do-build) do-build: cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} ${CABAL_CMD} new-build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} . endif . if !target(do-install) do-install: +. if defined(CABAL_WRAPPER_SCRIPTS) && !empty(CABAL_WRAPPER_SCRIPTS) ${MKDIR} ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC} +. endif . for exe in ${EXECUTABLES} +. if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${INSTALL_PROGRAM} \ $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC}/${exe} ${ECHO_CMD} '#!/bin/sh' > ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'export ${exe:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} -. for dep in ${${exe}_DATADIR_VARS} +. for dep in ${${exe}_DATADIR_VARS} ${ECHO_CMD} 'export ${dep:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} -. endfor +. endfor ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'exec ${PREFIX}/${CABAL_LIBEXEC}/${exe} "$$@"' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${exe} +. else + ${INSTALL_PROGRAM} \ + $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ + ${STAGEDIR}${PREFIX}/bin/${exe} +. endif . endfor . endif . if !defined(SKIP_CABAL_PLIST) cabal-post-install-script: . for exe in ${EXECUTABLES} ${ECHO_CMD} 'bin/${exe}' >> ${TMPPLIST} +. if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${ECHO_CMD} '${CABAL_LIBEXEC}/${exe}' >> ${TMPPLIST} +. endif . endfor . endif .endif diff --git a/devel/hs-alex/Makefile b/devel/hs-alex/Makefile index 0ea72a1d16a3..23b7954770c1 100644 --- a/devel/hs-alex/Makefile +++ b/devel/hs-alex/Makefile @@ -1,25 +1,27 @@ PORTNAME= alex PORTVERSION= 3.2.6 PORTREVISION= 2 CATEGORIES= devel haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Tool for generating lexical analysers in Haskell LICENSE= BSD3CLAUSE USES= cabal +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} + OPTIONS_DEFINE= EXAMPLES PORTEXAMPLES= Makefile *.x *.y post-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/data/* ${STAGEDIR}${DATADIR} post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR} .include diff --git a/devel/hs-cabal-install/Makefile b/devel/hs-cabal-install/Makefile index 65f03b649522..aa1ed7e47bdf 100644 --- a/devel/hs-cabal-install/Makefile +++ b/devel/hs-cabal-install/Makefile @@ -1,65 +1,63 @@ PORTNAME= cabal-install PORTVERSION= 3.6.2.0 CATEGORIES= devel haskell EXTRACT_ONLY= ${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX} MAINTAINER= haskell@FreeBSD.org COMMENT= Command-line interface for Cabal and Hackage LICENSE= BSD3CLAUSE USES= cabal:nodefault compiler:c11 python:build USE_GITHUB= yes GH_ACCOUNT= haskell GH_PROJECT= cabal GH_TAGNAME= ${PORTNAME}-v${PORTVERSION} USE_CABAL= async-2.2.4 \ base16-bytestring-1.0.2.0 \ base64-bytestring-1.2.1.0 \ cryptohash-sha256-0.11.102.1 \ echo-0.1.4 \ ed25519-0.0.5.0_5 \ edit-distance-0.2.2.1_1 \ hackage-security-0.6.1.0 \ hashable-1.3.3.0 \ HTTP-4000.3.16_1 \ lukko-0.1.1.3_2 \ network-3.1.2.2 \ network-uri-2.6.4.1 \ random-1.2.1 \ regex-base-0.94.0.1_1 \ regex-posix-0.96.0.1 \ resolv-0.1.2.0_4 \ splitmix-0.1.0.4 \ tar-0.5.1.1_5 \ th-compat-0.1.3 \ zlib-0.6.2.3_1 +EXECUTABLES= cabal SKIP_CABAL_EXTRACT= yes -SKIP_CABAL_PLIST= yes - -PLIST_FILES= bin/cabal post-extract: ${MKDIR} ${WRKSRC}/_build/tarballs/ .for package in ${USE_CABAL} ${CP} ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${EXTRACT_SUFX} ${WRKSRC}/_build/tarballs/ . if ${package:C/[^_]*//:S/_//} != "" ${CP} ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal ${WRKSRC}/_build/tarballs/${package:C/[0-9._]*$//:S/-$//}.cabal . else tar -C ${WRKDIR} -xf ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${EXTRACT_SUFX} --include='*.cabal' ${MV} ${WRKDIR}/${package:C/_[0-9]+//}/${package:C/[0-9._]*$//:S/-$//}.cabal ${WRKSRC}/_build/tarballs/${package:C/[0-9._]*$//:S/-$//}.cabal . endif .endfor do-build: cd ${WRKSRC} && \ ${PYTHON_CMD} bootstrap/bootstrap.py -d bootstrap/linux-8.10.7.json do-install: ${INSTALL_PROGRAM} ${WRKSRC}/_build/bin/cabal ${STAGEDIR}${PREFIX}/bin/ .include diff --git a/devel/hs-git-annex/Makefile b/devel/hs-git-annex/Makefile index d093691c16f3..f46dc959669c 100644 --- a/devel/hs-git-annex/Makefile +++ b/devel/hs-git-annex/Makefile @@ -1,325 +1,318 @@ PORTNAME= git-annex PORTVERSION= 10.20220525 +PORTREVISION= 1 CATEGORIES= devel haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Manage files with git, without checking their contents into git BROKEN_aarch64= Causes compiler to crash LICENSE= GPLv3 BUILD_DEPENDS= rsync:net/rsync \ git:devel/git \ gsha256sum:sysutils/coreutils RUN_DEPENDS= rsync:net/rsync \ git:devel/git \ gsha256sum:sysutils/coreutils USES= cabal perl5 USE_PERL5= build USE_LOCALE= en_US.UTF-8 USE_CABAL= DAV-1.3.4 \ IfElse-0.85 \ OneTuple-0.3.1_2 \ QuickCheck-2.14.2 \ SafeSemaphore-0.10.1_1 \ StateVar-1.2.2 \ adjunctions-4.4.1 \ aeson-2.0.3.0 \ ansi-terminal-0.11.3 \ ansi-wl-pprint-0.6.9_3 \ appar-0.1.8 \ asn1-encoding-0.9.6_2 \ asn1-parse-0.9.5 \ asn1-types-0.3.4 \ assoc-1.0.2_2 \ async-2.2.4_1 \ attoparsec-0.14.4_1 \ attoparsec-iso8601-1.0.2.1 \ auto-update-0.1.6 \ aws-0.22_3 \ base-compat-0.12.1 \ base-compat-batteries-0.12.1_2 \ base-orphans-0.8.6 \ base16-bytestring-1.0.2.0 \ base64-bytestring-1.2.1.0 \ basement-0.0.14 \ bencode-0.6.1.1 \ bifunctors-5.5.12 \ blaze-builder-0.4.2.2_1 \ blaze-html-0.9.1.2_2 \ blaze-markup-0.8.2.8_2 \ bloomfilter-2.0.1.0_2 \ byteable-0.1.1 \ byteorder-1.0.4 \ cabal-doctest-1.0.9_1 \ call-stack-0.4.0 \ case-insensitive-1.2.1.0 \ cereal-0.5.8.2_1 \ clock-0.8.3 \ colour-2.3.6 \ comonad-5.0.8_1 \ concurrent-output-1.10.16 \ conduit-1.3.4.2 \ conduit-extra-1.3.6 \ connection-0.3.1_1 \ contravariant-1.5.5 \ cookie-0.4.5 \ crypto-api-0.13.3_1 \ cryptohash-md5-0.11.101.0 \ cryptohash-sha1-0.11.101.0 \ cryptonite-0.30 \ data-default-0.7.1.1 \ data-default-class-0.1.2.0 \ data-default-instances-containers-0.0.1 \ data-default-instances-dlist-0.0.1 \ data-default-instances-old-locale-0.0.1 \ data-fix-0.3.2_2 \ disk-free-space-0.1.0.1_3 \ distributive-0.6.2.1_1 \ dlist-1.0 \ easy-file-0.2.2 \ edit-distance-0.2.2.1_1 \ entropy-0.4.1.7 \ fast-logger-3.1.1 \ feed-1.3.2.1 \ file-embed-0.0.15.0 \ filepath-bytestring-1.4.2.1.10 \ free-5.1.8 \ git-lfs-1.2.0 \ hashable-1.4.0.2 \ hourglass-0.2.12 \ hsc2hs-0.68.8 \ http-api-data-0.4.3_6 \ http-client-0.7.11_1 \ http-client-restricted-0.0.5 \ http-client-tls-0.3.6.1 \ http-conduit-2.3.8 \ http-types-0.12.3 \ indexed-traversable-0.1.2_1 \ indexed-traversable-instances-0.1.1 \ integer-logarithms-1.0.3.1_2 \ invariant-0.5.6 \ iproute-1.7.12 \ kan-extensions-5.2.4 \ lens-5.1.1 \ lift-type-0.1.0.1 \ lifted-base-0.2.3.12 \ magic-1.1 \ memory-0.17.0 \ microlens-0.4.13.0 \ microlens-th-0.4.3.10 \ mime-types-0.1.0.9 \ monad-control-1.0.3.1 \ monad-logger-0.3.36_2 \ monad-loops-0.4.3 \ mono-traversable-1.0.15.3 \ network-3.1.2.7 \ network-bsd-2.8.1.0_4 \ network-info-0.2.1 \ network-uri-2.6.4.1 \ old-locale-1.0.0.7_2 \ old-time-1.1.0.3_2 \ optparse-applicative-0.17.0.0 \ parallel-3.2.2.0_4 \ path-pieces-0.2.1_1 \ pem-0.2.4 \ persistent-2.14.0.1 \ persistent-sqlite-2.13.1.0 \ persistent-template-2.12.0.0 \ primitive-0.7.4.0 \ profunctors-5.6.2_2 \ random-1.2.1.1 \ reflection-2.1.6_1 \ regex-base-0.94.0.2_1 \ regex-tdfa-1.3.1.2_1 \ resource-pool-0.2.3.2 \ resourcet-1.2.5 \ safe-0.3.19 \ sandi-0.5_1 \ scientific-0.3.7.0_2 \ securemem-0.1.10 \ semialign-1.2.0.1_1 \ semigroupoids-5.3.7 \ semigroups-0.20 \ shakespeare-2.0.29 \ silently-1.2.5.2 \ socks-0.6.1 \ split-0.2.3.4_2 \ splitmix-0.1.0.4 \ stm-chans-3.0.0.6 \ streaming-commons-0.2.2.4 \ strict-0.4.0.1_4 \ syb-0.7.2.1 \ tagged-0.8.6.1_2 \ tagsoup-0.14.8 \ tasty-1.4.2.3 \ tasty-hunit-0.10.0.3 \ tasty-quickcheck-0.10.2 \ tasty-rerun-1.1.18_3 \ terminal-size-0.3.3 \ text-short-0.1.5 \ th-abstraction-0.4.3.0 \ th-compat-0.1.3_1 \ th-lift-0.8.2_1 \ th-lift-instances-0.1.19 \ these-1.1.1.1_5 \ time-compat-1.9.6.1_3 \ time-locale-compat-0.1.1.5 \ tls-1.5.7 \ torrent-10000.1.1 \ transformers-base-0.4.6 \ transformers-compat-0.7.1_1 \ typed-process-0.2.8.0_1 \ unbounded-delays-0.1.1.1 \ unix-compat-0.6 \ unix-time-0.4.7 \ unliftio-0.2.22.0 \ unliftio-core-0.2.0.1_2 \ unordered-containers-0.2.19.1 \ utf8-string-1.0.2 \ uuid-1.3.15_1 \ uuid-types-1.0.5_2 \ vault-0.3.1.5_1 \ vector-0.12.3.1_2 \ vector-algorithms-0.8.0.4_1 \ void-0.7.3 \ wcwidth-0.0.2 \ witherable-0.4.2_2 \ x509-1.7.6 \ x509-store-1.6.9 \ x509-system-1.6.7 \ x509-validation-1.6.12 \ xml-conduit-1.9.1.1_1 \ xml-hamlet-0.5.0.2 \ xml-types-0.3.8 \ zlib-0.6.3.0 OPTIONS_DEFINE= ASSISTANT WEBAPP PAIRING DBUS OPTIONS_DEFAULT= ASSISTANT WEBAPP PAIRING DBUS ASSISTANT_DESC= 'assistant' and 'watch' commands ASSISTANT_CABAL_FLAGS= assistant ASSISTANT_USE_CABAL= mountpoints-1.0.2 WEBAPP_DESC= Web application (implies ASSISTANT and PAIRING) WEBAPP_IMPLIES= ASSISTANT PAIRING WEBAPP_CABAL_FLAGS= webapp WEBAPP_USE_CABAL= HUnit-1.6.2.0 \ alex-3.2.7.1 \ bsb-http-chunked-0.0.0.4_3 \ cipher-aes-0.2.11 \ clientsession-0.9.1.2 \ cprng-aes-0.6.1 \ crypto-cipher-types-0.0.9 \ crypto-random-0.0.9_1 \ cryptonite-conduit-0.2.2_1 \ css-text-0.1.3.0 \ email-validate-2.3.2.16 \ happy-1.20.0_1 \ hjsmin-0.2.0.4_2 \ http-date-0.0.11 \ http2-3.0.3 \ language-javascript-0.7.1.0 \ libyaml-0.1.2 \ mountpoints-1.0.2 \ network-byte-order-0.1.6_1 \ network-multicast-0.3.2 \ psqueues-0.2.7.3 \ setenv-0.1.1.3_1 \ simple-sendfile-0.2.30 \ skein-1.0.9.4 \ time-manager-0.0.0 \ tls-session-manager-0.0.4 \ wai-3.2.3 \ wai-app-static-3.1.7.4 \ wai-extra-3.1.12.1 \ wai-logger-2.4.0 \ warp-3.3.21 \ warp-tls-3.3.2 \ word8-0.1.3 \ xss-sanitize-0.3.7_1 \ yaml-0.11.8.0 \ yesod-1.6.2 \ yesod-core-1.6.23.1 \ yesod-form-1.7.0 \ yesod-persistent-1.6.0.8 \ yesod-static-1.6.1.0 PAIRING_DESC= Enable pairing PAIRING_CABAL_FLAGS= pairing PAIRING_USE_CABAL= network-multicast-0.3.2 DBUS_DESC= D-Bus support DBUS_CABAL_FLAGS= dbus DBUS_USE_CABAL= dbus-1.2.24 \ fdo-notify-0.3.1 CABAL_FLAGS= production torrentparser magicmime \ -benchmark -debuglocks -EXECUTABLES= git-annex - MAN1PAGES= git-annex-add git-annex-expire git-annex-lookupkey \ git-annex-remotedaemon git-annex-ungroup \ git-annex-addunused git-annex-find git-annex-map \ git-annex-repair git-annex-uninit git-annex-addurl \ git-annex-findref git-annex-matchexpression \ git-annex-required git-annex-unlock git-annex-adjust \ git-annex-fix git-annex-matching-options \ git-annex-resolvemerge git-annex-untrust \ git-annex-assistant git-annex-forget git-annex-merge \ git-annex-rmurl git-annex-unused git-annex-calckey \ git-annex-fromkey git-annex-metadata git-annex-schedule \ git-annex-upgrade git-annex-checkpresentkey \ git-annex-fsck git-annex-migrate git-annex-semitrust \ git-annex-vadd git-annex-contentlocation \ git-annex-fuzztest git-annex-mirror git-annex-setkey \ git-annex-vcycle git-annex-copy git-annex-get \ git-annex-move git-annex-setpresentkey \ git-annex-version git-annex-dead git-annex-group \ git-annex-multicast git-annex-shell git-annex-vfilter \ git-annex-describe git-annex-groupwanted \ git-annex-numcopies git-annex-smudge git-annex-vicfg \ git-annex-diffdriver git-annex-import git-annex-p2p \ git-annex-status git-annex-view git-annex-direct \ git-annex-importfeed git-annex-pre-commit \ git-annex-sync git-annex-vpop git-annex-drop \ git-annex-indirect git-annex-preferred-content \ git-annex-test git-annex-wanted git-annex-dropkey \ git-annex-info git-annex-proxy git-annex-testremote \ git-annex-watch git-annex-dropunused git-annex-init \ git-annex-readpresentkey git-annex-transferkey \ git-annex-webapp git-annex-edit git-annex-initremote \ git-annex-registerurl git-annex-transferkeys \ git-annex-whereis git-annex-enable-tor git-annex-list \ git-annex-reinit git-annex-trust git-annex \ git-annex-enableremote git-annex-lock \ git-annex-reinject git-annex-unannex \ git-remote-tor-annex git-annex-examinekey git-annex-log \ git-annex-rekey git-annex-undo post-build: .for man in ${MAN1PAGES} ${WRKSRC}/Build/mdwn2man ${man} 1 ${WRKSRC}/doc/${man}.mdwn > ${WRKSRC}/doc/${man}.1 .endfor post-install: .for man in ${MAN1PAGES} ${INSTALL_MAN} ${WRKSRC}/doc/${man}.1 ${STAGEDIR}${MANPREFIX}/man/man1/ .endfor post-stage: - ${LN} -sf git-annex ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC}/git-annex-shell - ${LN} -sf git-annex ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC}/git-remote-tor-annex - ${CP} ${STAGEDIR}${PREFIX}/bin/git-annex ${STAGEDIR}${PREFIX}/bin/git-annex-shell - ${CP} ${STAGEDIR}${PREFIX}/bin/git-annex ${STAGEDIR}${PREFIX}/bin/git-remote-tor-annex - ${REINPLACE_CMD} 's|${PREFIX}/${CABAL_LIBEXEC}/git-annex|${PREFIX}/${CABAL_LIBEXEC}/git-annex-shell|' \ - ${STAGEDIR}${PREFIX}/bin/git-annex-shell - ${REINPLACE_CMD} 's|${PREFIX}/${CABAL_LIBEXEC}/git-annex|${PREFIX}/${CABAL_LIBEXEC}/git-remote-tor-annex|' \ - ${STAGEDIR}${PREFIX}/bin/git-remote-tor-annex + ${LN} -sf git-annex ${STAGEDIR}${PREFIX}/bin/git-annex-shell + ${LN} -sf git-annex ${STAGEDIR}${PREFIX}/bin/git-remote-tor-annex .include diff --git a/devel/hs-git-annex/pkg-plist b/devel/hs-git-annex/pkg-plist index 8f7b027d77c3..5fe344fbeada 100644 --- a/devel/hs-git-annex/pkg-plist +++ b/devel/hs-git-annex/pkg-plist @@ -1,103 +1,101 @@ bin/git-annex-shell bin/git-remote-tor-annex -libexec/cabal/git-annex-shell -libexec/cabal/git-remote-tor-annex man/man1/git-annex-add.1.gz man/man1/git-annex-addunused.1.gz man/man1/git-annex-addurl.1.gz man/man1/git-annex-adjust.1.gz man/man1/git-annex-assistant.1.gz man/man1/git-annex-calckey.1.gz man/man1/git-annex-checkpresentkey.1.gz man/man1/git-annex-contentlocation.1.gz man/man1/git-annex-copy.1.gz man/man1/git-annex-dead.1.gz man/man1/git-annex-describe.1.gz man/man1/git-annex-diffdriver.1.gz man/man1/git-annex-direct.1.gz man/man1/git-annex-drop.1.gz man/man1/git-annex-dropkey.1.gz man/man1/git-annex-dropunused.1.gz man/man1/git-annex-edit.1.gz man/man1/git-annex-enable-tor.1.gz man/man1/git-annex-enableremote.1.gz man/man1/git-annex-examinekey.1.gz man/man1/git-annex-expire.1.gz man/man1/git-annex-find.1.gz man/man1/git-annex-findref.1.gz man/man1/git-annex-fix.1.gz man/man1/git-annex-forget.1.gz man/man1/git-annex-fromkey.1.gz man/man1/git-annex-fsck.1.gz man/man1/git-annex-fuzztest.1.gz man/man1/git-annex-get.1.gz man/man1/git-annex-group.1.gz man/man1/git-annex-groupwanted.1.gz man/man1/git-annex-import.1.gz man/man1/git-annex-importfeed.1.gz man/man1/git-annex-indirect.1.gz man/man1/git-annex-info.1.gz man/man1/git-annex-init.1.gz man/man1/git-annex-initremote.1.gz man/man1/git-annex-list.1.gz man/man1/git-annex-lock.1.gz man/man1/git-annex-log.1.gz man/man1/git-annex-lookupkey.1.gz man/man1/git-annex-map.1.gz man/man1/git-annex-matchexpression.1.gz man/man1/git-annex-matching-options.1.gz man/man1/git-annex-merge.1.gz man/man1/git-annex-metadata.1.gz man/man1/git-annex-migrate.1.gz man/man1/git-annex-mirror.1.gz man/man1/git-annex-move.1.gz man/man1/git-annex-multicast.1.gz man/man1/git-annex-numcopies.1.gz man/man1/git-annex-p2p.1.gz man/man1/git-annex-pre-commit.1.gz man/man1/git-annex-preferred-content.1.gz man/man1/git-annex-proxy.1.gz man/man1/git-annex-readpresentkey.1.gz man/man1/git-annex-registerurl.1.gz man/man1/git-annex-reinit.1.gz man/man1/git-annex-reinject.1.gz man/man1/git-annex-rekey.1.gz man/man1/git-annex-remotedaemon.1.gz man/man1/git-annex-repair.1.gz man/man1/git-annex-required.1.gz man/man1/git-annex-resolvemerge.1.gz man/man1/git-annex-rmurl.1.gz man/man1/git-annex-schedule.1.gz man/man1/git-annex-semitrust.1.gz man/man1/git-annex-setkey.1.gz man/man1/git-annex-setpresentkey.1.gz man/man1/git-annex-shell.1.gz man/man1/git-annex-smudge.1.gz man/man1/git-annex-status.1.gz man/man1/git-annex-sync.1.gz man/man1/git-annex-test.1.gz man/man1/git-annex-testremote.1.gz man/man1/git-annex-transferkey.1.gz man/man1/git-annex-transferkeys.1.gz man/man1/git-annex-trust.1.gz man/man1/git-annex-unannex.1.gz man/man1/git-annex-undo.1.gz man/man1/git-annex-ungroup.1.gz man/man1/git-annex-uninit.1.gz man/man1/git-annex-unlock.1.gz man/man1/git-annex-untrust.1.gz man/man1/git-annex-unused.1.gz man/man1/git-annex-upgrade.1.gz man/man1/git-annex-vadd.1.gz man/man1/git-annex-vcycle.1.gz man/man1/git-annex-version.1.gz man/man1/git-annex-vfilter.1.gz man/man1/git-annex-vicfg.1.gz man/man1/git-annex-view.1.gz man/man1/git-annex-vpop.1.gz man/man1/git-annex-wanted.1.gz man/man1/git-annex-watch.1.gz man/man1/git-annex-webapp.1.gz man/man1/git-annex-whereis.1.gz man/man1/git-annex.1.gz man/man1/git-remote-tor-annex.1.gz diff --git a/devel/hs-happy/Makefile b/devel/hs-happy/Makefile index a318d34b4b7d..4b115d7569d5 100644 --- a/devel/hs-happy/Makefile +++ b/devel/hs-happy/Makefile @@ -1,25 +1,27 @@ PORTNAME= happy PORTVERSION= 1.20.0 PORTREVISION= 2 CATEGORIES= devel haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Parser generator for Haskell LICENSE= BSD3CLAUSE USES= cabal +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} + PORTEXAMPLES= *.ly README glr/* igloo/* OPTIONS_DEFINE= EXAMPLES post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR} post-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} $$(find ${WRKSRC} -name 'HappyTemplate*') ${STAGEDIR}${DATADIR} .include diff --git a/devel/hs-profiteur/Makefile b/devel/hs-profiteur/Makefile index d26feebfaeaf..f918854e81b0 100644 --- a/devel/hs-profiteur/Makefile +++ b/devel/hs-profiteur/Makefile @@ -1,58 +1,59 @@ PORTNAME= profiteur PORTVERSION= 0.4.6.1 CATEGORIES= devel haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Treemap visualiser for GHC .prof files LICENSE= BSD3CLAUSE USES= cabal USE_CABAL= OneTuple-0.3.1_2 \ QuickCheck-2.14.2 \ StateVar-1.2.2 \ aeson-2.1.0.0_1 \ assoc-1.0.2_2 \ attoparsec-0.14.4_1 \ base-compat-0.12.1 \ base-compat-batteries-0.12.1_2 \ base-orphans-0.8.6 \ bifunctors-5.5.12 \ comonad-5.0.8_1 \ contravariant-1.5.5 \ data-fix-0.3.2_2 \ distributive-0.6.2.1_1 \ dlist-1.0 \ generically-0.1 \ ghc-prof-1.4.1.11 \ hashable-1.4.0.2 \ indexed-traversable-0.1.2_1 \ indexed-traversable-instances-0.1.1_1 \ integer-logarithms-1.0.3.1_2 \ js-jquery-3.3.1 \ primitive-0.7.4.0 \ random-1.2.1.1 \ scientific-0.3.7.0_2 \ semialign-1.2.0.1_2 \ semigroupoids-5.3.7 \ splitmix-0.1.0.4 \ strict-0.4.0.1_4 \ tagged-0.8.6.1_2 \ text-short-0.1.5 \ th-abstraction-0.4.3.0 \ these-1.1.1.1_5 \ time-compat-1.9.6.1_3 \ transformers-compat-0.7.2 \ unordered-containers-0.2.19.1 \ uuid-types-1.0.5_2 \ vector-0.12.3.1_2 \ witherable-0.4.2_3 +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} profiteur_DATADIR_VARS= js-jquery post-install: cd ${WRKSRC} && ${COPYTREE_SHARE} data ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${CABAL_DEPSDIR}/js-jquery-3.3.1/javascript/jquery-3.3.1.min.js ${STAGEDIR}${DATADIR} .include diff --git a/devel/kdevelop/files/patch-craft.patch b/devel/kdevelop/files/patch-craft.patch new file mode 100644 index 000000000000..207fdb667ec7 --- /dev/null +++ b/devel/kdevelop/files/patch-craft.patch @@ -0,0 +1,698 @@ +diff --git plugins/CMakeLists.txt plugins/CMakeLists.txt +index 8bea62a97e..32a27dad9e 100644 +--- plugins/CMakeLists.txt ++++ plugins/CMakeLists.txt +@@ -80,6 +80,7 @@ ecm_optional_add_subdirectory(genericprojectmanager) + + # BEGIN: Runtimes + add_subdirectory(android) ++add_subdirectory(craft) + if (UNIX) + add_subdirectory(docker) + add_subdirectory(flatpak) +diff --git plugins/craft/CMakeLists.txt plugins/craft/CMakeLists.txt +new file mode 100644 +index 0000000000..8cf28b6c01 +--- /dev/null ++++ plugins/craft/CMakeLists.txt +@@ -0,0 +1,22 @@ ++add_definitions(-DTRANSLATION_DOMAIN=\"kdevcraft\") ++ ++declare_qt_logging_category(craftplugin_LOG_SRCS ++ TYPE PLUGIN ++ HEADER debug_craft.h ++ IDENTIFIER CRAFT ++ CATEGORY_BASENAME "craft" ++) ++ ++#qt5_add_resources(craftplugin_SRCS kdevcraftplugin.qrc) ++kdevplatform_add_plugin(kdevcraft SOURCES craftplugin.cpp craftruntime.cpp ${craftplugin_LOG_SRCS}) ++target_link_libraries(kdevcraft ++ KF5::CoreAddons ++ KDev::Interfaces ++ KDev::Util ++ KDev::OutputView ++ KDev::Project ++) ++ ++if(BUILD_TESTING) ++ add_subdirectory(tests) ++endif() +diff --git plugins/craft/craftplugin.cpp plugins/craft/craftplugin.cpp +new file mode 100644 +index 0000000000..c27e82a8b5 +--- /dev/null ++++ plugins/craft/craftplugin.cpp +@@ -0,0 +1,84 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#include "craftplugin.h" ++#include "craftruntime.h" ++#include "debug_craft.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++K_PLUGIN_FACTORY_WITH_JSON(KDevCraftFactory, "kdevcraft.json", registerPlugin();) ++ ++using namespace KDevelop; ++ ++CraftPlugin::CraftPlugin(QObject* parent, const QVariantList& /*args*/) ++ : IPlugin(QStringLiteral("kdevcraft"), parent), m_shouldAutoEnable(Uninitialized) ++{ ++ const QString pythonExecutable = CraftRuntime::findPython(); ++ if (pythonExecutable.isEmpty()) ++ return; ++ ++ // If KDevelop itself runs under Craft env, this plugin has nothing to do ++ if (qEnvironmentVariableIsSet("KDEROOT")) ++ return; ++ ++ connect(ICore::self()->projectController(), &IProjectController::projectAboutToBeOpened, this, ++ [pythonExecutable, this](KDevelop::IProject* project) { ++ const QString craftRoot = CraftRuntime::findCraftRoot(project->path()); ++ ++ if (craftRoot.isEmpty()) ++ return; ++ ++ qCDebug(CRAFT) << "Found Craft root at" << craftRoot; ++ ++ auto* runtime = m_runtimes.value(craftRoot, nullptr); ++ ++ if (!runtime) { ++ runtime = new CraftRuntime(craftRoot, pythonExecutable); ++ ICore::self()->runtimeController()->addRuntimes(runtime); ++ m_runtimes.insert(craftRoot, runtime); ++ } ++ ++ bool haveConfigEntry = project->projectConfiguration()->group("Project") ++ .entryMap().contains(QLatin1String("AutoEnableCraftRuntime")); ++ ++ if (!haveConfigEntry && m_shouldAutoEnable == Uninitialized) { ++ const QString msgboxText = ++ i18n("The project being loaded (%1) is detected to reside under a\n" ++ "Craft root [%2] .\nDo you want to automatically switch to the Craft runtime?\n" ++ "Note that this will switch the runtime for all projects in a session!", ++ project->name(), craftRoot); ++ ++ auto answer = KMessageBox::questionYesNo(ICore::self()->uiController()->activeMainWindow(), msgboxText); ++ m_shouldAutoEnable = answer == KMessageBox::Yes ? AutoEnable : DoNotAutoEnable; ++ project->projectConfiguration()->group("Project") ++ .writeEntry("AutoEnableCraftRuntime", answer == KMessageBox::Yes); ++ } ++ else if (!haveConfigEntry) ++ project->projectConfiguration()->group("Project") ++ .writeEntry("AutoEnableCraftRuntime", m_shouldAutoEnable == AutoEnable); ++ else ++ m_shouldAutoEnable = ++ project->projectConfiguration()->group("Project") ++ .readEntry("AutoEnableCraftRuntime", false) ++ ? AutoEnable ++ : DoNotAutoEnable ; ++ ++ if (m_shouldAutoEnable == AutoEnable) { ++ qCDebug(CRAFT) << "Enabling Craft runtime at" << craftRoot << "with" << pythonExecutable; ++ ICore::self()->runtimeController()->setCurrentRuntime(runtime); ++ } ++ }); ++} ++ ++#include "craftplugin.moc" +diff --git plugins/craft/craftplugin.h plugins/craft/craftplugin.h +new file mode 100644 +index 0000000000..62ef30b928 +--- /dev/null ++++ plugins/craft/craftplugin.h +@@ -0,0 +1,28 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#ifndef CRAFTPLUGIN_H ++#define CRAFTPLUGIN_H ++ ++#include ++ ++#include ++ ++class CraftRuntime; ++ ++class CraftPlugin : public KDevelop::IPlugin ++{ ++ Q_OBJECT ++public: ++ CraftPlugin(QObject* parent, const QVariantList& args); ++ ++private: ++ QHash m_runtimes; ++ enum { ++ DoNotAutoEnable, ++ AutoEnable, ++ Uninitialized ++ } m_shouldAutoEnable; ++}; ++ ++#endif // CRAFTPLUGIN_H +diff --git plugins/craft/craftruntime.cpp plugins/craft/craftruntime.cpp +new file mode 100644 +index 0000000000..f30766e511 +--- /dev/null ++++ plugins/craft/craftruntime.cpp +@@ -0,0 +1,173 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#include "craftruntime.h" ++#include "debug_craft.h" ++ ++#include ++#include ++#include ++#include ++ ++using namespace KDevelop; ++ ++namespace { ++ auto craftSetupHelperRelativePath() { return QLatin1String{"/craft/bin/CraftSetupHelper.py"}; } ++} ++ ++CraftRuntime::CraftRuntime(const QString& craftRoot, const QString& pythonExecutable) ++ : m_craftRoot(craftRoot), m_pythonExecutable(pythonExecutable) ++{ ++ Q_ASSERT(!pythonExecutable.isEmpty()); ++ ++ m_watcher.addPath(craftRoot + craftSetupHelperRelativePath()); ++ ++ connect(&m_watcher, &QFileSystemWatcher::fileChanged, this, [this](const QString &path) ++ { ++ if (QFileInfo::exists(path)) { ++ refreshEnvCache(); ++ if (!m_watcher.files().contains(path)) { ++ m_watcher.addPath(path); ++ } ++ } ++ }); ++ refreshEnvCache(); ++} ++ ++QString CraftRuntime::name() const ++{ ++ return QStringLiteral("Craft [%1]").arg(m_craftRoot); ++} ++ ++QString CraftRuntime::findCraftRoot(Path startingPoint) ++{ ++ // CraftRuntime doesn't handle remote directories, because it needs ++ // to check file existence in the findCraftRoot() function ++ if (startingPoint.isRemote()) ++ return QString(); ++ ++ QString craftRoot; ++ while(true) { ++ bool craftSettingsIniExists = QFileInfo::exists(startingPoint.path() + QLatin1String("/etc/CraftSettings.ini")); ++ bool craftSetupHelperExists = QFileInfo::exists(startingPoint.path() + craftSetupHelperRelativePath()); ++ if (craftSettingsIniExists && craftSetupHelperExists) { ++ craftRoot = startingPoint.path(); ++ break; ++ } ++ ++ if (!startingPoint.hasParent()) ++ break; ++ startingPoint = startingPoint.parent(); ++ } ++ ++ return QFileInfo(craftRoot).canonicalFilePath(); ++} ++ ++QString CraftRuntime::findPython() ++{ ++ // Craft requires Python 3.6+, not any "python3", but ++ // - If the user set up Craft already, there is a high probability that ++ // "python3" is a correct one ++ // - We are running only CraftSetupHelper.py, not the whole Craft, so ++ // the 3.6+ requirement might be not relevant for this case. ++ // So just search for "python3" and hope for the best. ++ return QStandardPaths::findExecutable(QStringLiteral("python3")); ++} ++ ++void CraftRuntime::setEnabled(bool /*enabled*/) ++{ ++} ++ ++void CraftRuntime::refreshEnvCache() ++{ ++ QProcess python; ++ python.start(m_pythonExecutable, QStringList{m_craftRoot + craftSetupHelperRelativePath(), QStringLiteral("--getenv")}); ++ ++ if(!python.waitForFinished(5000)) { ++ qCWarning(CRAFT) << "CraftSetupHelper.py execution timed out"; ++ return; ++ } ++ ++ if (python.exitStatus() != QProcess::NormalExit) { ++ qCWarning(CRAFT) << "CraftSetupHelper.py execution failed with code" << python.exitCode(); ++ return; ++ } ++ ++ m_envCache.clear(); ++ ++ const QList output = python.readAllStandardOutput().split('\n'); ++ for (const auto& line : output) { ++ // line contains things like "VAR=VALUE" ++ int equalsSignIndex = line.indexOf('='); ++ if (equalsSignIndex == -1) ++ continue; ++ ++ QByteArray varName = line.left(equalsSignIndex); ++ QByteArray value = line.mid(equalsSignIndex + 1); ++ m_envCache.emplace_back(varName, value); ++ } ++} ++ ++QByteArray CraftRuntime::getenv(const QByteArray& varname) const ++{ ++ auto it = std::find_if(m_envCache.begin(), m_envCache.end(), ++ [&varname](const EnvironmentVariable& envVar) ++ { ++ return envVar.name == varname; ++ }); ++ ++ return it != m_envCache.end() ? it->value : QByteArray(); ++} ++ ++QString CraftRuntime::findExecutable(const QString& executableName) const ++{ ++ auto runtimePaths = QString::fromLocal8Bit(getenv(QByteArrayLiteral("PATH"))).split(QLatin1Char(':')); ++ ++ return QStandardPaths::findExecutable(executableName, runtimePaths); ++} ++ ++Path CraftRuntime::pathInHost(const Path& runtimePath) const ++{ ++ return runtimePath; ++} ++ ++Path CraftRuntime::pathInRuntime(const Path& localPath) const ++{ ++ return localPath; ++} ++ ++void CraftRuntime::startProcess(KProcess* process) const ++{ ++ QStringList program = process->program(); ++ QString executableInRuntime = findExecutable(program.constFirst()); ++ if (executableInRuntime != program.constFirst()) { ++ program.first() = std::move(executableInRuntime); ++ process->setProgram(program); ++ } ++ setEnvironmentVariables(process); ++ process->start(); ++} ++ ++void CraftRuntime::startProcess(QProcess* process) const ++{ ++ QString executableInRuntime = findExecutable(process->program()); ++ process->setProgram(executableInRuntime); ++ setEnvironmentVariables(process); ++ process->start(); ++} ++ ++void CraftRuntime::setEnvironmentVariables(QProcess* process) const ++{ ++ auto env = process->processEnvironment(); ++ ++ for(const auto& envVar : m_envCache) { ++ env.insert(QString::fromLocal8Bit(envVar.name), QString::fromLocal8Bit(envVar.value)); ++ } ++ ++ process->setProcessEnvironment(env); ++} ++ ++EnvironmentVariable::EnvironmentVariable(const QByteArray& name, const QByteArray& value) ++ : name(name.trimmed()), value(value) ++{ ++} +diff --git plugins/craft/craftruntime.h plugins/craft/craftruntime.h +new file mode 100644 +index 0000000000..c23ee0246e +--- /dev/null ++++ plugins/craft/craftruntime.h +@@ -0,0 +1,62 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#ifndef CRAFTRUNTIME_H ++#define CRAFTRUNTIME_H ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++class QProcess; ++ ++namespace KDevelop { ++ class IProject; ++} ++ ++// An auxiliary structure to hold normalized name and value of an env var ++struct EnvironmentVariable { ++ EnvironmentVariable(const QByteArray& name, const QByteArray& value); ++ ++ QByteArray name; ++ QByteArray value; ++}; ++Q_DECLARE_TYPEINFO(EnvironmentVariable, Q_MOVABLE_TYPE); ++ ++ ++class CraftRuntime : public KDevelop::IRuntime ++{ ++ Q_OBJECT ++public: ++ CraftRuntime(const QString& craftRoot, const QString& pythonExecutable); ++ ++ QString name() const override; ++ ++ void setEnabled(bool enabled) override; ++ ++ void startProcess(KProcess* process) const override; ++ void startProcess(QProcess* process) const override; ++ KDevelop::Path pathInHost(const KDevelop::Path& runtimePath) const override; ++ KDevelop::Path pathInRuntime(const KDevelop::Path& localPath) const override; ++ QString findExecutable(const QString& executableName) const override; ++ QByteArray getenv(const QByteArray& varname) const override; ++ ++ KDevelop::Path buildPath() const override { return {}; } ++ ++ static QString findCraftRoot(KDevelop::Path startingPoint); ++ static QString findPython(); ++ ++private: ++ void setEnvironmentVariables(QProcess* process) const; ++ void refreshEnvCache(); ++ ++ const QString m_craftRoot; ++ const QString m_pythonExecutable; ++ QFileSystemWatcher m_watcher; ++ std::vector m_envCache; ++}; ++ ++#endif // CRAFTRUNTIME_H +diff --git plugins/craft/kdevcraft.json plugins/craft/kdevcraft.json +new file mode 100644 +index 0000000000..bd05794c23 +--- /dev/null ++++ plugins/craft/kdevcraft.json +@@ -0,0 +1,22 @@ ++{ ++ "KPlugin": { ++ "Authors": [ ++ { ++ "Email": "arrowd@FreeBSD.org", ++ "Name": "Gleb Popov", ++ "Name[ru]": "Глеб Попов" ++ } ++ ], ++ "Category": "Runtimes", ++ "Description": "Exposes KDE Craft environment as a runtime", ++ "Description[ru]": "Представляет среду KDE Craft как среду выполнения KDevelop", ++ "Icon": "kdevelop", ++ "Id": "kdevcraft", ++ "License": "BSD3", ++ "Name": "Craft runtime", ++ "Name[ru]": "Поддержка Craft", ++ "Version": "0.1" ++ }, ++ "X-KDevelop-Category": "Global", ++ "X-KDevelop-Mode": "GUI" ++} +diff --git plugins/craft/tests/CMakeLists.txt plugins/craft/tests/CMakeLists.txt +new file mode 100644 +index 0000000000..3ed8f32d5c +--- /dev/null ++++ plugins/craft/tests/CMakeLists.txt +@@ -0,0 +1,16 @@ ++include_directories( ++ .. ++ ${CMAKE_CURRENT_BINARY_DIR}/.. ++) ++ ++set(test_craftruntime_SRCS ++ test_craftruntime.cpp ++ ../craftruntime.cpp ++ ${craftplugin_LOG_SRCS} ++) ++ ++ecm_add_test(${test_craftruntime_SRCS} ++ TEST_NAME test_craftruntime ++ LINK_LIBRARIES Qt5::Test KDev::Tests) ++ ++target_compile_definitions(test_craftruntime PRIVATE -DCRAFT_ROOT_MOCK="${CMAKE_CURRENT_SOURCE_DIR}/craft_root_mock") +diff --git plugins/craft/tests/craft_root_mock/bin/env plugins/craft/tests/craft_root_mock/bin/env +new file mode 100755 +index 0000000000..630848fc56 +--- /dev/null ++++ plugins/craft/tests/craft_root_mock/bin/env +@@ -0,0 +1,6 @@ ++#!/usr/bin/env python3 ++ ++import os ++ ++for var in os.environ: ++ print(var + "=" + os.environ[var]) +diff --git plugins/craft/tests/craft_root_mock/bin/printenv plugins/craft/tests/craft_root_mock/bin/printenv +new file mode 100755 +index 0000000000..375a1945e4 +--- /dev/null ++++ plugins/craft/tests/craft_root_mock/bin/printenv +@@ -0,0 +1,5 @@ ++#!/usr/bin/env python3 ++ ++print("PYTHONPATH=/usr/lib/python3/site-packages") ++print("BAD LINE") ++print("FOO=") +diff --git plugins/craft/tests/craft_root_mock/craft/bin/CraftSetupHelper.py plugins/craft/tests/craft_root_mock/craft/bin/CraftSetupHelper.py +new file mode 100644 +index 0000000000..1ae643b89b +--- /dev/null ++++ plugins/craft/tests/craft_root_mock/craft/bin/CraftSetupHelper.py +@@ -0,0 +1,9 @@ ++import os ++import sys ++ ++root = os.path.realpath(os.path.dirname(os.path.realpath(__file__)) + "/../../") ++ ++if "--getenv" in sys.argv: ++ print("KDEROOT=" + root) ++ print("PYTHONPATH=" + root + "/lib/site-packages") ++ print("PATH=" + root + "/bin:" + os.environ["PATH"]) +diff --git plugins/craft/tests/craft_root_mock/etc/CraftSettings.ini plugins/craft/tests/craft_root_mock/etc/CraftSettings.ini +new file mode 100644 +index 0000000000..e69de29bb2 +diff --git plugins/craft/tests/test_craftruntime.cpp plugins/craft/tests/test_craftruntime.cpp +new file mode 100644 +index 0000000000..ede259d0e2 +--- /dev/null ++++ plugins/craft/tests/test_craftruntime.cpp +@@ -0,0 +1,164 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#include "test_craftruntime.h" ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++ ++#include "../craftruntime.h" ++ ++using namespace KDevelop; ++ ++QTEST_MAIN(CraftRuntimeTest) ++ ++class TempDirWrapper ++{ ++public: ++ TempDirWrapper() = default; ++ TempDirWrapper(const QString& craftRoot, const QString& pythonExecutable) ++ : m_tempCraftRoot(new QTemporaryDir()) ++ { ++ QVERIFY(m_tempCraftRoot->isValid()); ++ copyCraftRoot(craftRoot); ++ m_runtime = std::make_shared(m_tempCraftRoot->path(), pythonExecutable); ++ } ++ ++ QString path() const ++ { ++ QVERIFY_RETURN(m_tempCraftRoot, QString()); ++ return m_tempCraftRoot->path(); ++ } ++ ++ CraftRuntime* operator->() const ++ { ++ QVERIFY_RETURN(m_runtime, nullptr); ++ return m_runtime.get(); ++ } ++private: ++ void copyCraftRoot(const QString& oldRoot) const { ++ const QLatin1String craftSettingsRelativePath("/etc/CraftSettings.ini"); ++ const QDir dest(m_tempCraftRoot->path()); ++ ++ auto* job = KIO::copy(QUrl::fromLocalFile(oldRoot + QLatin1String("/craft")), ++ QUrl::fromLocalFile(dest.path())); ++ QVERIFY(job->exec()); ++ ++ QVERIFY(dest.mkpath(QLatin1String("bin"))); ++ QVERIFY(dest.mkpath(QLatin1String("etc"))); ++ ++ QVERIFY(QFile::copy(oldRoot + craftSettingsRelativePath, ++ dest.path() + craftSettingsRelativePath)); ++ } ++ std::shared_ptr m_runtime; ++ std::shared_ptr m_tempCraftRoot; ++}; ++ ++Q_DECLARE_METATYPE(TempDirWrapper) ++ ++// When this test itself is ran under a Craft root, its environment gets in the way ++static void breakoutFromCraftRoot() { ++ auto craftRoot = qgetenv("KDEROOT"); ++ if (craftRoot.isEmpty()) ++ return; ++ ++ auto paths = qgetenv("PATH").split(':'); ++ std::remove_if(paths.begin(), paths.end(), [craftRoot](const QByteArray& path) { ++ return path.startsWith(craftRoot); ++ }); ++ qputenv("PATH", paths.join(':')); ++ ++ qunsetenv("KDEROOT"); ++ qunsetenv("craftRoot"); ++} ++ ++void CraftRuntimeTest::initTestCase_data() ++{ ++ breakoutFromCraftRoot(); ++ ++ const QString pythonExecutable = CraftRuntime::findPython(); ++ if (pythonExecutable.isEmpty()) ++ QSKIP("No python found, skipping kdevcraft tests."); ++ ++ QTest::addColumn("runtimeInstance"); ++ ++ QTest::newRow("Mock") << TempDirWrapper(QStringLiteral(CRAFT_ROOT_MOCK), pythonExecutable); ++ ++ auto craftRoot = CraftRuntime::findCraftRoot(Path(QStringLiteral("."))); ++ if (!craftRoot.isEmpty()) ++ QTest::newRow("Real") << TempDirWrapper(craftRoot, pythonExecutable); ++} ++ ++void CraftRuntimeTest::testFindCraftRoot() ++{ ++ QFETCH_GLOBAL(TempDirWrapper, runtimeInstance); ++ QCOMPARE(CraftRuntime::findCraftRoot(Path(runtimeInstance.path())), runtimeInstance.path()); ++ QCOMPARE(CraftRuntime::findCraftRoot(Path(runtimeInstance.path()).cd(QStringLiteral("bin"))), runtimeInstance.path()); ++} ++ ++void CraftRuntimeTest::testGetenv() ++{ ++ QFETCH_GLOBAL(TempDirWrapper, runtimeInstance); ++ ++ QVERIFY(!runtimeInstance->getenv("KDEROOT").isEmpty()); ++ ++ QDir craftDir1 = QDir(QString::fromLocal8Bit(runtimeInstance->getenv("KDEROOT"))); ++ QDir craftDir2 = QDir(runtimeInstance.path()); ++ QCOMPARE(craftDir1.canonicalPath(), craftDir2.canonicalPath()); ++ ++ QString pythonpathValue = QString::fromLocal8Bit(runtimeInstance->getenv("PYTHONPATH")); ++ QVERIFY(!pythonpathValue.isEmpty()); ++ QDir craftPythonPathDir = QDir(pythonpathValue); ++ ++ QVERIFY(craftPythonPathDir.path().startsWith(craftDir1.path())); ++} ++ ++void CraftRuntimeTest::testStartProcess() ++{ ++ QFETCH_GLOBAL(TempDirWrapper, runtimeInstance); ++ ++ QString envPath = QStandardPaths::findExecutable(QStringLiteral("env")); ++ if (envPath.isEmpty()) ++ QSKIP("Skipping startProcess() test, no \"env\" executable found"); ++ ++ QString envUnderCraftPath = runtimeInstance.path() + QStringLiteral("/bin/env"); ++ QVERIFY(QFile::copy(envPath, envUnderCraftPath)); ++ ++ QProcess p; ++ p.setProgram(QStringLiteral("env")); ++ runtimeInstance->startProcess(&p); ++ ++ // test that CraftRuntime::startProcess prefers programs under Craft root ++ QCOMPARE(QDir(p.program()).canonicalPath(), QDir(envUnderCraftPath).canonicalPath()); ++ ++ p.waitForFinished(); ++ QVERIFY(QFile::remove(envUnderCraftPath)); ++} ++ ++void CraftRuntimeTest::testStartProcessEnv() ++{ ++ QFETCH_GLOBAL(TempDirWrapper, runtimeInstance); ++ ++ QString printenvPath = QStandardPaths::findExecutable(QStringLiteral("printenv")); ++ if (printenvPath.isEmpty()) ++ QSKIP("Skipping startProcess() test, no \"printenv\" executable found"); ++ ++ QString printenvUnderCraftPath = runtimeInstance.path() + QStringLiteral("/bin/printenv"); ++ QVERIFY(QFile::copy(printenvPath, printenvUnderCraftPath)); ++ ++ KProcess p; ++ p.setProgram(QStringLiteral("printenv"), QStringList {QStringLiteral("PYTHONPATH")}); ++ p.setOutputChannelMode(KProcess::OnlyStdoutChannel); ++ runtimeInstance->startProcess(&p); ++ p.waitForFinished(); ++ ++ QVERIFY(p.readAllStandardOutput().contains("site-packages")); ++} +diff --git plugins/craft/tests/test_craftruntime.h plugins/craft/tests/test_craftruntime.h +new file mode 100644 +index 0000000000..d5a470f946 +--- /dev/null ++++ plugins/craft/tests/test_craftruntime.h +@@ -0,0 +1,20 @@ ++// SPDX-FileCopyrightText: 2022 Gleb Popov ++// SPDX-License-Identifier: BSD-3-Clause ++ ++#ifndef KDEVPLATFORM_PLUGIN_TEST_CRAFTRUNTIME_H ++#define KDEVPLATFORM_PLUGIN_TEST_CRAFTRUNTIME_H ++ ++#include ++ ++class CraftRuntimeTest: public QObject ++{ ++ Q_OBJECT ++private Q_SLOTS: ++ void initTestCase_data(); ++ void testFindCraftRoot(); ++ void testGetenv(); ++ void testStartProcess(); ++ void testStartProcessEnv(); ++}; ++ ++#endif // KDEVPLATFORM_PLUGIN_TEST_CRAFTRUNTIME_H diff --git a/devel/kdevelop/files/patch-gdb.patch b/devel/kdevelop/files/patch-gdb.patch new file mode 100644 index 000000000000..9e22db710ae7 --- /dev/null +++ b/devel/kdevelop/files/patch-gdb.patch @@ -0,0 +1,22 @@ +diff --git plugins/gdb/gdb.cpp plugins/gdb/gdb.cpp +index eb15feb446..11c115400f 100644 +--- plugins/gdb/gdb.cpp ++++ plugins/gdb/gdb.cpp +@@ -12,6 +12,8 @@ + #include "debuglog.h" + + #include ++#include ++#include + #include + #include + +@@ -79,7 +81,7 @@ bool GdbDebugger::start(KConfigGroup& config, const QStringList& extraArguments) + } + fullCommand += arguments.join(QLatin1Char(' ')); + +- m_process->start(); ++ KDevelop::ICore::self()->runtimeController()->currentRuntime()->startProcess(m_process); + + qCDebug(DEBUGGERGDB) << "Starting GDB with command" << fullCommand; + #if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 78, 0) diff --git a/math/hs-Agda/Makefile b/math/hs-Agda/Makefile index 3171a7fe97ae..4d8a1bce5991 100644 --- a/math/hs-Agda/Makefile +++ b/math/hs-Agda/Makefile @@ -1,99 +1,100 @@ PORTNAME= Agda PORTVERSION= 2.6.2.2 PORTREVISION= 1 CATEGORIES= math haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Dependently typed functional programming language and proof assistant LICENSE= UNKNOWN LICENSE_NAME= custom LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept BROKEN_i386= Compiler goes out of memory BUILD_DEPENDS= emacs:editors/emacs USES= cabal USE_LOCALE= en_US.UTF-8 USE_CABAL= OneTuple-0.3.1_2 \ QuickCheck-2.14.2 \ STMonadTrans-0.4.6_1 \ StateVar-1.2.2 \ aeson-2.0.3.0 \ alex-3.2.7.1 \ assoc-1.0.2_2 \ async-2.2.4_1 \ attoparsec-0.14.4_1 \ base-compat-0.12.1 \ base-compat-batteries-0.12.1_2 \ base-orphans-0.8.6 \ bifunctors-5.5.12 \ blaze-builder-0.4.2.2_1 \ blaze-html-0.9.1.2_2 \ blaze-markup-0.8.2.8_2 \ boxes-0.1.5 \ case-insensitive-1.2.1.0 \ comonad-5.0.8_1 \ contravariant-1.5.5 \ data-fix-0.3.2_2 \ data-hash-0.2.0.1 \ distributive-0.6.2.1_1 \ dlist-1.0 \ edit-distance-0.2.2.1_1 \ equivalence-0.4 \ gitrev-1.3.1 \ happy-1.20.0_1 \ hashable-1.4.0.2 \ hashtables-1.3 \ indexed-traversable-0.1.2_1 \ indexed-traversable-instances-0.1.1 \ integer-logarithms-1.0.3.1_2 \ monad-control-1.0.3.1 \ murmur-hash-0.1.0.10 \ network-uri-2.6.4.1 \ parallel-3.2.2.0_4 \ primitive-0.7.3.0 \ random-1.2.1.1 \ regex-base-0.94.0.2 \ regex-tdfa-1.3.1.2 \ scientific-0.3.7.0_2 \ semialign-1.2.0.1_1 \ semigroupoids-5.3.7 \ split-0.2.3.4_2 \ splitmix-0.1.0.4 \ strict-0.4.0.1_4 \ tagged-0.8.6.1_2 \ text-short-0.1.5 \ th-abstraction-0.4.3.0 \ th-compat-0.1.3_1 \ these-1.1.1.1_5 \ time-compat-1.9.6.1_3 \ transformers-base-0.4.6 \ transformers-compat-0.7.1_1 \ unordered-containers-0.2.19.1 \ uri-encode-1.5.0.7_2 \ utf8-string-1.0.2 \ uuid-types-1.0.5_2 \ vector-0.12.3.1_1 \ witherable-0.4.2_2 \ zlib-0.6.3.0 EXECUTABLES= agda-mode agda +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} agda_DATADIR_VARS= Agda agda-mode_DATADIR_VARS= Agda post-build: # Do not compile Emacs mode files until https://github.com/agda/agda/issues/4610 is fixed # ${SETENV} Agda_datadir=${WRKSRC}/src/data $$(find ${WRKSRC}/dist-newstyle -name agda-mode -type f -perm +111) compile post-install: ${MKDIR} ${STAGEDIR}${DATADIR}/lib/prim/Agda find ${WRKSRC}/src/data/lib/prim/Agda -name '*.agda' -exec ${SETENV} ${PORTNAME}_datadir=${WRKSRC}/src/data ${STAGEDIR}${PREFIX}/libexec/cabal/agda {} \; cd ${WRKSRC}/src/data && ${COPYTREE_SHARE} lib ${STAGEDIR}${DATADIR} cd ${WRKSRC}/src/data && ${COPYTREE_SHARE} emacs-mode ${STAGEDIR}${DATADIR} .include diff --git a/security/hs-cryptol/Makefile b/security/hs-cryptol/Makefile index b3bf20ee10d8..87bfe3ce028e 100644 --- a/security/hs-cryptol/Makefile +++ b/security/hs-cryptol/Makefile @@ -1,130 +1,131 @@ PORTNAME= cryptol DISTVERSION= 2.13.0 CATEGORIES= security lang haskell MAINTAINER= yuri@FreeBSD.org COMMENT= Language of cryptography LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE # https://github.com/GaloisInc/libBF-hs/issues/2 BROKEN_aarch64= fails to build: src/LibBF/Mutable.hsc error: Couldn't match type `Int64' with `Int32' BROKEN_i386= One of dependencies doesn't build on i386 RUN_DEPENDS= z3:math/z3 USES= cabal CABAL_FLAGS= -relocatable USE_CABAL= GraphSCC-1.0.4 \ MemoTrie-0.6.10 \ OneTuple-0.3.1_2 \ QuickCheck-2.14.2 \ StateVar-1.2.2 \ adjunctions-4.4.1 \ alex-3.2.7.1 \ ansi-terminal-0.11.3 \ ansi-wl-pprint-0.6.9_3 \ arithmoi-0.12.0.1 \ assoc-1.0.2_2 \ async-2.2.4_1 \ attoparsec-0.14.4_1 \ base-compat-0.12.1 \ base-compat-batteries-0.12.1_2 \ base-orphans-0.8.6 \ bifunctors-5.5.12 \ bimap-0.5.0 \ bitwise-1.0.0.1_5 \ blaze-builder-0.4.2.2_1 \ blaze-html-0.9.1.2_2 \ blaze-markup-0.8.2.8_2 \ bv-sized-1.0.4 \ call-stack-0.4.0 \ case-insensitive-1.2.1.0 \ chimera-0.3.2.0 \ clock-0.8.3 \ colour-2.3.6 \ comonad-5.0.8_1 \ concurrent-extra-0.7.0.12 \ config-value-0.8.2.1 \ constraints-0.13.3 \ contravariant-1.5.5 \ cryptohash-sha1-0.11.101.0 \ data-binary-ieee754-0.4.4 \ deriving-compat-0.6.1 \ distributive-0.6.2.1_1 \ exact-pi-0.5.0.2 \ extra-1.7.10 \ fingertree-0.1.5.0 \ free-5.1.8 \ gitrev-1.3.1 \ happy-1.20.0_1 \ hashable-1.3.5.0_1 \ hashtables-1.2.4.2 \ heredoc-0.2.0.0 \ hsc2hs-0.68.8 \ indexed-traversable-0.1.2_1 \ indexed-traversable-instances-0.1.1 \ integer-logarithms-1.0.3.1_2 \ integer-roots-1.0.2.0 \ invariant-0.5.6 \ io-streams-1.5.2.1_2 \ kan-extensions-5.2.4 \ lens-5.1.1 \ libBF-0.6.3 \ megaparsec-9.2.1 \ mod-0.1.2.2 \ monad-control-1.0.3.1 \ monadLib-3.10.1 \ network-3.1.2.7 \ newtype-generics-0.6.1 \ numtype-dk-0.5.0.3 \ optparse-applicative-0.17.0.0 \ panic-0.4.0.1 \ parallel-3.2.2.0_4 \ parameterized-utils-2.1.5.0 \ parser-combinators-1.3.0 \ prettyprinter-1.7.1 \ primitive-0.7.3.0 \ profunctors-5.6.2_2 \ random-1.2.1.1 \ reflection-2.1.6_1 \ sbv-9.0 \ scientific-0.3.7.0_2 \ semigroupoids-5.3.7 \ semigroups-0.20 \ semirings-0.6_1 \ simple-smt-0.9.7 \ splitmix-0.1.0.4 \ strict-0.4.0.1_4 \ syb-0.7.2.1 \ tagged-0.8.6.1_2 \ temporary-1.3 \ tf-random-0.5 \ th-abstraction-0.4.3.0 \ th-lift-0.8.2_1 \ th-lift-instances-0.1.19 \ these-1.1.1.1_5 \ transformers-base-0.4.6 \ transformers-compat-0.7.1_1 \ type-equality-1_3 \ unbounded-delays-0.1.1.1 \ uniplate-1.6.13_1 \ unordered-containers-0.2.19.1 \ utf8-string-1.0.2 \ vector-0.12.3.1_1 \ versions-5.0.3 \ void-0.7.3 \ what4-1.3 \ zenc-0.1.2 \ zlib-0.6.3.0 \ zlib-bindings-0.1.1.5_2 -EXECUTABLES= cryptol cryptol-html +EXECUTABLES= cryptol cryptol-html +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} post-install: cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} .include diff --git a/textproc/hs-pandoc/Makefile b/textproc/hs-pandoc/Makefile index cece20947927..73972b841859 100644 --- a/textproc/hs-pandoc/Makefile +++ b/textproc/hs-pandoc/Makefile @@ -1,197 +1,204 @@ PORTNAME= pandoc PORTVERSION= 2.18 CATEGORIES= textproc haskell MAINTAINER= haskell@FreeBSD.org COMMENT= Conversion between markup formats BROKEN_aarch64= Causes compiler to crash LICENSE= GPLv2 USES= cabal OPTIONS_DEFINE= EMBED_DATA TRYPANDOC EMBED_DATA_DESC= Embed data files in binary for relocatable executable EMBED_DATA_CABAL_FLAGS= embed_data_files -EMBED_DATA_USE_CABAL= file-embed-0.0.15.0 TRYPANDOC_DESC= Build trypandoc cgi executable TRYPANDOC_CABAL_FLAGS= trypandoc TRYPANDOC_USE_CABAL= HUnit-1.6.2.0 auto-update-0.1.6 byteorder-1.0.4 \ call-stack-0.4.0 easy-file-0.2.2 \ fast-logger-3.1.1 http2-3.0.3 http-types-0.12.3 \ network-byte-order-0.1.6_1 network-run-0.2.4 \ old-time-1.1.0.3_2 psqueues-0.2.7.3 semigroups-0.19.1 \ time-manager-0.0.0 unix-compat-0.6 unix-time-0.4.7 \ unliftio-core-0.2.0.1_2 vault-0.3.1.5_1 void-0.7.3 \ wai-3.2.3 wai-extra-3.1.12.1 wai-logger-2.4.0 word8-0.1.3 TRYPANDOC_EXECUTABLES= trypandoc USE_CABAL= Glob-0.10.2_3 \ HsYAML-0.2.1.1 \ JuicyPixels-3.3.7 \ OneTuple-0.3.1_2 \ QuickCheck-2.14.2 \ SHA-1.6.4.4 \ StateVar-1.2.2 \ aeson-2.0.3.0 \ aeson-pretty-0.8.9_1 \ ansi-terminal-0.11.3 \ appar-0.1.8 \ asn1-encoding-0.9.6_2 \ asn1-parse-0.9.5 \ asn1-types-0.3.4 \ assoc-1.0.2_2 \ async-2.2.4_1 \ attoparsec-0.14.4_1 \ base-compat-0.12.1 \ base-compat-batteries-0.12.1_2 \ base-orphans-0.8.6 \ base16-bytestring-1.0.2.0 \ base64-bytestring-1.2.1.0 \ basement-0.0.14 \ bifunctors-5.5.12 \ blaze-builder-0.4.2.2_1 \ blaze-html-0.9.1.2_2 \ blaze-markup-0.8.2.8_2 \ byteorder-1.0.4 \ cabal-doctest-1.0.9_1 \ case-insensitive-1.2.1.0 \ cereal-0.5.8.2_1 \ citeproc-0.7 \ colour-2.3.6 \ commonmark-0.2.2 \ commonmark-extensions-0.2.3.2 \ commonmark-pandoc-0.2.1.2 \ comonad-5.0.8_1 \ conduit-1.3.4.2 \ conduit-extra-1.3.6 \ connection-0.3.1_1 \ contravariant-1.5.5 \ cookie-0.4.5 \ cryptonite-0.30 \ data-default-0.7.1.1 \ data-default-class-0.1.2.0 \ data-default-instances-containers-0.0.1 \ data-default-instances-dlist-0.0.1 \ data-default-instances-old-locale-0.0.1 \ data-fix-0.3.2_2 \ digest-0.0.1.3 \ distributive-0.6.2.1_1 \ dlist-1.0 \ doclayout-0.4 \ doctemplates-0.10.0.2 \ emojis-0.1.2 \ file-embed-0.0.15.0 \ haddock-library-1.10.0_3 \ happy-1.20.0_1 \ hashable-1.4.0.2 \ haskell-lexer-1.1 \ hourglass-0.2.12 \ hsc2hs-0.68.8 \ hslua-2.2.0_1 \ hslua-aeson-2.2.0_1 \ hslua-classes-2.2.0 \ hslua-core-2.2.0 \ hslua-marshalling-2.2.0_1 \ hslua-module-doclayout-1.0.4 \ hslua-module-path-1.0.2 \ hslua-module-system-1.0.2 \ hslua-module-text-1.0.2 \ hslua-module-version-1.0.2 \ hslua-objectorientation-2.2.0.1 \ hslua-packaging-2.2.0.1 \ http-client-0.7.11_1 \ http-client-tls-0.3.6.1 \ http-types-0.12.3 \ indexed-traversable-0.1.2_1 \ indexed-traversable-instances-0.1.1 \ integer-logarithms-1.0.3.1_2 \ iproute-1.7.12 \ ipynb-0.2_1 \ jira-wiki-markup-1.4.0_1 \ libyaml-0.1.2 \ lpeg-1.0.3 \ lua-2.2.0 \ memory-0.17.0 \ mime-types-0.1.0.9 \ mono-traversable-1.0.15.3 \ network-3.1.2.7 \ network-uri-2.6.4.1 \ old-locale-1.0.0.7_2 \ pandoc-lua-marshal-0.1.6 \ pandoc-types-1.22.2 \ pem-0.2.4 \ pretty-show-1.10 \ primitive-0.7.4.0 \ random-1.2.1.1 \ resourcet-1.2.5 \ safe-0.3.19 \ scientific-0.3.7.0_2 \ semialign-1.2.0.1_1 \ semigroupoids-5.3.7 \ skylighting-0.12.3.1 \ skylighting-core-0.12.3.1 \ socks-0.6.1 \ split-0.2.3.4_2 \ splitmix-0.1.0.4 \ streaming-commons-0.2.2.4 \ strict-0.4.0.1_4 \ syb-0.7.2.1 \ tagged-0.8.6.1_2 \ tagsoup-0.14.8 \ temporary-1.3 \ texmath-0.12.5.1 \ text-conversions-0.3.1.1 \ text-short-0.1.5 \ th-abstraction-0.4.3.0 \ th-compat-0.1.3_1 \ th-lift-0.8.2_1 \ th-lift-instances-0.1.19 \ these-1.1.1.1_5 \ time-compat-1.9.6.1_3 \ tls-1.5.8 \ transformers-compat-0.7.1_1 \ typed-process-0.2.10.1 \ unicode-collation-0.1.3.2 \ unicode-data-0.3.0_1 \ unicode-transforms-0.4.0.1 \ uniplate-1.6.13_1 \ unliftio-core-0.2.0.1_2 \ unordered-containers-0.2.19.1 \ utf8-string-1.0.2 \ uuid-types-1.0.5_2 \ vector-0.12.3.1_2 \ vector-algorithms-0.8.0.4_1 \ witherable-0.4.2_2 \ x509-1.7.7 \ x509-store-1.6.9 \ x509-system-1.6.7 \ x509-validation-1.6.12 \ xml-1.3.14_2 \ xml-conduit-1.9.1.1_1 \ xml-types-0.3.8 \ yaml-0.11.8.0 \ zip-archive-0.4.2.1 \ zlib-0.6.3.0 -CABAL_PROJECT= remove -EXECUTABLES= pandoc +CABAL_PROJECT= remove +EXECUTABLES= pandoc +CABAL_WRAPPER_SCRIPTS= ${EXECUTABLES} OPTIONS_SUB= yes +.include + +.if ${PORT_OPTIONS:MEMBED_DATA} +# No need to use wrapper scripts when all data is compiled into an executable +.undef CABAL_WRAPPER_SCRIPTS +.endif + .include .if ${ARCH} == i386 # compiler goes out of memory BUILD_ARGS+= --disable-optimization .endif post-install-EMBED_DATA-off: cd ${WRKSRC} && ${COPYTREE_SHARE} data ${STAGEDIR}${DATADIR} post-install: ${INSTALL_MAN} ${WRKSRC}/man/pandoc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 .include