diff options
-rw-r--r-- | perl/perl-Gtk2-Notify/README | 3 | ||||
-rw-r--r-- | perl/perl-Gtk2-Notify/libnotify.patch | 161 | ||||
-rw-r--r-- | perl/perl-Gtk2-Notify/perl-Gtk2-Notify.SlackBuild | 101 | ||||
-rw-r--r-- | perl/perl-Gtk2-Notify/perl-Gtk2-Notify.info | 10 | ||||
-rw-r--r-- | perl/perl-Gtk2-Notify/slack-desc | 19 |
5 files changed, 294 insertions, 0 deletions
diff --git a/perl/perl-Gtk2-Notify/README b/perl/perl-Gtk2-Notify/README new file mode 100644 index 0000000000..923f81d61b --- /dev/null +++ b/perl/perl-Gtk2-Notify/README @@ -0,0 +1,3 @@ +perl-Gtk2-Notify (Perl interface to libnotify). + +Perl interface to libnotify. diff --git a/perl/perl-Gtk2-Notify/libnotify.patch b/perl/perl-Gtk2-Notify/libnotify.patch new file mode 100644 index 0000000000..f7705004f0 --- /dev/null +++ b/perl/perl-Gtk2-Notify/libnotify.patch @@ -0,0 +1,161 @@ +diff -up src/Gtk2-Notify-0.05/lib/Gtk2/Notify.pm.orig src/Gtk2-Notify-0.05/lib/Gtk2/Notify.pm +--- src/Gtk2-Notify-0.05/lib/Gtk2/Notify.pm.orig 2008-11-11 23:47:33.000000000 -0700 ++++ src/Gtk2-Notify-0.05/lib/Gtk2/Notify.pm 2015-07-07 20:02:12.000000000 -0600 +@@ -47,7 +47,7 @@ Version 0.04 + + use Gtk2::Notify -init, "app_name"; + +- my $notification = Gtk2::Notify->new($summary, $message, $icon, $attach_widget); ++ my $notification = Gtk2::Notify->new($summary, $message, $icon); + $notification->show; + + =head1 INITIALISATION +diff -up src/Gtk2-Notify-0.05/t/notification.t.orig src/Gtk2-Notify-0.05/t/notification.t +--- src/Gtk2-Notify-0.05/t/notification.t.orig 2006-08-27 13:11:57.000000000 -0600 ++++ src/Gtk2-Notify-0.05/t/notification.t 2015-07-07 20:09:52.000000000 -0600 +@@ -2,20 +2,18 @@ + + use strict; + use warnings; +-use Gtk2::TestHelper tests => 35; ++use Gtk2::TestHelper tests => 31; + use Test::Exception; + use Gtk2::Notify -init, $0; + + ginterfaces_ok('Gtk2::Notify'); + +-my $w = Gtk2::Window->new; +-my $n = Gtk2::Notify->new('foo', 'bar', '', $w); ++my $n = Gtk2::Notify->new('foo', 'bar', ''); + + isa_ok($n, 'Gtk2::Notify'); + + my @methods = qw( + add_action +- attach_to_widget + clear_actions + clear_hints + close +@@ -46,16 +44,6 @@ lives_ok(sub { + }, 42); + }, 'add_action'); + +-{ +- my $nw = Gtk2::Window->new; +- lives_ok(sub { +- $n->attach_to_widget($nw); +- }, 'attach_to_widget'); +- lives_ok(sub { +- $n->attach_to_widget($w); +- }, 'attach_to_widget'); +-} +- + lives_ok(sub { + $n->clear_actions; + }, 'clear_actions with existing actions'); +@@ -96,12 +84,6 @@ lives_ok(sub { + }, 'set_urgency'); + + lives_ok(sub { +- $n->close; +-}, 'close before show'); +- +-$w->show_all; +- +-lives_ok(sub { + $n->show; + }, 'show'); + +diff -up src/Gtk2-Notify-0.05/xs/Notify.xs.orig src/Gtk2-Notify-0.05/xs/Notify.xs +--- src/Gtk2-Notify-0.05/xs/Notify.xs.orig 2007-10-04 06:11:13.000000000 -0600 ++++ src/Gtk2-Notify-0.05/xs/Notify.xs 2015-07-07 20:05:37.000000000 -0600 +@@ -21,8 +21,7 @@ PROTOTYPES: DISABLE + my $notification = Gtk2::Notify->new( + $summary, + $message, +- $icon, +- $attach_widget ++ $icon + ); + $notification->show; + +@@ -86,26 +85,12 @@ notify_get_server_info (class, OUTLIST c + MODULE = Gtk2::Notify PACKAGE = Gtk2::Notify PREFIX = notify_notification_ + + NotifyNotification * +-notify_notification_new (class, summary, body=NULL, icon=NULL, attach=NULL) ++notify_notification_new (class, summary, body=NULL, icon=NULL) + const gchar *summary + const gchar *body + const gchar *icon +- GtkWidget_ornull *attach + C_ARGS: +- summary, body, icon, attach +- +-#if GTK_CHECK_VERSION (2, 9, 2) +- +-NotifyNotification * +-notify_notification_new_with_status_icon (class, summary, body=NULL, icon=NULL, status_icon=NULL) +- const gchar *summary +- const gchar *body +- const gchar *icon +- GtkStatusIcon *status_icon +- C_ARGS: +- summary, body, icon, status_icon +- +-#endif ++ summary, body, icon + + gboolean + notify_notification_update (notification, summary, message=NULL, icon=NULL) +@@ -114,27 +99,6 @@ notify_notification_update (notification + const gchar *message + const gchar *icon + +-void +-notify_notification_attach_to_widget (notification, attach) +- NotifyNotification *notification +- GtkWidget *attach +- +-#if GTK_CHECK_VERSION (2, 9, 2) +- +-void +-notify_notification_attach_to_status_icon (notification, status_icon) +- NotifyNotification *notification +- GtkStatusIcon *status_icon +- +-#endif +- +-void +-notify_notification_set_geometry_hints (notification, screen, x, y) +- NotifyNotification *notification +- GdkScreen *screen +- gint x +- gint y +- + NO_OUTPUT gboolean + notify_notification_show (notification) + NotifyNotification *notification +@@ -168,6 +132,11 @@ notify_notification_set_icon_from_pixbuf + GdkPixbuf *icon + + void ++notify_notification_set_image_from_pixbuf (notification, image) ++ NotifyNotification *notification ++ GdkPixbuf *image ++ ++void + set_hint (notification, key, value) + NotifyNotification *notification + const gchar *key +@@ -265,6 +234,10 @@ notify_notification_close (notification) + gperl_croak_gerror (NULL, error); + } + ++gint ++notify_notification_get_closed_reason(notification) ++ NotifyNotification *notification ++ + BOOT: + #include "register.xsh" + #include "boot.xsh" diff --git a/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.SlackBuild b/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.SlackBuild new file mode 100644 index 0000000000..eee2556722 --- /dev/null +++ b/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.SlackBuild @@ -0,0 +1,101 @@ +#!/bin/sh +# +# Slackware build script for perl-Gtk2-Notify. +# +# Copyright 2017 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=perl-Gtk2-Notify +VERSION=${VERSION:-0.05} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCNAM="$(printf $PRGNAM | cut -d- -f2-)" + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -Np2 -b -z .orig < $CWD/libnotify.patch + +perl Makefile.PL \ + PREFIX=/usr \ + INSTALLDIRS=vendor \ + INSTALLVENDORMAN3DIR=/usr/man/man3 +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true + +find $PKG -depth -type d -empty -delete || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a Changes README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.info b/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.info new file mode 100644 index 0000000000..a479fec3a6 --- /dev/null +++ b/perl/perl-Gtk2-Notify/perl-Gtk2-Notify.info @@ -0,0 +1,10 @@ +PRGNAM="perl-Gtk2-Notify" +VERSION="0.05" +HOMEPAGE="https://metacpan.org/pod/Gtk2::Notify" +DOWNLOAD="https://cpan.metacpan.org/authors/id/F/FL/FLORA/Gtk2-Notify-0.05.tar.gz" +MD5SUM="071144ad4a5670b8b2451baf358c4a88" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="perl-Gtk2-CodeGen" +MAINTAINER="Edinaldo P. Silva" +EMAIL="edps.mundognu@gmail.com" diff --git a/perl/perl-Gtk2-Notify/slack-desc b/perl/perl-Gtk2-Notify/slack-desc new file mode 100644 index 0000000000..a849c6c712 --- /dev/null +++ b/perl/perl-Gtk2-Notify/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +perl-Gtk2-Notify: perl-Gtk2-Notify (Perl interface to libnotify) +perl-Gtk2-Notify: +perl-Gtk2-Notify: Perl interface to libnotify. +perl-Gtk2-Notify: +perl-Gtk2-Notify: Home page: https://metacpan.org/pod/Gtk2::Notify +perl-Gtk2-Notify: +perl-Gtk2-Notify: +perl-Gtk2-Notify: +perl-Gtk2-Notify: +perl-Gtk2-Notify: +perl-Gtk2-Notify: |