Lines 822-831
Link Here
|
822 |
return $rc |
822 |
return $rc |
823 |
} |
823 |
} |
824 |
|
824 |
|
|
|
825 |
gemdeps() |
826 |
{ |
827 |
rc=0 |
828 |
if [ "${PKGBASE%%-*}" = "rubygem" ]; then |
829 |
while read -r l; do |
830 |
if [ -n "${l}" ]; then |
831 |
name=${l%% *} |
832 |
vers=${l#* } |
833 |
while read -r v; do |
834 |
if ! while read -r p; do |
835 |
${LOCALBASE}/bin/ruby -e "puts 'OK' if Gem::Dependency.new('${name}','${v}').match?('${name}','${p}')" |
836 |
done | grep -qFx OK; then |
837 |
err RubyGem dependency ${name} ${v} is not satisfied. |
838 |
rc=1 |
839 |
fi <<-EOF |
840 |
$(${LOCALBASE}/bin/gem list -e "${name}" \ |
841 |
| sed "s|.*(\(.*\))|\1|" \ |
842 |
| tr -d ' ' \ |
843 |
| tr , '\n') |
844 |
EOF |
845 |
done <<-EOF |
846 |
$(while echo "${vers}" | grep -q '"'; do |
847 |
echo "${vers}" | cut -d '"' -f2 |
848 |
vers=$(echo "${vers}"|cut -d '"' -f3-) |
849 |
done) |
850 |
EOF |
851 |
fi |
852 |
done <<-EOF |
853 |
$(grep -a 'add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ |
854 |
| sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|' \ |
855 |
| sort -u) |
856 |
EOF |
857 |
fi |
858 |
return $rc |
859 |
} |
825 |
|
860 |
|
826 |
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" |
861 |
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" |
827 |
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" |
862 |
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" |
828 |
checks="$checks proxydeps sonames perlcore no_arch" |
863 |
checks="$checks proxydeps sonames perlcore no_arch gemdeps" |
829 |
|
864 |
|
830 |
ret=0 |
865 |
ret=0 |
831 |
cd ${STAGEDIR} |
866 |
cd ${STAGEDIR} |