From d23cbfab8f63cd5a6cce49bf9d489ad08f4b9776 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Tue, 17 Jan 2012 08:05:08 +0000 Subject: [PATCH] updated on Tue Jan 17 08:05:08 UTC 2012 --- alliance/PKGBUILD | 2 +- awn-extras-applets/PKGBUILD | 22 +- awn-extras-applets/add-indicator-applet.patch | 1293 +++++++++++++++++++++++++ bamf/PKGBUILD | 8 +- beets-hg/PKGBUILD | 3 +- beets/PKGBUILD | 7 +- eli/PKGBUILD | 16 +- keepass/PKGBUILD | 6 +- libnatpmp/PKGBUILD | 6 +- linux-lqx/PKGBUILD | 15 +- multivalent-pdf-tools/PKGBUILD | 21 + ocaml-ounit/PKGBUILD | 5 +- oxygen-gtk3/PKGBUILD | 26 + pdfsizeopt-svn/PKGBUILD | 41 + pdfsizeopt-svn/archpackage.patch | 36 + python2-milk/PKGBUILD | 4 +- python2-musicbrainzngs/PKGBUILD | 22 + ruby-diff-lcs/PKGBUILD | 42 +- ruby-rspec-core/PKGBUILD | 41 +- ruby-rspec-expectations/PKGBUILD | 41 +- ruby-rspec-mocks/PKGBUILD | 41 +- ruby-rspec/PKGBUILD | 48 +- wallpapoz/PKGBUILD | 20 +- 23 files changed, 1625 insertions(+), 141 deletions(-) create mode 100644 awn-extras-applets/add-indicator-applet.patch create mode 100644 multivalent-pdf-tools/PKGBUILD create mode 100644 oxygen-gtk3/PKGBUILD create mode 100644 pdfsizeopt-svn/PKGBUILD create mode 100644 pdfsizeopt-svn/archpackage.patch create mode 100644 python2-musicbrainzngs/PKGBUILD rewrite ruby-diff-lcs/PKGBUILD (92%) rewrite ruby-rspec-core/PKGBUILD (91%) rewrite ruby-rspec-expectations/PKGBUILD (91%) rewrite ruby-rspec-mocks/PKGBUILD (78%) rewrite ruby-rspec/PKGBUILD (94%) diff --git a/alliance/PKGBUILD b/alliance/PKGBUILD index 44848fb90..86ee6606a 100644 --- a/alliance/PKGBUILD +++ b/alliance/PKGBUILD @@ -19,7 +19,7 @@ build() { cd "$srcdir/$pkgname-${pkgver/_*}" # Does not build with -Wl,--as-needed - export LDFLAGS="${LDFLAGS//-Wl,--as-needed}" + export LDFLAGS="${LDFLAGS//,--as-needed}" # profile.d script fix sed -e "s|SYSCONF_TOP=\$ALLIANCE_TOP|&/etc|" \ diff --git a/awn-extras-applets/PKGBUILD b/awn-extras-applets/PKGBUILD index b6276ac47..d943cc019 100644 --- a/awn-extras-applets/PKGBUILD +++ b/awn-extras-applets/PKGBUILD @@ -6,12 +6,12 @@ pkgname=awn-extras-applets _pkgname=awn-extras pkgver=0.4.0 -pkgrel=10 +pkgrel=11 pkgdesc="A collection of applets for avant-window-navigator" arch=('i686' 'x86_64') url="https://launchpad.net/awn-extras" license=('GPL2') -depends=('avant-window-navigator' 'python-notify' 'vte' 'gnome-menus' 'gnome-menus2' 'libwebkit') +depends=('avant-window-navigator' 'python-notify' 'vte' 'gnome-menus' 'gnome-menus2' 'libwebkit' 'libindicator') makedepends=('intltool' 'vala') optdepends=('python2-feedparser: comics, feeds, mail applets' 'python-rsvg: comics, cairo-clock, hardware-sensors applets' @@ -34,19 +34,24 @@ optdepends=('python2-feedparser: comics, feeds, mail applets' 'banshee: media-control applet' 'tomboy: tomboy applet' 'gnome-screensaver: quit applet (optional)' - 'gnome-session: quit applet (optional)') + 'gnome-session: quit applet (optional)' + 'indicator-application-gtk2: indicator applet (optional)' + 'indicator-messages-gtk2: indicator applet (optional)' + 'indicator-sound-gtk2: indicator applet (optional)') options=('!libtool') install=$pkgname.install source=(http://launchpad.net/$_pkgname/0.4/$pkgver/+download/$_pkgname-$pkgver.tar.gz awn-extras-libnotify0.7.patch remove-settings-menu.patch add-battery-upower-support.patch - fix-shinyswitcher-scrolling.patch) + fix-shinyswitcher-scrolling.patch + add-indicator-applet.patch) md5sums=('b559d68cd6ad295c961c20fcc5d9f9c0' '2df8dfd8f0f1d458c09b56983c7d049f' '52f8ce6a4eca862b0740e29a84db8ae5' '26b56106b63b14ba3c99f1a2e96da05d' - '755c57dfbb65a314f247277918ec95ac') + '755c57dfbb65a314f247277918ec95ac' + 'cc984a86746a78694469cb28498463d6') build() { cd "$srcdir/$_pkgname-$pkgver" @@ -54,14 +59,18 @@ build() { patch -Np1 -i "$srcdir/remove-settings-menu.patch" patch -Np0 -i "$srcdir/add-battery-upower-support.patch" patch -Np0 -i "$srcdir/fix-shinyswitcher-scrolling.patch" + patch -Np1 -i "$srcdir/add-indicator-applet.patch" # Python2 fix find . -type f -name *.py | xargs sed -i 's@^#.*python$@#!/usr/bin/python2@' sed -i 's/async(\"python \"/async(\"python2 \"/' applets/maintained/shiny-switcher/shinyswitcherapplet.c + autoreconf -fi ./configure --prefix=/usr --sysconfdir=/etc \ + --disable-static \ --disable-pymod-checks \ --with-webkit \ + --with-indicator=yes \ PYTHON=/usr/bin/python2 make } @@ -74,4 +83,7 @@ package() { mkdir -p "$pkgdir/usr/share/gconf/schemas" gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/awn-extras.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas rm -r "$pkgdir"/etc + + # Remove dialect and pandora applets + rm -R "$pkgdir"/usr/share/avant-window-navigator/applets/{dialect,pandora}* } diff --git a/awn-extras-applets/add-indicator-applet.patch b/awn-extras-applets/add-indicator-applet.patch new file mode 100644 index 000000000..53d4446a2 --- /dev/null +++ b/awn-extras-applets/add-indicator-applet.patch @@ -0,0 +1,1293 @@ +diff -Naur awn-extras-0.4.0.orig/applets/maintained/indicator-applet/applet.c awn-extras-0.4.0/applets/maintained/indicator-applet/applet.c +--- awn-extras-0.4.0.orig/applets/maintained/indicator-applet/applet.c 1970-01-01 01:00:00.000000000 +0100 ++++ awn-extras-0.4.0/applets/maintained/indicator-applet/applet.c 2012-01-17 05:54:46.000000000 +0100 +@@ -0,0 +1,1142 @@ ++/* ++ * Copyright (c) 2010 Sharkbaitbobby ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++*/ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++ ++typedef struct _IndicatorApplet IndicatorApplet; ++struct _IndicatorApplet { ++ AwnApplet *applet; ++ GtkWidget *da; ++ GtkWidget *icon_box; ++ GtkWidget *awn_menu; ++ GtkDialog *dialog; ++ ++ IndicatorObject *io; ++ ++ DesktopAgnosticConfigClient *config; ++ gint config_rows_cols; ++ gboolean config_ind_app; ++ gboolean config_ind_app_ses; ++ gboolean config_me; ++ gboolean config_messaging; ++ gboolean config_network; ++ gboolean config_sound; ++ gboolean config_other_menus; ++ gboolean applet_mode; ++ ++ GList *images; ++ GList *menus; ++ GList *shown_images; ++ GList *shown_menus; ++ GList *awnicons; ++ ++ gint num; ++ gint popup_num; ++ gint last_num; ++ gint dx; ++ gint dy; ++}; ++ ++static gboolean icon_button_press(AwnIcon *icon, GdkEventButton *event, IndicatorApplet *iapplet); ++static gboolean icon_right_click(AwnIcon *icon, GdkEventButton *event, IndicatorApplet *iapplet); ++static gboolean icon_scroll(AwnIcon *icon, GdkEventScroll *event, IndicatorApplet *iapplet); ++static void get_shown_entries(IndicatorApplet *iapplet); ++static void resize_da(IndicatorApplet *iapplet); ++static void update_config(IndicatorApplet *iapplet); ++static void update_icon_mode(IndicatorApplet *iapplet); ++ ++void ++show_about(GtkMenuItem *item, gpointer user_data) ++{ ++ const gchar *license = "This program is free software; you can redistribute " ++"it and/or modify it under the terms of the GNU General Public License as " ++"published by the Free Software Foundation; either version 2 of the License, " ++"or (at your option) any later version.\n\nThis program is distributed in the " ++"hope that it will be useful, but WITHOUT ANY WARRANTY; without even the " ++"implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. " ++"See the GNU General Public License for more details.\n\nYou should have " ++"received a copy of the GNU General Public License along with this program; " ++"if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth " ++"Floor, Boston, MA 02110-1301 USA."; ++ const gchar *authors[] = {"Sharkbaitbobby ", ++ NULL}; ++ ++ GtkWidget *about = gtk_about_dialog_new(); ++ ++ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), _("Indicator Applet")); ++ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION); ++ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), ++ _("An applet to hold all of the system indicators")); ++ gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), ++ "Copyright \xc2\xa9 2010 Sharkbaitbobby"); ++ gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(about), "indicator-applet"); ++ gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about), license); ++ gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(about), TRUE); ++ gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors); ++ gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), ++ "http://wiki.awn-project.org/Indicator_Applet"); ++ gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), ++ "wiki.awn-project.org"); ++ ++ gtk_window_set_icon_name(GTK_WINDOW(about), "indicator-applet"); ++ ++ gtk_dialog_run(GTK_DIALOG(about)); ++ gtk_widget_destroy(about); ++} ++ ++/* Preferences dialog ... */ ++static gboolean ++check_toggled(GtkToggleButton *button, IndicatorApplet *iapplet) ++{ ++ desktop_agnostic_config_client_set_bool(iapplet->config, ++ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, ++ (gchar*)g_object_get_data(G_OBJECT(button), "ldakey"), ++ gtk_toggle_button_get_active(button), NULL); ++ update_config(iapplet); ++ get_shown_entries(iapplet); ++ ++ update_icon_mode(iapplet); ++ ++ return FALSE; ++} ++ ++static gboolean ++applet_mode_check_toggled(GtkToggleButton *button, IndicatorApplet *iapplet) ++{ ++ desktop_agnostic_config_client_set_bool(iapplet->config, ++ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, ++ "applet_icon_mode", gtk_toggle_button_get_active(button), ++ NULL); ++ ++ update_config(iapplet); ++ update_icon_mode(iapplet); ++} ++ ++static GtkWidget* ++make_check_button(IndicatorApplet *iapplet, ++ gchar *label, ++ gchar *key, ++ gboolean enabled, ++ GtkWidget *box) ++{ ++ GtkWidget *check = gtk_check_button_new_with_label(label); ++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), enabled); ++ g_signal_connect(G_OBJECT(check), "toggled", G_CALLBACK(check_toggled), (gpointer)iapplet); ++ g_object_set_data(G_OBJECT(check), "ldakey", key); ++ gtk_box_pack_start(GTK_BOX(box), check, FALSE, FALSE, 0); ++} ++ ++static gboolean ++spin_changed(GtkSpinButton *spin, IndicatorApplet *iapplet) ++{ ++ desktop_agnostic_config_client_set_int(iapplet->config, ++ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, ++ "rows_cols", (gint)gtk_spin_button_get_value(spin), ++ NULL); ++ update_config(iapplet); ++ ++ if (!iapplet->applet_mode) ++ { ++ resize_da(iapplet); ++ } ++} ++ ++static void ++show_prefs(GtkMenuItem *item, IndicatorApplet *iapplet) ++{ ++ GtkDialog *win = GTK_DIALOG(gtk_dialog_new_with_buttons(_("Indicator Applet Preferences"), ++ NULL, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT, ++ NULL)); ++ ++ iapplet->dialog = win; ++ ++ GtkWidget *label = gtk_label_new(NULL); ++ gtk_label_set_markup(GTK_LABEL(label), g_strdup_printf("%s", _("Enabled Entries"))); ++ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); ++ gtk_box_pack_start(GTK_BOX(win->vbox), label, FALSE, FALSE, 0); ++ ++ GtkWidget *vbox = gtk_vbox_new(FALSE, 3); ++ make_check_button(iapplet, _("Indicator Applet"), ++ "indicator_applet", iapplet->config_ind_app, vbox); ++ make_check_button(iapplet, _("Indicator Applet Session (Quit)"), ++ "indicator_applet_session", iapplet->config_ind_app_ses, vbox); ++ make_check_button(iapplet, _("Me Menu"), ++ "me_menu", iapplet->config_me, vbox); ++ make_check_button(iapplet, _("Messaging Menu"), ++ "messaging_menu", iapplet->config_messaging, vbox); ++ make_check_button(iapplet, _("Network Menu"), ++ "network_menu", iapplet->config_network, vbox); ++ make_check_button(iapplet, _("Sound Control Menu"), ++ "sound_menu", iapplet->config_sound, vbox); ++ make_check_button(iapplet, _("Other Menus"), ++ "other_menus", iapplet->config_other_menus, vbox); ++ ++ GtkWidget *align = gtk_alignment_new(0.0, 0.5, 1.0, 0.0); ++ gtk_alignment_set_padding(GTK_ALIGNMENT(align), 0, 0, 12, 0); ++ gtk_container_add(GTK_CONTAINER(align), vbox); ++ ++ gtk_box_pack_start(GTK_BOX(win->vbox), align, FALSE, FALSE, 0); ++ ++ label = gtk_label_new(NULL); ++ gtk_label_set_markup(GTK_LABEL(label), g_strdup_printf("%s", _("Options"))); ++ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); ++ gtk_box_pack_start(GTK_BOX(win->vbox), label, FALSE, FALSE, 0); ++ ++ vbox = gtk_vbox_new(FALSE, 3); ++ GtkPositionType pos = awn_applet_get_pos_type(iapplet->applet); ++ if (pos == GTK_POS_TOP || pos == GTK_POS_BOTTOM) ++ { ++ label = gtk_label_new(_("Number of rows:")); ++ } ++ else ++ { ++ label = gtk_label_new(_("Number of columns:")); ++ } ++ GtkWidget *spin = gtk_spin_button_new_with_range(1.0, 3.0, 1.0); ++ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0); ++ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), (gdouble)iapplet->config_rows_cols); ++ g_signal_connect(G_OBJECT(spin), "value-changed", G_CALLBACK(spin_changed), (gpointer)iapplet); ++ ++ GtkWidget *hbox = gtk_hbox_new(FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); ++ gtk_box_pack_end(GTK_BOX(hbox), spin, FALSE, FALSE, 0); ++ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); ++ ++ GtkWidget *check = gtk_check_button_new_with_label(_("Enable Applet Icon mode")); ++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), iapplet->applet_mode); ++ g_signal_connect(G_OBJECT(check), "toggled", ++ G_CALLBACK(applet_mode_check_toggled), (gpointer)iapplet); ++ gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0); ++ ++ align = gtk_alignment_new(0.0, 0.5, 1.0, 0.0); ++ gtk_alignment_set_padding(GTK_ALIGNMENT(align), 0, 0, 12, 0); ++ gtk_container_add(GTK_CONTAINER(align), vbox); ++ gtk_box_pack_start(GTK_BOX(win->vbox), align, FALSE, FALSE, 0); ++ ++ gtk_container_set_border_width(GTK_CONTAINER(win), 12); ++ gtk_window_set_icon_name(GTK_WINDOW(win), "indicator-applet"); ++ gtk_widget_show_all(GTK_WIDGET(win)); ++ gtk_dialog_run(win); ++ gtk_widget_destroy(GTK_WIDGET(win)); ++} ++ ++static gboolean ++get_bool(IndicatorApplet *iapplet, gchar *key) ++{ ++ return desktop_agnostic_config_client_get_bool(iapplet->config, ++ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, ++ key, NULL); ++} ++ ++static void ++update_config(IndicatorApplet *iapplet) ++{ ++ iapplet->config_rows_cols = desktop_agnostic_config_client_get_int(iapplet->config, ++ DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, ++ "rows_cols", NULL); ++ if (iapplet->config_rows_cols < 1) ++ { ++ iapplet->config_rows_cols = 2; ++ } ++ iapplet->config_ind_app = get_bool(iapplet, "indicator_applet"); ++ iapplet->config_ind_app_ses = get_bool(iapplet, "indicator_applet_session"); ++ iapplet->config_me = get_bool(iapplet, "me_menu"); ++ iapplet->config_messaging = get_bool(iapplet, "messaging_menu"); ++ iapplet->config_network = get_bool(iapplet, "network_menu"); ++ iapplet->config_sound = get_bool(iapplet, "sound_menu"); ++ iapplet->config_other_menus = get_bool(iapplet, "other_menus"); ++ iapplet->applet_mode = get_bool(iapplet, "applet_icon_mode"); ++} ++ ++/* Dealing with libindicator ... */ ++static void ++get_shown_entries(IndicatorApplet *iapplet) ++{ ++ // Causes segfaults for various reasons... (none fully known) ++ /*if (iapplet->shown_images != NULL) ++ { ++ g_list_free(iapplet->shown_images); ++ } ++ if (iapplet->shown_menus != NULL) ++ { ++ g_list_free(iapplet->shown_menus); ++ }*/ ++ ++ iapplet->shown_images = NULL; ++ iapplet->shown_menus = NULL; ++ ++ gchar *name; ++ gboolean add; ++ ++ gint i = 0; ++ GList *l; ++ for (l = iapplet->images; l; l = l->next) ++ { ++ add = FALSE; ++ ++ IndicatorObject *io = INDICATOR_OBJECT(g_object_get_data(G_OBJECT(l->data), "indicator")); ++ if (INDICATOR_IS_OBJECT(io)) ++ { ++ name = (gchar*)g_object_get_data(G_OBJECT(io), "filename"); ++ ++ if (!g_strcmp0(name, "libapplication.so")) ++ { ++ if (iapplet->config_ind_app) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else if (!g_strcmp0(name, "libme.so")) ++ { ++ if (iapplet->config_me) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else if (!g_strcmp0(name, "libmessaging.so")) ++ { ++ if (iapplet->config_messaging) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else if (!g_strcmp0(name, "libnetworkmenu.so")) ++ { ++ if (iapplet->config_network) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else if (!g_strcmp0(name, "libsession.so")) ++ { ++ if (iapplet->config_ind_app_ses) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else if (!g_strcmp0(name, "libsoundmenu.so")) ++ { ++ if (iapplet->config_sound) ++ { ++ add = TRUE; ++ } ++ } ++ ++ else ++ { ++ if (iapplet->config_other_menus) ++ { ++ add = TRUE; ++ } ++ } ++ ++ if (add) ++ { ++ iapplet->shown_images = g_list_append(iapplet->shown_images, l->data); ++ iapplet->shown_menus = g_list_append(iapplet->shown_menus, ++ g_list_nth_data(iapplet->menus, i)); ++ } ++ } ++ ++ i++; ++ } ++} ++ ++static gboolean ++pixbuf_changed(GObject *image, GParamSpec *spec, IndicatorApplet *iapplet) ++{ ++ if (iapplet->applet_mode) ++ { ++ update_icon_mode(iapplet); ++ } ++ else ++ { ++ gtk_widget_queue_draw(iapplet->da); ++ } ++ ++ return FALSE; ++} ++ ++static void ++entry_added(IndicatorObject *io, IndicatorObjectEntry *entry, IndicatorApplet *iapplet) ++{ ++ if (entry->image == NULL || entry->menu == NULL) ++ { ++ /* If either of these is NULL, there will likely be problems when ++ * the entry is removed */ ++ return; ++ } ++ ++ g_object_set_data(G_OBJECT(entry->image), "indicator", io); ++ iapplet->images = g_list_append(iapplet->images, entry->image); ++ iapplet->menus = g_list_append(iapplet->menus, entry->menu); ++ iapplet->num++; ++ ++ gulong handler = g_signal_connect(G_OBJECT(entry->image), "notify::pixbuf", ++ G_CALLBACK(pixbuf_changed), (gpointer)iapplet); ++ g_object_set_data(G_OBJECT(entry->image), "pixbufhandler", (gpointer)handler); ++ ++ gtk_widget_hide(GTK_WIDGET(entry->menu)); ++ ++ get_shown_entries(iapplet); ++ ++ update_icon_mode(iapplet); ++ ++ return; ++} ++ ++static void ++entry_removed(IndicatorObject *io, IndicatorObjectEntry *entry, IndicatorApplet *iapplet) ++{ ++ iapplet->images = g_list_remove(iapplet->images, entry->image); ++ iapplet->menus = g_list_remove(iapplet->menus, entry->menu); ++ iapplet->num--; ++ ++ gulong handler = (gulong)g_object_get_data(G_OBJECT(entry->image), "pixbufhandler"); ++ ++ if (g_signal_handler_is_connected(G_OBJECT(entry->image), handler)) ++ { ++ g_signal_handler_disconnect(G_OBJECT(entry->image), handler); ++ } ++ ++ get_shown_entries(iapplet); ++ ++ update_icon_mode(iapplet); ++} ++ ++static gboolean ++load_module(const gchar * name, IndicatorApplet *iapplet) ++{ ++ g_return_val_if_fail(name != NULL, FALSE); ++ ++ if (!g_str_has_suffix(name, G_MODULE_SUFFIX)) ++ { ++ return FALSE; ++ } ++ ++ gchar *fullpath = g_build_filename(INDICATOR_DIR, name, NULL); ++ IndicatorObject *io = iapplet->io = indicator_object_new_from_file(fullpath); ++ g_free(fullpath); ++ ++ g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, ++ G_CALLBACK(entry_added), iapplet); ++ g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, ++ G_CALLBACK(entry_removed), iapplet); ++ ++ GList *entries = indicator_object_get_entries(io); ++ GList *entry = NULL; ++ ++ g_object_set_data(G_OBJECT(io), "filename", (gpointer)g_strdup(name)); ++ ++ for (entry = entries; entry != NULL; entry = g_list_next(entry)) ++ { ++ entry_added(io, (IndicatorObjectEntry*)entry->data, iapplet); ++ } ++ ++ g_list_free(entries); ++ ++ return TRUE; ++} ++ ++/* Drawing, widgets, etc ... */ ++static void ++resize_da(IndicatorApplet *iapplet) ++{ ++ gint size = awn_applet_get_size(iapplet->applet); ++ GtkPositionType pos = awn_applet_get_pos_type(iapplet->applet); ++ gint rc = iapplet->config_rows_cols; ++ ++ gint pb_size = size * 1.1 / rc; ++ ++ gint num = g_list_length(iapplet->shown_images); ++ ++ if (pos == GTK_POS_TOP || pos == GTK_POS_BOTTOM) ++ { ++ gtk_widget_set_size_request(iapplet->da, ++ ((int)(num / rc) + num % rc) * pb_size, -1); ++ } ++ else ++ { ++ gtk_widget_set_size_request(iapplet->da, -1, ++ ((int)(num / rc) + num % rc) * pb_size); ++ } ++ ++ gtk_widget_queue_draw(iapplet->da); ++} ++ ++static gboolean ++determine_position(IndicatorApplet *iapplet, gint x, gint y) ++{ ++ AwnApplet *applet = iapplet->applet; ++ GtkPositionType pos = awn_applet_get_pos_type(applet); ++ gint size = awn_applet_get_size(applet); ++ gint offset = awn_applet_get_offset(applet); ++ gint width = iapplet->da->allocation.width; ++ gint height = iapplet->da->allocation.height; ++ gint rc = iapplet->config_rows_cols; ++ gint pb_size = size * 1.1 / rc; ++ ++ gint col = -1, row = -1, num = -1, dx = -1, dy = -1; ++ ++ switch (pos) ++ { ++ case GTK_POS_BOTTOM: ++ row = (height - y - offset) / pb_size; ++ if (row == -1) ++ { ++ row = 0; ++ } ++ dy = y - height + offset + pb_size * (row + 1); ++ ++ col = (gint)(x / pb_size); ++ dx = x - col * pb_size; ++ num = col * rc + row; ++ break; ++ ++ case GTK_POS_TOP: ++ row = (y - offset) / pb_size; ++ if (row == -1) ++ { ++ row = 0; ++ } ++ dy = y - (offset + pb_size * row); ++ ++ col = (gint)(x / pb_size); ++ dx = x - col * pb_size; ++ num = col * rc + row; ++ break; ++ ++ case GTK_POS_LEFT: ++ col = (x - offset) / pb_size; ++ if (col == -1) ++ { ++ col = 0; ++ } ++ dx = x - (offset + pb_size * col); ++ ++ row = (gint)(y / pb_size); ++ dy = y - row * pb_size; ++ num = row * rc + col; ++ break; ++ ++ default: ++ col = (width - x - offset) / pb_size; ++ if (col == -1) ++ { ++ col = 0; ++ } ++ dx = x - width + offset + pb_size * (col + 1); ++ ++ row = (gint)(y / pb_size); ++ dy = y - row * pb_size; ++ num = row * rc + col; ++ break; ++ } ++ ++ if (row == -1 || col == -1 || num == -1 || num >= g_list_length(iapplet->shown_menus)) ++ { ++ return FALSE; ++ } ++ ++ iapplet->popup_num = num; ++ iapplet->dx = dx; ++ iapplet->dy = dy; ++ ++ return TRUE; ++} ++ ++static void ++da_expose_event(GtkWidget *da, GdkEventExpose *event, IndicatorApplet *iapplet) ++{ ++ AwnApplet *applet = AWN_APPLET(iapplet->applet); ++ ++ cairo_t *cr = gdk_cairo_create(da->window); ++ ++ if (gdk_screen_is_composited(gtk_widget_get_screen(da))) ++ { ++ cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); ++ cairo_paint(cr); ++ } ++ ++ cairo_set_operator(cr, CAIRO_OPERATOR_OVER); ++ ++ GtkPositionType pos = awn_applet_get_pos_type(applet); ++ gint offset = awn_applet_get_offset(applet); ++ gint size = awn_applet_get_size(applet); ++ gint w = da->allocation.width; ++ gint h = da->allocation.height; ++ gfloat x = 0.0, y = 0.0; ++ gint rc = iapplet->config_rows_cols; ++ gint pb_size = size * 1.1 / rc; ++ ++ GtkImage *image; ++ GdkPixbuf *pb; ++ GIcon *icon; ++ GtkIconInfo *icon_info; ++ gchar *icon_path; ++ gboolean free_pb; ++ ++ GtkIconTheme *theme = gtk_icon_theme_get_default(); ++ ++ gint i; ++ for (i = 0; i < g_list_length(iapplet->shown_images); i++) ++ { ++ /* Get the pixbuf */ ++ pb = NULL; ++ free_pb = FALSE; ++ image = GTK_IMAGE(g_list_nth_data(iapplet->shown_images, i)); ++ icon = g_object_get_data(G_OBJECT(image), "indicator-names-data"); ++ ++ icon_info = gtk_icon_theme_lookup_by_gicon(theme, icon, pb_size, ++ GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_USE_BUILTIN); ++ if (icon_info == NULL) ++ { ++ icon_info = gtk_icon_theme_lookup_by_gicon(theme, icon, 22, ++ GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_USE_BUILTIN); ++ } ++ ++ if (icon_info == NULL) ++ { ++ if (gtk_image_get_storage_type(image) == GTK_IMAGE_PIXBUF) ++ { ++ pb = gtk_image_get_pixbuf(image); ++ ++ if (gdk_pixbuf_get_width(pb) != pb_size || gdk_pixbuf_get_height(pb) != pb_size) ++ { ++ pb = gdk_pixbuf_scale_simple(pb, pb_size, pb_size, GDK_INTERP_BILINEAR); ++ free_pb = TRUE; ++ } ++ } ++ } ++ else ++ { ++ icon_path = (gchar*)gtk_icon_info_get_filename(icon_info); ++ pb = gdk_pixbuf_new_from_file_at_size(icon_path, pb_size, pb_size, NULL); ++ free_pb = TRUE; ++ gtk_icon_info_free(icon_info); ++ } ++ ++ cairo_save(cr); ++ ++ switch (pos) ++ { ++ case GTK_POS_BOTTOM: ++ x = (i - i % rc) * pb_size / rc; ++ y = h - pb_size * (1 + i % rc) - offset; ++ break; ++ ++ case GTK_POS_TOP: ++ x = (i - i % rc) * pb_size / rc; ++ y = pb_size * (i % rc) + offset; ++ break; ++ ++ case GTK_POS_LEFT: ++ x = pb_size * (i % rc) + offset; ++ y = (i - i % rc) * pb_size / rc; ++ break; ++ ++ default: ++ x = w - pb_size * (1 + i % rc) - offset; ++ y = (i - i % rc) * pb_size / rc; ++ break; ++ } ++ ++ cairo_rectangle(cr, x, y, pb_size, pb_size); ++ cairo_clip(cr); ++ cairo_translate(cr, x, y); ++ ++ if (GDK_IS_PIXBUF(pb)) ++ { ++ gdk_cairo_set_source_pixbuf(cr, pb, 0.0, 0.0); ++ cairo_paint(cr); ++ ++ cairo_restore(cr); ++ ++ if (free_pb) ++ { ++ g_object_unref(G_OBJECT(pb)); ++ } ++ } ++ } ++} ++ ++static gboolean ++deactivate_event (GtkMenuShell *menushell, IndicatorApplet *iapplet) ++{ ++ g_object_set (awn_overlayable_get_effects ++ (AWN_OVERLAYABLE(AWN_ICON(g_list_nth_data(iapplet->awnicons, iapplet->popup_num)))), ++ "depressed", FALSE, NULL); ++} ++ ++static void ++update_icon_mode(IndicatorApplet *iapplet) ++{ ++ if (iapplet->applet_mode) ++ { ++ gtk_widget_hide(iapplet->da); ++ } ++ else ++ { ++ resize_da(iapplet); ++ gtk_widget_show(iapplet->da); ++ ++ GList *l = NULL; ++ for (l = gtk_container_get_children(GTK_CONTAINER(iapplet->icon_box)); l; l = l->next) ++ { ++ if (GTK_WIDGET(l->data) != iapplet->da) ++ { ++ gtk_widget_hide(GTK_WIDGET(l->data)); ++ } ++ } ++ ++ return; ++ } ++ ++ if (iapplet->shown_images == NULL) ++ { ++ return; ++ } ++ ++ gint size = awn_applet_get_size(iapplet->applet); ++ gboolean free_pb; ++ GtkImage *image; ++ GIcon *icon; ++ AwnIcon *awnicon; ++ GdkPixbuf *pb; ++ GtkIconTheme *theme; ++ GtkIconInfo *icon_info; ++ ++ gint nshown = g_list_length(iapplet->shown_images); ++ gulong i; ++ for (i = 0; i < nshown; i++) ++ { ++ image = GTK_IMAGE(g_list_nth_data(iapplet->shown_images, i)); ++ ++ if (g_list_length(iapplet->awnicons) <= i) ++ { ++ /* Make new AwnIcon... */ ++ awnicon = AWN_ICON(awn_themed_icon_new()); ++ g_signal_connect(G_OBJECT(awnicon), "button-press-event", ++ G_CALLBACK(icon_button_press), (gpointer)iapplet); ++ g_signal_connect(G_OBJECT(awnicon), "context-menu-popup", ++ G_CALLBACK(icon_right_click), (gpointer)iapplet); ++ g_signal_connect(G_OBJECT(awnicon), "scroll-event", ++ G_CALLBACK(icon_scroll), (gpointer)iapplet); ++ g_signal_connect(GTK_WIDGET (g_list_nth_data(iapplet->shown_menus, i)), "deactivate", ++ G_CALLBACK(deactivate_event), (gpointer)iapplet); ++ g_object_set_data(G_OBJECT(awnicon), "num", (gpointer)i); ++ ++ gtk_box_pack_start(GTK_BOX(iapplet->icon_box), GTK_WIDGET(awnicon), FALSE, FALSE, 0); ++ gtk_widget_show(GTK_WIDGET(awnicon)); ++ ++ iapplet->awnicons = g_list_append(iapplet->awnicons, (gpointer)awnicon); ++ } ++ else ++ { ++ awnicon = AWN_ICON(g_list_nth_data(iapplet->awnicons, i)); ++ } ++ ++ awn_icon_set_pos_type(awnicon, awn_applet_get_pos_type(iapplet->applet)); ++ awn_icon_set_offset(awnicon, awn_applet_get_offset(iapplet->applet)); ++ ++ IndicatorObject *io = INDICATOR_OBJECT(g_object_get_data(G_OBJECT(image), "indicator")); ++ if (INDICATOR_IS_OBJECT(io)) ++ { ++ const gchar *name = g_object_get_data(G_OBJECT(io), "filename"); ++ ++ if (!g_strcmp0(name, "libme.so")) ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Me menu")); ++ } ++ else if (!g_strcmp0(name, "libmessaging.so")) ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Messaging menu")); ++ } ++ else if (!g_strcmp0(name, "libnetworkmenu.so")) ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Network menu")); ++ } ++ else if (!g_strcmp0(name, "libsession.so")) ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Indicator Applet Session")); ++ } ++ else if (!g_strcmp0(name, "libsoundmenu.so")) ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Sound Menu")); ++ } ++ else ++ { ++ awn_icon_set_tooltip_text(awnicon, _("Indicator Applet")); ++ } ++ } ++ ++ free_pb = FALSE; ++ icon = g_object_get_data(G_OBJECT(image), "indicator-names-data"); ++ pb = NULL; ++ theme = gtk_icon_theme_get_default(); ++ icon_info = gtk_icon_theme_lookup_by_gicon(theme, icon, size, ++ GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_USE_BUILTIN); ++ if (icon_info == NULL) ++ { ++ icon_info = gtk_icon_theme_lookup_by_gicon(theme, icon, 22, ++ GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_USE_BUILTIN); ++ } ++ ++ if (icon_info == NULL) ++ { ++ if (gtk_image_get_storage_type(image) == GTK_IMAGE_PIXBUF) ++ { ++ pb = gtk_image_get_pixbuf(image); ++ ++ if (gdk_pixbuf_get_width(pb) != size || gdk_pixbuf_get_height(pb) != size) ++ { ++ pb = gdk_pixbuf_scale_simple(pb, size, size, GDK_INTERP_BILINEAR); ++ free_pb = TRUE; ++ } ++ } ++ } ++ else ++ { ++ const gchar *icon_path = gtk_icon_info_get_filename(icon_info); ++ pb = gdk_pixbuf_new_from_file_at_size(icon_path, size, size, NULL); ++ free_pb = TRUE; ++ gtk_icon_info_free(icon_info); ++ } ++ ++ awn_icon_set_from_pixbuf(awnicon, pb); ++ if (free_pb) ++ { ++ g_object_unref(G_OBJECT(pb)); ++ } ++ ++ gtk_widget_show(GTK_WIDGET(awnicon)); ++ } ++ ++ if (g_list_length(iapplet->awnicons) > i) ++ { ++ gint j; ++ gpointer rm; ++ for (j = g_list_length(iapplet->awnicons); j > i; j--) ++ { ++ rm = g_list_nth_data(iapplet->awnicons, j - 1); ++ iapplet->awnicons = g_list_remove(iapplet->awnicons, rm); ++ gtk_widget_destroy(GTK_WIDGET(rm)); ++ } ++ } ++} ++ ++/* AwnIcon-related code ... */ ++static void ++icon_menu_position(GtkMenu *menu, gint *x, gint *y, gboolean *move, IndicatorApplet *iapplet) ++{ ++ GtkWidget *icon = GTK_WIDGET(g_list_nth_data(iapplet->awnicons, iapplet->popup_num)); ++ GtkPositionType pos_type = awn_applet_get_pos_type(iapplet->applet); ++ gint size = awn_applet_get_size(iapplet->applet); ++ gint offset = awn_applet_get_offset(iapplet->applet); ++ ++ gint mw = GTK_WIDGET(menu)->requisition.width; ++ gint mh = GTK_WIDGET(menu)->requisition.height; ++ gint aw = icon->allocation.width; ++ gint ah = icon->allocation.height; ++ ++ GdkScreen *screen = gtk_widget_get_screen(icon); ++ gint sw = gdk_screen_get_width(screen); ++ gint sh = gdk_screen_get_height(screen); ++ ++ switch (pos_type) ++ { ++ case GTK_POS_LEFT: ++ *x = offset + size * 1.1; ++ gdk_window_get_origin(icon->window, NULL, y); ++ break; ++ case GTK_POS_RIGHT: ++ *x = sw - offset - size * 1.1 - mw; ++ gdk_window_get_origin(icon->window, NULL, y); ++ break; ++ case GTK_POS_TOP: ++ gdk_window_get_origin(icon->window, x, NULL); ++ *y = offset + size * 1.1; ++ break; ++ default: ++ gdk_window_get_origin(icon->window, x, NULL); ++ *y = sh - offset - size * 1.1 - mh; ++ break; ++ } ++ ++ *move = TRUE; ++} ++ ++static gboolean ++icon_button_press(AwnIcon *icon, GdkEventButton *event, IndicatorApplet *iapplet) ++{ ++ if (iapplet->shown_menus == NULL || event->button == 3) ++ { ++ return FALSE; ++ } ++ ++ iapplet->popup_num = (gulong)g_object_get_data(G_OBJECT(icon), "num"); ++ ++ gtk_menu_popup(GTK_MENU(g_list_nth_data(iapplet->shown_menus, iapplet->popup_num)), NULL, NULL, ++ (GtkMenuPositionFunc)icon_menu_position, (gpointer)iapplet, 1, event->time); ++ ++ return FALSE; ++} ++ ++static gboolean ++icon_right_click(AwnIcon *icon, GdkEventButton *event, IndicatorApplet *iapplet) ++{ ++ if (!iapplet->awn_menu) ++ { ++ iapplet->awn_menu = awn_applet_create_default_menu(iapplet->applet); ++ ++ GtkWidget *item = gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, NULL); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(show_prefs), (gpointer)iapplet); ++ gtk_menu_shell_append(GTK_MENU_SHELL(iapplet->awn_menu), GTK_WIDGET(item)); ++ ++ item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(show_about), NULL); ++ gtk_menu_shell_append(GTK_MENU_SHELL(iapplet->awn_menu), GTK_WIDGET(item)); ++ ++ gtk_widget_show_all(iapplet->awn_menu); ++ } ++ ++ gtk_menu_popup(GTK_MENU(iapplet->awn_menu), NULL, NULL, NULL, NULL, ++ event->button, event->time); ++ ++ return FALSE; ++} ++ ++static gboolean ++icon_scroll(AwnIcon *icon, GdkEventScroll *event, IndicatorApplet *iapplet) ++{ ++ gulong num = (gulong)g_object_get_data(G_OBJECT(icon), "num"); ++ ++ GtkWidget *image = g_list_nth_data(iapplet->shown_images, num); ++ IndicatorObject *io = g_object_get_data(G_OBJECT(image), "indicator"); ++ g_signal_emit_by_name(io, "scroll", 1, event->direction); ++ ++ return FALSE; ++} ++ ++/* DrawingArea-related code ... */ ++static void ++da_menu_position(GtkMenu *menu, gint *x, gint *y, gboolean *move, IndicatorApplet *iapplet) ++{ ++ AwnApplet *applet = AWN_APPLET(iapplet->applet); ++ GtkPositionType pos = awn_applet_get_pos_type(applet); ++ gint size = awn_applet_get_size(applet); ++ gint offset = awn_applet_get_offset(applet); ++ gint mwidth = GTK_WIDGET(menu)->requisition.width; ++ gint mheight = GTK_WIDGET(menu)->requisition.height; ++ gint rc = iapplet->config_rows_cols; ++ gint pb_size = size * 1.1 / rc; ++ ++ switch (pos) ++ { ++ case GTK_POS_BOTTOM: ++ *x -= iapplet->dx; ++ *y -= iapplet->dy + mheight; ++ break; ++ case GTK_POS_TOP: ++ *x -= iapplet->dx; ++ *y += pb_size - iapplet->dy; ++ break; ++ case GTK_POS_LEFT: ++ *x += pb_size - iapplet->dx; ++ *y -= iapplet->dy; ++ break; ++ default: ++ *x -= iapplet->dx + mwidth; ++ *y -= iapplet->dy; ++ break; ++ } ++ ++ /* fits to screen? */ ++ GdkScreen *screen = NULL; ++ if (gtk_widget_has_screen (GTK_WIDGET (menu))) ++ { ++ screen = gtk_widget_get_screen (GTK_WIDGET (menu)); ++ } ++ else ++ { ++ screen = gdk_screen_get_default (); ++ } ++ if (screen) ++ { ++ gint screen_w = gdk_screen_get_width (screen); ++ gint screen_h = gdk_screen_get_height (screen); ++ *x = MIN (*x, screen_w - mwidth); ++ *y = MIN (*y, screen_h - mheight); ++ if (*x < 0) *x = 0; ++ if (*y < 0) *y = 0; ++ } ++ ++ *move = TRUE; ++} ++ ++static gboolean ++da_button_press(GtkWidget *widget, GdkEventButton *event, IndicatorApplet *iapplet) ++{ ++ AwnApplet *applet = AWN_APPLET(iapplet->applet); ++ if (event->button == 3) ++ { ++ if (!iapplet->awn_menu) ++ { ++ iapplet->awn_menu = awn_applet_create_default_menu(applet); ++ ++ GtkWidget *item = gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, NULL); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(show_prefs), (gpointer)iapplet); ++ gtk_menu_shell_append(GTK_MENU_SHELL(iapplet->awn_menu), GTK_WIDGET(item)); ++ ++ item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL); ++ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(show_about), NULL); ++ gtk_menu_shell_append(GTK_MENU_SHELL(iapplet->awn_menu), GTK_WIDGET(item)); ++ ++ gtk_widget_show_all(iapplet->awn_menu); ++ } ++ ++ gtk_menu_popup(GTK_MENU(iapplet->awn_menu), NULL, NULL, NULL, NULL, ++ event->button, event->time); ++ ++ return FALSE; ++ } ++ ++ if (iapplet->applet_mode || !determine_position(iapplet, (gint)event->x, (gint)event->y)) ++ { ++ return FALSE; ++ } ++ ++ gtk_menu_popup(GTK_MENU(g_list_nth_data(iapplet->shown_menus, iapplet->popup_num)), NULL, NULL, ++ (GtkMenuPositionFunc)da_menu_position, (gpointer)iapplet, event->button, event->time); ++ ++ return FALSE; ++} ++ ++static gboolean ++da_scroll(GtkWidget *da, GdkEventScroll *event, IndicatorApplet *iapplet) ++{ ++ if (!determine_position(iapplet, (gint)event->x, (gint)event->y)) ++ { ++ return FALSE; ++ } ++ ++ GtkWidget *image = g_list_nth_data(iapplet->shown_images, iapplet->popup_num); ++ IndicatorObject *io = g_object_get_data(G_OBJECT(image), "indicator"); ++ g_signal_emit_by_name(io, "scroll", 1, event->direction); ++ ++ return FALSE; ++} ++ ++static gboolean ++applet_size_changed(AwnApplet *applet, gint size, IndicatorApplet *iapplet) ++{ ++ update_icon_mode(iapplet); ++ ++ return FALSE; ++} ++ ++static gboolean ++applet_position_changed(AwnApplet *applet, GtkPositionType pos, IndicatorApplet *iapplet) ++{ ++ update_icon_mode(iapplet); ++ ++ return FALSE; ++} ++ ++AwnApplet* ++awn_applet_factory_initp(const gchar *name, const gchar *uid, gint panel_id) ++{ ++ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); ++ textdomain (GETTEXT_PACKAGE); ++ ++ AwnApplet *applet = awn_applet_new(name, uid, panel_id); ++ ++ GtkWidget *da = gtk_drawing_area_new(); ++ gtk_widget_add_events(da, GDK_BUTTON_PRESS_MASK); ++ gtk_widget_show(da); ++ ++ GtkWidget *icon_box = awn_icon_box_new_for_applet(applet); ++ gtk_box_pack_start(GTK_BOX(icon_box), da, FALSE, FALSE, 0); ++ gtk_widget_show_all(icon_box); ++ gtk_container_add(GTK_CONTAINER(applet), icon_box); ++ ++ IndicatorApplet* iapplet = g_new0(IndicatorApplet, 1); ++ iapplet->da = da; ++ iapplet->num = 0; ++ iapplet->applet = applet; ++ iapplet->icon_box = icon_box; ++ iapplet->images = NULL; ++ iapplet->menus = NULL; ++ iapplet->shown_images = NULL; ++ iapplet->shown_menus = NULL; ++ iapplet->awnicons = NULL; ++ iapplet->popup_num = -1; ++ iapplet->last_num = -1; ++ ++ iapplet->config = awn_config_get_default_for_applet(iapplet->applet, NULL); ++ update_config(iapplet); ++ ++ g_signal_connect(G_OBJECT(applet), "position-changed", ++ G_CALLBACK(applet_position_changed), (gpointer)iapplet); ++ g_signal_connect(G_OBJECT(applet), "size-changed", ++ G_CALLBACK(applet_size_changed), (gpointer)iapplet); ++ ++ g_signal_connect(G_OBJECT(da), "button-press-event", ++ G_CALLBACK(da_button_press), (gpointer)iapplet); ++ g_signal_connect(G_OBJECT(da), "expose-event", ++ G_CALLBACK(da_expose_event), (gpointer)iapplet); ++ g_signal_connect(G_OBJECT(da), "scroll-event", ++ G_CALLBACK(da_scroll), (gpointer)iapplet); ++ ++ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INDICATOR_ICONS_DIR); ++ /* Code (mostly) from gnome-panel's indicator-applet-0.3.6/src/applet-main.c */ ++ if (g_file_test(INDICATOR_DIR, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) ++ { ++ GDir *dir = g_dir_open(INDICATOR_DIR, 0, NULL); ++ ++ const gchar *name; ++ while ((name = g_dir_read_name(dir)) != NULL) ++ { ++ /* Don't load the global menu used in Unity (Ubuntu Netbook Edition) */ ++ if (!g_strcmp0(name, "libappmenu.so")) ++ { ++ continue; ++ } ++ load_module(name, iapplet); ++ } ++ g_dir_close (dir); ++ } ++ /* End... */ ++ ++ update_icon_mode(iapplet); ++ ++ return applet; ++} +diff -Naur awn-extras-0.4.0.orig/applets/maintained/indicator-applet/awn-applet-indicator-applet.schema-ini.in awn-extras-0.4.0/applets/maintained/indicator-applet/awn-applet-indicator-applet.schema-ini.in +--- awn-extras-0.4.0.orig/applets/maintained/indicator-applet/awn-applet-indicator-applet.schema-ini.in 1970-01-01 01:00:00.000000000 +0100 ++++ awn-extras-0.4.0/applets/maintained/indicator-applet/awn-applet-indicator-applet.schema-ini.in 2012-01-17 05:54:46.000000000 +0100 +@@ -0,0 +1,47 @@ ++[DEFAULT] ++single_instance = false ++ ++[DEFAULT/rows_cols] ++type = integer ++default = 2 ++_description=The number of rows (top and bottom edge) or columns (side edges) ++ ++[DEFAULT/applet_icon_mode] ++type = boolean ++default = false ++_description=If true, use an Awn applet icon instead ++ ++[DEFAULT/indicator_applet] ++type = boolean ++default = true ++_description=If true, show the indicator applet icons ++ ++[DEFAULT/indicator_applet_session] ++type = boolean ++default = false ++_description=If true, show the indicator applet session icon (lock screen, switch users, etc) ++ ++[DEFAULT/me_menu] ++type = boolean ++default = false ++_description=If true, show the Me menu (chat, microblogging, etc) ++ ++[DEFAULT/messaging_menu] ++type = boolean ++default = true ++_description=If true, show the Messaging icon ++ ++[DEFAULT/network_menu] ++type = boolean ++default = true ++_description=If true, show the Network menu ++ ++[DEFAULT/sound_menu] ++type = boolean ++default = true ++_description=If true, show the Sound control menu ++ ++[DEFAULT/other_menus] ++type = boolean ++default = true ++_description=If true, show any other menus +diff -Naur awn-extras-0.4.0.orig/applets/maintained/indicator-applet/indicator-applet.desktop.in.in awn-extras-0.4.0/applets/maintained/indicator-applet/indicator-applet.desktop.in.in +--- awn-extras-0.4.0.orig/applets/maintained/indicator-applet/indicator-applet.desktop.in.in 1970-01-01 01:00:00.000000000 +0100 ++++ awn-extras-0.4.0/applets/maintained/indicator-applet/indicator-applet.desktop.in.in 2012-01-17 05:54:46.000000000 +0100 +@@ -0,0 +1,10 @@ ++[Desktop Entry] ++Type=Application ++X-AWN-Type=Applet ++X-AWN-AppletType=C ++_Name=Indicator Applet ++_Comment=An applet to hold all of the system indicators ++Exec=awn-applet -p %k ++X-AWN-AppletExec=@LIBDIR@/awn/applets/indicator-applet/indicator-applet.so ++Icon=indicator-applet ++X-AWN-AppletCategory=Monitor,System,Utility +diff -Naur awn-extras-0.4.0.orig/applets/maintained/indicator-applet/Makefile.am awn-extras-0.4.0/applets/maintained/indicator-applet/Makefile.am +--- awn-extras-0.4.0.orig/applets/maintained/indicator-applet/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ awn-extras-0.4.0/applets/maintained/indicator-applet/Makefile.am 2012-01-17 05:54:46.000000000 +0100 +@@ -0,0 +1,19 @@ ++APPLET_NAME = indicator-applet ++ ++APPLET_CFLAGS = $(INDICATOR_CFLAGS) \ ++ -DINDICATOR_DIR=\""$(INDICATORDIR)"\" \ ++ -DINDICATOR_ICONS_DIR=\""$(INDICATORICONSDIR)"\" \ ++ $(NULL) ++ ++include $(top_srcdir)/Makefile.c-applet ++include $(top_srcdir)/Makefile.schemas ++ ++applet_LTLIBRARIES = indicator-applet.la ++indicator_applet_la_SOURCES = \ ++ applet.c \ ++ $(NULL) ++indicator_applet_la_LIBADD = \ ++ $(AWN_LIBS) \ ++ $(INDICATOR_LIBS) \ ++ $(NULL) ++indicator_applet_la_LDFLAGS = $(APPLET_LINKER_FLAGS) +diff -Naur awn-extras-0.4.0.orig/applets/Makefile.am awn-extras-0.4.0/applets/Makefile.am +--- awn-extras-0.4.0.orig/applets/Makefile.am 2010-04-11 02:05:44.000000000 +0200 ++++ awn-extras-0.4.0/applets/Makefile.am 2012-01-17 05:57:11.952164702 +0100 +@@ -37,6 +37,12 @@ + maintained/yama \ + $(NULL) + endif ++# --enable-indicator-applet ++if ENABLE_INDICATOR ++CONDITIONAL_APPLETS += \ ++ maintained/indicator-applet \ ++ $(NULL) ++endif + # --with-webkit and/or --with-mozilla + if BUILD_WEBAPPLET + CONDITIONAL_APPLETS += \ +diff -Naur awn-extras-0.4.0.orig/configure.ac awn-extras-0.4.0/configure.ac +--- awn-extras-0.4.0.orig/configure.ac 2010-04-11 16:57:59.000000000 +0200 ++++ awn-extras-0.4.0/configure.ac 2012-01-17 05:59:35.499935521 +0100 +@@ -46,10 +46,12 @@ + + AC_ARG_WITH([gconf], AS_HELP_STRING([--without-gconf],[Disable building/installing applets that need GConf]),,[with_gconf=yes]) + AC_ARG_WITH([gnome], AS_HELP_STRING([--without-gnome],[Disable building/installing applets that require Gnome-specific libraries]),,[with_gnome=yes]) ++AC_ARG_WITH([indicator], AS_HELP_STRING([--with-indicator],[Enable building/installing applets that require libindicator]),,[with_indicator=no]) + AC_ARG_WITH([mozilla], AS_HELP_STRING([--with-mozilla],[Enable building/installing applets that require Gecko (Mozilla)]),,[with_mozilla=no]) + AC_ARG_WITH([webkit], AS_HELP_STRING([--with-webkit],[Enable building/installing applets that require webkitgtk]),,[with_webkit=no]) + AM_CONDITIONAL(WITH_GCONF, test "$with_gconf" != "no") + AM_CONDITIONAL(WITH_GNOME, test "$with_gnome" != "no") ++AM_CONDITIONAL(ENABLE_INDICATOR, test "$with_indicator" != "no") + AM_CONDITIONAL(WITH_MOZILLA, test "$with_mozilla" != "no") + AM_CONDITIONAL(WITH_WEBKIT, test "$with_webkit" != "no") + AM_CONDITIONAL(BUILD_WEBAPPLET, test "$with_mozilla" != "no" -o "$with_webkit" != "no") +@@ -100,6 +102,17 @@ + #PKG_CHECK_MODULES(GNOME_VFS, [gnome-vfs-2.0]) + #fi + ++if test "$with_indicator" != "no"; then ++# indicator-applet ++INDICATOR_REQUIRED_VERSION=0.3.0 ++INDICATOR_PKG_NAME=indicator-0.4 ++PKG_CHECK_MODULES(INDICATOR, [$INDICATOR_PKG_NAME >= $INDICATOR_REQUIRED_VERSION]) ++INDICATORDIR=`$PKG_CONFIG --variable=indicatordir $INDICATOR_PKG_NAME` ++INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir $INDICATOR_PKG_NAME` ++AC_SUBST(INDICATORDIR) ++AC_SUBST(INDICATORICONSDIR) ++fi ++ + if test "$with_gnome" != "no"; then + # main-menu, cairo-menu + PKG_CHECK_MODULES(GNOME_MENU, [libgnome-menu]) +@@ -321,6 +334,8 @@ + applets/maintained/garbage/Makefile + applets/maintained/garbage/garbage.desktop.in + applets/maintained/hardware-sensors/Makefile ++applets/maintained/indicator-applet/Makefile ++applets/maintained/indicator-applet/indicator-applet.desktop.in + applets/maintained/mail/Makefile + applets/maintained/media-control/Makefile + applets/maintained/media-icons/Makefile diff --git a/bamf/PKGBUILD b/bamf/PKGBUILD index d32ffa56b..ecbdcf9fc 100644 --- a/bamf/PKGBUILD +++ b/bamf/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: György Balló pkgname=bamf -pkgver=0.2.104 -pkgrel=2 +pkgver=0.2.106 +pkgrel=1 pkgdesc="Removes the headache of applications matching into a simple DBus daemon and c wrapper library" arch=('i686' 'x86_64') url="https://launchpad.net/bamf" @@ -10,8 +10,8 @@ depends=('dbus-glib' 'libwnck3' 'libgtop') makedepends=('libwnck') optdepends=('gtk2: GTK+ 2 library') options=(!libtool) -source=(http://launchpad.net/$pkgname/0.2/0.2.204/+download/$pkgname-$pkgver.tar.gz) -md5sums=('4271cd5979483f7e3a9bffc42fed6383') +source=(http://launchpad.net/$pkgname/0.2/0.2.106/+download/$pkgname-$pkgver.tar.gz) +md5sums=('5bb1d1f9cf5657b2f62b25b138edfcb6') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/beets-hg/PKGBUILD b/beets-hg/PKGBUILD index f62b4571f..80da170df 100644 --- a/beets-hg/PKGBUILD +++ b/beets-hg/PKGBUILD @@ -10,7 +10,8 @@ arch=('any') url="http://beets.radbox.org/" license=('MIT') depends=('python2-munkres' 'mutagen' - 'python2-distribute' 'python-unidecode') + 'python2-distribute' 'python-unidecode' + 'python2-musicbrainzngs') makedepends=('mercurial') provides=('beets') conflicts=('beets') diff --git a/beets/PKGBUILD b/beets/PKGBUILD index 894a2bec4..b0161d022 100644 --- a/beets/PKGBUILD +++ b/beets/PKGBUILD @@ -3,14 +3,15 @@ python=python2 pkgname=beets -pkgver=1.0b11 +pkgver=1.0b12 pkgrel=1 pkgdesc="flexible music library manager and tagger" depends=('python2-munkres' 'mutagen' - 'python2-distribute' 'python-unidecode') + 'python2-distribute' 'python-unidecode' + 'python2-musicbrainzngs') arch=('any') source=(http://pypi.python.org/packages/source/b/beets/beets-$pkgver.tar.gz) -md5sums=(3e3a81aef98bf7208a7ce07c0ed43f5b) +md5sums=(575e8d9f3636d824e4bdaa3b1d9d0261) url="http://beets.radbox.org/" license="MIT" diff --git a/eli/PKGBUILD b/eli/PKGBUILD index fed40303b..e891f8129 100644 --- a/eli/PKGBUILD +++ b/eli/PKGBUILD @@ -1,5 +1,5 @@ pkgname=eli -pkgver=4.5.2 +pkgver=4.7.4 pkgrel=1 pkgdesc="Eli is a programming environment that supports all phases of translator construction with extensive libraries implementing common tasks, yet handling arbitrary special cases. Output is the C subset of C++." arch=(i686 x86_64) @@ -10,11 +10,13 @@ md5sums=('6dab5cf3152678914055bdbdf36e1106') build() { cd $srcdir/$pkgname-$pkgver/ - tar xfvj $pkgname-$pkgver.tar.bz2 - export ODIN_LOCALIPC=1 + #tar xfvj $pkgname-$pkgver.tar.bz2 + #export ODIN_LOCALIPC=1 ./configure --prefix=/usr - make || return 1 - cp $startdir/Makefile $srcdir/$pkgname-$pkgver/Makefile - make DESTDIR=$pkgdir install - chmod 755 -R $pkgdir + make nobrowsers + #cp $startdir/Makefile $srcdir/$pkgname-$pkgver/Makefile + #make DESTDIR=$pkgdir install + #chmod 755 -R $pkgdir + ./install.sh $pkgdir/usr } +md5sums=('2a0a1429c4ffffceab8a7ce24e5ed5fb') diff --git a/keepass/PKGBUILD b/keepass/PKGBUILD index e28d4b8dc..d68d58e26 100644 --- a/keepass/PKGBUILD +++ b/keepass/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Andrej Gelenberg pkgname=keepass -pkgver=2.18 +pkgver=2.18_120116 pkgrel=1 pkgdesc="KeePass Password Safe, the free, open source, light-weight and easy-to-use password manager." arch=('any') @@ -11,7 +11,7 @@ license=('GPL2') depends=('mono>=2.6' 'desktop-file-utils' 'xdg-utils') optdepends=('xdotool: if you want to use auto-type.') install=keepass.install -source=(http://downloads.sourceforge.net/project/keepass/KeePass%202.x/${pkgver}/KeePass-${pkgver}.zip +source=(http://keepass.info/filepool/KeePass_120116_Unix.zip keepass keepass.1 keepass.desktop @@ -52,7 +52,7 @@ package() { install -Dm644 keepass.xml ${pkgdir}/usr/share/mime/packages/keepass.xml } -md5sums=('54e25b1a240ddfdaa1f0af80a79beb17' +md5sums=('3ec1a5aa705d1020815fb3c38f733e76' 'daa5d6c01c11cf38c6f5cc207333aa9a' 'a2a0dff1ebf0aaf6cbfb6f8566f4a010' '0ff6c4e6b12b77d1954292efcd2e6b97' diff --git a/libnatpmp/PKGBUILD b/libnatpmp/PKGBUILD index 5de6b140d..54fe43509 100644 --- a/libnatpmp/PKGBUILD +++ b/libnatpmp/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Pierre Bourdon pkgname=libnatpmp -pkgver=20110618 +pkgver=20110808 pkgrel=1 pkgdesc="A portable and fully compliant implementation of the NAT-PMP protocol" arch=('i686' 'x86_64') @@ -9,8 +9,7 @@ url="http://miniupnp.free.fr/libnatpmp.html" license=('custom:BSD') depends=('glibc') makedepends=() -source=('http://miniupnp.free.fr/files/download.php?file=libnatpmp-20110618.tar.gz') -sha256sums=('ec4028729e0e9da09badde9986fe6b43ef67914d8382144fad07d4e905983ea1') +source=(http://miniupnp.free.fr/files/download.php?file=libnatpmp-$pkgver.tar.gz) build() { cd "$srcdir/$pkgname-$pkgver" @@ -25,3 +24,4 @@ package() { # Needed by some packages install -m 644 getgateway.h declspec.h "$pkgdir/usr/include/libnatpmp" } +md5sums=('22a1225b890471a7750a9bf26eb863f7') diff --git a/linux-lqx/PKGBUILD b/linux-lqx/PKGBUILD index c0d4a186d..6db8535fe 100644 --- a/linux-lqx/PKGBUILD +++ b/linux-lqx/PKGBUILD @@ -4,7 +4,7 @@ ########################################################################################################### # Patch and Build Options ########################################################################################################### -_menu="n" # menuconfig option [m = make menuconfig; x = make xconfig; n = none] +_menu="m" # menuconfig option [m = make menuconfig; x = make xconfig; n = none] _config="pkg" # "local": make localmod config - compile ONLY probed modules - see notes below! # "old": make with old config (/proc/config.gz) # "pkg": use this package's config @@ -50,7 +50,7 @@ replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi' 'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs' 'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500' 'kernel26-lqx') install='linux-lqx.install' -source=(ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.bz2 +source=(ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.xz http://liquorix.net/sources/${_lqxpatchname}.gz http://liquorix.net/sources/${_basekernel}/config.i386 http://liquorix.net/sources/${_basekernel}/config.amd64 @@ -262,9 +262,8 @@ build() { # vim:ts=2:sw=2:expandtab # oh hai thar: checksums -sha512sums=('1f57b98e8da34b10f37ce94e0f13a994c111d483b104c27a8f58a4a55013a73a9f1ffcebb597be63ce0dfadb92201e93b0e072ba49bac0033026aceb0840c812' - '68e11f8e468511756158132ee078e53061660be2d5dce9d2947607128d88a8be8fa12cc650260422c511c05bc52579a4b42162f0bb308a024ff0eebd9524fb42' - '8de0331950f1d3ffeabb1850b3466ac9c84952c2be3445f2312c5befd91656cf91247463ee87b8f399b531cce2deeccffa88d1bec773dc5b77447955a4b5e448' - '5c55f8155f8593d8768a5ee49c9e38da1775a6cf5c57af9a7d74e0dae439de79ab74dcdb711924296d9185b9bd920a3add7b3de85441eeeaa5c9e5a9b00f1b43' - '75633c3778843c87b6a772551835fd0370eca68ce871c8518202dda1f88c3633e116c3886a45acd16b98e99128f5e17e39323af93e291780a8e3efea459ec06c') - +sha512sums=('77e9a52d78d6c8e951df1e166023eebe5defc5ef3c45d3ac84b613137b3c2e55cee5693d828ebd06c5034bd89ea2a5f862f55824f2b7839c9ad7212c81e3ecb0' + '68e11f8e468511756158132ee078e53061660be2d5dce9d2947607128d88a8be8fa12cc650260422c511c05bc52579a4b42162f0bb308a024ff0eebd9524fb42' + '1fa54f32d772ab1cd020ad31c06ad22e0a7bd06ad87592592755691a6f00c7f6224fcb428e9a3da9b390a55784231101a211e0c0d94d94c9fbc2b938a492037c' + '31f835ad4a40c373285ef523b6538993b7a06796de9e38d43b879079d7bed919bd37d7719be48319592f2fe3bc5bee93c84f8e7e5da8548d9fd085da56284bf3' + '75633c3778843c87b6a772551835fd0370eca68ce871c8518202dda1f88c3633e116c3886a45acd16b98e99128f5e17e39323af93e291780a8e3efea459ec06c') diff --git a/multivalent-pdf-tools/PKGBUILD b/multivalent-pdf-tools/PKGBUILD new file mode 100644 index 000000000..558cd2265 --- /dev/null +++ b/multivalent-pdf-tools/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Olivier Mehani +# $Id: PKGBUILD 316 2012-01-17 07:43:22Z shtrom $ +pkgname=multivalent-pdf-tools +_arcname=Multivalent +pkgver=20060102 +pkgrel=1 +pkgdesc="PDF tools to compress, impose, decrypt/encrypt, split/merge from Multivalent" +arch=(any) +url="http://sourceforge.net/projects/multivalent/" +license=('GPL') +depends=("java-runtime") +# XXX: This version is no longer available from the upstream source, but newer +# versions do not ship the PDF tools +source=(http://pdfsizeopt.googlecode.com/files/$_arcname$pkgver.jar) + +package() { + install -D -m 644 $srcdir/$_arcname$pkgver.jar $pkgdir/usr/share/java/multivalent/$_arcname$pkgver.jar +} + +# vim:set ts=2 sw=2 et: +md5sums=('813bb651a1cc6ea230f28aac47f78051') diff --git a/ocaml-ounit/PKGBUILD b/ocaml-ounit/PKGBUILD index c037fa361..5baa6f877 100644 --- a/ocaml-ounit/PKGBUILD +++ b/ocaml-ounit/PKGBUILD @@ -5,7 +5,7 @@ # Sylvester Johansson pkgname=ocaml-ounit pkgver=1.1.0 -pkgrel=5 +pkgrel=6 arch=('i686' 'x86_64') license=('MIT') pkgdesc="Unit testing framework for OCaml" @@ -18,12 +18,13 @@ md5sums=('bf82bd7f8853cd9a1aff7be716192643') build() { cd "$srcdir/${pkgname/ocaml-/}-$pkgver" - make CONFIGUREFLAGS="--prefix /usr --destdir $pkgdir" build + make CONFIGUREFLAGS="--prefix /usr --destdir $pkgdir" build doc } package() { cd "$srcdir/${pkgname/ocaml-/}-$pkgver" export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)" install -dm 755 "$OCAMLFIND_DESTDIR" + make install install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/oxygen-gtk3/PKGBUILD b/oxygen-gtk3/PKGBUILD new file mode 100644 index 000000000..803253d97 --- /dev/null +++ b/oxygen-gtk3/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: A Rojas + +pkgname=oxygen-gtk3 +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Port of the default KDE widget theme (Oxygen) to GTK" +arch=('i686' 'x86_64') +url="http://kde-look.org/content/show.php/?content=136216" +license=('LGPL') +depends=('gtk3') +makedepends=('cmake') +source=("http://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.bz2") +md5sums=('029571469ea3436d47cdac20b2069fed') + +build() { + cd $srcdir + mkdir build + cd build + cmake ../$pkgname-$pkgver -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd $srcdir/build + make DESTDIR="$pkgdir" install +} diff --git a/pdfsizeopt-svn/PKGBUILD b/pdfsizeopt-svn/PKGBUILD new file mode 100644 index 000000000..aa740cc23 --- /dev/null +++ b/pdfsizeopt-svn/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Olivier Mehani +# $Id: PKGBUILD 314 2012-01-17 07:39:53Z shtrom $ +pkgname=pdfsizeopt-svn +pkgver=171 +pkgrel=1 +pkgdesc="PDF file size optimizer" +arch=(any) +url="https://code.google.com/p/pdfsizeopt" +license=('GPL2') +groups=() +depends=("python2>=2.4" "ghostscript>=8.61" "sam2p" "tif22pnm") +makedepends=('subversion') +optdepends=("multivalent-pdf-tools: to optimise cross reference table and object serialisation [use --use-multivalent=true]" + "pngout: to optimise the size of PNG parts [use --use-jbig2=true]" + "jbig2enc: to manage JBIG2 parts [use --use-pngout=true]") +source=("archpackage.patch") + +_svntrunk=http://pdfsizeopt.googlecode.com/svn/trunk/ +_svnmod=pdfsizeopt + +build() { + cd "$srcdir" + msg "Connecting to SVN server...." + + if [[ -d "$_svnmod/.svn" ]]; then + (cd "$_svnmod" && svn up -r "$pkgver") + else + svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod" + fi + + msg "SVN checkout done or server timeout" + cd $_svnmod + patch -p0 < $srcdir/archpackage.patch +} + +package() { + install -D -m 755 $srcdir/pdfsizeopt/pdfsizeopt.py $pkgdir/usr/bin/pdfsizeopt +} + +# vim:set ts=2 sw=2 et: +md5sums=('0c2bfe7f87cfcdc6774015c0d6fa15f7') diff --git a/pdfsizeopt-svn/archpackage.patch b/pdfsizeopt-svn/archpackage.patch new file mode 100644 index 000000000..8c45bc384 --- /dev/null +++ b/pdfsizeopt-svn/archpackage.patch @@ -0,0 +1,36 @@ +Index: pdfsizeopt.py +=================================================================== +--- pdfsizeopt.py (revision 171) ++++ pdfsizeopt.py (working copy) +@@ -1,4 +1,4 @@ +-#! /usr/bin/python2.4 ++#! /usr/bin/python2 + # + # pdfsizeopt.py: do various PDF size optimizations + # by pts@fazekas.hu at Sun Mar 29 13:42:05 CEST 2009 +@@ -6712,7 +6712,11 @@ + Pathname to Multivalent.jar or None. + """ + assert os.sep not in file_name +- multivalent_jar = FindOnPath(file_name) ++ # XXX ArchLinux packaging-specific ++ multivalent_jar = "/usr/share/java/multivalent/%s" % file_name ++ if not os.path.isfile(multivalent_jar): ++ # XXX resume normal operation ++ multivalent_jar = FindOnPath(file_name) + if multivalent_jar is None: + slash_file_name = os.sep + file_name + for item in os.getenv('CLASSPATH', '').split(os.pathsep): +@@ -6865,9 +6869,9 @@ + argv.append('--help') + + try: +- use_pngout = True +- use_jbig2 = True +- use_multivalent = True ++ use_pngout = False ++ use_jbig2 = False ++ use_multivalent = False + do_optimize_images = True + do_optimize_objs = True + do_unify_fonts = True diff --git a/python2-milk/PKGBUILD b/python2-milk/PKGBUILD index df2782082..f09e79e25 100644 --- a/python2-milk/PKGBUILD +++ b/python2-milk/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Thomas Dziedzic < gostrc at gmail > pkgname=python2-milk -pkgver=0.4.1 +pkgver=0.4.2 pkgrel=1 pkgdesc='A machine learning toolkit with a focus on supervised classification with several classifiers.' arch=('i686' 'x86_64') @@ -10,7 +10,7 @@ license=('MIT') depends=('python2-numpy') makedepends=('python2-distribute') source=("http://pypi.python.org/packages/source/m/milk/milk-${pkgver}.tar.gz") -md5sums=('afce62e3648dfb29a49f897dd40c7a7d') +md5sums=('f4b9489ac550b5b32fb5810422b438f1') build() { cd milk-${pkgver} diff --git a/python2-musicbrainzngs/PKGBUILD b/python2-musicbrainzngs/PKGBUILD new file mode 100644 index 000000000..f29360aa9 --- /dev/null +++ b/python2-musicbrainzngs/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Adrian Sampson + +python=python2 +name=musicbrainzngs + +pkgname=$python-$name +pkgver=0.1 +pkgrel=1 +pkgdesc="bindings for the MusicBrainz NGS service" +depends=('python2') +makedepends=('python2-distribute') +arch=('any') +source=(http://pypi.python.org/packages/source/m/$name/$name-$pkgver.tar.gz) +md5sums=(fa033b914d2b438a9447be3687101439) +url="https://github.com/alastair/python-musicbrainz-ngs" +license="BSD" + +build() { + cd $srcdir/$name-$pkgver + $python setup.py build || return 1 + $python setup.py install --root=$pkgdir +} diff --git a/ruby-diff-lcs/PKGBUILD b/ruby-diff-lcs/PKGBUILD dissimilarity index 92% index ade038a19..f11f1aef2 100644 --- a/ruby-diff-lcs/PKGBUILD +++ b/ruby-diff-lcs/PKGBUILD @@ -1,19 +1,23 @@ -# Contributor: gem2arch 0.1 -pkgname=ruby-diff-lcs -pkgver=1.1.2 -_realname="diff-lcs" -pkgrel=1 -pkgdesc="Provides a list of changes that represent the difference between two sequenced collections." -arch=(any) -url="http://rubyforge.org/projects/ruwiki/" -license=("GPL") -depends=('ruby') -source=(http://gems.rubyforge.org/gems/diff-lcs-$pkgver.gem) -noextract=(diff-lcs-$pkgver.gem) - -build() { - cd $srcdir - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install --ignore-dependencies -i "$pkgdir$_gemdir" ${_realname}-$pkgver.gem -} -md5sums=('60524d29b37f76d56ce835323e324879') +# Contributor: mtorromeo +# Maintainer: eagletmt +pkgname=ruby-diff-lcs +_realname=diff-lcs +pkgver=1.1.3 +pkgrel=1 +pkgdesc='Provides a list of changes that represent the difference between two sequenced collections.' +arch=("any") +url='http://rubygems.org/gems/diff-lcs' +license=('GPL' 'PerlArtistic' 'MIT') +depends=("ruby") +makedepends=('rubygems') +source=(http://rubygems.org/downloads/$_realname-$pkgver.gem) +noextract=($_realname-$pkgver.gem) + +build() { + cd "$srcdir" + local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin" $_realname-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('86595b4618756d1dceac28e6104e285f') diff --git a/ruby-rspec-core/PKGBUILD b/ruby-rspec-core/PKGBUILD dissimilarity index 91% index 71422e12e..3c1463123 100644 --- a/ruby-rspec-core/PKGBUILD +++ b/ruby-rspec-core/PKGBUILD @@ -1,18 +1,23 @@ -# Maintainer: Adam Russell -pkgname=ruby-rspec-core -pkgver=2.6.4 -pkgrel=1 -pkgdesc="RSpec runner and example groups" -arch=('any') -url="http://rubygems.org/gems/rspec-core" -license=('MIT') -depends=('ruby') -source=(http://gems.rubyforge.org/gems/rspec-core-$pkgver.gem) -noextract=(rspec-core-$pkgver.gem) -md5sums=('89f85770f34f6b764383ad987d230905') - -build() { - cd "${srcdir}" - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin/" rspec-core-$pkgver.gem -} +# Contributor: Adam Russell +# Maintainer: eagletmt +pkgname=ruby-rspec-core +_realname=rspec-core +pkgver=2.8.0 +pkgrel=1 +pkgdesc='RSpec runner and example groups' +arch=("any") +url='http://github.com/rspec/rspec-core' +license=("MIT") +depends=("ruby") +makedepends=('rubygems') +source=(http://rubygems.org/downloads/$_realname-$pkgver.gem) +noextract=($_realname-$pkgver.gem) + +build() { + cd "$srcdir" + local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin" $_realname-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('3af637967fe2d029975b43fd6fbf06da') diff --git a/ruby-rspec-expectations/PKGBUILD b/ruby-rspec-expectations/PKGBUILD dissimilarity index 91% index 056e78909..33de02598 100644 --- a/ruby-rspec-expectations/PKGBUILD +++ b/ruby-rspec-expectations/PKGBUILD @@ -1,18 +1,23 @@ -# Maintainer: Adam Russell -pkgname=ruby-rspec-expectations -pkgver=2.6.0 -pkgrel=1 -pkgdesc="rspec expectations (should[_not] and matchers)" -arch=('any') -url="http://rubygems.org/gems/rspec-expectations" -license=('MIT') -depends=('ruby' 'ruby-diff-lcs>=1.1.2') -source=(http://gems.rubyforge.org/gems/rspec-expectations-$pkgver.gem) -noextract=(rspec-expectations-$pkgver.gem) -md5sums=('31bcccd2be299d0e16dbfe09082bf46c') - -build() { - cd "${srcdir}" - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin/" rspec-expectations-$pkgver.gem -} +# Contributor: Adam Russell +# Maintainer: eagletmt +pkgname=ruby-rspec-expectations +_realname=rspec-expectations +pkgver=2.8.0 +pkgrel=1 +pkgdesc='RSpec expectations (should[_not] and matchers)' +arch=("any") +url='http://github.com/rspec/rspec-expectations' +license=("MIT") +depends=("ruby" "ruby-diff-lcs>=1.1.2" "ruby-diff-lcs<1.2") +makedepends=('rubygems') +source=(http://rubygems.org/downloads/$_realname-$pkgver.gem) +noextract=($_realname-$pkgver.gem) + +build() { + cd "$srcdir" + local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" $_realname-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('ff189516304527bec2fc8c2957ff2766') diff --git a/ruby-rspec-mocks/PKGBUILD b/ruby-rspec-mocks/PKGBUILD dissimilarity index 78% index 4e5c415b7..fe3d463d3 100644 --- a/ruby-rspec-mocks/PKGBUILD +++ b/ruby-rspec-mocks/PKGBUILD @@ -1,18 +1,23 @@ -# Maintainer: Adam Russell -pkgname=ruby-rspec-mocks -pkgver=2.6.0 -pkgrel=1 -pkgdesc="RSpec's 'test double' framework, with support for stubbing and mocking" -arch=('any') -url="http://rubygems.org/gems/rspec-mocks" -license=('MIT') -depends=('ruby') -source=(http://gems.rubyforge.org/gems/rspec-mocks-$pkgver.gem) -noextract=(rspec-mocks-$pkgver.gem) -md5sums=('c09537d81cb3034eab20b3277efc6ede') - -build() { - cd "${srcdir}" - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin/" rspec-mocks-$pkgver.gem -} +# Contributor: Adam Russell +# Maintainer: eagletmt +pkgname=ruby-rspec-mocks +_realname=rspec-mocks +pkgver=2.8.0 +pkgrel=1 +pkgdesc="RSpec's 'test double' framework, with support for stubbing and mocking" +arch=("any") +url='http://github.com/rspec/rspec-mocks' +license=("MIT") +depends=("ruby") +makedepends=('rubygems') +source=(http://rubygems.org/downloads/$_realname-$pkgver.gem) +noextract=($_realname-$pkgver.gem) + +build() { + cd "$srcdir" + local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" $_realname-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('799cf162a36b247cf7ca9ee77fcc6ef3') diff --git a/ruby-rspec/PKGBUILD b/ruby-rspec/PKGBUILD dissimilarity index 94% index 55123d7ed..e496818f4 100644 --- a/ruby-rspec/PKGBUILD +++ b/ruby-rspec/PKGBUILD @@ -1,22 +1,26 @@ -# Maintainer: Adam Russell -pkgname=ruby-rspec -pkgver=2.6.0 -pkgrel=1 -pkgdesc="Behaviour Driven Development for Ruby" -arch=('any') -url="http://rubygems.org/gems/rspec" -license=('MIT') -depends=( - 'ruby' - 'ruby-rspec-mocks>=2.6' 'ruby-rspec-mocks<2.7' - 'ruby-rspec-expectations>=2.6' 'ruby-rspec-expectations<2.7' - 'ruby-rspec-core>=2.6' 'ruby-rspec-core<2.7') -source=(http://gems.rubyforge.org/gems/rspec-$pkgver.gem) -noextract=(rspec-$pkgver.gem) -md5sums=('bce1f587f60ad5809852a431a156f319') - -build() { - cd "${srcdir}" - local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" - gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin/" rspec-$pkgver.gem -} +# Contributor: Adam Russell +# Maintainer: eagletmt +pkgname=ruby-rspec +_realname=rspec +pkgver=2.8.0 +pkgrel=1 +pkgdesc='Behaviour-Driven Development tool for Ruby programmers' +arch=("any") +url='http://github.com/rspec' +license=("MIT") +depends=("ruby" \ + "ruby-rspec-core>=2.8.0" "ruby-rspec-core<2.9" \ + "ruby-rspec-expectations>=2.8.0" "ruby-rspec-expectations<2.9" \ + "ruby-rspec-mocks>=2.8.0" "ruby-rspec-mocks<2.9") +makedepends=('rubygems') +source=(http://rubygems.org/downloads/$_realname-$pkgver.gem) +noextract=($_realname-$pkgver.gem) + +build() { + cd "$srcdir" + local _gemdir="$(ruby -rubygems -e 'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" $_realname-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('8c6752b4c955e13c506490c7f838c067') diff --git a/wallpapoz/PKGBUILD b/wallpapoz/PKGBUILD index 9d3501342..23aa09edd 100644 --- a/wallpapoz/PKGBUILD +++ b/wallpapoz/PKGBUILD @@ -1,19 +1,25 @@ # vim:set ts=2 sw=2 et: # Contributor: sickhate +# Maintainer: alsvartr pkgname=wallpapoz -pkgver=0.5 -pkgrel=2 -pkgdesc='Gnome Multi Backgrounds and Wallpapers Configuration Tool' -url="http://${pkgname}.akbarhome.com/" +pkgver=0.6.1 +pkgrel=1 +pkgdesc='Enables you to configure Gnome and XFCE desktop wallpapers in unique way' +url="http://vajrasky.wordpress.com/wallpapoz/" license=('GPL2') depends=('python2' 'python-imaging' 'pygtk') optdepends=('gnome-python: Native language help documentation support') arch=('any') -source=("http://${pkgname}.akbarhome.com/files/${pkgname}-${pkgver}.tar.bz2") -md5sums=('95231129c118034b0ae49e0960e409d9') +source=("https://github.com/downloads/vajrasky/${pkgname}/${pkgname}-${pkgver}.tar.bz2") +md5sums=('e89f1988af6eb70a8bee0cb3a36bd854') package() { + mkdir ${pkgdir}/usr/ + cd "${srcdir}/${pkgname}-${pkgver}" - python2 setup.py install --installdir="${pkgdir}" + sed -i 's/python/python2/' src/* +# sed -i 's/python/python2/' src/wallpapoz + python2 setup.py install --installdir="${pkgdir}/usr/" } + -- 2.11.4.GIT