diff --git a/trunk/user/parted/Makefile b/trunk/user/parted/Makefile index 767837d0b79..5c8f1e8565f 100755 --- a/trunk/user/parted/Makefile +++ b/trunk/user/parted/Makefile @@ -1,51 +1,24 @@ -SRC_NAME=parted-3.2 -SRC_URL=https://ftp.gnu.org/gnu/parted/$(SRC_NAME).tar.xz +include $(ROOTDIR)/rules.mk -THISDIR = $(shell pwd) +PKG_NAME:=parted +PKG_VERSION:=3.6 -all: download_test extract_test config_test - $(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/parted/ +PKG_HASH:=3b43dbe33cca0f9a18601ebab56b7852b128ec1a3df3a9b30ccde5e73359e612 -download_test: - ( if [ ! -f $(SRC_NAME).tar.xz ]; then \ - wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.xz $(SRC_URL); \ - fi ) +include $(INCLUDE_DIR)/package.mk -extract_test: - ( if [ ! -d $(SRC_NAME) ]; then \ - tar xJf $(SRC_NAME).tar.xz; \ - patch -d $(SRC_NAME) -p1 -i ../$(SRC_NAME).patch; \ - fi ) +CONFIGURE_VARS += LIBS="-liconv" +CONFIGURE_ARGS += \ + --without-readline \ + --disable-shared \ + --disable-device-mapper \ + --disable-nls \ + --disable-debug -config_test: - ( if [ -f ./config_done ]; then \ - echo "the same configuration"; \ - else \ - make configure && touch config_done; \ - fi ) - -configure: - ( cd $(SRC_NAME) ; \ - autoreconf -fi; \ - PKG_CONFIG_PATH="$(STAGEDIR)/lib/pkgconfig" \ - LIBS="-liconv" \ - ./configure \ - --prefix=/usr \ - --without-readline \ - --disable-shared \ - --disable-device-mapper \ - --disable-nls \ - --disable-debug \ - --host=$(HOST_TARGET) \ - --build=$(HOST_BUILD) ; \ - ) - -clean: - if [ -f $(SRC_NAME)/Makefile ] ; then \ - $(MAKE) -C $(SRC_NAME) distclean ; \ - fi ; \ - rm -f config_done +$(eval $(call BuildPackage,parted)) romfs: - $(ROMFSINST) $(THISDIR)/$(SRC_NAME)/parted/parted /sbin/parted - + $(INSTALL_DIR) $(ROMFSDIR)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/parted/parted $(ROMFSDIR)/sbin/parted diff --git a/trunk/user/parted/parted-3.2.patch b/trunk/user/parted/parted-3.2.patch deleted file mode 100755 index a133865f8c8..00000000000 --- a/trunk/user/parted/parted-3.2.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --color -urw parted-3.2-orig/libparted/arch/linux.c parted-3.2/libparted/arch/linux.c ---- parted-3.2-orig/libparted/arch/linux.c 2023-07-02 22:22:03.188943868 +0800 -+++ parted-3.2/libparted/arch/linux.c 2023-07-02 22:33:44.518944301 +0800 -@@ -41,6 +41,7 @@ - #include /* for uname() */ - #include - #include -+#include - #ifdef ENABLE_DEVICE_MAPPER - #include - #endif -@@ -2304,6 +2305,7 @@ - return r < 0 ? NULL : resultp; - } - -+#if ENABLE_DEVICE_MAPPER - static char * - dm_canonical_path (PedDevice const *dev) - { -@@ -2326,12 +2328,17 @@ - err: - return NULL; - } -+#endif - - static char* - _device_get_part_path (PedDevice const *dev, int num) - { -+#if ENABLE_DEVICE_MAPPER - char *devpath = (dev->type == PED_DEVICE_DM - ? dm_canonical_path (dev) : dev->path); -+#else -+ char *devpath = dev->path; -+#endif - size_t path_len = strlen (devpath); - char *result; - /* Check for devfs-style /disc => /partN transformation -@@ -2349,8 +2356,10 @@ - ? "p" : ""); - result = zasprintf ("%s%s%d", devpath, p, num); - } -+#if ENABLE_DEVICE_MAPPER - if (dev->type == PED_DEVICE_DM) - free (devpath); -+#endif - return result; - } - -@@ -2944,13 +2953,15 @@ - unsigned long long *start, - unsigned long long *length); - -- -+#if ENABLE_DEVICE_MAPPER - if (disk->dev->type == PED_DEVICE_DM) { - add_partition = _dm_add_partition; - remove_partition = _dm_remove_partition; - resize_partition = _dm_resize_partition; - get_partition_start_and_length = _dm_get_partition_start_and_length; -- } else { -+ } else -+#endif -+ { - add_partition = _blkpg_add_partition; - remove_partition = _blkpg_remove_partition; - #ifdef BLKPG_RESIZE_PARTITION -diff --color -urw parted-3.2-orig/libparted/fs/xfs/platform_defs.h parted-3.2/libparted/fs/xfs/platform_defs.h ---- parted-3.2-orig/libparted/fs/xfs/platform_defs.h 2023-07-02 22:22:03.188943868 +0800 -+++ parted-3.2/libparted/fs/xfs/platform_defs.h 2023-07-02 22:23:04.078945294 +0800 -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/trunk/user/parted/parted-3.2.tar.xz b/trunk/user/parted/parted-3.2.tar.xz deleted file mode 100755 index 1c554e6af3e..00000000000 Binary files a/trunk/user/parted/parted-3.2.tar.xz and /dev/null differ