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 @@ -1,55 +1,55 @@ PORTNAME= util-linux DISTVERSION= 2.36 PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= KERNEL_ORG/linux/utils/util-linux/v${DISTVERSION}/ MAINTAINER= yuri@FreeBSD.org COMMENT= Random collection of Linux utilities 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 CONFLICTS_INSTALL= heirloom-doctools OPTIONS_DEFINE= CAL FLOCK GETOPT HARDLINK UUID OPTIONS_SUB= yes CAL_DESC= Install util-linux cal(1) CAL_CONFIGURE_ENABLE= cal FLOCK_DESC= Install util-linux flock(1) FLOCK_CONFIGURE_ENABLE= flock GETOPT_DESC= Install util-linux getopt(1) GETOPT_CONFIGURE_ENABLE=getopt HARDLINK_DESC= Install util-linux hardlink(1) HARDLINK_CONFIGURE_ENABLE=hardlink UUID_DESC= Install libuuid UUID_CONFIGURE_ENABLE= libuuid post-install: # https://github.com/karelzak/util-linux/issues/1149 ${RM} -r ${STAGEDIR}${DOCSDIR} .include 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 -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 - ---- include/bitops.h +--- include/bitops.h.orig 2023-06-25 21:35:59 UTC +++ include/bitops.h -@@ -20,6 +20,12 @@ - # include - #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 +@@ -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)