diff options
Diffstat (limited to 'app-editors/padre/padre-0.44.ebuild')
-rw-r--r-- | app-editors/padre/padre-0.44.ebuild | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/app-editors/padre/padre-0.44.ebuild b/app-editors/padre/padre-0.44.ebuild index 431ffa966..0ee4c65a9 100644 --- a/app-editors/padre/padre-0.44.ebuild +++ b/app-editors/padre/padre-0.44.ebuild @@ -18,7 +18,7 @@ HOMEPAGE="http://padre.perlide.org/" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="test" DEPEND=" >=dev-perl/Locale-Msgfmt-0.14 @@ -80,7 +80,33 @@ DEPEND=" " RDEPEND="${DEPEND}" +x11_works(){ + # If there is no xdpyinfo, + # it will return 127 + xset -q 1>/dev/null 2>&1 + WORKS="$?" + if [[ "$WORKS" == "0" ]] ; then + einfo "X11 Works!" + else + einfo "X11 doesnt work" + fi + einfo "Display at: '${DISPLAY}'" + return $WORKS +} + src_configure(){ - unset DISPLAY + DISPLAY_COPY="$DISPLAY" + unset DISPLAY; perl-module_src_configure + if use test && [[ "$DISPLAY_COPY" != "" ]]; then + einfo "Bringing back Display Settings for later " + export DISPLAY="$DISPLAY_COPY" + fi +} +src_test(){ + if ! x11_works; then + unset DISPLAY + fi + perl-module_src_test } +SRC_TEST=do |