sci-chemistry/chemical-mime-data: Fix rsvg-convert vs convert interaction
authorPacho Ramos <pacho@gentoo.org>
Fri, 20 Mar 2020 22:52:38 +0000 (23:52 +0100)
committerPacho Ramos <pacho@gentoo.org>
Fri, 20 Mar 2020 22:52:38 +0000 (23:52 +0100)
Thanks-to: Agostino Sarubbo
Closes: https://bugs.gentoo.org/713584
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
sci-chemistry/chemical-mime-data/chemical-mime-data-0.1.94-r4.ebuild
sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-rsvg-convert-r2.patch [new file with mode: 0644]

index 3abec36ba7d14839ea27437a7c972e0f22abc72d..02cd6e2bc87d2fd7bace587f95b1117e2d02f97d 100644 (file)
@@ -33,7 +33,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-turbomole.patch
        "${FILESDIR}"/${P}-pigz.patch
        "${FILESDIR}"/${P}-namespace-svg.patch
-       "${FILESDIR}"/${P}-rsvg-convert.patch
+       "${FILESDIR}"/${P}-rsvg-convert-r2.patch
        # https://github.com/dleidert/chemical-mime/issues/1
        "${FILESDIR}"/${P}-drop-turbomole-vibrational.patch
 )
diff --git a/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-rsvg-convert-r2.patch b/sci-chemistry/chemical-mime-data/files/chemical-mime-data-0.1.94-rsvg-convert-r2.patch
new file mode 100644 (file)
index 0000000..55039f8
--- /dev/null
@@ -0,0 +1,36 @@
+--- a/configure.ac.old 2020-03-20 23:32:05.866604992 +0100
++++ b/configure.ac     2020-03-20 23:32:30.866022834 +0100
+@@ -97,14 +97,12 @@
+ AC_PATH_PROG([CONVERT], [convert], [no])
+ AC_SUBST([CONVERT])
+-if test "x$enable_convert" != "xyes" -a "x$CONVERT" = "xno" ; then
+-      AC_ARG_VAR(
+-              [RSVG],
+-              [The 'rsvg' binary with path. Use it to define or override the location of 'rsvg'.]
+-      )
+-      AC_PATH_PROG([RSVG], [rsvg], [no])
+-      AC_SUBST([RSVG])
+-fi
++AC_ARG_VAR(
++      [RSVG],
++      [The 'rsvg' binary with path. Use it to define or override the location of 'rsvg'.]
++)
++AC_PATH_PROG([RSVG], [rsvg-convert], [no])
++AC_SUBST([RSVG])
+ if test "x$RSVG" = "xno" -a "x$CONVERT" = "xno" ; then
+       AC_MSG_ERROR([Cannot find rsvg (librsvg binary) or convert (imagemagick). Please install one of them.])
+--- a/icons/hicolor/Makefile.am.old    2020-03-20 23:32:54.292414381 +0100
++++ b/icons/hicolor/Makefile.am        2020-03-20 23:33:40.052179227 +0100
+@@ -23,8 +23,8 @@
+ .svg.svgz:
+       gzip $< -c > $@
+       for size in $(icon_sizes) ; do \
+-              if test "x$(RSVG)" != "x" ; then \
+-                      $(RSVG) -w $${size} -h $${size} -f png $< $*_$${size}.png ; \
++              if test "x$(RSVG)" != "xno" ; then \
++                      $(RSVG) -w $${size} -h $${size} -f png $< --output $*_$${size}.png ; \
+               else \
+                       $(CONVERT) $< -resize $${size}x$${size} $*_$${size}.png ; \
+               fi \