Subject: [alpine-aports] [PATCH] main/parted: disable nls on s390x

From: "Tuan M. Hoang" <[email-masked]>
Date: Thu, 23 Feb 2017 02:35:31 -0500

---
 main/parted/APKBUILD                       |  3 ++
 main/parted/fix-libintl-header-s390x.patch | 52 ++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 main/parted/fix-libintl-header-s390x.patch

diff --git a/main/parted/APKBUILD b/main/parted/APKBUILD
index 5279697bf6..eabf101d40 100644
--- a/main/parted/APKBUILD
+++ b/main/parted/APKBUILD
@@ -11,6 +11,7 @@ depends=
 makedepends="readline-dev ncurses-dev lvm2-dev bash util-linux-dev"
 source="ftp://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.xz
 	fix-includes.patch
+	fix-libintl-header-s390x.patch
 	"
 
 _builddir="$srcdir"/$pkgname-$pkgver
@@ -50,4 +51,6 @@ e87ffa1171acbebfa9d2475a093e7e64  fix-includes.patch"
 sha256sums="858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4  parted-3.2.tar.xz
 f87c9290e861b969f4520a1af84ebf4b8f5f1437c1d78ee235d5ffcda3bffe84  fix-includes.patch"
 sha512sums="4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4  parted-3.2.tar.xz
+f61ff35f4105167adc4bad07dcd504765fee28634526de545731b6105fd0d8c9dd13fb2c926f4aeda61e5555230d09cd729d169d10f13d2bf968d9cf3c868ce3  fix-libintl-header-s390x.patch
 55ee63c218d1867c0f2c596e7c3eec5c42af160181456cc551fe3d432eabed0ac2dd3a3955ff0c375f76aeec8071e7f55a32834b87a0d39b8ef30361f671bfdd  fix-includes.patch"
+
diff --git a/main/parted/fix-libintl-header-s390x.patch b/main/parted/fix-libintl-header-s390x.patch
new file mode 100644
index 0000000000..a304819083
--- /dev/null
+++ b/main/parted/fix-libintl-header-s390x.patch
@@ -0,0 +1,52 @@
+From faf522508e9e6193115f155be3220c4f3b585f34 Mon Sep 17 00:00:00 2001
+From: "Tuan M. Hoang" <[email-masked]>
+Date: Thu, 23 Feb 2017 04:41:29 +0000
+Subject: [PATCH] main/parted: disable nls on s390x
+
+Because we build with --disable-nls by default, we need to remove libintl.h in 
+these files on s390x. This is specific for DASD devices only on s390x.
+---
+ libparted/labels/dasd.c  | 1 -
+ libparted/labels/fdasd.c | 1 -
+ libparted/labels/vtoc.c  | 1 -
+ 3 files changed, 3 deletions(-)
+
+diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
+index fa9414f..3f1c0ba 100644
+--- a/libparted/labels/dasd.c
++++ b/libparted/labels/dasd.c
+@@ -40,7 +40,6 @@
+ #include <parted/fdasd.h>
+ #include <arch/linux.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
+index 1f87937..b0bcd5f 100644
+--- a/libparted/labels/fdasd.c
++++ b/libparted/labels/fdasd.c
+@@ -24,7 +24,6 @@
+ 
+ #include <parted/parted.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+diff --git a/libparted/labels/vtoc.c b/libparted/labels/vtoc.c
+index fdfa94f..a8d1aa4 100644
+--- a/libparted/labels/vtoc.c
++++ b/libparted/labels/vtoc.c
+@@ -12,7 +12,6 @@
+ 
+ #include <parted/parted.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+-- 
+2.11.1
+
-- 
2.11.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Thu, 23 Feb 2017 03:09:25 -0500

Change from v1 : Move libintl.h inside #if ENABLE_NLS
---
 main/parted/APKBUILD                       |  2 ++
 main/parted/fix-libintl-header-s390x.patch | 58 ++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 main/parted/fix-libintl-header-s390x.patch

index 5279697bf6..85931f4671 100644
 
 _builddir="$srcdir"/$pkgname-$pkgver
@@ -50,4 +51,5 @@ e87ffa1171acbebfa9d2475a093e7e64  fix-includes.patch"
 sha256sums="858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4  parted-3.2.tar.xz
 f87c9290e861b969f4520a1af84ebf4b8f5f1437c1d78ee235d5ffcda3bffe84  fix-includes.patch"
 sha512sums="4e37dbdd6f5032c9ebfec43704f6882379597d038167b9c4d04053efa083c68a705196713864451fa9e11d32777e16c68982877945c5efd9ea5f8252cb20e1c4  parted-3.2.tar.xz
+444a7e2fb3235dfd218f6b71fb25adde107d001f638d988ee1fa79686d8efee94a9499e27bdfdd75f9718760b448938b70a90a74285b93a39338d21f4ab4c9dc  fix-libintl-header-s390x.patch
 55ee63c218d1867c0f2c596e7c3eec5c42af160181456cc551fe3d432eabed0ac2dd3a3955ff0c375f76aeec8071e7f55a32834b87a0d39b8ef30361f671bfdd  fix-includes.patch"
diff --git a/main/parted/fix-libintl-header-s390x.patch b/main/parted/fix-libintl-header-s390x.patch
new file mode 100644
index 0000000000..68ae7d270f
--- /dev/null
+++ b/main/parted/fix-libintl-header-s390x.patch
@@ -0,0 +1,58 @@
+From 4b2a566a3e007184d3ee9ce5b399a63eebbdadc3 Mon Sep 17 00:00:00 2001
+From: "Tuan M. Hoang" <[email-masked]>
+Date: Thu, 23 Feb 2017 07:53:02 +0000
+Subject: [PATCH] main/parted: disable nls on s390x
+
+Because we build with --disable-nls by default, we need to remove libintl.h in 
+these files on s390x. This is specific for DASD devices only on s390x.
+---
+ libparted/labels/dasd.c  | 2 +-
+ libparted/labels/fdasd.c | 2 +-
+ libparted/labels/vtoc.c  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
+index fa9414f..5acf844 100644
+--- a/libparted/labels/dasd.c
++++ b/libparted/labels/dasd.c
+@@ -40,8 +40,8 @@
+ #include <parted/fdasd.h>
+ #include <arch/linux.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
++#  include <libintl.h>
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+ #  define _(String) (String)
+diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
+index 1f87937..e6a9086 100644
+--- a/libparted/labels/fdasd.c
++++ b/libparted/labels/fdasd.c
+@@ -24,8 +24,8 @@
+ 
+ #include <parted/parted.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
++#  include <libintl.h>
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+ #  define _(String) (String)
+diff --git a/libparted/labels/vtoc.c b/libparted/labels/vtoc.c
+index fdfa94f..64ba149 100644
+--- a/libparted/labels/vtoc.c
++++ b/libparted/labels/vtoc.c
+@@ -12,8 +12,8 @@
+ 
+ #include <parted/parted.h>
+ 
+-#include <libintl.h>
+ #if ENABLE_NLS
++#  include <libintl.h>
+ #  define _(String) dgettext (PACKAGE, String)
+ #else
+ #  define _(String) (String)
+-- 
+2.11.1
+
-- 
2.11.1

---