diff --git a/net-libs/liblockfile/liblockfile-1.16.recipe b/net-libs/liblockfile/liblockfile-1.16.recipe new file mode 100644 index 000000000..ffa0b7c2f --- /dev/null +++ b/net-libs/liblockfile/liblockfile-1.16.recipe @@ -0,0 +1,93 @@ +SUMMARY="Implements functions designed to lock the standard mailboxes" +DESCRIPTION="This library implements a number of functions found in -lmail \ +on SysV systems. These functions are designed to lock the standard mailboxes \ +in /var/mail (or wherever the system puts them). + +In additions, this library adds a number of functions to create, \ +manage and remove generic lockfiles. + +The lockfiles are created by this library in an NFS-safe manner, that \ +is by using a tempfile and using link(2) to create the lockfile. It \ +works around several defects in NFS servers to make sure the lockfile \ +is created atomically. + +The locking strategy is compatible with other well-written NFS-safe \ +programs that create lockfiles - such as procmail, exim and mutt. + +If you are trying to lock a mailbox in a directory writable for group \ +mail, the locking functions will call a helper application which runs \ +setgid to do the actual locking. The helper application \"dotlockfile\" \ +can also be used directly, for example for use in shellscripts. + +This means a program such as a MUA doesn't need to be setgid mail anymore \ +to be able to lock the mailbox." +HOMEPAGE="https://github.com/miquels/liblockfile" +COPYRIGHT="1999-2016 Miquel van Smoorenburg" +LICENSE="GNU GPL v2 + GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://github.com/miquels/liblockfile/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="dfc552c72a93a28279017e81c9e1924b12cc97e4faca8faf5ddbba6b6f048e01" +PATCHES="liblockfile-$portVersion.patchset" + +ARCHITECTURES="?x86_gcc2 ?x86 x86_64 ?sparc" +SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" + +libVersion="1.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + liblockfile$secondaryArchSuffix = $portVersion + cmd:dotlockfile$secondaryArchSuffix = $portVersion + lib:liblockfile$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + liblockfile${secondaryArchSuffix}_devel = $portVersion + devel:liblockfile$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + liblockfile$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +defineDebugInfoPackage liblockfile$secondaryArchSuffix \ + "$libDir"/liblockfile.so.$libVersion + +BUILD() +{ + runConfigure ./configure \ + --enable-shared + + make $jobArgs +} + +INSTALL() +{ + make install + + rm -f "$libDir"/liblockfile.a + + prepareInstalledDevelLib liblockfile + fixPkgconfig + + packageEntries devel \ + "$developDir" +} + +TEST() +{ + make check +} diff --git a/net-libs/liblockfile/patches/liblockfile-1.16.patchset b/net-libs/liblockfile/patches/liblockfile-1.16.patchset new file mode 100644 index 000000000..73243bb40 --- /dev/null +++ b/net-libs/liblockfile/patches/liblockfile-1.16.patchset @@ -0,0 +1,44 @@ +From f9a9eed6cfdefc3456629659314223aa48d0477b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 19 Jan 2020 17:25:18 +0100 +Subject: Build fix + + +diff --git a/Makefile.in b/Makefile.in +index 2721b48..972fada 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -34,7 +34,7 @@ liblockfile.a: lockfile.o + + liblockfile.so: liblockfile.a + $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,liblockfile.so.1 \ +- -o liblockfile.so lockfile.o -lc ++ -o liblockfile.so lockfile.o + + nfslock.so.$(NFSVER): nfslock.o + $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,nfslock.so.0 \ +-- +2.24.1 + + +From c583ffca60900bf75489bf5789ec38cb434cf182 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 19 Jan 2020 17:29:59 +0100 +Subject: Install fix + + +diff --git a/Makefile.in b/Makefile.in +index 972fada..ec9d4be 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -65,7 +65,6 @@ install_shared: shared install_static install_common + $(libdir)/liblockfile.so.$(SOVER) + ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so.$(MAJOR) + ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so +- if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi + + install_common: + install -d -m 755 -g root -p $(includedir) +-- +2.24.1 +