aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2004-07-14 16:18:16 +0800
committerkris <kris@FreeBSD.org>2004-07-14 16:18:16 +0800
commit80b6de496db1add460e16473dd10b1c1df80d04f (patch)
treecd9f8dc8fc6ebf85a66844350795702e33dbcb0e /Mk
parent86e9504488bf634b64d9ba48ebd3605b115ffb00 (diff)
downloadfreebsd-ports-gnome-80b6de496db1add460e16473dd10b1c1df80d04f.tar.gz
freebsd-ports-gnome-80b6de496db1add460e16473dd10b1c1df80d04f.tar.zst
freebsd-ports-gnome-80b6de496db1add460e16473dd10b1c1df80d04f.zip
* Be even more explicit about partial ports trees being unsupported
for INDEX builds [1] * Remove the parallel target from Makefile; this is heavily tied to the package build cluster and can be better done in the makeparallel script (commit to follow) [2] * Extend the format of INDEX to separately list the EXTRACT/PATCH/FETCH_DEPENDS instead of lumping them all in together with BUILD_DEPENDS. The three new fields are appended to the end of the record in that order. [2] * Change BROKEN to IGNORE in BROKEN_WITH_MYSQL failure code [3] * Support non-default PREFIX for perl 5.00503 [5] * Use pkg_info -I instead of ls when searching for conflicts [6] * Allow local customization of the port subdirectories by including ${.CURDIR}/Makefile.local in bsd.subdir.mk if it exists [7] * Fix 'make search' when ${PORTSDIR} is a symlink to a directory name containing extended regexp metacharacters [8] Submitted by: linimon [1] [3], kris [2], lth [4], sem [5], eik [5] [6], Roman Neuhauser <neuhauser@chello.cz> [7] PR: 68299 [1], 67705 [3], 67264 [4], 59696 [5], 66568 [6], 68072 [7]
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk86
-rw-r--r--Mk/bsd.port.subdir.mk11
2 files changed, 56 insertions, 41 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ca6feedc4992..b6a54ad4f17f 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1493,7 +1493,7 @@ MYSQL_VER= ${DEFAULT_MYSQL_VER}
.if defined(BROKEN_WITH_MYSQL)
. for VER in ${BROKEN_WITH_MYSQL}
. if (${MYSQL_VER} == "${VER}")
-BROKEN= "Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})"
+IGNORE= "Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})"
. endif
. endfor
.endif # BROKEN_WITH_MYSQL
@@ -3054,6 +3054,10 @@ do-configure:
.if !defined(PERL_MODBUILD)
@cd ${CONFIGURE_WRKSRC} && \
${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
+.if ${PERL_LEVEL} <= 500503
+ @cd ${CONFIGURE_WRKSRC} && \
+ ${PERL5} -pi -e 's/^(INSTALLSITELIB|INSTALLSITEARCH|SITELIBEXP|SITEARCHEXP|INSTALLMAN1DIR|INSTALLMAN3DIR) = \/usr\/local/$$1 = \$$(PREFIX)/' Makefile
+.endif
.endif
.endif
.if defined(USE_IMAKE)
@@ -3081,34 +3085,25 @@ do-build:
.if !target(check-conflicts)
check-conflicts:
.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
- @${RM} -f ${WRKDIR}/.CONFLICTS
-.for conflict in ${CONFLICTS}
- @found="`${LS} -d ${PKG_DBDIR}/${conflict} 2>/dev/null || ${TRUE}`"; \
- if [ X"$$found" != X"" ]; then \
- ${ECHO_CMD} "$$found" >> ${WRKDIR}/.CONFLICTS; \
- fi
-.endfor
- @if [ -s ${WRKDIR}/.CONFLICTS ]; then \
- found=`${CAT} ${WRKDIR}/.CONFLICTS | ${SED} -e s'|${PKG_DBDIR}/||g' | ${TR} '\012' ' '`; \
- conflicting=0; \
- for entry in $${found}; do \
- prfx=`${PKG_INFO} -q -p $${entry} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
- if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- conflicting=1;\
- conflicts_with="$${conflicts_with} $${entry}";\
- fi;\
+ @found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
+ conflicts_with=; \
+ for entry in $${found}; do \
+ prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
+ orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
+ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
+ conflicts_with="$${conflicts_with} $${entry}"; \
+ fi; \
+ done; \
+ if [ -n "$${conflicts_with}" ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
+ for entry in $${conflicts_with}; do \
+ ${ECHO_MSG} " $${entry}"; \
done; \
${ECHO_MSG}; \
- if [ "x$${conflicting}" = "x1" ] ; then \
- ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
- for entry in $${conflicts_with} ; do \
- ${ECHO_MSG} " $${entry}";\
- done;\
- ${ECHO_MSG} " They install files into the same place."; \
- ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
- ${RM} -f ${WRKDIR}/.CONFLICTS; \
- exit 1; \
- fi ;\
+ ${ECHO_MSG} " They install files into the same place."; \
+ ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
+ exit 1; \
fi
.endif # CONFLICTS
.endif
@@ -4386,13 +4381,14 @@ describe:
print q{|/dev/null}; \
} \
print q{|${MAINTAINER}|${CATEGORIES}|}; \
- @bdirs = map((split /:/)[1], split(q{ }, q{${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS}})); \
+ @edirs = map((split /:/)[1], split(q{ }, q{${EXTRACT_DEPENDS}})); \
+ @pdirs = map((split /:/)[1], split(q{ }, q{${PATCH_DEPENDS}})); \
+ @fdirs = map((split /:/)[1], split(q{ }, q{${FETCH_DEPENDS}})); \
+ @bdirs = map((split /:/)[1], split(q{ }, q{${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) { \
+ @ddirs = map((split /:/)[0], split(q{ }, q{${DEPENDS}})); \
+ @ldirs = map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})); \
+ for my $$i (\@edirs, \@pdirs, \@fdirs, \@bdirs, \@rdirs, \@ddirs, \@ldirs) { \
my @dirs = @$$i; \
@$$i = (); \
for (@dirs) { \
@@ -4404,14 +4400,26 @@ describe:
} \
} \
} \
- for (@bdirs, @mdirs) { \
- $$x{$$_} = 1; \
+ for (@edirs, @ddirs) { \
+ $$xe{$$_} = 1; \
+ } \
+ print join(q{ }, sort keys %xe), q{|}; \
+ for (@pdirs, @ddirs) { \
+ $$xp{$$_} = 1; \
+ } \
+ print join(q{ }, sort keys %xp), q{|}; \
+ for (@fdirs, @ddirs) { \
+ $$xf{$$_} = 1; \
+ } \
+ print join(q{ }, sort keys %xf), q{|}; \
+ for (@bdirs, @ddirs, @ldirs) { \
+ $$xb{$$_} = 1; \
} \
- print join(q{ }, sort keys %x), q{|}; \
- for (@rdirs, @mdirs) { \
- $$y{$$_} = 1; \
+ print join(q{ }, sort keys %xb), q{|}; \
+ for (@rdirs, @ddirs, @ldirs) { \
+ $$xr{$$_} = 1; \
} \
- print join(q{ }, sort keys %y), q{|}; \
+ print join(q{ }, sort keys %xr), q{|}; \
if (open(DESCR, q{${DESCR}})) { \
while (<DESCR>) { \
if (/^WWW:\s+(\S+)/) { \
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 8c7969948d9e..a8f926466762 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -82,6 +82,11 @@ OPSYS!= /usr/bin/uname -s
ECHO_MSG?= echo
+# local customization of the ports tree
+.if exists(${.CURDIR}/Makefile.local)
+.include "${.CURDIR}/Makefile.local"
+.endif
+
TARGETS+= all
TARGETS+= build
TARGETS+= checksum
@@ -349,7 +354,9 @@ search: ${PORTSDIR}/${INDEXFILE}
-v xkeylim="$${xkeylim:-${PORTSEARCH_XKEYLIM}}"\
-v display="$${display:-${PORTSEARCH_DISPLAY_FIELDS}}" \
'BEGIN { \
- sub(top, "${PORTSDIR}", there); \
+ if (substr(there, 1, length(top)) == top) \
+ there = "${PORTSDIR}" substr(there, 1 + length(top)); \
+ therelen = length(there); \
IGNORECASE=icase; \
keylen = length(key); keylim = keylim && keylen; \
if (!keylim && keylen) \
@@ -377,7 +384,7 @@ search: ${PORTSDIR}/${INDEXFILE}
} \
} \
{ \
- if ($$2 !~ there) \
+ if (substr($$2, 1, therelen) != there) \
next; \
for (i in parms) \
if ($$i !~ parms[i]) \