pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libatomic-links Add a package which makes -latom...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2b0bd3af4e94
branches:  trunk
changeset: 442700:2b0bd3af4e94
user:      he <he%pkgsrc.org@localhost>
date:      Sun Nov 29 13:23:40 2020 +0000

description:
Add a package which makes -latomic available from a unique directory.

This is so that we can add that directory to the default
link search path of rust without also automatically picking up
other installed libraries.

This is for the benefit of our powerpc ports, where recent rust
has been changed to insist on using -latomic due to the lack of
native 64-bit atomic operations.

diffstat:

 devel/libatomic-links/DESCR    |   8 ++++++++
 devel/libatomic-links/Makefile |  42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)

diffs (58 lines):

diff -r 9e965ba71660 -r 2b0bd3af4e94 devel/libatomic-links/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libatomic-links/DESCR       Sun Nov 29 13:23:40 2020 +0000
@@ -0,0 +1,8 @@
+This package puts symlinks to libatomic in a directory specific
+to libatomic, so that we can add that directory to the default
+link search path of rust without also automatically picking up
+other installed libraries.
+
+This is for the benefit of our powerpc ports, where recent rust
+has been changed to insist on using -latomic due to the lack of
+native 64-bit atomic operations.
diff -r 9e965ba71660 -r 2b0bd3af4e94 devel/libatomic-links/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libatomic-links/Makefile    Sun Nov 29 13:23:40 2020 +0000
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2020/11/29 13:23:40 he Exp $
+
+PKGNAME=               libatomic-links-1.0
+CATEGORIES=            devel
+
+MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
+COMMENT=               Make libatomic available from a unique directory
+LICENSE=               2-clause-bsd
+
+DEPENDS+=              libatomic-[0-9]*:../../devel/libatomic
+
+GENERATE_PLIST=                cd ${DESTDIR}${PREFIX}; \
+                       ${FIND} lib/libatomic -type l | ${SORT};
+
+# Almost a meta package...
+PKG_DESTDIR_SUPPORT=   user-destdir
+NO_CONFIGURE=          yes
+NO_BUILD=              yes
+DISTFILES=             # none
+PLIST_SRC=             # none
+CHECK_PERMS=           no
+USE_LANGUAGES=         # empty
+WRKSRC=                        ${WRKDIR}
+
+INSTALLATION_DIRS+=    lib/libatomic
+
+.include "../../mk/bsd.prefs.mk"
+
+do-patch:
+       @${DO_NADA}
+
+.if (${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc")
+# Only needed here so far; need stems from rust which wants -latomic
+# but rust most probably should not always search /usr/pkg/lib
+do-install:
+       for f in $$(${PKG_INFO} -q -L libatomic); do \
+               b=$$(basename $$f); \
+               ${LN} -s -f $$f ${DESTDIR}${PREFIX}/lib/libatomic/$$b; \
+       done
+.endif
+
+.include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index