summaryrefslogtreecommitdiff
path: root/filesystems/libblkid
diff options
context:
space:
mode:
Diffstat (limited to 'filesystems/libblkid')
-rw-r--r--filesystems/libblkid/Makefile34
-rw-r--r--filesystems/libblkid/distinfo3
-rw-r--r--filesystems/libblkid/files/patch-libblkid_meson.build13
-rw-r--r--filesystems/libblkid/files/patch-meson.build67
-rw-r--r--filesystems/libblkid/files/patch-tools_poman-translate.sh11
-rw-r--r--filesystems/libblkid/pkg-descr5
-rw-r--r--filesystems/libblkid/pkg-plist9
7 files changed, 142 insertions, 0 deletions
diff --git a/filesystems/libblkid/Makefile b/filesystems/libblkid/Makefile
new file mode 100644
index 000000000000..077bc2158912
--- /dev/null
+++ b/filesystems/libblkid/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= libblkid
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.41.1
+PORTREVISION= 1
+CATEGORIES= filesystems
+
+MAINTAINER= arrowd@FreeBSD.org
+COMMENT= Library to identify block devices (disks) as to their content
+WWW= https://github.com/util-linux/util-linux
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/Documentation/licenses/COPYING.BSD-3-Clause
+
+USES= bison meson pkgconfig tar:xz
+
+USE_GITHUB= yes
+GH_ACCOUNT= util-linux
+GH_PROJECT= util-linux
+
+USE_LDCONFIG= yes
+# disable all Meson features because the project has gazillion of them and we only need few
+MESON_ARGS= --auto-features=disabled \
+ -Dallow-32bit-time=true \
+ -Db_lundef=false \
+ -Dbuild-libblkid=enabled \
+ -Dbuild-libsmartcols=disabled \
+ -Dprogram-tests=false # dependency of libblkid
+
+OPTIONS_DEFINE= MANPAGES
+OPTIONS_DEFAULT= MANPAGES
+OPTIONS_SUB= yes
+MANPAGES_BUILD_DEPENDS= asciidoctor:textproc/rubygem-asciidoctor
+
+.include <bsd.port.mk>
diff --git a/filesystems/libblkid/distinfo b/filesystems/libblkid/distinfo
new file mode 100644
index 000000000000..3723891011d8
--- /dev/null
+++ b/filesystems/libblkid/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1751103248
+SHA256 (util-linux-util-linux-v2.41.1_GH0.tar.gz) = 61a9785cbf04091286ec2bbfb78e87c35e6380f084f38115a4677b90b9ad4437
+SIZE (util-linux-util-linux-v2.41.1_GH0.tar.gz) = 16084246
diff --git a/filesystems/libblkid/files/patch-libblkid_meson.build b/filesystems/libblkid/files/patch-libblkid_meson.build
new file mode 100644
index 000000000000..c1b100f4ab72
--- /dev/null
+++ b/filesystems/libblkid/files/patch-libblkid_meson.build
@@ -0,0 +1,13 @@
+--- libblkid/meson.build.orig 2025-06-24 07:55:28 UTC
++++ libblkid/meson.build
+@@ -141,10 +141,8 @@ libblkid_link_args = []
+ libblkid_link_depends = []
+ libblkid_link_args = []
+
+-if cc.has_link_argument('-Wl,--version-script=@0@'.format(libblkid_sym_path))
+ libblkid_link_depends += [libblkid_sym]
+ libblkid_link_args += ['-Wl,--version-script=@0@'.format(libblkid_sym_path)]
+-endif
+
+ lib_blkid = both_libraries(
+ 'blkid',
diff --git a/filesystems/libblkid/files/patch-meson.build b/filesystems/libblkid/files/patch-meson.build
new file mode 100644
index 000000000000..f64f68b47e8f
--- /dev/null
+++ b/filesystems/libblkid/files/patch-meson.build
@@ -0,0 +1,67 @@
+--- meson.build.orig 2025-06-24 07:55:28 UTC
++++ meson.build
+@@ -861,7 +861,7 @@ conf.set('HAVE_DECL_VMADDR_CID_LOCAL', have ? 1 : fals
+ prefix : '#include <sys/socket.h>')
+ conf.set('HAVE_DECL_VMADDR_CID_LOCAL', have ? 1 : false)
+
+-build_plymouth_support = (not build_plymouth_support.disabled() and
++build_plymouth_support = (not build_plymouth_support.disabled() and
+ have_tiocglcktrmios and
+ have_sock_cloexec and
+ have_sock_nonblock and
+@@ -1868,14 +1868,7 @@ endif
+ bashcompletions += ['zramctl']
+ endif
+
+-exe = executable(
+- 'prlimit',
+- prlimit_sources,
+- include_directories : includes,
+- link_with : [lib_common,
+- lib_smartcols],
+- install_dir : usrbin_exec_dir,
+- install : true)
++exe = disabler()
+ if not is_disabler(exe)
+ exes += exe
+ manadocs += prlimit_manadocs
+@@ -1991,15 +1984,7 @@ endif
+ bashcompletions += ['swapoff']
+ endif
+
+-exe = executable(
+- 'lscpu',
+- lscpu_sources,
+- include_directories : includes,
+- link_with : [lib_common,
+- lib_smartcols],
+- dependencies : [rtas_libs],
+- install_dir : usrbin_exec_dir,
+- install : true)
++exe = disabler()
+ if not is_disabler(exe)
+ exes += exe
+ manadocs += lscpu_manadocs
+@@ -2021,13 +2006,7 @@ endif
+ bashcompletions += ['chcpu']
+ endif
+
+-exe = executable(
+- 'wdctl',
+- wdctl_sources,
+- include_directories : includes,
+- link_with : [lib_common,
+- lib_smartcols],
+- install : true)
++exe = disabler()
+ if not is_disabler(exe)
+ exes += exe
+ manadocs += wdctl_manadocs
+@@ -4024,7 +4003,6 @@ run_target(
+ depends : exes)
+
+
+-manadocs += lib_tcolors_manadocs
+ if build_libblkid
+ manadocs += lib_blkid_manadocs
+ endif
diff --git a/filesystems/libblkid/files/patch-tools_poman-translate.sh b/filesystems/libblkid/files/patch-tools_poman-translate.sh
new file mode 100644
index 000000000000..ed558d9f2d9a
--- /dev/null
+++ b/filesystems/libblkid/files/patch-tools_poman-translate.sh
@@ -0,0 +1,11 @@
+--- tools/poman-translate.sh.orig 2025-03-18 12:50:51 UTC
++++ tools/poman-translate.sh
+@@ -82,7 +82,7 @@ mapfile -t PO4ACFG_TRANSLATIONS < <( awk '/\[type:asci
+ mapfile -t LOCALES < <( awk '/\[po4a_langs\]/ {for (i=2; i<=NF; i++) print $i}' "$PO4ACFG" )
+ mapfile -t PO4ACFG_TRANSLATIONS < <( awk '/\[type:asciidoc\]/ {print $2;}' "$PO4ACFG" )
+
+-mkdir --parents "$DESTDIR"
++mkdir -p "$DESTDIR"
+
+ DESTDIR=$( OLDPWD=- CDPATH='' cd -P -- "$DESTDIR" && pwd )
+
diff --git a/filesystems/libblkid/pkg-descr b/filesystems/libblkid/pkg-descr
new file mode 100644
index 000000000000..52777d437567
--- /dev/null
+++ b/filesystems/libblkid/pkg-descr
@@ -0,0 +1,5 @@
+The libblkid library is used to identify block devices (disks) as to their
+content (e.g., filesystem type) as well as extracting additional information
+such as filesystem labels/volume names, unique identifiers/serial numbers.
+A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
+specific block device names into configuration files.
diff --git a/filesystems/libblkid/pkg-plist b/filesystems/libblkid/pkg-plist
new file mode 100644
index 000000000000..9e9f9a5aea60
--- /dev/null
+++ b/filesystems/libblkid/pkg-plist
@@ -0,0 +1,9 @@
+include/blkid/blkid.h
+lib/libblkid.a
+lib/libblkid.so
+lib/libblkid.so.1
+lib/libblkid.so.1.1.0
+libdata/pkgconfig/blkid.pc
+sbin/blkid
+%%MANPAGES%%share/man/man3/libblkid.3.gz
+%%MANPAGES%%share/man/man8/blkid.8.gz