Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Disk partition editing/resizing utility" |
| 2 | HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 3 | DESCRIPTION = "GNU Parted manipulates partition tables. This is useful for creating space for new operating systems, reorganizing disk usage, copying data on hard disks and disk imaging." |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-3.0-or-later" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" |
| 6 | SECTION = "console/tools" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 7 | DEPENDS = "ncurses util-linux virtual/libiconv" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | file://fix-doc-mandir.patch \ |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 11 | file://0001-fs-Add-libuuid-to-linker-flags-for-libparted-fs-resi.patch \ |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 12 | file://autoconf-2.73.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | file://run-ptest \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 14 | " |
| 15 | |
Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 16 | SRC_URI[sha256sum] = "3b43dbe33cca0f9a18601ebab56b7852b128ec1a3df3a9b30ccde5e73359e612" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 17 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | inherit autotools pkgconfig gettext texinfo ptest |
| 19 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 20 | PACKAGECONFIG ?= "readline" |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 21 | PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper lvm2" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 22 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
| 23 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame] | 24 | BBCLASSEXTEND = "native nativesdk" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
| 26 | do_compile_ptest() { |
| 27 | oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize print-flags |
| 28 | } |
| 29 | |
| 30 | do_install_ptest() { |
| 31 | t=${D}${PTEST_PATH} |
| 32 | mkdir $t/build-aux |
| 33 | cp ${S}/build-aux/test-driver $t/build-aux/ |
| 34 | cp -r ${S}/tests $t |
| 35 | cp ${B}/tests/Makefile $t/tests/ |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 36 | mkdir $t/lib |
| 37 | cp ${B}/lib/config.h $t/lib |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 38 | sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile |
| 39 | sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile |
| 40 | sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 41 | sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile |
| 42 | sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 44 | sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 45 | for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ |
| 46 | do cp ${B}/tests/.libs/$i $t/tests/; \ |
| 47 | done |
| 48 | sed -e 's| ../parted||' -i $t/tests/*.sh |
| 49 | } |
| 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | RDEPENDS:${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools" |
| 52 | RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat" |
| 53 | RDEPENDS:${PN}-ptest:append:libc-glibc = "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | glibc-utils \ |
| 55 | locale-base-en-us \ |
| 56 | " |
| 57 | |
| 58 | inherit update-alternatives |
| 59 | |
| 60 | ALTERNATIVE_PRIORITY = "100" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | ALTERNATIVE:${PN} = "partprobe" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe" |