Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 20:41:07 GMT
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 770f3a4edf68 - main - devel/util-linux: Unbreak on FreeBSD 13.2 and set pkgconfigdir
Message-ID:  <202306262041.35QKf7tu042523@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=770f3a4edf68e545f9f19b2c5fc3fff58021cc40

commit 770f3a4edf68e545f9f19b2c5fc3fff58021cc40
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-06-26 20:28:52 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-06-26 20:28:58 +0000

    devel/util-linux: Unbreak on FreeBSD 13.2 and set pkgconfigdir
    
    * Remove bswap compatibility "hacks" as we now have glibc compatible
      ones in supported releases
    * Set pkgconfigdir so .pc files ends up in correct path
    
    PR:             242996
    Reviewed by:    Warner Losh <imp@bsdimp.com>, yuri (maintainer)
---
 devel/util-linux/Makefile                     |  6 ++--
 devel/util-linux/files/patch-include_bitops.h | 47 +++++----------------------
 2 files changed, 12 insertions(+), 41 deletions(-)

diff --git a/devel/util-linux/Makefile b/devel/util-linux/Makefile
index 7563d2a3e949..0a681ea14d58 100644
--- a/devel/util-linux/Makefile
+++ b/devel/util-linux/Makefile
@@ -11,21 +11,21 @@ WWW=		https://github.com/karelzak/util-linux
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_FreeBSD_14=	ld: error: undefined symbol: bswap32
-
 LIB_DEPENDS=	libpcre2-8.so:devel/pcre2 \
 		libuuid.so:misc/e2fsprogs-libuuid
 RUN_DEPENDS=	bash:shells/bash
 
 USES=		autoreconf gettext-tools gmake libtool ncurses pkgconfig \
 		shebangfix tar:xz
+
 USE_LDCONFIG=	yes
 
 SHEBANG_FILES=	misc-utils/getopt-parse.bash
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--disable-nls --disable-ipcrm --disable-ipcs \
-		--disable-makeinstall-chown --disable-makeinstall-setuid
+		--disable-makeinstall-chown --disable-makeinstall-setuid \
+		--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
 
 INSTALL_TARGET=	install-strip
 
diff --git a/devel/util-linux/files/patch-include_bitops.h b/devel/util-linux/files/patch-include_bitops.h
index 063fd8d843bb..2b5c7ce9f633 100644
--- a/devel/util-linux/files/patch-include_bitops.h
+++ b/devel/util-linux/files/patch-include_bitops.h
@@ -1,40 +1,11 @@
-commit a38d1f69fee5ca7e883b09ed3668a7da3b161051
-Author: Warner Losh <imp@FreeBSD.org>
-Date:   Fri Apr 29 15:29:44 2022 -0600
-
-    BSD: Use byteswap.h and endian.h defined macos when present
-    
-    Newer versions of FreeBSD will have a glibc compatible
-    byteswap.h. Currently, this file assumes that FreeBSD requires
-    bswap{16,32,64} to always be defined. This isn't the case when we're
-    using the byteswap.h file (which is enabled by HAVE_BYTESWAP_H
-    define). Assume that if byteswap.h and endian.h are present, then the
-    proper macros are defined.  Otherwise, assume that sys/endian.h is
-    present and paper over the small differences between the BSDs for this
-    file.
-    
-    Signed-off-by: Warner Losh <imp@bsdimp.com>
-
---- include/bitops.h
+--- include/bitops.h.orig	2023-06-25 21:35:59 UTC
 +++ include/bitops.h
-@@ -20,6 +20,12 @@
- #  include <sys/endian.h>
- #endif
- 
-+#if !(defined(HAVE_BYTESWAP_H) && defined(HAVE_ENDIAN_H))
-+/*
-+ * When both byteswap.h and endian.h are preseent, the proper macros are defined
-+ * as those files are glibc compatible.  Otherwise, compensate for the slightly
-+ * different interfaces between the different BSDs.
-+ */
- #if defined(__OpenBSD__)
- # include <sys/types.h>
+@@ -25,7 +25,7 @@
  # define be16toh(x) betoh16(x)
-@@ -47,6 +53,7 @@
- # define bswap_32(x) OSSwapInt32(x)
- # define bswap_64(x) OSSwapInt64(x)
- #endif
-+#endif
- 
- /*
-  * Fallbacks
+ # define be32toh(x) betoh32(x)
+ # define be64toh(x) betoh64(x)
+-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++#elif defined(__NetBSD__) || defined(__DragonFly__)
+ # define bswap_16(x) bswap16(x)
+ # define bswap_32(x) bswap32(x)
+ # define bswap_64(x) bswap64(x)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306262041.35QKf7tu042523>