pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/spdlog spdlog: build as dynamic library instead ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/acac7d350a14
branches:  trunk
changeset: 372050:acac7d350a14
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Jan 18 14:17:22 2022 +0000

description:
spdlog: build as dynamic library instead of static

Got relocation errors while linking gnuradio on Linux with the static
library due to missing -fPIC.

diffstat:

 devel/spdlog/Makefile |  22 ++++++++++++++++++++--
 devel/spdlog/PLIST    |   8 ++++++--
 2 files changed, 26 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r bc10752e31ff -r acac7d350a14 devel/spdlog/Makefile
--- a/devel/spdlog/Makefile     Tue Jan 18 13:37:57 2022 +0000
+++ b/devel/spdlog/Makefile     Tue Jan 18 14:17:22 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2021/04/02 08:32:57 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2022/01/18 14:17:22 tnn Exp $
 
 DISTNAME=              spdlog-1.8.5
+PKGREVISION=           1
 CATEGORIES=            devel
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=gabime/}
 GITHUB_PROJECT=                spdlog
@@ -14,8 +15,25 @@
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            pkg-config
 USE_CMAKE=             yes
+CMAKE_ARGS+=           -DSPDLOG_BUILD_SHARED=ON
 
-PKGCONFIG_OVERRIDE+=           cmake/spdlog.pc.in
+PKGCONFIG_OVERRIDE+=   cmake/spdlog.pc.in
+
+# This doesn't work due to mk/plist bug. See tech-pkg@
+#PLIST_VARS+=          dylib notdylib
+#PLIST.dylib.Darwin=   yes
+#PLIST.dylib.Darwin=
+#PLIST.nodylib.Darwin=
+#PLIST.notdylib.*=     yes
+
+OPSYSVARS+=            SOEXT DYLIB NOTDYLIB
+PLIST_SUBST+=          SOEXT=${SOEXT} PLIST.dylib=${DYLIB} PLIST.notdylib=${NOTDYLIB}
+SOEXT.Darwin=          dylib
+SOEXT.*=               so
+DYLIB.Darwin=
+DYLIB.*=               @comment
+NOTDYLIB.Darwin=       @comment
+NOTDYLIB.*=
 
 .include "../../lang/python/tool.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r bc10752e31ff -r acac7d350a14 devel/spdlog/PLIST
--- a/devel/spdlog/PLIST        Tue Jan 18 13:37:57 2022 +0000
+++ b/devel/spdlog/PLIST        Tue Jan 18 14:17:22 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2021/04/02 08:32:57 wiz Exp $
+@comment $NetBSD: PLIST,v 1.5 2022/01/18 14:17:22 tnn Exp $
 include/spdlog/async.h
 include/spdlog/async_logger-inl.h
 include/spdlog/async_logger.h
@@ -94,5 +94,9 @@
 lib/cmake/spdlog/spdlogConfigTargets-release.cmake
 lib/cmake/spdlog/spdlogConfigTargets.cmake
 lib/cmake/spdlog/spdlogConfigVersion.cmake
-lib/libspdlog.a
+lib/libspdlog.${SOEXT}
+${PLIST.dylib}lib/libspdlog.1.${SOEXT}
+${PLIST.dylib}lib/libspdlog.${PKGVERSION}.${SOEXT}
+${PLIST.notdylib}lib/libspdlog.${SOEXT}.1
+${PLIST.notdylib}lib/libspdlog.${SOEXT}.${PKGVERSION}
 lib/pkgconfig/spdlog.pc



Home | Main Index | Thread Index | Old Index