aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/librsvg2-rust/Makefile
blob: 495de516ab46d621f32b0673d6310ac54c3fd1f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Created by: Ade Lovett <ade@FreeBSD.org>
# $FreeBSD$

PORTNAME=   librsvg
PORTVERSION=    2.46.0
CATEGORIES= graphics gnome
MASTER_SITES=   GNOME
PKGNAMESUFFIX=  2-rust
DIST_SUBDIR=    gnome2

MAINTAINER= tobik@FreeBSD.org
COMMENT=    Library for parsing and rendering SVG vector-graphic files

LICENSE=    LGPL20

BUILD_DEPENDS=  ${RUST_DEFAULT}>=1.34.0:lang/${RUST_DEFAULT} \
        valac:lang/vala
LIB_DEPENDS=    libfreetype.so:print/freetype2 \
        libfontconfig.so:x11-fonts/fontconfig \
        libpng.so:graphics/png \
        libcroco-0.6.so:textproc/libcroco

USES=       gettext gmake gnome libtool pkgconfig tar:xz
USE_GNOME=  cairo gdkpixbuf2 libxml2 pango gnomeprefix introspection:build
USE_LDCONFIG=   yes

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-vala \
        --disable-Bsymbolic \
        --disable-dependency-tracking \
        --disable-static
# Make sure it uses the Rust toolchain from ports.
CONFIGURE_ENV=  CARGO=${LOCALBASE}/bin/cargo \
        RUSTC=${LOCALBASE}/bin/rustc
MAKE_ENV=   RUSTC=${LOCALBASE}/bin/rustc
INSTALL_TARGET= install-strip

CONFLICTS_INSTALL=  librsvg2

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

.include <bsd.port.mk>