public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/lockdev/files/, dev-libs/lockdev/
@ 2021-11-24 17:44 Marek Szuba
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2021-11-24 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     6c663abb66064ad670526a0765ea16e081ba0bcc
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 24 17:42:15 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Nov 24 17:44:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c663abb

dev-libs/lockdev: do not hardcode glibc-specific major() and minor()

Bug: https://bugs.gentoo.org/718062
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/lockdev-1.0.3-add-autotools.patch        |  5 ++++-
 .../lockdev/files/lockdev-1.0.3-major-minor.patch  | 24 ++++++++++++++++++++++
 dev-libs/lockdev/lockdev-1.0.3.1.2-r4.ebuild       |  1 +
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch b/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
index 4343528d9860..01551f56295d 100644
--- a/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
+++ b/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
@@ -30,7 +30,7 @@ Updated by Jonathan Callen <abcd@gentoo.org> 2009-09-11
 +	done
 --- a/configure.ac
 +++ b/configure.ac
-@@ -0,0 +1,22 @@
+@@ -0,0 +1,25 @@
 +AC_INIT([lockdev], [1.0.3], [BUG-REPORT-ADDRESS])
 +AC_CONFIG_AUX_DIR([scripts])
 +AM_INIT_AUTOMAKE
@@ -51,5 +51,8 @@ Updated by Jonathan Callen <abcd@gentoo.org> 2009-09-11
 +# Checks for programs.
 +AC_PROG_LN_S
 +
++AC_HEADER_MAJOR
++
++AC_CONFIG_HEADERS([config.h])
 +AC_CONFIG_FILES([Makefile])
 +AC_OUTPUT

diff --git a/dev-libs/lockdev/files/lockdev-1.0.3-major-minor.patch b/dev-libs/lockdev/files/lockdev-1.0.3-major-minor.patch
new file mode 100644
index 000000000000..8a47137f8aee
--- /dev/null
+++ b/dev-libs/lockdev/files/lockdev-1.0.3-major-minor.patch
@@ -0,0 +1,24 @@
+--- a/src/lockdev.c
++++ b/src/lockdev.c
+@@ -123,13 +123,17 @@
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+-#if defined (__GNU_LIBRARY__)
++
++#include "config.h"
++#if defined (MAJOR_IN_MKDEV)
++# include <sys/mkdev.h>
++#elif defined (MAJOR_IN_SYSMACROS)
+ # include <sys/sysmacros.h>
+-# define MAJOR(dev) gnu_dev_major (dev)
+-# define MINOR(dev) gnu_dev_minor (dev)
+ #else
+-#  error "put here a define for MAJOR and MINOR"
++# error "include here the header file defining major() and minor()"
+ #endif
++#define MAJOR(dev) major (dev)
++#define MINOR(dev) minor (dev)
+ 
+ #include "lockdev.h"
+ 

diff --git a/dev-libs/lockdev/lockdev-1.0.3.1.2-r4.ebuild b/dev-libs/lockdev/lockdev-1.0.3.1.2-r4.ebuild
index c19c3c4a5609..49560227160a 100644
--- a/dev-libs/lockdev/lockdev-1.0.3.1.2-r4.ebuild
+++ b/dev-libs/lockdev/lockdev-1.0.3.1.2-r4.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
 	"${WORKDIR}/${DEB_P}.diff"
 	"${FILESDIR}/${MY_P}-add-autotools.patch"
 	"${FILESDIR}/${MY_P}-fix-perl.patch"
+	"${FILESDIR}/${MY_P}-major-minor.patch"
 )
 
 PERL_S=./LockDev


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/lockdev/files/, dev-libs/lockdev/
@ 2021-11-24 17:44 Marek Szuba
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2021-11-24 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     109ac02935b9aeadd1916890b436d7211c1a793e
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 24 16:59:17 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Wed Nov 24 17:44:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=109ac029

dev-libs/lockdev: make all patches eapply-compliant

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch | 8 ++++----
 dev-libs/lockdev/lockdev-1.0.3.1.2-r3.ebuild             | 8 ++------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch b/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
index f54bcb8fd72c..4343528d9860 100644
--- a/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
+++ b/dev-libs/lockdev/files/lockdev-1.0.3-add-autotools.patch
@@ -5,8 +5,8 @@ Contributed by Nick Fortino (nfortino@gmail.com) 2/1/2009
 
 Updated by Jonathan Callen <abcd@gentoo.org> 2009-09-11
 
---- Makefile.am
-+++ Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -0,0 +1,20 @@
 +include_HEADERS = src/lockdev.h src/ttylock.h
 +
@@ -28,8 +28,8 @@ Updated by Jonathan Callen <abcd@gentoo.org> 2009-09-11
 +	for page in $(manpage_links); do \
 +		$(LN_S) -f lockdev.3 $(DESTDIR)$(man3dir)/$${page} ; \
 +	done
---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
 @@ -0,0 +1,22 @@
 +AC_INIT([lockdev], [1.0.3], [BUG-REPORT-ADDRESS])
 +AC_CONFIG_AUX_DIR([scripts])

diff --git a/dev-libs/lockdev/lockdev-1.0.3.1.2-r3.ebuild b/dev-libs/lockdev/lockdev-1.0.3.1.2-r3.ebuild
index 2cd31f466afb..419f982bc81b 100644
--- a/dev-libs/lockdev/lockdev-1.0.3.1.2-r3.ebuild
+++ b/dev-libs/lockdev/lockdev-1.0.3.1.2-r3.ebuild
@@ -26,6 +26,7 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86"
 IUSE="perl"
 
 PATCHES=(
+	"${WORKDIR}/${DEB_P}.diff"
 	"${FILESDIR}/${MY_P}-add-autotools.patch"
 	"${FILESDIR}/${MY_P}-fix-perl.patch"
 )
@@ -37,12 +38,7 @@ pkg_setup() {
 }
 
 src_prepare() {
-	cd "${WORKDIR}" || die
-	# Note: we do *not* want to be in ${S} for this, as that breaks the patch
-	epatch "${WORKDIR}/${DEB_P}.diff"
-
-	cd "${S}" || die
-	epatch "${PATCHES[@]}"
+	epatch -p1 "${PATCHES[@]}"
 	epatch_user
 
 	eautoreconf


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-24 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-24 17:44 [gentoo-commits] repo/gentoo:master commit in: dev-libs/lockdev/files/, dev-libs/lockdev/ Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2021-11-24 17:44 Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox