Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps
@ 2021-09-11 23:59 tornaria
  2021-09-12 13:39 ` [PR PATCH] [Updated] " tornaria
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tornaria @ 2021-09-11 23:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages graphviz
https://github.com/void-linux/void-packages/pull/32939

graphviz: separate x11 binaries and gtk plugin to reduce deps
See #32826.

Arguably, the split of x11 is less important. It saves from `libXaw`, `libXmu` and `libXt`, but `libX11` and `libXrender` are deps via `cairo` anyway.

The split of `gtk` saves a lot of deps which are not usually installed on a server or chroot.

It is possible to make a smaller pkg without `gd`, `rsvg` and `webp` which seems good enough (renders svg and ps via core plugin, images and pdf via cairo), but probably not worth it.

Can't remove `pango` without disabling `cairo` as well; in this case one would want to keep `gd` for images. I wouldn't do this since the gd plugin is deprecated.

A patch file from https://github.com/void-linux/void-packages/pull/32939.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-graphviz-32939.patch --]
[-- Type: text/x-diff, Size: 3616 bytes --]

From 40876b978abe0f8ecf4ae55e2ff8dc3f8b0c71a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 11 Sep 2021 20:37:44 -0300
Subject: [PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps
 (#32826)

---
 srcpkgs/graphviz-gtk                  |  1 +
 srcpkgs/graphviz-x11                  |  1 +
 srcpkgs/graphviz/graphviz-gtk.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-gtk.REMOVE  |  1 +
 srcpkgs/graphviz/graphviz-x11.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-x11.REMOVE  |  1 +
 srcpkgs/graphviz/template             | 25 ++++++++++++++++++++++++-
 7 files changed, 30 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/graphviz-gtk
 create mode 120000 srcpkgs/graphviz-x11
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.REMOVE
 create mode 120000 srcpkgs/graphviz/graphviz-x11.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-x11.REMOVE

diff --git a/srcpkgs/graphviz-gtk b/srcpkgs/graphviz-gtk
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-gtk
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz-x11 b/srcpkgs/graphviz-x11
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-x11
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.INSTALL b/srcpkgs/graphviz/graphviz-gtk.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.REMOVE b/srcpkgs/graphviz/graphviz-gtk.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.INSTALL b/srcpkgs/graphviz/graphviz-x11.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.REMOVE b/srcpkgs/graphviz/graphviz-x11.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/template b/srcpkgs/graphviz/template
index 515f517be515..0684e636097c 100644
--- a/srcpkgs/graphviz/template
+++ b/srcpkgs/graphviz/template
@@ -1,7 +1,7 @@
 # Template file for 'graphviz'
 pkgname=graphviz
 version=2.49.0
-revision=1
+revision=2
 build_style=gnu-configure
 make_build_args="HOSTCC=$BUILD_CC"
 hostmakedepends="automake flex libltdl-devel libtool perl pkg-config python3"
@@ -29,6 +29,8 @@ post_install() {
 	vlicense epl-v10.txt LICENSE
 
 	rm -rf ${DESTDIR}/usr/share/graphviz/doc
+	rm -f ${DESTDIR}/usr/share/man/man1/mingle.1
+	rm -f ${DESTDIR}/usr/bin/dot_builtins
 }
 
 graphviz-libs_package() {
@@ -48,3 +50,24 @@ graphviz-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
+
+graphviz-gtk_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - gtk plugin"
+	pkg_install() {
+		vmove "usr/lib/graphviz/libgvplugin_gdk.*"
+		vmove "usr/lib/graphviz/libgvplugin_gtk.*"
+	}
+}
+
+graphviz-x11_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - x11 binaries (lefty)"
+	pkg_install() {
+		for p in lefty lneato dotty ; do
+			vmove usr/bin/$p
+			vmove usr/share/man/man1/$p.1
+		done
+		vmove usr/share/graphviz/lefty
+	}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
@ 2021-09-12 13:39 ` tornaria
  2021-09-12 13:42 ` tornaria
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2021-09-12 13:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages graphviz
https://github.com/void-linux/void-packages/pull/32939

graphviz: separate x11 binaries and gtk plugin to reduce deps
See #32826.

Arguably, the split of x11 is less important. It saves from `libXaw`, `libXmu` and `libXt`, but `libX11` and `libXrender` are deps via `cairo` anyway.

The split of `gtk` saves a lot of deps which are not usually installed on a server or chroot.

It is possible to make a smaller pkg without `gd`, `rsvg` and `webp` which seems good enough (renders svg and ps via core plugin, images and pdf via cairo), but probably not worth it.

Can't remove `pango` without disabling `cairo` as well; in this case one would want to keep `gd` for images. I wouldn't do this since the gd plugin is deprecated.

A patch file from https://github.com/void-linux/void-packages/pull/32939.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-graphviz-32939.patch --]
[-- Type: text/x-diff, Size: 4209 bytes --]

From 46b30d4422c51bbb74b04473a43277049260ada6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 11 Sep 2021 20:37:44 -0300
Subject: [PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps
 (#32826)

Also disable `make check` since it is broken:

    https://gitlab.com/graphviz/graphviz/-/issues/2112

Testing is via pytest:

    https://gitlab.com/magjac/graphviz/-/blob/main/DEVELOPERS.md#testing

but they expect graphviz already installed before testing.
---
 srcpkgs/graphviz-gtk                  |  1 +
 srcpkgs/graphviz-x11                  |  1 +
 srcpkgs/graphviz/graphviz-gtk.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-gtk.REMOVE  |  1 +
 srcpkgs/graphviz/graphviz-x11.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-x11.REMOVE  |  1 +
 srcpkgs/graphviz/template             | 36 ++++++++++++++++++++++++++-
 7 files changed, 41 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/graphviz-gtk
 create mode 120000 srcpkgs/graphviz-x11
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.REMOVE
 create mode 120000 srcpkgs/graphviz/graphviz-x11.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-x11.REMOVE

diff --git a/srcpkgs/graphviz-gtk b/srcpkgs/graphviz-gtk
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-gtk
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz-x11 b/srcpkgs/graphviz-x11
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-x11
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.INSTALL b/srcpkgs/graphviz/graphviz-gtk.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.REMOVE b/srcpkgs/graphviz/graphviz-gtk.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.INSTALL b/srcpkgs/graphviz/graphviz-x11.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.REMOVE b/srcpkgs/graphviz/graphviz-x11.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/template b/srcpkgs/graphviz/template
index 515f517be515..47e216853ee1 100644
--- a/srcpkgs/graphviz/template
+++ b/srcpkgs/graphviz/template
@@ -1,7 +1,7 @@
 # Template file for 'graphviz'
 pkgname=graphviz
 version=2.49.0
-revision=1
+revision=2
 build_style=gnu-configure
 make_build_args="HOSTCC=$BUILD_CC"
 hostmakedepends="automake flex libltdl-devel libtool perl pkg-config python3"
@@ -25,10 +25,23 @@ pre_configure() {
 	./autogen.sh NOCONFIG
 }
 
+do_check() {
+	# `make check` is broken:
+	# https://gitlab.com/graphviz/graphviz/-/issues/2112
+	#
+	# Testing is via pytest:
+	# https://gitlab.com/magjac/graphviz/-/blob/main/DEVELOPERS.md#testing
+	#
+	# They expect graphviz already installed before testing, disable
+	:
+}
+
 post_install() {
 	vlicense epl-v10.txt LICENSE
 
 	rm -rf ${DESTDIR}/usr/share/graphviz/doc
+	rm -f ${DESTDIR}/usr/share/man/man1/mingle.1
+	rm -f ${DESTDIR}/usr/bin/dot_builtins
 }
 
 graphviz-libs_package() {
@@ -48,3 +61,24 @@ graphviz-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
+
+graphviz-gtk_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - gtk plugin"
+	pkg_install() {
+		vmove "usr/lib/graphviz/libgvplugin_gdk.*"
+		vmove "usr/lib/graphviz/libgvplugin_gtk.*"
+	}
+}
+
+graphviz-x11_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - x11 binaries (lefty)"
+	pkg_install() {
+		for p in lefty lneato dotty ; do
+			vmove usr/bin/$p
+			vmove usr/share/man/man1/$p.1
+		done
+		vmove usr/share/graphviz/lefty
+	}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
  2021-09-12 13:39 ` [PR PATCH] [Updated] " tornaria
@ 2021-09-12 13:42 ` tornaria
  2021-09-12 13:43 ` tornaria
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2021-09-12 13:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages graphviz
https://github.com/void-linux/void-packages/pull/32939

graphviz: separate x11 binaries and gtk plugin to reduce deps
See #32826.

Arguably, the split of x11 is less important. It saves from `libXaw`, `libXmu` and `libXt`, but `libX11` and `libXrender` are deps via `cairo` anyway.

The split of `gtk` saves a lot of deps which are not usually installed on a server or chroot.

It is possible to make a smaller pkg without `gd`, `rsvg` and `webp` which seems good enough (renders svg and ps via core plugin, images and pdf via cairo), but probably not worth it.

Can't remove `pango` without disabling `cairo` as well; in this case one would want to keep `gd` for images. I wouldn't do this since the gd plugin is deprecated.

A patch file from https://github.com/void-linux/void-packages/pull/32939.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-graphviz-32939.patch --]
[-- Type: text/x-diff, Size: 4213 bytes --]

From f34787c85fe820f0ac673e7e99b8a405bd1df962 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 11 Sep 2021 20:37:44 -0300
Subject: [PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps
 (#32826)

Also disable `make check` since it is broken:

    https://gitlab.com/graphviz/graphviz/-/issues/2112

Testing is via pytest:

    https://gitlab.com/graphviz/graphviz/-/blob/main/DEVELOPERS.md#testing

but they expect graphviz already installed before testing.
---
 srcpkgs/graphviz-gtk                  |  1 +
 srcpkgs/graphviz-x11                  |  1 +
 srcpkgs/graphviz/graphviz-gtk.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-gtk.REMOVE  |  1 +
 srcpkgs/graphviz/graphviz-x11.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-x11.REMOVE  |  1 +
 srcpkgs/graphviz/template             | 36 ++++++++++++++++++++++++++-
 7 files changed, 41 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/graphviz-gtk
 create mode 120000 srcpkgs/graphviz-x11
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.REMOVE
 create mode 120000 srcpkgs/graphviz/graphviz-x11.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-x11.REMOVE

diff --git a/srcpkgs/graphviz-gtk b/srcpkgs/graphviz-gtk
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-gtk
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz-x11 b/srcpkgs/graphviz-x11
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-x11
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.INSTALL b/srcpkgs/graphviz/graphviz-gtk.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.REMOVE b/srcpkgs/graphviz/graphviz-gtk.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.INSTALL b/srcpkgs/graphviz/graphviz-x11.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.REMOVE b/srcpkgs/graphviz/graphviz-x11.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/template b/srcpkgs/graphviz/template
index 515f517be515..b53d524f8b78 100644
--- a/srcpkgs/graphviz/template
+++ b/srcpkgs/graphviz/template
@@ -1,7 +1,7 @@
 # Template file for 'graphviz'
 pkgname=graphviz
 version=2.49.0
-revision=1
+revision=2
 build_style=gnu-configure
 make_build_args="HOSTCC=$BUILD_CC"
 hostmakedepends="automake flex libltdl-devel libtool perl pkg-config python3"
@@ -25,10 +25,23 @@ pre_configure() {
 	./autogen.sh NOCONFIG
 }
 
+do_check() {
+	# `make check` is broken:
+	# https://gitlab.com/graphviz/graphviz/-/issues/2112
+	#
+	# Testing is via pytest:
+	# https://gitlab.com/graphviz/graphviz/-/blob/main/DEVELOPERS.md#testing
+	#
+	# They expect graphviz already installed before testing, disable
+	:
+}
+
 post_install() {
 	vlicense epl-v10.txt LICENSE
 
 	rm -rf ${DESTDIR}/usr/share/graphviz/doc
+	rm -f ${DESTDIR}/usr/share/man/man1/mingle.1
+	rm -f ${DESTDIR}/usr/bin/dot_builtins
 }
 
 graphviz-libs_package() {
@@ -48,3 +61,24 @@ graphviz-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
+
+graphviz-gtk_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - gtk plugin"
+	pkg_install() {
+		vmove "usr/lib/graphviz/libgvplugin_gdk.*"
+		vmove "usr/lib/graphviz/libgvplugin_gtk.*"
+	}
+}
+
+graphviz-x11_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - x11 binaries (lefty)"
+	pkg_install() {
+		for p in lefty lneato dotty ; do
+			vmove usr/bin/$p
+			vmove usr/share/man/man1/$p.1
+		done
+		vmove usr/share/graphviz/lefty
+	}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
  2021-09-12 13:39 ` [PR PATCH] [Updated] " tornaria
  2021-09-12 13:42 ` tornaria
@ 2021-09-12 13:43 ` tornaria
  2021-09-20 16:37 ` [PR PATCH] [Updated] " tornaria
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2021-09-12 13:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/32939#issuecomment-917638967

Comment:
Disable `make check` which is broken [2.48.0: test suite is failing](https://gitlab.com/graphviz/graphviz/-/issues/2112). Testing is [via pytest](https://gitlab.com/graphviz/graphviz/-/blob/main/DEVELOPERS.md#testing) but they expect `graphviz` already installed before testing.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
                   ` (2 preceding siblings ...)
  2021-09-12 13:43 ` tornaria
@ 2021-09-20 16:37 ` tornaria
  2021-09-20 16:49 ` tornaria
  2021-09-20 17:52 ` [PR PATCH] [Merged]: " leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2021-09-20 16:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages graphviz
https://github.com/void-linux/void-packages/pull/32939

graphviz: separate x11 binaries and gtk plugin to reduce deps
See #32826.

Arguably, the split of x11 is less important. It saves from `libXaw`, `libXmu` and `libXt`, but `libX11` and `libXrender` are deps via `cairo` anyway.

The split of `gtk` saves a lot of deps which are not usually installed on a server or chroot.

It is possible to make a smaller pkg without `gd`, `rsvg` and `webp` which seems good enough (renders svg and ps via core plugin, images and pdf via cairo), but probably not worth it.

Can't remove `pango` without disabling `cairo` as well; in this case one would want to keep `gd` for images. I wouldn't do this since the gd plugin is deprecated.

A patch file from https://github.com/void-linux/void-packages/pull/32939.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-graphviz-32939.patch --]
[-- Type: text/x-diff, Size: 4592 bytes --]

From f4fd2986593e021e29e38ae7f2f732371dfa752b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 11 Sep 2021 20:37:44 -0300
Subject: [PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps
 (#32826)

Also disable `make check` since it is broken:

    https://gitlab.com/graphviz/graphviz/-/issues/2112

Testing is via pytest:

    https://gitlab.com/graphviz/graphviz/-/blob/main/DEVELOPERS.md#testing

but they expect graphviz already installed before testing.
---
 srcpkgs/graphviz-gtk                  |  1 +
 srcpkgs/graphviz-x11                  |  1 +
 srcpkgs/graphviz/graphviz-gtk.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-gtk.REMOVE  |  1 +
 srcpkgs/graphviz/graphviz-x11.INSTALL |  1 +
 srcpkgs/graphviz/graphviz-x11.REMOVE  |  1 +
 srcpkgs/graphviz/template             | 36 ++++++++++++++++++++++++++-
 7 files changed, 41 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/graphviz-gtk
 create mode 120000 srcpkgs/graphviz-x11
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-gtk.REMOVE
 create mode 120000 srcpkgs/graphviz/graphviz-x11.INSTALL
 create mode 120000 srcpkgs/graphviz/graphviz-x11.REMOVE

diff --git a/srcpkgs/graphviz-gtk b/srcpkgs/graphviz-gtk
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-gtk
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz-x11 b/srcpkgs/graphviz-x11
new file mode 120000
index 000000000000..abecf5d9457d
--- /dev/null
+++ b/srcpkgs/graphviz-x11
@@ -0,0 +1 @@
+graphviz
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.INSTALL b/srcpkgs/graphviz/graphviz-gtk.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-gtk.REMOVE b/srcpkgs/graphviz/graphviz-gtk.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-gtk.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.INSTALL b/srcpkgs/graphviz/graphviz-x11.INSTALL
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.INSTALL
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/graphviz-x11.REMOVE b/srcpkgs/graphviz/graphviz-x11.REMOVE
new file mode 120000
index 000000000000..842bf0e100c8
--- /dev/null
+++ b/srcpkgs/graphviz/graphviz-x11.REMOVE
@@ -0,0 +1 @@
+INSTALL
\ No newline at end of file
diff --git a/srcpkgs/graphviz/template b/srcpkgs/graphviz/template
index 515f517be515..a81e29e9c926 100644
--- a/srcpkgs/graphviz/template
+++ b/srcpkgs/graphviz/template
@@ -1,7 +1,7 @@
 # Template file for 'graphviz'
 pkgname=graphviz
 version=2.49.0
-revision=1
+revision=2
 build_style=gnu-configure
 make_build_args="HOSTCC=$BUILD_CC"
 hostmakedepends="automake flex libltdl-devel libtool perl pkg-config python3"
@@ -16,6 +16,15 @@ homepage="http://www.graphviz.org"
 distfiles="https://gitlab.com/graphviz/graphviz/-/archive/${version}/graphviz-${version}.tar.gz"
 checksum=a062ccd940abbde6e3c45462323b2ede54b9374fed86f464c11bc4c0bd57fd04
 
+# `make check` is broken:
+# https://gitlab.com/graphviz/graphviz/-/issues/2112
+#
+# Testing is via pytest:
+# https://gitlab.com/graphviz/graphviz/-/blob/main/DEVELOPERS.md#testing
+#
+# They expect graphviz already installed before testing, disable
+make_check=no
+
 if [ -z "$CROSS_BUILD" ]; then
 	configure_args+=" --with-gts"
 	makedepends+=" gts-devel"
@@ -29,6 +38,10 @@ post_install() {
 	vlicense epl-v10.txt LICENSE
 
 	rm -rf ${DESTDIR}/usr/share/graphviz/doc
+	# mingle is not compiled so do not install manpage
+	rm -f ${DESTDIR}/usr/share/man/man1/mingle.1
+	# dot_builtins is just dot with preloaded plugins (for testing?)
+	rm -f ${DESTDIR}/usr/bin/dot_builtins
 }
 
 graphviz-libs_package() {
@@ -48,3 +61,24 @@ graphviz-devel_package() {
 		vmove usr/share/man/man3
 	}
 }
+
+graphviz-gtk_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - gtk plugin"
+	pkg_install() {
+		vmove "usr/lib/graphviz/libgvplugin_gdk.*"
+		vmove "usr/lib/graphviz/libgvplugin_gtk.*"
+	}
+}
+
+graphviz-x11_package() {
+	depends="graphviz>=${version}_${revision}"
+	short_desc+=" - x11 binaries (lefty)"
+	pkg_install() {
+		for p in lefty lneato dotty ; do
+			vmove usr/bin/$p
+			vmove usr/share/man/man1/$p.1
+		done
+		vmove usr/share/graphviz/lefty
+	}
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
                   ` (3 preceding siblings ...)
  2021-09-20 16:37 ` [PR PATCH] [Updated] " tornaria
@ 2021-09-20 16:49 ` tornaria
  2021-09-20 17:52 ` [PR PATCH] [Merged]: " leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: tornaria @ 2021-09-20 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/32939#issuecomment-923099965

Comment:
I changed the template to use `make_check=no` to disable tests instead of redefining `do_check()`.

Note that post-install and post-remove for `graphviz-gtk` and `graphviz-x11` are just symlinks to the post-install for `graphviz`, so that the dot plugin list is updated when the installed plugins change.

@leahneukirchen what do you think?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Merged]: graphviz: separate x11 binaries and gtk plugin to reduce deps
  2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
                   ` (4 preceding siblings ...)
  2021-09-20 16:49 ` tornaria
@ 2021-09-20 17:52 ` leahneukirchen
  5 siblings, 0 replies; 7+ messages in thread
From: leahneukirchen @ 2021-09-20 17:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

There's a merged pull request on the void-packages repository

graphviz: separate x11 binaries and gtk plugin to reduce deps
https://github.com/void-linux/void-packages/pull/32939

Description:
See #32826.

Arguably, the split of x11 is less important. It saves from `libXaw`, `libXmu` and `libXt`, but `libX11` and `libXrender` are deps via `cairo` anyway.

The split of `gtk` saves a lot of deps which are not usually installed on a server or chroot.

It is possible to make a smaller pkg without `gd`, `rsvg` and `webp` which seems good enough (renders svg and ps via core plugin, images and pdf via cairo), but probably not worth it.

Can't remove `pango` without disabling `cairo` as well; in this case one would want to keep `gd` for images. I wouldn't do this since the gd plugin is deprecated.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-20 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11 23:59 [PR PATCH] graphviz: separate x11 binaries and gtk plugin to reduce deps tornaria
2021-09-12 13:39 ` [PR PATCH] [Updated] " tornaria
2021-09-12 13:42 ` tornaria
2021-09-12 13:43 ` tornaria
2021-09-20 16:37 ` [PR PATCH] [Updated] " tornaria
2021-09-20 16:49 ` tornaria
2021-09-20 17:52 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).