Few days ago I worked in a patch originally written by pgollucci to use some benefits of bsd.sites.mk, these benefits are the use of CPAN instead of ${MASTER_SITE_PERL_CPAN} and in some cases we can remove MASTER_SITE_SUBDIR entirely of port. Today I committed this modification in 2168 ports. I believe that we have another ports which must receive the same modification. CPAN macro is very similar with SF and in some cases CPAN make more easy ours work.
For this work I used some tools that automated the modifications:
island# find ports/*/ -name Makefile | xargs sed -ie ’s,\${MASTER_SITE_PERL_CPAN},CPAN,’
island# find ports/*/ -name Makefile | xargs sed -ie ‘/^MASTER_SITE_SUBDIR/d’
island# find ports/*/ -name Makefilee -exec rm {} \;
I created a script to check if all ports that received the changes yet are fetchable.
$ cat fetch.sh
#!/bin/sh
for i in `cat list.txt`
do
echo $i
cd /c/ports/$i
make fetch >>/c/log.txt 2>&1
if [ $? -ne 0 ]
then
cat /c/log.txt >>/c/portserrors.txt
fi
#cd /usr/ports/$i ; portinstall -F $i 1>error
done
After two days of downloads, I put this patch within pointyhat cluster that found only three ports with problem.