1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00

New port: graphics/librsvg2-rust

A newer version of graphics/librsvg2 that uses Rust.
This commit is contained in:
Tobias Kortkamp 2019-01-16 01:11:59 +00:00
parent 560a335ec7
commit 20a78f41da
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=490439
8 changed files with 123 additions and 0 deletions

View File

@ -497,6 +497,7 @@
SUBDIR += libraw
SUBDIR += libreatlas
SUBDIR += librsvg2
SUBDIR += librsvg2-rust
SUBDIR += libsixel
SUBDIR += libspiro
SUBDIR += libsvg

View File

@ -0,0 +1,48 @@
# Created by: Ade Lovett <ade@FreeBSD.org>
# $FreeBSD$
PORTNAME= librsvg
PORTVERSION= 2.45.4
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.27.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
INSTALL_TARGET= install-strip
# 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
CONFLICTS_INSTALL= librsvg2
post-patch:
# Avoid dependency loop with gtk3 (it depends on librsvg2), do not build rsvg-view
@${REINPLACE_CMD} -e 's|GTK3_REQUIRED=3.[0-9][0-9].[0-9]|GTK3_REQUIRED=9.90.0|g' \
${WRKSRC}/configure
# Disable vendor checksums
@${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \
${WRKSRC}/vendor/*/.cargo-checksum.json
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1547592661
SHA256 (gnome2/librsvg-2.45.4.tar.xz) = eeb6105cb28deec7a8a2ef270ae86b13fc555ff7dc85014a6b3e7cf0e88a7b4f
SIZE (gnome2/librsvg-2.45.4.tar.xz) = 13578068

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig 2019-01-15 23:06:06 UTC
+++ Makefile.in
@@ -1954,7 +1954,7 @@ $(RUST_LIB): $(RUST_SRC)
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='$(PKG_CONFIG)' \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
- cargo build $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS)
+ $(CARGO) build $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS)
librsvg/librsvg-enum-types.h: librsvg/s-enum-types-h
@true

View File

@ -0,0 +1,11 @@
--- configure.orig 2019-01-15 22:59:02 UTC
+++ configure
@@ -16420,7 +16420,7 @@ fi
MINIMUM_RUST_MAJOR=1
MINIMUM_RUST_MINOR=27
-rust_version=`rustc --version`
+rust_version=`$RUSTC --version`
version=`echo "$rust_version" | sed -e 's/^rustc //g'`
major=`echo "$version" | cut -d. -f1`
minor=`echo "$version" | cut -d. -f2`

View File

@ -0,0 +1,9 @@
The librsvg library is a lightweight library for parsing and rendering
vector-graphic files in SVG format (like the ones made by sodipodi). It also
includes functions that render anti-aliased fonts using freetype, including
caching of glyphs. It is used by Nautilus for drawing vector icons and
anti-aliased text.
This is a rustified version of LibRsvg.
WWW: http://live.gnome.org/LibRsvg

View File

@ -0,0 +1,39 @@
bin/rsvg-convert
include/librsvg-2.0/librsvg/librsvg-enum-types.h
include/librsvg-2.0/librsvg/librsvg-features.h
include/librsvg-2.0/librsvg/rsvg-cairo.h
include/librsvg-2.0/librsvg/rsvg.h
lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders/libpixbufloader-svg.so
lib/girepository-1.0/Rsvg-2.0.typelib
lib/librsvg-2.so
lib/librsvg-2.so.2
lib/librsvg-2.so.2.46.0
libdata/pkgconfig/librsvg-2.0.pc
man/man1/rsvg-convert.1.gz
share/doc/rsvg-2.0/annotation-glossary.html
share/doc/rsvg-2.0/api-index-full.html
share/doc/rsvg-2.0/ch01.html
share/doc/rsvg-2.0/home.png
share/doc/rsvg-2.0/index.html
share/doc/rsvg-2.0/left-insensitive.png
share/doc/rsvg-2.0/left.png
share/doc/rsvg-2.0/licence.html
share/doc/rsvg-2.0/object-tree.html
share/doc/rsvg-2.0/right-insensitive.png
share/doc/rsvg-2.0/right.png
share/doc/rsvg-2.0/rsvg-2.0.devhelp2
share/doc/rsvg-2.0/rsvg-RsvgHandle.html
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html
share/doc/rsvg-2.0/rsvg-Version-check-and-feature-tests.html
share/doc/rsvg-2.0/rsvg.html
share/doc/rsvg-2.0/style.css
share/doc/rsvg-2.0/up-insensitive.png
share/doc/rsvg-2.0/up.png
share/gir-1.0/Rsvg-2.0.gir
share/locale/es/LC_MESSAGES/librsvg.mo
share/thumbnailers/librsvg.thumbnailer
share/vala/vapi/librsvg-2.0.vapi
@postexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true
@postunexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true

View File

@ -11,6 +11,7 @@ DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT= Library for parsing and rendering SVG vector-graphic files
CONFLICTS_INSTALL= librsvg2-rust
# librsvg2 2.42+ needs rust to build, which is not available on all
# FreeBSD archs. So limit pure C version 2.40.x.
PORTSCOUT= limit:^2\.40\.