Skip to content

Commit

Permalink
graphics/librsvg2-rust: convert to USES=cargo
Browse files Browse the repository at this point in the history
https://gitlab.gnome.org/GNOME/librsvg/-/commit/7e5e7e5b76d0

PR:		270290
Exp-run by:	antoine
Approved by:	tcberner
  • Loading branch information
jbeich committed Mar 22, 2023
1 parent 0fc8442 commit c9c14b8
Show file tree
Hide file tree
Showing 3 changed files with 811 additions and 20 deletions.
32 changes: 14 additions & 18 deletions graphics/librsvg2-rust/Makefile
@@ -1,25 +1,25 @@
PORTNAME= librsvg
PORTVERSION= 2.54.5
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= graphics gnome
MASTER_SITES= GNOME
PKGNAMESUFFIX= 2-rust
DIST_SUBDIR= gnome2
# XXX Teach USES=cargo to have proper default
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= desktop@FreeBSD.org
COMMENT= Library for parsing and rendering SVG vector-graphic files
WWW= https://live.gnome.org/LibRsvg

LICENSE= LGPL20

BUILD_DEPENDS= ${RUST_DEFAULT}>=1.39.0:lang/${RUST_DEFAULT} \
rst2man:textproc/py-docutils
BUILD_DEPENDS= rst2man:textproc/py-docutils
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libpng.so:graphics/png

USES= compiler:c11 cpe gettext gmake gnome libtool pkgconfig tar:xz vala:build
USES= cargo compiler:c11 cpe gettext gmake gnome libtool pkgconfig tar:xz vala:build
CPE_VENDOR= gnome
USE_GNOME= cairo gdkpixbuf2 libxml2 pango introspection:build
USE_LDCONFIG= yes
Expand All @@ -30,13 +30,12 @@ CONFIGURE_ARGS= --disable-Bsymbolic \
--disable-dependency-tracking \
--disable-static \
--enable-vala
# Make sure it uses the Rust toolchain from ports.
CONFIGURE_ENV= CARGO=${LOCALBASE}/bin/cargo \
RUSTC=${LOCALBASE}/bin/rustc \
RUSTFLAGS="${RUSTFLAGS} -C linker=${CC:Q} ${LDFLAGS:C/.+/-C link-arg=&/}"
MAKE_ENV= CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \
RUSTC=${LOCALBASE}/bin/rustc \
RUSTFLAGS="${RUSTFLAGS} -C linker=${CC:Q} ${LDFLAGS:C/.+/-C link-arg=&/}"
CONFIGURE_ENV= ${CARGO_ENV}
MAKE_ENV= ${CARGO_ENV}
CARGO_ENV= RUST_TARGET=${CARGO_BUILD_TARGET}
CARGO_BUILD= no
CARGO_INSTALL= no
CARGO_TEST= no
INSTALL_TARGET= install-strip
TEST_TARGET= check

Expand All @@ -48,11 +47,8 @@ DOCS_BUILD_DEPENDS= gi-docgen:textproc/py-gi-docgen
DOCS_CONFIGURE_ENABLE= gtk-doc

post-patch:
# Disable vendor checksums
@${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \
${WRKSRC}/vendor/*/.cargo-checksum.json

pre-configure:
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${LOCALBASE}/bin/cargo update
# Add explicit <triple> subdir for --target from USES=cargo
@${REINPLACE_CMD} 's/test "x$$cross_compiling" = "xyes"/true/' \
${WRKSRC}/configure

.include <bsd.port.mk>
265 changes: 265 additions & 0 deletions graphics/librsvg2-rust/Makefile.crates
@@ -0,0 +1,265 @@
CARGO_CRATES= adler-1.0.2 \
adler32-1.2.0 \
aho-corasick-0.7.18 \
android_system_properties-0.1.4 \
ansi_term-0.12.1 \
anyhow-1.0.62 \
approx-0.5.1 \
assert_cmd-2.0.4 \
atty-0.2.14 \
autocfg-1.1.0 \
base-x-0.2.11 \
bit-set-0.5.3 \
bit-vec-0.6.3 \
bitflags-1.3.2 \
block-0.1.6 \
bstr-0.2.17 \
bumpalo-3.11.0 \
bytemuck-1.12.1 \
byteorder-1.4.3 \
cairo-rs-0.15.12 \
cairo-sys-rs-0.15.1 \
cast-0.3.0 \
cfg-expr-0.10.3 \
cfg-if-1.0.0 \
chrono-0.4.22 \
clap-2.34.0 \
const-cstr-0.3.0 \
const_fn-0.4.9 \
convert_case-0.4.0 \
core-foundation-sys-0.8.3 \
crc32fast-1.3.2 \
criterion-0.3.6 \
criterion-plot-0.4.5 \
crossbeam-channel-0.5.6 \
crossbeam-deque-0.8.2 \
crossbeam-epoch-0.9.10 \
crossbeam-utils-0.8.11 \
cssparser-0.28.1 \
cssparser-macros-0.6.0 \
csv-1.1.6 \
csv-core-0.1.10 \
data-url-0.1.1 \
deflate-1.0.0 \
derive_more-0.99.17 \
difflib-0.4.0 \
discard-1.0.4 \
doc-comment-0.3.3 \
dtoa-0.4.8 \
dtoa-short-0.3.3 \
either-1.8.0 \
encoding-0.2.33 \
encoding-index-japanese-1.20141219.5 \
encoding-index-korean-1.20141219.5 \
encoding-index-simpchinese-1.20141219.5 \
encoding-index-singlebyte-1.20141219.5 \
encoding-index-tradchinese-1.20141219.5 \
encoding_index_tests-0.1.4 \
fastrand-1.8.0 \
flate2-1.0.24 \
float-cmp-0.9.0 \
fnv-1.0.7 \
form_urlencoded-1.0.1 \
futf-0.1.5 \
futures-channel-0.3.23 \
futures-core-0.3.23 \
futures-executor-0.3.23 \
futures-io-0.3.23 \
futures-task-0.3.23 \
futures-util-0.3.23 \
fxhash-0.2.1 \
gdk-pixbuf-0.15.11 \
gdk-pixbuf-sys-0.15.10 \
getrandom-0.1.16 \
getrandom-0.2.7 \
gio-0.15.12 \
gio-sys-0.15.10 \
glib-0.15.12 \
glib-macros-0.15.11 \
glib-sys-0.15.10 \
glob-0.3.0 \
gobject-sys-0.15.10 \
half-1.8.2 \
heck-0.4.0 \
hermit-abi-0.1.19 \
iana-time-zone-0.1.46 \
idna-0.2.3 \
instant-0.1.12 \
itertools-0.10.3 \
itoa-0.4.8 \
itoa-1.0.3 \
js-sys-0.3.59 \
language-tags-0.3.2 \
lazy_static-1.4.0 \
libc-0.2.132 \
linked-hash-map-0.5.6 \
locale_config-0.3.0 \
lock_api-0.4.7 \
log-0.4.17 \
lopdf-0.26.0 \
lzw-0.10.0 \
mac-0.1.1 \
malloc_buf-0.0.6 \
markup5ever-0.10.1 \
matches-0.1.9 \
matrixmultiply-0.3.2 \
memchr-2.5.0 \
memoffset-0.6.5 \
miniz_oxide-0.5.3 \
nalgebra-0.29.0 \
nalgebra-macros-0.1.0 \
new_debug_unreachable-1.0.4 \
nodrop-0.1.14 \
normalize-line-endings-0.3.0 \
num-complex-0.4.2 \
num-integer-0.1.45 \
num-rational-0.4.1 \
num-traits-0.2.15 \
num_cpus-1.13.1 \
objc-0.2.7 \
objc-foundation-0.1.1 \
objc_id-0.1.1 \
once_cell-1.13.1 \
oorandom-11.1.3 \
pango-0.15.10 \
pango-sys-0.15.10 \
pangocairo-0.15.1 \
pangocairo-sys-0.15.1 \
parking_lot-0.12.1 \
parking_lot_core-0.9.3 \
paste-1.0.8 \
percent-encoding-2.1.0 \
phf-0.8.0 \
phf_codegen-0.8.0 \
phf_generator-0.8.0 \
phf_generator-0.10.0 \
phf_macros-0.8.0 \
phf_shared-0.8.0 \
phf_shared-0.10.0 \
pin-project-lite-0.2.9 \
pin-utils-0.1.0 \
pkg-config-0.3.25 \
plotters-0.3.3 \
plotters-backend-0.3.4 \
plotters-svg-0.3.3 \
png-0.17.5 \
pom-3.2.0 \
ppv-lite86-0.2.16 \
precomputed-hash-0.1.1 \
predicates-2.1.1 \
predicates-core-1.0.3 \
predicates-tree-1.0.5 \
proc-macro-crate-1.2.1 \
proc-macro-error-1.0.4 \
proc-macro-error-attr-1.0.4 \
proc-macro-hack-0.5.19 \
proc-macro2-0.4.30 \
proc-macro2-1.0.43 \
proptest-1.0.0 \
quick-error-1.2.3 \
quick-error-2.0.1 \
quote-0.6.13 \
quote-1.0.21 \
rand-0.7.3 \
rand-0.8.5 \
rand_chacha-0.2.2 \
rand_chacha-0.3.1 \
rand_core-0.5.1 \
rand_core-0.6.3 \
rand_hc-0.2.0 \
rand_pcg-0.2.1 \
rand_xorshift-0.3.0 \
rawpointer-0.2.1 \
rayon-1.5.3 \
rayon-core-1.9.3 \
rctree-0.4.0 \
redox_syscall-0.2.16 \
regex-1.6.0 \
regex-automata-0.1.10 \
regex-syntax-0.6.27 \
remove_dir_all-0.5.3 \
rgb-0.8.33 \
rustc_version-0.2.3 \
rustc_version-0.4.0 \
rusty-fork-0.3.0 \
ryu-1.0.11 \
safe_arch-0.6.0 \
same-file-1.0.6 \
scopeguard-1.1.0 \
selectors-0.23.0 \
semver-0.9.0 \
semver-1.0.13 \
semver-parser-0.7.0 \
serde-1.0.144 \
serde_cbor-0.11.2 \
serde_derive-1.0.144 \
serde_json-1.0.85 \
servo_arc-0.1.1 \
sha1-0.6.1 \
sha1_smol-1.0.0 \
simba-0.6.0 \
siphasher-0.3.10 \
slab-0.4.7 \
smallvec-1.9.0 \
stable_deref_trait-1.2.0 \
standback-0.2.17 \
stdweb-0.4.20 \
stdweb-derive-0.5.3 \
stdweb-internal-macros-0.2.9 \
stdweb-internal-runtime-0.1.5 \
string_cache-0.8.4 \
string_cache_codegen-0.5.2 \
strsim-0.8.0 \
syn-0.15.44 \
syn-1.0.99 \
system-deps-6.0.2 \
tempfile-3.3.0 \
tendril-0.4.3 \
termtree-0.2.4 \
test-generator-0.3.0 \
textwrap-0.11.0 \
thiserror-1.0.32 \
thiserror-impl-1.0.32 \
time-0.1.44 \
time-0.2.27 \
time-macros-0.1.1 \
time-macros-impl-0.1.2 \
tinytemplate-1.2.1 \
tinyvec-1.6.0 \
tinyvec_macros-0.1.0 \
toml-0.5.9 \
typenum-1.15.0 \
unicode-bidi-0.3.8 \
unicode-ident-1.0.3 \
unicode-normalization-0.1.21 \
unicode-width-0.1.9 \
unicode-xid-0.1.0 \
url-2.2.2 \
utf-8-0.7.6 \
vec_map-0.8.2 \
version-compare-0.1.0 \
version_check-0.9.4 \
wait-timeout-0.2.0 \
walkdir-2.3.2 \
wasi-0.9.0+wasi-snapshot-preview1 \
wasi-0.10.0+wasi-snapshot-preview1 \
wasi-0.11.0+wasi-snapshot-preview1 \
wasm-bindgen-0.2.82 \
wasm-bindgen-backend-0.2.82 \
wasm-bindgen-macro-0.2.82 \
wasm-bindgen-macro-support-0.2.82 \
wasm-bindgen-shared-0.2.82 \
web-sys-0.3.59 \
wide-0.7.4 \
winapi-0.3.9 \
winapi-i686-pc-windows-gnu-0.4.0 \
winapi-util-0.1.5 \
winapi-x86_64-pc-windows-gnu-0.4.0 \
windows-sys-0.36.1 \
windows_aarch64_msvc-0.36.1 \
windows_i686_gnu-0.36.1 \
windows_i686_msvc-0.36.1 \
windows_x86_64_gnu-0.36.1 \
windows_x86_64_msvc-0.36.1 \
xml5ever-0.16.2 \
yeslogic-fontconfig-sys-2.11.2

0 comments on commit c9c14b8

Please sign in to comment.