aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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