| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: pkg-config-override.mk,v 1.5 2020/05/04 18:06:56 rillig Exp $ | | 1 | # $NetBSD: pkg-config-override.mk,v 1.6 2023/11/17 10:20:25 nros Exp $ |
2 | | | 2 | |
3 | # Package-settable variables: | | 3 | # Package-settable variables: |
4 | # | | 4 | # |
5 | # PKGCONFIG_OVERRIDE | | 5 | # PKGCONFIG_OVERRIDE |
6 | # The list of pkg-config files relative to WRKSRC in which the | | 6 | # The list of pkg-config files relative to WRKSRC in which the |
7 | # compiler flags need to be adjusted. | | 7 | # compiler flags need to be adjusted. |
8 | # | | 8 | # |
9 | # PKGCONFIG_OVERRIDE_STAGE | | 9 | # PKGCONFIG_OVERRIDE_STAGE |
10 | # The stage in which the pkg-config files will be adjusted. By | | 10 | # The stage in which the pkg-config files will be adjusted. By |
11 | # default, this is pre-configure. | | 11 | # default, this is pre-configure. |
12 | # | | 12 | # |
13 | | | 13 | |
14 | ###################################################################### | | 14 | ###################################################################### |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | ### pkg-config-override inserts the compiler's "rpath" flag into | | 17 | ### pkg-config-override inserts the compiler's "rpath" flag into |
18 | ### pkg-config data files so that ``pkg-config --ldflags <module>'' will | | 18 | ### pkg-config data files so that ``pkg-config --ldflags <module>'' will |
19 | ### return the full set of compiler flags needed to find libraries at | | 19 | ### return the full set of compiler flags needed to find libraries at |
20 | ### run-time. | | 20 | ### run-time. |
21 | ### | | 21 | ### |
22 | .PHONY: pkg-config-override | | 22 | .PHONY: pkg-config-override |
23 | pkg-config-override: | | 23 | pkg-config-override: |
24 | @${DO_NADA} | | 24 | @${DO_NADA} |
25 | | | 25 | |
26 | .if defined(_USE_RPATH) && !empty(_USE_RPATH:M[yY][eE][sS]) | | 26 | .if defined(_USE_RPATH) && !empty(_USE_RPATH:M[yY][eE][sS]) |
27 | pkg-config-override: subst-pkgconfig | | 27 | pkg-config-override: subst-pkgconfig |
28 | | | 28 | |
29 | PKGCONFIG_OVERRIDE_SED= \ | | 29 | PKGCONFIG_OVERRIDE_SED= \ |
30 | '/^Libs:.*[ ]/s|-L\([ ]*[^ ]*\)|${COMPILER_RPATH_FLAG}\1 -L\1|g' | | 30 | '/^[ ]*Libs:.*[ ]/s|-L\([ ]*[^ ]*\)|${COMPILER_RPATH_FLAG}\1 -L\1|g' |
31 | PKGCONFIG_OVERRIDE_STAGE?= pre-configure | | 31 | PKGCONFIG_OVERRIDE_STAGE?= pre-configure |
32 | | | 32 | |
33 | SUBST_CLASSES+= _pkgconfig | | 33 | SUBST_CLASSES+= _pkgconfig |
34 | . if ${PKGCONFIG_OVERRIDE_STAGE} == "pre-configure" | | 34 | . if ${PKGCONFIG_OVERRIDE_STAGE} == "pre-configure" |
35 | SUBST_STAGE._pkgconfig= do-configure-pre-hook | | 35 | SUBST_STAGE._pkgconfig= do-configure-pre-hook |
36 | . elif ${PKGCONFIG_OVERRIDE_STAGE} == "post-configure" | | 36 | . elif ${PKGCONFIG_OVERRIDE_STAGE} == "post-configure" |
37 | SUBST_STAGE._pkgconfig= do-configure-post-hook | | 37 | SUBST_STAGE._pkgconfig= do-configure-post-hook |
38 | . else | | 38 | . else |
39 | SUBST_STAGE._pkgconfig= ${PKGCONFIG_OVERRIDE_STAGE} | | 39 | SUBST_STAGE._pkgconfig= ${PKGCONFIG_OVERRIDE_STAGE} |
40 | . endif | | 40 | . endif |
41 | SUBST_MESSAGE._pkgconfig= Adding run-time search paths to pkg-config files. | | 41 | SUBST_MESSAGE._pkgconfig= Adding run-time search paths to pkg-config files. |
42 | SUBST_FILES._pkgconfig= ${PKGCONFIG_OVERRIDE:S/^${WRKSRC}\///} | | 42 | SUBST_FILES._pkgconfig= ${PKGCONFIG_OVERRIDE:S/^${WRKSRC}\///} |
43 | SUBST_SED._pkgconfig= ${PKGCONFIG_OVERRIDE_SED} | | 43 | SUBST_SED._pkgconfig= ${PKGCONFIG_OVERRIDE_SED} |