summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-10-17 09:39:56 +0200
committerJeroen Roovers <jer@gentoo.org>2015-10-17 09:40:22 +0200
commit1cceedcb87ea36998c538b06acea96fc9f2d1a0e (patch)
tree70222692e76d926960321be3d4a5e40c5ced544c /x11-misc/gtkdialog
parentdev-ruby/racc: add 1.4.13 (diff)
downloadgentoo-1cceedcb87ea36998c538b06acea96fc9f2d1a0e.tar.gz
gentoo-1cceedcb87ea36998c538b06acea96fc9f2d1a0e.tar.bz2
gentoo-1cceedcb87ea36998c538b06acea96fc9f2d1a0e.zip
x11-misc/gtkdialog: Make gnome-base/libglade and x11-libs/vte dependencies optional and explicit (bug #562988 by AaylaSecura)
Package-Manager: portage-2.2.23
Diffstat (limited to 'x11-misc/gtkdialog')
-rw-r--r--x11-misc/gtkdialog/files/gtkdialog-0.8.3-optdeps.patch62
-rw-r--r--x11-misc/gtkdialog/gtkdialog-0.8.3-r1.ebuild (renamed from x11-misc/gtkdialog/gtkdialog-0.8.3.ebuild)28
-rw-r--r--x11-misc/gtkdialog/metadata.xml28
3 files changed, 101 insertions, 17 deletions
diff --git a/x11-misc/gtkdialog/files/gtkdialog-0.8.3-optdeps.patch b/x11-misc/gtkdialog/files/gtkdialog-0.8.3-optdeps.patch
new file mode 100644
index 000000000000..e032c1290215
--- /dev/null
+++ b/x11-misc/gtkdialog/files/gtkdialog-0.8.3-optdeps.patch
@@ -0,0 +1,62 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,32 +25,40 @@
+ AC_PROG_YACC
+ AC_SUBST(YACC)
+
++PKG_PROG_PKG_CONFIG([0.24])
++
+ # Checks for libraries.
+-pkg_modules="gtk+-2.0 >= 2.0.0"
+-PKG_CHECK_MODULES(GTK, [$pkg_modules])
++PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0])
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+
+-pkg_modules="gthread-2.0"
+-PKG_CHECK_MODULES(GTHREAD, [$pkg_modules])
++PKG_CHECK_MODULES(GTHREAD, [gthread-2.0])
+ AC_SUBST(GTHREAD_CFLAGS)
+ AC_SUBST(GTHREAD_LIBS)
+
+-glade_lib="libglade-2.0"
+-PKG_CHECK_MODULES([GLADE_LIB], \
+- [$glade_lib], \
+- AC_SUBST(HAVE_GLADE_LIB, 1),\
+- AC_SUBST(HAVE_GLADE_LIB, 0))
+-AC_SUBST(GLADE_LIB_CFLAGS)
+-AC_SUBST(GLADE_LIB_LIBS)
+-
+-vte_lib="vte >= 0.23.5"
+-PKG_CHECK_MODULES([VTE], \
+- [$vte_lib], \
+- AC_SUBST(HAVE_VTE, 1),\
+- AC_SUBST(HAVE_VTE, 0))
+-AC_SUBST(VTE_CFLAGS)
+-AC_SUBST(VTE_LIBS)
++AC_ARG_WITH([glade],
++ AS_HELP_STRING([--with-glade], [enable support for libglade])
++)
++
++AC_ARG_WITH([vte],
++ AS_HELP_STRING([--with-vte], [enable support for vte])
++)
++
++AS_IF(
++ [test "x$with_glade" = "xyes"],
++ [PKG_CHECK_MODULES([GLADE_LIB], [libglade-2.0], [have_glade_lib=1], AC_MSG_ERROR([glade requested but not found]))],
++ [test "x$with_glade" = "xno"],
++ [have_glade_lib=0]
++)
++AC_SUBST([HAVE_GLADE_LIB], [$have_glade_lib])
++
++AS_IF(
++ [test "x$with_vte" = "xyes"],
++ [PKG_CHECK_MODULES([VTE], [vte >= 0.23.5], [have_vte=1], AC_MSG_ERROR([vte requested but not found]))],
++ [test "x$with_vte" = "xno"],
++ [have_vte=0]
++)
++AC_SUBST([HAVE_VTE], [$have_vte])
+
+ # Checks for header files.
+ AC_CHECK_HEADERS([locale.h])
diff --git a/x11-misc/gtkdialog/gtkdialog-0.8.3.ebuild b/x11-misc/gtkdialog/gtkdialog-0.8.3-r1.ebuild
index 97bea1365ea6..36198e494721 100644
--- a/x11-misc/gtkdialog/gtkdialog-0.8.3.ebuild
+++ b/x11-misc/gtkdialog/gtkdialog-0.8.3-r1.ebuild
@@ -2,7 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=4
+EAPI=5
+inherit autotools eutils
DESCRIPTION="A small utility for fast and easy GUI building"
HOMEPAGE="https://code.google.com/p/gtkdialog/"
@@ -11,17 +12,32 @@ SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
+IUSE="glade vte"
-RDEPEND="x11-libs/gtk+:2
- gnome-base/libglade"
-DEPEND="${RDEPEND}
+RDEPEND="
+ x11-libs/gtk+:2
+ glade? ( gnome-base/libglade )
+ vte? ( x11-libs/vte:= )
+"
+DEPEND="
+ ${RDEPEND}
virtual/pkgconfig
sys-devel/flex
- virtual/yacc"
+ virtual/yacc
+"
DOCS=( AUTHORS ChangeLog TODO )
+src_prepare() {
+ mv configure.{in,ac} || die
+ epatch "${FILESDIR}"/${PN}-0.8.3-optdeps.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with glade) $(use_with vte)
+}
+
src_install() {
# Stop make install from running gtk-update-icon-cache
emake DESTDIR="${D}" UPDATE_ICON_CACHE=true install
diff --git a/x11-misc/gtkdialog/metadata.xml b/x11-misc/gtkdialog/metadata.xml
index f66a06401dd0..03bfd68ad515 100644
--- a/x11-misc/gtkdialog/metadata.xml
+++ b/x11-misc/gtkdialog/metadata.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>desktop-misc</herd>
- <longdescription>gtkdialog is a GUI-creation utility that can be used with an arbitrary
- interpreter. It enables the programmer to describe a graphical user
- interface in a simple XML-like language, and use it with any
- interpreter that supports either files, standard I/O, or environment
- variables. It can be called as an external program from the
- interpreter, but can be used as a stand-alone framework for the
- application as well. Stand-alone, bash, and awk examples are provided.</longdescription>
- <upstream>
- <remote-id type="google-code">gtkdialog</remote-id>
- </upstream>
+<herd>desktop-misc</herd>
+<longdescription>
+gtkdialog is a GUI-creation utility that can be used with an arbitrary
+interpreter. It enables the programmer to describe a graphical user interface
+in a simple XML-like language, and use it with any interpreter that supports
+either files, standard I/O, or environment variables. It can be called as an
+external program from the interpreter, but can be used as a stand-alone
+framework for the application as well. Stand-alone, bash, and awk examples are
+provided.
+</longdescription>
+<upstream>
+<remote-id type="google-code">gtkdialog</remote-id>
+</upstream>
+<use>
+<flag name='glade'>Enable support for <pkg>gnome-base/libglade</pkg></flag>
+<flag name='vte'>Enable support for <pkg>x11-libs/vte</pkg></flag>
+</use>
</pkgmetadata>