pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/archivers/libarchive libarchive: Use `:Q' instead of d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ef2ea1eeb2e9
branches:  trunk
changeset: 381440:ef2ea1eeb2e9
user:      leot <leot%pkgsrc.org@localhost>
date:      Thu Jun 07 14:28:42 2018 +0000

description:
libarchive: Use `:Q' instead of directly quoting the sed commands in builtin.mk

Use `:Q' operator for BUILDLINK_PREFIX and pass the @LIBS@
via a variable.

Suggested by <joerg>, thanks!
(Possible incorrectnesses are mine!)

diffstat:

 archivers/libarchive/builtin.mk |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (44 lines):

diff -r 7a5771e6f159 -r ef2ea1eeb2e9 archivers/libarchive/builtin.mk
--- a/archivers/libarchive/builtin.mk   Thu Jun 07 11:47:58 2018 +0000
+++ b/archivers/libarchive/builtin.mk   Thu Jun 07 14:28:42 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.8 2018/06/07 11:47:58 leot Exp $
+# $NetBSD: builtin.mk,v 1.9 2018/06/07 14:28:42 leot Exp $
 
 BUILTIN_PKG:=  libarchive
 
@@ -99,12 +99,13 @@
 
 BUILDLINK_TARGETS+=     fake-libarchive-pc
 
-_FAKE_LIBARCHIVE_PC=${BUILDLINK_DIR}/lib/pkgconfig/libarchive.pc
+_FAKE_LIBARCHIVE_PC=   ${BUILDLINK_DIR}/lib/pkgconfig/libarchive.pc
+_LIBARCHIVE_LIBS=      -llzma -lbz2 -lz
 
 fake-libarchive-pc:
        ${RUN}  \
        sedsrc=../../archivers/libarchive/files/build/pkgconfig/libarchive.pc.in;       \
-       src=${BUILDLINK_PREFIX.libarchive}/lib${LIBABISUFFIX}/pkgconfig/libarchive.pc;  \
+       src=${BUILDLINK_PREFIX.libarchive:Q}/lib${LIBABISUFFIX}/pkgconfig/libarchive.pc;\
        dst=${_FAKE_LIBARCHIVE_PC};                                                     \
        ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig;                                        \
        if [ ! -f $${dst} ]; then                                                       \
@@ -113,12 +114,12 @@
                        ${LN} -sf $${src} $${dst};                                      \
                else                                                                    \
                        ${ECHO_BUILDLINK_MSG} "Creating $${dst}";                       \
-                       ${SED}  -e 's,@prefix@,${BUILDLINK_PREFIX.libarchive},'         \
-                                       -e 's,@exec_prefix@,${BUILDLINK_PREFIX.libarchive},'\
-                                       -e 's,@libdir@,${BUILDLINK_PREFIX.libarchive}/lib${LIBABISUFFIX},'\
-                                       -e 's,@includedir@,${BUILDLINK_PREFIX.libarchive}/include,'\
-                                       -e 's,@VERSION@,${BUILTIN_VERSION.libarchive},' \
-                                       -e 's,@LIBS@,-llzma -lbz2 -lz,'                 \
+                       ${SED}  -e s,@prefix@,${BUILDLINK_PREFIX.libarchive:Q},         \
+                                       -e s,@exec_prefix@,${BUILDLINK_PREFIX.libarchive:Q},\
+                                       -e s,@libdir@,${BUILDLINK_PREFIX.libarchive:Q}/lib${LIBABISUFFIX},\
+                                       -e s,@includedir@,${BUILDLINK_PREFIX.libarchive:Q}/include,\
+                                       -e s,@VERSION@,${BUILTIN_VERSION.libarchive},   \
+                                       -e s,@LIBS@,${_LIBARCHIVE_LIBS:Q},              \
                                $${sedsrc} > $${dst};                                   \
                fi                                                                      \
        fi



Home | Main Index | Thread Index | Old Index