From patchwork Wed Aug 6 19:17:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Diorcet X-Patchwork-Id: 377366 X-Patchwork-Delegate: kiho@prevas.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id C09111400AA for ; Thu, 7 Aug 2014 05:18:24 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 771803FB81 for ; Wed, 6 Aug 2014 21:18:23 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by hugin.dotsrc.org (Postfix) with ESMTPS id 464163FD8F for ; Wed, 6 Aug 2014 21:18:21 +0200 (CEST) Received: by mail-we0-f178.google.com with SMTP id w61so3044961wes.23 for ; Wed, 06 Aug 2014 12:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U+yiAW7SYZvaEKuwsvK2jEGtDkzNA56JQQjjUXsZ1pg=; b=gr4HC5yv+wuRGxEr5cX3IJsrQretLbQZO6b3TAWXUtGS5un5dSlPd6fPx8jyyjQdAM qDYL1GyMnZDsDLJZ6KzPFDbjmWuVqG+ngIGqkXizSj1v0iwtQHijjXchB+2V0NArP109 4hW8HFc5lTqhsPsqU2S3zAxqa1y0lc1FTgzpDgVA4jXt8H2p4lHuF+HN7iCKEKj9sKTh XlqMvWB4JmOHSC40tK0IOUBew8gdvw8dHQCjsSCa2yhepjxeaiUbV/ySvyfT2z+QOi8E aQXLgRj1r24oxMUP7xevuTTSH+5wuSYHcg+AgOUww1/h/RqljdD+2lnPcw32aPtNBS+6 3a9w== X-Received: by 10.180.91.111 with SMTP id cd15mr51570059wib.69.1407352700704; Wed, 06 Aug 2014 12:18:20 -0700 (PDT) Received: from localhost.localdomain (mut38-h01-31-33-249-220.dsl.sta.abo.bbox.fr. [31.33.249.220]) by mx.google.com with ESMTPSA id b9sm21033538wic.23.2014.08.06.12.18.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Aug 2014 12:18:20 -0700 (PDT) From: Yann Diorcet To: dev@oe-lite.org Subject: [PATCH 04/18] util-linux: (better) Darwin support Date: Wed, 6 Aug 2014 21:17:50 +0200 Message-Id: <1407352684-7837-4-git-send-email-diorcet.yann@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1407352684-7837-1-git-send-email-diorcet.yann@gmail.com> References: <1407352684-7837-1-git-send-email-diorcet.yann@gmail.com> X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- recipes/util-linux/util-linux-2.24/configure.patch | 172 +++++++++++++++++++++ recipes/util-linux/util-linux.inc | 3 +- recipes/util-linux/util-linux_2.24.oe | 2 + 3 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 recipes/util-linux/util-linux-2.24/configure.patch diff --git a/recipes/util-linux/util-linux-2.24/configure.patch b/recipes/util-linux/util-linux-2.24/configure.patch new file mode 100644 index 0000000..1c910f0 --- /dev/null +++ b/recipes/util-linux/util-linux-2.24/configure.patch @@ -0,0 +1,172 @@ +diff -urN util-linux-2.22/Makefile.am util-linux-2.22.mod/Makefile.am +--- util-linux-2.22/Makefile.am 2012-08-15 02:06:34.000000000 +0200 ++++ util-linux-2.22.mod/Makefile.am 2012-10-19 21:17:14.000000000 +0200 +@@ -78,15 +78,15 @@ + + include schedutils/Makemodule.am + include text-utils/Makemodule.am +-include term-utils/Makemodule.am +-include login-utils/Makemodule.am ++#include term-utils/Makemodule.am ++#include login-utils/Makemodule.am + include mount-deprecated/Makemodule.am +-include sys-utils/Makemodule.am +-include misc-utils/Makemodule.am +-include disk-utils/Makemodule.am +-include fdisks/Makemodule.am ++#include sys-utils/Makemodule.am ++#include misc-utils/Makemodule.am ++#include disk-utils/Makemodule.am ++#include fdisks/Makemodule.am + +-include tests/Makemodule.am ++#include tests/Makemodule.am + + # + # Don't rely on configure.ac AC_CONFIG_FILES for install paths. +diff -urN util-linux-2.22/Makefile.in util-linux-2.22.mod/Makefile.in +--- util-linux-2.22/Makefile.in 2012-09-04 15:01:04.000000000 +0200 ++++ util-linux-2.22.mod/Makefile.in 2012-10-19 20:46:01.000000000 +0200 +@@ -2661,7 +2661,6 @@ + @BUILD_LIBUUID_TRUE@libuuid_la_LIBADD = $(SOCKET_LIBS) + @BUILD_LIBUUID_TRUE@libuuid_la_CFLAGS = -I$(ul_libuuid_incdir) -Ilibuuid/src + @BUILD_LIBUUID_TRUE@libuuid_la_LDFLAGS = \ +-@BUILD_LIBUUID_TRUE@ -Wl,--version-script=$(top_srcdir)/libuuid/src/uuid.sym \ + @BUILD_LIBUUID_TRUE@ -version-info $(LIBUUID_VERSION_INFO) + + +@@ -2762,7 +2761,6 @@ + @BUILD_LIBBLKID_TRUE@ libblkid/src/blkid.h.in + + @BUILD_LIBBLKID_TRUE@libblkid_la_LDFLAGS = \ +-@BUILD_LIBBLKID_TRUE@ -Wl,--version-script=$(top_srcdir)/libblkid/src/blkid.sym \ + @BUILD_LIBBLKID_TRUE@ -version-info $(LIBBLKID_VERSION_INFO) + + @BUILD_LIBBLKID_TESTS_TRUE@@BUILD_LIBBLKID_TRUE@blkid_tests_cflags = -DTEST_PROGRAM $(libblkid_la_CFLAGS) +@@ -2868,7 +2866,6 @@ + @BUILD_LIBMOUNT_TRUE@ libmount/src/libmount.h.in + + @BUILD_LIBMOUNT_TRUE@libmount_la_LDFLAGS = \ +-@BUILD_LIBMOUNT_TRUE@ -Wl,--version-script=$(top_srcdir)/libmount/src/libmount.sym \ + @BUILD_LIBMOUNT_TRUE@ -version-info $(LIBMOUNT_VERSION_INFO) + + @BUILD_LIBMOUNT_TESTS_TRUE@@BUILD_LIBMOUNT_TRUE@libmount_tests_cflags = -DTEST_PROGRAM $(libmount_la_CFLAGS) +diff -urN util-linux-2.22/include/strutils.h util-linux-2.22.mod/include/strutils.h +--- util-linux-2.22/include/strutils.h 2012-07-26 16:24:32.000000000 +0200 ++++ util-linux-2.22.mod/include/strutils.h 2012-10-19 20:39:23.000000000 +0200 +@@ -45,7 +45,9 @@ + dest[n-1] = 0; + } + ++#ifndef __APPLE__ + extern void strmode(mode_t mode, char *str); ++#endif + + /* Options for size_to_human_string() */ + enum +diff -urN util-linux-2.22/include/ttyutils.h util-linux-2.22.mod/include/ttyutils.h +--- util-linux-2.22/include/ttyutils.h 2012-07-23 23:21:56.000000000 +0200 ++++ util-linux-2.22.mod/include/ttyutils.h 2012-10-19 20:41:22.000000000 +0200 +@@ -29,10 +29,19 @@ + * the same result as `stty sane cr0 pass8' + */ + tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL); ++#ifdef __APPLE__ ++ tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IXANY | ISTRIP); ++#else + tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP); ++#endif + tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0); +- tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \ ++#ifdef __APPLE__ ++ tp->c_oflag &= ~(OCRNL | ONOCR | ONLRET | OFILL | \ + NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY); ++#else ++ tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \ ++ NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY); ++#endif + tp->c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE); + tp->c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | TOSTOP); + +diff -urN util-linux-2.22/lib/Makemodule.am util-linux-2.22.mod/lib/Makemodule.am +--- util-linux-2.22/lib/Makemodule.am 2012-08-13 15:13:35.000000000 +0200 ++++ util-linux-2.22.mod/lib/Makemodule.am 2012-10-19 20:39:23.000000000 +0200 +@@ -5,7 +5,6 @@ + lib/at.c \ + lib/blkdev.c \ + lib/canonicalize.c \ +- lib/cpuset.c \ + lib/crc32.c \ + lib/env.c \ + lib/fileutils.c \ +@@ -15,7 +14,6 @@ + lib/mbsalign.c \ + lib/md5.c \ + lib/pager.c \ +- lib/path.c \ + lib/procutils.c \ + lib/randutils.c \ + lib/setproctitle.c \ +@@ -51,6 +49,8 @@ + if LINUX + if HAVE_CPU_SET_T + check_PROGRAMS += test_cpuset ++libcommon_la_SOURCES += lib/cpuset.c \ ++ lib/patch.c + endif + check_PROGRAMS += \ + test_sysfs \ +diff -urN util-linux-2.22/lib/strutils.c util-linux-2.22.mod/lib/strutils.c +--- util-linux-2.22/lib/strutils.c 2012-07-26 16:26:17.000000000 +0200 ++++ util-linux-2.22.mod/lib/strutils.c 2012-10-19 20:39:23.000000000 +0200 +@@ -325,6 +325,8 @@ + errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str); + } + ++ ++#ifndef __APPLE__ + /* + * Converts stat->st_mode to ls(1)-like mode string. The size of "str" must + * be 10 bytes. +@@ -364,6 +366,8 @@ + str[10] = '\0'; + } + ++#endif ++ + /* + * returns exponent (2^x=n) in range KiB..PiB + */ +diff -urN util-linux-2.22/libblkid/src/Makemodule.am util-linux-2.22.mod/libblkid/src/Makemodule.am +--- util-linux-2.22/libblkid/src/Makemodule.am 2012-08-02 20:10:35.000000000 +0200 ++++ util-linux-2.22.mod/libblkid/src/Makemodule.am 2012-10-19 20:48:45.000000000 +0200 +@@ -124,7 +124,6 @@ + libblkid/src/blkid.h.in + + libblkid_la_LDFLAGS = \ +- -Wl,--version-script=$(top_srcdir)/libblkid/src/blkid.sym \ + -version-info $(LIBBLKID_VERSION_INFO) + + EXTRA_DIST += \ +diff -urN util-linux-2.22/libmount/src/Makemodule.am util-linux-2.22.mod/libmount/src/Makemodule.am +--- util-linux-2.22/libmount/src/Makemodule.am 2012-08-02 20:11:33.000000000 +0200 ++++ util-linux-2.22.mod/libmount/src/Makemodule.am 2012-10-19 20:48:52.000000000 +0200 +@@ -43,7 +43,6 @@ + libmount/src/libmount.h.in + + libmount_la_LDFLAGS = \ +- -Wl,--version-script=$(top_srcdir)/libmount/src/libmount.sym \ + -version-info $(LIBMOUNT_VERSION_INFO) + + EXTRA_DIST += \ +diff -urN util-linux-2.22/libuuid/src/Makemodule.am util-linux-2.22.mod/libuuid/src/Makemodule.am +--- util-linux-2.22/libuuid/src/Makemodule.am 2012-07-30 17:47:46.000000000 +0200 ++++ util-linux-2.22.mod/libuuid/src/Makemodule.am 2012-10-19 20:48:29.000000000 +0200 +@@ -32,7 +32,6 @@ + libuuid_la_CFLAGS = -I$(ul_libuuid_incdir) -Ilibuuid/src + + libuuid_la_LDFLAGS = \ +- -Wl,--version-script=$(top_srcdir)/libuuid/src/uuid.sym \ + -version-info $(LIBUUID_VERSION_INFO) + + EXTRA_DIST += libuuid/src/uuid.sym diff --git a/recipes/util-linux/util-linux.inc b/recipes/util-linux/util-linux.inc index 6334041..0475aeb 100644 --- a/recipes/util-linux/util-linux.inc +++ b/recipes/util-linux/util-linux.inc @@ -22,6 +22,8 @@ EXTRA_OECONF = "\ --disable-makeinstall-chown --disable-use-tty-group \ " +EXTRA_OECONF:>TARGET_KERNEL_darwin = " --disable-schedutils --disable-agetty --disable-sulogin" + RECIPE_FLAGS += "ncurses" EXTRA_OECONF += "${EXTRA_OECONF_NCURSES}" EXTRA_OECONF_NCURSES = " --without-ncurses" @@ -45,7 +47,6 @@ EXTRA_OECONF += "${EXTRA_OECONF_LARGEFILE}" EXTRA_OECONF_LARGEFILE = " --disable-largefile" EXTRA_OECONF_LARGEFILE:USE_largefile = " --enable-largefile" -EXTRA_OEMAKE += "V=1" # Grrrr... at least some versions of util-linux insists on having # an sbin dir even though it is told to put everything in bin. At diff --git a/recipes/util-linux/util-linux_2.24.oe b/recipes/util-linux/util-linux_2.24.oe index 5d6c75c..fe522eb 100644 --- a/recipes/util-linux/util-linux_2.24.oe +++ b/recipes/util-linux/util-linux_2.24.oe @@ -6,6 +6,8 @@ inherit pkgconfig require util-linux.inc SRC_URI += "file://configure-install-dirs.patch" +SRC_URI += "file://configure.patch" + EXTRA_OECONF += "usrbin_execdir=${bindir} usrsbin_execdir=${sbindir}" autotools_configure () { ${CONFIGURE_SCRIPT} \