aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-11-09 15:48:40 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-11-09 15:48:40 +0000
commit345bbe4bfd49a7abeeea68d19deb113d04e44b84 (patch)
treed438d1ee2e6d0abcf639c31c38030ff18ac14058 /Mk
parent1c6f4b4faaf3d28e5742139b0ab48cc001c86f06 (diff)
downloadports-345bbe4bfd49a7abeeea68d19deb113d04e44b84.tar.gz
ports-345bbe4bfd49a7abeeea68d19deb113d04e44b84.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk94
1 files changed, 36 insertions, 58 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 606abd56ccb0..d2cfced2a6b8 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2747,77 +2747,55 @@ package-depends:
.if !target(describe)
describe:
- @${ECHO} `perl -e ' \
- print "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \
- if (open (COMMENT, "${COMMENT}")) { \
+ @${ECHO} "`perl -e ' \
+ print q{${PKGNAME}|${.CURDIR}|${PREFIX}|}; \
+ if (open(COMMENT, q{${COMMENT}})) { \
$$_ = <COMMENT>; \
chomp; \
print; \
} else { \
- print "** No Description"; \
+ print q{** No Description}; \
} \
- if ( -f "${DESCR}" ) { \
- print "|${DESCR}"; \
+ if ( -f q{${DESCR}} ) { \
+ print q{|${DESCR}}; \
} else { \
- print "|/dev/null"; \
+ print q{|/dev/null}; \
} \
- print q#|${MAINTAINER}|${CATEGORIES}|#; \
- for (split /\s+/, "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}") { \
- next if /^$$/; \
- s/^[^:]*\://; \
- s/\:.*//; \
- if ( ! -d $$_ ) { \
- print STDERR "${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete"; \
- } else { \
- push @bdirs, $$_; \
+ print q{|${MAINTAINER}|${CATEGORIES}|}; \
+ @bdirs = map((split /:/)[1], split(q{ }, q{${FETCH_DEPENDS} ${BUILD_DEPENDS}})); \
+ @rdirs = map((split /:/)[1], split(q{ }, q{${RUN_DEPENDS}})); \
+ @mdirs = ( \
+ map((split /:/)[0], split(q{ }, q{${DEPENDS}})), \
+ map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})) \
+ ); \
+ for my $$i (\@bdirs, \@rdirs, \@mdirs) { \
+ my @dirs = @$$i; \
+ @$$i = (); \
+ for (@dirs) { \
+ if (-d $$_) { \
+ push @$$i, $$_; \
+ } else { \
+ print STDERR qq{${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete\n}; \
+ } \
} \
} \
- for (split /\s+/, "${LIB_DEPENDS} ${RUN_DEPENDS}") { \
- next if /^$$/; \
- s/^[^:]*\://; \
- s/\:.*//; \
- if ( ! -d $$_ ) { \
- print STDERR "${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete"; \
- } else { \
- push @rdirs, $$_; \
- } \
- } \
- for (split /\s+/, "${DEPENDS}") { \
- next if /^$$/; \
- s/\:.*//; \
- if ( ! -d $$_ ) { \
- print STDERR "${PKGNAME}: \"$$_\" non-existent -- dependency list incomplete"; \
- } else { \
- push @mdirs, $$_; \
- } \
+ for (@bdirs, @mdirs) { \
+ $$x{$$_} = 1; \
} \
- for (sort (@bdirs, @mdirs)) { \
- if ($$_ ne $$l) { \
- $$a .= $$_ . " "; \
- $$l = $$_; \
- } \
+ print join(q{ }, sort keys %x), q{|}; \
+ for (@rdirs, @mdirs) { \
+ $$y{$$_} = 1; \
} \
- chop $$a; \
- print "$$a|"; \
- for (sort (@rdirs, @mdirs)) { \
- if ($$_ ne $$m) { \
- $$b .= $$_ . " "; \
- $$m = $$_; \
- } \
- } \
- chop $$b; \
- print "$$b|"; \
- if (open (DESCR, "${DESCR}")) { \
- until (/^WWW\:\s/ or eof DESCR) { \
- $$_ = <DESCR>; \
- } \
- if (/^WWW\:\s/) { \
- chomp; \
- split /\s+/; \
- print $$_[1]; \
+ print join(q{ }, sort keys %y), q{|}; \
+ if (open(DESCR, q{${DESCR}})) { \
+ while (<DESCR>) { \
+ if (/^WWW:\s+(\S+)/) { \
+ print $$1; \
+ last; \
+ } \
} \
} \
- print "\n";'`
+ print qq{\n};'`"
.endif
www-site: