aboutsummaryrefslogtreecommitdiffstats
path: root/find-requires.in
diff options
context:
space:
mode:
authorJérôme Quelin <jquelin@mandriva.org>2010-02-10 10:53:14 +0000
committerJérôme Quelin <jquelin@mandriva.org>2010-02-10 10:53:14 +0000
commit81eb1555dfe9382d89f6636cf40735ef2f7ccda1 (patch)
tree49734d50eb1031bcb17ba146cd8cda3306ddb300 /find-requires.in
parent05219fcc7bb0959289a883db89f3e26e9adb6f45 (diff)
downloadrpm-setup-81eb1555dfe9382d89f6636cf40735ef2f7ccda1.tar
rpm-setup-81eb1555dfe9382d89f6636cf40735ef2f7ccda1.tar.gz
rpm-setup-81eb1555dfe9382d89f6636cf40735ef2f7ccda1.tar.bz2
rpm-setup-81eb1555dfe9382d89f6636cf40735ef2f7ccda1.tar.xz
rpm-setup-81eb1555dfe9382d89f6636cf40735ef2f7ccda1.zip
using META.(yml|json) to extract requires if present
Diffstat (limited to 'find-requires.in')
-rwxr-xr-xfind-requires.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/find-requires.in b/find-requires.in
index e1b78a2..66e80e3 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -178,8 +178,15 @@ fi
#
# --- Perl modules.
-[ -x @RPMVENDORDIR@/perl.req -a -n "$perllist" ] && \
- echo $perllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.req | grep 'perl([[:upper:]]' | egrep -v '^perl\((Be|FreeBSD|HPUX|Mac|MSDOS|MVS|OS2|Riscos|SGI|Solaris|VMS|Win32|WinNT)::' | sort -u
+perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep '^META.(yml|json)' | head -1 )
+if [ -n "$perlmeta" ]
+then
+ [ -x @RPMVENDORDIR@/perl.req-from-meta ] && \
+ @RPMVENDORDIR@/perl.req-from-meta $perlmeta
+else
+ [ -x @RPMVENDORDIR@/perl.req -a -n "$perllist" ] && \
+ echo $perllist | tr '[:blank:]' \\n | @RPMVENDORDIR@/perl.req | grep 'perl([[:upper:]]' | egrep -v '^perl\((Be|FreeBSD|HPUX|Mac|MSDOS|MVS|OS2|Riscos|SGI|Solaris|VMS|Win32|WinNT)::' | sort -u
+fi
#
# --- If libperl.so exists and if XS modules are found, depend on perlapi-<version> and libperl.so