diff options
author | obache <obache@pkgsrc.org> | 2013-02-10 12:07:50 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-02-10 12:07:50 +0000 |
commit | d64c0f05123b0024fc54c38dd8f180dcfe9b00e4 (patch) | |
tree | 5d92189f4c2f7b41672c7300852ea1a6698fd1ec /mk | |
parent | d920f7bbed4b70b8fe418230566cc8750c01e0d5 (diff) | |
download | pkgsrc-d64c0f05123b0024fc54c38dd8f180dcfe9b00e4.tar.gz |
Add REQUIRE/PROVIDER metadata detection support for OBJECT_FMT=PE (Cygwin).
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pkgformat/pkg/metadata.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/pkgformat/pkg/metadata.mk b/mk/pkgformat/pkg/metadata.mk index 5ecca4adca2..9732863af16 100644 --- a/mk/pkgformat/pkg/metadata.mk +++ b/mk/pkgformat/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.3 2012/05/13 08:20:11 obache Exp $ +# $NetBSD: metadata.mk,v 1.4 2013/02/10 12:07:50 obache Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -83,6 +83,20 @@ ${_BUILD_INFO_FILE}: plist requires=`($$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '/compatibility version/ { print $$1 }' | ${SORT} -u`; \ fi; \ ;; \ + PE) \ + libs=`${AWK} '/\/.+\.dll$$/ { print "${DESTDIR}${PREFIX}/" $$0 } END { exit 0 }' ${_PLIST_NOKEYWORDS}`; \ + if ${TEST} -n "$$bins" -o -n "$$libs"; then \ + requires=`(${PKGSRC_SETENV} ${LDD_ENV:U} $$ldd $$bins $$libs 2>/dev/null || ${TRUE}) | ${AWK} '$$2 == "=>" && $$3 ~ "/" { print $$3 }' | ${SED} -e 's,^${DESTDIR},,' | ${SORT} -u`; \ + fi; \ + linklibs=`${AWK} '/.+\.dll$$/ { print "${DESTDIR}${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}`; \ + for i in $$linklibs; do \ + if ${TEST} -r $$i -a ! -x $$i -a ! -h $$i; then \ + ${TEST} ${PKG_DEVELOPER:Uno:Q}"" = "no" || \ + ${ECHO} "$$i: installed without execute permission; fixing (should use [BSD_]INSTALL_LIB)"; \ + ${CHMOD} +x $$i; \ + fi; \ + done; \ + ;; \ esac; \ requires=`{ for i in $$requires $$requires; do echo $$i; done; \ ${AWK} '{ print "${PREFIX}/" $$0 }' ${_PLIST_NOKEYWORDS}; } | \ |