aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fatresize
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-10-09 07:41:21 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-10-09 07:41:21 +0000
commitba4b76d209bb5b6ce057b9a539705b50ee15c5a9 (patch)
treea17ff348b7493bcfaccd90b312915e0160f2ab2e /testing/fatresize
parentd7127deb857058ea9606dfd4903b3aa86746a497 (diff)
downloadaports-ba4b76d209bb5b6ce057b9a539705b50ee15c5a9.tar.bz2
aports-ba4b76d209bb5b6ce057b9a539705b50ee15c5a9.tar.xz
testing/fatresize: new aport
Diffstat (limited to 'testing/fatresize')
-rw-r--r--testing/fatresize/APKBUILD48
-rw-r--r--testing/fatresize/fatresize-1.0.2-libparted_ver_check.patch14
-rw-r--r--testing/fatresize/fatresize-1.0.2-ped_assert.patch21
-rw-r--r--testing/fatresize/fatresize-1.0.2-ped_free.patch29
4 files changed, 112 insertions, 0 deletions
diff --git a/testing/fatresize/APKBUILD b/testing/fatresize/APKBUILD
new file mode 100644
index 0000000000..07e7dc4083
--- /dev/null
+++ b/testing/fatresize/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=fatresize
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="The FAT16/FAT32 non-destructive resizer."
+url="https://sourceforge.net/projects/fatresize/"
+arch="all"
+license="GPL2"
+makedepends="automake autoconf parted-dev e2fsprogs-dev"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
+ fatresize-1.0.2-libparted_ver_check.patch
+ fatresize-1.0.2-ped_free.patch
+ fatresize-1.0.2-ped_assert.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+ autoreconf -fiv
+}
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-largefile
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
+
+sha512sums="3792e110a393fcee51ef5a12c3e09f3a0792470dc3609a262bc0d4b3186ea96922d51db445c3ec7e7eb02741f29f631c94476990914bf4822e2eac0a1e3373f7 fatresize-1.0.2.tar.bz2
+289187be8b080052266ad869e683e48c48197884d28636849434bb01e49edeff009008779ec05b4daa64c429e0931c12c9eadb87496a72d01b46bed05c41866d fatresize-1.0.2-libparted_ver_check.patch
+b84edb452086e7a9f1fe8b069721c8387ff720377392b71219ddc4751b915a03f382ad5536834f390a31844be6c932a60584f33645a0f7d3e706ae30978f24cb fatresize-1.0.2-ped_free.patch
+3cf781a32beb29b3a799fc8fb642f31bc0464394d5923632438addbb239d8973b649ddfef68bdafc8570b85d788a255023f23c11d7f5b2a36bf995bed838e38a fatresize-1.0.2-ped_assert.patch"
diff --git a/testing/fatresize/fatresize-1.0.2-libparted_ver_check.patch b/testing/fatresize/fatresize-1.0.2-libparted_ver_check.patch
new file mode 100644
index 0000000000..333d774831
--- /dev/null
+++ b/testing/fatresize/fatresize-1.0.2-libparted_ver_check.patch
@@ -0,0 +1,14 @@
+diff -up fatresize-1.0.2/configure.ac.orig fatresize-1.0.2/configure.ac
+--- fatresize-1.0.2/configure.ac.orig 2005-09-20 10:30:35.000000000 +0200
++++ fatresize-1.0.2/configure.ac 2012-12-17 23:33:06.238862845 +0100
+@@ -29,8 +29,8 @@ CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=${ac
+ dnl libparted
+ # hack
+ LIBS="$LIBS -ldl"
+-PARTED_CHECK_LIBPARTED(1.6.0, ,
+- [AC_MSG_ERROR([*** libparted >= 1.6.0 not installed - please install first ***])])
++AC_CHECK_LIB(parted, ped_malloc, [], AC_MSG_ERROR([*** libparted >= 3.1.0 not installed - please install first ***]))
++AC_CHECK_LIB(parted-fs-resize, ped_file_system_open, [], AC_MSG_ERROR([*** libparted-fs-resize >= 3.1.0 not installed - please install first ***]))
+
+ AC_SUBST(PARTED_LIBS)
+
diff --git a/testing/fatresize/fatresize-1.0.2-ped_assert.patch b/testing/fatresize/fatresize-1.0.2-ped_assert.patch
new file mode 100644
index 0000000000..34877fc844
--- /dev/null
+++ b/testing/fatresize/fatresize-1.0.2-ped_assert.patch
@@ -0,0 +1,21 @@
+diff -up fatresize-1.0.2/fatresize.c.orig fatresize-1.0.2/fatresize.c
+--- fatresize-1.0.2/fatresize.c.orig 2005-09-20 10:29:08.000000000 +0200
++++ fatresize-1.0.2/fatresize.c 2012-12-18 00:07:00.000000000 +0100
+@@ -217,7 +217,7 @@ fatresize_handler(PedException *ex)
+ static int
+ snap(PedSector* sector, PedSector new_sector, PedGeometry* range)
+ {
+- PED_ASSERT(ped_geometry_test_sector_inside (range, *sector), return 0);
++ PED_ASSERT(ped_geometry_test_sector_inside (range, *sector));
+ if (!ped_geometry_test_sector_inside(range, new_sector))
+ return 0;
+
+@@ -281,7 +281,7 @@ snap_to_boundaries (PedGeometry* new_geo
+ end_part->geom.end, end_part->geom.start - 1, -1);
+ }
+
+- PED_ASSERT (start <= end, return);
++ PED_ASSERT (start <= end);
+ ped_geometry_set (new_geom, start, end - start + 1);
+ }
+
diff --git a/testing/fatresize/fatresize-1.0.2-ped_free.patch b/testing/fatresize/fatresize-1.0.2-ped_free.patch
new file mode 100644
index 0000000000..77f4be4a82
--- /dev/null
+++ b/testing/fatresize/fatresize-1.0.2-ped_free.patch
@@ -0,0 +1,29 @@
+diff -up fatresize-1.0.2/fatresize.c.orig fatresize-1.0.2/fatresize.c
+--- fatresize-1.0.2/fatresize.c.orig 2005-09-20 10:29:08.000000000 +0200
++++ fatresize-1.0.2/fatresize.c 2012-12-18 00:19:45.061745003 +0100
+
+@@ -320,11 +320,11 @@ partition_warn_busy(PedPartition* part)
+ ("Partition %s is being used. You must unmount it "
+ "before you modify it with Parted."),
+ path);
+- ped_free(path);
++ free(path);
+ return 0;
+ }
+
+- ped_free(path);
++ free(path);
+ return 1;
+ }
+
+@@ -507,8 +507,8 @@ main(int argc, char **argv)
+ }
+ else if (!ped_unit_parse(def_str, dev, &end, &range_end))
+ return 1;
+- ped_free(old_str);
+- ped_free(def_str);
++ free(old_str);
++ free(def_str);
+
+ printd(3, "ped_geometry_duplicate()\n");
+ old_geom = ped_geometry_duplicate(&part->geom);