Skip to content

Commit 042cb14

Browse files
committed
www/py-nh3: New port
This package offers Python bindings to the ammonia HTML sanitization library (see https://github.com/rust-ammonia/ammonia) and it has many options to customize the sanitization.
1 parent d42dbe9 commit 042cb14

File tree

5 files changed

+240
-0
lines changed

5 files changed

+240
-0
lines changed

‎www/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,7 @@
17381738
SUBDIR += py-multidict
17391739
SUBDIR += py-mwoauth
17401740
SUBDIR += py-nevow
1741+
SUBDIR += py-nh3
17411742
SUBDIR += py-notebook
17421743
SUBDIR += py-onetimepass
17431744
SUBDIR += py-openbrokerapi

‎www/py-nh3/Makefile‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PORTNAME= nh3
2+
DISTVERSIONPREFIX= v
3+
DISTVERSION= 0.2.15
4+
CATEGORIES= www python
5+
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
6+
7+
MAINTAINER= kai@FreeBSD.org
8+
COMMENT= Python Bindings to the ammonia HTML sanitization library
9+
WWW= https://github.com/messense/nh3
10+
11+
LICENSE= MIT
12+
LICENSE_FILE= ${WRKSRC}/LICENSE
13+
14+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}maturin>=1.0<2.0:devel/py-maturin@${PY_FLAVOR}
15+
16+
USES= cargo python
17+
USE_GITHUB= yes
18+
GH_ACCOUNT= messense
19+
USE_PYTHON= autoplist pep517
20+
21+
CARGO_BUILD= no
22+
CARGO_INSTALL= no
23+
24+
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
25+
26+
post-install:
27+
${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
28+
29+
.include <bsd.port.mk>

‎www/py-nh3/Makefile.crates‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
CARGO_CRATES= ammonia-3.3.0 \
2+
autocfg-1.1.0 \
3+
bitflags-1.3.2 \
4+
cfg-if-1.0.0 \
5+
form_urlencoded-1.2.1 \
6+
futf-0.1.5 \
7+
getrandom-0.2.11 \
8+
heck-0.4.1 \
9+
html5ever-0.26.0 \
10+
idna-0.5.0 \
11+
indoc-2.0.4 \
12+
libc-0.2.150 \
13+
lock_api-0.4.11 \
14+
log-0.4.20 \
15+
mac-0.1.1 \
16+
maplit-1.0.2 \
17+
markup5ever-0.11.0 \
18+
memoffset-0.9.0 \
19+
new_debug_unreachable-1.0.4 \
20+
once_cell-1.19.0 \
21+
parking_lot-0.12.1 \
22+
parking_lot_core-0.9.9 \
23+
percent-encoding-2.3.1 \
24+
phf-0.10.1 \
25+
phf_codegen-0.10.0 \
26+
phf_generator-0.10.0 \
27+
phf_shared-0.10.0 \
28+
ppv-lite86-0.2.17 \
29+
precomputed-hash-0.1.1 \
30+
proc-macro2-1.0.70 \
31+
pyo3-0.20.0 \
32+
pyo3-build-config-0.20.0 \
33+
pyo3-ffi-0.20.0 \
34+
pyo3-macros-0.20.0 \
35+
pyo3-macros-backend-0.20.0 \
36+
quote-1.0.33 \
37+
rand-0.8.5 \
38+
rand_chacha-0.3.1 \
39+
rand_core-0.6.4 \
40+
redox_syscall-0.4.1 \
41+
scopeguard-1.2.0 \
42+
serde-1.0.193 \
43+
serde_derive-1.0.193 \
44+
siphasher-0.3.11 \
45+
smallvec-1.11.2 \
46+
string_cache-0.8.7 \
47+
string_cache_codegen-0.5.2 \
48+
syn-1.0.109 \
49+
syn-2.0.39 \
50+
target-lexicon-0.12.12 \
51+
tendril-0.4.3 \
52+
tinyvec-1.6.0 \
53+
tinyvec_macros-0.1.1 \
54+
unicode-bidi-0.3.14 \
55+
unicode-ident-1.0.12 \
56+
unicode-normalization-0.1.22 \
57+
unindent-0.2.3 \
58+
url-2.5.0 \
59+
utf-8-0.7.6 \
60+
wasi-0.11.0+wasi-snapshot-preview1 \
61+
windows-targets-0.48.5 \
62+
windows_aarch64_gnullvm-0.48.5 \
63+
windows_aarch64_msvc-0.48.5 \
64+
windows_i686_gnu-0.48.5 \
65+
windows_i686_msvc-0.48.5 \
66+
windows_x86_64_gnu-0.48.5 \
67+
windows_x86_64_gnullvm-0.48.5 \
68+
windows_x86_64_msvc-0.48.5

‎www/py-nh3/distinfo‎

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
TIMESTAMP = 1705686727
2+
SHA256 (rust/crates/ammonia-3.3.0.crate) = 64e6d1c7838db705c9b756557ee27c384ce695a1c51a6fe528784cb1c6840170
3+
SIZE (rust/crates/ammonia-3.3.0.crate) = 46061
4+
SHA256 (rust/crates/autocfg-1.1.0.crate) = d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa
5+
SIZE (rust/crates/autocfg-1.1.0.crate) = 13272
6+
SHA256 (rust/crates/bitflags-1.3.2.crate) = bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a
7+
SIZE (rust/crates/bitflags-1.3.2.crate) = 23021
8+
SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
9+
SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
10+
SHA256 (rust/crates/form_urlencoded-1.2.1.crate) = e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456
11+
SIZE (rust/crates/form_urlencoded-1.2.1.crate) = 8969
12+
SHA256 (rust/crates/futf-0.1.5.crate) = df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843
13+
SIZE (rust/crates/futf-0.1.5.crate) = 11344
14+
SHA256 (rust/crates/getrandom-0.2.11.crate) = fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f
15+
SIZE (rust/crates/getrandom-0.2.11.crate) = 35391
16+
SHA256 (rust/crates/heck-0.4.1.crate) = 95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8
17+
SIZE (rust/crates/heck-0.4.1.crate) = 11567
18+
SHA256 (rust/crates/html5ever-0.26.0.crate) = bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7
19+
SIZE (rust/crates/html5ever-0.26.0.crate) = 72921
20+
SHA256 (rust/crates/idna-0.5.0.crate) = 634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6
21+
SIZE (rust/crates/idna-0.5.0.crate) = 271940
22+
SHA256 (rust/crates/indoc-2.0.4.crate) = 1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8
23+
SIZE (rust/crates/indoc-2.0.4.crate) = 14311
24+
SHA256 (rust/crates/libc-0.2.150.crate) = 89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c
25+
SIZE (rust/crates/libc-0.2.150.crate) = 719359
26+
SHA256 (rust/crates/lock_api-0.4.11.crate) = 3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45
27+
SIZE (rust/crates/lock_api-0.4.11.crate) = 27487
28+
SHA256 (rust/crates/log-0.4.20.crate) = b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f
29+
SIZE (rust/crates/log-0.4.20.crate) = 38307
30+
SHA256 (rust/crates/mac-0.1.1.crate) = c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4
31+
SIZE (rust/crates/mac-0.1.1.crate) = 4838
32+
SHA256 (rust/crates/maplit-1.0.2.crate) = 3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d
33+
SIZE (rust/crates/maplit-1.0.2.crate) = 8871
34+
SHA256 (rust/crates/markup5ever-0.11.0.crate) = 7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016
35+
SIZE (rust/crates/markup5ever-0.11.0.crate) = 34667
36+
SHA256 (rust/crates/memoffset-0.9.0.crate) = 5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c
37+
SIZE (rust/crates/memoffset-0.9.0.crate) = 9033
38+
SHA256 (rust/crates/new_debug_unreachable-1.0.4.crate) = e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54
39+
SIZE (rust/crates/new_debug_unreachable-1.0.4.crate) = 2561
40+
SHA256 (rust/crates/once_cell-1.19.0.crate) = 3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92
41+
SIZE (rust/crates/once_cell-1.19.0.crate) = 33046
42+
SHA256 (rust/crates/parking_lot-0.12.1.crate) = 3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f
43+
SIZE (rust/crates/parking_lot-0.12.1.crate) = 40967
44+
SHA256 (rust/crates/parking_lot_core-0.9.9.crate) = 4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e
45+
SIZE (rust/crates/parking_lot_core-0.9.9.crate) = 32445
46+
SHA256 (rust/crates/percent-encoding-2.3.1.crate) = e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e
47+
SIZE (rust/crates/percent-encoding-2.3.1.crate) = 10235
48+
SHA256 (rust/crates/phf-0.10.1.crate) = fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259
49+
SIZE (rust/crates/phf-0.10.1.crate) = 5406
50+
SHA256 (rust/crates/phf_codegen-0.10.0.crate) = 4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd
51+
SIZE (rust/crates/phf_codegen-0.10.0.crate) = 3402
52+
SHA256 (rust/crates/phf_generator-0.10.0.crate) = 5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6
53+
SIZE (rust/crates/phf_generator-0.10.0.crate) = 7525
54+
SHA256 (rust/crates/phf_shared-0.10.0.crate) = b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096
55+
SIZE (rust/crates/phf_shared-0.10.0.crate) = 4095
56+
SHA256 (rust/crates/ppv-lite86-0.2.17.crate) = 5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de
57+
SIZE (rust/crates/ppv-lite86-0.2.17.crate) = 22242
58+
SHA256 (rust/crates/precomputed-hash-0.1.1.crate) = 925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c
59+
SIZE (rust/crates/precomputed-hash-0.1.1.crate) = 1640
60+
SHA256 (rust/crates/proc-macro2-1.0.70.crate) = 39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b
61+
SIZE (rust/crates/proc-macro2-1.0.70.crate) = 44343
62+
SHA256 (rust/crates/pyo3-0.20.0.crate) = 04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b
63+
SIZE (rust/crates/pyo3-0.20.0.crate) = 431766
64+
SHA256 (rust/crates/pyo3-build-config-0.20.0.crate) = a96fe70b176a89cff78f2fa7b3c930081e163d5379b4dcdf993e3ae29ca662e5
65+
SIZE (rust/crates/pyo3-build-config-0.20.0.crate) = 29534
66+
SHA256 (rust/crates/pyo3-ffi-0.20.0.crate) = 214929900fd25e6604661ed9cf349727c8920d47deff196c4e28165a6ef2a96b
67+
SIZE (rust/crates/pyo3-ffi-0.20.0.crate) = 64220
68+
SHA256 (rust/crates/pyo3-macros-0.20.0.crate) = dac53072f717aa1bfa4db832b39de8c875b7c7af4f4a6fe93cdbf9264cf8383b
69+
SIZE (rust/crates/pyo3-macros-0.20.0.crate) = 7678
70+
SHA256 (rust/crates/pyo3-macros-backend-0.20.0.crate) = 7774b5a8282bd4f25f803b1f0d945120be959a36c72e08e7cd031c792fdfd424
71+
SIZE (rust/crates/pyo3-macros-backend-0.20.0.crate) = 49383
72+
SHA256 (rust/crates/quote-1.0.33.crate) = 5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
73+
SIZE (rust/crates/quote-1.0.33.crate) = 28090
74+
SHA256 (rust/crates/rand-0.8.5.crate) = 34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404
75+
SIZE (rust/crates/rand-0.8.5.crate) = 87113
76+
SHA256 (rust/crates/rand_chacha-0.3.1.crate) = e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88
77+
SIZE (rust/crates/rand_chacha-0.3.1.crate) = 15251
78+
SHA256 (rust/crates/rand_core-0.6.4.crate) = ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c
79+
SIZE (rust/crates/rand_core-0.6.4.crate) = 22666
80+
SHA256 (rust/crates/redox_syscall-0.4.1.crate) = 4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa
81+
SIZE (rust/crates/redox_syscall-0.4.1.crate) = 24858
82+
SHA256 (rust/crates/scopeguard-1.2.0.crate) = 94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49
83+
SIZE (rust/crates/scopeguard-1.2.0.crate) = 11619
84+
SHA256 (rust/crates/serde-1.0.193.crate) = 25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89
85+
SIZE (rust/crates/serde-1.0.193.crate) = 76863
86+
SHA256 (rust/crates/serde_derive-1.0.193.crate) = 43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3
87+
SIZE (rust/crates/serde_derive-1.0.193.crate) = 55692
88+
SHA256 (rust/crates/siphasher-0.3.11.crate) = 38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d
89+
SIZE (rust/crates/siphasher-0.3.11.crate) = 10442
90+
SHA256 (rust/crates/smallvec-1.11.2.crate) = 4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970
91+
SIZE (rust/crates/smallvec-1.11.2.crate) = 34801
92+
SHA256 (rust/crates/string_cache-0.8.7.crate) = f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b
93+
SIZE (rust/crates/string_cache-0.8.7.crate) = 16655
94+
SHA256 (rust/crates/string_cache_codegen-0.5.2.crate) = 6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988
95+
SIZE (rust/crates/string_cache_codegen-0.5.2.crate) = 8156
96+
SHA256 (rust/crates/syn-1.0.109.crate) = 72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237
97+
SIZE (rust/crates/syn-1.0.109.crate) = 237611
98+
SHA256 (rust/crates/syn-2.0.39.crate) = 23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
99+
SIZE (rust/crates/syn-2.0.39.crate) = 244129
100+
SHA256 (rust/crates/target-lexicon-0.12.12.crate) = 14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a
101+
SIZE (rust/crates/target-lexicon-0.12.12.crate) = 25156
102+
SHA256 (rust/crates/tendril-0.4.3.crate) = d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0
103+
SIZE (rust/crates/tendril-0.4.3.crate) = 37210
104+
SHA256 (rust/crates/tinyvec-1.6.0.crate) = 87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50
105+
SIZE (rust/crates/tinyvec-1.6.0.crate) = 45991
106+
SHA256 (rust/crates/tinyvec_macros-0.1.1.crate) = 1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20
107+
SIZE (rust/crates/tinyvec_macros-0.1.1.crate) = 5865
108+
SHA256 (rust/crates/unicode-bidi-0.3.14.crate) = 6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416
109+
SIZE (rust/crates/unicode-bidi-0.3.14.crate) = 56429
110+
SHA256 (rust/crates/unicode-ident-1.0.12.crate) = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
111+
SIZE (rust/crates/unicode-ident-1.0.12.crate) = 42168
112+
SHA256 (rust/crates/unicode-normalization-0.1.22.crate) = 5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921
113+
SIZE (rust/crates/unicode-normalization-0.1.22.crate) = 122604
114+
SHA256 (rust/crates/unindent-0.2.3.crate) = c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce
115+
SIZE (rust/crates/unindent-0.2.3.crate) = 7306
116+
SHA256 (rust/crates/url-2.5.0.crate) = 31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633
117+
SIZE (rust/crates/url-2.5.0.crate) = 78605
118+
SHA256 (rust/crates/utf-8-0.7.6.crate) = 09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9
119+
SIZE (rust/crates/utf-8-0.7.6.crate) = 10422
120+
SHA256 (rust/crates/wasi-0.11.0+wasi-snapshot-preview1.crate) = 9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423
121+
SIZE (rust/crates/wasi-0.11.0+wasi-snapshot-preview1.crate) = 28131
122+
SHA256 (rust/crates/windows-targets-0.48.5.crate) = 9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c
123+
SIZE (rust/crates/windows-targets-0.48.5.crate) = 6904
124+
SHA256 (rust/crates/windows_aarch64_gnullvm-0.48.5.crate) = 2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8
125+
SIZE (rust/crates/windows_aarch64_gnullvm-0.48.5.crate) = 418492
126+
SHA256 (rust/crates/windows_aarch64_msvc-0.48.5.crate) = dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc
127+
SIZE (rust/crates/windows_aarch64_msvc-0.48.5.crate) = 798483
128+
SHA256 (rust/crates/windows_i686_gnu-0.48.5.crate) = a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e
129+
SIZE (rust/crates/windows_i686_gnu-0.48.5.crate) = 844891
130+
SHA256 (rust/crates/windows_i686_msvc-0.48.5.crate) = 8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406
131+
SIZE (rust/crates/windows_i686_msvc-0.48.5.crate) = 864300
132+
SHA256 (rust/crates/windows_x86_64_gnu-0.48.5.crate) = 53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e
133+
SIZE (rust/crates/windows_x86_64_gnu-0.48.5.crate) = 801619
134+
SHA256 (rust/crates/windows_x86_64_gnullvm-0.48.5.crate) = 0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc
135+
SIZE (rust/crates/windows_x86_64_gnullvm-0.48.5.crate) = 418486
136+
SHA256 (rust/crates/windows_x86_64_msvc-0.48.5.crate) = ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538
137+
SIZE (rust/crates/windows_x86_64_msvc-0.48.5.crate) = 798412
138+
SHA256 (messense-nh3-v0.2.15_GH0.tar.gz) = 48d5bd02a4e598d07b4e43f43652356c8670d37ec9742cc5fd0988492439a8d7
139+
SIZE (messense-nh3-v0.2.15_GH0.tar.gz) = 13922

‎www/py-nh3/pkg-descr‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This package offers Python bindings to the ammonia HTML sanitization library
2+
(see https://github.com/rust-ammonia/ammonia) and it has many options to
3+
customize the sanitization.

0 commit comments

Comments
 (0)