Patchwork [16/16] util-linux:(very)minimal compilation for darwin

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:37 p.m.
Message ID <1350833876-9499-16-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193039/
State Changes Requested
Headers show

Comments

Yann Diorcet - Oct. 21, 2012, 3:37 p.m.
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

Very ugly modification. only used for having libuuid
---
 recipes/util-linux/util-linux-2.22/configure.patch |  172 ++++++++++++++++++++
 recipes/util-linux/util-linux.inc                  |    3 +-
 recipes/util-linux/util-linux_2.22.oe              |    1 +
 3 files changed, 175 insertions(+), 1 deletion(-)
 create mode 100644 recipes/util-linux/util-linux-2.22/configure.patch
Esben Haabendal - Dec. 14, 2012, 7:25 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> Very ugly modification. only used for having libuuid
> ---
>  recipes/util-linux/util-linux-2.22/configure.patch |  172 ++++++++++++++++++++
>  recipes/util-linux/util-linux.inc                  |    3 +-
>  recipes/util-linux/util-linux_2.22.oe              |    1 +
>  3 files changed, 175 insertions(+), 1 deletion(-)
>  create mode 100644 recipes/util-linux/util-linux-2.22/configure.patch
>
> diff --git a/recipes/util-linux/util-linux-2.22/configure.patch b/recipes/util-linux/util-linux-2.22/configure.patch
> new file mode 100644
> index 0000000..1c910f0
> --- /dev/null
> +++ b/recipes/util-linux/util-linux-2.22/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 8a54bb2..13ac941 100644
> --- a/recipes/util-linux/util-linux.inc
> +++ b/recipes/util-linux/util-linux.inc
> @@ -18,6 +18,8 @@ EXTRA_OECONF = "\
>  --disable-makeinstall-chown --disable-use-tty-group \
>  "
>  
> +EXTRA_OECONF:>TARGET_OS_darwin = " --disable-schedutils --disable-agetty --disable-sulogin"

Not that it makes a real difference, but this should be HOST_OS_darwin.

> +
>  RECIPE_FLAGS += "ncurses"
>  EXTRA_OECONF += "${EXTRA_OECONF_NCURSES}"
>  EXTRA_OECONF_NCURSES = " --without-ncurses"
> @@ -41,7 +43,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.22.oe b/recipes/util-linux/util-linux_2.22.oe
> index b1d707f..182237f 100644
> --- a/recipes/util-linux/util-linux_2.22.oe
> +++ b/recipes/util-linux/util-linux_2.22.oe
> @@ -3,5 +3,6 @@ LICENSE = "GPL-3.0+ & GPL-2.0+ & GPL-2.0 & LGPL-2.0+ & BSD-4-Clause-UC*"
>  
>  require util-linux.inc
>  
> +SRC_URI += "file://configure.patch"

Shouldn't we only be applying this patch when HOST_OS is osx?

>  EXTRA_OECONF_PAM = " --disable-login --disable-su"

/Esben
Yann Diorcet - Dec. 14, 2012, 7:29 p.m.
Le 14/12/2012 20:25, Esben Haabendal a écrit :
> Yann Diorcet <diorcet.yann@gmail.com> writes:
>
>> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>>
>> Very ugly modification. only used for having libuuid
>> ---
>>   recipes/util-linux/util-linux-2.22/configure.patch |  172 ++++++++++++++++++++
>>   recipes/util-linux/util-linux.inc                  |    3 +-
>>   recipes/util-linux/util-linux_2.22.oe              |    1 +
>>   3 files changed, 175 insertions(+), 1 deletion(-)
>>   create mode 100644 recipes/util-linux/util-linux-2.22/configure.patch
>>
>> diff --git a/recipes/util-linux/util-linux-2.22/configure.patch b/recipes/util-linux/util-linux-2.22/configure.patch
>> new file mode 100644
>> index 0000000..1c910f0
>> --- /dev/null
>> +++ b/recipes/util-linux/util-linux-2.22/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 8a54bb2..13ac941 100644
>> --- a/recipes/util-linux/util-linux.inc
>> +++ b/recipes/util-linux/util-linux.inc
>> @@ -18,6 +18,8 @@ EXTRA_OECONF = "\
>>   --disable-makeinstall-chown --disable-use-tty-group \
>>   "
>>   
>> +EXTRA_OECONF:>TARGET_OS_darwin = " --disable-schedutils --disable-agetty --disable-sulogin"
> Not that it makes a real difference, but this should be HOST_OS_darwin.
>
>> +
>>   RECIPE_FLAGS += "ncurses"
>>   EXTRA_OECONF += "${EXTRA_OECONF_NCURSES}"
>>   EXTRA_OECONF_NCURSES = " --without-ncurses"
>> @@ -41,7 +43,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.22.oe b/recipes/util-linux/util-linux_2.22.oe
>> index b1d707f..182237f 100644
>> --- a/recipes/util-linux/util-linux_2.22.oe
>> +++ b/recipes/util-linux/util-linux_2.22.oe
>> @@ -3,5 +3,6 @@ LICENSE = "GPL-3.0+ & GPL-2.0+ & GPL-2.0 & LGPL-2.0+ & BSD-4-Clause-UC*"
>>   
>>   require util-linux.inc
>>   
>> +SRC_URI += "file://configure.patch"
> Shouldn't we only be applying this patch when HOST_OS is osx?
>
>>   EXTRA_OECONF_PAM = " --disable-login --disable-su"
> /Esben
Hi,
Maybe .. i didn't look any further ... this is  why "Very ugly 
modification. only used for having libuuid" ...
I will try next week.

Regards,

Patch

diff --git a/recipes/util-linux/util-linux-2.22/configure.patch b/recipes/util-linux/util-linux-2.22/configure.patch
new file mode 100644
index 0000000..1c910f0
--- /dev/null
+++ b/recipes/util-linux/util-linux-2.22/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 8a54bb2..13ac941 100644
--- a/recipes/util-linux/util-linux.inc
+++ b/recipes/util-linux/util-linux.inc
@@ -18,6 +18,8 @@  EXTRA_OECONF = "\
 --disable-makeinstall-chown --disable-use-tty-group \
 "
 
+EXTRA_OECONF:>TARGET_OS_darwin = " --disable-schedutils --disable-agetty --disable-sulogin"
+
 RECIPE_FLAGS += "ncurses"
 EXTRA_OECONF += "${EXTRA_OECONF_NCURSES}"
 EXTRA_OECONF_NCURSES = " --without-ncurses"
@@ -41,7 +43,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.22.oe b/recipes/util-linux/util-linux_2.22.oe
index b1d707f..182237f 100644
--- a/recipes/util-linux/util-linux_2.22.oe
+++ b/recipes/util-linux/util-linux_2.22.oe
@@ -3,5 +3,6 @@  LICENSE = "GPL-3.0+ & GPL-2.0+ & GPL-2.0 & LGPL-2.0+ & BSD-4-Clause-UC*"
 
 require util-linux.inc
 
+SRC_URI += "file://configure.patch"
 
 EXTRA_OECONF_PAM = " --disable-login --disable-su"