Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=033e5a6dcca1fc8e8435a8a0453629323abfbe22
commit 033e5a6dcca1fc8e8435a8a0453629323abfbe22 Author: crazy <[EMAIL PROTECTED]> Date: Fri Mar 14 19:46:06 2008 +0100 gparted-0.3.5-1-i686 * Version bump * new m8r * moved away from gnome * based on idea from Fedora ( thx guys ) start gparted using hal-lock * added some patches to kill that weird lock on hal * fix for crash logic * should fix at least one part from FS#2849 diff --git a/source/xapps-extra/gparted/FrugalBuild b/source/xapps-extra/gparted/FrugalBuild new file mode 100644 index 0000000..a4eb096 --- /dev/null +++ b/source/xapps-extra/gparted/FrugalBuild @@ -0,0 +1,44 @@ +# Compiling time: 0.51 SBU +# Maintainer: crazy <[EMAIL PROTECTED]> + +pkgname=gparted +pkgver=0.3.5 +pkgrel=1 +pkgdesc="Parted GUI written in C++ using gtkmm as Graphical Toolkit" +url="http://gparted.sourceforge.net" +depends=('parted>=1.8.8' 'gtkmm' 'freetype2' 'pango>=1.15.3' 'hal') +makedepends=('perl-xml-parser') +archs=('i686' 'x86_64') +groups=('xapps-extra') +options=('scriptlet') +_F_sourceforge_ext=".tar.bz2" +_F_sourceforge_prefix="$pkgname-" +Finclude sourceforge +source=($source gparted-desktop-gnome-patch.diff gparted-kde.desktop \ + do-not-lock-hal.patch \ + refresh_crash-fix.patch \ + $pkgname) +sha1sums=('e547c1e531185bfda00a230cc76d3ebc50a957a0' \ + '0c11e37ac18a190da5fd2588ba16acfe614570fc' \ + 'b11d446ce6a2fefd10fa0f081d61460e13144cc5' \ + '1948c5c1652eb1af81253da9433a82de90b6320d' \ + '8bbf3ef8a96c56a82a63cfa499ff56d5a6dc2788' \ + 'f664e953df692a22dda8b262a7a8b645787a1752') + + +build() +{ + Fcd + Fpatchall + autoconf || Fdie + Fmake + Fmakeinstall + ## need patch + Fmkdir /usr/share/applications/kde/ usr/sbin + Ffile gparted-kde.desktop /usr/share/applications/kde/gparted.desktop + ## that depends on do-not-lock-hal.patch + Fmv /usr/bin/gparted /usr/sbin/gparted.bin + Fexe /usr/bin/gparted +} + +# optimization OK diff --git a/source/xapps-extra/gparted/do-not-lock-hal.patch b/source/xapps-extra/gparted/do-not-lock-hal.patch new file mode 100644 index 0000000..15481c6 --- /dev/null +++ b/source/xapps-extra/gparted/do-not-lock-hal.patch @@ -0,0 +1,80 @@ +--- src/GParted_Core.cc 2008-02-04 09:35:47.000000000 -0500 ++++ src/GParted_Core.cc.new 2008-02-07 15:26:32.000000000 -0500 +@@ -38,8 +38,6 @@ + #include "../include/ufs.h" + + #include <cerrno> +-#include <cstdio> +-#include <csignal> + #include <sys/statvfs.h> + + std::vector<Glib::ustring> libparted_messages ; //see ped_exception_handler() +@@ -47,13 +45,6 @@ + namespace GParted + { + +-// Clean up the fdi when terminating +-void sig_fdi_cleanup( int signum ) +-{ +- remove( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ); +- raise( signum ); +-} +- + GParted_Core::GParted_Core() + { + lp_device = NULL ; +@@ -63,44 +54,6 @@ + + ped_exception_set_handler( ped_exception_handler ) ; + +- //make sure that the fdi is cleaned up on all but the most forceful +- //program exits +- struct sigaction sa; +- sa.sa_handler = sig_fdi_cleanup; +- sigemptyset( &sa.sa_mask ); +- sa.sa_flags = SA_RESETHAND; +- if( sigaction( SIGHUP, &sa, NULL ) == -1 || +- sigaction( SIGINT, &sa, NULL ) == -1 || +- sigaction( SIGQUIT, &sa, NULL ) == -1 || +- sigaction( SIGILL, &sa, NULL ) == -1 || +- sigaction( SIGABRT, &sa, NULL ) == -1 || +- sigaction( SIGFPE, &sa, NULL ) == -1 || +- sigaction( SIGSEGV, &sa, NULL ) == -1 || +- sigaction( SIGPIPE, &sa, NULL ) == -1 || +- sigaction( SIGALRM, &sa, NULL ) == -1 || +- sigaction( SIGTERM, &sa, NULL ) == -1 || +- sigaction( SIGUSR1, &sa, NULL ) == -1 || +- sigaction( SIGUSR2, &sa, NULL ) == -1 || +- sigaction( SIGBUS, &sa, NULL ) == -1 || +- sigaction( SIGXCPU, &sa, NULL ) == -1 || +- sigaction( SIGXFSZ, &sa, NULL ) == -1 ) +- perror( "Could not set signal handler" ); +- +- //disable automount //FIXME: temporary hack, till i find a better solution... +- std::ofstream fdi_file( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ) ; +- if ( fdi_file ) +- { +- fdi_file << "<deviceinfo version='0.2'>" ; +- fdi_file << "<device>" ; +- fdi_file << "<match key='storage.hotpluggable' bool='true'>" ; +- fdi_file << "<merge key='storage.automount_enabled_hint' type='bool'>false</merge>" ; +- fdi_file << "</match>" ; +- fdi_file << "</device>" ; +- fdi_file << "</deviceinfo>" ; +- +- fdi_file .close() ; +- } +- + //get valid flags ... + for ( PedPartitionFlag flag = ped_partition_flag_next( static_cast<PedPartitionFlag>( NULL ) ) ; + flag ; +@@ -2332,8 +2285,6 @@ + if ( p_filesystem ) + delete p_filesystem ; + +- //remove .fdi file.. +- remove( "/usr/share/hal/fdi/policy/gparted-disable-automount.fdi" ) ; + } + + } //GParted + diff --git a/source/xapps-extra/gparted/gparted b/source/xapps-extra/gparted/gparted new file mode 100644 index 0000000..5a3cec5 --- /dev/null +++ b/source/xapps-extra/gparted/gparted @@ -0,0 +1,9 @@ +#!/bin/sh + +## remove that crap if found +if [ -e /usr/share/hal/fdi/policy/gparted-disable-automount.fdi ]; then + /usr/bin/rm -rf /usr/share/hal/fdi/policy/gparted-disable-automount.fdi +fi + +## Idea stolen from fedora +/usr/bin/hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run /usr/sbin/gparted.bin diff --git a/source/xapps-extra/gparted/gparted-desktop-gnome-patch.diff b/source/xapps-extra/gparted/gparted-desktop-gnome-patch.diff new file mode 100644 index 0000000..d44e960 --- /dev/null +++ b/source/xapps-extra/gparted/gparted-desktop-gnome-patch.diff @@ -0,0 +1,30 @@ +diff -urN gparted-0.3.3.orig/gparted.desktop gparted-0.3.3/gparted.desktop +--- gparted-0.3.3.orig/gparted.desktop 2006-12-06 19:43:59.000000000 +0100 ++++ gparted-0.3.3/gparted.desktop 2006-12-06 19:45:00.000000000 +0100 +@@ -62,9 +62,10 @@ + Comment[vi]=Bá» hiá»u chá»nh phân vùng Gnome + Comment[zh_HK]=GNOME åå²åç·¨è¼¯å¨ + Comment[zh_TW]=GNOME åå²åç·¨è¼¯å¨ +-Exec=gparted ++Exec=gksu gparted + Icon=gparted.png + Terminal=false + Type=Application + Categories=GNOME;Application;System; + StartupNotify=true ++NotShowIn=KDE +diff -urN gparted-0.3.3.orig/gparted.desktop.in gparted-0.3.3/gparted.desktop.in +--- gparted-0.3.3.orig/gparted.desktop.in 2006-12-06 19:43:59.000000000 +0100 ++++ gparted-0.3.3/gparted.desktop.in 2006-12-06 19:45:10.000000000 +0100 +@@ -2,9 +2,10 @@ + Encoding=UTF-8 + _Name=GParted + _Comment=GNOME Partition Editor +-Exec=gparted ++Exec=gksu gparted + Icon=gparted.png + Terminal=false + Type=Application + Categories=GNOME;Application;System; + StartupNotify=true ++NotShowIn=KDE diff --git a/source/xapps-extra/gparted/gparted-kde.desktop b/source/xapps-extra/gparted/gparted-kde.desktop new file mode 100644 index 0000000..a1604eb --- /dev/null +++ b/source/xapps-extra/gparted/gparted-kde.desktop @@ -0,0 +1,62 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=GParted +Name[bg]=GParted +Name[ca]=GParted +Name[cs]=GParted +Name[de]=GParted +Name[el]=GParted +Name[en_CA]=GParted +Name[en_GB]=GParted +Name[es]=GParted +Name[fi]=GParted +Name[fr]=GParted +Name[gl]=GParted +Name[he]=GParted +Name[hu]=GParted +Name[it]=GParted +Name[lt]=GParted +Name[mk]=ÐпаÑÑед +Name[nl]=GParted +Name[pa]=GParted +Name[pt]=GParted +Name[pt_BR]=GParted +Name[ru]=GParted +Name[sv]=GParted +Name[uk]=GParted +Name[vi]=GParted +Name[zh_CN]=GParted +Name[zh_TW]=GParted +Comment=Gnome Partition Editor +Comment[bg]=GNOME РедакÑÐ¾Ñ Ð½Ð° дÑлове на Ñ Ð°Ñд диÑк +Comment[ca]=Editor de particions del GNOME +Comment[cs]=Editor oddÃlů pro Gnome +Comment[de]=GNOME Partitionierungswerkzeug +Comment[el]=ÎÏεξεÏγαÏÏÎ®Ï Î´Î¹Î±Î¼ÎµÏιÏμάÏÏν δίÏκÏν ÏÎ¿Ï Gnome +Comment[en_CA]=Gnome Partition Editor +Comment[en_GB]=Gnome Partition Editor +Comment[es]=Editor de particiones de Gnome +Comment[fi]=Gnomen levyosioiden muokkain +Comment[fr]=Ãditeur de partition de Gnome +Comment[gl]=Editor de particións de Gnome +Comment[he]=×¢××¨× ××××צ×ת ×©× GNOME +Comment[hu]=Gnome partÃciószerkesztÅ +Comment[it]=Editor di partizioni per GNOME +Comment[lt]=Gnome skirsnių redaktorius +Comment[mk]=УÑедÑÐ²Ð°Ñ Ð½Ð° паÑÑиÑии за Ðном +Comment[nl]=Gnome Partitiebewerker +Comment[pa]=à¨à¨¨à©à¨® à¨à¨¾à¨ ਸੰਪਾਦਠ+Comment[pt]=Editor de Partições do Gnome +Comment[pt_BR]=Editor de Partições do GNOME +Comment[ru]=РедакÑÐ¾Ñ Ñазделов диÑка Ð´Ð»Ñ GNOME +Comment[sv]=Gnome-partitionsredigerare +Comment[uk]=РедакÑÐ¾Ñ ÑоздÑлÑв диÑкÑв Ð´Ð»Ñ GNOME +Comment[vi]=Bá» hiá»u chá»nh phân vùng Gnome +Comment[zh_CN]=Gnome ååºç¼è¾å¨ +Comment[zh_TW]=Gnome åå²åç·¨è¼¯å¨ +Exec=kdesu gparted +Icon=gparted.png +Terminal=false +Type=Application +Categories=KDE;Application;System; +OnlyShowIn=KDE diff --git a/source/xapps-extra/gparted/gparted.install b/source/xapps-extra/gparted/gparted.install new file mode 100644 index 0000000..2143dcc --- /dev/null +++ b/source/xapps-extra/gparted/gparted.install @@ -0,0 +1,26 @@ +post_install() +{ + echo -n "updating desktop database..." + if update-desktop-database > /dev/null 2>&1 ; then + echo " done." + else + echo " failed." + fi +} + +post_upgrade() +{ + post_install +} + +post_remove() +{ + post_install +} + +op=$1 +shift + +$op $* + +# vim: ft=sh diff --git a/source/xapps-extra/gparted/refresh_crash-fix.patch b/source/xapps-extra/gparted/refresh_crash-fix.patch new file mode 100644 index 0000000..1f202b9 --- /dev/null +++ b/source/xapps-extra/gparted/refresh_crash-fix.patch @@ -0,0 +1,53 @@ +--- include/Win_GParted.h 2006-11-25 09:56:30.000000000 -0500 ++++ include/Win_GParted.h.new 2007-10-30 00:37:29.000000000 -0400 +@@ -233,6 +233,7 @@ + unsigned short new_count;//new_count keeps track of the new created partitions + FS fs ; + bool OPERATIONSLIST_OPEN ; ++ sigc::connection combo_devices_signal_changed_id ; + + GParted_Core gparted_core ; + std::vector<Gtk::Label *> device_info ; +--- src/Win_GParted.cc 2008-02-04 09:35:47.000000000 -0500 ++++ src/Win_GParted.cc.new 2008-02-07 15:34:30.000000000 -0500 +@@ -260,7 +260,8 @@ + combo_devices .pack_start( treeview_devices_columns .device ) ; + combo_devices .pack_start( treeview_devices_columns .size, false ) ; + +- combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) ); ++ combo_devices_signal_changed_id = ++ combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) ); + + hbox_toolbar .pack_start( combo_devices, Gtk::PACK_SHRINK ) ; + } +@@ -502,6 +503,7 @@ + + void Win_GParted::refresh_combo_devices() + { ++ combo_devices_signal_changed_id .block() ; + liststore_devices ->clear() ; + + menu = manage( new Gtk::Menu() ) ; +@@ -538,6 +540,7 @@ + menubar_main .items()[ 0 ] .get_submenu() ->items()[ 1 ] .set_submenu( *menu ) ; + } + ++ combo_devices_signal_changed_id .unblock() ; + combo_devices .set_active( current_device ) ; + } + +@@ -916,13 +919,8 @@ + + void Win_GParted::combo_devices_changed() + { +- unsigned int old_current_device = current_device; + //set new current device + current_device = combo_devices .get_active_row_number() ; +- if ( current_device == (unsigned int) -1 ) +- current_device = old_current_device; +- if ( current_device >= devices .size() ) +- current_device = 0 ; + set_title( String::ucompose( _("%1 - GParted"), devices[ current_device ] .get_path() ) ); + + //refresh label_device_info + _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
