diff options
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/py-mdformat/Makefile | 6 | ||||
-rw-r--r-- | textproc/tree-sitter-grammars/Makefile | 4 | ||||
-rw-r--r-- | textproc/tree-sitter-grammars/files/patch-src_main.rs | 8 |
3 files changed, 15 insertions, 3 deletions
diff --git a/textproc/py-mdformat/Makefile b/textproc/py-mdformat/Makefile index 043ff38dc623..989ab1be270d 100644 --- a/textproc/py-mdformat/Makefile +++ b/textproc/py-mdformat/Makefile @@ -1,13 +1,13 @@ # XXX: see below (post-patch target) before updating PORTNAME= mdformat DISTVERSION= 0.7.22 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= nivit@FreeBSD.org COMMENT= CommonMark compliant Markdown formatter -WWW= https://github.com/executablebooks/mdformat +WWW= https://github.com/hukkin/mdformat LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE @@ -17,7 +17,7 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61.0.0:devel/py-setuptools@${P RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=3.6.0:devel/py-importlib-metadata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markdown-it-py>=1<5:textproc/py-markdown-it-py@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mdurl>=0.1.2:textproc/py-mdurl@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tomli>=1.1.0:textproc/py-tomli@${PY_FLAVOR} \ + ${PY_TOMLI} \ ${PYTHON_PKGNAMEPREFIX}zipp>=0.5:devel/py-zipp@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}covdefaults>=2.3.0_1:devel/py-covdefaults@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-cov>=4.1.0:devel/py-pytest-cov@${PY_FLAVOR} \ diff --git a/textproc/tree-sitter-grammars/Makefile b/textproc/tree-sitter-grammars/Makefile index 586c9ea4c669..c2aec35d5499 100644 --- a/textproc/tree-sitter-grammars/Makefile +++ b/textproc/tree-sitter-grammars/Makefile @@ -60,6 +60,10 @@ post-extract: ${CP} ${DISTDIR}/${LANG_HASH}/languages.toml ${WRKSRC} +post-patch: + ${REINPLACE_CMD} "s#WRKDIR#${WRKDIR}#" \ + ${WRKSRC}/src/main.rs + post-build: cd ${WRKSRC}; \ ${CARGO_TARGET_DIR}/release/build-tree-sitter --output ./output --tmp ${WRKSRC}/grammars diff --git a/textproc/tree-sitter-grammars/files/patch-src_main.rs b/textproc/tree-sitter-grammars/files/patch-src_main.rs index 4197c86a3f26..ea6c62211292 100644 --- a/textproc/tree-sitter-grammars/files/patch-src_main.rs +++ b/textproc/tree-sitter-grammars/files/patch-src_main.rs @@ -31,3 +31,11 @@ let path = if let Some(subpath) = grammar.source.subpath.as_ref() { path.join(subpath) } else { +@@ -171,6 +171,7 @@ fn build_tree_sitter(name: &str, path: &Path, output: + fn build_tree_sitter(name: &str, path: &Path, output: &Path) -> Result<()> { + println!("-----------------------------------"); + println!("now building tree sitter for {name}"); ++ std::env::set_var("XDG_CACHE_HOME", "WRKDIR/.cache"); + let output = Command::new("tree-sitter") + .current_dir(path) + .arg("build") |