1 |
laffer1 |
1.40 |
# $MidnightBSD: mports/Makefile,v 1.39 2008/06/14 04:06:01 laffer1 Exp $ |
2 |
archite |
1.1 |
# |
3 |
|
|
|
4 |
wintellect |
1.7 |
SUBDIR += accessibility |
5 |
laffer1 |
1.6 |
SUBDIR += archivers |
6 |
laffer1 |
1.31 |
SUBDIR += astro |
7 |
laffer1 |
1.11 |
SUBDIR += audio |
8 |
wintellect |
1.26 |
SUBDIR += benchmarks |
9 |
crash |
1.38 |
SUBDIR += biology |
10 |
wintellect |
1.28 |
SUBDIR += comms |
11 |
archite |
1.1 |
SUBDIR += converters |
12 |
laffer1 |
1.19 |
SUBDIR += databases |
13 |
laffer1 |
1.29 |
SUBDIR += deskutils |
14 |
archite |
1.1 |
SUBDIR += devel |
15 |
wintellect |
1.17 |
SUBDIR += dns |
16 |
laffer1 |
1.15 |
SUBDIR += editors |
17 |
laffer1 |
1.13 |
SUBDIR += emulators |
18 |
laffer1 |
1.34 |
SUBDIR += finance |
19 |
laffer1 |
1.22 |
SUBDIR += ftp |
20 |
laffer1 |
1.21 |
SUBDIR += games |
21 |
archite |
1.1 |
SUBDIR += graphics |
22 |
|
|
SUBDIR += irc |
23 |
laffer1 |
1.22 |
SUBDIR += java |
24 |
archite |
1.1 |
SUBDIR += lang |
25 |
laffer1 |
1.15 |
SUBDIR += mail |
26 |
laffer1 |
1.10 |
SUBDIR += math |
27 |
laffer1 |
1.33 |
SUBDIR += mbone |
28 |
archite |
1.5 |
SUBDIR += misc |
29 |
wintellect |
1.20 |
SUBDIR += multimedia |
30 |
laffer1 |
1.27 |
SUBDIR += net |
31 |
archite |
1.1 |
SUBDIR += net-im |
32 |
laffer1 |
1.25 |
SUBDIR += net-mgmt |
33 |
wintellect |
1.23 |
SUBDIR += net-p2p |
34 |
wintellect |
1.24 |
SUBDIR += news |
35 |
laffer1 |
1.29 |
SUBDIR += palm |
36 |
laffer1 |
1.30 |
SUBDIR += ports-mgmt |
37 |
archite |
1.1 |
SUBDIR += print |
38 |
laffer1 |
1.40 |
SUBDIR += science |
39 |
archite |
1.4 |
SUBDIR += security |
40 |
laffer1 |
1.9 |
SUBDIR += shells |
41 |
archite |
1.3 |
SUBDIR += sysutils |
42 |
archite |
1.1 |
SUBDIR += textproc |
43 |
|
|
SUBDIR += www |
44 |
|
|
SUBDIR += x11 |
45 |
wintellect |
1.16 |
SUBDIR += x11-clocks |
46 |
laffer1 |
1.35 |
SUBDIR += x11-drivers |
47 |
laffer1 |
1.11 |
SUBDIR += x11-fonts |
48 |
|
|
SUBDIR += x11-fm |
49 |
|
|
SUBDIR += x11-servers |
50 |
laffer1 |
1.14 |
SUBDIR += x11-themes |
51 |
wintellect |
1.8 |
SUBDIR += x11-toolkits |
52 |
archite |
1.2 |
SUBDIR += x11-wm |
53 |
archite |
1.1 |
|
54 |
|
|
PORTSTOP= yes |
55 |
|
|
|
56 |
|
|
.include <bsd.port.subdir.mk> |
57 |
|
|
|
58 |
|
|
index: |
59 |
|
|
@rm -f ${INDEXDIR}/${INDEXFILE} |
60 |
|
|
@cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE} |
61 |
|
|
|
62 |
laffer1 |
1.36 |
indexbz2: index |
63 |
laffer1 |
1.37 |
@rm -f ${INDEXDIR}/${INDEXFILE}.bz2 |
64 |
laffer1 |
1.36 |
@bzip2 ${INDEXDIR}/${INDEXFILE} |
65 |
|
|
|
66 |
archite |
1.1 |
fetchindex: ${INDEXDIR}/{INDEXFILE}.bz2 |
67 |
|
|
@bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} && \ |
68 |
|
|
chmod a+r ${INDEXDIR}/${INDEXFILE} |
69 |
|
|
|
70 |
|
|
${INDEXDIR}/{INDEXFILE}.bz2: .PHONY |
71 |
|
|
@${FETCHINDEX} ${INDEXDIR}/${INDEXFILE}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2 |
72 |
|
|
|
73 |
laffer1 |
1.18 |
MASTER_SITE_INDEX?= http://www.MidnightBSD.org/ports/ |
74 |
archite |
1.1 |
SETENV?= /usr/bin/env |
75 |
|
|
FETCHINDEX?= ${SETENV} ${FETCH_ENV} fetch -am -o |
76 |
|
|
INDEX_JOBS?= 2 |
77 |
|
|
|
78 |
|
|
.if !defined(INDEX_VERBOSE) |
79 |
|
|
INDEX_ECHO_MSG= echo > /dev/null |
80 |
|
|
INDEX_ECHO_1ST= echo -n |
81 |
|
|
.else |
82 |
|
|
INDEX_ECHO_MSG= echo 1>&2 |
83 |
|
|
INDEX_ECHO_1ST= echo |
84 |
|
|
.endif |
85 |
|
|
|
86 |
|
|
${INDEXDIR}/${INDEXFILE}: |
87 |
|
|
@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \ |
88 |
|
|
if [ "${INDEX_PRISTINE}" != "" ]; then \ |
89 |
|
|
export LOCALBASE=/nonexistentlocal; \ |
90 |
|
|
export X11BASE=/nonexistentx; \ |
91 |
|
|
fi; \ |
92 |
|
|
tmpdir=`/usr/bin/mktemp -d -t index` || exit 1; \ |
93 |
|
|
trap "rm -rf $${tmpdir}; exit 1" 1 2 3 5 10 13 15; \ |
94 |
|
|
( cd ${.CURDIR} && make -j${INDEX_JOBS} INDEX_TMPDIR=$${tmpdir} BUILDING_INDEX=1 \ |
95 |
|
|
ECHO_MSG="${INDEX_ECHO_MSG}" describe ) || \ |
96 |
|
|
(rm -rf $${tmpdir} ; \ |
97 |
|
|
if [ "${INDEX_QUIET}" = "" ]; then \ |
98 |
|
|
echo; \ |
99 |
|
|
echo "********************************************************************"; \ |
100 |
|
|
echo "Before reporting this error, verify that you are running a supported"; \ |
101 |
laffer1 |
1.18 |
echo "version of MidnightBSD (see http://www.MidnightBSD.org/ports/) and that you"; \ |
102 |
archite |
1.1 |
echo "have a complete and up-to-date ports collection. (INDEX builds are"; \ |
103 |
|
|
echo "not supported with partial or out-of-date ports collections -- in"; \ |
104 |
|
|
echo "particular, if you are using cvsup, you must cvsup the \"ports-all\""; \ |
105 |
|
|
echo "collection, and have no \"refuse\" files.) If that is the case, then"; \ |
106 |
laffer1 |
1.18 |
echo "report the failure to ports@MidnightBSD.org together with relevant"; \ |
107 |
|
|
echo "details of your ports configuration (including MidnightBSD version,"; \ |
108 |
archite |
1.1 |
echo "your architecture, your environment, and your /etc/make.conf"; \ |
109 |
|
|
echo "settings, especially compiler flags and WITH/WITHOUT settings)."; \ |
110 |
|
|
echo; \ |
111 |
|
|
echo "Note: the latest pre-generated version of INDEX may be fetched"; \ |
112 |
|
|
echo "automatically with \"make fetchindex\"."; \ |
113 |
|
|
echo "********************************************************************"; \ |
114 |
|
|
echo; \ |
115 |
|
|
fi; \ |
116 |
|
|
exit 1); \ |
117 |
|
|
cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; perl ${.CURDIR}/Tools/make_index) | \ |
118 |
|
|
sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \ |
119 |
|
|
sort -t '|' +1 -2 | \ |
120 |
|
|
sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \ |
121 |
|
|
if [ "${INDEX_PRISTINE}" != "" ]; then \ |
122 |
|
|
sed -e "s,$${LOCALBASE},/usr/local," -e "s,$${X11BASE},/usr/X11R6," \ |
123 |
|
|
${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \ |
124 |
|
|
else \ |
125 |
|
|
mv ${INDEXDIR}/${INDEXFILE}.tmp ${INDEXDIR}/${INDEXFILE}; \ |
126 |
|
|
fi; \ |
127 |
|
|
rm -rf $${tmpdir}; \ |
128 |
|
|
echo " Done." |
129 |
|
|
|
130 |
|
|
print-index: ${INDEXDIR}/${INDEXFILE} |
131 |
|
|
@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nE-deps:\t%s\nP-deps:\t%s\nF-deps:\t%s\nWWW:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${INDEXDIR}/${INDEXFILE} |
132 |
|
|
|
133 |
|
|
CVS?= cvs |
134 |
laffer1 |
1.30 |
SUP?= csup |
135 |
archite |
1.1 |
.if defined(SUPHOST) |
136 |
|
|
SUPFLAGS+= -h ${SUPHOST} |
137 |
|
|
.endif |
138 |
|
|
update: |
139 |
laffer1 |
1.32 |
.if defined(SUP_UPDATE) && defined(PORTSSUPFILE) |
140 |
archite |
1.1 |
@echo "--------------------------------------------------------------" |
141 |
|
|
@echo ">>> Running ${SUP}" |
142 |
|
|
@echo "--------------------------------------------------------------" |
143 |
|
|
@${SUP} ${SUPFLAGS} ${PORTSSUPFILE} |
144 |
|
|
.elif defined(CVS_UPDATE) |
145 |
|
|
@echo "--------------------------------------------------------------" |
146 |
|
|
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT} |
147 |
|
|
@echo "--------------------------------------------------------------" |
148 |
|
|
cd ${.CURDIR}; ${CVS} -R -q update -A -P -d -I! |
149 |
|
|
.elif defined(SUP_UPDATE) && !defined(PORTSSUPFILE) |
150 |
|
|
@${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update." |
151 |
|
|
@exit 1 |
152 |
|
|
.else |
153 |
|
|
@${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first." |
154 |
|
|
.endif |