aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-06-30 11:43:43 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-06-30 13:04:28 +0200
commit5204b218787b2eeff641c0e40eb029a6e56b40c5 (patch)
treef2f254cedaedba5589e4de2ad4e0dfd529a933ee /main
parent95566f972455cbdd8af72554eef97e20da8a9536 (diff)
downloadaports-5204b218787b2eeff641c0e40eb029a6e56b40c5.tar.bz2
aports-5204b218787b2eeff641c0e40eb029a6e56b40c5.tar.xz
main/gparted: fix sscanf use and add ntfs-3g-progs as dep
the sscanf modifier %Ld is invalid. use %lld instead https://bugzilla.gnome.org/show_bug.cgi?id=768239
Diffstat (limited to 'main')
-rw-r--r--main/gparted/APKBUILD28
-rw-r--r--main/gparted/musl-fix-sscanf.patch241
2 files changed, 255 insertions, 14 deletions
diff --git a/main/gparted/APKBUILD b/main/gparted/APKBUILD
index 091f553402..4d874a6259 100644
--- a/main/gparted/APKBUILD
+++ b/main/gparted/APKBUILD
@@ -1,26 +1,23 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gparted
pkgver=0.26.1
-pkgrel=0
+pkgrel=1
pkgdesc="a graphical partition editor for creating, reorganizing, and deleting disk partitions"
url="http://gparted.sourceforge.net/"
arch="all"
license="GPL"
-depends="e2fsprogs"
+depends="e2fsprogs ntfs-3g-progs"
makedepends="gtkmm-dev parted-dev util-linux-dev"
install=
subpackages="$pkgname-doc $pkgname-lang"
-source="http://downloads.sourceforge.net/gparted/gparted-$pkgver/gparted-$pkgver.tar.gz"
-source="http://downloads.sourceforge.net/project/gparted/gparted/gparted-$pkgver/gparted-$pkgver.tar.gz"
+source="http://downloads.sourceforge.net/project/gparted/gparted/gparted-$pkgver/gparted-$pkgver.tar.gz
+ musl-fix-sscanf.patch
+ "
-_builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
- cd "$_builddir"
-}
+builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -35,10 +32,13 @@ build() {
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR="$pkgdir" install
}
-md5sums="b9c5f6b5ffd37400bd4bf5929e9b1781 gparted-0.26.1.tar.gz"
-sha256sums="2f54b642d25aef5ccdd9f06671c16350c005834df5c3eb13a9b7f33246372dc1 gparted-0.26.1.tar.gz"
-sha512sums="cba792751f8e984cbb4e1e0baaa97d0022ba47bd400312734ed5ae4a1bea07bc46ed522ca19a84b74ad503387fc9bd9d9cd85cdd647ba2ec028b39f8da502b67 gparted-0.26.1.tar.gz"
+md5sums="b9c5f6b5ffd37400bd4bf5929e9b1781 gparted-0.26.1.tar.gz
+c8a5842bf213ef02eeb85d95e3237372 musl-fix-sscanf.patch"
+sha256sums="2f54b642d25aef5ccdd9f06671c16350c005834df5c3eb13a9b7f33246372dc1 gparted-0.26.1.tar.gz
+427c07a7b15deacaec7754960d883da8811b82272dd655cad27c6071269e8822 musl-fix-sscanf.patch"
+sha512sums="cba792751f8e984cbb4e1e0baaa97d0022ba47bd400312734ed5ae4a1bea07bc46ed522ca19a84b74ad503387fc9bd9d9cd85cdd647ba2ec028b39f8da502b67 gparted-0.26.1.tar.gz
+aaa3f771e100d89c756c63e206090ada1c316b6028cb4ca79142a82fab7a29b54ac7229e06098eb5265bce32219a2df28f9f79c11d60d0f41ee9e538bb1f8641 musl-fix-sscanf.patch"
diff --git a/main/gparted/musl-fix-sscanf.patch b/main/gparted/musl-fix-sscanf.patch
new file mode 100644
index 0000000000..6700bb48a4
--- /dev/null
+++ b/main/gparted/musl-fix-sscanf.patch
@@ -0,0 +1,241 @@
+diff --git a/src/ext2.cc b/src/ext2.cc
+index dfb9653..c2ad1fe 100644
+--- a/src/ext2.cc
++++ b/src/ext2.cc
+@@ -179,12 +179,12 @@ void ext2::set_used_sectors( Partition & partition )
+ {
+ Glib::ustring::size_type index = output.find( "Block count:" );
+ if ( index >= output .length() ||
+- sscanf( output.substr( index ) .c_str(), "Block count: %Ld", &T ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "Block count: %lld", &T ) != 1 )
+ T = -1 ;
+
+ index = output .find( "Block size:" ) ;
+ if ( index >= output.length() ||
+- sscanf( output.substr( index ) .c_str(), "Block size: %Ld", &S ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "Block size: %lld", &S ) != 1 )
+ S = -1 ;
+
+ if ( T > -1 && S > -1 )
+@@ -207,7 +207,7 @@ void ext2::set_used_sectors( Partition & partition )
+ {
+ index = output .find( "Free blocks:" ) ;
+ if ( index >= output .length() ||
+- sscanf( output.substr( index ) .c_str(), "Free blocks: %Ld", &N ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "Free blocks: %lld", &N ) != 1 )
+ N = -1 ;
+
+ if ( N > -1 && S > -1 )
+@@ -382,7 +382,7 @@ void ext2::create_progress( OperationDetail *operationdetail )
+ Glib::ustring line = Utils::last_line( output );
+ // Text progress on the LAST LINE looks like "Writing inode tables: 105/1600"
+ long long progress, target;
+- if ( sscanf( line.c_str(), "Writing inode tables: %Ld/%Ld", &progress, &target ) == 2 )
++ if ( sscanf( line.c_str(), "Writing inode tables: %lld/%lld", &progress, &target ) == 2 )
+ {
+ operationdetail->run_progressbar( (double)progress, (double)target );
+ }
+@@ -422,7 +422,7 @@ void ext2::copy_progress( OperationDetail *operationdetail )
+ Glib::ustring line = Utils::last_line( error );
+ // Text progress on the LAST LINE of STDERR looks like "Copying 146483 / 258033 blocks ..."
+ long long progress, target;
+- if ( sscanf( line.c_str(), "Copying %Ld / %Ld blocks", &progress, &target ) == 2 )
++ if ( sscanf( line.c_str(), "Copying %lld / %lld blocks", &progress, &target ) == 2 )
+ {
+ operationdetail->run_progressbar( (double)(progress * fs_block_size),
+ (double)(target * fs_block_size),
+diff --git a/src/fat16.cc b/src/fat16.cc
+index fe38898..bfb2b0e 100644
+--- a/src/fat16.cc
++++ b/src/fat16.cc
+@@ -137,12 +137,12 @@ void fat16::set_used_sectors( Partition & partition )
+ {
+ //total file system size in logical sectors
+ Glib::ustring::size_type index = output.rfind( "\n", output.find( "sectors total" ) ) + 1;
+- if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &T ) != 1 )
++ if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%lld", &T ) != 1 )
+ T = -1 ;
+
+ //bytes per logical sector
+ index = output .rfind( "\n", output .find( "bytes per logical sector" ) ) +1 ;
+- if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &S ) != 1 )
++ if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%lld", &S ) != 1 )
+ S = -1 ;
+
+ if ( T > -1 && S > -1 )
+@@ -150,14 +150,14 @@ void fat16::set_used_sectors( Partition & partition )
+
+ //free clusters
+ index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ;
+- if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%Ld/%Ld", &S, &N ) == 2 )
++ if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%lld/%lld", &S, &N ) == 2 )
+ N -= S ;
+ else
+ N = -1 ;
+
+ //bytes per cluster
+ index = output .rfind( "\n", output .find( "bytes per cluster" ) ) +1 ;
+- if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &S ) != 1 )
++ if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%lld", &S ) != 1 )
+ S = -1 ;
+
+ if ( N > -1 && S > -1 )
+diff --git a/src/jfs.cc b/src/jfs.cc
+index 210406b..0747cc6 100644
+--- a/src/jfs.cc
++++ b/src/jfs.cc
+@@ -81,7 +81,7 @@ void jfs::set_used_sectors( Partition & partition )
+ //blocksize
+ Glib::ustring::size_type index = output.find( "Block Size:" );
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "Block Size: %Ld", &S ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "Block Size: %lld", &S ) != 1 )
+ S = -1 ;
+
+ //total blocks
+diff --git a/src/linux_swap.cc b/src/linux_swap.cc
+index f711dc8..9c513ff 100644
+--- a/src/linux_swap.cc
++++ b/src/linux_swap.cc
+@@ -85,7 +85,7 @@ void linux_swap::set_used_sectors( Partition & partition )
+ {
+ if ( line .substr( 0, path_len ) == path )
+ {
+- sscanf( line.substr( path_len ).c_str(), " %*s %*d %Ld", &N );
++ sscanf( line.substr( path_len ).c_str(), " %*s %*d %lld", &N );
+ break ;
+ }
+ }
+diff --git a/src/nilfs2.cc b/src/nilfs2.cc
+index ec84bf9..6a274b2 100644
+--- a/src/nilfs2.cc
++++ b/src/nilfs2.cc
+@@ -79,20 +79,20 @@ void nilfs2::set_used_sectors( Partition & partition )
+ //File system size in bytes
+ Glib::ustring::size_type index = output .find( "Device size:" ) ;
+ if ( index == Glib::ustring::npos
+- || sscanf( output.substr( index ) .c_str(), "Device size: %Ld", &T ) != 1
++ || sscanf( output.substr( index ) .c_str(), "Device size: %lld", &T ) != 1
+ )
+ T = -1 ;
+
+ //Free space in blocks
+ index = output .find( "Free blocks count:" ) ;
+ if ( index == Glib::ustring::npos
+- || sscanf( output.substr( index ) .c_str(), "Free blocks count: %Ld", &N ) != 1
++ || sscanf( output.substr( index ) .c_str(), "Free blocks count: %lld", &N ) != 1
+ )
+ N = -1 ;
+
+ index = output .find( "Block size:" ) ;
+ if ( index == Glib::ustring::npos
+- || sscanf( output.substr( index ) .c_str(), "Block size: %Ld", &S ) != 1
++ || sscanf( output.substr( index ) .c_str(), "Block size: %lld", &S ) != 1
+ )
+ S = -1 ;
+
+diff --git a/src/ntfs.cc b/src/ntfs.cc
+index 90031cb..2f166bd 100644
+--- a/src/ntfs.cc
++++ b/src/ntfs.cc
+@@ -129,12 +129,12 @@ void ntfs::set_used_sectors( Partition & partition )
+ {
+ Glib::ustring::size_type index = output.find( "Current volume size:" );
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "Current volume size: %Ld", &T ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "Current volume size: %lld", &T ) != 1 )
+ T = -1 ;
+
+ index = output .find( "resize at" ) ;
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "resize at %Ld", &N ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "resize at %lld", &N ) != 1 )
+ N = -1 ;
+ //For an absolutely full NTFS, "ntfsresize --info" exits
+ // with status 1 and reports this message instead
+@@ -144,7 +144,7 @@ void ntfs::set_used_sectors( Partition & partition )
+
+ index = output.find( "Cluster size" );
+ if ( index >= output.length() ||
+- sscanf( output.substr( index ).c_str(), "Cluster size : %Ld", &S ) != 1 )
++ sscanf( output.substr( index ).c_str(), "Cluster size : %lld", &S ) != 1 )
+ S = -1;
+
+ if ( T > -1 && N > -1 )
+diff --git a/src/reiser4.cc b/src/reiser4.cc
+index b588cc4..990e152 100644
+--- a/src/reiser4.cc
++++ b/src/reiser4.cc
+@@ -66,17 +66,17 @@ void reiser4::set_used_sectors( Partition & partition )
+ {
+ Glib::ustring::size_type index = output.find( "\nblocks:" );
+ if ( index >= output .length() ||
+- sscanf( output.substr( index ) .c_str(), "\nblocks: %Ld", &T ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "\nblocks: %lld", &T ) != 1 )
+ T = -1 ;
+
+ index = output .find( "\nfree blocks:" ) ;
+ if ( index >= output .length() ||
+- sscanf( output.substr( index ) .c_str(), "\nfree blocks: %Ld", &N ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "\nfree blocks: %lld", &N ) != 1 )
+ N = -1 ;
+
+ index = output .find( "\nblksize:" ) ;
+ if ( index >= output.length() ||
+- sscanf( output.substr( index ) .c_str(), "\nblksize: %Ld", &S ) != 1 )
++ sscanf( output.substr( index ) .c_str(), "\nblksize: %lld", &S ) != 1 )
+ S = -1 ;
+
+ if ( T > -1 && N > -1 && S > -1 )
+diff --git a/src/reiserfs.cc b/src/reiserfs.cc
+index ca493cf..6a435f1 100644
+--- a/src/reiserfs.cc
++++ b/src/reiserfs.cc
+@@ -83,17 +83,17 @@ void reiserfs::set_used_sectors( Partition & partition )
+ {
+ Glib::ustring::size_type index = output.find( "Count of blocks on the device:" );
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "Count of blocks on the device: %Ld", &T ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "Count of blocks on the device: %lld", &T ) != 1 )
+ T = -1 ;
+
+ index = output .find( "Blocksize:" ) ;
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "Blocksize: %Ld", &S ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "Blocksize: %lld", &S ) != 1 )
+ S = -1 ;
+
+ index = output .find( ":", output .find( "Free blocks" ) ) +1 ;
+ if ( index >= output .length() ||
+- sscanf( output .substr( index ) .c_str(), "%Ld", &N ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "%lld", &N ) != 1 )
+ N = -1 ;
+
+ if ( T > -1 && N > -1 && S > -1 )
+diff --git a/src/xfs.cc b/src/xfs.cc
+index d43cf89..c96cabf 100644
+--- a/src/xfs.cc
++++ b/src/xfs.cc
+@@ -95,19 +95,19 @@ void xfs::set_used_sectors( Partition & partition )
+ true ) )
+ {
+ //blocksize
+- if ( sscanf( output .c_str(), "blocksize = %Ld", &S ) != 1 )
++ if ( sscanf( output .c_str(), "blocksize = %lld", &S ) != 1 )
+ S = -1 ;
+
+ //filesystem blocks
+ Glib::ustring::size_type index = output.find( "\ndblocks" );
+ if ( index > output .length() ||
+- sscanf( output .substr( index ) .c_str(), "\ndblocks = %Ld", &T ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "\ndblocks = %lld", &T ) != 1 )
+ T = -1 ;
+
+ //free blocks
+ index = output .find( "\nfdblocks" ) ;
+ if ( index > output .length() ||
+- sscanf( output .substr( index ) .c_str(), "\nfdblocks = %Ld", &N ) != 1 )
++ sscanf( output .substr( index ) .c_str(), "\nfdblocks = %lld", &N ) != 1 )
+ N = -1 ;
+
+ if ( T > -1 && N > -1 && S > -1 )