bump Linux 3.18 trunk revision to 47027; bump Linux 3.18 kernel version to 3.18.21
[ps3openwrt_patches.git] / parted-package.patch
blobb4077e302bd0f20f052c7d4bc89683939ccd551b
1 --- /dev/null 2014-10-28 08:03:15.173899313 +0100
2 +++ package/parted/Makefile 2014-10-28 10:30:37.364413711 +0100
3 @@ -0,0 +1,49 @@
4 +#
5 +# Copyright (C) 2007 OpenWrt.org
6 +#
7 +# This is free software, licensed under the GNU General Public License v2.
8 +# See /LICENSE for more information.
9 +#
11 +include $(TOPDIR)/rules.mk
12 +include $(INCLUDE_DIR)/nls.mk
14 +PKG_NAME:=parted
15 +PKG_VERSION:=3.2
16 +PKG_RELEASE:=1
18 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
19 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
21 +include $(INCLUDE_DIR)/package.mk
23 +define Package/parted
24 + SECTION:=utils
25 + CATEGORY:=Utilities
26 + SUBMENU:=disc
27 + TITLE:=parted Partition editor
28 + DEPENDS=+libreadline +libncurses +libblkid +libiconv +libuuid +libdevmapper
29 + URL:=http://www.gnu.org/software/parted/index.shtml
30 +endef
32 +define Package/parted/description
33 + parted Partition editor
34 + http://www.gnu.org/software/parted/index.shtml
35 +endef
37 +define Build/Configure
38 + $(call Build/Configure/Default, --with-readline --disable-device-mapper)
39 +endef
41 +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-stub/include
42 +TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv-stub/lib -liconv
44 +define Package/parted/install
45 + $(INSTALL_DIR) $(1)/usr/sbin
46 + $(INSTALL_DIR) $(1)/usr/lib
47 + $(CP) $(PKG_BUILD_DIR)/libparted/.libs/libparted.so* $(1)/usr/lib/
48 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/parted/.libs/parted $(1)/usr/sbin/parted
49 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/partprobe/.libs/partprobe $(1)/usr/sbin/partprobe
50 +endef
52 +$(eval $(call BuildPackage,parted))
53 --- /dev/null 2014-10-26 12:49:12.160229277 +0100
54 +++ package/parted/patches/parted-3.2-device-mapper.patch 2014-10-19 21:12:24.495379823 +0200
55 @@ -0,0 +1,44 @@
56 +--- a/libparted/arch/linux.c.device-mapper 2014-06-15 20:15:54.000000000 +0100
57 ++++ b/libparted/arch/linux.c 2014-07-29 22:27:54.487430030 +0100
58 +@@ -2307,6 +2307,7 @@ zasprintf (const char *format, ...)
59 + static char *
60 + dm_canonical_path (PedDevice const *dev)
61 + {
62 ++#ifdef ENABLE_DEVICE_MAPPER
63 + LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
65 + /* Get map name from devicemapper */
66 +@@ -2324,6 +2325,7 @@ dm_canonical_path (PedDevice const *dev)
67 + dm_task_destroy (task);
68 + return dev_name;
69 + err:
70 ++#endif
71 + return NULL;
72 + }
74 +@@ -2944,13 +2946,14 @@ _disk_sync_part_table (PedDisk* disk)
75 + unsigned long long *start,
76 + unsigned long long *length);
79 ++#ifdef ENABLE_DEVICE_MAPPER
80 + if (disk->dev->type == PED_DEVICE_DM) {
81 + add_partition = _dm_add_partition;
82 + remove_partition = _dm_remove_partition;
83 + resize_partition = _dm_resize_partition;
84 + get_partition_start_and_length = _dm_get_partition_start_and_length;
85 + } else {
86 ++#endif
87 + add_partition = _blkpg_add_partition;
88 + remove_partition = _blkpg_remove_partition;
89 + #ifdef BLKPG_RESIZE_PARTITION
90 +@@ -2959,7 +2962,9 @@ _disk_sync_part_table (PedDisk* disk)
91 + resize_partition = NULL;
92 + #endif
93 + get_partition_start_and_length = _kernel_get_partition_start_and_length;
94 ++#ifdef ENABLE_DEVICE_MAPPER
95 + }
96 ++#endif
98 + /* lpn = largest partition number.
99 + * for remove pass, use greater of device or label limit */