public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/liblockfile/files/
Date: Sat, 28 Nov 2020 01:08:24 +0000 (UTC)	[thread overview]
Message-ID: <1606525699.22efecc44666d3ed9050ac4a6895b94f35c3510b.sam@gentoo> (raw)

commit:     22efecc44666d3ed9050ac4a6895b94f35c3510b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 28 01:08:19 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 28 01:08:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22efecc4

net-libs/liblockfile: fix Darwin makefile

* Don't install directly into $(ROOT) (!).
  Instead install into $(DESTDIR), which will, among other benefits,
  allow Portage to detect collisions.

  (noticed when tried to install twice and a symlink failed!)

* Respect AR

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/liblockfile/files/Makefile.Darwin.in | 29 ++++++++++++++++++---------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/net-libs/liblockfile/files/Makefile.Darwin.in b/net-libs/liblockfile/files/Makefile.Darwin.in
index 936d48a2d1d..f466f9ca50e 100644
--- a/net-libs/liblockfile/files/Makefile.Darwin.in
+++ b/net-libs/liblockfile/files/Makefile.Darwin.in
@@ -10,6 +10,7 @@ NVER	= 0.1
 
 CFLAGS		= @CFLAGS@ -I.
 LDFLAGS		= @LDFLAGS@
+AR		= @AR@
 CC		= @CC@
 
 prefix		= @prefix@
@@ -30,7 +31,7 @@ shared:		liblockfile.dylib dotlockfile
 nfslib:		nfslock.$(VER).dylib
 
 liblockfile.a:	lockfile.o
-		ar rv liblockfile.a lockfile.o
+		$(AR) rv liblockfile.a lockfile.o
 
 liblockfile.dylib: liblockfile.a
 		$(CC) $(LDFLAGS) -fPIC -dynamiclib -install_name @libdir@/liblockfile.1.0.dylib \
@@ -51,25 +52,33 @@ xlockfile.o:	lockfile.c
 		$(CC) $(CFLAGS) -DLOCKPROG=\"$(bindir)/dotlockfile\" -c lockfile.c -o xlockfile.o
 
 install_static:	static install_common
-		install -m 644 liblockfile.a $(ROOT)$(libdir)
+		install -d $(DESTDIR)$(libdir)
+		install -m 644 liblockfile.a $(DESTDIR)$(libdir)
 
 install_shared:	shared install_common
+		install -d $(DESTDIR)$(libdir)
 		install -m 755 liblockfile.dylib \
-			$(ROOT)$(libdir)/liblockfile.$(VER).dylib
-		ln -s liblockfile.$(VER).dylib $(ROOT)$(libdir)/liblockfile.dylib
+			$(DESTDIR)$(libdir)/liblockfile.$(VER).dylib
+		ln -s liblockfile.$(VER).dylib $(DESTDIR)$(libdir)/liblockfile.dylib
 
 install_common:
-		install -m 644 lockfile.h maillock.h $(ROOT)$(includedir)
+		install -d $(DESTDIR)$(includedir)
+		install -d $(DESTDIR)$(bindir)
+		install -m 644 lockfile.h maillock.h $(DESTDIR)$(includedir)
 		if [ "$(MAILGROUP)" != "" ]; then\
-		  install -g $(MAILGROUP) -m 2755 dotlockfile $(ROOT)$(bindir);\
+		  install  -g $(MAILGROUP) -m 2755 dotlockfile $(DESTDIR)$(bindir);\
 		else \
-		  install -g root -m 755 dotlockfile $(ROOT)$(bindir); \
+		  install  -g root -m 755 dotlockfile $(DESTDIR)$(bindir); \
 		fi
-		install -m 644 *.1 $(ROOT)$(mandir)/man1
-		install -m 644 *.3 $(ROOT)$(mandir)/man3
+		install -d $(DESTDIR)$(mandir)
+		install -d $(DESTDIR)$(mandir)/man1
+		install -d $(DESTDIR)$(mandir)/man3
+		install -m 644 *.1 $(DESTDIR)$(mandir)/man1
+		install -m 644 *.3 $(DESTDIR)$(mandir)/man3
 
 install_nfslib:	nfslib
-		install -m 755 nfslock.$(VER).dylib $(ROOT)$(nfslockdir)
+		install -d $(DESTDIR)$(nfslockdir)
+		install -m 755 nfslock.$(VER).dylib $(DESTDIR)$(nfslockdir)
 
 clean:
 		rm -f *.a *.o *.dylib dotlockfile


             reply	other threads:[~2020-11-28  1:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28  1:08 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-28  0:52 [gentoo-commits] repo/gentoo:master commit in: net-libs/liblockfile/files/ Sam James
2020-05-06 11:51 Joonas Niilola
2019-08-14 12:15 Guilherme Amadio
2017-09-15  5:45 Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1606525699.22efecc44666d3ed9050ac4a6895b94f35c3510b.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox