Lines 1-5379
Link Here
|
1 |
#-*- tab-width: 4; -*- |
1 |
#-*- tab-width: 4; -*- |
2 |
# ex:ts=4 |
2 |
# ex:ts=4 |
3 |
# |
3 |
# |
4 |
# $FreeBSD$ |
4 |
# $FreeBSD$ |
5 |
# $NetBSD: $ |
5 |
# $NetBSD: $ |
6 |
# |
6 |
# |
7 |
# bsd.port.mk - 940820 Jordan K. Hubbard. |
7 |
# bsd.port.mk - 940820 Jordan K. Hubbard. |
8 |
# This file is in the public domain. |
8 |
# This file is in the public domain. |
9 |
# |
9 |
# |
10 |
# Please view me with 4 column tabs! |
10 |
# Please view me with 4 column tabs! |
11 |
|
11 |
|
12 |
# This is the master file for the most common elements to all port |
12 |
# This is the master file for the most common elements to all port |
13 |
# Makefile in the ports system. For a more general overview of its |
13 |
# Makefile in the ports system. For a more general overview of its |
14 |
# use and importance, see the Porter's Handbook. |
14 |
# use and importance, see the Porter's Handbook. |
15 |
|
15 |
|
16 |
# There are two different types of "maintainers" in the ports framework. |
16 |
# There are two different types of "maintainers" in the ports framework. |
17 |
# The maintainer alias of the bsd.port.mk file is listed below in the |
17 |
# The maintainer alias of the bsd.port.mk file is listed below in the |
18 |
# FreeBSD_MAINTAINER entry. You should consult them if you have any |
18 |
# FreeBSD_MAINTAINER entry. You should consult them if you have any |
19 |
# questions/suggestions regarding this file. |
19 |
# questions/suggestions regarding this file. |
20 |
# |
20 |
# |
21 |
# DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF, EVEN IF YOU DID NOT GET |
21 |
# DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF, EVEN IF YOU DID NOT GET |
22 |
# A RESPONSE FROM THE MAINTAINER(S) WITHIN A REASONABLE TIMEFRAME! ALL |
22 |
# A RESPONSE FROM THE MAINTAINER(S) WITHIN A REASONABLE TIMEFRAME! ALL |
23 |
# UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! |
23 |
# UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! |
24 |
|
24 |
|
25 |
FreeBSD_MAINTAINER= portmgr@FreeBSD.org |
25 |
FreeBSD_MAINTAINER= portmgr@FreeBSD.org |
26 |
|
26 |
|
27 |
# For each port, the MAINTAINER variable is what you should consult for |
27 |
# For each port, the MAINTAINER variable is what you should consult for |
28 |
# contact information on the person(s) to contact if you have questions/ |
28 |
# contact information on the person(s) to contact if you have questions/ |
29 |
# suggestions about that specific port. By default (if no MAINTAINER |
29 |
# suggestions about that specific port. By default (if no MAINTAINER |
30 |
# is listed), a port is maintained by the subscribers of the ports@FreeBSD.org |
30 |
# is listed), a port is maintained by the subscribers of the ports@FreeBSD.org |
31 |
# mailing list, and any correspondence should be directed there. |
31 |
# mailing list, and any correspondence should be directed there. |
32 |
# |
32 |
# |
33 |
# MAINTAINER - The e-mail address of the contact person for this port. |
33 |
# MAINTAINER - The e-mail address of the contact person for this port. |
34 |
# Default: ports@FreeBSD.org |
34 |
# Default: ports@FreeBSD.org |
35 |
# |
35 |
# |
36 |
# These are meta-variables that are automatically set to the system |
36 |
# These are meta-variables that are automatically set to the system |
37 |
# you are running on. These are provided in case you need to take |
37 |
# you are running on. These are provided in case you need to take |
38 |
# different actions for different values. |
38 |
# different actions for different values. |
39 |
# |
39 |
# |
40 |
# ARCH - The architecture of the target machine, such as would be |
40 |
# ARCH - The architecture of the target machine, such as would be |
41 |
# returned by "uname -p". |
41 |
# returned by "uname -p". |
42 |
# OPSYS - Portability clause. This is the operating system the |
42 |
# OPSYS - Portability clause. This is the operating system the |
43 |
# makefile is being used on. Automatically set to |
43 |
# makefile is being used on. Automatically set to |
44 |
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. |
44 |
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. |
45 |
# OSREL - The release version (numeric) of the operating system. |
45 |
# OSREL - The release version (numeric) of the operating system. |
46 |
# OSVERSION - The value of __FreeBSD_version. |
46 |
# OSVERSION - The value of __FreeBSD_version. |
47 |
# |
47 |
# |
48 |
# This is the beginning of the list of all variables that need to be |
48 |
# This is the beginning of the list of all variables that need to be |
49 |
# defined in a port, listed in order that they should be included |
49 |
# defined in a port, listed in order that they should be included |
50 |
# to fit in with existing conventions. (Exception: MAINTAINER actually |
50 |
# to fit in with existing conventions. (Exception: MAINTAINER actually |
51 |
# should appear after EXTRACT_ONLY and before MASTER_SITE_BACKUP). |
51 |
# should appear after EXTRACT_ONLY and before MASTER_SITE_BACKUP). |
52 |
# |
52 |
# |
53 |
# These variables are used to identify your port. |
53 |
# These variables are used to identify your port. |
54 |
# |
54 |
# |
55 |
# PORTNAME - Name of software. Mandatory. |
55 |
# PORTNAME - Name of software. Mandatory. |
56 |
# PORTVERSION - Version of software. Mandatory when no DISTVERSION is given. |
56 |
# PORTVERSION - Version of software. Mandatory when no DISTVERSION is given. |
57 |
# PORTREVISION - Version of port. Optional. Commonly used to indicate |
57 |
# PORTREVISION - Version of port. Optional. Commonly used to indicate |
58 |
# that an update has happened that affects the port |
58 |
# that an update has happened that affects the port |
59 |
# framework itself, but not the distributed software |
59 |
# framework itself, but not the distributed software |
60 |
# (e.g., local patches or Makefile changes). |
60 |
# (e.g., local patches or Makefile changes). |
61 |
# PORTEPOCH - Optional. In certain odd cases, the PORTREVISION logic |
61 |
# PORTEPOCH - Optional. In certain odd cases, the PORTREVISION logic |
62 |
# can be fooled by ports that appear to go backwards |
62 |
# can be fooled by ports that appear to go backwards |
63 |
# numerically (e.g. if port-0.3 is newer than port-1998). |
63 |
# numerically (e.g. if port-0.3 is newer than port-1998). |
64 |
# In this case, incrementing PORTEPOCH forces the revision. |
64 |
# In this case, incrementing PORTEPOCH forces the revision. |
65 |
# Default: 0 (no effect). |
65 |
# Default: 0 (no effect). |
66 |
# PKGNAME - Always defined as |
66 |
# PKGNAME - Always defined as |
67 |
# ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}. |
67 |
# ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}. |
68 |
# Do not define this in your Makefile. |
68 |
# Do not define this in your Makefile. |
69 |
# PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc. |
69 |
# PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc. |
70 |
# Optional. |
70 |
# Optional. |
71 |
# PKGNAMESUFFIX - Suffix to specify compilation options or a version |
71 |
# PKGNAMESUFFIX - Suffix to specify compilation options or a version |
72 |
# designator (in case there are different versions of |
72 |
# designator (in case there are different versions of |
73 |
# one port as is the case for Tcl). |
73 |
# one port as is the case for Tcl). |
74 |
# Optional. |
74 |
# Optional. |
75 |
# PKGVERSION - Always defined as ${PORTVERSION}. |
75 |
# PKGVERSION - Always defined as ${PORTVERSION}. |
76 |
# Do not define this in your Makefile. |
76 |
# Do not define this in your Makefile. |
77 |
# DISTVERSION - Vendor version of the distribution. |
77 |
# DISTVERSION - Vendor version of the distribution. |
78 |
# Default: ${PORTVERSION} |
78 |
# Default: ${PORTVERSION} |
79 |
# DISTNAME - Name of port or distribution used in generating |
79 |
# DISTNAME - Name of port or distribution used in generating |
80 |
# WRKSRC and DISTFILES below. |
80 |
# WRKSRC and DISTFILES below. |
81 |
# Default: |
81 |
# Default: |
82 |
# ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} |
82 |
# ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} |
83 |
# CATEGORIES - A list of descriptive categories into which this port falls. |
83 |
# CATEGORIES - A list of descriptive categories into which this port falls. |
84 |
# Mandatory. |
84 |
# Mandatory. |
85 |
# |
85 |
# |
86 |
# These variable describe how to fetch files required for building the port. |
86 |
# These variable describe how to fetch files required for building the port. |
87 |
# |
87 |
# |
88 |
# DISTFILES - Name(s) of archive file(s) containing distribution. |
88 |
# DISTFILES - Name(s) of archive file(s) containing distribution. |
89 |
# Set this to an empty string if the port doesn't require it. |
89 |
# Set this to an empty string if the port doesn't require it. |
90 |
# Default: ${DISTNAME}${EXTRACT_SUFX} |
90 |
# Default: ${DISTNAME}${EXTRACT_SUFX} |
91 |
# EXTRACT_SUFX - Suffix for archive names |
91 |
# EXTRACT_SUFX - Suffix for archive names |
92 |
# You never have to set both DISTFILES and EXTRACT_SUFX. |
92 |
# You never have to set both DISTFILES and EXTRACT_SUFX. |
93 |
# Default: .tar.bz2 if USES=tar:bzip2 is set, .tar.xz if |
93 |
# Default: .tar.bz2 if USES=tar:bzip2 is set, .tar.xz if |
94 |
# USES=tar:xz USE_XZ is set, .tar.gz otherwise). |
94 |
# USES=tar:xz USE_XZ is set, .tar.gz otherwise). |
95 |
# MASTER_SITES - Primary location(s) for distribution files if not found |
95 |
# MASTER_SITES - Primary location(s) for distribution files if not found |
96 |
# locally. See bsd.sites.mk for common choices for |
96 |
# locally. See bsd.sites.mk for common choices for |
97 |
# MASTER_SITES. |
97 |
# MASTER_SITES. |
98 |
# MASTER_SITE_SUBDIR |
98 |
# MASTER_SITE_SUBDIR |
99 |
# - Subdirectory of MASTER_SITES. Will sometimes need to be |
99 |
# - Subdirectory of MASTER_SITES. Will sometimes need to be |
100 |
# set to ${PORTNAME} for (e.g.) MASTER_SITE_SOURCEFORGE. |
100 |
# set to ${PORTNAME} for (e.g.) MASTER_SITE_SOURCEFORGE. |
101 |
# Only guaranteed to work for choices of ${MASTER_SITES} |
101 |
# Only guaranteed to work for choices of ${MASTER_SITES} |
102 |
# defined in bsd.sites.mk. |
102 |
# defined in bsd.sites.mk. |
103 |
# Default: not set. |
103 |
# Default: not set. |
104 |
# PATCHFILES - Name(s) of additional files that contain distribution |
104 |
# PATCHFILES - Name(s) of additional files that contain distribution |
105 |
# patches. Make will look for them at PATCH_SITES (see below). |
105 |
# patches. Make will look for them at PATCH_SITES (see below). |
106 |
# They will automatically be uncompressed before patching if |
106 |
# They will automatically be uncompressed before patching if |
107 |
# the names end with ".gz", ".bz2" or ".Z". |
107 |
# the names end with ".gz", ".bz2" or ".Z". |
108 |
# For each file you can optionally specify a strip |
108 |
# For each file you can optionally specify a strip |
109 |
# flag of patch(1) after a colon if it has a different |
109 |
# flag of patch(1) after a colon if it has a different |
110 |
# base directory, e.g. "file1 file2:-p1 file3". |
110 |
# base directory, e.g. "file1 file2:-p1 file3". |
111 |
# You can also use a :group at the end for matching up to |
111 |
# You can also use a :group at the end for matching up to |
112 |
# dist file groups. See Porters Handbook for more information. |
112 |
# dist file groups. See Porters Handbook for more information. |
113 |
# Syntax: PATCHFILES= patch[:-pX][:group] |
113 |
# Syntax: PATCHFILES= patch[:-pX][:group] |
114 |
# Default: not set. |
114 |
# Default: not set. |
115 |
# PATCH_SITES - Primary location(s) for distribution patch files |
115 |
# PATCH_SITES - Primary location(s) for distribution patch files |
116 |
# if not found locally. |
116 |
# if not found locally. |
117 |
# DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} and |
117 |
# DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} and |
118 |
# ${PATCHFILES} will be put in this subdirectory of |
118 |
# ${PATCHFILES} will be put in this subdirectory of |
119 |
# ${DISTDIR} (see below). Also they will be fetched in this |
119 |
# ${DISTDIR} (see below). Also they will be fetched in this |
120 |
# subdirectory from FreeBSD mirror sites. |
120 |
# subdirectory from FreeBSD mirror sites. |
121 |
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. |
121 |
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. |
122 |
# NOFETCHFILES - If set, don't download these files from the ${MASTER_SITES} |
122 |
# NOFETCHFILES - If set, don't download these files from the ${MASTER_SITES} |
123 |
# or ${MASTER_SITE_BACKUP} (but do from |
123 |
# or ${MASTER_SITE_BACKUP} (but do from |
124 |
# ${MASTER_SITE_OVERRIDE}) |
124 |
# ${MASTER_SITE_OVERRIDE}) |
125 |
# EXTRACT_ONLY - If set, a subset of ${DISTFILES} you want to |
125 |
# EXTRACT_ONLY - If set, a subset of ${DISTFILES} you want to |
126 |
# actually extract. |
126 |
# actually extract. |
127 |
# |
127 |
# |
128 |
# (NOTE: by convention, the MAINTAINER entry (see above) should go here.) |
128 |
# (NOTE: by convention, the MAINTAINER entry (see above) should go here.) |
129 |
# |
129 |
# |
130 |
# These variables are typically set in /etc/make.conf to indicate |
130 |
# These variables are typically set in /etc/make.conf to indicate |
131 |
# the user's preferred location to fetch files from. You should |
131 |
# the user's preferred location to fetch files from. You should |
132 |
# rarely need to set these. |
132 |
# rarely need to set these. |
133 |
# |
133 |
# |
134 |
# MASTER_SITE_BACKUP |
134 |
# MASTER_SITE_BACKUP |
135 |
# - Backup location(s) for distribution files and patch |
135 |
# - Backup location(s) for distribution files and patch |
136 |
# files if not found locally and ${MASTER_SITES}/${PATCH_SITES}. |
136 |
# files if not found locally and ${MASTER_SITES}/${PATCH_SITES}. |
137 |
# This should *not* be changed. |
137 |
# This should *not* be changed. |
138 |
# Default: |
138 |
# Default: |
139 |
# http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ |
139 |
# http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ |
140 |
# MASTER_SITE_OVERRIDE |
140 |
# MASTER_SITE_OVERRIDE |
141 |
# - If set, prepend the MASTER_SITES setting with this value. |
141 |
# - If set, prepend the MASTER_SITES setting with this value. |
142 |
# MASTER_SITE_FREEBSD |
142 |
# MASTER_SITE_FREEBSD |
143 |
# - If set, prepend ${MASTER_SITE_BACKUP} in MASTER_SITES. |
143 |
# - If set, prepend ${MASTER_SITE_BACKUP} in MASTER_SITES. |
144 |
# |
144 |
# |
145 |
# Set these if your port should not be built under certain circumstances. |
145 |
# Set these if your port should not be built under certain circumstances. |
146 |
# These are string variables; you should set them to the reason why |
146 |
# These are string variables; you should set them to the reason why |
147 |
# they are necessary. |
147 |
# they are necessary. |
148 |
# |
148 |
# |
149 |
# RESTRICTED - Prevent the distribution of distfiles and packages to |
149 |
# RESTRICTED - Prevent the distribution of distfiles and packages to |
150 |
# the FTP sites or on CDROM (e.g. forbidden by license |
150 |
# the FTP sites or on CDROM (e.g. forbidden by license |
151 |
# considerations). |
151 |
# considerations). |
152 |
# NO_CDROM - Packages and distfiles may not go on CDROM (e.g. must |
152 |
# NO_CDROM - Packages and distfiles may not go on CDROM (e.g. must |
153 |
# not be re-sold) but can go on FTP sites. |
153 |
# not be re-sold) but can go on FTP sites. |
154 |
# NO_PACKAGE - Port should not be packaged for ftp sites or CDROMs, |
154 |
# NO_PACKAGE - Port should not be packaged for ftp sites or CDROMs, |
155 |
# but distfiles can be put on ftp sites and CDROMs. |
155 |
# but distfiles can be put on ftp sites and CDROMs. |
156 |
# FORBIDDEN - Package build should not be attempted because of |
156 |
# FORBIDDEN - Package build should not be attempted because of |
157 |
# security vulnerabilities. |
157 |
# security vulnerabilities. |
158 |
# LEGAL_TEXT - Port has legal issues (e.g., special permission to distribute, lacks a license). |
158 |
# LEGAL_TEXT - Port has legal issues (e.g., special permission to distribute, lacks a license). |
159 |
# LEGAL_PACKAGE - Port has no legal issues but defines NO_PACKAGE |
159 |
# LEGAL_PACKAGE - Port has no legal issues but defines NO_PACKAGE |
160 |
# IGNORE - Package build should be skipped entirely (e.g. |
160 |
# IGNORE - Package build should be skipped entirely (e.g. |
161 |
# because of serious unfixable problems in the build, |
161 |
# because of serious unfixable problems in the build, |
162 |
# because it cannot be manually fetched, etc). Error |
162 |
# because it cannot be manually fetched, etc). Error |
163 |
# logs will not appear on pointyhat, so this should be |
163 |
# logs will not appear on pointyhat, so this should be |
164 |
# used sparingly. |
164 |
# used sparingly. |
165 |
# IGNORE_${ARCH} - Port should be ignored on ${ARCH}. |
165 |
# IGNORE_${ARCH} - Port should be ignored on ${ARCH}. |
166 |
# IGNORE_${OPSYS} - Port should be ignored on ${OPSYS}. |
166 |
# IGNORE_${OPSYS} - Port should be ignored on ${OPSYS}. |
167 |
# IGNORE_${OPSYS}_${OSREL:R} - Port should be ignored on a single |
167 |
# IGNORE_${OPSYS}_${OSREL:R} - Port should be ignored on a single |
168 |
# release of ${OPSYS}, e.g IGNORE_FreeBSD_8 |
168 |
# release of ${OPSYS}, e.g IGNORE_FreeBSD_8 |
169 |
# would affect all point releases of FreeBSD 8. |
169 |
# would affect all point releases of FreeBSD 8. |
170 |
# IGNORE_${OPSYS}_${OSREL:R}_${ARCH} - Port should be ignored on a |
170 |
# IGNORE_${OPSYS}_${OSREL:R}_${ARCH} - Port should be ignored on a |
171 |
# single release of ${OPSYS} and specific architecture, |
171 |
# single release of ${OPSYS} and specific architecture, |
172 |
# e.g IGNORE_FreeBSD_8_i386 would affect all point |
172 |
# e.g IGNORE_FreeBSD_8_i386 would affect all point |
173 |
# releases of FreeBSD 8 in i386. |
173 |
# releases of FreeBSD 8 in i386. |
174 |
# BROKEN - Port is believed to be broken. Package builds can |
174 |
# BROKEN - Port is believed to be broken. Package builds can |
175 |
# still be attempted using TRYBROKEN to test this |
175 |
# still be attempted using TRYBROKEN to test this |
176 |
# assumption. |
176 |
# assumption. |
177 |
# BROKEN_${ARCH} - Port is believed to be broken on ${ARCH}. Package builds |
177 |
# BROKEN_${ARCH} - Port is believed to be broken on ${ARCH}. Package builds |
178 |
# can still be attempted using TRYBROKEN to |
178 |
# can still be attempted using TRYBROKEN to |
179 |
# test this assumption. |
179 |
# test this assumption. |
180 |
# BROKEN_${OPSYS} - Port is believed to be broken on ${OPSYS}. Package builds |
180 |
# BROKEN_${OPSYS} - Port is believed to be broken on ${OPSYS}. Package builds |
181 |
# can still be attempted using TRYBROKEN to |
181 |
# can still be attempted using TRYBROKEN to |
182 |
# test this assumption. |
182 |
# test this assumption. |
183 |
# BROKEN_${OPSYS}_${OSREL:R} - Port is believed to be broken on a single |
183 |
# BROKEN_${OPSYS}_${OSREL:R} - Port is believed to be broken on a single |
184 |
# release of ${OPSYS}, e.g BROKEN_FreeBSD_8 |
184 |
# release of ${OPSYS}, e.g BROKEN_FreeBSD_8 |
185 |
# would affect all point releases of FreeBSD 8 |
185 |
# would affect all point releases of FreeBSD 8 |
186 |
# unless TRYBROKEN is also set. |
186 |
# unless TRYBROKEN is also set. |
187 |
# BROKEN_${OPSYS}_${OSREL:R}_${ARCH} - Port is believed to be broken on a |
187 |
# BROKEN_${OPSYS}_${OSREL:R}_${ARCH} - Port is believed to be broken on a |
188 |
# single release of ${OPSYS} and specific architecture, |
188 |
# single release of ${OPSYS} and specific architecture, |
189 |
# e.g BROKEN_FreeBSD_8_i386 would affect all point |
189 |
# e.g BROKEN_FreeBSD_8_i386 would affect all point |
190 |
# releases of FreeBSD 8 in i386 |
190 |
# releases of FreeBSD 8 in i386 |
191 |
# unless TRYBROKEN is also set. |
191 |
# unless TRYBROKEN is also set. |
192 |
# DEPRECATED - Port is deprecated to install. Advisory only. |
192 |
# DEPRECATED - Port is deprecated to install. Advisory only. |
193 |
# EXPIRATION_DATE |
193 |
# EXPIRATION_DATE |
194 |
# - If DEPRECATED is set, determines a date when |
194 |
# - If DEPRECATED is set, determines a date when |
195 |
# the port is planed to remove. The date format is |
195 |
# the port is planed to remove. The date format is |
196 |
# ISO 8601 (YYYY-MM-DD). |
196 |
# ISO 8601 (YYYY-MM-DD). |
197 |
# |
197 |
# |
198 |
# DISABLE_VULNERABILITIES |
198 |
# DISABLE_VULNERABILITIES |
199 |
# - If set, do not check if the port is listed in the |
199 |
# - If set, do not check if the port is listed in the |
200 |
# vulnerabilities database. |
200 |
# vulnerabilities database. |
201 |
# |
201 |
# |
202 |
# In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles |
202 |
# In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles |
203 |
# or patchfiles have redistribution restrictions, set the following |
203 |
# or patchfiles have redistribution restrictions, set the following |
204 |
# to the list of such files. |
204 |
# to the list of such files. |
205 |
# |
205 |
# |
206 |
# RESTRICTED_FILES |
206 |
# RESTRICTED_FILES |
207 |
# - List of files that cannot be redistributed. |
207 |
# - List of files that cannot be redistributed. |
208 |
# Default: "${DISTFILES} ${PATCHFILES}" if RESTRICTED |
208 |
# Default: "${DISTFILES} ${PATCHFILES}" if RESTRICTED |
209 |
# or NO_CDROM is set, empty otherwise. |
209 |
# or NO_CDROM is set, empty otherwise. |
210 |
# |
210 |
# |
211 |
# These variables are booleans, so you don't need to set them to the reason. |
211 |
# These variables are booleans, so you don't need to set them to the reason. |
212 |
# |
212 |
# |
213 |
# IS_INTERACTIVE |
213 |
# IS_INTERACTIVE |
214 |
# - Set this if your port needs to interact with the user |
214 |
# - Set this if your port needs to interact with the user |
215 |
# during any step in a package build. User can then decide |
215 |
# during any step in a package build. User can then decide |
216 |
# to skip this port by setting ${BATCH}, or compiling only |
216 |
# to skip this port by setting ${BATCH}, or compiling only |
217 |
# the interactive ports by setting ${INTERACTIVE}. |
217 |
# the interactive ports by setting ${INTERACTIVE}. |
218 |
# Default: not set. |
218 |
# Default: not set. |
219 |
# USE_SUBMAKE - Set this if you want that each of the port's main 7 targets |
219 |
# USE_SUBMAKE - Set this if you want that each of the port's main 7 targets |
220 |
# (extract, patch, configure, build, stage, install and |
220 |
# (extract, patch, configure, build, stage, install and |
221 |
# package) to be executed in a separate make(1) process. |
221 |
# package) to be executed in a separate make(1) process. |
222 |
# Useful when one of the stages needs to influence make(1) |
222 |
# Useful when one of the stages needs to influence make(1) |
223 |
# variables of the later stages using ${WRKDIR}/Makefile.inc |
223 |
# variables of the later stages using ${WRKDIR}/Makefile.inc |
224 |
# generated on the fly. |
224 |
# generated on the fly. |
225 |
# Default: not set. |
225 |
# Default: not set. |
226 |
# |
226 |
# |
227 |
# NO_ARCH - Set this if port is architecture neutral. |
227 |
# NO_ARCH - Set this if port is architecture neutral. |
228 |
# |
228 |
# |
229 |
# NO_ARCH_IGNORE - Set this to a list files to ignore when NO_ARCH is checked |
229 |
# NO_ARCH_IGNORE - Set this to a list files to ignore when NO_ARCH is checked |
230 |
# in stage-qa (i.e. architecture specific files that are |
230 |
# in stage-qa (i.e. architecture specific files that are |
231 |
# 'bundled' with the port). |
231 |
# 'bundled' with the port). |
232 |
# |
232 |
# |
233 |
# Set these if your port only makes sense to certain architectures. |
233 |
# Set these if your port only makes sense to certain architectures. |
234 |
# They are lists containing names for them (e.g., "amd64 i386"). |
234 |
# They are lists containing names for them (e.g., "amd64 i386"). |
235 |
# (Defaults: not set.) |
235 |
# (Defaults: not set.) |
236 |
# |
236 |
# |
237 |
# ONLY_FOR_ARCHS |
237 |
# ONLY_FOR_ARCHS |
238 |
# - Only build ports if ${ARCH} matches one of these. |
238 |
# - Only build ports if ${ARCH} matches one of these. |
239 |
# NOT_FOR_ARCHS - Only build ports if ${ARCH} doesn't match one of these. |
239 |
# NOT_FOR_ARCHS - Only build ports if ${ARCH} doesn't match one of these. |
240 |
# ONLY_FOR_ARCHS_REASON |
240 |
# ONLY_FOR_ARCHS_REASON |
241 |
# ONLY_FOR_ARCHS_REASON_${ARCH} |
241 |
# ONLY_FOR_ARCHS_REASON_${ARCH} |
242 |
# - Reason why it's only for ${ONLY_FOR_ARCHS}s |
242 |
# - Reason why it's only for ${ONLY_FOR_ARCHS}s |
243 |
# NOT_FOR_ARCHS_REASON |
243 |
# NOT_FOR_ARCHS_REASON |
244 |
# NOT_FOR_ARCHS_REASON_${ARCH} |
244 |
# NOT_FOR_ARCHS_REASON_${ARCH} |
245 |
# - Reason why it's not for ${NOT_FOR_ARCHS}s |
245 |
# - Reason why it's not for ${NOT_FOR_ARCHS}s |
246 |
# IA32_BINARY_PORT |
246 |
# IA32_BINARY_PORT |
247 |
# - Set this instead of ONLY_FOR_ARCHS if the given port |
247 |
# - Set this instead of ONLY_FOR_ARCHS if the given port |
248 |
# fetches and installs compiled i386 binaries. |
248 |
# fetches and installs compiled i386 binaries. |
249 |
# |
249 |
# |
250 |
# Dependency checking. Use these if your port requires another port |
250 |
# Dependency checking. Use these if your port requires another port |
251 |
# not in the list below. (Default: empty.) |
251 |
# not in the list below. (Default: empty.) |
252 |
# |
252 |
# |
253 |
# EXTRACT_DEPENDS |
253 |
# EXTRACT_DEPENDS |
254 |
# - A list of "path:dir[:target]" tuples of other ports this |
254 |
# - A list of "path:dir[:target]" tuples of other ports this |
255 |
# package depends on in the "extract" stage. "path" is |
255 |
# package depends on in the "extract" stage. "path" is |
256 |
# the name of a file if it starts with a slash (/), an |
256 |
# the name of a file if it starts with a slash (/), an |
257 |
# executable otherwise. make will test for the existence |
257 |
# executable otherwise. make will test for the existence |
258 |
# (if it is a full pathname) or search for it in your |
258 |
# (if it is a full pathname) or search for it in your |
259 |
# $PATH (if it is an executable) and go into "dir" to do |
259 |
# $PATH (if it is an executable) and go into "dir" to do |
260 |
# a "make all install" if it's not found. If the third |
260 |
# a "make all install" if it's not found. If the third |
261 |
# field ("target") exists, it will be used instead of |
261 |
# field ("target") exists, it will be used instead of |
262 |
# ${DEPENDS_TARGET}. The first field also supports a |
262 |
# ${DEPENDS_TARGET}. The first field also supports a |
263 |
# package name with a version range, in the form package>=1.2 |
263 |
# package name with a version range, in the form package>=1.2 |
264 |
# if a particular version is desired. |
264 |
# if a particular version is desired. |
265 |
# PATCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
265 |
# PATCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
266 |
# package depends on in the "patch" stage. "path" is the |
266 |
# package depends on in the "patch" stage. "path" is the |
267 |
# name of a file if it starts with a slash (/), an |
267 |
# name of a file if it starts with a slash (/), an |
268 |
# executable otherwise. make will test for the existence |
268 |
# executable otherwise. make will test for the existence |
269 |
# (if it is a full pathname) or search for it in your |
269 |
# (if it is a full pathname) or search for it in your |
270 |
# $PATH (if it is an executable) and go into "dir" to do |
270 |
# $PATH (if it is an executable) and go into "dir" to do |
271 |
# a "make all install" if it's not found. If the third |
271 |
# a "make all install" if it's not found. If the third |
272 |
# field ("target") exists, it will be used instead of |
272 |
# field ("target") exists, it will be used instead of |
273 |
# ${DEPENDS_TARGET}. The first field also supports a |
273 |
# ${DEPENDS_TARGET}. The first field also supports a |
274 |
# package name with a version range, in the form package>=1.2 |
274 |
# package name with a version range, in the form package>=1.2 |
275 |
# if a particular version is desired. |
275 |
# if a particular version is desired. |
276 |
# FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
276 |
# FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
277 |
# package depends in the "fetch" stage. "path" is the |
277 |
# package depends in the "fetch" stage. "path" is the |
278 |
# name of a file if it starts with a slash (/), an |
278 |
# name of a file if it starts with a slash (/), an |
279 |
# executable otherwise. make will test for the |
279 |
# executable otherwise. make will test for the |
280 |
# existence (if it is a full pathname) or search for |
280 |
# existence (if it is a full pathname) or search for |
281 |
# it in your $PATH (if it is an executable) and go |
281 |
# it in your $PATH (if it is an executable) and go |
282 |
# into "dir" to do a "make all install" if it's not |
282 |
# into "dir" to do a "make all install" if it's not |
283 |
# found. If the third field ("target") exists, it will |
283 |
# found. If the third field ("target") exists, it will |
284 |
# be used instead of ${DEPENDS_TARGET}. The first field |
284 |
# be used instead of ${DEPENDS_TARGET}. The first field |
285 |
# also supports a package name with a version range, in |
285 |
# also supports a package name with a version range, in |
286 |
# the form package>=1.2 if a particular version is desired. |
286 |
# the form package>=1.2 if a particular version is desired. |
287 |
# BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
287 |
# BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
288 |
# package depends to build (between the "extract" and |
288 |
# package depends to build (between the "extract" and |
289 |
# "build" stages, inclusive). The test done to |
289 |
# "build" stages, inclusive). The test done to |
290 |
# determine the existence of the dependency is the |
290 |
# determine the existence of the dependency is the |
291 |
# same as FETCH_DEPENDS. If the third field ("target") |
291 |
# same as FETCH_DEPENDS. If the third field ("target") |
292 |
# exists, it will be used instead of ${DEPENDS_TARGET}. |
292 |
# exists, it will be used instead of ${DEPENDS_TARGET}. |
293 |
# RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
293 |
# RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
294 |
# package depends to run. The test done to determine |
294 |
# package depends to run. The test done to determine |
295 |
# the existence of the dependency is the same as |
295 |
# the existence of the dependency is the same as |
296 |
# FETCH_DEPENDS. This will be checked during the |
296 |
# FETCH_DEPENDS. This will be checked during the |
297 |
# "install" stage and the name of the dependency will |
297 |
# "install" stage and the name of the dependency will |
298 |
# be put into the package as well. If the third field |
298 |
# be put into the package as well. If the third field |
299 |
# ("target") exists, it will be used instead of |
299 |
# ("target") exists, it will be used instead of |
300 |
# ${DEPENDS_TARGET}. The first field also supports a |
300 |
# ${DEPENDS_TARGET}. The first field also supports a |
301 |
# package name with a version range, in the form package>=1.2 |
301 |
# package name with a version range, in the form package>=1.2 |
302 |
# if a particular version is desired. |
302 |
# if a particular version is desired. |
303 |
# LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this |
303 |
# LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this |
304 |
# package depends on. "lib" is the name of a shared library. |
304 |
# package depends on. "lib" is the name of a shared library. |
305 |
# TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
305 |
# TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this |
306 |
# package depends on in the "test" stage. "path" is the |
306 |
# package depends on in the "test" stage. "path" is the |
307 |
# name of a file if it starts with a slash (/), an |
307 |
# name of a file if it starts with a slash (/), an |
308 |
# executable otherwise. make will test for the existence |
308 |
# executable otherwise. make will test for the existence |
309 |
# (if it is a full pathname) or search for it in your |
309 |
# (if it is a full pathname) or search for it in your |
310 |
# $PATH (if it is an executable) and go into "dir" to do |
310 |
# $PATH (if it is an executable) and go into "dir" to do |
311 |
# a "make all install" if it's not found. If the third |
311 |
# a "make all install" if it's not found. If the third |
312 |
# field ("target") exists, it will be used instead of |
312 |
# field ("target") exists, it will be used instead of |
313 |
# ${DEPENDS_TARGET}. The first field also supports a |
313 |
# ${DEPENDS_TARGET}. The first field also supports a |
314 |
# package name with a version range, in the form package>=1.2 |
314 |
# package name with a version range, in the form package>=1.2 |
315 |
# if a particular version is desired. |
315 |
# if a particular version is desired. |
316 |
# DEPENDS_TARGET |
316 |
# DEPENDS_TARGET |
317 |
# - The default target to execute when a port is calling a |
317 |
# - The default target to execute when a port is calling a |
318 |
# dependency. |
318 |
# dependency. |
319 |
# Default: install |
319 |
# Default: install |
320 |
# |
320 |
# |
321 |
# These variables control options about how a port gets built and/or |
321 |
# These variables control options about how a port gets built and/or |
322 |
# are shorthand notations for common sets of dependencies. |
322 |
# are shorthand notations for common sets of dependencies. |
323 |
# Use these if your port uses some of the common software packages. By |
323 |
# Use these if your port uses some of the common software packages. By |
324 |
# convention these should be set to 'yes', although they only need to be |
324 |
# convention these should be set to 'yes', although they only need to be |
325 |
# defined. Defaults: not set, unless explicitly indicated below. |
325 |
# defined. Defaults: not set, unless explicitly indicated below. |
326 |
# |
326 |
# |
327 |
# Note: the distinction between the USE_* and WANT_* variables, and the |
327 |
# Note: the distinction between the USE_* and WANT_* variables, and the |
328 |
# WITH_* and WITHOUT_* variables, are that the former are restricted to |
328 |
# WITH_* and WITHOUT_* variables, are that the former are restricted to |
329 |
# usage inside the ports framework, and the latter are reserved for user- |
329 |
# usage inside the ports framework, and the latter are reserved for user- |
330 |
# settable options. (Setting USE_* in /etc/make.conf is always wrong). |
330 |
# settable options. (Setting USE_* in /etc/make.conf is always wrong). |
331 |
# |
331 |
# |
332 |
# WITH_DEBUG - If set, debugging flags are added to CFLAGS and the |
332 |
# WITH_DEBUG - If set, debugging flags are added to CFLAGS and the |
333 |
# binaries don't get stripped by INSTALL_PROGRAM or |
333 |
# binaries don't get stripped by INSTALL_PROGRAM or |
334 |
# INSTALL_LIB. Besides, individual ports might |
334 |
# INSTALL_LIB. Besides, individual ports might |
335 |
# add their specific to produce binaries for debugging |
335 |
# add their specific to produce binaries for debugging |
336 |
# purposes. You can override the debug flags that are |
336 |
# purposes. You can override the debug flags that are |
337 |
# passed to the compiler by setting DEBUG_FLAGS. It is |
337 |
# passed to the compiler by setting DEBUG_FLAGS. It is |
338 |
# set to "-g" at default. |
338 |
# set to "-g" at default. |
339 |
# |
339 |
# |
340 |
# NOTE: to override a globally defined WITH_DEBUG at a |
340 |
# NOTE: to override a globally defined WITH_DEBUG at a |
341 |
# later time ".undef WITH_DEBUG" can be used |
341 |
# later time ".undef WITH_DEBUG" can be used |
342 |
# |
342 |
# |
343 |
# WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set |
343 |
# WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set |
344 |
# |
344 |
# |
345 |
# WITHOUT_SSP - Disable SSP. |
345 |
# WITHOUT_SSP - Disable SSP. |
346 |
# |
346 |
# |
347 |
# SSP_CFLAGS - Defaults to -fstack-protector. This value |
347 |
# SSP_CFLAGS - Defaults to -fstack-protector. This value |
348 |
# is added to CFLAGS and the necessary flags |
348 |
# is added to CFLAGS and the necessary flags |
349 |
# are added to LDFLAGS. Note that SSP_UNSAFE |
349 |
# are added to LDFLAGS. Note that SSP_UNSAFE |
350 |
# can be used in Makefiles by port maintainers |
350 |
# can be used in Makefiles by port maintainers |
351 |
# if a port breaks with it (it should be |
351 |
# if a port breaks with it (it should be |
352 |
# extremely rare). |
352 |
# extremely rare). |
353 |
## |
353 |
## |
354 |
# USE_LOCALE - LANG and LC_ALL are set to the value of this variable in |
354 |
# USE_LOCALE - LANG and LC_ALL are set to the value of this variable in |
355 |
# CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8 |
355 |
# CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8 |
356 |
## |
356 |
## |
357 |
# USE_GCC - If set, this port requires this version of gcc, either in |
357 |
# USE_GCC - If set, this port requires this version of gcc, either in |
358 |
# the system or installed from a port. |
358 |
# the system or installed from a port. |
359 |
# USE_CSTD - Override the default C language standard (gnu89, gnu99) |
359 |
# USE_CSTD - Override the default C language standard (gnu89, gnu99) |
360 |
# USE_CXXSTD Override the default C++ language standard |
360 |
# USE_CXXSTD Override the default C++ language standard |
361 |
# USE_BINUTILS - Use binutils suite from port instead of the version in base. |
361 |
# USE_BINUTILS - Use binutils suite from port instead of the version in base. |
362 |
# CFLAGS_${ARCH} Append the cflags to CFLAGS only on the specified architecture |
362 |
# CFLAGS_${ARCH} Append the cflags to CFLAGS only on the specified architecture |
363 |
# CXXFLAGS_${ARCH} |
363 |
# CXXFLAGS_${ARCH} |
364 |
# Append the cxxflags to CXXFLAGS only on the specified architecture |
364 |
# Append the cxxflags to CXXFLAGS only on the specified architecture |
365 |
## |
365 |
## |
366 |
# LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture |
366 |
# LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture |
367 |
## |
367 |
## |
368 |
# USE_OPENLDAP - If set, this port uses the OpenLDAP libraries. |
368 |
# USE_OPENLDAP - If set, this port uses the OpenLDAP libraries. |
369 |
# Implies: WANT_OPENLDAP_VER?=24 |
369 |
# Implies: WANT_OPENLDAP_VER?=24 |
370 |
# WANT_OPENLDAP_VER |
370 |
# WANT_OPENLDAP_VER |
371 |
# - Legal values are: 23, 24 |
371 |
# - Legal values are: 23, 24 |
372 |
# If set to an unknown value, the port is marked BROKEN. |
372 |
# If set to an unknown value, the port is marked BROKEN. |
373 |
# WANT_OPENLDAP_SASL |
373 |
# WANT_OPENLDAP_SASL |
374 |
# - If set, the system should use OpenLDAP libraries |
374 |
# - If set, the system should use OpenLDAP libraries |
375 |
# with SASL support. |
375 |
# with SASL support. |
376 |
## |
376 |
## |
377 |
# USE_JAVA - If set, this port relies on the Java language. |
377 |
# USE_JAVA - If set, this port relies on the Java language. |
378 |
# Implies inclusion of bsd.java.mk. (Also see |
378 |
# Implies inclusion of bsd.java.mk. (Also see |
379 |
# that file for more information on USE_JAVA_*). |
379 |
# that file for more information on USE_JAVA_*). |
380 |
# USE_OCAML - If set, this port relies on the OCaml language. |
380 |
# USE_OCAML - If set, this port relies on the OCaml language. |
381 |
# Implies inclusion of bsd.ocaml.mk. (Also see |
381 |
# Implies inclusion of bsd.ocaml.mk. (Also see |
382 |
# that file for more information on USE_OCAML*). |
382 |
# that file for more information on USE_OCAML*). |
383 |
# USE_RUBY - If set, this port relies on the Ruby language. |
383 |
# USE_RUBY - If set, this port relies on the Ruby language. |
384 |
# Implies inclusion of bsd.ruby.mk. (Also see |
384 |
# Implies inclusion of bsd.ruby.mk. (Also see |
385 |
# that file for more information on USE_RUBY_*). |
385 |
# that file for more information on USE_RUBY_*). |
386 |
## |
386 |
## |
387 |
# USE_GECKO - If set, this port uses the Gecko/Mozilla product. |
387 |
# USE_GECKO - If set, this port uses the Gecko/Mozilla product. |
388 |
# See bsd.gecko.mk for more details. |
388 |
# See bsd.gecko.mk for more details. |
389 |
## |
389 |
## |
390 |
# USE_WX - If set, this port uses the WxWidgets library and related |
390 |
# USE_WX - If set, this port uses the WxWidgets library and related |
391 |
# components. See bsd.wx.mk for more details. |
391 |
# components. See bsd.wx.mk for more details. |
392 |
## |
392 |
## |
393 |
# |
393 |
# |
394 |
# USE_QT4 - A list of the Qt 4 dependencies the port has (e.g, |
394 |
# USE_QT4 - A list of the Qt 4 dependencies the port has (e.g, |
395 |
# corelib, webkit). Implies that the port needs Qt. |
395 |
# corelib, webkit). Implies that the port needs Qt. |
396 |
# Implies the inclusion of bsd.qt.mk. See bsd.qt.mk |
396 |
# Implies the inclusion of bsd.qt.mk. See bsd.qt.mk |
397 |
# for more details. |
397 |
# for more details. |
398 |
# |
398 |
# |
399 |
# USE_QT5 - A list of the Qt 5 dependencies the port has (e.g, |
399 |
# USE_QT5 - A list of the Qt 5 dependencies the port has (e.g, |
400 |
# core, webkit). Implies that the port needs Qt. |
400 |
# core, webkit). Implies that the port needs Qt. |
401 |
# Implies the inclusion of bsd.qt.mk. See bsd.qt.mk |
401 |
# Implies the inclusion of bsd.qt.mk. See bsd.qt.mk |
402 |
# for more details. |
402 |
# for more details. |
403 |
## |
403 |
## |
404 |
# USE_LINUX_PREFIX |
404 |
# USE_LINUX_PREFIX |
405 |
# - Controls the action of PREFIX (see above). Only use this |
405 |
# - Controls the action of PREFIX (see above). Only use this |
406 |
# if the port is a Linux infrastructure port (e.g. contains libs |
406 |
# if the port is a Linux infrastructure port (e.g. contains libs |
407 |
# or a sound server which supports the FreeBSD native one), |
407 |
# or a sound server which supports the FreeBSD native one), |
408 |
# use the default prefix if it's a leaf port (e.g. a game or |
408 |
# use the default prefix if it's a leaf port (e.g. a game or |
409 |
# program). |
409 |
# program). |
410 |
# Implies NO_LICENSES_INSTALL=yes, NO_MTREE=yes, and causes |
410 |
# Implies NO_LICENSES_INSTALL=yes, NO_MTREE=yes, and causes |
411 |
# Linux ldconfig to be used when USE_LDCONFIG is defined. |
411 |
# Linux ldconfig to be used when USE_LDCONFIG is defined. |
412 |
## |
412 |
## |
413 |
# USE_XORG - Set to a list of X.org module dependencies. |
413 |
# USE_XORG - Set to a list of X.org module dependencies. |
414 |
# Implies inclusion of bsd.xorg.mk. |
414 |
# Implies inclusion of bsd.xorg.mk. |
415 |
## |
415 |
## |
416 |
# USE_TEX - A list of the TeX dependencies the port has. |
416 |
# USE_TEX - A list of the TeX dependencies the port has. |
417 |
# |
417 |
# |
418 |
## |
418 |
## |
419 |
# USE_RC_SUBR - If set, the ports startup/shutdown script uses the common |
419 |
# USE_RC_SUBR - If set, the ports startup/shutdown script uses the common |
420 |
# routines found in /etc/rc.subr. |
420 |
# routines found in /etc/rc.subr. |
421 |
# If this is set to a list of files, these files will be |
421 |
# If this is set to a list of files, these files will be |
422 |
# automatically added to ${SUB_FILES}, some %%VAR%%'s will |
422 |
# automatically added to ${SUB_FILES}, some %%VAR%%'s will |
423 |
# automatically be expanded, they will be installed in |
423 |
# automatically be expanded, they will be installed in |
424 |
# ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they |
424 |
# ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they |
425 |
# will be installed in /etc/rc.d/ and added to the packing list. |
425 |
# will be installed in /etc/rc.d/ and added to the packing list. |
426 |
## |
426 |
## |
427 |
# Conflict checking. Use if your port cannot be installed at the same time as |
427 |
# Conflict checking. Use if your port cannot be installed at the same time as |
428 |
# another package. |
428 |
# another package. |
429 |
# |
429 |
# |
430 |
# CONFLICTS - A list of package name patterns that the port conflicts |
430 |
# CONFLICTS - A list of package name patterns that the port conflicts |
431 |
# with, separated by blanks. The names may include shell |
431 |
# with, separated by blanks. The names may include shell |
432 |
# pattern meta-characters "*", "?", "[", "]", and "!". |
432 |
# pattern meta-characters "*", "?", "[", "]", and "!". |
433 |
# Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_* |
433 |
# Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_* |
434 |
# |
434 |
# |
435 |
# CONFLICTS_BUILD |
435 |
# CONFLICTS_BUILD |
436 |
# - Check conflict prior to the build. |
436 |
# - Check conflict prior to the build. |
437 |
# |
437 |
# |
438 |
# CONFLICTS_INSTALL |
438 |
# CONFLICTS_INSTALL |
439 |
# - Check conflict prior to the installation stage. |
439 |
# - Check conflict prior to the installation stage. |
440 |
# |
440 |
# |
441 |
# Various directory definitions and variables to control them. |
441 |
# Various directory definitions and variables to control them. |
442 |
# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. |
442 |
# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. |
443 |
# |
443 |
# |
444 |
# LOCALBASE - Where ports install things. |
444 |
# LOCALBASE - Where ports install things. |
445 |
# Default: /usr/local |
445 |
# Default: /usr/local |
446 |
# LINUXBASE - Where Linux ports install things. |
446 |
# LINUXBASE - Where Linux ports install things. |
447 |
# Default: /compat/linux |
447 |
# Default: /compat/linux |
448 |
# PREFIX - Where *this* port installs its files. |
448 |
# PREFIX - Where *this* port installs its files. |
449 |
# Default: ${LINUXBASE} if USE_LINUX_PREFIX is set, |
449 |
# Default: ${LINUXBASE} if USE_LINUX_PREFIX is set, |
450 |
# otherwise ${LOCALBASE} |
450 |
# otherwise ${LOCALBASE} |
451 |
# |
451 |
# |
452 |
# IGNORE_PATH_CHECKS |
452 |
# IGNORE_PATH_CHECKS |
453 |
# - There are some sanity checks against PREFIX. |
453 |
# - There are some sanity checks against PREFIX. |
454 |
# You can disable these checks with defining |
454 |
# You can disable these checks with defining |
455 |
# this variable, but this is not recommended! |
455 |
# this variable, but this is not recommended! |
456 |
# Only do this if you really know what you are |
456 |
# Only do this if you really know what you are |
457 |
# doing. These sanity checks are the following: |
457 |
# doing. These sanity checks are the following: |
458 |
# - PREFIX has to be an absolute path. |
458 |
# - PREFIX has to be an absolute path. |
459 |
# - PREFIX can't have a trailing slash. |
459 |
# - PREFIX can't have a trailing slash. |
460 |
# |
460 |
# |
461 |
# BUNDLE_LIBS Teach pkg(8) to not automatically add all shared libraries |
461 |
# BUNDLE_LIBS Teach pkg(8) to not automatically add all shared libraries |
462 |
# installed by a port as shared libraries "provided" for |
462 |
# installed by a port as shared libraries "provided" for |
463 |
# other packages (i.e., do not expose them in the solver). |
463 |
# other packages (i.e., do not expose them in the solver). |
464 |
# This has to be used for ports that bundle third party |
464 |
# This has to be used for ports that bundle third party |
465 |
# libraries for internal usage. |
465 |
# libraries for internal usage. |
466 |
# MASTERDIR - Where the port finds patches, package files, etc. Define |
466 |
# MASTERDIR - Where the port finds patches, package files, etc. Define |
467 |
# this is you have two or more ports that share most of the |
467 |
# this is you have two or more ports that share most of the |
468 |
# files. |
468 |
# files. |
469 |
# Default: ${.CURDIR} |
469 |
# Default: ${.CURDIR} |
470 |
# PORTSDIR - The root of the ports tree. |
470 |
# PORTSDIR - The root of the ports tree. |
471 |
# Default: /usr/ports |
471 |
# Default: /usr/ports |
472 |
# DISTDIR - Where to search for and store copies of original sources |
472 |
# DISTDIR - Where to search for and store copies of original sources |
473 |
# Default: ${PORTSDIR}/distfiles |
473 |
# Default: ${PORTSDIR}/distfiles |
474 |
# PACKAGES - A top level directory where all packages go (rather than |
474 |
# PACKAGES - A top level directory where all packages go (rather than |
475 |
# going locally to each port). |
475 |
# going locally to each port). |
476 |
# Default: ${PORTSDIR}/packages |
476 |
# Default: ${PORTSDIR}/packages |
477 |
# WRKDIRPREFIX - The place to root the temporary working directory |
477 |
# WRKDIRPREFIX - The place to root the temporary working directory |
478 |
# hierarchy. This path must *not* end in '/'. |
478 |
# hierarchy. This path must *not* end in '/'. |
479 |
# Default: none |
479 |
# Default: none |
480 |
# WRKDIR - A temporary working directory that gets *clobbered* on clean |
480 |
# WRKDIR - A temporary working directory that gets *clobbered* on clean |
481 |
# Default: ${WRKDIRPREFIX}${.CURDIR}/work |
481 |
# Default: ${WRKDIRPREFIX}${.CURDIR}/work |
482 |
# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually |
482 |
# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually |
483 |
# unpacks to. |
483 |
# unpacks to. |
484 |
# Default: ${WRKDIR}/${DISTNAME} |
484 |
# Default: ${WRKDIR}/${DISTNAME} |
485 |
# WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually |
485 |
# WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually |
486 |
# builds in. |
486 |
# builds in. |
487 |
# Default: not set |
487 |
# Default: not set |
488 |
# NO_WRKSUBDIR - Assume port unpacks without a subdirectory, and extract it in |
488 |
# NO_WRKSUBDIR - Assume port unpacks without a subdirectory, and extract it in |
489 |
# ${WRKSRC} instead of ${WRKDIR}. |
489 |
# ${WRKSRC} instead of ${WRKDIR}. |
490 |
# PATCHDIR - A directory containing any additional patches you made |
490 |
# PATCHDIR - A directory containing any additional patches you made |
491 |
# to port this software to FreeBSD. |
491 |
# to port this software to FreeBSD. |
492 |
# Default: ${MASTERDIR}/files |
492 |
# Default: ${MASTERDIR}/files |
493 |
# SCRIPTDIR - A directory containing any auxiliary scripts |
493 |
# SCRIPTDIR - A directory containing any auxiliary scripts |
494 |
# Default: ${MASTERDIR}/scripts |
494 |
# Default: ${MASTERDIR}/scripts |
495 |
# FILESDIR - A directory containing any miscellaneous additional files. |
495 |
# FILESDIR - A directory containing any miscellaneous additional files. |
496 |
# Default: ${MASTERDIR}/files |
496 |
# Default: ${MASTERDIR}/files |
497 |
# PKGDIR - A directory containing any package creation files. |
497 |
# PKGDIR - A directory containing any package creation files. |
498 |
# Default: ${MASTERDIR} |
498 |
# Default: ${MASTERDIR} |
499 |
# SRC_BASE - The root of the src tree. (Some ports require this to get |
499 |
# SRC_BASE - The root of the src tree. (Some ports require this to get |
500 |
# kernel sources). Default: /usr/src |
500 |
# kernel sources). Default: /usr/src |
501 |
# UID_FILES - A list of files containing information about registered UIDs. |
501 |
# UID_FILES - A list of files containing information about registered UIDs. |
502 |
# Note that files have decreasing priority. |
502 |
# Note that files have decreasing priority. |
503 |
# GID_FILES - A list of files containing information about registered GIDs. |
503 |
# GID_FILES - A list of files containing information about registered GIDs. |
504 |
# Note that files have decreasing priority. |
504 |
# Note that files have decreasing priority. |
505 |
# |
505 |
# |
506 |
# Variables that serve as convenient "aliases" for your *-install targets. |
506 |
# Variables that serve as convenient "aliases" for your *-install targets. |
507 |
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". |
507 |
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". |
508 |
# |
508 |
# |
509 |
# INSTALL_PROGRAM |
509 |
# INSTALL_PROGRAM |
510 |
# - A command to install binary executables. (By |
510 |
# - A command to install binary executables. (By |
511 |
# default, also strips them, unless ${STRIP} is |
511 |
# default, also strips them, unless ${STRIP} is |
512 |
# overridden to be the empty string). |
512 |
# overridden to be the empty string). |
513 |
# INSTALL_KLD - As INSTALL_PROGRAM, but without the STRIP. |
513 |
# INSTALL_KLD - As INSTALL_PROGRAM, but without the STRIP. |
514 |
# INSTALL_LIB - As INSTALL_DATA, but also strips the file. |
514 |
# INSTALL_LIB - As INSTALL_DATA, but also strips the file. |
515 |
# INSTALL_SCRIPT |
515 |
# INSTALL_SCRIPT |
516 |
# - A command to install executable scripts. |
516 |
# - A command to install executable scripts. |
517 |
# INSTALL_DATA - A command to install sharable data and static libs. |
517 |
# INSTALL_DATA - A command to install sharable data and static libs. |
518 |
# INSTALL_MAN - A command to install manpages and documentation. |
518 |
# INSTALL_MAN - A command to install manpages and documentation. |
519 |
# COPYTREE_BIN |
519 |
# COPYTREE_BIN |
520 |
# COPYTREE_SHARE |
520 |
# COPYTREE_SHARE |
521 |
# - Similiar to INSTALL_PROGRAM and INSTALL_DATA commands but |
521 |
# - Similiar to INSTALL_PROGRAM and INSTALL_DATA commands but |
522 |
# working on whole trees of directories, takes 3 arguments, |
522 |
# working on whole trees of directories, takes 3 arguments, |
523 |
# last one is find(1) arguments and optional. |
523 |
# last one is find(1) arguments and optional. |
524 |
# Example use: |
524 |
# Example use: |
525 |
# cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR} "! -name *\.bak" |
525 |
# cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR} "! -name *\.bak" |
526 |
# |
526 |
# |
527 |
# Installs all directories and files from ${WRKSRC}/doc |
527 |
# Installs all directories and files from ${WRKSRC}/doc |
528 |
# to ${DOCSDIR} except sed(1) backup files. |
528 |
# to ${DOCSDIR} except sed(1) backup files. |
529 |
# |
529 |
# |
530 |
# MANPREFIX - The directory prefix for manual pages. |
530 |
# MANPREFIX - The directory prefix for manual pages. |
531 |
# Default: ${PREFIX} |
531 |
# Default: ${PREFIX} |
532 |
# MAN<sect>PREFIX |
532 |
# MAN<sect>PREFIX |
533 |
# - If manual pages of some sections install in different |
533 |
# - If manual pages of some sections install in different |
534 |
# locations than others, use these. |
534 |
# locations than others, use these. |
535 |
# Default: ${MANPREFIX} |
535 |
# Default: ${MANPREFIX} |
536 |
# |
536 |
# |
537 |
# Set the following to specify all .info files your port installs. |
537 |
# Set the following to specify all .info files your port installs. |
538 |
# |
538 |
# |
539 |
# INFO - A list of .info files (omitting the trailing ".info"); |
539 |
# INFO - A list of .info files (omitting the trailing ".info"); |
540 |
# only one entry per document! These files are listed in |
540 |
# only one entry per document! These files are listed in |
541 |
# the path relative to ${INFO_PATH}. |
541 |
# the path relative to ${INFO_PATH}. |
542 |
# INFO_PATH - Path, where all .info files will be installed by your |
542 |
# INFO_PATH - Path, where all .info files will be installed by your |
543 |
# port, relative to ${PREFIX} |
543 |
# port, relative to ${PREFIX} |
544 |
# |
544 |
# |
545 |
# Set the following to specify all documentation your port installs into |
545 |
# Set the following to specify all documentation your port installs into |
546 |
# ${DOCSDIR} |
546 |
# ${DOCSDIR} |
547 |
# |
547 |
# |
548 |
# PORTDOCS - A list of files and directories relative to DOCSDIR. |
548 |
# PORTDOCS - A list of files and directories relative to DOCSDIR. |
549 |
# Shell glob patterns can be used, directories include |
549 |
# Shell glob patterns can be used, directories include |
550 |
# the entire subtree of contained files and directories. |
550 |
# the entire subtree of contained files and directories. |
551 |
# Should not be set when no documentation files are |
551 |
# Should not be set when no documentation files are |
552 |
# installed. |
552 |
# installed. |
553 |
# Useful for dynamically generated documentation. |
553 |
# Useful for dynamically generated documentation. |
554 |
# |
554 |
# |
555 |
# Set the following to specify all documentation your port installs into |
555 |
# Set the following to specify all documentation your port installs into |
556 |
# ${EXAMPLESDIR} |
556 |
# ${EXAMPLESDIR} |
557 |
# |
557 |
# |
558 |
# PORTEXAMPLES - A list of files and directories relative to EXAMPLESDIR. |
558 |
# PORTEXAMPLES - A list of files and directories relative to EXAMPLESDIR. |
559 |
# Shell glob patterns can be used, directories include |
559 |
# Shell glob patterns can be used, directories include |
560 |
# the entire subtree of contained files and directories. |
560 |
# the entire subtree of contained files and directories. |
561 |
# Should not be set when no examples files are |
561 |
# Should not be set when no examples files are |
562 |
# installed. |
562 |
# installed. |
563 |
# Useful for dynamically generated examples. |
563 |
# Useful for dynamically generated examples. |
564 |
# |
564 |
# |
565 |
# Set the following to specify all files and directories your port installs into |
565 |
# Set the following to specify all files and directories your port installs into |
566 |
# ${DATADIR} |
566 |
# ${DATADIR} |
567 |
# |
567 |
# |
568 |
# PORTDATA - A list of files and directories relative to DATADIR. |
568 |
# PORTDATA - A list of files and directories relative to DATADIR. |
569 |
# Shell glob patterns can be used, directories include |
569 |
# Shell glob patterns can be used, directories include |
570 |
# the entire subtree of contained files and directories. |
570 |
# the entire subtree of contained files and directories. |
571 |
# Should not be set when no data files are |
571 |
# Should not be set when no data files are |
572 |
# installed. |
572 |
# installed. |
573 |
# Useful for dynamically generated data files. |
573 |
# Useful for dynamically generated data files. |
574 |
# |
574 |
# |
575 |
# Default targets and their behaviors: |
575 |
# Default targets and their behaviors: |
576 |
# |
576 |
# |
577 |
# fetch - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
577 |
# fetch - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
578 |
# port. |
578 |
# port. |
579 |
# fetch-list - Show list of commands to retrieve missing ${DISTFILES} and |
579 |
# fetch-list - Show list of commands to retrieve missing ${DISTFILES} and |
580 |
# ${PATCHFILES} for this port. |
580 |
# ${PATCHFILES} for this port. |
581 |
# fetch-recursive |
581 |
# fetch-recursive |
582 |
# - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
582 |
# - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
583 |
# port and dependencies. |
583 |
# port and dependencies. |
584 |
# fetch-recursive-list |
584 |
# fetch-recursive-list |
585 |
# - Show list of commands to retrieve missing ${DISTFILES} and |
585 |
# - Show list of commands to retrieve missing ${DISTFILES} and |
586 |
# ${PATCHFILES} for this port and dependencies. |
586 |
# ${PATCHFILES} for this port and dependencies. |
587 |
# fetch-required |
587 |
# fetch-required |
588 |
# - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
588 |
# - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this |
589 |
# port and dependencies. |
589 |
# port and dependencies. |
590 |
# fetch-required-list |
590 |
# fetch-required-list |
591 |
# - Show list of commands to retrieve missing ${DISTFILES} and |
591 |
# - Show list of commands to retrieve missing ${DISTFILES} and |
592 |
# ${PATCHFILES} for this port and dependencies. |
592 |
# ${PATCHFILES} for this port and dependencies. |
593 |
# fetch-url-list |
593 |
# fetch-url-list |
594 |
# - Show list of URLS to retrieve missing ${DISTFILES} and |
594 |
# - Show list of URLS to retrieve missing ${DISTFILES} and |
595 |
# ${PATCHFILES} for this port. |
595 |
# ${PATCHFILES} for this port. |
596 |
# fetch-urlall-list |
596 |
# fetch-urlall-list |
597 |
# - Show list of URLS to retrieve ${DISTFILES} and |
597 |
# - Show list of URLS to retrieve ${DISTFILES} and |
598 |
# ${PATCHFILES} for this port. |
598 |
# ${PATCHFILES} for this port. |
599 |
# |
599 |
# |
600 |
# all-depends-list |
600 |
# all-depends-list |
601 |
# - Show all directories which are dependencies |
601 |
# - Show all directories which are dependencies |
602 |
# for this port. |
602 |
# for this port. |
603 |
# build-depends-list |
603 |
# build-depends-list |
604 |
# - Show all directories which are build-dependencies |
604 |
# - Show all directories which are build-dependencies |
605 |
# for this port. |
605 |
# for this port. |
606 |
# package-depends-list |
606 |
# package-depends-list |
607 |
# - Show all directories which are package-dependencies |
607 |
# - Show all directories which are package-dependencies |
608 |
# for this port. This is based upon the dependency |
608 |
# for this port. This is based upon the dependency |
609 |
# tree as recorded in the Makefiles of the ports |
609 |
# tree as recorded in the Makefiles of the ports |
610 |
# collection, not as recorded in the currently |
610 |
# collection, not as recorded in the currently |
611 |
# installed ports. |
611 |
# installed ports. |
612 |
# actual-package-depends |
612 |
# actual-package-depends |
613 |
# - Like package-depends-list but with the difference |
613 |
# - Like package-depends-list but with the difference |
614 |
# that the dependencies of the currently installed |
614 |
# that the dependencies of the currently installed |
615 |
# ports are used instead of the dependencies as |
615 |
# ports are used instead of the dependencies as |
616 |
# recorded in the ports collection. |
616 |
# recorded in the ports collection. |
617 |
# run-depends-list |
617 |
# run-depends-list |
618 |
# - Show all directories which are run-dependencies |
618 |
# - Show all directories which are run-dependencies |
619 |
# for this port. |
619 |
# for this port. |
620 |
# test-depends-list |
620 |
# test-depends-list |
621 |
# - Show all directories which are test-dependencies |
621 |
# - Show all directories which are test-dependencies |
622 |
# for this port. |
622 |
# for this port. |
623 |
# |
623 |
# |
624 |
# extract - Unpacks ${DISTFILES} into ${WRKDIR}. |
624 |
# extract - Unpacks ${DISTFILES} into ${WRKDIR}. |
625 |
# patch - Apply any provided patches to the source. |
625 |
# patch - Apply any provided patches to the source. |
626 |
# configure - Runs either GNU configure, one or more local configure |
626 |
# configure - Runs either GNU configure, one or more local configure |
627 |
# scripts or nothing, depending on what's available. |
627 |
# scripts or nothing, depending on what's available. |
628 |
# build - Actually compile the sources. |
628 |
# build - Actually compile the sources. |
629 |
# install - Install the results of a build. |
629 |
# install - Install the results of a build. |
630 |
# reinstall - Install the results of a build, ignoring "already installed" |
630 |
# reinstall - Install the results of a build, ignoring "already installed" |
631 |
# flag. |
631 |
# flag. |
632 |
# deinstall - Remove the installation. |
632 |
# deinstall - Remove the installation. |
633 |
# deinstall-all - Remove all installations with the same PKGORIGIN. |
633 |
# deinstall-all - Remove all installations with the same PKGORIGIN. |
634 |
# test - Run tests for the port. |
634 |
# test - Run tests for the port. |
635 |
# package - Create a package from an _installed_ port. |
635 |
# package - Create a package from an _installed_ port. |
636 |
# package-recursive |
636 |
# package-recursive |
637 |
# - Create a package for a port and _all_ of its dependencies. |
637 |
# - Create a package for a port and _all_ of its dependencies. |
638 |
# describe - Try to generate a one-line description for each port for |
638 |
# describe - Try to generate a one-line description for each port for |
639 |
# use in INDEX files and the like. |
639 |
# use in INDEX files and the like. |
640 |
# check-plist - Checks for files missing from the plist, and files in the plist |
640 |
# check-plist - Checks for files missing from the plist, and files in the plist |
641 |
# that are not installed by the port. |
641 |
# that are not installed by the port. |
642 |
# check-sanity - Perform some basic checks of the port layout. |
642 |
# check-sanity - Perform some basic checks of the port layout. |
643 |
# checkpatch - Do a "patch -C" instead of a "patch". Note that it may |
643 |
# checkpatch - Do a "patch -C" instead of a "patch". Note that it may |
644 |
# give incorrect results if multiple patches deal with |
644 |
# give incorrect results if multiple patches deal with |
645 |
# the same file. |
645 |
# the same file. |
646 |
# checksum - Use distinfo to ensure that your distfiles are valid. |
646 |
# checksum - Use distinfo to ensure that your distfiles are valid. |
647 |
# checksum-recursive |
647 |
# checksum-recursive |
648 |
# - Run checksum in this port and all dependencies. |
648 |
# - Run checksum in this port and all dependencies. |
649 |
# makesum - Generate distinfo (only do this for your own ports!). |
649 |
# makesum - Generate distinfo (only do this for your own ports!). |
650 |
# clean - Remove ${WRKDIR} and other temporary files used for building. |
650 |
# clean - Remove ${WRKDIR} and other temporary files used for building. |
651 |
# clean-depends - Do a "make clean" for all dependencies. |
651 |
# clean-depends - Do a "make clean" for all dependencies. |
652 |
# config - Configure options for this port (using ${DIALOG}). |
652 |
# config - Configure options for this port (using ${DIALOG}). |
653 |
# Automatically run prior to extract, patch, configure, build, |
653 |
# Automatically run prior to extract, patch, configure, build, |
654 |
# install, and package. |
654 |
# install, and package. |
655 |
# config-recursive |
655 |
# config-recursive |
656 |
# - Configure options for this port for a port and all its |
656 |
# - Configure options for this port for a port and all its |
657 |
# dependencies. |
657 |
# dependencies. |
658 |
# showconfig - Display options config for this port. |
658 |
# showconfig - Display options config for this port. |
659 |
# showconfig-recursive |
659 |
# showconfig-recursive |
660 |
# - Display options config for this port and all its |
660 |
# - Display options config for this port and all its |
661 |
# dependencies. |
661 |
# dependencies. |
662 |
# rmconfig - Remove the options config for this port. |
662 |
# rmconfig - Remove the options config for this port. |
663 |
# rmconfig-recursive |
663 |
# rmconfig-recursive |
664 |
# - Remove the options config for this port and all its |
664 |
# - Remove the options config for this port and all its |
665 |
# dependencies. |
665 |
# dependencies. |
666 |
# |
666 |
# |
667 |
# Default sequence for "all" is: |
667 |
# Default sequence for "all" is: |
668 |
# |
668 |
# |
669 |
# check-sanity fetch checksum extract patch configure build |
669 |
# check-sanity fetch checksum extract patch configure build |
670 |
# |
670 |
# |
671 |
# Please read the comments in the targets section below; you |
671 |
# Please read the comments in the targets section below; you |
672 |
# should be able to use the pre-* or post-* targets/scripts |
672 |
# should be able to use the pre-* or post-* targets/scripts |
673 |
# (which are available for every stage except checksum) or |
673 |
# (which are available for every stage except checksum) or |
674 |
# override the do-* targets to do pretty much anything you want. |
674 |
# override the do-* targets to do pretty much anything you want. |
675 |
# |
675 |
# |
676 |
# The TARGET_ORDER_OVERRIDE variable can be set to multiple <priority>:<target> |
676 |
# The TARGET_ORDER_OVERRIDE variable can be set to multiple <priority>:<target> |
677 |
# to change the ordering of targets, have a look at the _SEQ variables at the |
677 |
# to change the ordering of targets, have a look at the _SEQ variables at the |
678 |
# end of this file for the default order and priorities. |
678 |
# end of this file for the default order and priorities. |
679 |
# |
679 |
# |
680 |
# NEVER override the "regular" targets unless you want to open |
680 |
# NEVER override the "regular" targets unless you want to open |
681 |
# a major can of worms. |
681 |
# a major can of worms. |
682 |
# |
682 |
# |
683 |
# Set these variables if your port doesn't need some of the steps. |
683 |
# Set these variables if your port doesn't need some of the steps. |
684 |
# Note that there are no NO_PATCH or NO_CONFIGURE variables because |
684 |
# Note that there are no NO_PATCH or NO_CONFIGURE variables because |
685 |
# those steps are empty by default. NO_EXTRACT is not allowed anymore |
685 |
# those steps are empty by default. NO_EXTRACT is not allowed anymore |
686 |
# since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user |
686 |
# since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user |
687 |
# variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. |
687 |
# variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. |
688 |
# |
688 |
# |
689 |
# NO_BUILD - Use a dummy (do-nothing) build target. |
689 |
# NO_BUILD - Use a dummy (do-nothing) build target. |
690 |
# NO_INSTALL - Use a dummy (do-nothing) install target. |
690 |
# NO_INSTALL - Use a dummy (do-nothing) install target. |
691 |
# NO_TEST - Use a dummy (do-nothing) test target. |
691 |
# NO_TEST - Use a dummy (do-nothing) test target. |
692 |
# |
692 |
# |
693 |
# Here are some variables used in various stages. |
693 |
# Here are some variables used in various stages. |
694 |
# |
694 |
# |
695 |
# For options see bsd.options.mk |
695 |
# For options see bsd.options.mk |
696 |
# |
696 |
# |
697 |
# For fetch: |
697 |
# For fetch: |
698 |
# |
698 |
# |
699 |
# FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. |
699 |
# FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. |
700 |
# Default: "/usr/bin/fetch" |
700 |
# Default: "/usr/bin/fetch" |
701 |
# FETCH_ARGS - Arguments to ftp/http fetch command. |
701 |
# FETCH_ARGS - Arguments to ftp/http fetch command. |
702 |
# Default: "-Fpr" |
702 |
# Default: "-Fpr" |
703 |
# FETCH_CMD - ftp/http fetch command. |
703 |
# FETCH_CMD - ftp/http fetch command. |
704 |
# Default: ${FETCH_BINARY} ${FETCH_ARGS} |
704 |
# Default: ${FETCH_BINARY} ${FETCH_ARGS} |
705 |
# FETCH_BEFORE_ARGS |
705 |
# FETCH_BEFORE_ARGS |
706 |
# - Arguments to ${FETCH_CMD} before filename. |
706 |
# - Arguments to ${FETCH_CMD} before filename. |
707 |
# Default: none |
707 |
# Default: none |
708 |
# FETCH_AFTER_ARGS |
708 |
# FETCH_AFTER_ARGS |
709 |
# - Arguments to ${FETCH_CMD} following filename. |
709 |
# - Arguments to ${FETCH_CMD} following filename. |
710 |
# Default: none |
710 |
# Default: none |
711 |
# FETCH_ENV - Environment to pass to ${FETCH_CMD}. |
711 |
# FETCH_ENV - Environment to pass to ${FETCH_CMD}. |
712 |
# Default: none |
712 |
# Default: none |
713 |
# FETCH_REGET - Times to retry fetching of files on checksum errors. |
713 |
# FETCH_REGET - Times to retry fetching of files on checksum errors. |
714 |
# Default: 1 |
714 |
# Default: 1 |
715 |
# CLEAN_FETCH_ENV |
715 |
# CLEAN_FETCH_ENV |
716 |
# - Disable package dependency in fetch target for mass |
716 |
# - Disable package dependency in fetch target for mass |
717 |
# fetching. User settable. |
717 |
# fetching. User settable. |
718 |
# |
718 |
# |
719 |
# For extract: |
719 |
# For extract: |
720 |
# |
720 |
# |
721 |
# EXTRACT_CMD - Command for extracting archive |
721 |
# EXTRACT_CMD - Command for extracting archive |
722 |
# Default: ${TAR} |
722 |
# Default: ${TAR} |
723 |
# EXTRACT_BEFORE_ARGS |
723 |
# EXTRACT_BEFORE_ARGS |
724 |
# - Arguments to ${EXTRACT_CMD} before filename. |
724 |
# - Arguments to ${EXTRACT_CMD} before filename. |
725 |
# Default: "-xf" |
725 |
# Default: "-xf" |
726 |
# EXTRACT_AFTER_ARGS |
726 |
# EXTRACT_AFTER_ARGS |
727 |
# - Arguments to ${EXTRACT_CMD} following filename. |
727 |
# - Arguments to ${EXTRACT_CMD} following filename. |
728 |
# Default: "--no-same-owner --no-same-permissions" |
728 |
# Default: "--no-same-owner --no-same-permissions" |
729 |
# For patch: |
729 |
# For patch: |
730 |
# |
730 |
# |
731 |
# EXTRA_PATCHES - Define this variable if you have patches not in |
731 |
# EXTRA_PATCHES - Define this variable if you have patches not in |
732 |
# ${PATCHDIR}. This usually happens when you need to |
732 |
# ${PATCHDIR}. This usually happens when you need to |
733 |
# do some pre-processing before some distribution |
733 |
# do some pre-processing before some distribution |
734 |
# patches can be applied. In that case, fetch them as |
734 |
# patches can be applied. In that case, fetch them as |
735 |
# extra distfiles, put the processed results in |
735 |
# extra distfiles, put the processed results in |
736 |
# ${WRKDIR}, then point EXTRA_PATCHES to them. |
736 |
# ${WRKDIR}, then point EXTRA_PATCHES to them. |
737 |
# The patches specified by this variable will be |
737 |
# The patches specified by this variable will be |
738 |
# applied after the normal distribution patches but |
738 |
# applied after the normal distribution patches but |
739 |
# before those in ${PATCHDIR}. This can also contain |
739 |
# before those in ${PATCHDIR}. This can also contain |
740 |
# directories, all the files named patch-* in those directories |
740 |
# directories, all the files named patch-* in those directories |
741 |
# will be applied. |
741 |
# will be applied. |
742 |
# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches |
742 |
# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches |
743 |
# Points to a directory hierarchy with the same layout |
743 |
# Points to a directory hierarchy with the same layout |
744 |
# as the ports tree, where local patches can be found. |
744 |
# as the ports tree, where local patches can be found. |
745 |
# This allows a third party to keep their patches in |
745 |
# This allows a third party to keep their patches in |
746 |
# some other source control system if needed. |
746 |
# some other source control system if needed. |
747 |
# PATCH_WRKSRC - Directory to apply patches in. |
747 |
# PATCH_WRKSRC - Directory to apply patches in. |
748 |
# Default: ${WRKSRC} |
748 |
# Default: ${WRKSRC} |
749 |
# |
749 |
# |
750 |
# For configure: |
750 |
# For configure: |
751 |
# |
751 |
# |
752 |
# HAS_CONFIGURE - If set, this port has its own configure script. The |
752 |
# HAS_CONFIGURE - If set, this port has its own configure script. The |
753 |
# configure stage will not do anything if this is not set. |
753 |
# configure stage will not do anything if this is not set. |
754 |
# GNU_CONFIGURE - If set, you are using GNU configure (optional). Implies |
754 |
# GNU_CONFIGURE - If set, you are using GNU configure (optional). Implies |
755 |
# HAS_CONFIGURE. |
755 |
# HAS_CONFIGURE. |
756 |
# CONFIGURE_OUTSOURCE - If set, this port builds in an empty ${CONFIGURE_WRKSRC} |
756 |
# CONFIGURE_OUTSOURCE - If set, this port builds in an empty ${CONFIGURE_WRKSRC} |
757 |
# not being under ${WRKSRC}. |
757 |
# not being under ${WRKSRC}. |
758 |
# CONFIGURE_WRKSRC |
758 |
# CONFIGURE_WRKSRC |
759 |
# - Directory to run configure in. |
759 |
# - Directory to run configure in. |
760 |
# Default: ${WRKSRC} |
760 |
# Default: ${WRKSRC} |
761 |
# CONFIGURE_SCRIPT |
761 |
# CONFIGURE_SCRIPT |
762 |
# - Name of configure script, relative to ${CONFIGURE_WRKSRC}. |
762 |
# - Name of configure script, relative to ${CONFIGURE_WRKSRC}. |
763 |
# Default: "Makefile.PL" if USES=perl5 and USE_PERL5=configure |
763 |
# Default: "Makefile.PL" if USES=perl5 and USE_PERL5=configure |
764 |
# are set, "configure" otherwise. |
764 |
# are set, "configure" otherwise. |
765 |
# CONFIGURE_TARGET |
765 |
# CONFIGURE_TARGET |
766 |
# - The name of target to call when GNU_CONFIGURE is |
766 |
# - The name of target to call when GNU_CONFIGURE is |
767 |
# defined. |
767 |
# defined. |
768 |
# Default: ${ARCH}-portbld-${OPSYS:tl}${OSREL} |
768 |
# Default: ${ARCH}-portbld-${OPSYS:tl}${OSREL} |
769 |
# GNU_CONFIGURE_PREFIX |
769 |
# GNU_CONFIGURE_PREFIX |
770 |
# - The directory passed as prefix to the configure script if |
770 |
# - The directory passed as prefix to the configure script if |
771 |
# GNU_CONFIGURE is set. |
771 |
# GNU_CONFIGURE is set. |
772 |
# Default: ${PREFIX} |
772 |
# Default: ${PREFIX} |
773 |
# CONFIGURE_ARGS |
773 |
# CONFIGURE_ARGS |
774 |
# - Pass these args to configure if ${HAS_CONFIGURE} is set. |
774 |
# - Pass these args to configure if ${HAS_CONFIGURE} is set. |
775 |
# Default: "--prefix=${GNU_CONFIGURE_PREFIX} |
775 |
# Default: "--prefix=${GNU_CONFIGURE_PREFIX} |
776 |
# --infodir=${PREFIX}/${INFO_PATH} --localstatedir=/var |
776 |
# --infodir=${PREFIX}/${INFO_PATH} --localstatedir=/var |
777 |
# --mandir=${MANPREFIX}/man --build=${CONFIGURE_TARGET}" if |
777 |
# --mandir=${MANPREFIX}/man --build=${CONFIGURE_TARGET}" if |
778 |
# GNU_CONFIGURE is set, "CC=${CC} CFLAGS=${CFLAGS} |
778 |
# GNU_CONFIGURE is set, "CC=${CC} CFLAGS=${CFLAGS} |
779 |
# PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib |
779 |
# PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib |
780 |
# INSTALLARCHLIB=${PREFIX}/lib" if USES=perl5 and |
780 |
# INSTALLARCHLIB=${PREFIX}/lib" if USES=perl5 and |
781 |
# USE_PERL5=configure are set, empty otherwise. |
781 |
# USE_PERL5=configure are set, empty otherwise. |
782 |
# CONFIGURE_ENV - Pass these env (shell-like) to configure if |
782 |
# CONFIGURE_ENV - Pass these env (shell-like) to configure if |
783 |
# ${HAS_CONFIGURE} is set. |
783 |
# ${HAS_CONFIGURE} is set. |
784 |
# CONFIGURE_LOG - The name of configure log file. It will be printed to |
784 |
# CONFIGURE_LOG - The name of configure log file. It will be printed to |
785 |
# the screen if configure fails. |
785 |
# the screen if configure fails. |
786 |
# Default: config.log |
786 |
# Default: config.log |
787 |
# CONFIGURE_FAIL_MESSAGE |
787 |
# CONFIGURE_FAIL_MESSAGE |
788 |
# - A message displayed to users when configure |
788 |
# - A message displayed to users when configure |
789 |
# fails (note: this assumes the do-configure |
789 |
# fails (note: this assumes the do-configure |
790 |
# target has not been overwritten). This message |
790 |
# target has not been overwritten). This message |
791 |
# will be passed through /usr/bin/fmt before |
791 |
# will be passed through /usr/bin/fmt before |
792 |
# being shown to the user. |
792 |
# being shown to the user. |
793 |
# |
793 |
# |
794 |
# WITHOUT_FBSD10_FIX Disable FreeBSD 10.0 autotools workaround. |
794 |
# WITHOUT_FBSD10_FIX Disable FreeBSD 10.0 autotools workaround. |
795 |
# |
795 |
# |
796 |
# For build and install: |
796 |
# For build and install: |
797 |
# |
797 |
# |
798 |
# MAKEFILE - Name of the makefile. |
798 |
# MAKEFILE - Name of the makefile. |
799 |
# Default: Makefile |
799 |
# Default: Makefile |
800 |
# ALL_TARGET - Default target for sub-make in build stage. |
800 |
# ALL_TARGET - Default target for sub-make in build stage. |
801 |
# Default: all |
801 |
# Default: all |
802 |
# BUILD_WRKSRC - Directory to do build in (default: ${WRKSRC}). |
802 |
# BUILD_WRKSRC - Directory to do build in (default: ${WRKSRC}). |
803 |
# MAKE_ENV - Additional environment vars passed to sub-make in build |
803 |
# MAKE_ENV - Additional environment vars passed to sub-make in build |
804 |
# and install stages. |
804 |
# and install stages. |
805 |
# Default: see below |
805 |
# Default: see below |
806 |
# MAKE_ARGS - Any extra arguments to sub-make in build and install stages. |
806 |
# MAKE_ARGS - Any extra arguments to sub-make in build and install stages. |
807 |
# Default: none |
807 |
# Default: none |
808 |
## |
808 |
## |
809 |
# MAKE_JOBS_UNSAFE |
809 |
# MAKE_JOBS_UNSAFE |
810 |
# - Disallow multiple jobs even when user set a global override. |
810 |
# - Disallow multiple jobs even when user set a global override. |
811 |
# To be used with known bad ports. |
811 |
# To be used with known bad ports. |
812 |
# DISABLE_MAKE_JOBS |
812 |
# DISABLE_MAKE_JOBS |
813 |
# - Set to disable the multiple jobs feature. User settable. |
813 |
# - Set to disable the multiple jobs feature. User settable. |
814 |
# MAKE_JOBS_NUMBER |
814 |
# MAKE_JOBS_NUMBER |
815 |
# - Override the number of make jobs to be used. User settable. |
815 |
# - Override the number of make jobs to be used. User settable. |
816 |
# MAKE_JOBS_NUMBER_LIMIT |
816 |
# MAKE_JOBS_NUMBER_LIMIT |
817 |
# - Set a limit for maximum number of make jobs allowed to be |
817 |
# - Set a limit for maximum number of make jobs allowed to be |
818 |
# used. |
818 |
# used. |
819 |
## cacche |
819 |
## cacche |
820 |
# |
820 |
# |
821 |
# WITH_CCACHE_BUILD |
821 |
# WITH_CCACHE_BUILD |
822 |
# - Enable CCACHE support (devel/ccache). User settable. |
822 |
# - Enable CCACHE support (devel/ccache). User settable. |
823 |
# CCACHE_DIR |
823 |
# CCACHE_DIR |
824 |
# - Which directory to use for ccache (default: $HOME/.ccache) |
824 |
# - Which directory to use for ccache (default: $HOME/.ccache) |
825 |
# NO_CCACHE |
825 |
# NO_CCACHE |
826 |
# - Disable CCACHE support for example for certain ports if |
826 |
# - Disable CCACHE support for example for certain ports if |
827 |
# CCACHE is enabled. User settable. |
827 |
# CCACHE is enabled. User settable. |
828 |
# |
828 |
# |
829 |
# For test: |
829 |
# For test: |
830 |
# |
830 |
# |
831 |
# TEST_TARGET - Target for sub-make in test stage. If not defined, |
831 |
# TEST_TARGET - Target for sub-make in test stage. If not defined, |
832 |
# no default test target is provided. |
832 |
# no default test target is provided. |
833 |
# Default: (none) |
833 |
# Default: (none) |
834 |
# TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). |
834 |
# TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). |
835 |
# TEST_ENV - Additional environment vars passed to sub-make in test |
835 |
# TEST_ENV - Additional environment vars passed to sub-make in test |
836 |
# stage |
836 |
# stage |
837 |
# Default: ${MAKE_ENV} |
837 |
# Default: ${MAKE_ENV} |
838 |
# TEST_ARGS - Any extra arguments to sub-make in test stage |
838 |
# TEST_ARGS - Any extra arguments to sub-make in test stage |
839 |
# Default: ${MAKE_ARGS} |
839 |
# Default: ${MAKE_ARGS} |
840 |
# |
840 |
# |
841 |
# For install: |
841 |
# For install: |
842 |
# |
842 |
# |
843 |
# INSTALL_TARGET |
843 |
# INSTALL_TARGET |
844 |
# - Default target for sub-make in install stage. |
844 |
# - Default target for sub-make in install stage. |
845 |
# Default: install |
845 |
# Default: install |
846 |
# INSTALL_WRKSRC |
846 |
# INSTALL_WRKSRC |
847 |
# - Directory to install from |
847 |
# - Directory to install from |
848 |
# Default: ${WRKSRC} |
848 |
# Default: ${WRKSRC} |
849 |
# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from |
849 |
# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from |
850 |
# the "install" target. |
850 |
# the "install" target. |
851 |
# MTREE_FILE - The name of the mtree file. |
851 |
# MTREE_FILE - The name of the mtree file. |
852 |
# Default: ${PORTSDIR}/Templates/BSD.local.dist or |
852 |
# Default: ${PORTSDIR}/Templates/BSD.local.dist or |
853 |
# /etc/mtree/BSD.usr.dist if ${PREFIX} == "/usr". |
853 |
# /etc/mtree/BSD.usr.dist if ${PREFIX} == "/usr". |
854 |
# PLIST_DIRS - Directories to be added to packing list |
854 |
# PLIST_DIRS - Directories to be added to packing list |
855 |
# PLIST_FILES - Files and symbolic links to be added to packing list |
855 |
# PLIST_FILES - Files and symbolic links to be added to packing list |
856 |
# |
856 |
# |
857 |
# PLIST - Name of the `packing list' file. |
857 |
# PLIST - Name of the `packing list' file. |
858 |
# Change this to ${WRKDIR}/PLIST or something if you |
858 |
# Change this to ${WRKDIR}/PLIST or something if you |
859 |
# need to write to it. (It is not a good idea for a port |
859 |
# need to write to it. (It is not a good idea for a port |
860 |
# to write to any file outside ${WRKDIR} during a normal |
860 |
# to write to any file outside ${WRKDIR} during a normal |
861 |
# build.) |
861 |
# build.) |
862 |
# Default: ${PKGDIR}/pkg-plist |
862 |
# Default: ${PKGDIR}/pkg-plist |
863 |
# TMPPLIST - Name of the `packing list' file after processing |
863 |
# TMPPLIST - Name of the `packing list' file after processing |
864 |
# Default: ${WRKDIR}/.PLIST.mktmp |
864 |
# Default: ${WRKDIR}/.PLIST.mktmp |
865 |
# PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST} |
865 |
# PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST} |
866 |
# Default: see below |
866 |
# Default: see below |
867 |
# |
867 |
# |
868 |
# SUB_FILES - Files that should be passed through sed(1) and redirected to |
868 |
# SUB_FILES - Files that should be passed through sed(1) and redirected to |
869 |
# ${WRKDIR}. |
869 |
# ${WRKDIR}. |
870 |
# - For each file specified in SUB_FILES, there must be a |
870 |
# - For each file specified in SUB_FILES, there must be a |
871 |
# corresponding file in ${FILESDIR} whose suffix is ".in". For |
871 |
# corresponding file in ${FILESDIR} whose suffix is ".in". For |
872 |
# instance, if the Makefile specifies "SUB_FILES= pkg-message" |
872 |
# instance, if the Makefile specifies "SUB_FILES= pkg-message" |
873 |
# then there must be a file called pkg-message.in in |
873 |
# then there must be a file called pkg-message.in in |
874 |
# ${FILESDIR}. |
874 |
# ${FILESDIR}. |
875 |
# - The substitution process is the same as PLIST_FILES, as |
875 |
# - The substitution process is the same as PLIST_FILES, as |
876 |
# described below except that any line beginning with @comment |
876 |
# described below except that any line beginning with @comment |
877 |
# is deleted. |
877 |
# is deleted. |
878 |
# SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} |
878 |
# SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} |
879 |
# Some pairs are added by default: eg. PREFIX=${PREFIX} |
879 |
# Some pairs are added by default: eg. PREFIX=${PREFIX} |
880 |
# |
880 |
# |
881 |
# USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of |
881 |
# USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of |
882 |
# directories to be searched for shared libraries. |
882 |
# directories to be searched for shared libraries. |
883 |
# Otherwise, this is a list of directories to be added to that |
883 |
# Otherwise, this is a list of directories to be added to that |
884 |
# list. The directory names are written to |
884 |
# list. The directory names are written to |
885 |
# ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then |
885 |
# ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then |
886 |
# used by the ldconfig startup script. |
886 |
# used by the ldconfig startup script. |
887 |
# This mechanism replaces ldconfig scripts installed by some |
887 |
# This mechanism replaces ldconfig scripts installed by some |
888 |
# ports, often under such names as 000.${UNQUENAME}.sh. |
888 |
# ports, often under such names as 000.${UNQUENAME}.sh. |
889 |
# If USE_LINUX_PREFIX is defined, the Linux version of |
889 |
# If USE_LINUX_PREFIX is defined, the Linux version of |
890 |
# ldconfig will be used instead of the native FreeBSD |
890 |
# ldconfig will be used instead of the native FreeBSD |
891 |
# version, and the directory list given will be ignored. |
891 |
# version, and the directory list given will be ignored. |
892 |
# USE_LDCONFIG32 |
892 |
# USE_LDCONFIG32 |
893 |
# - Same as USE_LDCONFIG but the target file is |
893 |
# - Same as USE_LDCONFIG but the target file is |
894 |
# ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead. |
894 |
# ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead. |
895 |
# Note: that should only be used on 64-bit architectures. |
895 |
# Note: that should only be used on 64-bit architectures. |
896 |
# |
896 |
# |
897 |
# DOCSDIR - Name of the directory to install the packages docs in. |
897 |
# DOCSDIR - Name of the directory to install the packages docs in. |
898 |
# Default: ${PREFIX}/share/doc/${PORTNAME} |
898 |
# Default: ${PREFIX}/share/doc/${PORTNAME} |
899 |
# DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} |
899 |
# DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} |
900 |
# EXAMPLESDIR - Name of the directory to install the packages examples in. |
900 |
# EXAMPLESDIR - Name of the directory to install the packages examples in. |
901 |
# Default: ${PREFIX}/share/examples/${PORTNAME} |
901 |
# Default: ${PREFIX}/share/examples/${PORTNAME} |
902 |
# EXAMPLESDIR_REL |
902 |
# EXAMPLESDIR_REL |
903 |
# - The EXAMPLESDIR relative to ${PREFIX} |
903 |
# - The EXAMPLESDIR relative to ${PREFIX} |
904 |
# DATADIR - Name of the directory to install the packages shared data in. |
904 |
# DATADIR - Name of the directory to install the packages shared data in. |
905 |
# Default: ${PREFIX}/share/${PORTNAME} |
905 |
# Default: ${PREFIX}/share/${PORTNAME} |
906 |
# DATADIR_REL - The DATADIR relative to ${PREFIX} |
906 |
# DATADIR_REL - The DATADIR relative to ${PREFIX} |
907 |
# |
907 |
# |
908 |
# WWWDIR - Name of the directory to install the packages www data in. |
908 |
# WWWDIR - Name of the directory to install the packages www data in. |
909 |
# Default: ${PREFIX}/www/${PORTNAME} |
909 |
# Default: ${PREFIX}/www/${PORTNAME} |
910 |
# WWWDIR_REL - The WWWDIR relative to ${PREFIX} |
910 |
# WWWDIR_REL - The WWWDIR relative to ${PREFIX} |
911 |
# |
911 |
# |
912 |
# USERS - List of users to create at install time. Each login must |
912 |
# USERS - List of users to create at install time. Each login must |
913 |
# have a corresponding entry in ${UID_FILES}. |
913 |
# have a corresponding entry in ${UID_FILES}. |
914 |
# GROUPS - List of groups to create at install time. Each group must |
914 |
# GROUPS - List of groups to create at install time. Each group must |
915 |
# have a corresponding entry in ${GID_FILES}. |
915 |
# have a corresponding entry in ${GID_FILES}. |
916 |
# |
916 |
# |
917 |
# DESKTOPDIR - Name of the directory to install ${DESKTOP_ENTRIES} in. |
917 |
# DESKTOPDIR - Name of the directory to install ${DESKTOP_ENTRIES} in. |
918 |
# Default: ${PREFIX}/share/applications |
918 |
# Default: ${PREFIX}/share/applications |
919 |
# DESKTOP_ENTRIES |
919 |
# DESKTOP_ENTRIES |
920 |
# - List of desktop entry files to generate and install in |
920 |
# - List of desktop entry files to generate and install in |
921 |
# ${DESKTOPDIR}. The format is |
921 |
# ${DESKTOPDIR}. The format is |
922 |
# "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify |
922 |
# "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify |
923 |
# Rules: |
923 |
# Rules: |
924 |
# * Only add desktop entries for applications which do not |
924 |
# * Only add desktop entries for applications which do not |
925 |
# require a terminal (ie. X applications). |
925 |
# require a terminal (ie. X applications). |
926 |
# * If the upstream distribution already installs .desktop |
926 |
# * If the upstream distribution already installs .desktop |
927 |
# files, you do not need to use this. |
927 |
# files, you do not need to use this. |
928 |
# * If you require a more elaborate .desktop file than this |
928 |
# * If you require a more elaborate .desktop file than this |
929 |
# variable permits, write it yourself and install it |
929 |
# variable permits, write it yourself and install it |
930 |
# in ${DESKTOPDIR}. |
930 |
# in ${DESKTOPDIR}. |
931 |
# Notes: |
931 |
# Notes: |
932 |
# * Comment, Icon and StartupNotify may be empty |
932 |
# * Comment, Icon and StartupNotify may be empty |
933 |
# strings (""). Categories may be an empty string in some |
933 |
# strings (""). Categories may be an empty string in some |
934 |
# cases (see below). The other fields are mandatory. |
934 |
# cases (see below). The other fields are mandatory. |
935 |
# * If Comment is an empty string, port ${COMMENT} will be |
935 |
# * If Comment is an empty string, port ${COMMENT} will be |
936 |
# used. |
936 |
# used. |
937 |
# * If set, Icon must be either absolute path (usually |
937 |
# * If set, Icon must be either absolute path (usually |
938 |
# ${PREFIX}/share/pixmaps/${PORTNAME}.png) or icon name |
938 |
# ${PREFIX}/share/pixmaps/${PORTNAME}.png) or icon name |
939 |
# without extension if installed icons follow Icon Theme |
939 |
# without extension if installed icons follow Icon Theme |
940 |
# Specification. |
940 |
# Specification. |
941 |
# * If Categories is an empty string, bsd.port.mk will try |
941 |
# * If Categories is an empty string, bsd.port.mk will try |
942 |
# to deduce a default value using the CATEGORIES variable. |
942 |
# to deduce a default value using the CATEGORIES variable. |
943 |
# If the deduction fails, you will have to set Categories |
943 |
# If the deduction fails, you will have to set Categories |
944 |
# manually. You should check the generated value using |
944 |
# manually. You should check the generated value using |
945 |
# "make desktop-categories", and override it if necessary. |
945 |
# "make desktop-categories", and override it if necessary. |
946 |
# * Exec will also be used to name the .desktop file. |
946 |
# * Exec will also be used to name the .desktop file. |
947 |
# * StartupNotify may be true, false or empty (see Desktop |
947 |
# * StartupNotify may be true, false or empty (see Desktop |
948 |
# Entry Specification for details). |
948 |
# Entry Specification for details). |
949 |
# * The files will be automatically added to ${PLIST}. |
949 |
# * The files will be automatically added to ${PLIST}. |
950 |
# Example: |
950 |
# Example: |
951 |
# "X Window Information" \ |
951 |
# "X Window Information" \ |
952 |
# "Get information about X windows" \ |
952 |
# "Get information about X windows" \ |
953 |
# "${PREFIX}/share/pixmaps/wininfo.png" \ |
953 |
# "${PREFIX}/share/pixmaps/wininfo.png" \ |
954 |
# "${PREFIX}/bin/wininfo" \ |
954 |
# "${PREFIX}/bin/wininfo" \ |
955 |
# "System;" \ |
955 |
# "System;" \ |
956 |
# "" |
956 |
# "" |
957 |
# See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html |
957 |
# See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html |
958 |
# for an explanation of the fields. If you need to create more |
958 |
# for an explanation of the fields. If you need to create more |
959 |
# than one file, just chain them into a single variable. |
959 |
# than one file, just chain them into a single variable. |
960 |
# |
960 |
# |
961 |
# Note that the install target will automatically add manpages (see |
961 |
# Note that the install target will automatically add manpages (see |
962 |
# above) and also substitute special sequences of characters (delimited |
962 |
# above) and also substitute special sequences of characters (delimited |
963 |
# by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For |
963 |
# by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For |
964 |
# instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of |
964 |
# instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of |
965 |
# "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL. |
965 |
# "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL. |
966 |
# ${TMPPLIST} is generated before the do-install stage. If you are |
966 |
# ${TMPPLIST} is generated before the do-install stage. If you are |
967 |
# generating the packing list on-the-fly, make sure it's generated before |
967 |
# generating the packing list on-the-fly, make sure it's generated before |
968 |
# do-install is called! |
968 |
# do-install is called! |
969 |
# |
969 |
# |
970 |
# This is used in all stages: |
970 |
# This is used in all stages: |
971 |
# |
971 |
# |
972 |
# SCRIPTS_ENV - Additional environment vars passed to scripts in |
972 |
# SCRIPTS_ENV - Additional environment vars passed to scripts in |
973 |
# ${SCRIPTDIR} executed by bsd.port.mk. |
973 |
# ${SCRIPTDIR} executed by bsd.port.mk. |
974 |
# Default: see below |
974 |
# Default: see below |
975 |
# |
975 |
# |
976 |
# Finally, variables to change if you want a special behavior. These |
976 |
# Finally, variables to change if you want a special behavior. These |
977 |
# are for debugging purposes. Don't set them in your Makefile. |
977 |
# are for debugging purposes. Don't set them in your Makefile. |
978 |
# |
978 |
# |
979 |
# ECHO_MSG - Used to print all the '===>' style prompts - override this |
979 |
# ECHO_MSG - Used to print all the '===>' style prompts - override this |
980 |
# to turn them off. |
980 |
# to turn them off. |
981 |
# Default: ${ECHO_CMD} |
981 |
# Default: ${ECHO_CMD} |
982 |
# PATCH_DEBUG - If set, print out more information about the patches as |
982 |
# PATCH_DEBUG - If set, print out more information about the patches as |
983 |
# it attempts to apply them. |
983 |
# it attempts to apply them. |
984 |
# PKG_DBDIR - Where package installation is recorded; this directory |
984 |
# PKG_DBDIR - Where package installation is recorded; this directory |
985 |
# must not contain anything else. |
985 |
# must not contain anything else. |
986 |
# Default: /var/db/pkg |
986 |
# Default: /var/db/pkg |
987 |
# PORT_DBDIR - Where port configuration options are recorded. |
987 |
# PORT_DBDIR - Where port configuration options are recorded. |
988 |
# Default: /var/db/ports |
988 |
# Default: /var/db/ports |
989 |
# NO_PKG_REGISTER |
989 |
# NO_PKG_REGISTER |
990 |
# - Don't register a port installation as a package. |
990 |
# - Don't register a port installation as a package. |
991 |
# FORCE_PKG_REGISTER |
991 |
# FORCE_PKG_REGISTER |
992 |
# - If set, it will overwrite any existing package |
992 |
# - If set, it will overwrite any existing package |
993 |
# registration information in ${PKG_DBDIR}/${PKGNAME}. |
993 |
# registration information in ${PKG_DBDIR}/${PKGNAME}. |
994 |
# NO_DEPENDS - Don't verify build of dependencies. |
994 |
# NO_DEPENDS - Don't verify build of dependencies. |
995 |
# STRICT_DEPENDS |
995 |
# STRICT_DEPENDS |
996 |
# - Verify dependencies but consider missing dependencies as |
996 |
# - Verify dependencies but consider missing dependencies as |
997 |
# fatal. |
997 |
# fatal. |
998 |
# CHECKSUM_ALGORITHMS |
998 |
# CHECKSUM_ALGORITHMS |
999 |
# - Different checksum algorithms to check for verifying the |
999 |
# - Different checksum algorithms to check for verifying the |
1000 |
# integrity of the distfiles. The absence of the algorithm |
1000 |
# integrity of the distfiles. The absence of the algorithm |
1001 |
# in distinfo doesn't make it fail. |
1001 |
# in distinfo doesn't make it fail. |
1002 |
# Default: sha256 |
1002 |
# Default: sha256 |
1003 |
# NO_CHECKSUM - Don't verify the checksum. Typically used when |
1003 |
# NO_CHECKSUM - Don't verify the checksum. Typically used when |
1004 |
# when you noticed the distfile you just fetched has |
1004 |
# when you noticed the distfile you just fetched has |
1005 |
# a different checksum and you intend to verify if |
1005 |
# a different checksum and you intend to verify if |
1006 |
# the port still works with it. |
1006 |
# the port still works with it. |
1007 |
# USE_PACKAGE_DEPENDS |
1007 |
# USE_PACKAGE_DEPENDS |
1008 |
# - Try to install dependencies from existing packages instead |
1008 |
# - Try to install dependencies from existing packages instead |
1009 |
# of building the port from scratch. Fallback on source |
1009 |
# of building the port from scratch. Fallback on source |
1010 |
# if an existing package is not present. |
1010 |
# if an existing package is not present. |
1011 |
# USE_PACKAGE_DEPENDS_ONLY |
1011 |
# USE_PACKAGE_DEPENDS_ONLY |
1012 |
# - Like USE_PACKAGE_DEPENDS, but do not fallback on source. |
1012 |
# - Like USE_PACKAGE_DEPENDS, but do not fallback on source. |
1013 |
# INSTALL_AS_USER |
1013 |
# INSTALL_AS_USER |
1014 |
# - Define this to install as the current user, intended |
1014 |
# - Define this to install as the current user, intended |
1015 |
# for systems where you have no root access. |
1015 |
# for systems where you have no root access. |
1016 |
# DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field |
1016 |
# DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field |
1017 |
# has been specified in distinfo. This is useful |
1017 |
# has been specified in distinfo. This is useful |
1018 |
# when using an alternate FETCH_CMD. |
1018 |
# when using an alternate FETCH_CMD. |
1019 |
# |
1019 |
# |
1020 |
# PKG_CREATE_VERBOSE - If set, pass the -v option to pkg create which |
1020 |
# PKG_CREATE_VERBOSE - If set, pass the -v option to pkg create which |
1021 |
# ensures periodic output during packaging and |
1021 |
# ensures periodic output during packaging and |
1022 |
# will help prevent timeouts by build monitors |
1022 |
# will help prevent timeouts by build monitors |
1023 |
# |
1023 |
# |
1024 |
# End of the list of all variables that need to be defined in a port. |
1024 |
# End of the list of all variables that need to be defined in a port. |
1025 |
# Most port authors should not need to understand anything after this point. |
1025 |
# Most port authors should not need to understand anything after this point. |
1026 |
# |
1026 |
# |
1027 |
|
1027 |
|
1028 |
LANG= C |
1028 |
LANG= C |
1029 |
LC_ALL= C |
1029 |
LC_ALL= C |
1030 |
.export LANG LC_ALL |
1030 |
.export LANG LC_ALL |
1031 |
|
1031 |
|
1032 |
# These need to be absolute since we don't know how deep in the ports |
1032 |
# These need to be absolute since we don't know how deep in the ports |
1033 |
# tree we are and thus can't go relative. They can, of course, be overridden |
1033 |
# tree we are and thus can't go relative. They can, of course, be overridden |
1034 |
# by individual Makefiles or local system make configuration. |
1034 |
# by individual Makefiles or local system make configuration. |
1035 |
PORTSDIR?= /usr/ports |
1035 |
PORTSDIR?= /usr/ports |
1036 |
LOCALBASE?= /usr/local |
1036 |
LOCALBASE?= /usr/local |
1037 |
LINUXBASE?= /compat/linux |
1037 |
LINUXBASE?= /compat/linux |
1038 |
DISTDIR?= ${PORTSDIR}/distfiles |
1038 |
DISTDIR?= ${PORTSDIR}/distfiles |
1039 |
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} |
1039 |
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} |
1040 |
INDEXDIR?= ${PORTSDIR} |
1040 |
INDEXDIR?= ${PORTSDIR} |
1041 |
SRC_BASE?= /usr/src |
1041 |
SRC_BASE?= /usr/src |
1042 |
USESDIR?= ${PORTSDIR}/Mk/Uses |
1042 |
USESDIR?= ${PORTSDIR}/Mk/Uses |
1043 |
SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts |
1043 |
SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts |
1044 |
LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib |
1044 |
LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib |
1045 |
STAGEDIR?= ${WRKDIR}/stage |
1045 |
STAGEDIR?= ${WRKDIR}/stage |
1046 |
NOTPHONY?= |
1046 |
NOTPHONY?= |
1047 |
FLAVORS?= |
1047 |
FLAVORS?= |
1048 |
FLAVOR?= |
1048 |
FLAVOR?= |
1049 |
# Disallow forced FLAVOR as make argument since we cannot change it to the |
1049 |
# Disallow forced FLAVOR as make argument since we cannot change it to the |
1050 |
# proper default. |
1050 |
# proper default. |
1051 |
.if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR) |
1051 |
.if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR) |
1052 |
.error FLAVOR may not be passed empty as a make argument. |
1052 |
.error FLAVOR may not be passed empty as a make argument. |
1053 |
.endif |
1053 |
.endif |
1054 |
# Store env FLAVOR for later |
1054 |
# Store env FLAVOR for later |
1055 |
.if !defined(_FLAVOR) |
1055 |
.if !defined(_FLAVOR) |
1056 |
_FLAVOR:= ${FLAVOR} |
1056 |
_FLAVOR:= ${FLAVOR} |
1057 |
.endif |
1057 |
.endif |
1058 |
PORTS_FEATURES+= FLAVORS |
1058 |
PORTS_FEATURES+= FLAVORS |
1059 |
MINIMAL_PKG_VERSION= 1.6.0 |
1059 |
MINIMAL_PKG_VERSION= 1.6.0 |
1060 |
|
1060 |
|
1061 |
_PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ |
1061 |
_PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ |
1062 |
${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} |
1062 |
${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} |
1063 |
|
1063 |
|
1064 |
# Ensure .CURDIR contains an absolute path without a trailing slash. Failed |
1064 |
# Ensure .CURDIR contains an absolute path without a trailing slash. Failed |
1065 |
# builds can occur when PORTSDIR is a symbolic link, or with something like |
1065 |
# builds can occur when PORTSDIR is a symbolic link, or with something like |
1066 |
# make -C /usr/ports/category/port/. |
1066 |
# make -C /usr/ports/category/port/. |
1067 |
.CURDIR:= ${.CURDIR:tA} |
1067 |
.CURDIR:= ${.CURDIR:tA} |
1068 |
|
1068 |
|
1069 |
# make sure bmake treats -V as expected |
1069 |
# make sure bmake treats -V as expected |
1070 |
.MAKE.EXPAND_VARIABLES= yes |
1070 |
.MAKE.EXPAND_VARIABLES= yes |
1071 |
|
1071 |
|
1072 |
.include "${PORTSDIR}/Mk/bsd.commands.mk" |
1072 |
.include "${PORTSDIR}/Mk/bsd.commands.mk" |
1073 |
|
1073 |
|
1074 |
# Do not leak flavors to childs make |
1074 |
# Do not leak flavors to childs make |
1075 |
.MAKEOVERRIDES:= ${.MAKEOVERRIDES:NFLAVOR} |
1075 |
.MAKEOVERRIDES:= ${.MAKEOVERRIDES:NFLAVOR} |
1076 |
|
1076 |
|
1077 |
.if defined(CROSS_TOOLCHAIN) |
1077 |
.if defined(CROSS_TOOLCHAIN) |
1078 |
.if !defined(CROSS_SYSROOT) |
1078 |
.if !defined(CROSS_SYSROOT) |
1079 |
IGNORE= CROSS_SYSROOT should be defined |
1079 |
IGNORE= CROSS_SYSROOT should be defined |
1080 |
.endif |
1080 |
.endif |
1081 |
.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" |
1081 |
.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" |
1082 |
# Do not define CPP on purpose |
1082 |
# Do not define CPP on purpose |
1083 |
.if !defined(HOSTCC) |
1083 |
.if !defined(HOSTCC) |
1084 |
HOSTCC:= ${CC} |
1084 |
HOSTCC:= ${CC} |
1085 |
HOSTCXX:= ${CXX} |
1085 |
HOSTCXX:= ${CXX} |
1086 |
.endif |
1086 |
.endif |
1087 |
.if !defined(CC_FOR_BUILD) |
1087 |
.if !defined(CC_FOR_BUILD) |
1088 |
CC_FOR_BUILD:= ${HOSTCC} |
1088 |
CC_FOR_BUILD:= ${HOSTCC} |
1089 |
CXX_FOR_BUILD:= ${HOSTCXX} |
1089 |
CXX_FOR_BUILD:= ${HOSTCXX} |
1090 |
.endif |
1090 |
.endif |
1091 |
CONFIGURE_ENV+= HOSTCC="${HOSTCC}" HOSTCXX="${HOSTCXX}" CC_FOR_BUILD="${CC_FOR_BUILD}" CXX_FOR_BUILD="${CXX_FOR_BUILD}" |
1091 |
CONFIGURE_ENV+= HOSTCC="${HOSTCC}" HOSTCXX="${HOSTCXX}" CC_FOR_BUILD="${CC_FOR_BUILD}" CXX_FOR_BUILD="${CXX_FOR_BUILD}" |
1092 |
|
1092 |
|
1093 |
CC= ${XCC} --sysroot=${CROSS_SYSROOT} |
1093 |
CC= ${XCC} --sysroot=${CROSS_SYSROOT} |
1094 |
CXX= ${XCXX} --sysroot=${CROSS_SYSROOT} |
1094 |
CXX= ${XCXX} --sysroot=${CROSS_SYSROOT} |
1095 |
CPP= ${XCPP} --sysroot=${CROSS_SYSROOT} |
1095 |
CPP= ${XCPP} --sysroot=${CROSS_SYSROOT} |
1096 |
.for _tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS |
1096 |
.for _tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS |
1097 |
${_tool}= ${CROSS_BINUTILS_PREFIX}${tool:tl} |
1097 |
${_tool}= ${CROSS_BINUTILS_PREFIX}${tool:tl} |
1098 |
.endfor |
1098 |
.endfor |
1099 |
LD+= --sysroot=${CROSS_SYSROOT} |
1099 |
LD+= --sysroot=${CROSS_SYSROOT} |
1100 |
STRIP_CMD= ${CROSS_BINUTILS_PREFIX}strip |
1100 |
STRIP_CMD= ${CROSS_BINUTILS_PREFIX}strip |
1101 |
# only bmake support the below |
1101 |
# only bmake support the below |
1102 |
STRIPBIN= ${STRIP_CMD} |
1102 |
STRIPBIN= ${STRIP_CMD} |
1103 |
.export.env STRIPBIN |
1103 |
.export.env STRIPBIN |
1104 |
.endif |
1104 |
.endif |
1105 |
|
1105 |
|
1106 |
# |
1106 |
# |
1107 |
# DESTDIR section to start a chrooted process if invoked with DESTDIR set |
1107 |
# DESTDIR section to start a chrooted process if invoked with DESTDIR set |
1108 |
# |
1108 |
# |
1109 |
|
1109 |
|
1110 |
.if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) && \ |
1110 |
.if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) && \ |
1111 |
!defined(BEFOREPORTMK) && !defined(INOPTIONSMK) |
1111 |
!defined(BEFOREPORTMK) && !defined(INOPTIONSMK) |
1112 |
|
1112 |
|
1113 |
.include "${PORTSDIR}/Mk/bsd.destdir.mk" |
1113 |
.include "${PORTSDIR}/Mk/bsd.destdir.mk" |
1114 |
|
1114 |
|
1115 |
.else |
1115 |
.else |
1116 |
|
1116 |
|
1117 |
.if !target(makepatch) |
1117 |
.if !target(makepatch) |
1118 |
makepatch: |
1118 |
makepatch: |
1119 |
@${SETENV} WRKDIR=${WRKDIR} PATCHDIR=${PATCHDIR} \ |
1119 |
@${SETENV} WRKDIR=${WRKDIR} PATCHDIR=${PATCHDIR} \ |
1120 |
PATCH_WRKSRC=${PATCH_WRKSRC} \ |
1120 |
PATCH_WRKSRC=${PATCH_WRKSRC} \ |
1121 |
STRIP_COMPONENTS="${PATCH_STRIP:S/-p//}" \ |
1121 |
STRIP_COMPONENTS="${PATCH_STRIP:S/-p//}" \ |
1122 |
${SH} ${SCRIPTSDIR}/smart_makepatch.sh |
1122 |
${SH} ${SCRIPTSDIR}/smart_makepatch.sh |
1123 |
.endif |
1123 |
.endif |
1124 |
|
1124 |
|
1125 |
|
1125 |
|
1126 |
# Start of options section |
1126 |
# Start of options section |
1127 |
.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) |
1127 |
.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) |
1128 |
|
1128 |
|
1129 |
|
1129 |
|
1130 |
# Get the default maintainer |
1130 |
# Get the default maintainer |
1131 |
MAINTAINER?= ports@FreeBSD.org |
1131 |
MAINTAINER?= ports@FreeBSD.org |
1132 |
|
1132 |
|
1133 |
# Get the architecture |
1133 |
# Get the architecture |
1134 |
.if !defined(ARCH) |
1134 |
.if !defined(ARCH) |
1135 |
ARCH!= ${UNAME} -p |
1135 |
ARCH!= ${UNAME} -p |
1136 |
.endif |
1136 |
.endif |
1137 |
HOSTARCH:= ${ARCH} |
1137 |
HOSTARCH:= ${ARCH} |
1138 |
.if defined(CROSS_TOOLCHAIN) |
1138 |
.if defined(CROSS_TOOLCHAIN) |
1139 |
ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} |
1139 |
ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} |
1140 |
.endif |
1140 |
.endif |
1141 |
_EXPORTED_VARS+= ARCH |
1141 |
_EXPORTED_VARS+= ARCH |
1142 |
|
1142 |
|
1143 |
# Get operating system versions for a cross build |
1143 |
# Get operating system versions for a cross build |
1144 |
.if defined(CROSS_SYSROOT) |
1144 |
.if defined(CROSS_SYSROOT) |
1145 |
.if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) |
1145 |
.if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) |
1146 |
.error CROSS_SYSROOT does not include /usr/include/sys/param.h. |
1146 |
.error CROSS_SYSROOT does not include /usr/include/sys/param.h. |
1147 |
.endif |
1147 |
.endif |
1148 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h |
1148 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h |
1149 |
_OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null |
1149 |
_OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null |
1150 |
.endif |
1150 |
.endif |
1151 |
|
1151 |
|
1152 |
# Get the operating system type |
1152 |
# Get the operating system type |
1153 |
.if !defined(OPSYS) |
1153 |
.if !defined(OPSYS) |
1154 |
OPSYS!= ${UNAME} -s |
1154 |
OPSYS!= ${UNAME} -s |
1155 |
.endif |
1155 |
.endif |
1156 |
_EXPORTED_VARS+= OPSYS |
1156 |
_EXPORTED_VARS+= OPSYS |
1157 |
|
1157 |
|
1158 |
.if !defined(_OSRELEASE) |
1158 |
.if !defined(_OSRELEASE) |
1159 |
_OSRELEASE!= ${UNAME} -r |
1159 |
_OSRELEASE!= ${UNAME} -r |
1160 |
.endif |
1160 |
.endif |
1161 |
_EXPORTED_VARS+= _OSRELEASE |
1161 |
_EXPORTED_VARS+= _OSRELEASE |
1162 |
|
1162 |
|
1163 |
# Get the operating system revision |
1163 |
# Get the operating system revision |
1164 |
OSREL?= ${_OSRELEASE:C/-.*//} |
1164 |
OSREL?= ${_OSRELEASE:C/-.*//} |
1165 |
_EXPORTED_VARS+= OSREL |
1165 |
_EXPORTED_VARS+= OSREL |
1166 |
|
1166 |
|
1167 |
# Get __FreeBSD_version |
1167 |
# Get __FreeBSD_version |
1168 |
.if !defined(OSVERSION) |
1168 |
.if !defined(OSVERSION) |
1169 |
.if exists(/usr/include/sys/param.h) |
1169 |
.if exists(/usr/include/sys/param.h) |
1170 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h |
1170 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h |
1171 |
.elif exists(${SRC_BASE}/sys/sys/param.h) |
1171 |
.elif exists(${SRC_BASE}/sys/sys/param.h) |
1172 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h |
1172 |
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h |
1173 |
.else |
1173 |
.else |
1174 |
.error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. |
1174 |
.error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. |
1175 |
.endif |
1175 |
.endif |
1176 |
.endif |
1176 |
.endif |
1177 |
_EXPORTED_VARS+= OSVERSION |
1177 |
_EXPORTED_VARS+= OSVERSION |
1178 |
|
1178 |
|
1179 |
.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1102000) || \ |
1179 |
.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1102000) || \ |
1180 |
(${OPSYS} == DragonFly && ${DFLYVERSION} < 400400) |
1180 |
(${OPSYS} == DragonFly && ${DFLYVERSION} < 400400) |
1181 |
_UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\ |
1181 |
_UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\ |
1182 |
are guaranteed to build on this system. Please upgrade to a supported release. |
1182 |
are guaranteed to build on this system. Please upgrade to a supported release. |
1183 |
. if defined(ALLOW_UNSUPPORTED_SYSTEM) |
1183 |
. if defined(ALLOW_UNSUPPORTED_SYSTEM) |
1184 |
WARNING+= "${_UNSUPPORTED_SYSTEM_MESSAGE}" |
1184 |
WARNING+= "${_UNSUPPORTED_SYSTEM_MESSAGE}" |
1185 |
. else |
1185 |
. else |
1186 |
show-unsupported-system-error: |
1186 |
show-unsupported-system-error: |
1187 |
@${ECHO_MSG} "/!\\ ERROR: /!\\" |
1187 |
@${ECHO_MSG} "/!\\ ERROR: /!\\" |
1188 |
@${ECHO_MSG} |
1188 |
@${ECHO_MSG} |
1189 |
@${ECHO_MSG} "${_UNSUPPORTED_SYSTEM_MESSAGE}" | ${FMT_80} |
1189 |
@${ECHO_MSG} "${_UNSUPPORTED_SYSTEM_MESSAGE}" | ${FMT_80} |
1190 |
@${ECHO_MSG} |
1190 |
@${ECHO_MSG} |
1191 |
@${ECHO_MSG} "No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM." | ${FMT_80} |
1191 |
@${ECHO_MSG} "No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM." | ${FMT_80} |
1192 |
@${ECHO_MSG} |
1192 |
@${ECHO_MSG} |
1193 |
@${FALSE} |
1193 |
@${FALSE} |
1194 |
. endif |
1194 |
. endif |
1195 |
.endif |
1195 |
.endif |
1196 |
|
1196 |
|
1197 |
# Convert OSVERSION to major release number |
1197 |
# Convert OSVERSION to major release number |
1198 |
_OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} |
1198 |
_OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} |
1199 |
# Sanity checks for chroot/jail building. |
1199 |
# Sanity checks for chroot/jail building. |
1200 |
# Skip if OSVERSION specified on cmdline for testing. Only works for bmake. |
1200 |
# Skip if OSVERSION specified on cmdline for testing. Only works for bmake. |
1201 |
.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} |
1201 |
.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} |
1202 |
.if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} |
1202 |
.if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} |
1203 |
.error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number. |
1203 |
.error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number. |
1204 |
.elif ${_OSVERSION_MAJOR} != ${OSREL:R} |
1204 |
.elif ${_OSVERSION_MAJOR} != ${OSREL:R} |
1205 |
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. |
1205 |
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. |
1206 |
.endif |
1206 |
.endif |
1207 |
.endif |
1207 |
.endif |
1208 |
|
1208 |
|
1209 |
# Only define tools here (for transition period with between pkg tools) |
1209 |
# Only define tools here (for transition period with between pkg tools) |
1210 |
.include "${PORTSDIR}/Mk/bsd.commands.mk" |
1210 |
.include "${PORTSDIR}/Mk/bsd.commands.mk" |
1211 |
|
1211 |
|
1212 |
.if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) |
1212 |
.if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) |
1213 |
.if !defined(_PKG_VERSION) |
1213 |
.if !defined(_PKG_VERSION) |
1214 |
_PKG_VERSION!= ${PKG_BIN} -v |
1214 |
_PKG_VERSION!= ${PKG_BIN} -v |
1215 |
.endif |
1215 |
.endif |
1216 |
_PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION} |
1216 |
_PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION} |
1217 |
.if ${_PKG_STATUS} == "<" |
1217 |
.if ${_PKG_STATUS} == "<" |
1218 |
IGNORE= pkg(8) must be version ${MINIMAL_PKG_VERSION} or greater, but you have ${_PKG_VERSION}. You must upgrade the ${PKG_ORIGIN} port first |
1218 |
IGNORE= pkg(8) must be version ${MINIMAL_PKG_VERSION} or greater, but you have ${_PKG_VERSION}. You must upgrade the ${PKG_ORIGIN} port first |
1219 |
.endif |
1219 |
.endif |
1220 |
_PKG_CHECKED= 1 |
1220 |
_PKG_CHECKED= 1 |
1221 |
.endif |
1221 |
.endif |
1222 |
_EXPORTED_VARS+= _PKG_CHECKED |
1222 |
_EXPORTED_VARS+= _PKG_CHECKED |
1223 |
|
1223 |
|
1224 |
MASTERDIR?= ${.CURDIR} |
1224 |
MASTERDIR?= ${.CURDIR} |
1225 |
|
1225 |
|
1226 |
.if ${MASTERDIR} != ${.CURDIR} |
1226 |
.if ${MASTERDIR} != ${.CURDIR} |
1227 |
SLAVE_PORT?= yes |
1227 |
SLAVE_PORT?= yes |
1228 |
MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} |
1228 |
MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} |
1229 |
.else |
1229 |
.else |
1230 |
SLAVE_PORT?= no |
1230 |
SLAVE_PORT?= no |
1231 |
MASTER_PORT?= |
1231 |
MASTER_PORT?= |
1232 |
.endif |
1232 |
.endif |
1233 |
|
1233 |
|
1234 |
# If they exist, include Makefile.inc, then architecture/operating |
1234 |
# If they exist, include Makefile.inc, then architecture/operating |
1235 |
# system specific Makefiles, then local Makefile.local. |
1235 |
# system specific Makefiles, then local Makefile.local. |
1236 |
|
1236 |
|
1237 |
.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) |
1237 |
.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) |
1238 |
.include "${.CURDIR}/../Makefile.inc" |
1238 |
.include "${.CURDIR}/../Makefile.inc" |
1239 |
USE_SUBMAKE= yes |
1239 |
USE_SUBMAKE= yes |
1240 |
.endif |
1240 |
.endif |
1241 |
|
1241 |
|
1242 |
.if exists(${MASTERDIR}/../Makefile.inc) |
1242 |
.if exists(${MASTERDIR}/../Makefile.inc) |
1243 |
.include "${MASTERDIR}/../Makefile.inc" |
1243 |
.include "${MASTERDIR}/../Makefile.inc" |
1244 |
USE_SUBMAKE= yes |
1244 |
USE_SUBMAKE= yes |
1245 |
.endif |
1245 |
.endif |
1246 |
|
1246 |
|
1247 |
.if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) |
1247 |
.if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) |
1248 |
.include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}" |
1248 |
.include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}" |
1249 |
USE_SUBMAKE= yes |
1249 |
USE_SUBMAKE= yes |
1250 |
.elif exists(${MASTERDIR}/Makefile.${OPSYS}) |
1250 |
.elif exists(${MASTERDIR}/Makefile.${OPSYS}) |
1251 |
.include "${MASTERDIR}/Makefile.${OPSYS}" |
1251 |
.include "${MASTERDIR}/Makefile.${OPSYS}" |
1252 |
USE_SUBMAKE= yes |
1252 |
USE_SUBMAKE= yes |
1253 |
.elif exists(${MASTERDIR}/Makefile.${ARCH}) |
1253 |
.elif exists(${MASTERDIR}/Makefile.${ARCH}) |
1254 |
.include "${MASTERDIR}/Makefile.${ARCH}" |
1254 |
.include "${MASTERDIR}/Makefile.${ARCH}" |
1255 |
USE_SUBMAKE= yes |
1255 |
USE_SUBMAKE= yes |
1256 |
.endif |
1256 |
.endif |
1257 |
|
1257 |
|
1258 |
.if exists(${MASTERDIR}/Makefile.local) |
1258 |
.if exists(${MASTERDIR}/Makefile.local) |
1259 |
.include "${MASTERDIR}/Makefile.local" |
1259 |
.include "${MASTERDIR}/Makefile.local" |
1260 |
USE_SUBMAKE= yes |
1260 |
USE_SUBMAKE= yes |
1261 |
.elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) |
1261 |
.elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) |
1262 |
.include "${.CURDIR}/Makefile.local" |
1262 |
.include "${.CURDIR}/Makefile.local" |
1263 |
USE_SUBMAKE= yes |
1263 |
USE_SUBMAKE= yes |
1264 |
.endif |
1264 |
.endif |
1265 |
|
1265 |
|
1266 |
.for _CATEGORY in ${CATEGORIES} |
1266 |
.for _CATEGORY in ${CATEGORIES} |
1267 |
PKGCATEGORY?= ${_CATEGORY} |
1267 |
PKGCATEGORY?= ${_CATEGORY} |
1268 |
.endfor |
1268 |
.endfor |
1269 |
_PORTDIRNAME= ${.CURDIR:T} |
1269 |
_PORTDIRNAME= ${.CURDIR:T} |
1270 |
PORTDIRNAME?= ${_PORTDIRNAME} |
1270 |
PORTDIRNAME?= ${_PORTDIRNAME} |
1271 |
PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} |
1271 |
PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} |
1272 |
|
1272 |
|
1273 |
# where 'make config' records user configuration options |
1273 |
# where 'make config' records user configuration options |
1274 |
PORT_DBDIR?= /var/db/ports |
1274 |
PORT_DBDIR?= /var/db/ports |
1275 |
|
1275 |
|
1276 |
UID_FILES?= ${PORTSDIR}/UIDs |
1276 |
UID_FILES?= ${PORTSDIR}/UIDs |
1277 |
GID_FILES?= ${PORTSDIR}/GIDs |
1277 |
GID_FILES?= ${PORTSDIR}/GIDs |
1278 |
UID_OFFSET?= 0 |
1278 |
UID_OFFSET?= 0 |
1279 |
GID_OFFSET?= 0 |
1279 |
GID_OFFSET?= 0 |
1280 |
|
1280 |
|
1281 |
# predefined accounts from src/etc/master.passwd |
1281 |
# predefined accounts from src/etc/master.passwd |
1282 |
# alpha numeric sort order |
1282 |
# alpha numeric sort order |
1283 |
USERS_BLACKLIST= _dhcp _pflogd _ypldap auditdistd bin bind daemon games hast kmem mailnull man news nobody operator pop proxy root smmsp sshd toor tty unbound uucp www |
1283 |
USERS_BLACKLIST= _dhcp _pflogd _ypldap auditdistd bin bind daemon games hast kmem mailnull man news nobody operator pop proxy root smmsp sshd toor tty unbound uucp www |
1284 |
|
1284 |
|
1285 |
# predefined accounts from src/etc/group |
1285 |
# predefined accounts from src/etc/group |
1286 |
# alpha numeric sort order |
1286 |
# alpha numeric sort order |
1287 |
GROUPS_BLACKLIST= _dhcp _pflogd _ypldap audit authpf bin bind daemon dialer ftp games guest hast kmem mail mailnull man network news nobody nogroup operator proxy smmsp sshd staff sys tty unbound uucp wheel www |
1287 |
GROUPS_BLACKLIST= _dhcp _pflogd _ypldap audit authpf bin bind daemon dialer ftp games guest hast kmem mail mailnull man network news nobody nogroup operator proxy smmsp sshd staff sys tty unbound uucp wheel www |
1288 |
|
1288 |
|
1289 |
LDCONFIG_DIR= libdata/ldconfig |
1289 |
LDCONFIG_DIR= libdata/ldconfig |
1290 |
LDCONFIG32_DIR= libdata/ldconfig32 |
1290 |
LDCONFIG32_DIR= libdata/ldconfig32 |
1291 |
|
1291 |
|
1292 |
# At least KDE needs TMPDIR for the package building, |
1292 |
# At least KDE needs TMPDIR for the package building, |
1293 |
# so we're setting it to the known default value. |
1293 |
# so we're setting it to the known default value. |
1294 |
.if defined(PACKAGE_BUILDING) |
1294 |
.if defined(PACKAGE_BUILDING) |
1295 |
TMPDIR?= /tmp |
1295 |
TMPDIR?= /tmp |
1296 |
.endif # defined(PACKAGE_BUILDING) |
1296 |
.endif # defined(PACKAGE_BUILDING) |
1297 |
|
1297 |
|
1298 |
.if defined(WITH_DEBUG_PORTS) |
1298 |
.if defined(WITH_DEBUG_PORTS) |
1299 |
.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} |
1299 |
.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} |
1300 |
WITH_DEBUG= yes |
1300 |
WITH_DEBUG= yes |
1301 |
.endif |
1301 |
.endif |
1302 |
.endif |
1302 |
.endif |
1303 |
|
1303 |
|
1304 |
.include "${PORTSDIR}/Mk/bsd.default-versions.mk" |
1304 |
.include "${PORTSDIR}/Mk/bsd.default-versions.mk" |
1305 |
.include "${PORTSDIR}/Mk/bsd.options.mk" |
1305 |
.include "${PORTSDIR}/Mk/bsd.options.mk" |
1306 |
|
1306 |
|
1307 |
.endif |
1307 |
.endif |
1308 |
# End of options section. |
1308 |
# End of options section. |
1309 |
|
1309 |
|
1310 |
# Start of pre-makefile section. |
1310 |
# Start of pre-makefile section. |
1311 |
.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) |
1311 |
.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) |
1312 |
|
1312 |
|
1313 |
.if defined(_PREMKINCLUDED) |
1313 |
.if defined(_PREMKINCLUDED) |
1314 |
DEV_ERROR+= "you cannot include bsd.port[.pre].mk twice" |
1314 |
DEV_ERROR+= "you cannot include bsd.port[.pre].mk twice" |
1315 |
.endif |
1315 |
.endif |
1316 |
|
1316 |
|
1317 |
_PREMKINCLUDED= yes |
1317 |
_PREMKINCLUDED= yes |
1318 |
|
1318 |
|
1319 |
.if defined(PORTVERSION) |
1319 |
.if defined(PORTVERSION) |
1320 |
.if ${PORTVERSION:M*[-_,]*}x != x |
1320 |
.if ${PORTVERSION:M*[-_,]*}x != x |
1321 |
IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' |
1321 |
IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' |
1322 |
.endif |
1322 |
.endif |
1323 |
.if defined(DISTVERSION) |
1323 |
.if defined(DISTVERSION) |
1324 |
DEV_ERROR+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME" |
1324 |
DEV_ERROR+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME" |
1325 |
.endif |
1325 |
.endif |
1326 |
DISTVERSION?= ${PORTVERSION:S/:/::/g} |
1326 |
DISTVERSION?= ${PORTVERSION:S/:/::/g} |
1327 |
.elif defined(DISTVERSION) |
1327 |
.elif defined(DISTVERSION) |
1328 |
PORTVERSION= ${DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g} |
1328 |
PORTVERSION= ${DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g} |
1329 |
.endif |
1329 |
.endif |
1330 |
|
1330 |
|
1331 |
PORTREVISION?= 0 |
1331 |
PORTREVISION?= 0 |
1332 |
.if ${PORTREVISION} != 0 |
1332 |
.if ${PORTREVISION} != 0 |
1333 |
_SUF1= _${PORTREVISION} |
1333 |
_SUF1= _${PORTREVISION} |
1334 |
.endif |
1334 |
.endif |
1335 |
|
1335 |
|
1336 |
PORTEPOCH?= 0 |
1336 |
PORTEPOCH?= 0 |
1337 |
.if ${PORTEPOCH} != 0 |
1337 |
.if ${PORTEPOCH} != 0 |
1338 |
_SUF2= ,${PORTEPOCH} |
1338 |
_SUF2= ,${PORTEPOCH} |
1339 |
.endif |
1339 |
.endif |
1340 |
|
1340 |
|
1341 |
PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} |
1341 |
PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} |
1342 |
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} |
1342 |
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} |
1343 |
DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} |
1343 |
DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} |
1344 |
DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL} |
1344 |
DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL} |
1345 |
|
1345 |
|
1346 |
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} |
1346 |
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} |
1347 |
|
1347 |
|
1348 |
.if defined(USE_XORG) || defined(XORG_CAT) |
1348 |
.if defined(USE_XORG) || defined(XORG_CAT) |
1349 |
.include "${PORTSDIR}/Mk/bsd.xorg.mk" |
1349 |
.include "${PORTSDIR}/Mk/bsd.xorg.mk" |
1350 |
.endif |
1350 |
.endif |
1351 |
|
1351 |
|
1352 |
PACKAGES?= ${PORTSDIR}/packages |
1352 |
PACKAGES?= ${PORTSDIR}/packages |
1353 |
TEMPLATES?= ${PORTSDIR}/Templates |
1353 |
TEMPLATES?= ${PORTSDIR}/Templates |
1354 |
KEYWORDS?= ${PORTSDIR}/Keywords |
1354 |
KEYWORDS?= ${PORTSDIR}/Keywords |
1355 |
|
1355 |
|
1356 |
PATCHDIR?= ${MASTERDIR}/files |
1356 |
PATCHDIR?= ${MASTERDIR}/files |
1357 |
FILESDIR?= ${MASTERDIR}/files |
1357 |
FILESDIR?= ${MASTERDIR}/files |
1358 |
SCRIPTDIR?= ${MASTERDIR}/scripts |
1358 |
SCRIPTDIR?= ${MASTERDIR}/scripts |
1359 |
PKGDIR?= ${MASTERDIR} |
1359 |
PKGDIR?= ${MASTERDIR} |
1360 |
|
1360 |
|
1361 |
PREFIX?= ${LOCALBASE} |
1361 |
PREFIX?= ${LOCALBASE} |
1362 |
|
1362 |
|
1363 |
PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg |
1363 |
PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg |
1364 |
|
1364 |
|
1365 |
.if defined(USE_LOCAL_MK) |
1365 |
.if defined(USE_LOCAL_MK) |
1366 |
.include "${PORTSDIR}/Mk/bsd.local.mk" |
1366 |
.include "${PORTSDIR}/Mk/bsd.local.mk" |
1367 |
.endif |
1367 |
.endif |
1368 |
|
1368 |
|
1369 |
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) |
1369 |
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) |
1370 |
DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" |
1370 |
DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" |
1371 |
USES+= php |
1371 |
USES+= php |
1372 |
.endif |
1372 |
.endif |
1373 |
|
1373 |
|
1374 |
.if defined(USE_JAVA) |
1374 |
.if defined(USE_JAVA) |
1375 |
.include "${PORTSDIR}/Mk/bsd.java.mk" |
1375 |
.include "${PORTSDIR}/Mk/bsd.java.mk" |
1376 |
.endif |
1376 |
.endif |
1377 |
|
1377 |
|
1378 |
.if defined(USE_RUBY) || defined(USE_LIBRUBY) |
1378 |
.if defined(USE_RUBY) || defined(USE_LIBRUBY) |
1379 |
.include "${PORTSDIR}/Mk/bsd.ruby.mk" |
1379 |
.include "${PORTSDIR}/Mk/bsd.ruby.mk" |
1380 |
.endif |
1380 |
.endif |
1381 |
|
1381 |
|
1382 |
.if defined(USE_OCAML) |
1382 |
.if defined(USE_OCAML) |
1383 |
.include "${PORTSDIR}/Mk/bsd.ocaml.mk" |
1383 |
.include "${PORTSDIR}/Mk/bsd.ocaml.mk" |
1384 |
.endif |
1384 |
.endif |
1385 |
|
1385 |
|
1386 |
.if defined(USE_APACHE_BUILD) |
1386 |
.if defined(USE_APACHE_BUILD) |
1387 |
USES+= apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g} |
1387 |
USES+= apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g} |
1388 |
.elif defined(USE_APACHE_RUN) |
1388 |
.elif defined(USE_APACHE_RUN) |
1389 |
USES+= apache:run,${USE_APACHE_RUN:C/2([0-9])/2.\1/g} |
1389 |
USES+= apache:run,${USE_APACHE_RUN:C/2([0-9])/2.\1/g} |
1390 |
.elif defined(USE_APACHE) |
1390 |
.elif defined(USE_APACHE) |
1391 |
USE_APACHE:= ${USE_APACHE:S/common/server,/} |
1391 |
USE_APACHE:= ${USE_APACHE:S/common/server,/} |
1392 |
USES+= apache:${USE_APACHE:C/2([0-9])/2.\1/g} |
1392 |
USES+= apache:${USE_APACHE:C/2([0-9])/2.\1/g} |
1393 |
.endif |
1393 |
.endif |
1394 |
|
1394 |
|
1395 |
.if defined(USE_TEX) |
1395 |
.if defined(USE_TEX) |
1396 |
.include "${PORTSDIR}/Mk/bsd.tex.mk" |
1396 |
.include "${PORTSDIR}/Mk/bsd.tex.mk" |
1397 |
.endif |
1397 |
.endif |
1398 |
|
1398 |
|
1399 |
.if defined(USE_GECKO) |
1399 |
.if defined(USE_GECKO) |
1400 |
.include "${PORTSDIR}/Mk/bsd.gecko.mk" |
1400 |
.include "${PORTSDIR}/Mk/bsd.gecko.mk" |
1401 |
.endif |
1401 |
.endif |
1402 |
|
1402 |
|
1403 |
.if (defined(USE_GNOME) || defined(INSTALLS_ICONS)) && empty(USES:Mgnome) |
1403 |
.if (defined(USE_GNOME) || defined(INSTALLS_ICONS)) && empty(USES:Mgnome) |
1404 |
DEV_WARNING+= "Using USE_GNOME alone is deprecated, please add USES=gnome." |
1404 |
DEV_WARNING+= "Using USE_GNOME alone is deprecated, please add USES=gnome." |
1405 |
USES+= gnome |
1405 |
USES+= gnome |
1406 |
.endif |
1406 |
.endif |
1407 |
|
1407 |
|
1408 |
.if defined(USE_MATE) && empty(USES:Mmate) |
1408 |
.if defined(USE_MATE) && empty(USES:Mmate) |
1409 |
DEV_WARNING+= "Using USE_MATE alone is deprecated, please add USES=mate." |
1409 |
DEV_WARNING+= "Using USE_MATE alone is deprecated, please add USES=mate." |
1410 |
USES+= mate |
1410 |
USES+= mate |
1411 |
.endif |
1411 |
.endif |
1412 |
|
1412 |
|
1413 |
.if defined(USE_GL) && (!defined(USES) || !${USES:Mgl}) |
1413 |
.if defined(USE_GL) && (!defined(USES) || !${USES:Mgl}) |
1414 |
DEV_WARNING+= "Using USE_GL alone is deprecated, please add USES=gl." |
1414 |
DEV_WARNING+= "Using USE_GL alone is deprecated, please add USES=gl." |
1415 |
USES+= gl |
1415 |
USES+= gl |
1416 |
.endif |
1416 |
.endif |
1417 |
|
1417 |
|
1418 |
.if defined(USE_SDL) && (!defined(USES) || !${USES:Msdl}) |
1418 |
.if defined(USE_SDL) && (!defined(USES) || !${USES:Msdl}) |
1419 |
DEV_WARNING+= "Using USE_SDL alone is deprecated, please add USES=sdl." |
1419 |
DEV_WARNING+= "Using USE_SDL alone is deprecated, please add USES=sdl." |
1420 |
USES+= sdl |
1420 |
USES+= sdl |
1421 |
.endif |
1421 |
.endif |
1422 |
|
1422 |
|
1423 |
.if defined(USE_MYSQL) |
1423 |
.if defined(USE_MYSQL) |
1424 |
USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} |
1424 |
USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} |
1425 |
.if defined(WANT_MYSQL_VER) |
1425 |
.if defined(WANT_MYSQL_VER) |
1426 |
.if empty(USE_MYSQL) |
1426 |
.if empty(USE_MYSQL) |
1427 |
USE_MYSQL:=${WANT_MYSQL_VER} |
1427 |
USE_MYSQL:=${WANT_MYSQL_VER} |
1428 |
.else |
1428 |
.else |
1429 |
USE_MYSQL:=${USE_MYSQL},${WANT_MYSQL_VER} |
1429 |
USE_MYSQL:=${USE_MYSQL},${WANT_MYSQL_VER} |
1430 |
.endif |
1430 |
.endif |
1431 |
.endif |
1431 |
.endif |
1432 |
USES+=mysql:${USE_MYSQL} |
1432 |
USES+=mysql:${USE_MYSQL} |
1433 |
.endif |
1433 |
.endif |
1434 |
|
1434 |
|
1435 |
.if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) |
1435 |
.if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) |
1436 |
.include "${PORTSDIR}/Mk/bsd.wx.mk" |
1436 |
.include "${PORTSDIR}/Mk/bsd.wx.mk" |
1437 |
.endif |
1437 |
.endif |
1438 |
|
1438 |
|
1439 |
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) |
1439 |
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) |
1440 |
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" |
1440 |
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" |
1441 |
.endif |
1441 |
.endif |
1442 |
|
1442 |
|
1443 |
.if !defined(UID) |
1443 |
.if !defined(UID) |
1444 |
UID!= ${ID} -u |
1444 |
UID!= ${ID} -u |
1445 |
.endif |
1445 |
.endif |
1446 |
|
1446 |
|
1447 |
DESTDIRNAME?= DESTDIR |
1447 |
DESTDIRNAME?= DESTDIR |
1448 |
|
1448 |
|
1449 |
# setup empty variables for USES targets |
1449 |
# setup empty variables for USES targets |
1450 |
.for target in sanity fetch extract patch configure build install test package stage |
1450 |
.for target in sanity fetch extract patch configure build install test package stage |
1451 |
_USES_${target}?= |
1451 |
_USES_${target}?= |
1452 |
.endfor |
1452 |
.endfor |
1453 |
|
1453 |
|
1454 |
# Loading features |
1454 |
# Loading features |
1455 |
.for f in ${USES} |
1455 |
.for f in ${USES} |
1456 |
_f:= ${f:C/\:.*//} |
1456 |
_f:= ${f:C/\:.*//} |
1457 |
.if !defined(${_f}_ARGS) |
1457 |
.if !defined(${_f}_ARGS) |
1458 |
${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} |
1458 |
${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} |
1459 |
.endif |
1459 |
.endif |
1460 |
.endfor |
1460 |
.endfor |
1461 |
.for f in ${USES} |
1461 |
.for f in ${USES} |
1462 |
.include "${USESDIR}/${f:C/\:.*//}.mk" |
1462 |
.include "${USESDIR}/${f:C/\:.*//}.mk" |
1463 |
.endfor |
1463 |
.endfor |
1464 |
|
1464 |
|
1465 |
.if !empty(FLAVORS) |
1465 |
.if !empty(FLAVORS) |
1466 |
. if ${FLAVORS:Mall} |
1466 |
. if ${FLAVORS:Mall} |
1467 |
DEV_ERROR+= "FLAVORS cannot contain 'all', it is a reserved value" |
1467 |
DEV_ERROR+= "FLAVORS cannot contain 'all', it is a reserved value" |
1468 |
. endif |
1468 |
. endif |
1469 |
. for f in ${FLAVORS} |
1469 |
. for f in ${FLAVORS} |
1470 |
. if ${f:C/[[:lower:][:digit:]_]//g} |
1470 |
. if ${f:C/[[:lower:][:digit:]_]//g} |
1471 |
_BAD_FLAVOR_NAMES+= ${f} |
1471 |
_BAD_FLAVOR_NAMES+= ${f} |
1472 |
. endif |
1472 |
. endif |
1473 |
. endfor |
1473 |
. endfor |
1474 |
. if !empty(_BAD_FLAVOR_NAMES) |
1474 |
. if !empty(_BAD_FLAVOR_NAMES) |
1475 |
DEV_ERROR+= "FLAVORS contains flavors that are not all [a-z0-9_]: ${_BAD_FLAVOR_NAMES}" |
1475 |
DEV_ERROR+= "FLAVORS contains flavors that are not all [a-z0-9_]: ${_BAD_FLAVOR_NAMES}" |
1476 |
. endif |
1476 |
. endif |
1477 |
.endif |
1477 |
.endif |
1478 |
|
1478 |
|
1479 |
.if !empty(FLAVOR) |
1479 |
.if !empty(FLAVOR) |
1480 |
. if empty(FLAVORS) |
1480 |
. if empty(FLAVORS) |
1481 |
IGNORE= FLAVOR is defined (to ${FLAVOR}) while this port does not have FLAVORS. |
1481 |
IGNORE= FLAVOR is defined (to ${FLAVOR}) while this port does not have FLAVORS. |
1482 |
. elif ! ${FLAVORS:M${FLAVOR}} |
1482 |
. elif ! ${FLAVORS:M${FLAVOR}} |
1483 |
IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS}. |
1483 |
IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS}. |
1484 |
. endif |
1484 |
. endif |
1485 |
.endif |
1485 |
.endif |
1486 |
|
1486 |
|
1487 |
.if !empty(FLAVORS) && empty(FLAVOR) |
1487 |
.if !empty(FLAVORS) && empty(FLAVOR) |
1488 |
FLAVOR= ${FLAVORS:[1]} |
1488 |
FLAVOR= ${FLAVORS:[1]} |
1489 |
.endif |
1489 |
.endif |
1490 |
|
1490 |
|
1491 |
# Reorder FLAVORS so the default is first if set by the port. |
1491 |
# Reorder FLAVORS so the default is first if set by the port. |
1492 |
.if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) |
1492 |
.if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) |
1493 |
FLAVORS:= ${FLAVOR} ${FLAVORS:N${FLAVOR}} |
1493 |
FLAVORS:= ${FLAVOR} ${FLAVORS:N${FLAVOR}} |
1494 |
.endif |
1494 |
.endif |
1495 |
|
1495 |
|
1496 |
.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) |
1496 |
.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) |
1497 |
_DID_FLAVORS_HELPERS= yes |
1497 |
_DID_FLAVORS_HELPERS= yes |
1498 |
_FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX |
1498 |
_FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX |
1499 |
_FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ |
1499 |
_FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ |
1500 |
PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \ |
1500 |
PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \ |
1501 |
FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \ |
1501 |
FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \ |
1502 |
RUN_DEPENDS TEST_DEPENDS |
1502 |
RUN_DEPENDS TEST_DEPENDS |
1503 |
# These overwrite the current value |
1503 |
# These overwrite the current value |
1504 |
.for v in ${_FLAVOR_HELPERS_OVERRIDE} |
1504 |
.for v in ${_FLAVOR_HELPERS_OVERRIDE} |
1505 |
.if defined(${FLAVOR}_${v}) |
1505 |
.if defined(${FLAVOR}_${v}) |
1506 |
${v}= ${${FLAVOR}_${v}} |
1506 |
${v}= ${${FLAVOR}_${v}} |
1507 |
.endif |
1507 |
.endif |
1508 |
.endfor |
1508 |
.endfor |
1509 |
|
1509 |
|
1510 |
# These append to the current value |
1510 |
# These append to the current value |
1511 |
.for v in ${_FLAVOR_HELPERS_APPEND} |
1511 |
.for v in ${_FLAVOR_HELPERS_APPEND} |
1512 |
.if defined(${FLAVOR}_${v}) |
1512 |
.if defined(${FLAVOR}_${v}) |
1513 |
${v}+= ${${FLAVOR}_${v}} |
1513 |
${v}+= ${${FLAVOR}_${v}} |
1514 |
.endif |
1514 |
.endif |
1515 |
.endfor |
1515 |
.endfor |
1516 |
|
1516 |
|
1517 |
.for v in BROKEN IGNORE |
1517 |
.for v in BROKEN IGNORE |
1518 |
.if defined(${FLAVOR}_${v}) |
1518 |
.if defined(${FLAVOR}_${v}) |
1519 |
${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}} |
1519 |
${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}} |
1520 |
.endif |
1520 |
.endif |
1521 |
.endfor |
1521 |
.endfor |
1522 |
.endif # defined(${FLAVOR}) |
1522 |
.endif # defined(${FLAVOR}) |
1523 |
|
1523 |
|
1524 |
|
1524 |
|
1525 |
EXTRACT_SUFX?= .tar.gz |
1525 |
EXTRACT_SUFX?= .tar.gz |
1526 |
|
1526 |
|
1527 |
.if defined(USE_LINUX_PREFIX) |
1527 |
.if defined(USE_LINUX_PREFIX) |
1528 |
PREFIX= ${LINUXBASE} |
1528 |
PREFIX= ${LINUXBASE} |
1529 |
DATADIR?= ${PREFIX}/usr/share/${PORTNAME} |
1529 |
DATADIR?= ${PREFIX}/usr/share/${PORTNAME} |
1530 |
DOCSDIR?= ${PREFIX}/usr/share/doc/${PORTNAME}-${PORTVERSION} |
1530 |
DOCSDIR?= ${PREFIX}/usr/share/doc/${PORTNAME}-${PORTVERSION} |
1531 |
NO_LICENSES_INSTALL= yes |
1531 |
NO_LICENSES_INSTALL= yes |
1532 |
NO_MTREE= yes |
1532 |
NO_MTREE= yes |
1533 |
.endif |
1533 |
.endif |
1534 |
|
1534 |
|
1535 |
# You can force skipping these test by defining IGNORE_PATH_CHECKS |
1535 |
# You can force skipping these test by defining IGNORE_PATH_CHECKS |
1536 |
.if !defined(IGNORE_PATH_CHECKS) |
1536 |
.if !defined(IGNORE_PATH_CHECKS) |
1537 |
.if ! ${PREFIX:M/*} |
1537 |
.if ! ${PREFIX:M/*} |
1538 |
.BEGIN: |
1538 |
.BEGIN: |
1539 |
@${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" |
1539 |
@${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" |
1540 |
@${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." |
1540 |
@${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." |
1541 |
@${FALSE} |
1541 |
@${FALSE} |
1542 |
.endif |
1542 |
.endif |
1543 |
.endif |
1543 |
.endif |
1544 |
|
1544 |
|
1545 |
DATADIR?= ${PREFIX}/share/${PORTNAME} |
1545 |
DATADIR?= ${PREFIX}/share/${PORTNAME} |
1546 |
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} |
1546 |
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} |
1547 |
ETCDIR?= ${PREFIX}/etc/${PORTNAME} |
1547 |
ETCDIR?= ${PREFIX}/etc/${PORTNAME} |
1548 |
EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} |
1548 |
EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} |
1549 |
WWWDIR?= ${PREFIX}/www/${PORTNAME} |
1549 |
WWWDIR?= ${PREFIX}/www/${PORTNAME} |
1550 |
|
1550 |
|
1551 |
# Owner and group of the WWW user |
1551 |
# Owner and group of the WWW user |
1552 |
WWWOWN?= www |
1552 |
WWWOWN?= www |
1553 |
WWWGRP?= www |
1553 |
WWWGRP?= www |
1554 |
|
1554 |
|
1555 |
# Keep PKGNG_ORIGIN/WITH_PKGNG for compat with scripts which are looking for it |
1555 |
# Keep PKGNG_ORIGIN/WITH_PKGNG for compat with scripts which are looking for it |
1556 |
PKG_ORIGIN?= ports-mgmt/pkg |
1556 |
PKG_ORIGIN?= ports-mgmt/pkg |
1557 |
PKGNG_ORIGIN= ${PKG_ORIGIN} |
1557 |
PKGNG_ORIGIN= ${PKG_ORIGIN} |
1558 |
WITH_PKGNG?= yes |
1558 |
WITH_PKGNG?= yes |
1559 |
WITH_PKG?= ${WITH_PKGNG} |
1559 |
WITH_PKG?= ${WITH_PKGNG} |
1560 |
|
1560 |
|
1561 |
.endif |
1561 |
.endif |
1562 |
# End of pre-makefile section. |
1562 |
# End of pre-makefile section. |
1563 |
|
1563 |
|
1564 |
# Start of post-makefile section. |
1564 |
# Start of post-makefile section. |
1565 |
.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) |
1565 |
.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) |
1566 |
|
1566 |
|
1567 |
.if defined(_POSTMKINCLUDED) |
1567 |
.if defined(_POSTMKINCLUDED) |
1568 |
DEV_ERROR+= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" |
1568 |
DEV_ERROR+= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" |
1569 |
@${FALSE} |
1569 |
@${FALSE} |
1570 |
.endif |
1570 |
.endif |
1571 |
|
1571 |
|
1572 |
_POSTMKINCLUDED= yes |
1572 |
_POSTMKINCLUDED= yes |
1573 |
|
1573 |
|
1574 |
.if defined(BUNDLE_LIBS) |
1574 |
.if defined(BUNDLE_LIBS) |
1575 |
PKG_NOTES+= no_provide_shlib |
1575 |
PKG_NOTES+= no_provide_shlib |
1576 |
PKG_NOTE_no_provide_shlib= yes |
1576 |
PKG_NOTE_no_provide_shlib= yes |
1577 |
.endif |
1577 |
.endif |
1578 |
|
1578 |
|
1579 |
.if defined(DEPRECATED) |
1579 |
.if defined(DEPRECATED) |
1580 |
PKG_NOTES+= deprecated |
1580 |
PKG_NOTES+= deprecated |
1581 |
PKG_NOTE_deprecated=${DEPRECATED} |
1581 |
PKG_NOTE_deprecated=${DEPRECATED} |
1582 |
.endif |
1582 |
.endif |
1583 |
|
1583 |
|
1584 |
.if defined(EXPIRATION_DATE) |
1584 |
.if defined(EXPIRATION_DATE) |
1585 |
PKG_NOTES+= expiration_date |
1585 |
PKG_NOTES+= expiration_date |
1586 |
PKG_NOTE_expiration_date= ${EXPIRATION_DATE} |
1586 |
PKG_NOTE_expiration_date= ${EXPIRATION_DATE} |
1587 |
.endif |
1587 |
.endif |
1588 |
|
1588 |
|
1589 |
.if !empty(FLAVOR) |
1589 |
.if !empty(FLAVOR) |
1590 |
PKG_NOTES+= flavor |
1590 |
PKG_NOTES+= flavor |
1591 |
PKG_NOTE_flavor= ${FLAVOR} |
1591 |
PKG_NOTE_flavor= ${FLAVOR} |
1592 |
.endif |
1592 |
.endif |
1593 |
|
1593 |
|
1594 |
TEST_ARGS?= ${MAKE_ARGS} |
1594 |
TEST_ARGS?= ${MAKE_ARGS} |
1595 |
TEST_ENV?= ${MAKE_ENV} |
1595 |
TEST_ENV?= ${MAKE_ENV} |
1596 |
|
1596 |
|
1597 |
PKG_ENV+= PORTSDIR=${PORTSDIR} |
1597 |
PKG_ENV+= PORTSDIR=${PORTSDIR} |
1598 |
CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ |
1598 |
CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ |
1599 |
XDG_CONFIG_HOME=${WRKDIR} \ |
1599 |
XDG_CONFIG_HOME=${WRKDIR} \ |
1600 |
HOME=${WRKDIR} |
1600 |
HOME=${WRKDIR} |
1601 |
MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ |
1601 |
MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ |
1602 |
XDG_CONFIG_HOME=${WRKDIR} \ |
1602 |
XDG_CONFIG_HOME=${WRKDIR} \ |
1603 |
HOME=${WRKDIR} |
1603 |
HOME=${WRKDIR} |
1604 |
# Respect TMPDIR passed via make.conf or similar and pass it down |
1604 |
# Respect TMPDIR passed via make.conf or similar and pass it down |
1605 |
# to configure and make. |
1605 |
# to configure and make. |
1606 |
.if defined(TMPDIR) |
1606 |
.if defined(TMPDIR) |
1607 |
MAKE_ENV+= TMPDIR="${TMPDIR}" |
1607 |
MAKE_ENV+= TMPDIR="${TMPDIR}" |
1608 |
CONFIGURE_ENV+= TMPDIR="${TMPDIR}" |
1608 |
CONFIGURE_ENV+= TMPDIR="${TMPDIR}" |
1609 |
.endif # defined(TMPDIR) |
1609 |
.endif # defined(TMPDIR) |
1610 |
|
1610 |
|
1611 |
QA_ENV+= STAGEDIR=${STAGEDIR} \ |
1611 |
QA_ENV+= STAGEDIR=${STAGEDIR} \ |
1612 |
PREFIX=${PREFIX} \ |
1612 |
PREFIX=${PREFIX} \ |
1613 |
LINUXBASE=${LINUXBASE} \ |
1613 |
LINUXBASE=${LINUXBASE} \ |
1614 |
LOCALBASE=${LOCALBASE} \ |
1614 |
LOCALBASE=${LOCALBASE} \ |
1615 |
"STRIP=${STRIP}" \ |
1615 |
"STRIP=${STRIP}" \ |
1616 |
TMPPLIST=${TMPPLIST} \ |
1616 |
TMPPLIST=${TMPPLIST} \ |
1617 |
CURDIR='${.CURDIR}' \ |
1617 |
CURDIR='${.CURDIR}' \ |
1618 |
FLAVOR=${FLAVOR} \ |
1618 |
FLAVOR=${FLAVOR} \ |
1619 |
FLAVORS='${FLAVORS}' \ |
1619 |
FLAVORS='${FLAVORS}' \ |
1620 |
BUNDLE_LIBS=${BUNDLE_LIBS} \ |
1620 |
BUNDLE_LIBS=${BUNDLE_LIBS} \ |
1621 |
LDCONFIG_DIR="${LDCONFIG_DIR}" \ |
1621 |
LDCONFIG_DIR="${LDCONFIG_DIR}" \ |
1622 |
PKGORIGIN=${PKGORIGIN} \ |
1622 |
PKGORIGIN=${PKGORIGIN} \ |
1623 |
LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ |
1623 |
LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ |
1624 |
UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ |
1624 |
UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ |
1625 |
PKGBASE=${PKGBASE} \ |
1625 |
PKGBASE=${PKGBASE} \ |
1626 |
LICENSE="${LICENSE}" \ |
1626 |
LICENSE="${LICENSE}" \ |
1627 |
LICENSE_PERMS="${_LICENSE_PERMS}" \ |
1627 |
LICENSE_PERMS="${_LICENSE_PERMS}" \ |
1628 |
DISABLE_LICENSES="${DISABLE_LICENSES:Dyes}" \ |
1628 |
DISABLE_LICENSES="${DISABLE_LICENSES:Dyes}" \ |
1629 |
PORTNAME=${PORTNAME} \ |
1629 |
PORTNAME=${PORTNAME} \ |
1630 |
NO_ARCH=${NO_ARCH} \ |
1630 |
NO_ARCH=${NO_ARCH} \ |
1631 |
"NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" \ |
1631 |
"NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" \ |
1632 |
USE_RUBY=${USE_RUBY} |
1632 |
USE_RUBY=${USE_RUBY} |
1633 |
.if !empty(USES:Mssl) |
1633 |
.if !empty(USES:Mssl) |
1634 |
QA_ENV+= USESSSL=yes |
1634 |
QA_ENV+= USESSSL=yes |
1635 |
.endif |
1635 |
.endif |
1636 |
.if !empty(USES:Mdesktop-file-utils) |
1636 |
.if !empty(USES:Mdesktop-file-utils) |
1637 |
QA_ENV+= USESDESKTOPFILEUTILS=yes |
1637 |
QA_ENV+= USESDESKTOPFILEUTILS=yes |
1638 |
.endif |
1638 |
.endif |
1639 |
.if !empty(USES:Mlibtool*) |
1639 |
.if !empty(USES:Mlibtool*) |
1640 |
QA_ENV+= USESLIBTOOL=yes |
1640 |
QA_ENV+= USESLIBTOOL=yes |
1641 |
.endif |
1641 |
.endif |
1642 |
.if !empty(USES:Mshared-mime-info) |
1642 |
.if !empty(USES:Mshared-mime-info) |
1643 |
QA_ENV+= USESSHAREDMIMEINFO=yes |
1643 |
QA_ENV+= USESSHAREDMIMEINFO=yes |
1644 |
.endif |
1644 |
.endif |
1645 |
.if !empty(USES:Mterminfo) |
1645 |
.if !empty(USES:Mterminfo) |
1646 |
QA_ENV+= USESTERMINFO=yes |
1646 |
QA_ENV+= USESTERMINFO=yes |
1647 |
.endif |
1647 |
.endif |
1648 |
|
1648 |
|
1649 |
CO_ENV+= STAGEDIR=${STAGEDIR} \ |
1649 |
CO_ENV+= STAGEDIR=${STAGEDIR} \ |
1650 |
PREFIX=${PREFIX} \ |
1650 |
PREFIX=${PREFIX} \ |
1651 |
LOCALBASE=${LOCALBASE} \ |
1651 |
LOCALBASE=${LOCALBASE} \ |
1652 |
WRKDIR=${WRKDIR} \ |
1652 |
WRKDIR=${WRKDIR} \ |
1653 |
WRKSRC=${WRKSRC} \ |
1653 |
WRKSRC=${WRKSRC} \ |
1654 |
MTREE_FILE=${MTREE_FILE} \ |
1654 |
MTREE_FILE=${MTREE_FILE} \ |
1655 |
TMPPLIST=${TMPPLIST} \ |
1655 |
TMPPLIST=${TMPPLIST} \ |
1656 |
SCRIPTSDIR=${SCRIPTSDIR} \ |
1656 |
SCRIPTSDIR=${SCRIPTSDIR} \ |
1657 |
PLIST_SUB_SED="${PLIST_SUB_SED}" \ |
1657 |
PLIST_SUB_SED="${PLIST_SUB_SED}" \ |
1658 |
PORT_OPTIONS="${PORT_OPTIONS}" \ |
1658 |
PORT_OPTIONS="${PORT_OPTIONS}" \ |
1659 |
PORTSDIR="${PORTSDIR}" |
1659 |
PORTSDIR="${PORTSDIR}" |
1660 |
|
1660 |
|
1661 |
.if defined(CROSS_SYSROOT) |
1661 |
.if defined(CROSS_SYSROOT) |
1662 |
PKG_ENV+= ABI_FILE=${CROSS_SYSROOT}/bin/sh |
1662 |
PKG_ENV+= ABI_FILE=${CROSS_SYSROOT}/bin/sh |
1663 |
MAKE_ENV+= NM=${NM} \ |
1663 |
MAKE_ENV+= NM=${NM} \ |
1664 |
STRIPBIN=${STRIPBIN} \ |
1664 |
STRIPBIN=${STRIPBIN} \ |
1665 |
PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" |
1665 |
PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" |
1666 |
CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" |
1666 |
CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" |
1667 |
.endif |
1667 |
.endif |
1668 |
|
1668 |
|
1669 |
.if empty(FLAVOR) |
1669 |
.if empty(FLAVOR) |
1670 |
_WRKDIR= work |
1670 |
_WRKDIR= work |
1671 |
.else |
1671 |
.else |
1672 |
_WRKDIR= work-${FLAVOR} |
1672 |
_WRKDIR= work-${FLAVOR} |
1673 |
.endif |
1673 |
.endif |
1674 |
|
1674 |
|
1675 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} |
1675 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} |
1676 |
BINARY_LINKDIR= ${WRKDIR}/.bin |
1676 |
BINARY_LINKDIR= ${WRKDIR}/.bin |
1677 |
PATH:= ${BINARY_LINKDIR}:${PATH} |
1677 |
PATH:= ${BINARY_LINKDIR}:${PATH} |
1678 |
.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} |
1678 |
.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} |
1679 |
MAKE_ENV+= PATH=${PATH} |
1679 |
MAKE_ENV+= PATH=${PATH} |
1680 |
CONFIGURE_ENV+= PATH=${PATH} |
1680 |
CONFIGURE_ENV+= PATH=${PATH} |
1681 |
.endif |
1681 |
.endif |
1682 |
|
1682 |
|
1683 |
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) |
1683 |
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) |
1684 |
.if defined(WRKSRC) |
1684 |
.if defined(WRKSRC) |
1685 |
DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly, set WRKSRC_SUBDIR or remove WRKSRC entirely." |
1685 |
DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly, set WRKSRC_SUBDIR or remove WRKSRC entirely." |
1686 |
.endif |
1686 |
.endif |
1687 |
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} |
1687 |
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} |
1688 |
.endif |
1688 |
.endif |
1689 |
|
1689 |
|
1690 |
.if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault) |
1690 |
.if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault) |
1691 |
WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT}-${GL_COMMIT} |
1691 |
WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT}-${GL_COMMIT} |
1692 |
.endif |
1692 |
.endif |
1693 |
|
1693 |
|
1694 |
# If the distname is not extracting into a specific subdirectory, have the |
1694 |
# If the distname is not extracting into a specific subdirectory, have the |
1695 |
# ports framework force extract into a subdirectory so that metadata files |
1695 |
# ports framework force extract into a subdirectory so that metadata files |
1696 |
# do not get in the way of the build, and vice-versa. |
1696 |
# do not get in the way of the build, and vice-versa. |
1697 |
.if defined(NO_WRKSUBDIR) |
1697 |
.if defined(NO_WRKSUBDIR) |
1698 |
# Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, |
1698 |
# Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, |
1699 |
# the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the |
1699 |
# the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the |
1700 |
# most unlikely to conflict as we can. |
1700 |
# most unlikely to conflict as we can. |
1701 |
WRKSRC?= ${WRKDIR}/${PKGNAME} |
1701 |
WRKSRC?= ${WRKDIR}/${PKGNAME} |
1702 |
EXTRACT_WRKDIR:= ${WRKSRC} |
1702 |
EXTRACT_WRKDIR:= ${WRKSRC} |
1703 |
.else |
1703 |
.else |
1704 |
WRKSRC?= ${WRKDIR}/${DISTNAME} |
1704 |
WRKSRC?= ${WRKDIR}/${DISTNAME} |
1705 |
EXTRACT_WRKDIR:= ${WRKDIR} |
1705 |
EXTRACT_WRKDIR:= ${WRKDIR} |
1706 |
.endif |
1706 |
.endif |
1707 |
.if defined(WRKSRC_SUBDIR) |
1707 |
.if defined(WRKSRC_SUBDIR) |
1708 |
WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} |
1708 |
WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} |
1709 |
.endif |
1709 |
.endif |
1710 |
|
1710 |
|
1711 |
.if defined(CONFIGURE_OUTSOURCE) |
1711 |
.if defined(CONFIGURE_OUTSOURCE) |
1712 |
CONFIGURE_CMD?= ${WRKSRC}/${CONFIGURE_SCRIPT} |
1712 |
CONFIGURE_CMD?= ${WRKSRC}/${CONFIGURE_SCRIPT} |
1713 |
CONFIGURE_WRKSRC?= ${WRKDIR}/.build |
1713 |
CONFIGURE_WRKSRC?= ${WRKDIR}/.build |
1714 |
BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} |
1714 |
BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} |
1715 |
INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} |
1715 |
INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} |
1716 |
TEST_WRKSRC?= ${CONFIGURE_WRKSRC} |
1716 |
TEST_WRKSRC?= ${CONFIGURE_WRKSRC} |
1717 |
.endif |
1717 |
.endif |
1718 |
|
1718 |
|
1719 |
PATCH_WRKSRC?= ${WRKSRC} |
1719 |
PATCH_WRKSRC?= ${WRKSRC} |
1720 |
CONFIGURE_WRKSRC?= ${WRKSRC} |
1720 |
CONFIGURE_WRKSRC?= ${WRKSRC} |
1721 |
BUILD_WRKSRC?= ${WRKSRC} |
1721 |
BUILD_WRKSRC?= ${WRKSRC} |
1722 |
INSTALL_WRKSRC?=${WRKSRC} |
1722 |
INSTALL_WRKSRC?=${WRKSRC} |
1723 |
TEST_WRKSRC?= ${WRKSRC} |
1723 |
TEST_WRKSRC?= ${WRKSRC} |
1724 |
|
1724 |
|
1725 |
PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ |
1725 |
PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ |
1726 |
RESETPREFIX=${PREFIX} |
1726 |
RESETPREFIX=${PREFIX} |
1727 |
SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ |
1727 |
SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ |
1728 |
DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ |
1728 |
DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ |
1729 |
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} |
1729 |
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} |
1730 |
# This is used for check-stagedir.sh and check_leftover.sh to replace |
1730 |
# This is used for check-stagedir.sh and check_leftover.sh to replace |
1731 |
# directories/files with PLIST_SUB %%KEYS%%. |
1731 |
# directories/files with PLIST_SUB %%KEYS%%. |
1732 |
# Remove VARS which values are PLIST_SUB_SED_MIN long or shorter |
1732 |
# Remove VARS which values are PLIST_SUB_SED_MIN long or shorter |
1733 |
PLIST_SUB_SED_MIN?= 2 |
1733 |
PLIST_SUB_SED_MIN?= 2 |
1734 |
PLIST_SUB_SED_tmp1= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g} |
1734 |
PLIST_SUB_SED_tmp1= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g} |
1735 |
# Remove VARS that are too generic |
1735 |
# Remove VARS that are too generic |
1736 |
# Remove empty values |
1736 |
# Remove empty values |
1737 |
# Remove @comment values |
1737 |
# Remove @comment values |
1738 |
PLIST_SUB_SED_tmp2= ${PLIST_SUB_SED_tmp1:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*} |
1738 |
PLIST_SUB_SED_tmp2= ${PLIST_SUB_SED_tmp1:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*} |
1739 |
# Handle VARS for which there is a _regex entry |
1739 |
# Handle VARS for which there is a _regex entry |
1740 |
PLIST_SUB_SED_tmp3?= ${PLIST_SUB_SED_tmp2:C/(${PLIST_SUB:M*_regex=*:C/_regex=.*/=.*/:Q:S/\\ /|/g:S/\\//g})//:C/(.*)_regex=(.*)/\1=\2/} |
1740 |
PLIST_SUB_SED_tmp3?= ${PLIST_SUB_SED_tmp2:C/(${PLIST_SUB:M*_regex=*:C/_regex=.*/=.*/:Q:S/\\ /|/g:S/\\//g})//:C/(.*)_regex=(.*)/\1=\2/} |
1741 |
# Remove quotes |
1741 |
# Remove quotes |
1742 |
# Replace . with \. for later sed(1) usage |
1742 |
# Replace . with \. for later sed(1) usage |
1743 |
PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g} |
1743 |
PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g} |
1744 |
|
1744 |
|
1745 |
# kludge to strip trailing whitespace from CFLAGS; |
1745 |
# kludge to strip trailing whitespace from CFLAGS; |
1746 |
# sub-configure will not # survive double space |
1746 |
# sub-configure will not # survive double space |
1747 |
CFLAGS:= ${CFLAGS:C/ $//} |
1747 |
CFLAGS:= ${CFLAGS:C/ $//} |
1748 |
|
1748 |
|
1749 |
.if defined(WITHOUT_CPU_CFLAGS) |
1749 |
.if defined(WITHOUT_CPU_CFLAGS) |
1750 |
.if defined(_CPUCFLAGS) |
1750 |
.if defined(_CPUCFLAGS) |
1751 |
.if !empty(_CPUCFLAGS) |
1751 |
.if !empty(_CPUCFLAGS) |
1752 |
CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} |
1752 |
CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} |
1753 |
.endif |
1753 |
.endif |
1754 |
.endif |
1754 |
.endif |
1755 |
.endif |
1755 |
.endif |
1756 |
|
1756 |
|
1757 |
# Reset value from bsd.own.mk. |
1757 |
# Reset value from bsd.own.mk. |
1758 |
.if defined(WITH_DEBUG) |
1758 |
.if defined(WITH_DEBUG) |
1759 |
.if !defined(INSTALL_STRIPPED) |
1759 |
.if !defined(INSTALL_STRIPPED) |
1760 |
STRIP= #none |
1760 |
STRIP= #none |
1761 |
MAKE_ENV+= DONTSTRIP=yes |
1761 |
MAKE_ENV+= DONTSTRIP=yes |
1762 |
STRIP_CMD= ${TRUE} |
1762 |
STRIP_CMD= ${TRUE} |
1763 |
.endif |
1763 |
.endif |
1764 |
DEBUG_FLAGS?= -g |
1764 |
DEBUG_FLAGS?= -g |
1765 |
CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} |
1765 |
CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} |
1766 |
.if defined(INSTALL_TARGET) |
1766 |
.if defined(INSTALL_TARGET) |
1767 |
INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} |
1767 |
INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} |
1768 |
.endif |
1768 |
.endif |
1769 |
.endif |
1769 |
.endif |
1770 |
|
1770 |
|
1771 |
.if !defined(WITHOUT_SSP) |
1771 |
.if !defined(WITHOUT_SSP) |
1772 |
.include "${PORTSDIR}/Mk/bsd.ssp.mk" |
1772 |
.include "${PORTSDIR}/Mk/bsd.ssp.mk" |
1773 |
.endif |
1773 |
.endif |
1774 |
|
1774 |
|
1775 |
# XXX PIE support to be added here |
1775 |
# XXX PIE support to be added here |
1776 |
MAKE_ENV+= NO_PIE=yes |
1776 |
MAKE_ENV+= NO_PIE=yes |
1777 |
# We will control debug files. Don't let builds that use /usr/share/mk |
1777 |
# We will control debug files. Don't let builds that use /usr/share/mk |
1778 |
# split out debug symbols since the plist won't know to expect it. |
1778 |
# split out debug symbols since the plist won't know to expect it. |
1779 |
MAKE_ENV+= MK_DEBUG_FILES=no |
1779 |
MAKE_ENV+= MK_DEBUG_FILES=no |
1780 |
MAKE_ENV+= MK_KERNEL_SYMBOLS=no |
1780 |
MAKE_ENV+= MK_KERNEL_SYMBOLS=no |
1781 |
|
1781 |
|
1782 |
CONFIGURE_SHELL?= ${SH} |
1782 |
CONFIGURE_SHELL?= ${SH} |
1783 |
MAKE_SHELL?= ${SH} |
1783 |
MAKE_SHELL?= ${SH} |
1784 |
|
1784 |
|
1785 |
CONFIGURE_ENV+= SHELL=${CONFIGURE_SHELL} CONFIG_SHELL=${CONFIGURE_SHELL} |
1785 |
CONFIGURE_ENV+= SHELL=${CONFIGURE_SHELL} CONFIG_SHELL=${CONFIGURE_SHELL} |
1786 |
MAKE_ENV+= SHELL=${MAKE_SHELL} NO_LINT=YES |
1786 |
MAKE_ENV+= SHELL=${MAKE_SHELL} NO_LINT=YES |
1787 |
|
1787 |
|
1788 |
.if defined(PATCHFILES) && ${PATCHFILES:M*.zip} |
1788 |
.if defined(PATCHFILES) && ${PATCHFILES:M*.zip} |
1789 |
PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip |
1789 |
PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip |
1790 |
.endif |
1790 |
.endif |
1791 |
|
1791 |
|
1792 |
# Check the compatibility layer for amd64 |
1792 |
# Check the compatibility layer for amd64 |
1793 |
|
1793 |
|
1794 |
.if ${ARCH} == "amd64" |
1794 |
.if ${ARCH} == "amd64" |
1795 |
.if exists(/usr/lib32) |
1795 |
.if exists(/usr/lib32) |
1796 |
HAVE_COMPAT_IA32_LIBS?= YES |
1796 |
HAVE_COMPAT_IA32_LIBS?= YES |
1797 |
.endif |
1797 |
.endif |
1798 |
.if !defined(HAVE_COMPAT_IA32_KERN) |
1798 |
.if !defined(HAVE_COMPAT_IA32_KERN) |
1799 |
HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo |
1799 |
HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo |
1800 |
.if empty(HAVE_COMPAT_IA32_KERN) |
1800 |
.if empty(HAVE_COMPAT_IA32_KERN) |
1801 |
.undef HAVE_COMPAT_IA32_KERN |
1801 |
.undef HAVE_COMPAT_IA32_KERN |
1802 |
.endif |
1802 |
.endif |
1803 |
.endif |
1803 |
.endif |
1804 |
.endif |
1804 |
.endif |
1805 |
_EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN |
1805 |
_EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN |
1806 |
|
1806 |
|
1807 |
.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" |
1807 |
.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" |
1808 |
.if ${ARCH} == "amd64" |
1808 |
.if ${ARCH} == "amd64" |
1809 |
.if !defined(HAVE_COMPAT_IA32_KERN) |
1809 |
.if !defined(HAVE_COMPAT_IA32_KERN) |
1810 |
IGNORE= requires a kernel with compiled-in IA32 compatibility |
1810 |
IGNORE= requires a kernel with compiled-in IA32 compatibility |
1811 |
.elif !defined(HAVE_COMPAT_IA32_LIBS) |
1811 |
.elif !defined(HAVE_COMPAT_IA32_LIBS) |
1812 |
IGNORE= requires 32-bit libraries installed under /usr/lib32 |
1812 |
IGNORE= requires 32-bit libraries installed under /usr/lib32 |
1813 |
.endif |
1813 |
.endif |
1814 |
_LDCONFIG_FLAGS=-32 |
1814 |
_LDCONFIG_FLAGS=-32 |
1815 |
LIB32DIR= lib32 |
1815 |
LIB32DIR= lib32 |
1816 |
.else |
1816 |
.else |
1817 |
IGNORE= requires i386 (or compatible) platform to run |
1817 |
IGNORE= requires i386 (or compatible) platform to run |
1818 |
.endif |
1818 |
.endif |
1819 |
.else |
1819 |
.else |
1820 |
LIB32DIR= lib |
1820 |
LIB32DIR= lib |
1821 |
.endif |
1821 |
.endif |
1822 |
PLIST_SUB+= LIB32DIR=${LIB32DIR} |
1822 |
PLIST_SUB+= LIB32DIR=${LIB32DIR} |
1823 |
|
1823 |
|
1824 |
.if ${WITH_PKG} == devel |
1824 |
.if ${WITH_PKG} == devel |
1825 |
PKG_ORIGIN= ports-mgmt/pkg-devel |
1825 |
PKG_ORIGIN= ports-mgmt/pkg-devel |
1826 |
.endif |
1826 |
.endif |
1827 |
|
1827 |
|
1828 |
.if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) |
1828 |
.if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) |
1829 |
PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} |
1829 |
PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} |
1830 |
.endif |
1830 |
.endif |
1831 |
|
1831 |
|
1832 |
.if defined(USE_GCC) |
1832 |
.if defined(USE_GCC) |
1833 |
.include "${PORTSDIR}/Mk/bsd.gcc.mk" |
1833 |
.include "${PORTSDIR}/Mk/bsd.gcc.mk" |
1834 |
.endif |
1834 |
.endif |
1835 |
|
1835 |
|
1836 |
.if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld |
1836 |
.if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld |
1837 |
LDFLAGS+= -fuse-ld=bfd |
1837 |
LDFLAGS+= -fuse-ld=bfd |
1838 |
BINARY_ALIAS+= ld=${LD} |
1838 |
BINARY_ALIAS+= ld=${LD} |
1839 |
. if !defined(USE_BINUTILS) |
1839 |
. if !defined(USE_BINUTILS) |
1840 |
. if exists(/usr/bin/ld.bfd) |
1840 |
. if exists(/usr/bin/ld.bfd) |
1841 |
LD= /usr/bin/ld.bfd |
1841 |
LD= /usr/bin/ld.bfd |
1842 |
CONFIGURE_ENV+= LD=${LD} |
1842 |
CONFIGURE_ENV+= LD=${LD} |
1843 |
MAKE_ENV+= LD=${LD} |
1843 |
MAKE_ENV+= LD=${LD} |
1844 |
. else |
1844 |
. else |
1845 |
USE_BINUTILS= yes |
1845 |
USE_BINUTILS= yes |
1846 |
. endif |
1846 |
. endif |
1847 |
. endif |
1847 |
. endif |
1848 |
.endif |
1848 |
.endif |
1849 |
|
1849 |
|
1850 |
.if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) |
1850 |
.if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) |
1851 |
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils |
1851 |
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils |
1852 |
BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ |
1852 |
BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ |
1853 |
READELF SIZE STRINGS |
1853 |
READELF SIZE STRINGS |
1854 |
BINUTILS_NO_MAKE_ENV?= |
1854 |
BINUTILS_NO_MAKE_ENV?= |
1855 |
. for b in ${BINUTILS} |
1855 |
. for b in ${BINUTILS} |
1856 |
${b}= ${LOCALBASE}/bin/${b:C/PP/++/:tl} |
1856 |
${b}= ${LOCALBASE}/bin/${b:C/PP/++/:tl} |
1857 |
. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) |
1857 |
. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) |
1858 |
CONFIGURE_ENV+= ${b}="${${b}}" |
1858 |
CONFIGURE_ENV+= ${b}="${${b}}" |
1859 |
. endif |
1859 |
. endif |
1860 |
. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" |
1860 |
. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" |
1861 |
MAKE_ENV+= ${b}="${${b}}" |
1861 |
MAKE_ENV+= ${b}="${${b}}" |
1862 |
. endif |
1862 |
. endif |
1863 |
. endfor |
1863 |
. endfor |
1864 |
.endif |
1864 |
.endif |
1865 |
|
1865 |
|
1866 |
.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) |
1866 |
.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) |
1867 |
.include "${PORTSDIR}/Mk/bsd.ldap.mk" |
1867 |
.include "${PORTSDIR}/Mk/bsd.ldap.mk" |
1868 |
.endif |
1868 |
.endif |
1869 |
|
1869 |
|
1870 |
.if defined(USE_RC_SUBR) |
1870 |
.if defined(USE_RC_SUBR) |
1871 |
SUB_FILES+= ${USE_RC_SUBR} |
1871 |
SUB_FILES+= ${USE_RC_SUBR} |
1872 |
.endif |
1872 |
.endif |
1873 |
|
1873 |
|
1874 |
.if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" |
1874 |
.if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" |
1875 |
USE_LDCONFIG= ${PREFIX}/lib |
1875 |
USE_LDCONFIG= ${PREFIX}/lib |
1876 |
.endif |
1876 |
.endif |
1877 |
.if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" |
1877 |
.if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" |
1878 |
IGNORE= has USE_LDCONFIG32 set to yes, which is not correct |
1878 |
IGNORE= has USE_LDCONFIG32 set to yes, which is not correct |
1879 |
.endif |
1879 |
.endif |
1880 |
|
1880 |
|
1881 |
PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' |
1881 |
PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' |
1882 |
|
1882 |
|
1883 |
.if defined(_DESTDIR_VIA_ENV) |
1883 |
.if defined(_DESTDIR_VIA_ENV) |
1884 |
MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} |
1884 |
MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} |
1885 |
.else |
1885 |
.else |
1886 |
MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} |
1886 |
MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} |
1887 |
.endif |
1887 |
.endif |
1888 |
|
1888 |
|
1889 |
.if defined(NO_PREFIX_RMDIR) |
1889 |
.if defined(NO_PREFIX_RMDIR) |
1890 |
CO_ENV+= NO_PREFIX_RMDIR=1 |
1890 |
CO_ENV+= NO_PREFIX_RMDIR=1 |
1891 |
.else |
1891 |
.else |
1892 |
CO_ENV+= NO_PREFIX_RMDIR=0 |
1892 |
CO_ENV+= NO_PREFIX_RMDIR=0 |
1893 |
.endif |
1893 |
.endif |
1894 |
|
1894 |
|
1895 |
|
1895 |
|
1896 |
METADIR= ${WRKDIR}/.metadir |
1896 |
METADIR= ${WRKDIR}/.metadir |
1897 |
|
1897 |
|
1898 |
PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install |
1898 |
PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install |
1899 |
PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install |
1899 |
PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install |
1900 |
PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall |
1900 |
PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall |
1901 |
PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall |
1901 |
PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall |
1902 |
PKGPREUPGRADE?= ${PKGDIR}/pkg-pre-upgrade |
1902 |
PKGPREUPGRADE?= ${PKGDIR}/pkg-pre-upgrade |
1903 |
PKGPOSTUPGRADE?= ${PKGDIR}/pkg-post-upgrade |
1903 |
PKGPOSTUPGRADE?= ${PKGDIR}/pkg-post-upgrade |
1904 |
PKGUPGRADE?= ${PKGDIR}/pkg-upgrade |
1904 |
PKGUPGRADE?= ${PKGDIR}/pkg-upgrade |
1905 |
|
1905 |
|
1906 |
_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ |
1906 |
_FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ |
1907 |
fonts.dir fonts.scale gtk-update-icon-cache \ |
1907 |
fonts.dir fonts.scale gtk-update-icon-cache \ |
1908 |
gio-querymodules \ |
1908 |
gio-querymodules \ |
1909 |
gtk-query-immodules \ |
1909 |
gtk-query-immodules \ |
1910 |
ldconfig \ |
1910 |
ldconfig \ |
1911 |
load-octave-pkg \ |
1911 |
load-octave-pkg \ |
1912 |
ocamlfind \ |
1912 |
ocamlfind \ |
1913 |
update-desktop-database update-mime-database \ |
1913 |
update-desktop-database update-mime-database \ |
1914 |
gdk-pixbuf-query-loaders catalog.ports \ |
1914 |
gdk-pixbuf-query-loaders catalog.ports \ |
1915 |
glib-compile-schemas \ |
1915 |
glib-compile-schemas \ |
1916 |
ccache-update-links |
1916 |
ccache-update-links |
1917 |
|
1917 |
|
1918 |
.if defined(USE_LOCAL_MK) |
1918 |
.if defined(USE_LOCAL_MK) |
1919 |
.include "${PORTSDIR}/Mk/bsd.local.mk" |
1919 |
.include "${PORTSDIR}/Mk/bsd.local.mk" |
1920 |
.endif |
1920 |
.endif |
1921 |
|
1921 |
|
1922 |
.if defined(USE_XORG) || defined(XORG_CAT) |
1922 |
.if defined(USE_XORG) || defined(XORG_CAT) |
1923 |
.include "${PORTSDIR}/Mk/bsd.xorg.mk" |
1923 |
.include "${PORTSDIR}/Mk/bsd.xorg.mk" |
1924 |
.endif |
1924 |
.endif |
1925 |
|
1925 |
|
1926 |
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) |
1926 |
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) |
1927 |
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" |
1927 |
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" |
1928 |
.endif |
1928 |
.endif |
1929 |
|
1929 |
|
1930 |
.if defined(USE_JAVA) |
1930 |
.if defined(USE_JAVA) |
1931 |
.include "${PORTSDIR}/Mk/bsd.java.mk" |
1931 |
.include "${PORTSDIR}/Mk/bsd.java.mk" |
1932 |
.endif |
1932 |
.endif |
1933 |
|
1933 |
|
1934 |
.if defined(USE_OCAML) |
1934 |
.if defined(USE_OCAML) |
1935 |
.include "${PORTSDIR}/Mk/bsd.ocaml.mk" |
1935 |
.include "${PORTSDIR}/Mk/bsd.ocaml.mk" |
1936 |
.endif |
1936 |
.endif |
1937 |
|
1937 |
|
1938 |
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) |
1938 |
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) |
1939 |
DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" |
1939 |
DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" |
1940 |
_USES_POST+= php |
1940 |
_USES_POST+= php |
1941 |
.endif |
1941 |
.endif |
1942 |
|
1942 |
|
1943 |
.if defined(USE_WX) || defined(USE_WX_NOT) |
1943 |
.if defined(USE_WX) || defined(USE_WX_NOT) |
1944 |
.include "${PORTSDIR}/Mk/bsd.wx.mk" |
1944 |
.include "${PORTSDIR}/Mk/bsd.wx.mk" |
1945 |
.endif |
1945 |
.endif |
1946 |
|
1946 |
|
1947 |
.if defined(USE_GECKO) |
1947 |
.if defined(USE_GECKO) |
1948 |
.include "${PORTSDIR}/Mk/bsd.gecko.mk" |
1948 |
.include "${PORTSDIR}/Mk/bsd.gecko.mk" |
1949 |
.endif |
1949 |
.endif |
1950 |
|
1950 |
|
1951 |
.if exists(${PORTSDIR}/Makefile.inc) |
1951 |
.if exists(${PORTSDIR}/Makefile.inc) |
1952 |
.include "${PORTSDIR}/Makefile.inc" |
1952 |
.include "${PORTSDIR}/Makefile.inc" |
1953 |
USE_SUBMAKE= yes |
1953 |
USE_SUBMAKE= yes |
1954 |
.endif |
1954 |
.endif |
1955 |
|
1955 |
|
1956 |
# Loading features |
1956 |
# Loading features |
1957 |
.for f in ${_USES_POST} |
1957 |
.for f in ${_USES_POST} |
1958 |
_f:= ${f:C/\:.*//} |
1958 |
_f:= ${f:C/\:.*//} |
1959 |
.if !defined(${_f}_ARGS) |
1959 |
.if !defined(${_f}_ARGS) |
1960 |
${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} |
1960 |
${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} |
1961 |
.endif |
1961 |
.endif |
1962 |
.endfor |
1962 |
.endfor |
1963 |
.for f in ${_USES_POST} |
1963 |
.for f in ${_USES_POST} |
1964 |
.include "${USESDIR}/${f:C/\:.*//}.mk" |
1964 |
.include "${USESDIR}/${f:C/\:.*//}.mk" |
1965 |
.endfor |
1965 |
.endfor |
1966 |
|
1966 |
|
1967 |
.if defined(PORTNAME) |
1967 |
.if defined(PORTNAME) |
1968 |
.include "${PORTSDIR}/Mk/bsd.sanity.mk" |
1968 |
.include "${PORTSDIR}/Mk/bsd.sanity.mk" |
1969 |
.endif |
1969 |
.endif |
1970 |
|
1970 |
|
1971 |
.if defined(USE_LOCALE) |
1971 |
.if defined(USE_LOCALE) |
1972 |
CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} |
1972 |
CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} |
1973 |
MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} |
1973 |
MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} |
1974 |
.endif |
1974 |
.endif |
1975 |
|
1975 |
|
1976 |
.if defined(USE_XORG) |
1976 |
.if defined(USE_XORG) |
1977 |
# Add explicit X options to avoid problems with false positives in configure |
1977 |
# Add explicit X options to avoid problems with false positives in configure |
1978 |
.if defined(GNU_CONFIGURE) |
1978 |
.if defined(GNU_CONFIGURE) |
1979 |
CONFIGURE_ARGS+=--x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include |
1979 |
CONFIGURE_ARGS+=--x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include |
1980 |
.endif |
1980 |
.endif |
1981 |
.endif |
1981 |
.endif |
1982 |
|
1982 |
|
1983 |
# Macro for doing in-place file editing using regexps |
1983 |
# Macro for doing in-place file editing using regexps |
1984 |
REINPLACE_ARGS?= -i.bak |
1984 |
REINPLACE_ARGS?= -i.bak |
1985 |
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} |
1985 |
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} |
1986 |
|
1986 |
|
1987 |
# Names of cookies used to skip already completed stages |
1987 |
# Names of cookies used to skip already completed stages |
1988 |
EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1988 |
EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1989 |
CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1989 |
CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1990 |
INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1990 |
INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1991 |
BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1991 |
BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1992 |
PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1992 |
PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1993 |
PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1993 |
PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1994 |
STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1994 |
STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} |
1995 |
|
1995 |
|
1996 |
# How to do nothing. Override if you, for some strange reason, would rather |
1996 |
# How to do nothing. Override if you, for some strange reason, would rather |
1997 |
# do something. |
1997 |
# do something. |
1998 |
DO_NADA?= ${TRUE} |
1998 |
DO_NADA?= ${TRUE} |
1999 |
|
1999 |
|
2000 |
# Use this as the first operand to always build dependency. |
2000 |
# Use this as the first operand to always build dependency. |
2001 |
NONEXISTENT?= /nonexistent |
2001 |
NONEXISTENT?= /nonexistent |
2002 |
|
2002 |
|
2003 |
CHECKSUM_ALGORITHMS?= sha256 |
2003 |
CHECKSUM_ALGORITHMS?= sha256 |
2004 |
|
2004 |
|
2005 |
DISTINFO_FILE?= ${MASTERDIR}/distinfo |
2005 |
DISTINFO_FILE?= ${MASTERDIR}/distinfo |
2006 |
|
2006 |
|
2007 |
MAKE_FLAGS?= -f |
2007 |
MAKE_FLAGS?= -f |
2008 |
MAKEFILE?= Makefile |
2008 |
MAKEFILE?= Makefile |
2009 |
MAKE_CMD?= ${BSDMAKE} |
2009 |
MAKE_CMD?= ${BSDMAKE} |
2010 |
MAKE_ENV+= PREFIX=${PREFIX} \ |
2010 |
MAKE_ENV+= PREFIX=${PREFIX} \ |
2011 |
LOCALBASE=${LOCALBASE} \ |
2011 |
LOCALBASE=${LOCALBASE} \ |
2012 |
CC="${CC}" CFLAGS="${CFLAGS}" \ |
2012 |
CC="${CC}" CFLAGS="${CFLAGS}" \ |
2013 |
CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ |
2013 |
CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ |
2014 |
LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ |
2014 |
LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ |
2015 |
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ |
2015 |
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ |
2016 |
MANPREFIX="${MANPREFIX}" |
2016 |
MANPREFIX="${MANPREFIX}" |
2017 |
|
2017 |
|
2018 |
# Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. |
2018 |
# Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. |
2019 |
# gcc 4.x enable strict aliasing optimization with -O2 which is known to break |
2019 |
# gcc 4.x enable strict aliasing optimization with -O2 which is known to break |
2020 |
# a lot of ports. |
2020 |
# a lot of ports. |
2021 |
.if !defined(WITHOUT_NO_STRICT_ALIASING) |
2021 |
.if !defined(WITHOUT_NO_STRICT_ALIASING) |
2022 |
.if ${CC} != "icc" |
2022 |
.if ${CC} != "icc" |
2023 |
.if empty(CFLAGS:M-fno-strict-aliasing) |
2023 |
.if empty(CFLAGS:M-fno-strict-aliasing) |
2024 |
CFLAGS+= -fno-strict-aliasing |
2024 |
CFLAGS+= -fno-strict-aliasing |
2025 |
.endif |
2025 |
.endif |
2026 |
.endif |
2026 |
.endif |
2027 |
.endif |
2027 |
.endif |
2028 |
|
2028 |
|
2029 |
.for lang in C CXX |
2029 |
.for lang in C CXX |
2030 |
.if defined(USE_${lang}STD) |
2030 |
.if defined(USE_${lang}STD) |
2031 |
${lang}FLAGS:= ${${lang}FLAGS:N-std=*} -std=${USE_${lang}STD} |
2031 |
${lang}FLAGS:= ${${lang}FLAGS:N-std=*} -std=${USE_${lang}STD} |
2032 |
.endif |
2032 |
.endif |
2033 |
|
2033 |
|
2034 |
${lang}FLAGS+= ${${lang}FLAGS_${ARCH}} |
2034 |
${lang}FLAGS+= ${${lang}FLAGS_${ARCH}} |
2035 |
.endfor |
2035 |
.endfor |
2036 |
|
2036 |
|
2037 |
LDFLAGS+= ${LDFLAGS_${ARCH}} |
2037 |
LDFLAGS+= ${LDFLAGS_${ARCH}} |
2038 |
|
2038 |
|
2039 |
# Multiple make jobs support |
2039 |
# Multiple make jobs support |
2040 |
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) |
2040 |
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) |
2041 |
_MAKE_JOBS?= # |
2041 |
_MAKE_JOBS?= # |
2042 |
MAKE_JOBS_NUMBER= 1 |
2042 |
MAKE_JOBS_NUMBER= 1 |
2043 |
.else |
2043 |
.else |
2044 |
.if defined(MAKE_JOBS_NUMBER) |
2044 |
.if defined(MAKE_JOBS_NUMBER) |
2045 |
_MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER} |
2045 |
_MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER} |
2046 |
.else |
2046 |
.else |
2047 |
.if !defined(_SMP_CPUS) |
2047 |
.if !defined(_SMP_CPUS) |
2048 |
_SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus |
2048 |
_SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus |
2049 |
.endif |
2049 |
.endif |
2050 |
_EXPORTED_VARS+= _SMP_CPUS |
2050 |
_EXPORTED_VARS+= _SMP_CPUS |
2051 |
_MAKE_JOBS_NUMBER= ${_SMP_CPUS} |
2051 |
_MAKE_JOBS_NUMBER= ${_SMP_CPUS} |
2052 |
.endif |
2052 |
.endif |
2053 |
.if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) |
2053 |
.if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) |
2054 |
MAKE_JOBS_NUMBER= ${MAKE_JOBS_NUMBER_LIMIT} |
2054 |
MAKE_JOBS_NUMBER= ${MAKE_JOBS_NUMBER_LIMIT} |
2055 |
.else |
2055 |
.else |
2056 |
MAKE_JOBS_NUMBER= ${_MAKE_JOBS_NUMBER} |
2056 |
MAKE_JOBS_NUMBER= ${_MAKE_JOBS_NUMBER} |
2057 |
.endif |
2057 |
.endif |
2058 |
_MAKE_JOBS?= -j${MAKE_JOBS_NUMBER} |
2058 |
_MAKE_JOBS?= -j${MAKE_JOBS_NUMBER} |
2059 |
BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. |
2059 |
BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. |
2060 |
.endif |
2060 |
.endif |
2061 |
|
2061 |
|
2062 |
.include "${PORTSDIR}/Mk/bsd.ccache.mk" |
2062 |
.include "${PORTSDIR}/Mk/bsd.ccache.mk" |
2063 |
|
2063 |
|
2064 |
.if !make(makesum) |
2064 |
.if !make(makesum) |
2065 |
FETCH_ENV?= SSL_NO_VERIFY_PEER=1 SSL_NO_VERIFY_HOSTNAME=1 |
2065 |
FETCH_ENV?= SSL_NO_VERIFY_PEER=1 SSL_NO_VERIFY_HOSTNAME=1 |
2066 |
.endif |
2066 |
.endif |
2067 |
FETCH_BINARY?= /usr/bin/fetch |
2067 |
FETCH_BINARY?= /usr/bin/fetch |
2068 |
FETCH_ARGS?= -Fpr |
2068 |
FETCH_ARGS?= -Fpr |
2069 |
FETCH_REGET?= 1 |
2069 |
FETCH_REGET?= 1 |
2070 |
FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} |
2070 |
FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} |
2071 |
|
2071 |
|
2072 |
.if defined(RANDOMIZE_MASTER_SITES) |
2072 |
.if defined(RANDOMIZE_MASTER_SITES) |
2073 |
.if exists(/usr/games/random) |
2073 |
.if exists(/usr/games/random) |
2074 |
RANDOM_CMD?= /usr/games/random |
2074 |
RANDOM_CMD?= /usr/games/random |
2075 |
.elif exists(/usr/bin/random) |
2075 |
.elif exists(/usr/bin/random) |
2076 |
RANDOM_CMD?= /usr/bin/random |
2076 |
RANDOM_CMD?= /usr/bin/random |
2077 |
.endif |
2077 |
.endif |
2078 |
.if defined(RANDOM_CMD) && !empty(RANDOM_CMD) |
2078 |
.if defined(RANDOM_CMD) && !empty(RANDOM_CMD) |
2079 |
RANDOM_ARGS?= -w -f - |
2079 |
RANDOM_ARGS?= -w -f - |
2080 |
_RANDOMIZE_SITES= ${RANDOM_CMD} ${RANDOM_ARGS} |
2080 |
_RANDOMIZE_SITES= ${RANDOM_CMD} ${RANDOM_ARGS} |
2081 |
.endif |
2081 |
.endif |
2082 |
.endif |
2082 |
.endif |
2083 |
|
2083 |
|
2084 |
TOUCH?= /usr/bin/touch |
2084 |
TOUCH?= /usr/bin/touch |
2085 |
TOUCH_FLAGS?= -f |
2085 |
TOUCH_FLAGS?= -f |
2086 |
|
2086 |
|
2087 |
DISTORIG?= .bak.orig |
2087 |
DISTORIG?= .bak.orig |
2088 |
PATCH?= /usr/bin/patch |
2088 |
PATCH?= /usr/bin/patch |
2089 |
PATCH_STRIP?= -p0 |
2089 |
PATCH_STRIP?= -p0 |
2090 |
PATCH_DIST_STRIP?= -p0 |
2090 |
PATCH_DIST_STRIP?= -p0 |
2091 |
.if defined(PATCH_DEBUG) |
2091 |
.if defined(PATCH_DEBUG) |
2092 |
PATCH_DEBUG_TMP= yes |
2092 |
PATCH_DEBUG_TMP= yes |
2093 |
PATCH_ARGS?= --forward -E ${PATCH_STRIP} |
2093 |
PATCH_ARGS?= --forward -E ${PATCH_STRIP} |
2094 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward -E ${PATCH_DIST_STRIP} |
2094 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward -E ${PATCH_DIST_STRIP} |
2095 |
.else |
2095 |
.else |
2096 |
PATCH_ARGS?= --forward --quiet -E ${PATCH_STRIP} |
2096 |
PATCH_ARGS?= --forward --quiet -E ${PATCH_STRIP} |
2097 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward --quiet -E ${PATCH_DIST_STRIP} |
2097 |
PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward --quiet -E ${PATCH_DIST_STRIP} |
2098 |
.endif |
2098 |
.endif |
2099 |
.if !defined(QUIET) |
2099 |
.if !defined(QUIET) |
2100 |
PATCH_SILENT= PATCH_SILENT=yes |
2100 |
PATCH_SILENT= PATCH_SILENT=yes |
2101 |
.endif |
2101 |
.endif |
2102 |
.if defined(BATCH) |
2102 |
.if defined(BATCH) |
2103 |
PATCH_ARGS+= --batch |
2103 |
PATCH_ARGS+= --batch |
2104 |
PATCH_DIST_ARGS+= --batch |
2104 |
PATCH_DIST_ARGS+= --batch |
2105 |
.endif |
2105 |
.endif |
2106 |
|
2106 |
|
2107 |
# Prevent breakage with VERSION_CONTROL=numbered |
2107 |
# Prevent breakage with VERSION_CONTROL=numbered |
2108 |
PATCH_ARGS+= -V simple |
2108 |
PATCH_ARGS+= -V simple |
2109 |
PATCH_DIST_ARGS+= -V simple |
2109 |
PATCH_DIST_ARGS+= -V simple |
2110 |
|
2110 |
|
2111 |
.if defined(PATCH_CHECK_ONLY) |
2111 |
.if defined(PATCH_CHECK_ONLY) |
2112 |
PATCH_ARGS+= -C |
2112 |
PATCH_ARGS+= -C |
2113 |
PATCH_DIST_ARGS+= -C |
2113 |
PATCH_DIST_ARGS+= -C |
2114 |
.endif |
2114 |
.endif |
2115 |
|
2115 |
|
2116 |
.if ${PATCH} == "/usr/bin/patch" |
2116 |
.if ${PATCH} == "/usr/bin/patch" |
2117 |
PATCH_ARGS+= --suffix .orig |
2117 |
PATCH_ARGS+= --suffix .orig |
2118 |
PATCH_DIST_ARGS+= --suffix .orig |
2118 |
PATCH_DIST_ARGS+= --suffix .orig |
2119 |
.endif |
2119 |
.endif |
2120 |
|
2120 |
|
2121 |
TAR?= /usr/bin/tar |
2121 |
TAR?= /usr/bin/tar |
2122 |
|
2122 |
|
2123 |
# EXTRACT_SUFX is defined in .pre.mk section |
2123 |
# EXTRACT_SUFX is defined in .pre.mk section |
2124 |
EXTRACT_CMD?= ${TAR} |
2124 |
EXTRACT_CMD?= ${TAR} |
2125 |
EXTRACT_BEFORE_ARGS?= -xf |
2125 |
EXTRACT_BEFORE_ARGS?= -xf |
2126 |
EXTRACT_AFTER_ARGS?= --no-same-owner --no-same-permissions |
2126 |
EXTRACT_AFTER_ARGS?= --no-same-owner --no-same-permissions |
2127 |
|
2127 |
|
2128 |
# Figure out where the local mtree file is |
2128 |
# Figure out where the local mtree file is |
2129 |
.if !defined(MTREE_FILE) && !defined(NO_MTREE) |
2129 |
.if !defined(MTREE_FILE) && !defined(NO_MTREE) |
2130 |
.if ${PREFIX} == /usr |
2130 |
.if ${PREFIX} == /usr |
2131 |
MTREE_FILE= /etc/mtree/BSD.usr.dist |
2131 |
MTREE_FILE= /etc/mtree/BSD.usr.dist |
2132 |
.else |
2132 |
.else |
2133 |
MTREE_FILE= ${PORTSDIR}/Templates/BSD.local.dist |
2133 |
MTREE_FILE= ${PORTSDIR}/Templates/BSD.local.dist |
2134 |
.endif |
2134 |
.endif |
2135 |
.endif |
2135 |
.endif |
2136 |
MTREE_CMD?= /usr/sbin/mtree |
2136 |
MTREE_CMD?= /usr/sbin/mtree |
2137 |
MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p |
2137 |
MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p |
2138 |
|
2138 |
|
2139 |
_SHAREMODE?= 0644 |
2139 |
_SHAREMODE?= 0644 |
2140 |
|
2140 |
|
2141 |
# A few aliases for *-install targets |
2141 |
# A few aliases for *-install targets |
2142 |
INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE} |
2142 |
INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE} |
2143 |
INSTALL_KLD= ${INSTALL} ${COPY} -m ${BINMODE} |
2143 |
INSTALL_KLD= ${INSTALL} ${COPY} -m ${BINMODE} |
2144 |
INSTALL_LIB= ${INSTALL} ${COPY} ${STRIP} -m ${_SHAREMODE} |
2144 |
INSTALL_LIB= ${INSTALL} ${COPY} ${STRIP} -m ${_SHAREMODE} |
2145 |
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE} |
2145 |
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE} |
2146 |
INSTALL_DATA= ${INSTALL} ${COPY} -m ${_SHAREMODE} |
2146 |
INSTALL_DATA= ${INSTALL} ${COPY} -m ${_SHAREMODE} |
2147 |
INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE} |
2147 |
INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE} |
2148 |
|
2148 |
|
2149 |
INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ |
2149 |
INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ |
2150 |
BSD_INSTALL_LIB="${INSTALL_LIB}" \ |
2150 |
BSD_INSTALL_LIB="${INSTALL_LIB}" \ |
2151 |
BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ |
2151 |
BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ |
2152 |
BSD_INSTALL_DATA="${INSTALL_DATA}" \ |
2152 |
BSD_INSTALL_DATA="${INSTALL_DATA}" \ |
2153 |
BSD_INSTALL_MAN="${INSTALL_MAN}" |
2153 |
BSD_INSTALL_MAN="${INSTALL_MAN}" |
2154 |
MAKE_ENV+= ${INSTALL_MACROS} |
2154 |
MAKE_ENV+= ${INSTALL_MACROS} |
2155 |
SCRIPTS_ENV+= ${INSTALL_MACROS} |
2155 |
SCRIPTS_ENV+= ${INSTALL_MACROS} |
2156 |
|
2156 |
|
2157 |
# Macro for copying entire directory tree with correct permissions |
2157 |
# Macro for copying entire directory tree with correct permissions |
2158 |
# In the -exec shell commands, we add add a . as the first argument, it would |
2158 |
# In the -exec shell commands, we add add a . as the first argument, it would |
2159 |
# end up being $0 aka the script name, which is not part of $@, so we force it |
2159 |
# end up being $0 aka the script name, which is not part of $@, so we force it |
2160 |
# to be able to use $@ directly. |
2160 |
# to be able to use $@ directly. |
2161 |
COPYTREE_BIN= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ |
2161 |
COPYTREE_BIN= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ |
2162 |
${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ |
2162 |
${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ |
2163 |
-o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${BINMODE} "$$@"'\'' . {} + \)' COPYTREE_BIN |
2163 |
-o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${BINMODE} "$$@"'\'' . {} + \)' COPYTREE_BIN |
2164 |
COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ |
2164 |
COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ |
2165 |
${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ |
2165 |
${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ |
2166 |
-o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${_SHAREMODE} "$$@"'\'' . {} + \)' COPYTREE_SHARE |
2166 |
-o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${_SHAREMODE} "$$@"'\'' . {} + \)' COPYTREE_SHARE |
2167 |
|
2167 |
|
2168 |
# The user can override the NO_PACKAGE by specifying this from |
2168 |
# The user can override the NO_PACKAGE by specifying this from |
2169 |
# the make command line |
2169 |
# the make command line |
2170 |
.if defined(FORCE_PACKAGE) |
2170 |
.if defined(FORCE_PACKAGE) |
2171 |
.undef NO_PACKAGE |
2171 |
.undef NO_PACKAGE |
2172 |
.endif |
2172 |
.endif |
2173 |
|
2173 |
|
2174 |
DESCR?= ${PKGDIR}/pkg-descr |
2174 |
DESCR?= ${PKGDIR}/pkg-descr |
2175 |
PLIST?= ${PKGDIR}/pkg-plist |
2175 |
PLIST?= ${PKGDIR}/pkg-plist |
2176 |
PKGHELP?= ${PKGDIR}/pkg-help |
2176 |
PKGHELP?= ${PKGDIR}/pkg-help |
2177 |
PKGINSTALL?= ${PKGDIR}/pkg-install |
2177 |
PKGINSTALL?= ${PKGDIR}/pkg-install |
2178 |
PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall |
2178 |
PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall |
2179 |
PKGMESSAGE?= ${PKGDIR}/pkg-message |
2179 |
PKGMESSAGE?= ${PKGDIR}/pkg-message |
2180 |
_PKGMESSAGES+= ${PKGMESSAGE} |
2180 |
_PKGMESSAGES+= ${PKGMESSAGE} |
2181 |
|
2181 |
|
2182 |
TMPPLIST?= ${WRKDIR}/.PLIST.mktmp |
2182 |
TMPPLIST?= ${WRKDIR}/.PLIST.mktmp |
2183 |
|
2183 |
|
2184 |
.if defined(PKG_NOCOMPRESS) |
2184 |
.if defined(PKG_NOCOMPRESS) |
2185 |
PKG_SUFX?= .tar |
2185 |
PKG_SUFX?= .tar |
2186 |
.else |
2186 |
.else |
2187 |
PKG_SUFX?= .txz |
2187 |
PKG_SUFX?= .txz |
2188 |
.endif |
2188 |
.endif |
2189 |
# where pkg(8) stores its data |
2189 |
# where pkg(8) stores its data |
2190 |
PKG_DBDIR?= /var/db/pkg |
2190 |
PKG_DBDIR?= /var/db/pkg |
2191 |
|
2191 |
|
2192 |
ALL_TARGET?= all |
2192 |
ALL_TARGET?= all |
2193 |
INSTALL_TARGET?= install |
2193 |
INSTALL_TARGET?= install |
2194 |
INSTALL_TARGET+= ${LATE_INSTALL_ARGS} |
2194 |
INSTALL_TARGET+= ${LATE_INSTALL_ARGS} |
2195 |
|
2195 |
|
2196 |
# Integrate with the license auditing framework |
2196 |
# Integrate with the license auditing framework |
2197 |
.if !defined (DISABLE_LICENSES) |
2197 |
.if !defined (DISABLE_LICENSES) |
2198 |
.include "${PORTSDIR}/Mk/bsd.licenses.mk" |
2198 |
.include "${PORTSDIR}/Mk/bsd.licenses.mk" |
2199 |
.endif |
2199 |
.endif |
2200 |
|
2200 |
|
2201 |
# Popular master sites |
2201 |
# Popular master sites |
2202 |
.include "${PORTSDIR}/Mk/bsd.sites.mk" |
2202 |
.include "${PORTSDIR}/Mk/bsd.sites.mk" |
2203 |
|
2203 |
|
2204 |
# Empty declaration to avoid "variable MASTER_SITES recursive" error |
2204 |
# Empty declaration to avoid "variable MASTER_SITES recursive" error |
2205 |
MASTER_SITES?= |
2205 |
MASTER_SITES?= |
2206 |
PATCH_SITES?= |
2206 |
PATCH_SITES?= |
2207 |
_MASTER_SITES_DEFAULT?= |
2207 |
_MASTER_SITES_DEFAULT?= |
2208 |
_PATCH_SITES_DEFAULT?= |
2208 |
_PATCH_SITES_DEFAULT?= |
2209 |
|
2209 |
|
2210 |
# Feed internal _{MASTER,PATCH}_SITES_n where n is a group designation |
2210 |
# Feed internal _{MASTER,PATCH}_SITES_n where n is a group designation |
2211 |
# as per grouping rules (:something) |
2211 |
# as per grouping rules (:something) |
2212 |
# Organize _{MASTER,PATCH}_SITES_{DEFAULT,[^/:]+} according to grouping |
2212 |
# Organize _{MASTER,PATCH}_SITES_{DEFAULT,[^/:]+} according to grouping |
2213 |
# rules (:something) |
2213 |
# rules (:something) |
2214 |
.for _S in ${MASTER_SITES} |
2214 |
.for _S in ${MASTER_SITES} |
2215 |
_S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}//:S/^://} |
2215 |
_S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}//:S/^://} |
2216 |
. if !empty(_S_TEMP) |
2216 |
. if !empty(_S_TEMP) |
2217 |
. for _group in ${_S_TEMP:S/,/ /g} |
2217 |
. for _group in ${_S_TEMP:S/,/ /g} |
2218 |
_G_TEMP= ${_group} |
2218 |
_G_TEMP= ${_group} |
2219 |
. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} |
2219 |
. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} |
2220 |
check-makevars:: |
2220 |
check-makevars:: |
2221 |
@${ECHO_MSG} "The ${_S} MASTER_SITES line has" |
2221 |
@${ECHO_MSG} "The ${_S} MASTER_SITES line has" |
2222 |
@${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" |
2222 |
@${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" |
2223 |
@${FALSE} |
2223 |
@${FALSE} |
2224 |
. endif |
2224 |
. endif |
2225 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2225 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2226 |
check-makevars:: |
2226 |
check-makevars:: |
2227 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2227 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2228 |
@${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES" |
2228 |
@${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES" |
2229 |
@${FALSE} |
2229 |
@${FALSE} |
2230 |
. endif |
2230 |
. endif |
2231 |
_MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2231 |
_MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2232 |
. endfor |
2232 |
. endfor |
2233 |
. else |
2233 |
. else |
2234 |
_MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2234 |
_MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2235 |
. endif |
2235 |
. endif |
2236 |
.endfor |
2236 |
.endfor |
2237 |
.for _S in ${PATCH_SITES} |
2237 |
.for _S in ${PATCH_SITES} |
2238 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2238 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2239 |
. if !empty(_S_TEMP) |
2239 |
. if !empty(_S_TEMP) |
2240 |
. for _group in ${_S_TEMP:S/,/ /g} |
2240 |
. for _group in ${_S_TEMP:S/,/ /g} |
2241 |
_G_TEMP= ${_group} |
2241 |
_G_TEMP= ${_group} |
2242 |
. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} |
2242 |
. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} |
2243 |
check-makevars:: |
2243 |
check-makevars:: |
2244 |
@${ECHO_MSG} "The ${_S} PATCH_SITES line has" |
2244 |
@${ECHO_MSG} "The ${_S} PATCH_SITES line has" |
2245 |
@${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" |
2245 |
@${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" |
2246 |
@${FALSE} |
2246 |
@${FALSE} |
2247 |
. endif |
2247 |
. endif |
2248 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2248 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2249 |
check-makevars:: |
2249 |
check-makevars:: |
2250 |
@${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" |
2250 |
@${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" |
2251 |
@${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" |
2251 |
@${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" |
2252 |
@${FALSE} |
2252 |
@${FALSE} |
2253 |
. endif |
2253 |
. endif |
2254 |
_PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2254 |
_PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2255 |
. endfor |
2255 |
. endfor |
2256 |
. else |
2256 |
. else |
2257 |
_PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2257 |
_PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} |
2258 |
. endif |
2258 |
. endif |
2259 |
.endfor |
2259 |
.endfor |
2260 |
|
2260 |
|
2261 |
# Feed internal _{MASTER,PATCH}_SITE_SUBDIR_n where n is a group designation |
2261 |
# Feed internal _{MASTER,PATCH}_SITE_SUBDIR_n where n is a group designation |
2262 |
# as per grouping rules (:something) |
2262 |
# as per grouping rules (:something) |
2263 |
# Organize _{MASTER,PATCH}_SITE_SUBDIR_{DEFAULT,[^/:]+} according to grouping |
2263 |
# Organize _{MASTER,PATCH}_SITE_SUBDIR_{DEFAULT,[^/:]+} according to grouping |
2264 |
# rules (:something) |
2264 |
# rules (:something) |
2265 |
.for _S in ${MASTER_SITE_SUBDIR} |
2265 |
.for _S in ${MASTER_SITE_SUBDIR} |
2266 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2266 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2267 |
. if !empty(_S_TEMP) |
2267 |
. if !empty(_S_TEMP) |
2268 |
. for _group in ${_S_TEMP:S/,/ /g} |
2268 |
. for _group in ${_S_TEMP:S/,/ /g} |
2269 |
_G_TEMP= ${_group} |
2269 |
_G_TEMP= ${_group} |
2270 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2270 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2271 |
check-makevars:: |
2271 |
check-makevars:: |
2272 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2272 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2273 |
@${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" |
2273 |
@${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" |
2274 |
@${FALSE} |
2274 |
@${FALSE} |
2275 |
. endif |
2275 |
. endif |
2276 |
. if defined(_MASTER_SITES_${_group}) |
2276 |
. if defined(_MASTER_SITES_${_group}) |
2277 |
_MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2277 |
_MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2278 |
. endif |
2278 |
. endif |
2279 |
. endfor |
2279 |
. endfor |
2280 |
. else |
2280 |
. else |
2281 |
. if defined(_MASTER_SITES_DEFAULT) |
2281 |
. if defined(_MASTER_SITES_DEFAULT) |
2282 |
_MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2282 |
_MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2283 |
. endif |
2283 |
. endif |
2284 |
. endif |
2284 |
. endif |
2285 |
.endfor |
2285 |
.endfor |
2286 |
.for _S in ${PATCH_SITE_SUBDIR} |
2286 |
.for _S in ${PATCH_SITE_SUBDIR} |
2287 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2287 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2288 |
. if !empty(_S_TEMP) |
2288 |
. if !empty(_S_TEMP) |
2289 |
. for _group in ${_S_TEMP:S/,/ /g} |
2289 |
. for _group in ${_S_TEMP:S/,/ /g} |
2290 |
_G_TEMP= ${_group} |
2290 |
_G_TEMP= ${_group} |
2291 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2291 |
. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default |
2292 |
check-makevars:: |
2292 |
check-makevars:: |
2293 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2293 |
@${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" |
2294 |
@${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" |
2294 |
@${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" |
2295 |
@${FALSE} |
2295 |
@${FALSE} |
2296 |
. endif |
2296 |
. endif |
2297 |
. if defined(_PATCH_SITES_${_group}) |
2297 |
. if defined(_PATCH_SITES_${_group}) |
2298 |
_PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2298 |
_PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2299 |
. endif |
2299 |
. endif |
2300 |
. endfor |
2300 |
. endfor |
2301 |
. else |
2301 |
. else |
2302 |
. if defined(_PATCH_SITES_DEFAULT) |
2302 |
. if defined(_PATCH_SITES_DEFAULT) |
2303 |
_PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2303 |
_PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} |
2304 |
. endif |
2304 |
. endif |
2305 |
. endif |
2305 |
. endif |
2306 |
.endfor |
2306 |
.endfor |
2307 |
|
2307 |
|
2308 |
# Substitute subdirectory names |
2308 |
# Substitute subdirectory names |
2309 |
# XXX simpler/faster solution but not the best space wise, suggestions please |
2309 |
# XXX simpler/faster solution but not the best space wise, suggestions please |
2310 |
.for _S in ${MASTER_SITES} |
2310 |
.for _S in ${MASTER_SITES} |
2311 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2311 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2312 |
. if !empty(_S_TEMP) |
2312 |
. if !empty(_S_TEMP) |
2313 |
. for _group in ${_S_TEMP:S/,/ /g} |
2313 |
. for _group in ${_S_TEMP:S/,/ /g} |
2314 |
. if !defined(_MASTER_SITE_SUBDIR_${_group}) |
2314 |
. if !defined(_MASTER_SITE_SUBDIR_${_group}) |
2315 |
MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} |
2315 |
MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} |
2316 |
. else |
2316 |
. else |
2317 |
_S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} |
2317 |
_S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} |
2318 |
. if empty(_S_TEMP_TEMP) |
2318 |
. if empty(_S_TEMP_TEMP) |
2319 |
MASTER_SITES_TMP= ${_MASTER_SITES_${_group}} |
2319 |
MASTER_SITES_TMP= ${_MASTER_SITES_${_group}} |
2320 |
. else |
2320 |
. else |
2321 |
MASTER_SITES_TMP= |
2321 |
MASTER_SITES_TMP= |
2322 |
. for site in ${_MASTER_SITES_${_group}} |
2322 |
. for site in ${_MASTER_SITES_${_group}} |
2323 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2323 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2324 |
. if empty(_S_TEMP_TEMP) |
2324 |
. if empty(_S_TEMP_TEMP) |
2325 |
MASTER_SITES_TMP+= ${site} |
2325 |
MASTER_SITES_TMP+= ${site} |
2326 |
. else |
2326 |
. else |
2327 |
. for dir in ${_MASTER_SITE_SUBDIR_${_group}} |
2327 |
. for dir in ${_MASTER_SITE_SUBDIR_${_group}} |
2328 |
MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2328 |
MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2329 |
. endfor |
2329 |
. endfor |
2330 |
. endif |
2330 |
. endif |
2331 |
. endfor |
2331 |
. endfor |
2332 |
. endif |
2332 |
. endif |
2333 |
. endif |
2333 |
. endif |
2334 |
_MASTER_SITES_${_group}:= ${MASTER_SITES_TMP} |
2334 |
_MASTER_SITES_${_group}:= ${MASTER_SITES_TMP} |
2335 |
. endfor |
2335 |
. endfor |
2336 |
. endif |
2336 |
. endif |
2337 |
.endfor |
2337 |
.endfor |
2338 |
.if defined(_MASTER_SITE_SUBDIR_DEFAULT) |
2338 |
.if defined(_MASTER_SITE_SUBDIR_DEFAULT) |
2339 |
_S_TEMP= ${_MASTER_SITES_DEFAULT:M*%SUBDIR%/*} |
2339 |
_S_TEMP= ${_MASTER_SITES_DEFAULT:M*%SUBDIR%/*} |
2340 |
. if empty(_S_TEMP) |
2340 |
. if empty(_S_TEMP) |
2341 |
MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT} |
2341 |
MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT} |
2342 |
. else |
2342 |
. else |
2343 |
MASTER_SITES_TMP= |
2343 |
MASTER_SITES_TMP= |
2344 |
. for site in ${_MASTER_SITES_DEFAULT} |
2344 |
. for site in ${_MASTER_SITES_DEFAULT} |
2345 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2345 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2346 |
. if empty(_S_TEMP_TEMP) |
2346 |
. if empty(_S_TEMP_TEMP) |
2347 |
MASTER_SITES_TMP+= ${site} |
2347 |
MASTER_SITES_TMP+= ${site} |
2348 |
. else |
2348 |
. else |
2349 |
. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} |
2349 |
. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} |
2350 |
MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2350 |
MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2351 |
. endfor |
2351 |
. endfor |
2352 |
. endif |
2352 |
. endif |
2353 |
. endfor |
2353 |
. endfor |
2354 |
. endif |
2354 |
. endif |
2355 |
.else |
2355 |
.else |
2356 |
MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} |
2356 |
MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} |
2357 |
.endif |
2357 |
.endif |
2358 |
_MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} |
2358 |
_MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} |
2359 |
MASTER_SITES_TMP= |
2359 |
MASTER_SITES_TMP= |
2360 |
.for _S in ${PATCH_SITES} |
2360 |
.for _S in ${PATCH_SITES} |
2361 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2361 |
_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} |
2362 |
. if !empty(_S_TEMP) |
2362 |
. if !empty(_S_TEMP) |
2363 |
. for _group in ${_S_TEMP:S/,/ /g} |
2363 |
. for _group in ${_S_TEMP:S/,/ /g} |
2364 |
. if !defined(_PATCH_SITE_SUBDIR_${_group}) |
2364 |
. if !defined(_PATCH_SITE_SUBDIR_${_group}) |
2365 |
PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} |
2365 |
PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} |
2366 |
. else |
2366 |
. else |
2367 |
_S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} |
2367 |
_S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} |
2368 |
. if empty(_S_TEMP_TEMP) |
2368 |
. if empty(_S_TEMP_TEMP) |
2369 |
PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} |
2369 |
PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} |
2370 |
. else |
2370 |
. else |
2371 |
PATCH_SITES_TMP= |
2371 |
PATCH_SITES_TMP= |
2372 |
. for site in ${_PATCH_SITES_${_group}} |
2372 |
. for site in ${_PATCH_SITES_${_group}} |
2373 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2373 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2374 |
. if empty(_S_TEMP_TEMP) |
2374 |
. if empty(_S_TEMP_TEMP) |
2375 |
PATCH_SITES_TMP+= ${site} |
2375 |
PATCH_SITES_TMP+= ${site} |
2376 |
. else |
2376 |
. else |
2377 |
. for dir in ${_PATCH_SITE_SUBDIR_${_group}} |
2377 |
. for dir in ${_PATCH_SITE_SUBDIR_${_group}} |
2378 |
PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2378 |
PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2379 |
. endfor |
2379 |
. endfor |
2380 |
. endif |
2380 |
. endif |
2381 |
. endfor |
2381 |
. endfor |
2382 |
. endif |
2382 |
. endif |
2383 |
. endif |
2383 |
. endif |
2384 |
_PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} |
2384 |
_PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} |
2385 |
. endfor |
2385 |
. endfor |
2386 |
. endif |
2386 |
. endif |
2387 |
.endfor |
2387 |
.endfor |
2388 |
.if defined(_PATCH_SITE_SUBDIR_DEFAULT) |
2388 |
.if defined(_PATCH_SITE_SUBDIR_DEFAULT) |
2389 |
_S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} |
2389 |
_S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} |
2390 |
. if empty(_S_TEMP) |
2390 |
. if empty(_S_TEMP) |
2391 |
PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} |
2391 |
PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} |
2392 |
. else |
2392 |
. else |
2393 |
PATCH_SITES_TMP= |
2393 |
PATCH_SITES_TMP= |
2394 |
. for site in ${_PATCH_SITES_DEFAULT} |
2394 |
. for site in ${_PATCH_SITES_DEFAULT} |
2395 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2395 |
_S_TEMP_TEMP= ${site:M*%SUBDIR%/*} |
2396 |
. if empty(_S_TEMP_TEMP) |
2396 |
. if empty(_S_TEMP_TEMP) |
2397 |
PATCH_SITES_TMP+= ${site} |
2397 |
PATCH_SITES_TMP+= ${site} |
2398 |
. else |
2398 |
. else |
2399 |
. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} |
2399 |
. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} |
2400 |
PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2400 |
PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} |
2401 |
. endfor |
2401 |
. endfor |
2402 |
. endif |
2402 |
. endif |
2403 |
. endfor |
2403 |
. endfor |
2404 |
. endif |
2404 |
. endif |
2405 |
.else |
2405 |
.else |
2406 |
PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} |
2406 |
PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} |
2407 |
.endif |
2407 |
.endif |
2408 |
_PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} |
2408 |
_PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} |
2409 |
PATCH_SITES_TMP= |
2409 |
PATCH_SITES_TMP= |
2410 |
|
2410 |
|
2411 |
# The primary backup site. |
2411 |
# The primary backup site. |
2412 |
MASTER_SITE_BACKUP?= \ |
2412 |
MASTER_SITE_BACKUP?= \ |
2413 |
http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ |
2413 |
http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ |
2414 |
MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} |
2414 |
MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} |
2415 |
|
2415 |
|
2416 |
# If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository |
2416 |
# If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository |
2417 |
# for everything, but don't search it twice by appending it to the end. |
2417 |
# for everything, but don't search it twice by appending it to the end. |
2418 |
.if defined(MASTER_SITE_FREEBSD) |
2418 |
.if defined(MASTER_SITE_FREEBSD) |
2419 |
_MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP} |
2419 |
_MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP} |
2420 |
_MASTER_SITE_BACKUP:= # empty |
2420 |
_MASTER_SITE_BACKUP:= # empty |
2421 |
.else |
2421 |
.else |
2422 |
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE} |
2422 |
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE} |
2423 |
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP} |
2423 |
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP} |
2424 |
.endif |
2424 |
.endif |
2425 |
|
2425 |
|
2426 |
NOFETCHFILES?= |
2426 |
NOFETCHFILES?= |
2427 |
|
2427 |
|
2428 |
# Organize DISTFILES, PATCHFILES, _MASTER_SITES_ALL, _PATCH_SITES_ALL |
2428 |
# Organize DISTFILES, PATCHFILES, _MASTER_SITES_ALL, _PATCH_SITES_ALL |
2429 |
# according to grouping rules (:something) |
2429 |
# according to grouping rules (:something) |
2430 |
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} |
2430 |
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} |
2431 |
_MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} |
2431 |
_MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} |
2432 |
_PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} |
2432 |
_PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} |
2433 |
_G_TEMP= DEFAULT |
2433 |
_G_TEMP= DEFAULT |
2434 |
.for _D in ${DISTFILES} |
2434 |
.for _D in ${DISTFILES} |
2435 |
_D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} |
2435 |
_D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} |
2436 |
. if !empty(_D_TEMP) |
2436 |
. if !empty(_D_TEMP) |
2437 |
. for _group in ${_D_TEMP:S/^://:S/,/ /g} |
2437 |
. for _group in ${_D_TEMP:S/^://:S/,/ /g} |
2438 |
. if !defined(_MASTER_SITES_${_group}) |
2438 |
. if !defined(_MASTER_SITES_${_group}) |
2439 |
_G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} |
2439 |
_G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} |
2440 |
. if empty(_G_TEMP_TEMP) |
2440 |
. if empty(_G_TEMP_TEMP) |
2441 |
_G_TEMP+= ${_group} |
2441 |
_G_TEMP+= ${_group} |
2442 |
_MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} |
2442 |
_MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} |
2443 |
. endif |
2443 |
. endif |
2444 |
. endif |
2444 |
. endif |
2445 |
. endfor |
2445 |
. endfor |
2446 |
_DISTFILES+= ${_D:C/:[^:]+$//} |
2446 |
_DISTFILES+= ${_D:C/:[^:]+$//} |
2447 |
. else |
2447 |
. else |
2448 |
_DISTFILES+= ${_D} |
2448 |
_DISTFILES+= ${_D} |
2449 |
. endif |
2449 |
. endif |
2450 |
.endfor |
2450 |
.endfor |
2451 |
_G_TEMP= DEFAULT |
2451 |
_G_TEMP= DEFAULT |
2452 |
.for _P in ${PATCHFILES} |
2452 |
.for _P in ${PATCHFILES} |
2453 |
_P_TEMP= ${_P:C/:[^-:][^:]*$//} |
2453 |
_P_TEMP= ${_P:C/:[^-:][^:]*$//} |
2454 |
_P_groups= ${_P:S/^${_P:C/:[^:]+$//}//:S/^://} |
2454 |
_P_groups= ${_P:S/^${_P:C/:[^:]+$//}//:S/^://} |
2455 |
_P_file= ${_P_TEMP:C/:-[^:]+$//} |
2455 |
_P_file= ${_P_TEMP:C/:-[^:]+$//} |
2456 |
_P_strip= ${_P_TEMP:S/^${_P_TEMP:C/:-[^:]*$//}//:S/^://} |
2456 |
_P_strip= ${_P_TEMP:S/^${_P_TEMP:C/:-[^:]*$//}//:S/^://} |
2457 |
. if !empty(_P_groups) |
2457 |
. if !empty(_P_groups) |
2458 |
. for _group in ${_P_groups:S/,/ /g} |
2458 |
. for _group in ${_P_groups:S/,/ /g} |
2459 |
. if !defined(_PATCH_SITES_${_group}) |
2459 |
. if !defined(_PATCH_SITES_${_group}) |
2460 |
_G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} |
2460 |
_G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} |
2461 |
. if empty(_G_TEMP_TEMP) |
2461 |
. if empty(_G_TEMP_TEMP) |
2462 |
_G_TEMP+= ${_group} |
2462 |
_G_TEMP+= ${_group} |
2463 |
_PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} |
2463 |
_PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} |
2464 |
. endif |
2464 |
. endif |
2465 |
. endif |
2465 |
. endif |
2466 |
. endfor |
2466 |
. endfor |
2467 |
. endif |
2467 |
. endif |
2468 |
_PATCHFILES:= ${_PATCHFILES} ${_P_file} |
2468 |
_PATCHFILES:= ${_PATCHFILES} ${_P_file} |
2469 |
. if empty(_P_strip) |
2469 |
. if empty(_P_strip) |
2470 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file} |
2470 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file} |
2471 |
. else |
2471 |
. else |
2472 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file}:${_P_strip} |
2472 |
_PATCHFILES2:= ${_PATCHFILES2} ${_P_file}:${_P_strip} |
2473 |
. endif |
2473 |
. endif |
2474 |
.endfor |
2474 |
.endfor |
2475 |
_P_groups= |
2475 |
_P_groups= |
2476 |
_P_file= |
2476 |
_P_file= |
2477 |
_P_strip= |
2477 |
_P_strip= |
2478 |
_G_TEMP= |
2478 |
_G_TEMP= |
2479 |
_G_TEMP_TEMP= |
2479 |
_G_TEMP_TEMP= |
2480 |
ALLFILES?= ${_DISTFILES} ${_PATCHFILES} |
2480 |
ALLFILES?= ${_DISTFILES} ${_PATCHFILES} |
2481 |
|
2481 |
|
2482 |
# |
2482 |
# |
2483 |
# Sort the master site list according to the patterns in MASTER_SORT |
2483 |
# Sort the master site list according to the patterns in MASTER_SORT |
2484 |
# |
2484 |
# |
2485 |
MASTER_SORT?= |
2485 |
MASTER_SORT?= |
2486 |
MASTER_SORT_REGEX?= |
2486 |
MASTER_SORT_REGEX?= |
2487 |
MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|} |
2487 |
MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|} |
2488 |
|
2488 |
|
2489 |
MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; } |
2489 |
MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; } |
2490 |
.for srt in ${MASTER_SORT_REGEX} |
2490 |
.for srt in ${MASTER_SORT_REGEX} |
2491 |
MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } |
2491 |
MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } |
2492 |
.endfor |
2492 |
.endfor |
2493 |
MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } |
2493 |
MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } |
2494 |
|
2494 |
|
2495 |
# |
2495 |
# |
2496 |
# Hackery to enable simple fetch targets with several dynamic MASTER_SITES |
2496 |
# Hackery to enable simple fetch targets with several dynamic MASTER_SITES |
2497 |
# |
2497 |
# |
2498 |
_MASTER_SITES_ENV= _MASTER_SITES_DEFAULT=${_MASTER_SITES_DEFAULT:Q} |
2498 |
_MASTER_SITES_ENV= _MASTER_SITES_DEFAULT=${_MASTER_SITES_DEFAULT:Q} |
2499 |
.for _F in ${DISTFILES} |
2499 |
.for _F in ${DISTFILES} |
2500 |
_F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} |
2500 |
_F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} |
2501 |
. if !empty(_F_TEMP) |
2501 |
. if !empty(_F_TEMP) |
2502 |
. for _group in ${_F_TEMP:S/,/ /g} |
2502 |
. for _group in ${_F_TEMP:S/,/ /g} |
2503 |
. if defined(_MASTER_SITES_${_group}) |
2503 |
. if defined(_MASTER_SITES_${_group}) |
2504 |
_MASTER_SITES_ENV+= _MASTER_SITES_${_group}=${_MASTER_SITES_${_group}:Q} |
2504 |
_MASTER_SITES_ENV+= _MASTER_SITES_${_group}=${_MASTER_SITES_${_group}:Q} |
2505 |
. endif |
2505 |
. endif |
2506 |
. endfor |
2506 |
. endfor |
2507 |
. endif |
2507 |
. endif |
2508 |
.endfor |
2508 |
.endfor |
2509 |
_PATCH_SITES_ENV= _PATCH_SITES_DEFAULT=${_PATCH_SITES_DEFAULT:Q} |
2509 |
_PATCH_SITES_ENV= _PATCH_SITES_DEFAULT=${_PATCH_SITES_DEFAULT:Q} |
2510 |
.for _F in ${PATCHFILES} |
2510 |
.for _F in ${PATCHFILES} |
2511 |
_F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} |
2511 |
_F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} |
2512 |
. if !empty(_F_TEMP) |
2512 |
. if !empty(_F_TEMP) |
2513 |
. for _group in ${_F_TEMP:S/,/ /g} |
2513 |
. for _group in ${_F_TEMP:S/,/ /g} |
2514 |
. if defined(_PATCH_SITES_${_group}) |
2514 |
. if defined(_PATCH_SITES_${_group}) |
2515 |
_PATCH_SITES_ENV+= _PATCH_SITES_${_group}=${_PATCH_SITES_${_group}:Q} |
2515 |
_PATCH_SITES_ENV+= _PATCH_SITES_${_group}=${_PATCH_SITES_${_group}:Q} |
2516 |
. endif |
2516 |
. endif |
2517 |
. endfor |
2517 |
. endfor |
2518 |
. endif |
2518 |
. endif |
2519 |
.endfor |
2519 |
.endfor |
2520 |
|
2520 |
|
2521 |
CKSUMFILES= ${ALLFILES} |
2521 |
CKSUMFILES= ${ALLFILES} |
2522 |
|
2522 |
|
2523 |
# List of all files, with ${DIST_SUBDIR} in front. Used for checksum. |
2523 |
# List of all files, with ${DIST_SUBDIR} in front. Used for checksum. |
2524 |
.if defined(DIST_SUBDIR) |
2524 |
.if defined(DIST_SUBDIR) |
2525 |
.if defined(CKSUMFILES) && ${CKSUMFILES}!="" |
2525 |
.if defined(CKSUMFILES) && ${CKSUMFILES}!="" |
2526 |
_CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} |
2526 |
_CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} |
2527 |
.endif |
2527 |
.endif |
2528 |
.else |
2528 |
.else |
2529 |
_CKSUMFILES?= ${CKSUMFILES} |
2529 |
_CKSUMFILES?= ${CKSUMFILES} |
2530 |
.endif |
2530 |
.endif |
2531 |
|
2531 |
|
2532 |
# This is what is actually going to be extracted, and is overridable |
2532 |
# This is what is actually going to be extracted, and is overridable |
2533 |
# by user. |
2533 |
# by user. |
2534 |
EXTRACT_ONLY?= ${_DISTFILES} |
2534 |
EXTRACT_ONLY?= ${_DISTFILES} |
2535 |
|
2535 |
|
2536 |
.if !target(maintainer) |
2536 |
.if !target(maintainer) |
2537 |
maintainer: |
2537 |
maintainer: |
2538 |
@${ECHO_CMD} "${MAINTAINER}" |
2538 |
@${ECHO_CMD} "${MAINTAINER}" |
2539 |
.endif |
2539 |
.endif |
2540 |
|
2540 |
|
2541 |
.if !defined(CATEGORIES) |
2541 |
.if !defined(CATEGORIES) |
2542 |
check-categories: |
2542 |
check-categories: |
2543 |
@${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." |
2543 |
@${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." |
2544 |
@${FALSE} |
2544 |
@${FALSE} |
2545 |
.else |
2545 |
.else |
2546 |
|
2546 |
|
2547 |
VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ |
2547 |
VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ |
2548 |
benchmarks biology cad chinese comms converters databases \ |
2548 |
benchmarks biology cad chinese comms converters databases \ |
2549 |
deskutils devel docs dns editors elisp emulators enlightenment finance french ftp \ |
2549 |
deskutils devel docs dns editors elisp emulators enlightenment finance french ftp \ |
2550 |
games geography german gnome gnustep graphics hamradio haskell hebrew hungarian \ |
2550 |
games geography german gnome gnustep graphics hamradio haskell hebrew hungarian \ |
2551 |
ipv6 irc japanese java kde ${_KDE_CATEGORIES_SUPPORTED} kld korean lang linux lisp \ |
2551 |
ipv6 irc japanese java kde ${_KDE_CATEGORIES_SUPPORTED} kld korean lang linux lisp \ |
2552 |
mail mate math mbone misc multimedia net net-im net-mgmt net-p2p news \ |
2552 |
mail mate math mbone misc multimedia net net-im net-mgmt net-p2p news os \ |
2553 |
palm parallel pear perl5 plan9 polish portuguese ports-mgmt \ |
2553 |
palm parallel pear perl5 plan9 polish portuguese ports-mgmt \ |
2554 |
print python ruby rubygems russian \ |
2554 |
print python ruby rubygems russian \ |
2555 |
scheme science security shells spanish sysutils \ |
2555 |
scheme science security shells spanish sysutils \ |
2556 |
tcl textproc tk \ |
2556 |
tcl textproc tk \ |
2557 |
ukrainian vietnamese windowmaker wayland www \ |
2557 |
ukrainian vietnamese windowmaker wayland www \ |
2558 |
x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes \ |
2558 |
x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes \ |
2559 |
x11-toolkits x11-wm xfce zope base |
2559 |
x11-toolkits x11-wm xfce zope base |
2560 |
|
2560 |
|
2561 |
check-categories: |
2561 |
check-categories: |
2562 |
.for cat in ${CATEGORIES} |
2562 |
.for cat in ${CATEGORIES} |
2563 |
. if empty(VALID_CATEGORIES:M${cat}) |
2563 |
. if empty(VALID_CATEGORIES:M${cat}) |
2564 |
@${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ |
2564 |
@${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ |
2565 |
${FALSE}; |
2565 |
${FALSE}; |
2566 |
. endif |
2566 |
. endif |
2567 |
.endfor |
2567 |
.endfor |
2568 |
.endif |
2568 |
.endif |
2569 |
|
2569 |
|
2570 |
PKGREPOSITORYSUBDIR?= All |
2570 |
PKGREPOSITORYSUBDIR?= All |
2571 |
PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} |
2571 |
PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} |
2572 |
.if exists(${PACKAGES}) |
2572 |
.if exists(${PACKAGES}) |
2573 |
PACKAGES:= ${PACKAGES:S/:/\:/g} |
2573 |
PACKAGES:= ${PACKAGES:S/:/\:/g} |
2574 |
_HAVE_PACKAGES= yes |
2574 |
_HAVE_PACKAGES= yes |
2575 |
PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} |
2575 |
PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} |
2576 |
.else |
2576 |
.else |
2577 |
PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} |
2577 |
PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} |
2578 |
.endif |
2578 |
.endif |
2579 |
WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} |
2579 |
WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} |
2580 |
|
2580 |
|
2581 |
# The "latest version" link -- ${PKGNAME} minus everthing after the last '-' |
2581 |
# The "latest version" link -- ${PKGNAME} minus everthing after the last '-' |
2582 |
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest |
2582 |
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest |
2583 |
PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} |
2583 |
PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} |
2584 |
PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} |
2584 |
PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} |
2585 |
|
2585 |
|
2586 |
CONFIGURE_SCRIPT?= configure |
2586 |
CONFIGURE_SCRIPT?= configure |
2587 |
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} |
2587 |
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} |
2588 |
CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} |
2588 |
CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} |
2589 |
CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} |
2589 |
CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} |
2590 |
CONFIGURE_LOG?= config.log |
2590 |
CONFIGURE_LOG?= config.log |
2591 |
|
2591 |
|
2592 |
# A default message to print if do-configure fails. |
2592 |
# A default message to print if do-configure fails. |
2593 |
CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." |
2593 |
CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." |
2594 |
|
2594 |
|
2595 |
CONFIG_SITE?= ${PORTSDIR}/Templates/config.site |
2595 |
CONFIG_SITE?= ${PORTSDIR}/Templates/config.site |
2596 |
.if defined(GNU_CONFIGURE) |
2596 |
.if defined(GNU_CONFIGURE) |
2597 |
# Maximum command line length |
2597 |
# Maximum command line length |
2598 |
.if !defined(CONFIGURE_MAX_CMD_LEN) |
2598 |
.if !defined(CONFIGURE_MAX_CMD_LEN) |
2599 |
CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax |
2599 |
CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax |
2600 |
.endif |
2600 |
.endif |
2601 |
_EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN |
2601 |
_EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN |
2602 |
GNU_CONFIGURE_PREFIX?= ${PREFIX} |
2602 |
GNU_CONFIGURE_PREFIX?= ${PREFIX} |
2603 |
GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} |
2603 |
GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} |
2604 |
CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} |
2604 |
CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} |
2605 |
.if defined(CROSS_TOOLCHAIN) |
2605 |
.if defined(CROSS_TOOLCHAIN) |
2606 |
CROSS_HOST= ${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL} |
2606 |
CROSS_HOST= ${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL} |
2607 |
CONFIGURE_ARGS+= --host=${CROSS_HOST} |
2607 |
CONFIGURE_ARGS+= --host=${CROSS_HOST} |
2608 |
.endif |
2608 |
.endif |
2609 |
CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} |
2609 |
CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} |
2610 |
HAS_CONFIGURE= yes |
2610 |
HAS_CONFIGURE= yes |
2611 |
|
2611 |
|
2612 |
SET_LATE_CONFIGURE_ARGS= \ |
2612 |
SET_LATE_CONFIGURE_ARGS= \ |
2613 |
_LATE_CONFIGURE_ARGS="" ; \ |
2613 |
_LATE_CONFIGURE_ARGS="" ; \ |
2614 |
if [ -z "${CONFIGURE_ARGS:M--localstatedir=*:Q}" ] && \ |
2614 |
if [ -z "${CONFIGURE_ARGS:M--localstatedir=*:Q}" ] && \ |
2615 |
${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- --localstatedir > /dev/null; then \ |
2615 |
${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- --localstatedir > /dev/null; then \ |
2616 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --localstatedir=/var" ; \ |
2616 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --localstatedir=/var" ; \ |
2617 |
fi ; \ |
2617 |
fi ; \ |
2618 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--mandir'`" ]; then \ |
2618 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--mandir'`" ]; then \ |
2619 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${GNU_CONFIGURE_MANPREFIX}/man" ; \ |
2619 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${GNU_CONFIGURE_MANPREFIX}/man" ; \ |
2620 |
fi ; \ |
2620 |
fi ; \ |
2621 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--disable-silent-rules'`" ]; then \ |
2621 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--disable-silent-rules'`" ]; then \ |
2622 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --disable-silent-rules" ; \ |
2622 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --disable-silent-rules" ; \ |
2623 |
fi ; \ |
2623 |
fi ; \ |
2624 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--enable-jobserver\[.*\#\]'`" ]; then \ |
2624 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--enable-jobserver\[.*\#\]'`" ]; then \ |
2625 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --enable-jobserver=${MAKE_JOBS_NUMBER}" ; \ |
2625 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --enable-jobserver=${MAKE_JOBS_NUMBER}" ; \ |
2626 |
fi ; \ |
2626 |
fi ; \ |
2627 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--infodir'`" ]; then \ |
2627 |
if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--infodir'`" ]; then \ |
2628 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${GNU_CONFIGURE_PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ |
2628 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${GNU_CONFIGURE_PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ |
2629 |
fi ; \ |
2629 |
fi ; \ |
2630 |
if [ -z "`${CONFIGURE_CMD} --version 2>&1 | ${EGREP} -i '(autoconf.*2\.13|Unrecognized option)'`" ]; then \ |
2630 |
if [ -z "`${CONFIGURE_CMD} --version 2>&1 | ${EGREP} -i '(autoconf.*2\.13|Unrecognized option)'`" ]; then \ |
2631 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_TARGET}" ; \ |
2631 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_TARGET}" ; \ |
2632 |
else \ |
2632 |
else \ |
2633 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ |
2633 |
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ |
2634 |
fi ; |
2634 |
fi ; |
2635 |
.endif |
2635 |
.endif |
2636 |
|
2636 |
|
2637 |
# Passed to most of script invocations |
2637 |
# Passed to most of script invocations |
2638 |
SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ |
2638 |
SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ |
2639 |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
2639 |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
2640 |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
2640 |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
2641 |
PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} |
2641 |
PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} |
2642 |
|
2642 |
|
2643 |
.if defined(BATCH) |
2643 |
.if defined(BATCH) |
2644 |
SCRIPTS_ENV+= BATCH=yes |
2644 |
SCRIPTS_ENV+= BATCH=yes |
2645 |
.endif |
2645 |
.endif |
2646 |
|
2646 |
|
2647 |
.if ${PREFIX} == /usr |
2647 |
.if ${PREFIX} == /usr |
2648 |
MANPREFIX?= /usr/share |
2648 |
MANPREFIX?= /usr/share |
2649 |
.else |
2649 |
.else |
2650 |
MANPREFIX?= ${PREFIX} |
2650 |
MANPREFIX?= ${PREFIX} |
2651 |
.endif |
2651 |
.endif |
2652 |
|
2652 |
|
2653 |
MANDIRS+= ${MANPREFIX}/man |
2653 |
MANDIRS+= ${MANPREFIX}/man |
2654 |
.for sect in 1 2 3 4 5 6 7 8 9 |
2654 |
.for sect in 1 2 3 4 5 6 7 8 9 |
2655 |
MAN${sect}PREFIX?= ${MANPREFIX} |
2655 |
MAN${sect}PREFIX?= ${MANPREFIX} |
2656 |
.endfor |
2656 |
.endfor |
2657 |
MANLPREFIX?= ${MANPREFIX} |
2657 |
MANLPREFIX?= ${MANPREFIX} |
2658 |
MANNPREFIX?= ${MANPREFIX} |
2658 |
MANNPREFIX?= ${MANPREFIX} |
2659 |
INFO_PATH?= share/info |
2659 |
INFO_PATH?= share/info |
2660 |
|
2660 |
|
2661 |
.if defined(INFO) |
2661 |
.if defined(INFO) |
2662 |
RUN_DEPENDS+= indexinfo:print/indexinfo |
2662 |
RUN_DEPENDS+= indexinfo:print/indexinfo |
2663 |
|
2663 |
|
2664 |
. for D in ${INFO:H} |
2664 |
. for D in ${INFO:H} |
2665 |
RD:= ${D} |
2665 |
RD:= ${D} |
2666 |
. if ${RD} != "." |
2666 |
. if ${RD} != "." |
2667 |
. if !defined(INFO_SUBDIR) |
2667 |
. if !defined(INFO_SUBDIR) |
2668 |
INFO_SUBDIR:= ${RD} |
2668 |
INFO_SUBDIR:= ${RD} |
2669 |
. elif ${INFO_SUBDIR} != ${RD} |
2669 |
. elif ${INFO_SUBDIR} != ${RD} |
2670 |
BROKEN= only one subdirectory in INFO is allowed |
2670 |
BROKEN= only one subdirectory in INFO is allowed |
2671 |
. endif |
2671 |
. endif |
2672 |
. endif |
2672 |
. endif |
2673 |
.undef RD |
2673 |
.undef RD |
2674 |
. endfor |
2674 |
. endfor |
2675 |
.endif |
2675 |
.endif |
2676 |
|
2676 |
|
2677 |
DOCSDIR_REL?= ${DOCSDIR:S,^${PREFIX}/,,} |
2677 |
DOCSDIR_REL?= ${DOCSDIR:S,^${PREFIX}/,,} |
2678 |
EXAMPLESDIR_REL?= ${EXAMPLESDIR:S,^${PREFIX}/,,} |
2678 |
EXAMPLESDIR_REL?= ${EXAMPLESDIR:S,^${PREFIX}/,,} |
2679 |
DATADIR_REL?= ${DATADIR:S,^${PREFIX}/,,} |
2679 |
DATADIR_REL?= ${DATADIR:S,^${PREFIX}/,,} |
2680 |
WWWDIR_REL?= ${WWWDIR:S,^${PREFIX}/,,} |
2680 |
WWWDIR_REL?= ${WWWDIR:S,^${PREFIX}/,,} |
2681 |
ETCDIR_REL?= ${ETCDIR:S,^${PREFIX}/,,} |
2681 |
ETCDIR_REL?= ${ETCDIR:S,^${PREFIX}/,,} |
2682 |
|
2682 |
|
2683 |
PLIST_SUB+= DOCSDIR="${DOCSDIR_REL}" \ |
2683 |
PLIST_SUB+= DOCSDIR="${DOCSDIR_REL}" \ |
2684 |
EXAMPLESDIR="${EXAMPLESDIR_REL}" \ |
2684 |
EXAMPLESDIR="${EXAMPLESDIR_REL}" \ |
2685 |
DATADIR="${DATADIR_REL}" \ |
2685 |
DATADIR="${DATADIR_REL}" \ |
2686 |
WWWDIR="${WWWDIR_REL}" \ |
2686 |
WWWDIR="${WWWDIR_REL}" \ |
2687 |
ETCDIR="${ETCDIR_REL}" |
2687 |
ETCDIR="${ETCDIR_REL}" |
2688 |
|
2688 |
|
2689 |
DESKTOPDIR?= ${PREFIX}/share/applications |
2689 |
DESKTOPDIR?= ${PREFIX}/share/applications |
2690 |
|
2690 |
|
2691 |
.MAIN: all |
2691 |
.MAIN: all |
2692 |
|
2692 |
|
2693 |
################################################################ |
2693 |
################################################################ |
2694 |
# Many ways to disable a port. |
2694 |
# Many ways to disable a port. |
2695 |
# |
2695 |
# |
2696 |
# If we're in BATCH mode and the port is interactive, or we're |
2696 |
# If we're in BATCH mode and the port is interactive, or we're |
2697 |
# in interactive mode and the port is non-interactive, skip all |
2697 |
# in interactive mode and the port is non-interactive, skip all |
2698 |
# the important targets. The reason we have two modes is that |
2698 |
# the important targets. The reason we have two modes is that |
2699 |
# one might want to leave a build in BATCH mode running |
2699 |
# one might want to leave a build in BATCH mode running |
2700 |
# overnight, then come back in the morning and do _only_ the |
2700 |
# overnight, then come back in the morning and do _only_ the |
2701 |
# interactive ones that required your intervention. |
2701 |
# interactive ones that required your intervention. |
2702 |
# |
2702 |
# |
2703 |
# Ignore ports that can't be resold if building for a CDROM. |
2703 |
# Ignore ports that can't be resold if building for a CDROM. |
2704 |
# |
2704 |
# |
2705 |
# Don't build a port if it's restricted and we don't want to get |
2705 |
# Don't build a port if it's restricted and we don't want to get |
2706 |
# into that. |
2706 |
# into that. |
2707 |
# |
2707 |
# |
2708 |
# Don't build a port if it's broken, unless we're running a parallel |
2708 |
# Don't build a port if it's broken, unless we're running a parallel |
2709 |
# build (in case it's fixed). |
2709 |
# build (in case it's fixed). |
2710 |
# |
2710 |
# |
2711 |
# Don't build a port if it's forbidden for whatever reason. |
2711 |
# Don't build a port if it's forbidden for whatever reason. |
2712 |
# |
2712 |
# |
2713 |
# Don't build a port if the system is too old. |
2713 |
# Don't build a port if the system is too old. |
2714 |
################################################################ |
2714 |
################################################################ |
2715 |
|
2715 |
|
2716 |
# Check the machine architectures |
2716 |
# Check the machine architectures |
2717 |
.if defined(ONLY_FOR_ARCHS) |
2717 |
.if defined(ONLY_FOR_ARCHS) |
2718 |
.for __ARCH in ${ONLY_FOR_ARCHS} |
2718 |
.for __ARCH in ${ONLY_FOR_ARCHS} |
2719 |
.if ${ARCH:M${__ARCH}} != "" |
2719 |
.if ${ARCH:M${__ARCH}} != "" |
2720 |
__ARCH_OK?= 1 |
2720 |
__ARCH_OK?= 1 |
2721 |
.endif |
2721 |
.endif |
2722 |
.endfor |
2722 |
.endfor |
2723 |
.else |
2723 |
.else |
2724 |
__ARCH_OK?= 1 |
2724 |
__ARCH_OK?= 1 |
2725 |
.endif |
2725 |
.endif |
2726 |
|
2726 |
|
2727 |
.if defined(NOT_FOR_ARCHS) |
2727 |
.if defined(NOT_FOR_ARCHS) |
2728 |
.for __NARCH in ${NOT_FOR_ARCHS} |
2728 |
.for __NARCH in ${NOT_FOR_ARCHS} |
2729 |
.if ${ARCH:M${__NARCH}} != "" |
2729 |
.if ${ARCH:M${__NARCH}} != "" |
2730 |
.undef __ARCH_OK |
2730 |
.undef __ARCH_OK |
2731 |
.endif |
2731 |
.endif |
2732 |
.endfor |
2732 |
.endfor |
2733 |
.endif |
2733 |
.endif |
2734 |
|
2734 |
|
2735 |
.if !defined(__ARCH_OK) |
2735 |
.if !defined(__ARCH_OK) |
2736 |
.if defined(ONLY_FOR_ARCHS) |
2736 |
.if defined(ONLY_FOR_ARCHS) |
2737 |
IGNORE= is only for ${ONLY_FOR_ARCHS:O}, |
2737 |
IGNORE= is only for ${ONLY_FOR_ARCHS:O}, |
2738 |
.else # defined(NOT_FOR_ARCHS) |
2738 |
.else # defined(NOT_FOR_ARCHS) |
2739 |
IGNORE= does not run on ${NOT_FOR_ARCHS:O}, |
2739 |
IGNORE= does not run on ${NOT_FOR_ARCHS:O}, |
2740 |
.endif |
2740 |
.endif |
2741 |
IGNORE+= while you are running ${ARCH} |
2741 |
IGNORE+= while you are running ${ARCH} |
2742 |
|
2742 |
|
2743 |
.if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) |
2743 |
.if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) |
2744 |
IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) |
2744 |
IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) |
2745 |
.elif defined(ONLY_FOR_ARCHS_REASON) |
2745 |
.elif defined(ONLY_FOR_ARCHS_REASON) |
2746 |
IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) |
2746 |
IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) |
2747 |
.endif |
2747 |
.endif |
2748 |
|
2748 |
|
2749 |
.if defined(NOT_FOR_ARCHS_REASON_${ARCH}) |
2749 |
.if defined(NOT_FOR_ARCHS_REASON_${ARCH}) |
2750 |
IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) |
2750 |
IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) |
2751 |
.elif defined(NOT_FOR_ARCHS_REASON) |
2751 |
.elif defined(NOT_FOR_ARCHS_REASON) |
2752 |
IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) |
2752 |
IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) |
2753 |
.endif |
2753 |
.endif |
2754 |
|
2754 |
|
2755 |
.endif |
2755 |
.endif |
2756 |
|
2756 |
|
2757 |
# Check the user interaction and legal issues |
2757 |
# Check the user interaction and legal issues |
2758 |
.if !defined(NO_IGNORE) |
2758 |
.if !defined(NO_IGNORE) |
2759 |
.if (defined(IS_INTERACTIVE) && defined(BATCH)) |
2759 |
.if (defined(IS_INTERACTIVE) && defined(BATCH)) |
2760 |
IGNORE= is an interactive port |
2760 |
IGNORE= is an interactive port |
2761 |
.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) |
2761 |
.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) |
2762 |
IGNORE= is not an interactive port |
2762 |
IGNORE= is not an interactive port |
2763 |
.elif (defined(NO_CDROM) && defined(FOR_CDROM)) |
2763 |
.elif (defined(NO_CDROM) && defined(FOR_CDROM)) |
2764 |
IGNORE= may not be placed on a CDROM: ${NO_CDROM} |
2764 |
IGNORE= may not be placed on a CDROM: ${NO_CDROM} |
2765 |
.elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) |
2765 |
.elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) |
2766 |
IGNORE= is restricted: ${RESTRICTED} |
2766 |
IGNORE= is restricted: ${RESTRICTED} |
2767 |
.elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) |
2767 |
.elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) |
2768 |
IGNORE= may not be packaged: ${NO_PACKAGE} |
2768 |
IGNORE= may not be packaged: ${NO_PACKAGE} |
2769 |
.elif defined(IGNORE_${ARCH}) |
2769 |
.elif defined(IGNORE_${ARCH}) |
2770 |
IGNORE= ${IGNORE_${ARCH}} |
2770 |
IGNORE= ${IGNORE_${ARCH}} |
2771 |
.elif defined(IGNORE_${OPSYS}_${OSREL:R}_${ARCH}) |
2771 |
.elif defined(IGNORE_${OPSYS}_${OSREL:R}_${ARCH}) |
2772 |
IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}_${ARCH}} |
2772 |
IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}_${ARCH}} |
2773 |
.elif defined(IGNORE_${OPSYS}_${OSREL:R}) |
2773 |
.elif defined(IGNORE_${OPSYS}_${OSREL:R}) |
2774 |
IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}} |
2774 |
IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}} |
2775 |
.elif defined(IGNORE_${OPSYS}) |
2775 |
.elif defined(IGNORE_${OPSYS}) |
2776 |
IGNORE= ${IGNORE_${OPSYS}} |
2776 |
IGNORE= ${IGNORE_${OPSYS}} |
2777 |
.elif defined(BROKEN) |
2777 |
.elif defined(BROKEN) |
2778 |
.if !defined(TRYBROKEN) |
2778 |
.if !defined(TRYBROKEN) |
2779 |
IGNORE= is marked as broken: ${BROKEN} |
2779 |
IGNORE= is marked as broken: ${BROKEN} |
2780 |
.endif |
2780 |
.endif |
2781 |
.elif defined(BROKEN_${ARCH}) |
2781 |
.elif defined(BROKEN_${ARCH}) |
2782 |
.if !defined(TRYBROKEN) |
2782 |
.if !defined(TRYBROKEN) |
2783 |
IGNORE= is marked as broken on ${ARCH}: ${BROKEN_${ARCH}} |
2783 |
IGNORE= is marked as broken on ${ARCH}: ${BROKEN_${ARCH}} |
2784 |
.endif |
2784 |
.endif |
2785 |
.elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) |
2785 |
.elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) |
2786 |
.if !defined(TRYBROKEN) |
2786 |
.if !defined(TRYBROKEN) |
2787 |
IGNORE= is marked as broken on ${OPSYS} ${OSREL} ${ARCH}: ${BROKEN_${OPSYS}_${OSREL:R}_${ARCH}} |
2787 |
IGNORE= is marked as broken on ${OPSYS} ${OSREL} ${ARCH}: ${BROKEN_${OPSYS}_${OSREL:R}_${ARCH}} |
2788 |
.endif |
2788 |
.endif |
2789 |
.elif defined(BROKEN_${OPSYS}_${OSREL:R}) |
2789 |
.elif defined(BROKEN_${OPSYS}_${OSREL:R}) |
2790 |
.if !defined(TRYBROKEN) |
2790 |
.if !defined(TRYBROKEN) |
2791 |
IGNORE= is marked as broken on ${OPSYS} ${OSREL}: ${BROKEN_${OPSYS}_${OSREL:R}} |
2791 |
IGNORE= is marked as broken on ${OPSYS} ${OSREL}: ${BROKEN_${OPSYS}_${OSREL:R}} |
2792 |
.endif |
2792 |
.endif |
2793 |
.elif defined(BROKEN_${OPSYS}) |
2793 |
.elif defined(BROKEN_${OPSYS}) |
2794 |
.if !defined(TRYBROKEN) |
2794 |
.if !defined(TRYBROKEN) |
2795 |
IGNORE= is marked as broken on ${OPSYS}: ${BROKEN_${OPSYS}} |
2795 |
IGNORE= is marked as broken on ${OPSYS}: ${BROKEN_${OPSYS}} |
2796 |
.endif |
2796 |
.endif |
2797 |
.elif defined(FORBIDDEN) |
2797 |
.elif defined(FORBIDDEN) |
2798 |
IGNORE= is forbidden: ${FORBIDDEN} |
2798 |
IGNORE= is forbidden: ${FORBIDDEN} |
2799 |
.endif |
2799 |
.endif |
2800 |
|
2800 |
|
2801 |
# Define the text to be output to LEGAL |
2801 |
# Define the text to be output to LEGAL |
2802 |
.if defined(LEGAL_TEXT) |
2802 |
.if defined(LEGAL_TEXT) |
2803 |
LEGAL= ${LEGAL_TEXT} |
2803 |
LEGAL= ${LEGAL_TEXT} |
2804 |
.elif defined(RESTRICTED) |
2804 |
.elif defined(RESTRICTED) |
2805 |
LEGAL= ${RESTRICTED} |
2805 |
LEGAL= ${RESTRICTED} |
2806 |
.elif defined(NO_CDROM) |
2806 |
.elif defined(NO_CDROM) |
2807 |
LEGAL= ${NO_CDROM} |
2807 |
LEGAL= ${NO_CDROM} |
2808 |
.elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) |
2808 |
.elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) |
2809 |
LEGAL= ${NO_PACKAGE} |
2809 |
LEGAL= ${NO_PACKAGE} |
2810 |
.endif |
2810 |
.endif |
2811 |
|
2811 |
|
2812 |
.if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) |
2812 |
.if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) |
2813 |
IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} |
2813 |
IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} |
2814 |
clean: |
2814 |
clean: |
2815 |
@${IGNORECMD} |
2815 |
@${IGNORECMD} |
2816 |
.endif |
2816 |
.endif |
2817 |
|
2817 |
|
2818 |
.if defined(IGNORE) |
2818 |
.if defined(IGNORE) |
2819 |
.if defined(IGNORE_SILENT) |
2819 |
.if defined(IGNORE_SILENT) |
2820 |
IGNORECMD= ${DO_NADA} |
2820 |
IGNORECMD= ${DO_NADA} |
2821 |
.else |
2821 |
.else |
2822 |
IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}. | ${FMT_80} ; exit 1 |
2822 |
IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}. | ${FMT_80} ; exit 1 |
2823 |
.endif |
2823 |
.endif |
2824 |
|
2824 |
|
2825 |
_TARGETS= check-sanity fetch checksum extract patch configure all build \ |
2825 |
_TARGETS= check-sanity fetch checksum extract patch configure all build \ |
2826 |
install reinstall test package stage restage |
2826 |
install reinstall test package stage restage |
2827 |
|
2827 |
|
2828 |
.for target in ${_TARGETS} |
2828 |
.for target in ${_TARGETS} |
2829 |
.if !target(${target}) |
2829 |
.if !target(${target}) |
2830 |
${target}: |
2830 |
${target}: |
2831 |
@${IGNORECMD} |
2831 |
@${IGNORECMD} |
2832 |
.if defined(INSTALLS_DEPENDS) |
2832 |
.if defined(INSTALLS_DEPENDS) |
2833 |
@${FALSE} |
2833 |
@${FALSE} |
2834 |
.endif |
2834 |
.endif |
2835 |
.endif |
2835 |
.endif |
2836 |
.endfor |
2836 |
.endfor |
2837 |
|
2837 |
|
2838 |
.endif |
2838 |
.endif |
2839 |
|
2839 |
|
2840 |
.endif # !defined(NO_IGNORE) |
2840 |
.endif # !defined(NO_IGNORE) |
2841 |
|
2841 |
|
2842 |
ignorelist: |
2842 |
ignorelist: |
2843 |
.if defined(IGNORE) || defined(NO_PACKAGE) |
2843 |
.if defined(IGNORE) || defined(NO_PACKAGE) |
2844 |
ignorelist: package-name |
2844 |
ignorelist: package-name |
2845 |
.endif |
2845 |
.endif |
2846 |
|
2846 |
|
2847 |
ignorelist-verbose: |
2847 |
ignorelist-verbose: |
2848 |
.if defined(IGNORE) |
2848 |
.if defined(IGNORE) |
2849 |
@${ECHO_CMD} "${PKGNAME}|IGNORE: "${IGNORE:Q} |
2849 |
@${ECHO_CMD} "${PKGNAME}|IGNORE: "${IGNORE:Q} |
2850 |
.elif defined(NO_PACKAGE) |
2850 |
.elif defined(NO_PACKAGE) |
2851 |
@${ECHO_CMD} "${PKGNAME}|NO_PACKAGE: "${NO_PACKAGE:Q} |
2851 |
@${ECHO_CMD} "${PKGNAME}|NO_PACKAGE: "${NO_PACKAGE:Q} |
2852 |
.endif |
2852 |
.endif |
2853 |
|
2853 |
|
2854 |
################################################################ |
2854 |
################################################################ |
2855 |
# Clean directories for ftp or CDROM. |
2855 |
# Clean directories for ftp or CDROM. |
2856 |
################################################################ |
2856 |
################################################################ |
2857 |
|
2857 |
|
2858 |
.if !defined(LICENSE) |
2858 |
.if !defined(LICENSE) |
2859 |
|
2859 |
|
2860 |
.if defined(RESTRICTED) |
2860 |
.if defined(RESTRICTED) |
2861 |
clean-restricted: delete-distfiles delete-package |
2861 |
clean-restricted: delete-distfiles delete-package |
2862 |
clean-restricted-list: delete-distfiles-list delete-package-list |
2862 |
clean-restricted-list: delete-distfiles-list delete-package-list |
2863 |
RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} |
2863 |
RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} |
2864 |
.else |
2864 |
.else |
2865 |
clean-restricted: |
2865 |
clean-restricted: |
2866 |
clean-restricted-list: |
2866 |
clean-restricted-list: |
2867 |
.endif |
2867 |
.endif |
2868 |
|
2868 |
|
2869 |
.if defined(NO_CDROM) |
2869 |
.if defined(NO_CDROM) |
2870 |
clean-for-cdrom: delete-distfiles delete-package |
2870 |
clean-for-cdrom: delete-distfiles delete-package |
2871 |
clean-for-cdrom-list: delete-distfiles-list delete-package-list |
2871 |
clean-for-cdrom-list: delete-distfiles-list delete-package-list |
2872 |
RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} |
2872 |
RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} |
2873 |
.else |
2873 |
.else |
2874 |
clean-for-cdrom: |
2874 |
clean-for-cdrom: |
2875 |
clean-for-cdrom-list: |
2875 |
clean-for-cdrom-list: |
2876 |
.endif |
2876 |
.endif |
2877 |
|
2877 |
|
2878 |
.endif # !defined(LICENSE) |
2878 |
.endif # !defined(LICENSE) |
2879 |
|
2879 |
|
2880 |
.if defined(ALL_HOOK) |
2880 |
.if defined(ALL_HOOK) |
2881 |
all: |
2881 |
all: |
2882 |
@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ |
2882 |
@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ |
2883 |
DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ |
2883 |
DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ |
2884 |
PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
2884 |
PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
2885 |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
2885 |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
2886 |
BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" \ |
2886 |
BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" \ |
2887 |
CONFLICTS="${CONFLICTS}" \ |
2887 |
CONFLICTS="${CONFLICTS}" \ |
2888 |
${ALL_HOOK} |
2888 |
${ALL_HOOK} |
2889 |
.endif |
2889 |
.endif |
2890 |
|
2890 |
|
2891 |
.if !target(all) |
2891 |
.if !target(all) |
2892 |
all: stage |
2892 |
all: stage |
2893 |
.endif |
2893 |
.endif |
2894 |
|
2894 |
|
2895 |
.if !defined(DEPENDS_TARGET) |
2895 |
.if !defined(DEPENDS_TARGET) |
2896 |
.if defined(DEPENDS_PRECLEAN) |
2896 |
.if defined(DEPENDS_PRECLEAN) |
2897 |
DEPENDS_TARGET= clean |
2897 |
DEPENDS_TARGET= clean |
2898 |
DEPENDS_ARGS= NOCLEANDEPENDS=yes |
2898 |
DEPENDS_ARGS= NOCLEANDEPENDS=yes |
2899 |
.endif |
2899 |
.endif |
2900 |
.if make(reinstall) |
2900 |
.if make(reinstall) |
2901 |
DEPENDS_TARGET+= reinstall |
2901 |
DEPENDS_TARGET+= reinstall |
2902 |
.else |
2902 |
.else |
2903 |
DEPENDS_TARGET+= install |
2903 |
DEPENDS_TARGET+= install |
2904 |
.endif |
2904 |
.endif |
2905 |
.if defined(DEPENDS_CLEAN) |
2905 |
.if defined(DEPENDS_CLEAN) |
2906 |
DEPENDS_TARGET+= clean |
2906 |
DEPENDS_TARGET+= clean |
2907 |
DEPENDS_ARGS+= NOCLEANDEPENDS=yes |
2907 |
DEPENDS_ARGS+= NOCLEANDEPENDS=yes |
2908 |
.endif |
2908 |
.endif |
2909 |
.endif |
2909 |
.endif |
2910 |
|
2910 |
|
2911 |
.if defined(USE_GITLAB) && !${USE_GITLAB:Mnodefault} && empty(GL_COMMIT_DEFAULT) |
2911 |
.if defined(USE_GITLAB) && !${USE_GITLAB:Mnodefault} && empty(GL_COMMIT_DEFAULT) |
2912 |
check-makevars:: |
2912 |
check-makevars:: |
2913 |
@${ECHO_MSG} "GL_COMMIT is a required 40 character hash for use USE_GITLAB" |
2913 |
@${ECHO_MSG} "GL_COMMIT is a required 40 character hash for use USE_GITLAB" |
2914 |
@${FALSE} |
2914 |
@${FALSE} |
2915 |
.endif |
2915 |
.endif |
2916 |
|
2916 |
|
2917 |
################################################################ |
2917 |
################################################################ |
2918 |
# |
2918 |
# |
2919 |
# Do preliminary work to detect if we need to run the config |
2919 |
# Do preliminary work to detect if we need to run the config |
2920 |
# target or not. |
2920 |
# target or not. |
2921 |
# |
2921 |
# |
2922 |
################################################################ |
2922 |
################################################################ |
2923 |
.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ |
2923 |
.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ |
2924 |
&& !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ |
2924 |
&& !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ |
2925 |
|| defined(CONFIG_DONE_${PKGBASE:tu}) || \ |
2925 |
|| defined(CONFIG_DONE_${PKGBASE:tu}) || \ |
2926 |
defined(PACKAGE_BUILDING) || defined(BATCH)) |
2926 |
defined(PACKAGE_BUILDING) || defined(BATCH)) |
2927 |
_OPTIONS_OK=yes |
2927 |
_OPTIONS_OK=yes |
2928 |
.endif |
2928 |
.endif |
2929 |
|
2929 |
|
2930 |
################################################################ |
2930 |
################################################################ |
2931 |
# The following are used to create easy dummy targets for |
2931 |
# The following are used to create easy dummy targets for |
2932 |
# disabling some bit of default target behavior you don't want. |
2932 |
# disabling some bit of default target behavior you don't want. |
2933 |
# They still check to see if the target exists, and if so don't |
2933 |
# They still check to see if the target exists, and if so don't |
2934 |
# do anything, since you might want to set this globally for a |
2934 |
# do anything, since you might want to set this globally for a |
2935 |
# group of ports in a Makefile.inc, but still be able to |
2935 |
# group of ports in a Makefile.inc, but still be able to |
2936 |
# override from an individual Makefile. |
2936 |
# override from an individual Makefile. |
2937 |
################################################################ |
2937 |
################################################################ |
2938 |
|
2938 |
|
2939 |
# Disable build |
2939 |
# Disable build |
2940 |
.if defined(NO_BUILD) && !target(build) |
2940 |
.if defined(NO_BUILD) && !target(build) |
2941 |
build: configure |
2941 |
build: configure |
2942 |
@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} |
2942 |
@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} |
2943 |
.endif |
2943 |
.endif |
2944 |
|
2944 |
|
2945 |
# Disable package |
2945 |
# Disable package |
2946 |
.if defined(NO_PACKAGE) && !target(package) |
2946 |
.if defined(NO_PACKAGE) && !target(package) |
2947 |
package: |
2947 |
package: |
2948 |
.if !defined(IGNORE_SILENT) |
2948 |
.if !defined(IGNORE_SILENT) |
2949 |
@${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. |
2949 |
@${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. |
2950 |
.endif |
2950 |
.endif |
2951 |
.endif |
2951 |
.endif |
2952 |
|
2952 |
|
2953 |
################################################################ |
2953 |
################################################################ |
2954 |
# More standard targets start here. |
2954 |
# More standard targets start here. |
2955 |
# |
2955 |
# |
2956 |
# These are the body of the build/install framework. If you are |
2956 |
# These are the body of the build/install framework. If you are |
2957 |
# not happy with the default actions, and you can't solve it by |
2957 |
# not happy with the default actions, and you can't solve it by |
2958 |
# adding pre-* or post-* targets/scripts, override these. |
2958 |
# adding pre-* or post-* targets/scripts, override these. |
2959 |
################################################################ |
2959 |
################################################################ |
2960 |
|
2960 |
|
2961 |
.if defined(TRYBROKEN) && defined(BROKEN) |
2961 |
.if defined(TRYBROKEN) && defined(BROKEN) |
2962 |
buildanyway-message: |
2962 |
buildanyway-message: |
2963 |
@${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." |
2963 |
@${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." |
2964 |
.endif |
2964 |
.endif |
2965 |
|
2965 |
|
2966 |
# Warn user about deprecated packages. Advisory only. |
2966 |
# Warn user about deprecated packages. Advisory only. |
2967 |
|
2967 |
|
2968 |
.if !target(check-deprecated) |
2968 |
.if !target(check-deprecated) |
2969 |
# Try and keep these messages in sync with the ones in Mk/Scripts/create-manifest.sh |
2969 |
# Try and keep these messages in sync with the ones in Mk/Scripts/create-manifest.sh |
2970 |
check-deprecated: |
2970 |
check-deprecated: |
2971 |
.if ${MAINTAINER} == "ports@FreeBSD.org" |
2971 |
.if ${MAINTAINER} == "ports@FreeBSD.org" |
2972 |
@${ECHO_MSG} "===> NOTICE:" |
2972 |
@${ECHO_MSG} "===> NOTICE:" |
2973 |
@${ECHO_MSG} |
2973 |
@${ECHO_MSG} |
2974 |
@${ECHO_MSG} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is" |
2974 |
@${ECHO_MSG} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is" |
2975 |
@${ECHO_MSG} "more likely to have unresolved issues, not be up-to-date, or even be removed in" |
2975 |
@${ECHO_MSG} "more likely to have unresolved issues, not be up-to-date, or even be removed in" |
2976 |
@${ECHO_MSG} "the future. To volunteer to maintain this port, please create an issue at:" |
2976 |
@${ECHO_MSG} "the future. To volunteer to maintain this port, please create an issue at:" |
2977 |
@${ECHO_MSG} |
2977 |
@${ECHO_MSG} |
2978 |
@${ECHO_MSG} "https://bugs.freebsd.org/bugzilla" |
2978 |
@${ECHO_MSG} "https://bugs.freebsd.org/bugzilla" |
2979 |
@${ECHO_MSG} |
2979 |
@${ECHO_MSG} |
2980 |
@${ECHO_MSG} "More information about port maintainership is available at:" |
2980 |
@${ECHO_MSG} "More information about port maintainership is available at:" |
2981 |
@${ECHO_MSG} |
2981 |
@${ECHO_MSG} |
2982 |
@${ECHO_MSG} "https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port" |
2982 |
@${ECHO_MSG} "https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port" |
2983 |
@${ECHO_MSG} |
2983 |
@${ECHO_MSG} |
2984 |
.endif |
2984 |
.endif |
2985 |
.if defined(DEPRECATED) |
2985 |
.if defined(DEPRECATED) |
2986 |
@${ECHO_MSG} "===> NOTICE:" |
2986 |
@${ECHO_MSG} "===> NOTICE:" |
2987 |
@${ECHO_MSG} |
2987 |
@${ECHO_MSG} |
2988 |
@${ECHO_MSG} "This port is deprecated; you may wish to reconsider installing it:" |
2988 |
@${ECHO_MSG} "This port is deprecated; you may wish to reconsider installing it:" |
2989 |
@${ECHO_MSG} |
2989 |
@${ECHO_MSG} |
2990 |
@${ECHO_MSG} ${DEPRECATED:Q}. |
2990 |
@${ECHO_MSG} ${DEPRECATED:Q}. |
2991 |
@${ECHO_MSG} |
2991 |
@${ECHO_MSG} |
2992 |
.if defined(EXPIRATION_DATE) |
2992 |
.if defined(EXPIRATION_DATE) |
2993 |
@${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}." |
2993 |
@${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}." |
2994 |
@${ECHO_MSG} |
2994 |
@${ECHO_MSG} |
2995 |
.endif |
2995 |
.endif |
2996 |
.endif |
2996 |
.endif |
2997 |
.endif |
2997 |
.endif |
2998 |
|
2998 |
|
2999 |
# Check if the port is listed in the vulnerability database |
2999 |
# Check if the port is listed in the vulnerability database |
3000 |
|
3000 |
|
3001 |
AUDITFILE?= ${PKG_DBDIR}/vuln.xml |
3001 |
AUDITFILE?= ${PKG_DBDIR}/vuln.xml |
3002 |
|
3002 |
|
3003 |
check-vulnerable: |
3003 |
check-vulnerable: |
3004 |
.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ |
3004 |
.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ |
3005 |
&& exists(${AUDITFILE}) |
3005 |
&& exists(${AUDITFILE}) |
3006 |
@${SETENV} \ |
3006 |
@${SETENV} \ |
3007 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3007 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3008 |
dp_PKG_BIN="${PKG_BIN}" \ |
3008 |
dp_PKG_BIN="${PKG_BIN}" \ |
3009 |
dp_PORTNAME="${PORTNAME}" \ |
3009 |
dp_PORTNAME="${PORTNAME}" \ |
3010 |
dp_PKGNAME="${PKGNAME}" \ |
3010 |
dp_PKGNAME="${PKGNAME}" \ |
3011 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3011 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3012 |
${SH} ${SCRIPTSDIR}/check-vulnerable.sh |
3012 |
${SH} ${SCRIPTSDIR}/check-vulnerable.sh |
3013 |
.endif |
3013 |
.endif |
3014 |
|
3014 |
|
3015 |
# Quote simply quote all variables, except FETCH_ENV, some ports are creative |
3015 |
# Quote simply quote all variables, except FETCH_ENV, some ports are creative |
3016 |
# with it, and it needs to be quoted twice to pass through the echo/eval in |
3016 |
# with it, and it needs to be quoted twice to pass through the echo/eval in |
3017 |
# do-fetch. |
3017 |
# do-fetch. |
3018 |
_DO_FETCH_ENV= \ |
3018 |
_DO_FETCH_ENV= \ |
3019 |
dp_DISABLE_SIZE='${DISABLE_SIZE}' \ |
3019 |
dp_DISABLE_SIZE='${DISABLE_SIZE}' \ |
3020 |
dp_DISTDIR='${_DISTDIR}' \ |
3020 |
dp_DISTDIR='${_DISTDIR}' \ |
3021 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3021 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3022 |
dp_DIST_SUBDIR='${DIST_SUBDIR}' \ |
3022 |
dp_DIST_SUBDIR='${DIST_SUBDIR}' \ |
3023 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3023 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3024 |
dp_FETCH_AFTER_ARGS='${FETCH_AFTER_ARGS}' \ |
3024 |
dp_FETCH_AFTER_ARGS='${FETCH_AFTER_ARGS}' \ |
3025 |
dp_FETCH_BEFORE_ARGS='${FETCH_BEFORE_ARGS}' \ |
3025 |
dp_FETCH_BEFORE_ARGS='${FETCH_BEFORE_ARGS}' \ |
3026 |
dp_FETCH_CMD='${FETCH_CMD}' \ |
3026 |
dp_FETCH_CMD='${FETCH_CMD}' \ |
3027 |
dp_FETCH_ENV=${FETCH_ENV:Q} \ |
3027 |
dp_FETCH_ENV=${FETCH_ENV:Q} \ |
3028 |
dp_FORCE_FETCH_ALL='${FORCE_FETCH_ALL}' \ |
3028 |
dp_FORCE_FETCH_ALL='${FORCE_FETCH_ALL}' \ |
3029 |
dp_FORCE_FETCH_LIST='${FORCE_FETCH_LIST}' \ |
3029 |
dp_FORCE_FETCH_LIST='${FORCE_FETCH_LIST}' \ |
3030 |
dp_MASTER_SITE_BACKUP='${_MASTER_SITE_BACKUP}' \ |
3030 |
dp_MASTER_SITE_BACKUP='${_MASTER_SITE_BACKUP}' \ |
3031 |
dp_MASTER_SITE_OVERRIDE='${_MASTER_SITE_OVERRIDE}' \ |
3031 |
dp_MASTER_SITE_OVERRIDE='${_MASTER_SITE_OVERRIDE}' \ |
3032 |
dp_MASTER_SORT_AWK='${MASTER_SORT_AWK}' \ |
3032 |
dp_MASTER_SORT_AWK='${MASTER_SORT_AWK}' \ |
3033 |
dp_NO_CHECKSUM='${NO_CHECKSUM}' \ |
3033 |
dp_NO_CHECKSUM='${NO_CHECKSUM}' \ |
3034 |
dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ |
3034 |
dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ |
3035 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3035 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3036 |
dp_TARGET='${.TARGET}' |
3036 |
dp_TARGET='${.TARGET}' |
3037 |
.if defined(DEVELOPER) |
3037 |
.if defined(DEVELOPER) |
3038 |
_DO_FETCH_ENV+= dp_DEVELOPER=yes |
3038 |
_DO_FETCH_ENV+= dp_DEVELOPER=yes |
3039 |
.else |
3039 |
.else |
3040 |
_DO_FETCH_ENV+= dp_DEVELOPER= |
3040 |
_DO_FETCH_ENV+= dp_DEVELOPER= |
3041 |
.endif |
3041 |
.endif |
3042 |
|
3042 |
|
3043 |
# Fetch |
3043 |
# Fetch |
3044 |
|
3044 |
|
3045 |
.if !target(do-fetch) |
3045 |
.if !target(do-fetch) |
3046 |
do-fetch: |
3046 |
do-fetch: |
3047 |
.if !empty(DISTFILES) |
3047 |
.if !empty(DISTFILES) |
3048 |
@${SETENV} \ |
3048 |
@${SETENV} \ |
3049 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3049 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3050 |
dp_SITE_FLAVOR=MASTER \ |
3050 |
dp_SITE_FLAVOR=MASTER \ |
3051 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3051 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3052 |
.endif |
3052 |
.endif |
3053 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3053 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3054 |
@${SETENV} \ |
3054 |
@${SETENV} \ |
3055 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3055 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3056 |
dp_SITE_FLAVOR=PATCH \ |
3056 |
dp_SITE_FLAVOR=PATCH \ |
3057 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3057 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3058 |
.endif |
3058 |
.endif |
3059 |
.endif |
3059 |
.endif |
3060 |
# |
3060 |
# |
3061 |
# Prints out a list of files to fetch (useful to do a batch fetch) |
3061 |
# Prints out a list of files to fetch (useful to do a batch fetch) |
3062 |
|
3062 |
|
3063 |
.if !target(fetch-list) |
3063 |
.if !target(fetch-list) |
3064 |
fetch-list: |
3064 |
fetch-list: |
3065 |
.if !empty(DISTFILES) |
3065 |
.if !empty(DISTFILES) |
3066 |
@${SETENV} \ |
3066 |
@${SETENV} \ |
3067 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3067 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3068 |
dp_SITE_FLAVOR=MASTER \ |
3068 |
dp_SITE_FLAVOR=MASTER \ |
3069 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3069 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3070 |
.endif |
3070 |
.endif |
3071 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3071 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3072 |
@${SETENV} \ |
3072 |
@${SETENV} \ |
3073 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3073 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3074 |
dp_SITE_FLAVOR=PATCH \ |
3074 |
dp_SITE_FLAVOR=PATCH \ |
3075 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3075 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3076 |
.endif |
3076 |
.endif |
3077 |
.endif |
3077 |
.endif |
3078 |
|
3078 |
|
3079 |
# Used by fetch-urlall-list and fetch-url-list |
3079 |
# Used by fetch-urlall-list and fetch-url-list |
3080 |
|
3080 |
|
3081 |
.if !target(fetch-url-list-int) |
3081 |
.if !target(fetch-url-list-int) |
3082 |
fetch-url-list-int: |
3082 |
fetch-url-list-int: |
3083 |
.if !empty(DISTFILES) |
3083 |
.if !empty(DISTFILES) |
3084 |
@${SETENV} \ |
3084 |
@${SETENV} \ |
3085 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3085 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3086 |
dp_SITE_FLAVOR=MASTER \ |
3086 |
dp_SITE_FLAVOR=MASTER \ |
3087 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3087 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3088 |
.endif |
3088 |
.endif |
3089 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3089 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3090 |
@${SETENV} \ |
3090 |
@${SETENV} \ |
3091 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3091 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3092 |
dp_SITE_FLAVOR=PATCH \ |
3092 |
dp_SITE_FLAVOR=PATCH \ |
3093 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3093 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3094 |
.endif |
3094 |
.endif |
3095 |
.endif |
3095 |
.endif |
3096 |
|
3096 |
|
3097 |
# Prints out all the URL for all the DISTFILES and PATCHFILES. |
3097 |
# Prints out all the URL for all the DISTFILES and PATCHFILES. |
3098 |
|
3098 |
|
3099 |
.if !target(fetch-urlall-list) |
3099 |
.if !target(fetch-urlall-list) |
3100 |
fetch-urlall-list: |
3100 |
fetch-urlall-list: |
3101 |
@cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int |
3101 |
@cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int |
3102 |
.endif |
3102 |
.endif |
3103 |
|
3103 |
|
3104 |
# Prints the URL for all the DISTFILES and PATCHFILES that are not here |
3104 |
# Prints the URL for all the DISTFILES and PATCHFILES that are not here |
3105 |
|
3105 |
|
3106 |
.if !target(fetch-url-list) |
3106 |
.if !target(fetch-url-list) |
3107 |
fetch-url-list: fetch-url-list-int |
3107 |
fetch-url-list: fetch-url-list-int |
3108 |
.endif |
3108 |
.endif |
3109 |
|
3109 |
|
3110 |
|
3110 |
|
3111 |
# Extract |
3111 |
# Extract |
3112 |
|
3112 |
|
3113 |
clean-wrkdir: |
3113 |
clean-wrkdir: |
3114 |
@${RM} -r ${WRKDIR} |
3114 |
@${RM} -r ${WRKDIR} |
3115 |
|
3115 |
|
3116 |
.if !target(do-extract) |
3116 |
.if !target(do-extract) |
3117 |
do-extract: ${EXTRACT_WRKDIR} |
3117 |
do-extract: ${EXTRACT_WRKDIR} |
3118 |
@for file in ${EXTRACT_ONLY}; do \ |
3118 |
@for file in ${EXTRACT_ONLY}; do \ |
3119 |
if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
3119 |
if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
3120 |
then \ |
3120 |
then \ |
3121 |
exit 1; \ |
3121 |
exit 1; \ |
3122 |
fi; \ |
3122 |
fi; \ |
3123 |
done |
3123 |
done |
3124 |
@if [ ${UID} = 0 ]; then \ |
3124 |
@if [ ${UID} = 0 ]; then \ |
3125 |
${CHMOD} -R ug-s ${WRKDIR}; \ |
3125 |
${CHMOD} -R ug-s ${WRKDIR}; \ |
3126 |
${CHOWN} -R 0:0 ${WRKDIR}; \ |
3126 |
${CHOWN} -R 0:0 ${WRKDIR}; \ |
3127 |
fi |
3127 |
fi |
3128 |
.endif |
3128 |
.endif |
3129 |
|
3129 |
|
3130 |
# Patch |
3130 |
# Patch |
3131 |
|
3131 |
|
3132 |
.if !target(do-patch) |
3132 |
.if !target(do-patch) |
3133 |
do-patch: |
3133 |
do-patch: |
3134 |
@${SETENV} \ |
3134 |
@${SETENV} \ |
3135 |
dp_BZCAT="${BZCAT}" \ |
3135 |
dp_BZCAT="${BZCAT}" \ |
3136 |
dp_CAT="${CAT}" \ |
3136 |
dp_CAT="${CAT}" \ |
3137 |
dp_DISTDIR="${_DISTDIR}" \ |
3137 |
dp_DISTDIR="${_DISTDIR}" \ |
3138 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3138 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3139 |
dp_EXTRA_PATCHES="${EXTRA_PATCHES}" \ |
3139 |
dp_EXTRA_PATCHES="${EXTRA_PATCHES}" \ |
3140 |
dp_EXTRA_PATCH_TREE="${EXTRA_PATCH_TREE}" \ |
3140 |
dp_EXTRA_PATCH_TREE="${EXTRA_PATCH_TREE}" \ |
3141 |
dp_GZCAT="${GZCAT}" \ |
3141 |
dp_GZCAT="${GZCAT}" \ |
3142 |
dp_OPSYS="${OPSYS}" \ |
3142 |
dp_OPSYS="${OPSYS}" \ |
3143 |
dp_PATCH="${PATCH}" \ |
3143 |
dp_PATCH="${PATCH}" \ |
3144 |
dp_PATCHDIR="${PATCHDIR}" \ |
3144 |
dp_PATCHDIR="${PATCHDIR}" \ |
3145 |
dp_PATCHFILES="${_PATCHFILES2}" \ |
3145 |
dp_PATCHFILES="${_PATCHFILES2}" \ |
3146 |
dp_PATCH_ARGS=${PATCH_ARGS:Q} \ |
3146 |
dp_PATCH_ARGS=${PATCH_ARGS:Q} \ |
3147 |
dp_PATCH_DEBUG_TMP="${PATCH_DEBUG_TMP}" \ |
3147 |
dp_PATCH_DEBUG_TMP="${PATCH_DEBUG_TMP}" \ |
3148 |
dp_PATCH_DIST_ARGS="${PATCH_DIST_ARGS}" \ |
3148 |
dp_PATCH_DIST_ARGS="${PATCH_DIST_ARGS}" \ |
3149 |
dp_PATCH_SILENT="${PATCH_SILENT}" \ |
3149 |
dp_PATCH_SILENT="${PATCH_SILENT}" \ |
3150 |
dp_PATCH_WRKSRC=${PATCH_WRKSRC} \ |
3150 |
dp_PATCH_WRKSRC=${PATCH_WRKSRC} \ |
3151 |
dp_PKGNAME="${PKGNAME}" \ |
3151 |
dp_PKGNAME="${PKGNAME}" \ |
3152 |
dp_PKGORIGIN="${PKGORIGIN}" \ |
3152 |
dp_PKGORIGIN="${PKGORIGIN}" \ |
3153 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3153 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3154 |
dp_UNZIP_NATIVE_CMD="${UNZIP_NATIVE_CMD}" \ |
3154 |
dp_UNZIP_NATIVE_CMD="${UNZIP_NATIVE_CMD}" \ |
3155 |
dp_XZCAT="${XZCAT}" \ |
3155 |
dp_XZCAT="${XZCAT}" \ |
3156 |
${SH} ${SCRIPTSDIR}/do-patch.sh |
3156 |
${SH} ${SCRIPTSDIR}/do-patch.sh |
3157 |
.endif |
3157 |
.endif |
3158 |
|
3158 |
|
3159 |
.if !target(run-autotools-fixup) |
3159 |
.if !target(run-autotools-fixup) |
3160 |
run-autotools-fixup: |
3160 |
run-autotools-fixup: |
3161 |
# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. |
3161 |
# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. |
3162 |
.if !defined(WITHOUT_FBSD10_FIX) |
3162 |
.if !defined(WITHOUT_FBSD10_FIX) |
3163 |
-@for f in `${FIND} ${WRKDIR} -type f \( -name config.libpath -o \ |
3163 |
-@for f in `${FIND} ${WRKDIR} -type f \( -name config.libpath -o \ |
3164 |
-name config.rpath -o -name configure -o -name libtool.m4 -o \ |
3164 |
-name config.rpath -o -name configure -o -name libtool.m4 -o \ |
3165 |
-name ltconfig -o -name libtool -o -name aclocal.m4 -o \ |
3165 |
-name ltconfig -o -name libtool -o -name aclocal.m4 -o \ |
3166 |
-name acinclude.m4 \)` ; do \ |
3166 |
-name acinclude.m4 \)` ; do \ |
3167 |
${SED} -i.fbsd10bak \ |
3167 |
${SED} -i.fbsd10bak \ |
3168 |
-e 's|freebsd1\*)|freebsd1.\*)|g' \ |
3168 |
-e 's|freebsd1\*)|freebsd1.\*)|g' \ |
3169 |
-e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ |
3169 |
-e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ |
3170 |
-e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ |
3170 |
-e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ |
3171 |
-e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ |
3171 |
-e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ |
3172 |
-e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ |
3172 |
-e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ |
3173 |
$${f} ; \ |
3173 |
$${f} ; \ |
3174 |
cmp -s $${f}.fbsd10bak $${f} || \ |
3174 |
cmp -s $${f}.fbsd10bak $${f} || \ |
3175 |
${ECHO_MSG} "===> FreeBSD 10 autotools fix applied to $${f}"; \ |
3175 |
${ECHO_MSG} "===> FreeBSD 10 autotools fix applied to $${f}"; \ |
3176 |
${TOUCH} ${TOUCH_FLAGS} -mr $${f}.fbsd10bak $${f} ; \ |
3176 |
${TOUCH} ${TOUCH_FLAGS} -mr $${f}.fbsd10bak $${f} ; \ |
3177 |
${RM} $${f}.fbsd10bak ; \ |
3177 |
${RM} $${f}.fbsd10bak ; \ |
3178 |
done |
3178 |
done |
3179 |
.endif |
3179 |
.endif |
3180 |
.endif |
3180 |
.endif |
3181 |
|
3181 |
|
3182 |
# Configure |
3182 |
# Configure |
3183 |
|
3183 |
|
3184 |
.if !target(do-configure) |
3184 |
.if !target(do-configure) |
3185 |
do-configure: |
3185 |
do-configure: |
3186 |
@if [ -f ${SCRIPTDIR}/configure ]; then \ |
3186 |
@if [ -f ${SCRIPTDIR}/configure ]; then \ |
3187 |
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
3187 |
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
3188 |
${SCRIPTDIR}/configure; \ |
3188 |
${SCRIPTDIR}/configure; \ |
3189 |
fi |
3189 |
fi |
3190 |
.if defined(GNU_CONFIGURE) |
3190 |
.if defined(GNU_CONFIGURE) |
3191 |
@CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ |
3191 |
@CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ |
3192 |
| ${XARGS} -n 1 ${DIRNAME}); \ |
3192 |
| ${XARGS} -n 1 ${DIRNAME}); \ |
3193 |
for _D in $${CONFIG_GUESS_DIRS}; do \ |
3193 |
for _D in $${CONFIG_GUESS_DIRS}; do \ |
3194 |
${RM} $${_D}/config.guess; \ |
3194 |
${RM} $${_D}/config.guess; \ |
3195 |
${CP} ${TEMPLATES}/config.guess $${_D}/config.guess; \ |
3195 |
${CP} ${TEMPLATES}/config.guess $${_D}/config.guess; \ |
3196 |
${CHMOD} a+rx $${_D}/config.guess; \ |
3196 |
${CHMOD} a+rx $${_D}/config.guess; \ |
3197 |
${RM} $${_D}/config.sub; \ |
3197 |
${RM} $${_D}/config.sub; \ |
3198 |
${CP} ${TEMPLATES}/config.sub $${_D}/config.sub; \ |
3198 |
${CP} ${TEMPLATES}/config.sub $${_D}/config.sub; \ |
3199 |
${CHMOD} a+rx $${_D}/config.sub; \ |
3199 |
${CHMOD} a+rx $${_D}/config.sub; \ |
3200 |
done |
3200 |
done |
3201 |
.endif |
3201 |
.endif |
3202 |
.if defined(HAS_CONFIGURE) |
3202 |
.if defined(HAS_CONFIGURE) |
3203 |
@${MKDIR} ${CONFIGURE_WRKSRC} |
3203 |
@${MKDIR} ${CONFIGURE_WRKSRC} |
3204 |
@(cd ${CONFIGURE_WRKSRC} && \ |
3204 |
@(cd ${CONFIGURE_WRKSRC} && \ |
3205 |
${SET_LATE_CONFIGURE_ARGS} \ |
3205 |
${SET_LATE_CONFIGURE_ARGS} \ |
3206 |
if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ |
3206 |
if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ |
3207 |
CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ |
3207 |
CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ |
3208 |
LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ |
3208 |
LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ |
3209 |
INSTALL="/usr/bin/install -c" \ |
3209 |
INSTALL="/usr/bin/install -c" \ |
3210 |
INSTALL_DATA="${INSTALL_DATA}" \ |
3210 |
INSTALL_DATA="${INSTALL_DATA}" \ |
3211 |
INSTALL_LIB="${INSTALL_LIB}" \ |
3211 |
INSTALL_LIB="${INSTALL_LIB}" \ |
3212 |
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ |
3212 |
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ |
3213 |
INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ |
3213 |
INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ |
3214 |
${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \ |
3214 |
${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \ |
3215 |
${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ |
3215 |
${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ |
3216 |
(${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT_80} ; \ |
3216 |
(${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT_80} ; \ |
3217 |
${FALSE}; \ |
3217 |
${FALSE}; \ |
3218 |
fi) |
3218 |
fi) |
3219 |
.endif |
3219 |
.endif |
3220 |
.endif |
3220 |
.endif |
3221 |
|
3221 |
|
3222 |
# Build |
3222 |
# Build |
3223 |
# XXX: ${MAKE_ARGS:N${DESTDIRNAME}=*} would be easier but it is not valid with the old fmake |
3223 |
# XXX: ${MAKE_ARGS:N${DESTDIRNAME}=*} would be easier but it is not valid with the old fmake |
3224 |
DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} |
3224 |
DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} |
3225 |
.if !target(do-build) |
3225 |
.if !target(do-build) |
3226 |
do-build: |
3226 |
do-build: |
3227 |
@(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ |
3227 |
@(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ |
3228 |
if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ |
3228 |
if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ |
3229 |
${ECHO_MSG} "===> Compilation failed unexpectedly."; \ |
3229 |
${ECHO_MSG} "===> Compilation failed unexpectedly."; \ |
3230 |
(${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ |
3230 |
(${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ |
3231 |
fi; \ |
3231 |
fi; \ |
3232 |
${FALSE}; \ |
3232 |
${FALSE}; \ |
3233 |
fi) |
3233 |
fi) |
3234 |
.endif |
3234 |
.endif |
3235 |
|
3235 |
|
3236 |
# Check conflicts |
3236 |
# Check conflicts |
3237 |
|
3237 |
|
3238 |
.if !target(check-conflicts) |
3238 |
.if !target(check-conflicts) |
3239 |
check-conflicts: check-build-conflicts check-install-conflicts |
3239 |
check-conflicts: check-build-conflicts check-install-conflicts |
3240 |
.endif |
3240 |
.endif |
3241 |
|
3241 |
|
3242 |
.if !target(check-build-conflicts) |
3242 |
.if !target(check-build-conflicts) |
3243 |
check-build-conflicts: |
3243 |
check-build-conflicts: |
3244 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) |
3244 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) |
3245 |
@conflicts_with=$$( \ |
3245 |
@conflicts_with=$$( \ |
3246 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \ |
3246 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \ |
3247 |
| while read pkgname prfx orgn; do \ |
3247 |
| while read pkgname prfx orgn; do \ |
3248 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3248 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3249 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3249 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3250 |
fi; \ |
3250 |
fi; \ |
3251 |
done); \ |
3251 |
done); \ |
3252 |
if [ -n "$${conflicts_with}" ]; then \ |
3252 |
if [ -n "$${conflicts_with}" ]; then \ |
3253 |
${ECHO_MSG}; \ |
3253 |
${ECHO_MSG}; \ |
3254 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3254 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3255 |
for entry in $${conflicts_with}; do \ |
3255 |
for entry in $${conflicts_with}; do \ |
3256 |
${ECHO_MSG} " $${entry}"; \ |
3256 |
${ECHO_MSG} " $${entry}"; \ |
3257 |
done; \ |
3257 |
done; \ |
3258 |
${ECHO_MSG}; \ |
3258 |
${ECHO_MSG}; \ |
3259 |
${ECHO_MSG} " They will not build together."; \ |
3259 |
${ECHO_MSG} " They will not build together."; \ |
3260 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3260 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3261 |
exit 1;\ |
3261 |
exit 1;\ |
3262 |
fi |
3262 |
fi |
3263 |
.endif |
3263 |
.endif |
3264 |
.endif |
3264 |
.endif |
3265 |
|
3265 |
|
3266 |
.if !target(identify-install-conflicts) |
3266 |
.if !target(identify-install-conflicts) |
3267 |
identify-install-conflicts: |
3267 |
identify-install-conflicts: |
3268 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) |
3268 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) |
3269 |
@conflicts_with=$$( \ |
3269 |
@conflicts_with=$$( \ |
3270 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3270 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3271 |
| while read pkgname prfx orgn; do \ |
3271 |
| while read pkgname prfx orgn; do \ |
3272 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3272 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3273 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3273 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3274 |
fi; \ |
3274 |
fi; \ |
3275 |
done); \ |
3275 |
done); \ |
3276 |
if [ -n "$${conflicts_with}" ]; then \ |
3276 |
if [ -n "$${conflicts_with}" ]; then \ |
3277 |
${ECHO_MSG}; \ |
3277 |
${ECHO_MSG}; \ |
3278 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3278 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3279 |
for entry in $${conflicts_with}; do \ |
3279 |
for entry in $${conflicts_with}; do \ |
3280 |
${ECHO_MSG} " $${entry}"; \ |
3280 |
${ECHO_MSG} " $${entry}"; \ |
3281 |
done; \ |
3281 |
done; \ |
3282 |
${ECHO_MSG}; \ |
3282 |
${ECHO_MSG}; \ |
3283 |
${ECHO_MSG} " They install files into the same place."; \ |
3283 |
${ECHO_MSG} " They install files into the same place."; \ |
3284 |
${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ |
3284 |
${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ |
3285 |
sleep 10; \ |
3285 |
sleep 10; \ |
3286 |
fi |
3286 |
fi |
3287 |
.endif |
3287 |
.endif |
3288 |
.endif |
3288 |
.endif |
3289 |
|
3289 |
|
3290 |
.if !target(check-install-conflicts) |
3290 |
.if !target(check-install-conflicts) |
3291 |
check-install-conflicts: |
3291 |
check-install-conflicts: |
3292 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) |
3292 |
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) |
3293 |
.if defined(DEFER_CONFLICTS_CHECK) |
3293 |
.if defined(DEFER_CONFLICTS_CHECK) |
3294 |
@conflicts_with=$$( \ |
3294 |
@conflicts_with=$$( \ |
3295 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3295 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3296 |
| while read pkgname prfx orgn; do \ |
3296 |
| while read pkgname prfx orgn; do \ |
3297 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3297 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3298 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3298 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3299 |
fi; \ |
3299 |
fi; \ |
3300 |
done); \ |
3300 |
done); \ |
3301 |
if [ -n "$${conflicts_with}" ]; then \ |
3301 |
if [ -n "$${conflicts_with}" ]; then \ |
3302 |
${ECHO_MSG}; \ |
3302 |
${ECHO_MSG}; \ |
3303 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3303 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3304 |
for entry in $${conflicts_with}; do \ |
3304 |
for entry in $${conflicts_with}; do \ |
3305 |
${ECHO_MSG} " $${entry}"; \ |
3305 |
${ECHO_MSG} " $${entry}"; \ |
3306 |
done; \ |
3306 |
done; \ |
3307 |
${ECHO_MSG}; \ |
3307 |
${ECHO_MSG}; \ |
3308 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3308 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3309 |
exit 1; \ |
3309 |
exit 1; \ |
3310 |
fi |
3310 |
fi |
3311 |
.else |
3311 |
.else |
3312 |
@conflicts_with=$$( \ |
3312 |
@conflicts_with=$$( \ |
3313 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3313 |
{ ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ |
3314 |
| while read pkgname prfx orgn; do \ |
3314 |
| while read pkgname prfx orgn; do \ |
3315 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3315 |
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ |
3316 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3316 |
${ECHO_CMD} -n " $${pkgname}"; \ |
3317 |
fi; \ |
3317 |
fi; \ |
3318 |
done); \ |
3318 |
done); \ |
3319 |
if [ -n "$${conflicts_with}" ]; then \ |
3319 |
if [ -n "$${conflicts_with}" ]; then \ |
3320 |
${ECHO_MSG}; \ |
3320 |
${ECHO_MSG}; \ |
3321 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3321 |
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ |
3322 |
for entry in $${conflicts_with}; do \ |
3322 |
for entry in $${conflicts_with}; do \ |
3323 |
${ECHO_MSG} " $${entry}"; \ |
3323 |
${ECHO_MSG} " $${entry}"; \ |
3324 |
done; \ |
3324 |
done; \ |
3325 |
${ECHO_MSG}; \ |
3325 |
${ECHO_MSG}; \ |
3326 |
${ECHO_MSG} " They install files into the same place."; \ |
3326 |
${ECHO_MSG} " They install files into the same place."; \ |
3327 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3327 |
${ECHO_MSG} " Please remove them first with pkg delete."; \ |
3328 |
exit 1; \ |
3328 |
exit 1; \ |
3329 |
fi |
3329 |
fi |
3330 |
.endif # defined(DEFER_CONFLICTS_CHECK) |
3330 |
.endif # defined(DEFER_CONFLICTS_CHECK) |
3331 |
.endif |
3331 |
.endif |
3332 |
.endif |
3332 |
.endif |
3333 |
|
3333 |
|
3334 |
# Install |
3334 |
# Install |
3335 |
|
3335 |
|
3336 |
.if !target(do-install) && !defined(NO_INSTALL) |
3336 |
.if !target(do-install) && !defined(NO_INSTALL) |
3337 |
do-install: |
3337 |
do-install: |
3338 |
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) |
3338 |
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) |
3339 |
.endif |
3339 |
.endif |
3340 |
|
3340 |
|
3341 |
# Test |
3341 |
# Test |
3342 |
|
3342 |
|
3343 |
.if !target(do-test) && defined(TEST_TARGET) |
3343 |
.if !target(do-test) && defined(TEST_TARGET) |
3344 |
DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:C,^${DESTDIRNAME}=.*,,g} |
3344 |
DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:C,^${DESTDIRNAME}=.*,,g} |
3345 |
do-test: |
3345 |
do-test: |
3346 |
@(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ |
3346 |
@(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ |
3347 |
if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ |
3347 |
if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ |
3348 |
${ECHO_MSG} "===> Tests failed unexpectedly."; \ |
3348 |
${ECHO_MSG} "===> Tests failed unexpectedly."; \ |
3349 |
(${ECHO_CMD} "${TEST_FAIL_MESSAGE}") | ${FMT_80} ; \ |
3349 |
(${ECHO_CMD} "${TEST_FAIL_MESSAGE}") | ${FMT_80} ; \ |
3350 |
fi; \ |
3350 |
fi; \ |
3351 |
${FALSE}; \ |
3351 |
${FALSE}; \ |
3352 |
fi) |
3352 |
fi) |
3353 |
.endif |
3353 |
.endif |
3354 |
|
3354 |
|
3355 |
# Package |
3355 |
# Package |
3356 |
|
3356 |
|
3357 |
.if defined(_HAVE_PACKAGES) |
3357 |
.if defined(_HAVE_PACKAGES) |
3358 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} |
3358 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} |
3359 |
_PORTS_DIRECTORIES+= ${PKGREPOSITORY} |
3359 |
_PORTS_DIRECTORIES+= ${PKGREPOSITORY} |
3360 |
|
3360 |
|
3361 |
${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} |
3361 |
${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} |
3362 |
@${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ |
3362 |
@${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ |
3363 |
|| ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} |
3363 |
|| ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} |
3364 |
|
3364 |
|
3365 |
. if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" |
3365 |
. if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" |
3366 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} |
3366 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} |
3367 |
_PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} |
3367 |
_PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} |
3368 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} |
3368 |
_EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} |
3369 |
|
3369 |
|
3370 |
${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} |
3370 |
${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} |
3371 |
${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} |
3371 |
${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} |
3372 |
. endif |
3372 |
. endif |
3373 |
|
3373 |
|
3374 |
.endif |
3374 |
.endif |
3375 |
|
3375 |
|
3376 |
# from here this will become a loop for subpackages |
3376 |
# from here this will become a loop for subpackages |
3377 |
${WRKDIR_PKGFILE}: ${TMPPLIST} create-manifest ${WRKDIR}/pkg |
3377 |
${WRKDIR_PKGFILE}: ${TMPPLIST} create-manifest ${WRKDIR}/pkg |
3378 |
@if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR} -p ${TMPPLIST} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ |
3378 |
@if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR} -p ${TMPPLIST} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ |
3379 |
cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ |
3379 |
cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ |
3380 |
exit 1; \ |
3380 |
exit 1; \ |
3381 |
fi |
3381 |
fi |
3382 |
# |
3382 |
# |
3383 |
# Temporary will be later dynamically added per subpackages |
3383 |
# Temporary will be later dynamically added per subpackages |
3384 |
_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE} |
3384 |
_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE} |
3385 |
# This will be the end of the loop |
3385 |
# This will be the end of the loop |
3386 |
|
3386 |
|
3387 |
.if !target(do-package) |
3387 |
.if !target(do-package) |
3388 |
PKG_CREATE_ARGS= -r ${STAGEDIR} |
3388 |
PKG_CREATE_ARGS= -r ${STAGEDIR} |
3389 |
. if defined(PKG_CREATE_VERBOSE) |
3389 |
. if defined(PKG_CREATE_VERBOSE) |
3390 |
PKG_CREATE_ARGS+= -v |
3390 |
PKG_CREATE_ARGS+= -v |
3391 |
. endif |
3391 |
. endif |
3392 |
do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg |
3392 |
do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg |
3393 |
.endif |
3393 |
.endif |
3394 |
|
3394 |
|
3395 |
.if !target(delete-package) |
3395 |
.if !target(delete-package) |
3396 |
delete-package: |
3396 |
delete-package: |
3397 |
@${ECHO_MSG} "===> Deleting package for ${PKGNAME}" |
3397 |
@${ECHO_MSG} "===> Deleting package for ${PKGNAME}" |
3398 |
# When staging, the package may only be in the workdir if not root |
3398 |
# When staging, the package may only be in the workdir if not root |
3399 |
@${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : |
3399 |
@${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : |
3400 |
.endif |
3400 |
.endif |
3401 |
|
3401 |
|
3402 |
.if !target(delete-package-list) |
3402 |
.if !target(delete-package-list) |
3403 |
delete-package-list: |
3403 |
delete-package-list: |
3404 |
@${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} ${PKGFILE})" |
3404 |
@${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} ${PKGFILE})" |
3405 |
.endif |
3405 |
.endif |
3406 |
|
3406 |
|
3407 |
# Used by scripts and users to install a package from local repository. |
3407 |
# Used by scripts and users to install a package from local repository. |
3408 |
# Poudriere -i uses this, please keep. |
3408 |
# Poudriere -i uses this, please keep. |
3409 |
.if !target(install-package) |
3409 |
.if !target(install-package) |
3410 |
.if defined(FORCE_PKG_REGISTER) |
3410 |
.if defined(FORCE_PKG_REGISTER) |
3411 |
_INSTALL_PKG_ARGS= -f |
3411 |
_INSTALL_PKG_ARGS= -f |
3412 |
.endif |
3412 |
.endif |
3413 |
.if defined(INSTALLS_DEPENDS) |
3413 |
.if defined(INSTALLS_DEPENDS) |
3414 |
_INSTALL_PKG_ARGS+= -A |
3414 |
_INSTALL_PKG_ARGS+= -A |
3415 |
.endif |
3415 |
.endif |
3416 |
install-package: |
3416 |
install-package: |
3417 |
@if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ |
3417 |
@if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ |
3418 |
_pkgfile="${WRKDIR_PKGFILE}"; \ |
3418 |
_pkgfile="${WRKDIR_PKGFILE}"; \ |
3419 |
else \ |
3419 |
else \ |
3420 |
_pkgfile="${PKGFILE}"; \ |
3420 |
_pkgfile="${PKGFILE}"; \ |
3421 |
fi; \ |
3421 |
fi; \ |
3422 |
${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} |
3422 |
${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} |
3423 |
.endif |
3423 |
.endif |
3424 |
|
3424 |
|
3425 |
|
3425 |
|
3426 |
# Utility targets follow |
3426 |
# Utility targets follow |
3427 |
|
3427 |
|
3428 |
.if !target(check-already-installed) |
3428 |
.if !target(check-already-installed) |
3429 |
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) |
3429 |
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) |
3430 |
check-already-installed: |
3430 |
check-already-installed: |
3431 |
@${ECHO_MSG} "===> Checking if ${PKGBASE} is already installed"; \ |
3431 |
@${ECHO_MSG} "===> Checking if ${PKGBASE} is already installed"; \ |
3432 |
pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \ |
3432 |
pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \ |
3433 |
if [ -n "$${pkgname}" ]; then \ |
3433 |
if [ -n "$${pkgname}" ]; then \ |
3434 |
v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \ |
3434 |
v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \ |
3435 |
if [ "$${v}" = "<" ]; then \ |
3435 |
if [ "$${v}" = "<" ]; then \ |
3436 |
${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \ |
3436 |
${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \ |
3437 |
else \ |
3437 |
else \ |
3438 |
${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ |
3438 |
${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ |
3439 |
fi; \ |
3439 |
fi; \ |
3440 |
${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \ |
3440 |
${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \ |
3441 |
${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \ |
3441 |
${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \ |
3442 |
${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \ |
3442 |
${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \ |
3443 |
${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ |
3443 |
${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ |
3444 |
${ECHO_MSG} " in your environment or the \"make install\" command line."; \ |
3444 |
${ECHO_MSG} " in your environment or the \"make install\" command line."; \ |
3445 |
exit 1; \ |
3445 |
exit 1; \ |
3446 |
fi |
3446 |
fi |
3447 |
.endif |
3447 |
.endif |
3448 |
.endif |
3448 |
.endif |
3449 |
|
3449 |
|
3450 |
.if !target(check-umask) |
3450 |
.if !target(check-umask) |
3451 |
check-umask: |
3451 |
check-umask: |
3452 |
@if [ `${SH} -c umask` != 0022 ]; then \ |
3452 |
@if [ `${SH} -c umask` != 0022 ]; then \ |
3453 |
${ECHO_MSG} "===> Warning: your umask is \"`${SH} -c umask`"\".; \ |
3453 |
${ECHO_MSG} "===> Warning: your umask is \"`${SH} -c umask`"\".; \ |
3454 |
${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ |
3454 |
${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ |
3455 |
${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ |
3455 |
${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ |
3456 |
fi |
3456 |
fi |
3457 |
.endif |
3457 |
.endif |
3458 |
|
3458 |
|
3459 |
# Needed for poudriere wait for at least a year before removing |
3459 |
# Needed for poudriere wait for at least a year before removing |
3460 |
# XXX 2017-04-09 |
3460 |
# XXX 2017-04-09 |
3461 |
.if !target(install-mtree) |
3461 |
.if !target(install-mtree) |
3462 |
install-mtree: |
3462 |
install-mtree: |
3463 |
.endif |
3463 |
.endif |
3464 |
|
3464 |
|
3465 |
.if !target(install-ldconfig-file) |
3465 |
.if !target(install-ldconfig-file) |
3466 |
install-ldconfig-file: |
3466 |
install-ldconfig-file: |
3467 |
. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) |
3467 |
. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) |
3468 |
. if defined(USE_LDCONFIG) |
3468 |
. if defined(USE_LDCONFIG) |
3469 |
. if !defined(USE_LINUX_PREFIX) |
3469 |
. if !defined(USE_LINUX_PREFIX) |
3470 |
. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) |
3470 |
. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) |
3471 |
@${ECHO_MSG} "===> Installing ldconfig configuration file" |
3471 |
@${ECHO_MSG} "===> Installing ldconfig configuration file" |
3472 |
. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} |
3472 |
. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} |
3473 |
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} |
3473 |
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} |
3474 |
. endif |
3474 |
. endif |
3475 |
@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ |
3475 |
@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ |
3476 |
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} |
3476 |
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} |
3477 |
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} |
3477 |
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} |
3478 |
. if ${PREFIX} != ${LOCALBASE} |
3478 |
. if ${PREFIX} != ${LOCALBASE} |
3479 |
@${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG_DIR}" >> ${TMPPLIST} |
3479 |
@${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG_DIR}" >> ${TMPPLIST} |
3480 |
. endif |
3480 |
. endif |
3481 |
. endif |
3481 |
. endif |
3482 |
. endif |
3482 |
. endif |
3483 |
. endif |
3483 |
. endif |
3484 |
. if defined(USE_LDCONFIG32) |
3484 |
. if defined(USE_LDCONFIG32) |
3485 |
. if !defined(INSTALL_AS_USER) |
3485 |
. if !defined(INSTALL_AS_USER) |
3486 |
@${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" |
3486 |
@${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" |
3487 |
. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} |
3487 |
. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} |
3488 |
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} |
3488 |
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} |
3489 |
. endif |
3489 |
. endif |
3490 |
@${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ |
3490 |
@${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ |
3491 |
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} |
3491 |
> ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} |
3492 |
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} |
3492 |
@${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} |
3493 |
. if ${PREFIX} != ${LOCALBASE} |
3493 |
. if ${PREFIX} != ${LOCALBASE} |
3494 |
@${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG32_DIR}" >> ${TMPPLIST} |
3494 |
@${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG32_DIR}" >> ${TMPPLIST} |
3495 |
. endif |
3495 |
. endif |
3496 |
. endif |
3496 |
. endif |
3497 |
. endif |
3497 |
. endif |
3498 |
. endif |
3498 |
. endif |
3499 |
.endif |
3499 |
.endif |
3500 |
|
3500 |
|
3501 |
.if !defined(USE_LINUX_PREFIX) |
3501 |
.if !defined(USE_LINUX_PREFIX) |
3502 |
. if !target(fixup-lib-pkgconfig) |
3502 |
. if !target(fixup-lib-pkgconfig) |
3503 |
fixup-lib-pkgconfig: |
3503 |
fixup-lib-pkgconfig: |
3504 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/pkgconfig ]; then \ |
3504 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/pkgconfig ]; then \ |
3505 |
if [ -z "$$(${FIND} ${STAGEDIR}${PREFIX}/lib/pkgconfig -maxdepth 0 -empty)" ]; then \ |
3505 |
if [ -z "$$(${FIND} ${STAGEDIR}${PREFIX}/lib/pkgconfig -maxdepth 0 -empty)" ]; then \ |
3506 |
${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ |
3506 |
${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ |
3507 |
${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/* ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ |
3507 |
${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/* ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ |
3508 |
fi; \ |
3508 |
fi; \ |
3509 |
${RMDIR} ${STAGEDIR}${PREFIX}/lib/pkgconfig; \ |
3509 |
${RMDIR} ${STAGEDIR}${PREFIX}/lib/pkgconfig; \ |
3510 |
fi |
3510 |
fi |
3511 |
. endif |
3511 |
. endif |
3512 |
.endif |
3512 |
.endif |
3513 |
|
3513 |
|
3514 |
.if !target(create-users-groups) |
3514 |
.if !target(create-users-groups) |
3515 |
.if defined(GROUPS) || defined(USERS) |
3515 |
.if defined(GROUPS) || defined(USERS) |
3516 |
_UG_INSTALL= ${WRKDIR}/users-groups-install.sh |
3516 |
_UG_INSTALL= ${WRKDIR}/users-groups-install.sh |
3517 |
_UG_DEINSTALL= ${WRKDIR}/users-groups-deinstall.sh |
3517 |
_UG_DEINSTALL= ${WRKDIR}/users-groups-deinstall.sh |
3518 |
PKGPREINSTALL+= ${_UG_INSTALL} |
3518 |
PKGPREINSTALL+= ${_UG_INSTALL} |
3519 |
PKGPOSTDEINSTALL+= ${_UG_DEINSTALL} |
3519 |
PKGPOSTDEINSTALL+= ${_UG_DEINSTALL} |
3520 |
create-users-groups: |
3520 |
create-users-groups: |
3521 |
@${SETENV} \ |
3521 |
@${SETENV} \ |
3522 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3522 |
dp_ECHO_MSG="${ECHO_MSG}" \ |
3523 |
dp_GID_FILES="${GID_FILES}" \ |
3523 |
dp_GID_FILES="${GID_FILES}" \ |
3524 |
dp_GID_OFFSET="${GID_OFFSET}" \ |
3524 |
dp_GID_OFFSET="${GID_OFFSET}" \ |
3525 |
dp_GROUPS_BLACKLIST="${GROUPS_BLACKLIST}" \ |
3525 |
dp_GROUPS_BLACKLIST="${GROUPS_BLACKLIST}" \ |
3526 |
dp_INSTALL="${INSTALL}" \ |
3526 |
dp_INSTALL="${INSTALL}" \ |
3527 |
dp_OPSYS="${OPSYS}" \ |
3527 |
dp_OPSYS="${OPSYS}" \ |
3528 |
dp_OSVERSION="${OSVERSION}" \ |
3528 |
dp_OSVERSION="${OSVERSION}" \ |
3529 |
dp_PREFIX="${PREFIX}" \ |
3529 |
dp_PREFIX="${PREFIX}" \ |
3530 |
dp_PW="${PW}" \ |
3530 |
dp_PW="${PW}" \ |
3531 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3531 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3532 |
dp_UG_DEINSTALL="${_UG_DEINSTALL}" \ |
3532 |
dp_UG_DEINSTALL="${_UG_DEINSTALL}" \ |
3533 |
dp_UG_INSTALL="${_UG_INSTALL}" \ |
3533 |
dp_UG_INSTALL="${_UG_INSTALL}" \ |
3534 |
dp_UID_FILES="${UID_FILES}" \ |
3534 |
dp_UID_FILES="${UID_FILES}" \ |
3535 |
dp_UID_OFFSET="${UID_OFFSET}" \ |
3535 |
dp_UID_OFFSET="${UID_OFFSET}" \ |
3536 |
dp_USERS_BLACKLIST="${USERS_BLACKLIST}" \ |
3536 |
dp_USERS_BLACKLIST="${USERS_BLACKLIST}" \ |
3537 |
${SH} ${SCRIPTSDIR}/do-users-groups.sh "${USERS}" "${GROUPS}" |
3537 |
${SH} ${SCRIPTSDIR}/do-users-groups.sh "${USERS}" "${GROUPS}" |
3538 |
.endif |
3538 |
.endif |
3539 |
.endif |
3539 |
.endif |
3540 |
|
3540 |
|
3541 |
.if !defined(DISABLE_SECURITY_CHECK) |
3541 |
.if !defined(DISABLE_SECURITY_CHECK) |
3542 |
.if !target(security-check) |
3542 |
.if !target(security-check) |
3543 |
security-check: ${TMPPLIST} |
3543 |
security-check: ${TMPPLIST} |
3544 |
# Scan PLIST for: |
3544 |
# Scan PLIST for: |
3545 |
# 1. setugid files |
3545 |
# 1. setugid files |
3546 |
# 2. accept()/recvfrom() which indicates network listening capability |
3546 |
# 2. accept()/recvfrom() which indicates network listening capability |
3547 |
# 3. insecure functions (gets/mktemp/tempnam/[XXX]) |
3547 |
# 3. insecure functions (gets/mktemp/tempnam/[XXX]) |
3548 |
# 4. startup scripts, in conjunction with 2. |
3548 |
# 4. startup scripts, in conjunction with 2. |
3549 |
# 5. world-writable files/dirs |
3549 |
# 5. world-writable files/dirs |
3550 |
# |
3550 |
# |
3551 |
# The ${NONEXISTENT}Â argument of ${READELF} is there so that there are always |
3551 |
# The ${NONEXISTENT}Â argument of ${READELF} is there so that there are always |
3552 |
# at least two file arguments, and forces it to always output the "File: foo" |
3552 |
# at least two file arguments, and forces it to always output the "File: foo" |
3553 |
# header lines. |
3553 |
# header lines. |
3554 |
# |
3554 |
# |
3555 |
-@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.readelf; \ |
3555 |
-@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.readelf; \ |
3556 |
${AWK} -v prefix='${PREFIX}' ' \ |
3556 |
${AWK} -v prefix='${PREFIX}' ' \ |
3557 |
match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); if (prefix == "/") prefix=""; next; } \ |
3557 |
match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); if (prefix == "/") prefix=""; next; } \ |
3558 |
/^@/ { next; } \ |
3558 |
/^@/ { next; } \ |
3559 |
/^\// { print; next; } \ |
3559 |
/^\// { print; next; } \ |
3560 |
{ print prefix "/" $$0; } \ |
3560 |
{ print prefix "/" $$0; } \ |
3561 |
' ${TMPPLIST} > ${WRKDIR}/.PLIST.flattened; \ |
3561 |
' ${TMPPLIST} > ${WRKDIR}/.PLIST.flattened; \ |
3562 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3562 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3563 |
| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) 2> /dev/null > ${WRKDIR}/.PLIST.setuid; \ |
3563 |
| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) 2> /dev/null > ${WRKDIR}/.PLIST.setuid; \ |
3564 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3564 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3565 |
| ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \ |
3565 |
| ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \ |
3566 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3566 |
${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ |
3567 |
| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \ |
3567 |
| ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \ |
3568 |
| ${XARGS} -0 ${READELF} -r ${NONEXISTENT} 2> /dev/null > ${WRKDIR}/.PLIST.readelf; \ |
3568 |
| ${XARGS} -0 ${READELF} -r ${NONEXISTENT} 2> /dev/null > ${WRKDIR}/.PLIST.readelf; \ |
3569 |
if \ |
3569 |
if \ |
3570 |
! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${SCRIPTSDIR}/security-check.awk \ |
3570 |
! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${SCRIPTSDIR}/security-check.awk \ |
3571 |
${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.readelf ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \ |
3571 |
${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.readelf ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \ |
3572 |
then \ |
3572 |
then \ |
3573 |
www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ |
3573 |
www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ |
3574 |
if [ ! -z "$${www_site}" ]; then \ |
3574 |
if [ ! -z "$${www_site}" ]; then \ |
3575 |
${ECHO_MSG}; \ |
3575 |
${ECHO_MSG}; \ |
3576 |
${ECHO_MSG} " For more information, and contact details about the security"; \ |
3576 |
${ECHO_MSG} " For more information, and contact details about the security"; \ |
3577 |
${ECHO_MSG} " status of this software, see the following webpage: "; \ |
3577 |
${ECHO_MSG} " status of this software, see the following webpage: "; \ |
3578 |
${ECHO_MSG} "$${www_site}"; \ |
3578 |
${ECHO_MSG} "$${www_site}"; \ |
3579 |
fi; \ |
3579 |
fi; \ |
3580 |
fi |
3580 |
fi |
3581 |
.endif |
3581 |
.endif |
3582 |
.else # i.e. defined(DISABLE_SECURITY_CHECK) |
3582 |
.else # i.e. defined(DISABLE_SECURITY_CHECK) |
3583 |
security-check: |
3583 |
security-check: |
3584 |
@${ECHO_MSG} " WARNING: Security check has been disabled." |
3584 |
@${ECHO_MSG} " WARNING: Security check has been disabled." |
3585 |
.endif # !defined(DISABLE_SECURITY_CHECK) |
3585 |
.endif # !defined(DISABLE_SECURITY_CHECK) |
3586 |
|
3586 |
|
3587 |
################################################################ |
3587 |
################################################################ |
3588 |
# Skeleton targets start here |
3588 |
# Skeleton targets start here |
3589 |
# |
3589 |
# |
3590 |
# You shouldn't have to change these. Either add the pre-* or |
3590 |
# You shouldn't have to change these. Either add the pre-* or |
3591 |
# post-* targets/scripts or redefine the do-* targets. These |
3591 |
# post-* targets/scripts or redefine the do-* targets. These |
3592 |
# targets don't do anything other than checking for cookies and |
3592 |
# targets don't do anything other than checking for cookies and |
3593 |
# call the necessary targets/scripts. |
3593 |
# call the necessary targets/scripts. |
3594 |
################################################################ |
3594 |
################################################################ |
3595 |
|
3595 |
|
3596 |
extract-message: |
3596 |
extract-message: |
3597 |
@${ECHO_MSG} "===> Extracting for ${PKGNAME}" |
3597 |
@${ECHO_MSG} "===> Extracting for ${PKGNAME}" |
3598 |
patch-message: |
3598 |
patch-message: |
3599 |
@${ECHO_MSG} "===> Patching for ${PKGNAME}" |
3599 |
@${ECHO_MSG} "===> Patching for ${PKGNAME}" |
3600 |
configure-message: |
3600 |
configure-message: |
3601 |
@${ECHO_MSG} "===> Configuring for ${PKGNAME}" |
3601 |
@${ECHO_MSG} "===> Configuring for ${PKGNAME}" |
3602 |
build-message: |
3602 |
build-message: |
3603 |
@${ECHO_MSG} "===> Building for ${PKGNAME}" |
3603 |
@${ECHO_MSG} "===> Building for ${PKGNAME}" |
3604 |
stage-message: |
3604 |
stage-message: |
3605 |
@${ECHO_MSG} "===> Staging for ${PKGNAME}" |
3605 |
@${ECHO_MSG} "===> Staging for ${PKGNAME}" |
3606 |
install-message: |
3606 |
install-message: |
3607 |
@${ECHO_MSG} "===> Installing for ${PKGNAME}" |
3607 |
@${ECHO_MSG} "===> Installing for ${PKGNAME}" |
3608 |
test-message: |
3608 |
test-message: |
3609 |
@${ECHO_MSG} "===> Testing for ${PKGNAME}" |
3609 |
@${ECHO_MSG} "===> Testing for ${PKGNAME}" |
3610 |
package-message: |
3610 |
package-message: |
3611 |
@${ECHO_MSG} "===> Building package for ${PKGNAME}" |
3611 |
@${ECHO_MSG} "===> Building package for ${PKGNAME}" |
3612 |
|
3612 |
|
3613 |
# Empty pre-* and post-* targets |
3613 |
# Empty pre-* and post-* targets |
3614 |
|
3614 |
|
3615 |
.if exists(${SCRIPTDIR}) |
3615 |
.if exists(${SCRIPTDIR}) |
3616 |
.for stage in pre post |
3616 |
.for stage in pre post |
3617 |
.for name in pkg check-sanity fetch extract patch configure build stage install package |
3617 |
.for name in pkg check-sanity fetch extract patch configure build stage install package |
3618 |
|
3618 |
|
3619 |
.if !target(${stage}-${name}-script) |
3619 |
.if !target(${stage}-${name}-script) |
3620 |
.if exists(${SCRIPTDIR}/${stage}-${name}) |
3620 |
.if exists(${SCRIPTDIR}/${stage}-${name}) |
3621 |
${stage}-${name}-script: |
3621 |
${stage}-${name}-script: |
3622 |
@ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
3622 |
@ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
3623 |
${SCRIPTDIR}/${.TARGET:S/-script$//} |
3623 |
${SCRIPTDIR}/${.TARGET:S/-script$//} |
3624 |
.endif |
3624 |
.endif |
3625 |
.endif |
3625 |
.endif |
3626 |
|
3626 |
|
3627 |
.endfor |
3627 |
.endfor |
3628 |
.endfor |
3628 |
.endfor |
3629 |
.endif |
3629 |
.endif |
3630 |
|
3630 |
|
3631 |
.if !target(pretty-print-www-site) |
3631 |
.if !target(pretty-print-www-site) |
3632 |
pretty-print-www-site: |
3632 |
pretty-print-www-site: |
3633 |
@www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ |
3633 |
@www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ |
3634 |
if [ -n "$${www_site}" ]; then \ |
3634 |
if [ -n "$${www_site}" ]; then \ |
3635 |
${ECHO_MSG} -n " and/or visit the "; \ |
3635 |
${ECHO_MSG} -n " and/or visit the "; \ |
3636 |
${ECHO_MSG} -n "<a href=\"$${www_site}\">web site</a>"; \ |
3636 |
${ECHO_MSG} -n "<a href=\"$${www_site}\">web site</a>"; \ |
3637 |
${ECHO_MSG} " for further information"; \ |
3637 |
${ECHO_MSG} " for further information"; \ |
3638 |
fi |
3638 |
fi |
3639 |
.endif |
3639 |
.endif |
3640 |
|
3640 |
|
3641 |
################################################################ |
3641 |
################################################################ |
3642 |
# Some more targets supplied for users' convenience |
3642 |
# Some more targets supplied for users' convenience |
3643 |
################################################################ |
3643 |
################################################################ |
3644 |
|
3644 |
|
3645 |
# Checkpatch |
3645 |
# Checkpatch |
3646 |
# |
3646 |
# |
3647 |
# Special target to verify patches |
3647 |
# Special target to verify patches |
3648 |
|
3648 |
|
3649 |
.if !target(checkpatch) |
3649 |
.if !target(checkpatch) |
3650 |
checkpatch: |
3650 |
checkpatch: |
3651 |
@cd ${.CURDIR} && ${MAKE} ${PATCH_SILENT} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_REAL_SEQ} |
3651 |
@cd ${.CURDIR} && ${MAKE} ${PATCH_SILENT} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_REAL_SEQ} |
3652 |
.endif |
3652 |
.endif |
3653 |
|
3653 |
|
3654 |
# Reinstall |
3654 |
# Reinstall |
3655 |
# |
3655 |
# |
3656 |
# Special target to re-run install |
3656 |
# Special target to re-run install |
3657 |
|
3657 |
|
3658 |
.if !target(reinstall) |
3658 |
.if !target(reinstall) |
3659 |
reinstall: |
3659 |
reinstall: |
3660 |
@${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3660 |
@${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3661 |
@cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} -DFORCE_PKG_REGISTER install |
3661 |
@cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} -DFORCE_PKG_REGISTER install |
3662 |
.endif |
3662 |
.endif |
3663 |
|
3663 |
|
3664 |
.if !target(restage) |
3664 |
.if !target(restage) |
3665 |
restage: |
3665 |
restage: |
3666 |
@${RM} -r ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3666 |
@${RM} -r ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3667 |
@cd ${.CURDIR} && ${MAKE} stage |
3667 |
@cd ${.CURDIR} && ${MAKE} stage |
3668 |
.endif |
3668 |
.endif |
3669 |
|
3669 |
|
3670 |
# Deinstall |
3670 |
# Deinstall |
3671 |
# |
3671 |
# |
3672 |
# Special target to remove installation |
3672 |
# Special target to remove installation |
3673 |
|
3673 |
|
3674 |
.if !target(deinstall) |
3674 |
.if !target(deinstall) |
3675 |
deinstall: |
3675 |
deinstall: |
3676 |
.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) |
3676 |
.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) |
3677 |
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" |
3677 |
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" |
3678 |
@cd ${.CURDIR} && \ |
3678 |
@cd ${.CURDIR} && \ |
3679 |
${SU_CMD} "${MAKE} ${.TARGET}" |
3679 |
${SU_CMD} "${MAKE} ${.TARGET}" |
3680 |
@${ECHO_MSG} "===> Returning to user credentials" |
3680 |
@${ECHO_MSG} "===> Returning to user credentials" |
3681 |
.else |
3681 |
.else |
3682 |
@${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" |
3682 |
@${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" |
3683 |
@if ${PKG_INFO} -e ${PKGBASE}; then \ |
3683 |
@if ${PKG_INFO} -e ${PKGBASE}; then \ |
3684 |
p=`${PKG_INFO} -q -O ${PKGBASE}`; \ |
3684 |
p=`${PKG_INFO} -q -O ${PKGBASE}`; \ |
3685 |
${ECHO_MSG} "===> Deinstalling $${p}"; \ |
3685 |
${ECHO_MSG} "===> Deinstalling $${p}"; \ |
3686 |
${PKG_DELETE} -f ${PKGBASE} ; \ |
3686 |
${PKG_DELETE} -f ${PKGBASE} ; \ |
3687 |
else \ |
3687 |
else \ |
3688 |
${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ |
3688 |
${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ |
3689 |
fi |
3689 |
fi |
3690 |
@${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3690 |
@${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3691 |
.endif |
3691 |
.endif |
3692 |
.endif |
3692 |
.endif |
3693 |
|
3693 |
|
3694 |
# Deinstall-all |
3694 |
# Deinstall-all |
3695 |
# |
3695 |
# |
3696 |
# Special target to remove installation of all ports of the same origin |
3696 |
# Special target to remove installation of all ports of the same origin |
3697 |
|
3697 |
|
3698 |
.if !target(deinstall-all) |
3698 |
.if !target(deinstall-all) |
3699 |
deinstall-all: |
3699 |
deinstall-all: |
3700 |
.if ${UID} != 0 && !defined(INSTALL_AS_USER) |
3700 |
.if ${UID} != 0 && !defined(INSTALL_AS_USER) |
3701 |
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" |
3701 |
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" |
3702 |
@cd ${.CURDIR} && \ |
3702 |
@cd ${.CURDIR} && \ |
3703 |
${SU_CMD} "${MAKE} ${.TARGET}" |
3703 |
${SU_CMD} "${MAKE} ${.TARGET}" |
3704 |
@${ECHO_MSG} "===> Returning to user credentials" |
3704 |
@${ECHO_MSG} "===> Returning to user credentials" |
3705 |
.else |
3705 |
.else |
3706 |
@${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}" |
3706 |
@${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}" |
3707 |
@deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ |
3707 |
@deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ |
3708 |
for oldpkgorigin in $$(${GREP} "|${PKGORIGIN}|" ${PORTSDIR}/MOVED | ${CUT} -f 1 -d '|' | ${SORT} -u); do \ |
3708 |
for oldpkgorigin in $$(${GREP} "|${PKGORIGIN}|" ${PORTSDIR}/MOVED | ${CUT} -f 1 -d '|' | ${SORT} -u); do \ |
3709 |
deinstall_names="$${deinstall_names} $$(${PKG_INFO} -q -O $${oldpkgorigin})"; \ |
3709 |
deinstall_names="$${deinstall_names} $$(${PKG_INFO} -q -O $${oldpkgorigin})"; \ |
3710 |
done; \ |
3710 |
done; \ |
3711 |
if [ -n "$${deinstall_names}" ]; then \ |
3711 |
if [ -n "$${deinstall_names}" ]; then \ |
3712 |
for d in $${deinstall_names}; do \ |
3712 |
for d in $${deinstall_names}; do \ |
3713 |
${ECHO_MSG} "===> Deinstalling $${d}"; \ |
3713 |
${ECHO_MSG} "===> Deinstalling $${d}"; \ |
3714 |
${PKG_DELETE} -f $${d}; \ |
3714 |
${PKG_DELETE} -f $${d}; \ |
3715 |
done; \ |
3715 |
done; \ |
3716 |
else \ |
3716 |
else \ |
3717 |
${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \ |
3717 |
${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \ |
3718 |
fi; \ |
3718 |
fi; \ |
3719 |
${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3719 |
${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
3720 |
.endif |
3720 |
.endif |
3721 |
.endif |
3721 |
.endif |
3722 |
|
3722 |
|
3723 |
# Cleaning up |
3723 |
# Cleaning up |
3724 |
|
3724 |
|
3725 |
.if !target(do-clean) |
3725 |
.if !target(do-clean) |
3726 |
do-clean: |
3726 |
do-clean: |
3727 |
@if [ -d ${WRKDIR} ]; then \ |
3727 |
@if [ -d ${WRKDIR} ]; then \ |
3728 |
if [ -w ${WRKDIR} ]; then \ |
3728 |
if [ -w ${WRKDIR} ]; then \ |
3729 |
${RM} -r ${WRKDIR}; \ |
3729 |
${RM} -r ${WRKDIR}; \ |
3730 |
else \ |
3730 |
else \ |
3731 |
${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ |
3731 |
${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ |
3732 |
fi; \ |
3732 |
fi; \ |
3733 |
fi |
3733 |
fi |
3734 |
.endif |
3734 |
.endif |
3735 |
|
3735 |
|
3736 |
.if !target(clean) |
3736 |
.if !target(clean) |
3737 |
pre-clean: clean-msg |
3737 |
pre-clean: clean-msg |
3738 |
clean-msg: |
3738 |
clean-msg: |
3739 |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
3739 |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
3740 |
|
3740 |
|
3741 |
.if empty(FLAVORS) |
3741 |
.if empty(FLAVORS) |
3742 |
CLEAN_DEPENDENCIES= |
3742 |
CLEAN_DEPENDENCIES= |
3743 |
.if !defined(NOCLEANDEPENDS) |
3743 |
.if !defined(NOCLEANDEPENDS) |
3744 |
CLEAN_DEPENDENCIES+= limited-clean-depends-noflavor |
3744 |
CLEAN_DEPENDENCIES+= limited-clean-depends-noflavor |
3745 |
limited-clean-depends-noflavor: |
3745 |
limited-clean-depends-noflavor: |
3746 |
@cd ${.CURDIR} && ${MAKE} limited-clean-depends |
3746 |
@cd ${.CURDIR} && ${MAKE} limited-clean-depends |
3747 |
.endif |
3747 |
.endif |
3748 |
.if target(pre-clean) |
3748 |
.if target(pre-clean) |
3749 |
CLEAN_DEPENDENCIES+= pre-clean-noflavor |
3749 |
CLEAN_DEPENDENCIES+= pre-clean-noflavor |
3750 |
pre-clean-noflavor: |
3750 |
pre-clean-noflavor: |
3751 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} pre-clean |
3751 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} pre-clean |
3752 |
.endif |
3752 |
.endif |
3753 |
CLEAN_DEPENDENCIES+= do-clean-noflavor |
3753 |
CLEAN_DEPENDENCIES+= do-clean-noflavor |
3754 |
do-clean-noflavor: |
3754 |
do-clean-noflavor: |
3755 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} do-clean |
3755 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} do-clean |
3756 |
.if target(post-clean) |
3756 |
.if target(post-clean) |
3757 |
CLEAN_DEPENDENCIES+= post-clean-noflavor |
3757 |
CLEAN_DEPENDENCIES+= post-clean-noflavor |
3758 |
post-clean-noflavor: |
3758 |
post-clean-noflavor: |
3759 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} post-clean |
3759 |
@cd ${.CURDIR} && ${SETENV} ${MAKE} post-clean |
3760 |
.endif |
3760 |
.endif |
3761 |
.ORDER: ${CLEAN_DEPENDENCIES} |
3761 |
.ORDER: ${CLEAN_DEPENDENCIES} |
3762 |
clean: ${CLEAN_DEPENDENCIES} |
3762 |
clean: ${CLEAN_DEPENDENCIES} |
3763 |
.endif |
3763 |
.endif |
3764 |
|
3764 |
|
3765 |
.if !empty(_FLAVOR) |
3765 |
.if !empty(_FLAVOR) |
3766 |
_CLEANFLAVORS= ${_FLAVOR} |
3766 |
_CLEANFLAVORS= ${_FLAVOR} |
3767 |
.else |
3767 |
.else |
3768 |
_CLEANFLAVORS= ${FLAVORS} |
3768 |
_CLEANFLAVORS= ${FLAVORS} |
3769 |
.endif |
3769 |
.endif |
3770 |
.for _f in ${_CLEANFLAVORS} |
3770 |
.for _f in ${_CLEANFLAVORS} |
3771 |
CLEAN_DEPENDENCIES= |
3771 |
CLEAN_DEPENDENCIES= |
3772 |
.if !defined(NOCLEANDEPENDS) |
3772 |
.if !defined(NOCLEANDEPENDS) |
3773 |
CLEAN_DEPENDENCIES+= limited-clean-depends-${_f} |
3773 |
CLEAN_DEPENDENCIES+= limited-clean-depends-${_f} |
3774 |
limited-clean-depends-${_f}: |
3774 |
limited-clean-depends-${_f}: |
3775 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} limited-clean-depends |
3775 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} limited-clean-depends |
3776 |
.endif |
3776 |
.endif |
3777 |
.if target(pre-clean) |
3777 |
.if target(pre-clean) |
3778 |
CLEAN_DEPENDENCIES+= pre-clean-${_f} |
3778 |
CLEAN_DEPENDENCIES+= pre-clean-${_f} |
3779 |
pre-clean-${_f}: |
3779 |
pre-clean-${_f}: |
3780 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} pre-clean |
3780 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} pre-clean |
3781 |
.endif |
3781 |
.endif |
3782 |
CLEAN_DEPENDENCIES+= do-clean-${_f} |
3782 |
CLEAN_DEPENDENCIES+= do-clean-${_f} |
3783 |
do-clean-${_f}: |
3783 |
do-clean-${_f}: |
3784 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} do-clean |
3784 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} do-clean |
3785 |
.if target(post-clean) |
3785 |
.if target(post-clean) |
3786 |
CLEAN_DEPENDENCIES+= post-clean-${_f} |
3786 |
CLEAN_DEPENDENCIES+= post-clean-${_f} |
3787 |
post-clean-${_f}: |
3787 |
post-clean-${_f}: |
3788 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} post-clean |
3788 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} post-clean |
3789 |
.endif |
3789 |
.endif |
3790 |
.ORDER: ${CLEAN_DEPENDENCIES} |
3790 |
.ORDER: ${CLEAN_DEPENDENCIES} |
3791 |
clean: ${CLEAN_DEPENDENCIES} |
3791 |
clean: ${CLEAN_DEPENDENCIES} |
3792 |
.endfor |
3792 |
.endfor |
3793 |
.endif |
3793 |
.endif |
3794 |
|
3794 |
|
3795 |
.if !target(distclean) |
3795 |
.if !target(distclean) |
3796 |
distclean: clean |
3796 |
distclean: clean |
3797 |
@cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" |
3797 |
@cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" |
3798 |
.endif |
3798 |
.endif |
3799 |
|
3799 |
|
3800 |
.if !target(delete-distfiles) |
3800 |
.if !target(delete-distfiles) |
3801 |
delete-distfiles: |
3801 |
delete-distfiles: |
3802 |
@${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}" |
3802 |
@${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}" |
3803 |
@(if [ "X${RESTRICTED_FILES}" != "X" -a -d ${_DISTDIR} ]; then \ |
3803 |
@(if [ "X${RESTRICTED_FILES}" != "X" -a -d ${_DISTDIR} ]; then \ |
3804 |
cd ${_DISTDIR}; \ |
3804 |
cd ${_DISTDIR}; \ |
3805 |
for file in ${RESTRICTED_FILES}; do \ |
3805 |
for file in ${RESTRICTED_FILES}; do \ |
3806 |
${RM} $${file}; \ |
3806 |
${RM} $${file}; \ |
3807 |
dir=$${file%/*}; \ |
3807 |
dir=$${file%/*}; \ |
3808 |
if [ "$${dir}" != "$${file}" ]; then \ |
3808 |
if [ "$${dir}" != "$${file}" ]; then \ |
3809 |
${RMDIR} -p $${dir} >/dev/null 2>&1 || :; \ |
3809 |
${RMDIR} -p $${dir} >/dev/null 2>&1 || :; \ |
3810 |
fi; \ |
3810 |
fi; \ |
3811 |
done; \ |
3811 |
done; \ |
3812 |
fi) |
3812 |
fi) |
3813 |
.if defined(DIST_SUBDIR) |
3813 |
.if defined(DIST_SUBDIR) |
3814 |
-@${RMDIR} ${_DISTDIR} >/dev/null 2>&1 || ${TRUE} |
3814 |
-@${RMDIR} ${_DISTDIR} >/dev/null 2>&1 || ${TRUE} |
3815 |
.endif |
3815 |
.endif |
3816 |
.endif |
3816 |
.endif |
3817 |
|
3817 |
|
3818 |
.if !target(delete-distfiles-list) |
3818 |
.if !target(delete-distfiles-list) |
3819 |
delete-distfiles-list: |
3819 |
delete-distfiles-list: |
3820 |
@${ECHO_CMD} "# ${PKGNAME}" |
3820 |
@${ECHO_CMD} "# ${PKGNAME}" |
3821 |
@if [ "X${RESTRICTED_FILES}" != "X" ]; then \ |
3821 |
@if [ "X${RESTRICTED_FILES}" != "X" ]; then \ |
3822 |
for file in ${RESTRICTED_FILES}; do \ |
3822 |
for file in ${RESTRICTED_FILES}; do \ |
3823 |
${ECHO_CMD} "[ -f ${_DISTDIR}/$$file ] && (${ECHO_CMD} deleting ${_DISTDIR}/$$file; ${RM} ${_DISTDIR}/$$file)"; \ |
3823 |
${ECHO_CMD} "[ -f ${_DISTDIR}/$$file ] && (${ECHO_CMD} deleting ${_DISTDIR}/$$file; ${RM} ${_DISTDIR}/$$file)"; \ |
3824 |
dir=$${file%/*}; \ |
3824 |
dir=$${file%/*}; \ |
3825 |
if [ "$${dir}" != "$${file}" ]; then \ |
3825 |
if [ "$${dir}" != "$${file}" ]; then \ |
3826 |
${ECHO_CMD} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \ |
3826 |
${ECHO_CMD} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \ |
3827 |
fi; \ |
3827 |
fi; \ |
3828 |
done; \ |
3828 |
done; \ |
3829 |
fi |
3829 |
fi |
3830 |
.if defined(DIST_SUBDIR) |
3830 |
.if defined(DIST_SUBDIR) |
3831 |
@${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" |
3831 |
@${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" |
3832 |
.endif |
3832 |
.endif |
3833 |
.endif |
3833 |
.endif |
3834 |
|
3834 |
|
3835 |
# Generates patches. |
3835 |
# Generates patches. |
3836 |
|
3836 |
|
3837 |
update-patches: |
3837 |
update-patches: |
3838 |
@toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \ |
3838 |
@toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \ |
3839 |
PATCHDIR=${PATCHDIR} \ |
3839 |
PATCHDIR=${PATCHDIR} \ |
3840 |
PATCH_LIST=${PATCHDIR}/patch-* \ |
3840 |
PATCH_LIST=${PATCHDIR}/patch-* \ |
3841 |
DIFF_ARGS=${DIFF_ARGS} \ |
3841 |
DIFF_ARGS=${DIFF_ARGS} \ |
3842 |
DISTORIG=${DISTORIG} \ |
3842 |
DISTORIG=${DISTORIG} \ |
3843 |
${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \ |
3843 |
${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \ |
3844 |
case $$toedit in "");; \ |
3844 |
case $$toedit in "");; \ |
3845 |
*) ${ECHO_CMD} -n 'edit patches: '; read i; \ |
3845 |
*) ${ECHO_CMD} -n 'edit patches: '; read i; \ |
3846 |
cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac |
3846 |
cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac |
3847 |
|
3847 |
|
3848 |
# Checksumming utilities |
3848 |
# Checksumming utilities |
3849 |
|
3849 |
|
3850 |
# List all algorithms here, all the variables name must begin with dp_ |
3850 |
# List all algorithms here, all the variables name must begin with dp_ |
3851 |
_CHECKSUM_INIT_ENV= \ |
3851 |
_CHECKSUM_INIT_ENV= \ |
3852 |
dp_SHA256=${SHA256} |
3852 |
dp_SHA256=${SHA256} |
3853 |
|
3853 |
|
3854 |
.if !target(makesum) |
3854 |
.if !target(makesum) |
3855 |
# Some port change the options with OPTIONS_*_FORCE when make(makesum) to be |
3855 |
# Some port change the options with OPTIONS_*_FORCE when make(makesum) to be |
3856 |
# able to add all distfiles in one go. |
3856 |
# able to add all distfiles in one go. |
3857 |
# For this to work, we need to call the do-fetch script directly here so that |
3857 |
# For this to work, we need to call the do-fetch script directly here so that |
3858 |
# the options consistent when fetching and when makesum'ing. |
3858 |
# the options consistent when fetching and when makesum'ing. |
3859 |
# As we're fetching new distfiles, that are not in the distinfo file, disable |
3859 |
# As we're fetching new distfiles, that are not in the distinfo file, disable |
3860 |
# checksum and sizes checks. |
3860 |
# checksum and sizes checks. |
3861 |
makesum: check-sanity |
3861 |
makesum: check-sanity |
3862 |
.if !empty(DISTFILES) |
3862 |
.if !empty(DISTFILES) |
3863 |
@${SETENV} \ |
3863 |
@${SETENV} \ |
3864 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3864 |
${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ |
3865 |
dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ |
3865 |
dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ |
3866 |
dp_SITE_FLAVOR=MASTER \ |
3866 |
dp_SITE_FLAVOR=MASTER \ |
3867 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3867 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} |
3868 |
.endif |
3868 |
.endif |
3869 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3869 |
.if defined(PATCHFILES) && !empty(PATCHFILES) |
3870 |
@${SETENV} \ |
3870 |
@${SETENV} \ |
3871 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3871 |
${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ |
3872 |
dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ |
3872 |
dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ |
3873 |
dp_SITE_FLAVOR=PATCH \ |
3873 |
dp_SITE_FLAVOR=PATCH \ |
3874 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3874 |
${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} |
3875 |
.endif |
3875 |
.endif |
3876 |
@${SETENV} \ |
3876 |
@${SETENV} \ |
3877 |
${_CHECKSUM_INIT_ENV} \ |
3877 |
${_CHECKSUM_INIT_ENV} \ |
3878 |
dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ |
3878 |
dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ |
3879 |
dp_CKSUMFILES='${_CKSUMFILES}' \ |
3879 |
dp_CKSUMFILES='${_CKSUMFILES}' \ |
3880 |
dp_DISTDIR='${DISTDIR}' \ |
3880 |
dp_DISTDIR='${DISTDIR}' \ |
3881 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3881 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3882 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3882 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3883 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3883 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3884 |
${SH} ${SCRIPTSDIR}/makesum.sh ${DISTFILES:C/.*/'&'/} |
3884 |
${SH} ${SCRIPTSDIR}/makesum.sh ${DISTFILES:C/.*/'&'/} |
3885 |
.endif |
3885 |
.endif |
3886 |
|
3886 |
|
3887 |
.if !target(checksum) |
3887 |
.if !target(checksum) |
3888 |
checksum: fetch |
3888 |
checksum: fetch |
3889 |
.if !empty(_CKSUMFILES) && !defined(NO_CHECKSUM) |
3889 |
.if !empty(_CKSUMFILES) && !defined(NO_CHECKSUM) |
3890 |
@${SETENV} \ |
3890 |
@${SETENV} \ |
3891 |
${_CHECKSUM_INIT_ENV} \ |
3891 |
${_CHECKSUM_INIT_ENV} \ |
3892 |
dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ |
3892 |
dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ |
3893 |
dp_CURDIR='${.CURDIR}' \ |
3893 |
dp_CURDIR='${.CURDIR}' \ |
3894 |
dp_DISTDIR='${DISTDIR}' \ |
3894 |
dp_DISTDIR='${DISTDIR}' \ |
3895 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3895 |
dp_DISTINFO_FILE='${DISTINFO_FILE}' \ |
3896 |
dp_DIST_SUBDIR='${DIST_SUBDIR}' \ |
3896 |
dp_DIST_SUBDIR='${DIST_SUBDIR}' \ |
3897 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3897 |
dp_ECHO_MSG='${ECHO_MSG}' \ |
3898 |
dp_FETCH_REGET='${FETCH_REGET}' \ |
3898 |
dp_FETCH_REGET='${FETCH_REGET}' \ |
3899 |
dp_MAKE='${MAKE}' \ |
3899 |
dp_MAKE='${MAKE}' \ |
3900 |
dp_MAKEFLAGS='${.MAKEFLAGS}' \ |
3900 |
dp_MAKEFLAGS='${.MAKEFLAGS}' \ |
3901 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3901 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
3902 |
dp_DISABLE_SIZE='${DISABLE_SIZE}' \ |
3902 |
dp_DISABLE_SIZE='${DISABLE_SIZE}' \ |
3903 |
dp_NO_CHECKSUM='${NO_CHECKSUM}' \ |
3903 |
dp_NO_CHECKSUM='${NO_CHECKSUM}' \ |
3904 |
${SH} ${SCRIPTSDIR}/checksum.sh ${_CKSUMFILES:C/.*/'&'/} |
3904 |
${SH} ${SCRIPTSDIR}/checksum.sh ${_CKSUMFILES:C/.*/'&'/} |
3905 |
.endif |
3905 |
.endif |
3906 |
.endif |
3906 |
.endif |
3907 |
|
3907 |
|
3908 |
# Some port's archives contains files modes that are a bit too restrictive for |
3908 |
# Some port's archives contains files modes that are a bit too restrictive for |
3909 |
# some usage. For example: |
3909 |
# some usage. For example: |
3910 |
# BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure |
3910 |
# BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure |
3911 |
# When building as a regular user, dependencies are installed/built as root, so |
3911 |
# When building as a regular user, dependencies are installed/built as root, so |
3912 |
# if the archive contains files that have a mode of, say, 600, they will not be |
3912 |
# if the archive contains files that have a mode of, say, 600, they will not be |
3913 |
# readable by the port requesting the dependency. |
3913 |
# readable by the port requesting the dependency. |
3914 |
# This will also fix broken distribution files where directories don't have the |
3914 |
# This will also fix broken distribution files where directories don't have the |
3915 |
# executable bit on. |
3915 |
# executable bit on. |
3916 |
extract-fixup-modes: |
3916 |
extract-fixup-modes: |
3917 |
@${CHMOD} -R u+w,a+rX ${WRKDIR} |
3917 |
@${CHMOD} -R u+w,a+rX ${WRKDIR} |
3918 |
|
3918 |
|
3919 |
################################################################ |
3919 |
################################################################ |
3920 |
# The special package-building targets |
3920 |
# The special package-building targets |
3921 |
# You probably won't need to touch these |
3921 |
# You probably won't need to touch these |
3922 |
################################################################ |
3922 |
################################################################ |
3923 |
|
3923 |
|
3924 |
# Nobody should want to override this unless PKGNAME is simply bogus. |
3924 |
# Nobody should want to override this unless PKGNAME is simply bogus. |
3925 |
|
3925 |
|
3926 |
.if !target(package-name) |
3926 |
.if !target(package-name) |
3927 |
package-name: |
3927 |
package-name: |
3928 |
@${ECHO_CMD} ${PKGNAME} |
3928 |
@${ECHO_CMD} ${PKGNAME} |
3929 |
.endif |
3929 |
.endif |
3930 |
|
3930 |
|
3931 |
# Build a package but don't check the package cookie |
3931 |
# Build a package but don't check the package cookie |
3932 |
|
3932 |
|
3933 |
.if !target(repackage) |
3933 |
.if !target(repackage) |
3934 |
repackage: pre-repackage package |
3934 |
repackage: pre-repackage package |
3935 |
|
3935 |
|
3936 |
pre-repackage: |
3936 |
pre-repackage: |
3937 |
@${RM} ${PACKAGE_COOKIE} |
3937 |
@${RM} ${PACKAGE_COOKIE} |
3938 |
.endif |
3938 |
.endif |
3939 |
|
3939 |
|
3940 |
# Build a package but don't check the cookie for installation, also don't |
3940 |
# Build a package but don't check the cookie for installation, also don't |
3941 |
# install package cookie |
3941 |
# install package cookie |
3942 |
|
3942 |
|
3943 |
.if !target(package-noinstall) |
3943 |
.if !target(package-noinstall) |
3944 |
package-noinstall: package |
3944 |
package-noinstall: package |
3945 |
.endif |
3945 |
.endif |
3946 |
|
3946 |
|
3947 |
################################################################ |
3947 |
################################################################ |
3948 |
# Dependency checking |
3948 |
# Dependency checking |
3949 |
################################################################ |
3949 |
################################################################ |
3950 |
|
3950 |
|
3951 |
.if !target(depends) |
3951 |
.if !target(depends) |
3952 |
depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends |
3952 |
depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends |
3953 |
|
3953 |
|
3954 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST |
3954 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST |
3955 |
${deptype:tl}-depends: |
3955 |
${deptype:tl}-depends: |
3956 |
.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) |
3956 |
.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) |
3957 |
@${SETENV} \ |
3957 |
@${SETENV} \ |
3958 |
dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ |
3958 |
dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ |
3959 |
dp_DEPTYPE="${deptype}_DEPENDS" \ |
3959 |
dp_DEPTYPE="${deptype}_DEPENDS" \ |
3960 |
dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ |
3960 |
dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ |
3961 |
dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ |
3961 |
dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ |
3962 |
dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ |
3962 |
dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ |
3963 |
dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ |
3963 |
dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ |
3964 |
dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ |
3964 |
dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ |
3965 |
dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ |
3965 |
dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ |
3966 |
dp_PKG_ADD="${PKG_ADD}" \ |
3966 |
dp_PKG_ADD="${PKG_ADD}" \ |
3967 |
dp_PKG_INFO="${PKG_INFO}" \ |
3967 |
dp_PKG_INFO="${PKG_INFO}" \ |
3968 |
dp_WRKDIR="${WRKDIR}" \ |
3968 |
dp_WRKDIR="${WRKDIR}" \ |
3969 |
dp_PKGNAME="${PKGNAME}" \ |
3969 |
dp_PKGNAME="${PKGNAME}" \ |
3970 |
dp_STRICT_DEPENDS="${STRICT_DEPENDS}" \ |
3970 |
dp_STRICT_DEPENDS="${STRICT_DEPENDS}" \ |
3971 |
dp_LOCALBASE="${LOCALBASE}" \ |
3971 |
dp_LOCALBASE="${LOCALBASE}" \ |
3972 |
dp_LIB_DIRS="${LIB_DIRS}" \ |
3972 |
dp_LIB_DIRS="${LIB_DIRS}" \ |
3973 |
dp_SH="${SH}" \ |
3973 |
dp_SH="${SH}" \ |
3974 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3974 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
3975 |
PORTSDIR="${PORTSDIR}" \ |
3975 |
PORTSDIR="${PORTSDIR}" \ |
3976 |
dp_MAKE="${MAKE}" \ |
3976 |
dp_MAKE="${MAKE}" \ |
3977 |
dp_MAKEFLAGS='${.MAKEFLAGS}' \ |
3977 |
dp_MAKEFLAGS='${.MAKEFLAGS}' \ |
3978 |
${SH} ${SCRIPTSDIR}/do-depends.sh |
3978 |
${SH} ${SCRIPTSDIR}/do-depends.sh |
3979 |
.endif |
3979 |
.endif |
3980 |
.endfor |
3980 |
.endfor |
3981 |
|
3981 |
|
3982 |
.endif |
3982 |
.endif |
3983 |
|
3983 |
|
3984 |
# Dependency lists: both build and runtime, recursive. Print out directory names. |
3984 |
# Dependency lists: both build and runtime, recursive. Print out directory names. |
3985 |
|
3985 |
|
3986 |
_UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} |
3986 |
_UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} |
3987 |
_DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} |
3987 |
_DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} |
3988 |
|
3988 |
|
3989 |
.for d in ${_UNIFIED_DEPENDS:M*\:/*} |
3989 |
.for d in ${_UNIFIED_DEPENDS:M*\:/*} |
3990 |
_PORTSDIR_STR= $${PORTSDIR}/ |
3990 |
_PORTSDIR_STR= $${PORTSDIR}/ |
3991 |
DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." |
3991 |
DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." |
3992 |
.endfor |
3992 |
.endfor |
3993 |
|
3993 |
|
3994 |
all-depends-list: |
3994 |
all-depends-list: |
3995 |
@${ALL-DEPENDS-LIST} |
3995 |
@${ALL-DEPENDS-LIST} |
3996 |
|
3996 |
|
3997 |
_FLAVOR_RECURSIVE_SH= \ |
3997 |
_FLAVOR_RECURSIVE_SH= \ |
3998 |
if [ -z "$${recursive_cmd}" ]; then \ |
3998 |
if [ -z "$${recursive_cmd}" ]; then \ |
3999 |
${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_cmd to be set to the recursive make target to run." >&2; \ |
3999 |
${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_cmd to be set to the recursive make target to run." >&2; \ |
4000 |
${FALSE}; \ |
4000 |
${FALSE}; \ |
4001 |
fi; \ |
4001 |
fi; \ |
4002 |
if [ "$${recursive_dirs-null}" = "null" ]; then \ |
4002 |
if [ "$${recursive_dirs-null}" = "null" ]; then \ |
4003 |
${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_dirs to be set to the directories to recurse." >&2; \ |
4003 |
${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_dirs to be set to the directories to recurse." >&2; \ |
4004 |
${FALSE}; \ |
4004 |
${FALSE}; \ |
4005 |
fi; \ |
4005 |
fi; \ |
4006 |
for dir in $${recursive_dirs}; do \ |
4006 |
for dir in $${recursive_dirs}; do \ |
4007 |
unset flavor; \ |
4007 |
unset flavor; \ |
4008 |
case $${dir} in \ |
4008 |
case $${dir} in \ |
4009 |
*@*) \ |
4009 |
*@*) \ |
4010 |
flavor=$${dir\#*@}; \ |
4010 |
flavor=$${dir\#*@}; \ |
4011 |
dir=$${dir%@*}; \ |
4011 |
dir=$${dir%@*}; \ |
4012 |
;; \ |
4012 |
;; \ |
4013 |
esac; \ |
4013 |
esac; \ |
4014 |
case $$dir in \ |
4014 |
case $$dir in \ |
4015 |
/*) ;; \ |
4015 |
/*) ;; \ |
4016 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4016 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4017 |
esac; \ |
4017 |
esac; \ |
4018 |
(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} $${recursive_cmd}); \ |
4018 |
(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} $${recursive_cmd}); \ |
4019 |
done |
4019 |
done |
4020 |
|
4020 |
|
4021 |
# This script is shared among several dependency list variables. See file for |
4021 |
# This script is shared among several dependency list variables. See file for |
4022 |
# usage. |
4022 |
# usage. |
4023 |
DEPENDS-LIST= \ |
4023 |
DEPENDS-LIST= \ |
4024 |
${SETENV} \ |
4024 |
${SETENV} \ |
4025 |
PORTSDIR="${PORTSDIR}" \ |
4025 |
PORTSDIR="${PORTSDIR}" \ |
4026 |
dp_MAKE="${MAKE}" \ |
4026 |
dp_MAKE="${MAKE}" \ |
4027 |
dp_PKGNAME="${PKGNAME}" \ |
4027 |
dp_PKGNAME="${PKGNAME}" \ |
4028 |
dp_PKG_INFO="${PKG_INFO}" \ |
4028 |
dp_PKG_INFO="${PKG_INFO}" \ |
4029 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
4029 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
4030 |
${SH} ${SCRIPTSDIR}/depends-list.sh \ |
4030 |
${SH} ${SCRIPTSDIR}/depends-list.sh \ |
4031 |
${DEPENDS_SHOW_FLAVOR:D-f} |
4031 |
${DEPENDS_SHOW_FLAVOR:D-f} |
4032 |
|
4032 |
|
4033 |
ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} |
4033 |
ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} |
4034 |
ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} |
4034 |
ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} |
4035 |
MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} |
4035 |
MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} |
4036 |
BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" |
4036 |
BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" |
4037 |
RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS} ${RUN_DEPENDS}" |
4037 |
RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS} ${RUN_DEPENDS}" |
4038 |
TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q} |
4038 |
TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q} |
4039 |
CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} |
4039 |
CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} |
4040 |
CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} |
4040 |
CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} |
4041 |
|
4041 |
|
4042 |
.if !target(clean-depends) |
4042 |
.if !target(clean-depends) |
4043 |
clean-depends: |
4043 |
clean-depends: |
4044 |
@for dir in $$(${CLEAN-DEPENDS-LIST}); do \ |
4044 |
@for dir in $$(${CLEAN-DEPENDS-LIST}); do \ |
4045 |
(cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ |
4045 |
(cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ |
4046 |
done |
4046 |
done |
4047 |
.endif |
4047 |
.endif |
4048 |
|
4048 |
|
4049 |
.if !target(limited-clean-depends) |
4049 |
.if !target(limited-clean-depends) |
4050 |
limited-clean-depends: |
4050 |
limited-clean-depends: |
4051 |
@for dir in $$(${CLEAN-DEPENDS-LIMITED-LIST}); do \ |
4051 |
@for dir in $$(${CLEAN-DEPENDS-LIMITED-LIST}); do \ |
4052 |
(cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ |
4052 |
(cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ |
4053 |
done |
4053 |
done |
4054 |
.endif |
4054 |
.endif |
4055 |
|
4055 |
|
4056 |
.if !target(deinstall-depends) |
4056 |
.if !target(deinstall-depends) |
4057 |
deinstall-depends: |
4057 |
deinstall-depends: |
4058 |
@recursive_cmd="deinstall"; \ |
4058 |
@recursive_cmd="deinstall"; \ |
4059 |
recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4059 |
recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4060 |
${_FLAVOR_RECURSIVE_SH} |
4060 |
${_FLAVOR_RECURSIVE_SH} |
4061 |
.endif |
4061 |
.endif |
4062 |
|
4062 |
|
4063 |
.if !target(fetch-specials) |
4063 |
.if !target(fetch-specials) |
4064 |
fetch-specials: |
4064 |
fetch-specials: |
4065 |
@${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" |
4065 |
@${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" |
4066 |
@recursive_cmd="fetch"; \ |
4066 |
@recursive_cmd="fetch"; \ |
4067 |
recursive_dirs="${_DEPEND_SPECIALS}"; \ |
4067 |
recursive_dirs="${_DEPEND_SPECIALS}"; \ |
4068 |
${_FLAVOR_RECURSIVE_SH} |
4068 |
${_FLAVOR_RECURSIVE_SH} |
4069 |
.endif |
4069 |
.endif |
4070 |
|
4070 |
|
4071 |
.if !target(fetch-recursive) |
4071 |
.if !target(fetch-recursive) |
4072 |
fetch-recursive: |
4072 |
fetch-recursive: |
4073 |
@${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" |
4073 |
@${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" |
4074 |
@recursive_cmd="fetch"; \ |
4074 |
@recursive_cmd="fetch"; \ |
4075 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4075 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4076 |
${_FLAVOR_RECURSIVE_SH} |
4076 |
${_FLAVOR_RECURSIVE_SH} |
4077 |
.endif |
4077 |
.endif |
4078 |
|
4078 |
|
4079 |
.if !target(fetch-recursive-list) |
4079 |
.if !target(fetch-recursive-list) |
4080 |
fetch-recursive-list: |
4080 |
fetch-recursive-list: |
4081 |
@recursive_cmd="fetch-list"; \ |
4081 |
@recursive_cmd="fetch-list"; \ |
4082 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4082 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4083 |
${_FLAVOR_RECURSIVE_SH} |
4083 |
${_FLAVOR_RECURSIVE_SH} |
4084 |
.endif |
4084 |
.endif |
4085 |
|
4085 |
|
4086 |
# Used by fetch-required and fetch-required list, this script looks |
4086 |
# Used by fetch-required and fetch-required list, this script looks |
4087 |
# at each of the dependencies. If 3 items are specified in the tuple, |
4087 |
# at each of the dependencies. If 3 items are specified in the tuple, |
4088 |
# such as foo:graphics/foo:extract, the first item (foo) |
4088 |
# such as foo:graphics/foo:extract, the first item (foo) |
4089 |
# is examined. Only if it begins with a / and does not exist on the |
4089 |
# is examined. Only if it begins with a / and does not exist on the |
4090 |
# file-system will ``make targ'' proceed. |
4090 |
# file-system will ``make targ'' proceed. |
4091 |
# For more usual (dual-item) dependency tuples, the ``make targ'' |
4091 |
# For more usual (dual-item) dependency tuples, the ``make targ'' |
4092 |
# proceeds, if the exact package, which the directory WOULD'VE installed, |
4092 |
# proceeds, if the exact package, which the directory WOULD'VE installed, |
4093 |
# is not yet installed. |
4093 |
# is not yet installed. |
4094 |
# This is the exact behaviour of the old code, and it may need |
4094 |
# This is the exact behaviour of the old code, and it may need |
4095 |
# revisiting. For example, the entire first case seems dubious, and in |
4095 |
# revisiting. For example, the entire first case seems dubious, and in |
4096 |
# the second case we, probably, should be satisfied with _any_ (earlier) |
4096 |
# the second case we, probably, should be satisfied with _any_ (earlier) |
4097 |
# package, with the same origin as that of the dir. |
4097 |
# package, with the same origin as that of the dir. |
4098 |
# |
4098 |
# |
4099 |
# -mi |
4099 |
# -mi |
4100 |
FETCH_LIST?= for i in $$deps; do \ |
4100 |
FETCH_LIST?= for i in $$deps; do \ |
4101 |
prog=$${i%%:*}; dir=$${i\#*:}; \ |
4101 |
prog=$${i%%:*}; dir=$${i\#*:}; \ |
4102 |
case $$dir in \ |
4102 |
case $$dir in \ |
4103 |
/*) ;; \ |
4103 |
/*) ;; \ |
4104 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4104 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4105 |
esac; \ |
4105 |
esac; \ |
4106 |
case $$dir in \ |
4106 |
case $$dir in \ |
4107 |
*:*) if [ $$prog != $${prog\#/} -o ! -e $$prog ]; then \ |
4107 |
*:*) if [ $$prog != $${prog\#/} -o ! -e $$prog ]; then \ |
4108 |
dir=$${dir%%:*}; \ |
4108 |
dir=$${dir%%:*}; \ |
4109 |
else \ |
4109 |
else \ |
4110 |
continue; \ |
4110 |
continue; \ |
4111 |
fi;; \ |
4111 |
fi;; \ |
4112 |
*) if [ -d ${PKG_DBDIR}/$$(cd $$dir; ${MAKE} -V PKGNAME) ]; then \ |
4112 |
*) if [ -d ${PKG_DBDIR}/$$(cd $$dir; ${MAKE} -V PKGNAME) ]; then \ |
4113 |
continue; \ |
4113 |
continue; \ |
4114 |
fi;; \ |
4114 |
fi;; \ |
4115 |
esac; \ |
4115 |
esac; \ |
4116 |
echo cd $$dir; cd $$dir; ${MAKE} $$targ; \ |
4116 |
echo cd $$dir; cd $$dir; ${MAKE} $$targ; \ |
4117 |
done |
4117 |
done |
4118 |
|
4118 |
|
4119 |
.if !target(fetch-required) |
4119 |
.if !target(fetch-required) |
4120 |
fetch-required: fetch |
4120 |
fetch-required: fetch |
4121 |
.if defined(NO_DEPENDS) |
4121 |
.if defined(NO_DEPENDS) |
4122 |
@${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" |
4122 |
@${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" |
4123 |
.else |
4123 |
.else |
4124 |
@${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" |
4124 |
@${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" |
4125 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN |
4125 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN |
4126 |
.if defined(${deptype}_DEPENDS) |
4126 |
.if defined(${deptype}_DEPENDS) |
4127 |
@targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} |
4127 |
@targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} |
4128 |
.endif |
4128 |
.endif |
4129 |
.endfor |
4129 |
.endfor |
4130 |
.endif |
4130 |
.endif |
4131 |
|
4131 |
|
4132 |
.endif |
4132 |
.endif |
4133 |
|
4133 |
|
4134 |
.if !target(fetch-required-list) |
4134 |
.if !target(fetch-required-list) |
4135 |
fetch-required-list: fetch-list |
4135 |
fetch-required-list: fetch-list |
4136 |
.if !defined(NO_DEPENDS) |
4136 |
.if !defined(NO_DEPENDS) |
4137 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN |
4137 |
.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN |
4138 |
.if defined(${deptype}_DEPENDS) |
4138 |
.if defined(${deptype}_DEPENDS) |
4139 |
@targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} |
4139 |
@targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} |
4140 |
.endif |
4140 |
.endif |
4141 |
.endfor |
4141 |
.endfor |
4142 |
.endif |
4142 |
.endif |
4143 |
.endif |
4143 |
.endif |
4144 |
|
4144 |
|
4145 |
.if !target(checksum-recursive) |
4145 |
.if !target(checksum-recursive) |
4146 |
checksum-recursive: |
4146 |
checksum-recursive: |
4147 |
@${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" |
4147 |
@${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" |
4148 |
@recursive_cmd="checksum"; \ |
4148 |
@recursive_cmd="checksum"; \ |
4149 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4149 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4150 |
${_FLAVOR_RECURSIVE_SH} |
4150 |
${_FLAVOR_RECURSIVE_SH} |
4151 |
.endif |
4151 |
.endif |
4152 |
|
4152 |
|
4153 |
# Dependency lists: build and runtime. Print out directory names. |
4153 |
# Dependency lists: build and runtime. Print out directory names. |
4154 |
|
4154 |
|
4155 |
build-depends-list: |
4155 |
build-depends-list: |
4156 |
.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) |
4156 |
.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) |
4157 |
@${BUILD-DEPENDS-LIST} |
4157 |
@${BUILD-DEPENDS-LIST} |
4158 |
.endif |
4158 |
.endif |
4159 |
|
4159 |
|
4160 |
run-depends-list: |
4160 |
run-depends-list: |
4161 |
.if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) |
4161 |
.if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) |
4162 |
@${RUN-DEPENDS-LIST} |
4162 |
@${RUN-DEPENDS-LIST} |
4163 |
.endif |
4163 |
.endif |
4164 |
|
4164 |
|
4165 |
test-depends-list: |
4165 |
test-depends-list: |
4166 |
.if defined(TEST_DEPENDS) |
4166 |
.if defined(TEST_DEPENDS) |
4167 |
@${TEST-DEPENDS-LIST} |
4167 |
@${TEST-DEPENDS-LIST} |
4168 |
.endif |
4168 |
.endif |
4169 |
|
4169 |
|
4170 |
# Package (recursive runtime) dependency list. Print out both directory names |
4170 |
# Package (recursive runtime) dependency list. Print out both directory names |
4171 |
# and package names. |
4171 |
# and package names. |
4172 |
|
4172 |
|
4173 |
package-depends-list: |
4173 |
package-depends-list: |
4174 |
.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) |
4174 |
.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) |
4175 |
@${PACKAGE-DEPENDS-LIST} |
4175 |
@${PACKAGE-DEPENDS-LIST} |
4176 |
.endif |
4176 |
.endif |
4177 |
|
4177 |
|
4178 |
_LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} |
4178 |
_LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} |
4179 |
PACKAGE-DEPENDS-LIST?= \ |
4179 |
PACKAGE-DEPENDS-LIST?= \ |
4180 |
if [ "${CHILD_DEPENDS}" ]; then \ |
4180 |
if [ "${CHILD_DEPENDS}" ]; then \ |
4181 |
installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ |
4181 |
installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ |
4182 |
${TRUE}); \ |
4182 |
${TRUE}); \ |
4183 |
if [ "$$installed" ]; then \ |
4183 |
if [ "$$installed" ]; then \ |
4184 |
break; \ |
4184 |
break; \ |
4185 |
fi; \ |
4185 |
fi; \ |
4186 |
if [ -z "$$installed" ]; then \ |
4186 |
if [ -z "$$installed" ]; then \ |
4187 |
installed="${PKGNAME}"; \ |
4187 |
installed="${PKGNAME}"; \ |
4188 |
fi; \ |
4188 |
fi; \ |
4189 |
for pkgname in $$installed; do \ |
4189 |
for pkgname in $$installed; do \ |
4190 |
${ECHO_CMD} "$$pkgname ${.CURDIR} ${PKGORIGIN}"; \ |
4190 |
${ECHO_CMD} "$$pkgname ${.CURDIR} ${PKGORIGIN}"; \ |
4191 |
done; \ |
4191 |
done; \ |
4192 |
fi; \ |
4192 |
fi; \ |
4193 |
checked="${PARENT_CHECKED}"; \ |
4193 |
checked="${PARENT_CHECKED}"; \ |
4194 |
for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ |
4194 |
for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ |
4195 |
unset flavor; \ |
4195 |
unset flavor; \ |
4196 |
case $${dir} in \ |
4196 |
case $${dir} in \ |
4197 |
*@*) \ |
4197 |
*@*) \ |
4198 |
flavor=$${dir\#*@}; \ |
4198 |
flavor=$${dir\#*@}; \ |
4199 |
dir=$${dir%@*}; \ |
4199 |
dir=$${dir%@*}; \ |
4200 |
;; \ |
4200 |
;; \ |
4201 |
esac; \ |
4201 |
esac; \ |
4202 |
case "$$dir" in \ |
4202 |
case "$$dir" in \ |
4203 |
/*) ;; \ |
4203 |
/*) ;; \ |
4204 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4204 |
*) dir=${PORTSDIR}/$$dir ;; \ |
4205 |
esac ; \ |
4205 |
esac ; \ |
4206 |
dir=$$(${REALPATH} $$dir); \ |
4206 |
dir=$$(${REALPATH} $$dir); \ |
4207 |
if [ -d $$dir ]; then \ |
4207 |
if [ -d $$dir ]; then \ |
4208 |
case $$checked in \ |
4208 |
case $$checked in \ |
4209 |
$$dir|$$dir\ *|*\ $$dir|*\ $$dir\ *) continue;; \ |
4209 |
$$dir|$$dir\ *|*\ $$dir|*\ $$dir\ *) continue;; \ |
4210 |
esac; \ |
4210 |
esac; \ |
4211 |
childout=$$(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ |
4211 |
childout=$$(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ |
4212 |
set -- $$childout; \ |
4212 |
set -- $$childout; \ |
4213 |
childdir=""; \ |
4213 |
childdir=""; \ |
4214 |
while [ $$\# != 0 ]; do \ |
4214 |
while [ $$\# != 0 ]; do \ |
4215 |
childdir="$$childdir $$2"; \ |
4215 |
childdir="$$childdir $$2"; \ |
4216 |
${ECHO_CMD} "$$1 $$2 $$3"; \ |
4216 |
${ECHO_CMD} "$$1 $$2 $$3"; \ |
4217 |
shift 3; \ |
4217 |
shift 3; \ |
4218 |
done; \ |
4218 |
done; \ |
4219 |
checked="$$dir $$childdir $$checked"; \ |
4219 |
checked="$$dir $$childdir $$checked"; \ |
4220 |
else \ |
4220 |
else \ |
4221 |
${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ |
4221 |
${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ |
4222 |
fi; \ |
4222 |
fi; \ |
4223 |
done |
4223 |
done |
4224 |
|
4224 |
|
4225 |
ACTUAL-PACKAGE-DEPENDS?= \ |
4225 |
ACTUAL-PACKAGE-DEPENDS?= \ |
4226 |
depfiles="" ; \ |
4226 |
depfiles="" ; \ |
4227 |
for lib in ${LIB_DEPENDS:C/\:.*//}; do \ |
4227 |
for lib in ${LIB_DEPENDS:C/\:.*//}; do \ |
4228 |
depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ |
4228 |
depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ |
4229 |
done ; \ |
4229 |
done ; \ |
4230 |
${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} |
4230 |
${SETENV} PKG_BIN="${PKG_BIN}" PORTSDIR="${PORTSDIR}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} |
4231 |
|
4231 |
|
4232 |
PKG_NOTES_ENV?= |
4232 |
PKG_NOTES_ENV?= |
4233 |
.for note in ${PKG_NOTES} |
4233 |
.for note in ${PKG_NOTES} |
4234 |
PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} |
4234 |
PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} |
4235 |
.endfor |
4235 |
.endfor |
4236 |
|
4236 |
|
4237 |
create-manifest: |
4237 |
create-manifest: |
4238 |
@${SETENV} \ |
4238 |
@${SETENV} \ |
4239 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
4239 |
dp_SCRIPTSDIR='${SCRIPTSDIR}' \ |
|
|
4240 |
dp_ABISTRING='${PKG_ABISTRING}' \ |
4240 |
dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ |
4241 |
dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ |
4241 |
dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ |
4242 |
dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ |
4242 |
dp_COMMENT=${COMMENT:Q} \ |
4243 |
dp_COMMENT=${COMMENT:Q} \ |
4243 |
dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ |
4244 |
dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ |
4244 |
dp_DEPRECATED=${DEPRECATED:Q} \ |
4245 |
dp_DEPRECATED=${DEPRECATED:Q} \ |
4245 |
dp_DESCR='${DESCR}' \ |
4246 |
dp_DESCR='${DESCR}' \ |
4246 |
dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ |
4247 |
dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ |
4247 |
dp_GROUPS='${GROUPS:u:S/$/,/}' \ |
4248 |
dp_GROUPS='${GROUPS:u:S/$/,/}' \ |
4248 |
dp_LICENSE='${LICENSE:u:S/$/,/}' \ |
4249 |
dp_LICENSE='${LICENSE:u:S/$/,/}' \ |
4249 |
dp_LICENSE_COMB='${LICENSE_COMB}' \ |
4250 |
dp_LICENSE_COMB='${LICENSE_COMB}' \ |
4250 |
dp_MAINTAINER='${MAINTAINER}' \ |
4251 |
dp_MAINTAINER='${MAINTAINER}' \ |
4251 |
dp_METADIR='${METADIR}' \ |
4252 |
dp_METADIR='${METADIR}' \ |
4252 |
dp_NO_ARCH='${NO_ARCH}' \ |
4253 |
dp_NO_ARCH='${NO_ARCH}' \ |
4253 |
dp_PKGBASE='${PKGBASE}' \ |
4254 |
dp_PKGBASE='${PKGBASE}' \ |
4254 |
dp_PKGDEINSTALL='${PKGDEINSTALL}' \ |
4255 |
dp_PKGDEINSTALL='${PKGDEINSTALL}' \ |
4255 |
dp_PKGINSTALL='${PKGINSTALL}' \ |
4256 |
dp_PKGINSTALL='${PKGINSTALL}' \ |
4256 |
dp_PKGMESSAGES='${_PKGMESSAGES}' \ |
4257 |
dp_PKGMESSAGES='${_PKGMESSAGES}' \ |
4257 |
dp_PKGORIGIN='${PKGORIGIN}' \ |
4258 |
dp_PKGORIGIN='${PKGORIGIN}' \ |
4258 |
dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ |
4259 |
dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ |
4259 |
dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ |
4260 |
dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ |
4260 |
dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE}' \ |
4261 |
dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE}' \ |
4261 |
dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ |
4262 |
dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ |
4262 |
dp_PKGPREINSTALL='${PKGPREINSTALL}' \ |
4263 |
dp_PKGPREINSTALL='${PKGPREINSTALL}' \ |
4263 |
dp_PKGPREUPGRADE='${PKGPREUPGRADE}' \ |
4264 |
dp_PKGPREUPGRADE='${PKGPREUPGRADE}' \ |
4264 |
dp_PKGUPGRADE='${PKGUPGRADE}' \ |
4265 |
dp_PKGUPGRADE='${PKGUPGRADE}' \ |
4265 |
dp_PKGVERSION='${PKGVERSION}' \ |
4266 |
dp_PKGVERSION='${PKGVERSION}' \ |
4266 |
dp_PKG_BIN='${PKG_BIN}' \ |
4267 |
dp_PKG_BIN='${PKG_BIN}' \ |
4267 |
dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ |
4268 |
dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ |
4268 |
dp_PKG_NOTES='${PKG_NOTES}' \ |
4269 |
dp_PKG_NOTES='${PKG_NOTES}' \ |
4269 |
dp_PORT_OPTIONS='${PORT_OPTIONS}' \ |
4270 |
dp_PORT_OPTIONS='${PORT_OPTIONS}' \ |
4270 |
dp_PREFIX='${PREFIX}' \ |
4271 |
dp_PREFIX='${PREFIX}' \ |
4271 |
dp_USERS='${USERS:u:S/$/,/}' \ |
4272 |
dp_USERS='${USERS:u:S/$/,/}' \ |
4272 |
dp_WWW='${WWW}' \ |
4273 |
dp_WWW='${WWW}' \ |
|
|
4274 |
dp_VITAL='${PKGVITAL}' \ |
4273 |
${PKG_NOTES_ENV} \ |
4275 |
${PKG_NOTES_ENV} \ |
4274 |
${SH} ${SCRIPTSDIR}/create-manifest.sh |
4276 |
${SH} ${SCRIPTSDIR}/create-manifest.sh |
4275 |
|
4277 |
|
4276 |
|
4278 |
|
4277 |
# Print out package names. |
4279 |
# Print out package names. |
4278 |
|
4280 |
|
4279 |
package-depends: |
4281 |
package-depends: |
4280 |
@${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' |
4282 |
@${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' |
4281 |
|
4283 |
|
4282 |
actual-package-depends: |
4284 |
actual-package-depends: |
4283 |
@${ACTUAL-PACKAGE-DEPENDS} |
4285 |
@${ACTUAL-PACKAGE-DEPENDS} |
4284 |
|
4286 |
|
4285 |
# Build packages for port and dependencies |
4287 |
# Build packages for port and dependencies |
4286 |
|
4288 |
|
4287 |
package-recursive: package |
4289 |
package-recursive: package |
4288 |
@recursive_cmd="package-noinstall"; \ |
4290 |
@recursive_cmd="package-noinstall"; \ |
4289 |
recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4291 |
recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4290 |
${_FLAVOR_RECURSIVE_SH} |
4292 |
${_FLAVOR_RECURSIVE_SH} |
4291 |
|
4293 |
|
4292 |
# Show missing dependencies |
4294 |
# Show missing dependencies |
4293 |
missing: |
4295 |
missing: |
4294 |
@for dir in $$(${MISSING-DEPENDS-LIST}); do \ |
4296 |
@for dir in $$(${MISSING-DEPENDS-LIST}); do \ |
4295 |
echo $${dir#${PORTSDIR}/}; \ |
4297 |
echo $${dir#${PORTSDIR}/}; \ |
4296 |
done |
4298 |
done |
4297 |
|
4299 |
|
4298 |
# Show missing dependencies by name |
4300 |
# Show missing dependencies by name |
4299 |
missing-packages: |
4301 |
missing-packages: |
4300 |
@_packages=$$(${PKG_INFO} -aq); \ |
4302 |
@_packages=$$(${PKG_INFO} -aq); \ |
4301 |
for dir in $$(${ALL-DEPENDS-LIST}); do \ |
4303 |
for dir in $$(${ALL-DEPENDS-LIST}); do \ |
4302 |
_p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ |
4304 |
_p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ |
4303 |
if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ |
4305 |
if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ |
4304 |
${ECHO_CMD} $${_p}; \ |
4306 |
${ECHO_CMD} $${_p}; \ |
4305 |
fi; \ |
4307 |
fi; \ |
4306 |
done |
4308 |
done |
4307 |
|
4309 |
|
4308 |
################################################################ |
4310 |
################################################################ |
4309 |
# Everything after here are internal targets and really |
4311 |
# Everything after here are internal targets and really |
4310 |
# shouldn't be touched by anybody but the release engineers. |
4312 |
# shouldn't be touched by anybody but the release engineers. |
4311 |
################################################################ |
4313 |
################################################################ |
4312 |
|
4314 |
|
4313 |
# This target generates an index entry suitable for aggregation into |
4315 |
# This target generates an index entry suitable for aggregation into |
4314 |
# a large index. Format is: |
4316 |
# a large index. Format is: |
4315 |
# |
4317 |
# |
4316 |
# distribution-name|port-path|installation-prefix|comment| \ |
4318 |
# distribution-name|port-path|installation-prefix|comment| \ |
4317 |
# description-file|maintainer|categories|extract-depends| \ |
4319 |
# description-file|maintainer|categories|extract-depends| \ |
4318 |
# patch-depends|fetch-depends|build-depends|run-depends|www site |
4320 |
# patch-depends|fetch-depends|build-depends|run-depends|www site |
4319 |
# |
4321 |
# |
4320 |
# If this ever changes, portmgr should contact the portsnap maintainer |
4322 |
# If this ever changes, portmgr should contact the portsnap maintainer |
4321 |
# first to avoid gratuitous breakage. |
4323 |
# first to avoid gratuitous breakage. |
4322 |
|
4324 |
|
4323 |
. if !target(describe) |
4325 |
. if !target(describe) |
4324 |
_EXTRACT_DEPENDS=${EXTRACT_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4326 |
_EXTRACT_DEPENDS=${EXTRACT_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4325 |
_PATCH_DEPENDS=${PATCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4327 |
_PATCH_DEPENDS=${PATCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4326 |
_FETCH_DEPENDS=${FETCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4328 |
_FETCH_DEPENDS=${FETCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4327 |
_LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4329 |
_LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} |
4328 |
_BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} |
4330 |
_BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} |
4329 |
_RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} |
4331 |
_RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} |
4330 |
. if exists(${DESCR}) |
4332 |
. if exists(${DESCR}) |
4331 |
_DESCR=${DESCR} |
4333 |
_DESCR=${DESCR} |
4332 |
. else |
4334 |
. else |
4333 |
_DESCR=/dev/null |
4335 |
_DESCR=/dev/null |
4334 |
. endif |
4336 |
. endif |
4335 |
|
4337 |
|
4336 |
. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) |
4338 |
. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) |
4337 |
INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr |
4339 |
INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr |
4338 |
. else |
4340 |
. else |
4339 |
INDEX_OUT=/dev/stdout |
4341 |
INDEX_OUT=/dev/stdout |
4340 |
. endif |
4342 |
. endif |
4341 |
|
4343 |
|
4342 |
. if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) |
4344 |
. if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) |
4343 |
describe: |
4345 |
describe: |
4344 |
@(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ |
4346 |
@(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ |
4345 |
${ECHO_CMD} -n ${COMMENT:Q}; \ |
4347 |
${ECHO_CMD} -n ${COMMENT:Q}; \ |
4346 |
${ECHO_CMD} -n "|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \ |
4348 |
${ECHO_CMD} -n "|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \ |
4347 |
while read one two discard; do \ |
4349 |
while read one two discard; do \ |
4348 |
case "$$one" in \ |
4350 |
case "$$one" in \ |
4349 |
WWW:) case "$$two" in \ |
4351 |
WWW:) case "$$two" in \ |
4350 |
https://*|http://*|ftp://*) ${ECHO_CMD} -n "$$two" ;; \ |
4352 |
https://*|http://*|ftp://*) ${ECHO_CMD} -n "$$two" ;; \ |
4351 |
*) ${ECHO_CMD} -n "http://$$two" ;; \ |
4353 |
*) ${ECHO_CMD} -n "http://$$two" ;; \ |
4352 |
esac; \ |
4354 |
esac; \ |
4353 |
break; \ |
4355 |
break; \ |
4354 |
;; \ |
4356 |
;; \ |
4355 |
esac; \ |
4357 |
esac; \ |
4356 |
done < ${DESCR}; ${ECHO_CMD}) >>${INDEX_OUT} |
4358 |
done < ${DESCR}; ${ECHO_CMD}) >>${INDEX_OUT} |
4357 |
. else # empty(FLAVORS) |
4359 |
. else # empty(FLAVORS) |
4358 |
describe: ${FLAVORS:S/^/describe-/} |
4360 |
describe: ${FLAVORS:S/^/describe-/} |
4359 |
. for f in ${FLAVORS} |
4361 |
. for f in ${FLAVORS} |
4360 |
describe-${f}: |
4362 |
describe-${f}: |
4361 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe |
4363 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe |
4362 |
. endfor |
4364 |
. endfor |
4363 |
. endif # empty(FLAVORS) |
4365 |
. endif # empty(FLAVORS) |
4364 |
. endif |
4366 |
. endif |
4365 |
|
4367 |
|
4366 |
www-site: |
4368 |
www-site: |
4367 |
.if exists(${DESCR}) |
4369 |
.if exists(${DESCR}) |
4368 |
@${AWK} '$$1 ~ /^WWW:/ {print $$2}' ${DESCR} | ${HEAD} -1 |
4370 |
@${AWK} '$$1 ~ /^WWW:/ {print $$2}' ${DESCR} | ${HEAD} -1 |
4369 |
.else |
4371 |
.else |
4370 |
@${ECHO_CMD} |
4372 |
@${ECHO_CMD} |
4371 |
.endif |
4373 |
.endif |
4372 |
|
4374 |
|
4373 |
.if !target(readmes) |
4375 |
.if !target(readmes) |
4374 |
readmes: readme |
4376 |
readmes: readme |
4375 |
.endif |
4377 |
.endif |
4376 |
|
4378 |
|
4377 |
.if !target(readme) |
4379 |
.if !target(readme) |
4378 |
readme: |
4380 |
readme: |
4379 |
@${RM} ${.CURDIR}/README.html |
4381 |
@${RM} ${.CURDIR}/README.html |
4380 |
@cd ${.CURDIR} && ${MAKE} ${.CURDIR}/README.html |
4382 |
@cd ${.CURDIR} && ${MAKE} ${.CURDIR}/README.html |
4381 |
.endif |
4383 |
.endif |
4382 |
|
4384 |
|
4383 |
${.CURDIR}/README.html: |
4385 |
${.CURDIR}/README.html: |
4384 |
@${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" |
4386 |
@${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" |
4385 |
@${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ |
4387 |
@${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ |
4386 |
${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ |
4388 |
${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ |
4387 |
-e 's|%%PKG%%|${PKGNAME}|g' \ |
4389 |
-e 's|%%PKG%%|${PKGNAME}|g' \ |
4388 |
-e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \ |
4390 |
-e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \ |
4389 |
-e '/%%COMMENT%%/d' \ |
4391 |
-e '/%%COMMENT%%/d' \ |
4390 |
-e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \ |
4392 |
-e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \ |
4391 |
${SED} -e 's|${.CURDIR}/||')"'|' \ |
4393 |
${SED} -e 's|${.CURDIR}/||')"'|' \ |
4392 |
-e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \ |
4394 |
-e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \ |
4393 |
${SED} -e 's/([^)]*)//;s/.*<//;s/>.*//')"'|g' \ |
4395 |
${SED} -e 's/([^)]*)//;s/.*<//;s/>.*//')"'|g' \ |
4394 |
-e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ |
4396 |
-e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ |
4395 |
-e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-www-site)"'|' \ |
4397 |
-e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-www-site)"'|' \ |
4396 |
-e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-build-depends-list)"'|' \ |
4398 |
-e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-build-depends-list)"'|' \ |
4397 |
-e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-run-depends-list)"'|' \ |
4399 |
-e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-run-depends-list)"'|' \ |
4398 |
-e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \ |
4400 |
-e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \ |
4399 |
${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ |
4401 |
${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ |
4400 |
${TEMPLATES}/README.port >> ${.TARGET} |
4402 |
${TEMPLATES}/README.port >> ${.TARGET} |
4401 |
|
4403 |
|
4402 |
# The following two targets require an up-to-date INDEX in ${PORTSDIR} |
4404 |
# The following two targets require an up-to-date INDEX in ${PORTSDIR} |
4403 |
|
4405 |
|
4404 |
_PRETTY_PRINT_DEPENDS_LIST=\ |
4406 |
_PRETTY_PRINT_DEPENDS_LIST=\ |
4405 |
if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \ |
4407 |
if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \ |
4406 |
${ECHO_MSG} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; \ |
4408 |
${ECHO_MSG} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; \ |
4407 |
else \ |
4409 |
else \ |
4408 |
target=${.TARGET:C/pretty-print-(.*)-depends-list/\1/} ; \ |
4410 |
target=${.TARGET:C/pretty-print-(.*)-depends-list/\1/} ; \ |
4409 |
if [ "$$target" = "build" ] ; then fldnum=8 ; else fldnum=9 ; fi; \ |
4411 |
if [ "$$target" = "build" ] ; then fldnum=8 ; else fldnum=9 ; fi; \ |
4410 |
${ECHO_MSG} -n 'This port requires package(s) "' ; \ |
4412 |
${ECHO_MSG} -n 'This port requires package(s) "' ; \ |
4411 |
${ECHO_MSG} -n `${AWK} -F\| "\\$$1 ~ /^${PKGNAME}/ {print \\$$$${fldnum};}" ${INDEXDIR}/${INDEXFILE}` ; \ |
4413 |
${ECHO_MSG} -n `${AWK} -F\| "\\$$1 ~ /^${PKGNAME}/ {print \\$$$${fldnum};}" ${INDEXDIR}/${INDEXFILE}` ; \ |
4412 |
${ECHO_MSG} "\" to $$target."; \ |
4414 |
${ECHO_MSG} "\" to $$target."; \ |
4413 |
fi; |
4415 |
fi; |
4414 |
|
4416 |
|
4415 |
|
4417 |
|
4416 |
.if !target(pretty-print-build-depends-list) |
4418 |
.if !target(pretty-print-build-depends-list) |
4417 |
pretty-print-build-depends-list: |
4419 |
pretty-print-build-depends-list: |
4418 |
.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ |
4420 |
.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ |
4419 |
defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) |
4421 |
defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) |
4420 |
@${_PRETTY_PRINT_DEPENDS_LIST} |
4422 |
@${_PRETTY_PRINT_DEPENDS_LIST} |
4421 |
.endif |
4423 |
.endif |
4422 |
.endif |
4424 |
.endif |
4423 |
|
4425 |
|
4424 |
.if !target(pretty-print-run-depends-list) |
4426 |
.if !target(pretty-print-run-depends-list) |
4425 |
pretty-print-run-depends-list: |
4427 |
pretty-print-run-depends-list: |
4426 |
.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) |
4428 |
.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) |
4427 |
@${_PRETTY_PRINT_DEPENDS_LIST} |
4429 |
@${_PRETTY_PRINT_DEPENDS_LIST} |
4428 |
.endif |
4430 |
.endif |
4429 |
.endif |
4431 |
.endif |
4430 |
|
4432 |
|
4431 |
_SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} |
4433 |
_SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} |
4432 |
.if !target(apply-slist) |
4434 |
.if !target(apply-slist) |
4433 |
apply-slist: |
4435 |
apply-slist: |
4434 |
.if defined(SUB_FILES) |
4436 |
.if defined(SUB_FILES) |
4435 |
.for file in ${SUB_FILES} |
4437 |
.for file in ${SUB_FILES} |
4436 |
.if !exists(${FILESDIR}/${file}.in) |
4438 |
.if !exists(${FILESDIR}/${file}.in) |
4437 |
@${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 |
4439 |
@${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 |
4438 |
.else |
4440 |
.else |
4439 |
@${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} |
4441 |
@${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} |
4440 |
.endif |
4442 |
.endif |
4441 |
.endfor |
4443 |
.endfor |
4442 |
.for i in pkg-message pkg-install pkg-deinstall pkg-req |
4444 |
.for i in pkg-message pkg-install pkg-deinstall pkg-req |
4443 |
.if ${SUB_FILES:M${i}*}!="" |
4445 |
.if ${SUB_FILES:M${i}*}!="" |
4444 |
${i:S/-//:tu}= ${WRKDIR}/${SUB_FILES:M${i}*} |
4446 |
${i:S/-//:tu}= ${WRKDIR}/${SUB_FILES:M${i}*} |
4445 |
.endif |
4447 |
.endif |
4446 |
.endfor |
4448 |
.endfor |
4447 |
.endif |
4449 |
.endif |
4448 |
.endif |
4450 |
.endif |
4449 |
|
4451 |
|
4450 |
# Generate packing list. Also tests to make sure all required package |
4452 |
# Generate packing list. Also tests to make sure all required package |
4451 |
# files exist. |
4453 |
# files exist. |
4452 |
|
4454 |
|
4453 |
.if !target(generate-plist) |
4455 |
.if !target(generate-plist) |
4454 |
generate-plist: ${WRKDIR} |
4456 |
generate-plist: ${WRKDIR} |
4455 |
@${ECHO_MSG} "===> Generating temporary packing list" |
4457 |
@${ECHO_MSG} "===> Generating temporary packing list" |
4456 |
@${MKDIR} ${TMPPLIST:H} |
4458 |
@${MKDIR} ${TMPPLIST:H} |
4457 |
@if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi |
4459 |
@if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi |
4458 |
@>${TMPPLIST} |
4460 |
@>${TMPPLIST} |
4459 |
@for file in ${PLIST_FILES}; do \ |
4461 |
@for file in ${PLIST_FILES}; do \ |
4460 |
${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ |
4462 |
${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ |
4461 |
done |
4463 |
done |
4462 |
.if !empty(PLIST) |
4464 |
.if !empty(PLIST) |
4463 |
@if [ -f ${PLIST} ]; then \ |
4465 |
@if [ -f ${PLIST} ]; then \ |
4464 |
${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \ |
4466 |
${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \ |
4465 |
fi |
4467 |
fi |
4466 |
.endif |
4468 |
.endif |
4467 |
|
4469 |
|
4468 |
.for dir in ${PLIST_DIRS} |
4470 |
.for dir in ${PLIST_DIRS} |
4469 |
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} |
4471 |
@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} |
4470 |
.endfor |
4472 |
.endfor |
4471 |
|
4473 |
|
4472 |
.if defined(USE_LINUX_PREFIX) |
4474 |
.if defined(USE_LINUX_PREFIX) |
4473 |
.if defined(USE_LDCONFIG) |
4475 |
.if defined(USE_LDCONFIG) |
4474 |
@${ECHO_CMD} '@preexec [ -n "`/sbin/sysctl -q compat.linux.osrelease`" ] || ( echo "Cannot install package: kernel missing Linux support"; exit 1 )' >> ${TMPPLIST} |
4476 |
@${ECHO_CMD} '@preexec [ -n "`/sbin/sysctl -q compat.linux.osrelease`" ] || ( echo "Cannot install package: kernel missing Linux support"; exit 1 )' >> ${TMPPLIST} |
4475 |
@${ECHO_CMD} "@postexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST} |
4477 |
@${ECHO_CMD} "@postexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST} |
4476 |
@${ECHO_CMD} "@postunexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST} |
4478 |
@${ECHO_CMD} "@postunexec ${LINUXBASE}/sbin/ldconfig" >> ${TMPPLIST} |
4477 |
.endif |
4479 |
.endif |
4478 |
.else |
4480 |
.else |
4479 |
.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) |
4481 |
.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) |
4480 |
.if !defined(INSTALL_AS_USER) |
4482 |
.if !defined(INSTALL_AS_USER) |
4481 |
@${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST} |
4483 |
@${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST} |
4482 |
@${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST} |
4484 |
@${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null" >> ${TMPPLIST} |
4483 |
.else |
4485 |
.else |
4484 |
@${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST} |
4486 |
@${ECHO_CMD} "@postexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST} |
4485 |
@${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST} |
4487 |
@${ECHO_CMD} "@postunexec /usr/sbin/service ldconfig restart > /dev/null || ${TRUE}" >> ${TMPPLIST} |
4486 |
.endif |
4488 |
.endif |
4487 |
.endif |
4489 |
.endif |
4488 |
.endif |
4490 |
.endif |
4489 |
.endif |
4491 |
.endif |
4490 |
|
4492 |
|
4491 |
${TMPPLIST}: |
4493 |
${TMPPLIST}: |
4492 |
@cd ${.CURDIR} && ${MAKE} generate-plist |
4494 |
@cd ${.CURDIR} && ${MAKE} generate-plist |
4493 |
|
4495 |
|
4494 |
.for _type in EXAMPLES DOCS |
4496 |
.for _type in EXAMPLES DOCS |
4495 |
.if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) |
4497 |
.if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) |
4496 |
.if !target(add-plist-${_type:tl}) |
4498 |
.if !target(add-plist-${_type:tl}) |
4497 |
.if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type}) |
4499 |
.if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type}) |
4498 |
add-plist-${_type:tl}: |
4500 |
add-plist-${_type:tl}: |
4499 |
.for x in ${PORT${_type}} |
4501 |
.for x in ${PORT${_type}} |
4500 |
@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ |
4502 |
@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ |
4501 |
if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \ |
4503 |
if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \ |
4502 |
${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \ |
4504 |
${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \ |
4503 |
fi;fi |
4505 |
fi;fi |
4504 |
.endfor |
4506 |
.endfor |
4505 |
@${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ |
4507 |
@${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ |
4506 |
${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} |
4508 |
${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} |
4507 |
.endif |
4509 |
.endif |
4508 |
.endif |
4510 |
.endif |
4509 |
.endif |
4511 |
.endif |
4510 |
.endfor |
4512 |
.endfor |
4511 |
|
4513 |
|
4512 |
.if !target(add-plist-data) |
4514 |
.if !target(add-plist-data) |
4513 |
.if defined(PORTDATA) |
4515 |
.if defined(PORTDATA) |
4514 |
add-plist-data: |
4516 |
add-plist-data: |
4515 |
.for x in ${PORTDATA} |
4517 |
.for x in ${PORTDATA} |
4516 |
@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ |
4518 |
@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ |
4517 |
if [ ! -e ${STAGEDIR}${DATADIR}/${x} ]; then \ |
4519 |
if [ ! -e ${STAGEDIR}${DATADIR}/${x} ]; then \ |
4518 |
${ECHO_CMD} ${DATADIR}/${x} >> ${TMPPLIST}; \ |
4520 |
${ECHO_CMD} ${DATADIR}/${x} >> ${TMPPLIST}; \ |
4519 |
fi;fi |
4521 |
fi;fi |
4520 |
.endfor |
4522 |
.endfor |
4521 |
@${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ |
4523 |
@${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ |
4522 |
${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} |
4524 |
${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} |
4523 |
.endif |
4525 |
.endif |
4524 |
.endif |
4526 |
.endif |
4525 |
|
4527 |
|
4526 |
.if !target(add-plist-info) |
4528 |
.if !target(add-plist-info) |
4527 |
.if defined(INFO) |
4529 |
.if defined(INFO) |
4528 |
add-plist-info: |
4530 |
add-plist-info: |
4529 |
.for i in ${INFO} |
4531 |
.for i in ${INFO} |
4530 |
@${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}:@info\ :g >> ${TMPPLIST} |
4532 |
@${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}:@info\ :g >> ${TMPPLIST} |
4531 |
.endfor |
4533 |
.endfor |
4532 |
.endif |
4534 |
.endif |
4533 |
.endif |
4535 |
.endif |
4534 |
|
4536 |
|
4535 |
# If we're installing into a non-standard PREFIX, we need to remove that directory at |
4537 |
# If we're installing into a non-standard PREFIX, we need to remove that directory at |
4536 |
# deinstall-time |
4538 |
# deinstall-time |
4537 |
.if !target(add-plist-post) |
4539 |
.if !target(add-plist-post) |
4538 |
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ |
4540 |
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ |
4539 |
${PREFIX} != "/usr" && ${PREFIX} != "/" && !defined(NO_PREFIX_RMDIR)) |
4541 |
${PREFIX} != "/usr" && ${PREFIX} != "/" && !defined(NO_PREFIX_RMDIR)) |
4540 |
add-plist-post: |
4542 |
add-plist-post: |
4541 |
@${ECHO_CMD} "@dir ${PREFIX}" >> ${TMPPLIST} |
4543 |
@${ECHO_CMD} "@dir ${PREFIX}" >> ${TMPPLIST} |
4542 |
.endif |
4544 |
.endif |
4543 |
.endif |
4545 |
.endif |
4544 |
|
4546 |
|
4545 |
.if !target(install-rc-script) |
4547 |
.if !target(install-rc-script) |
4546 |
.if defined(USE_RC_SUBR) |
4548 |
.if defined(USE_RC_SUBR) |
4547 |
install-rc-script: |
4549 |
install-rc-script: |
4548 |
@${ECHO_MSG} "===> Staging rc.d startup script(s)" |
4550 |
@${ECHO_MSG} "===> Staging rc.d startup script(s)" |
4549 |
@for i in ${USE_RC_SUBR}; do \ |
4551 |
@for i in ${USE_RC_SUBR}; do \ |
4550 |
_prefix=${PREFIX}; \ |
4552 |
_prefix=${PREFIX}; \ |
4551 |
[ "${PREFIX}" = "/usr" ] && _prefix="" ; \ |
4553 |
[ "${PREFIX}" = "/usr" ] && _prefix="" ; \ |
4552 |
${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \ |
4554 |
${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \ |
4553 |
${ECHO_CMD} "$${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ |
4555 |
${ECHO_CMD} "$${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ |
4554 |
done |
4556 |
done |
4555 |
.endif |
4557 |
.endif |
4556 |
.endif |
4558 |
.endif |
4557 |
|
4559 |
|
4558 |
.if !target(check-man) |
4560 |
.if !target(check-man) |
4559 |
check-man: stage |
4561 |
check-man: stage |
4560 |
@${ECHO_MSG} "====> Checking man pages (check-man)" |
4562 |
@${ECHO_MSG} "====> Checking man pages (check-man)" |
4561 |
@mdirs= ; \ |
4563 |
@mdirs= ; \ |
4562 |
for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ |
4564 |
for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ |
4563 |
[ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ |
4565 |
[ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ |
4564 |
done ; \ |
4566 |
done ; \ |
4565 |
err=0 ; \ |
4567 |
err=0 ; \ |
4566 |
for dir in $$mdirs; do \ |
4568 |
for dir in $$mdirs; do \ |
4567 |
for f in $$(find $$dir -name "*.gz"); do \ |
4569 |
for f in $$(find $$dir -name "*.gz"); do \ |
4568 |
${ECHO_CMD} "===> Checking $${f##*/}" ; \ |
4570 |
${ECHO_CMD} "===> Checking $${f##*/}" ; \ |
4569 |
gunzip -c $$f | mandoc -Tlint -Werror && continue ; \ |
4571 |
gunzip -c $$f | mandoc -Tlint -Werror && continue ; \ |
4570 |
err=1 ; \ |
4572 |
err=1 ; \ |
4571 |
done ; \ |
4573 |
done ; \ |
4572 |
done ; \ |
4574 |
done ; \ |
4573 |
exit $$err |
4575 |
exit $$err |
4574 |
.endif |
4576 |
.endif |
4575 |
|
4577 |
|
4576 |
# Compress all manpage not already compressed which are not hardlinks |
4578 |
# Compress all manpage not already compressed which are not hardlinks |
4577 |
# Find all manpages which are not compressed and are hardlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others |
4579 |
# Find all manpages which are not compressed and are hardlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others |
4578 |
# Fixes all dead symlinks left by the previous round |
4580 |
# Fixes all dead symlinks left by the previous round |
4579 |
.if !target(compress-man) |
4581 |
.if !target(compress-man) |
4580 |
compress-man: |
4582 |
compress-man: |
4581 |
@${ECHO_MSG} "====> Compressing man pages (compress-man)" |
4583 |
@${ECHO_MSG} "====> Compressing man pages (compress-man)" |
4582 |
@mdirs= ; \ |
4584 |
@mdirs= ; \ |
4583 |
for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ |
4585 |
for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ |
4584 |
[ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ |
4586 |
[ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ |
4585 |
done ; \ |
4587 |
done ; \ |
4586 |
for dir in $$mdirs; do \ |
4588 |
for dir in $$mdirs; do \ |
4587 |
${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ |
4589 |
${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ |
4588 |
${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ |
4590 |
${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ |
4589 |
${SORT} -u | while read inode ; do \ |
4591 |
${SORT} -u | while read inode ; do \ |
4590 |
unset ref ; \ |
4592 |
unset ref ; \ |
4591 |
for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ |
4593 |
for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ |
4592 |
if [ -z $$ref ]; then \ |
4594 |
if [ -z $$ref ]; then \ |
4593 |
ref=$${f}.gz ; \ |
4595 |
ref=$${f}.gz ; \ |
4594 |
${GZIP_CMD} $${f} ; \ |
4596 |
${GZIP_CMD} $${f} ; \ |
4595 |
continue ; \ |
4597 |
continue ; \ |
4596 |
fi ; \ |
4598 |
fi ; \ |
4597 |
${RM} $${f} ; \ |
4599 |
${RM} $${f} ; \ |
4598 |
(cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ |
4600 |
(cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ |
4599 |
done ; \ |
4601 |
done ; \ |
4600 |
done ; \ |
4602 |
done ; \ |
4601 |
${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ |
4603 |
${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ |
4602 |
${LN} -sf $$(readlink $$link).gz $$link.gz ;\ |
4604 |
${LN} -sf $$(readlink $$link).gz $$link.gz ;\ |
4603 |
${RM} $$link ; \ |
4605 |
${RM} $$link ; \ |
4604 |
done; \ |
4606 |
done; \ |
4605 |
done |
4607 |
done |
4606 |
.endif |
4608 |
.endif |
4607 |
|
4609 |
|
4608 |
.if !target(stage-dir) |
4610 |
.if !target(stage-dir) |
4609 |
stage-dir: ${STAGEDIR}${PREFIX} |
4611 |
stage-dir: ${STAGEDIR}${PREFIX} |
4610 |
.if !defined(NO_MTREE) |
4612 |
.if !defined(NO_MTREE) |
4611 |
@${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null |
4613 |
@${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null |
4612 |
.endif |
4614 |
.endif |
4613 |
.endif |
4615 |
.endif |
4614 |
|
4616 |
|
4615 |
.if !target(makeplist) |
4617 |
.if !target(makeplist) |
4616 |
makeplist: stage |
4618 |
makeplist: stage |
4617 |
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist |
4619 |
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist |
4618 |
.endif |
4620 |
.endif |
4619 |
|
4621 |
|
4620 |
.if !target(check-plist) |
4622 |
.if !target(check-plist) |
4621 |
check-plist: stage |
4623 |
check-plist: stage |
4622 |
@${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" |
4624 |
@${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" |
4623 |
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist |
4625 |
@${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist |
4624 |
@${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" |
4626 |
@${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" |
4625 |
.endif |
4627 |
.endif |
4626 |
|
4628 |
|
4627 |
.if !target(check-orphans) |
4629 |
.if !target(check-orphans) |
4628 |
check-orphans: check-plist |
4630 |
check-orphans: check-plist |
4629 |
.endif |
4631 |
.endif |
4630 |
|
4632 |
|
4631 |
.if !target(stage-qa) |
4633 |
.if !target(stage-qa) |
4632 |
stage-qa: |
4634 |
stage-qa: |
4633 |
@${ECHO_MSG} "====> Running Q/A tests (stage-qa)" |
4635 |
@${ECHO_MSG} "====> Running Q/A tests (stage-qa)" |
4634 |
@${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh |
4636 |
@${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh |
4635 |
.if !defined(DEVELOPER) |
4637 |
.if !defined(DEVELOPER) |
4636 |
@${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" |
4638 |
@${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" |
4637 |
.endif |
4639 |
.endif |
4638 |
.endif |
4640 |
.endif |
4639 |
|
4641 |
|
4640 |
pretty-flavors-package-names: .PHONY |
4642 |
pretty-flavors-package-names: .PHONY |
4641 |
.if empty(FLAVORS) |
4643 |
.if empty(FLAVORS) |
4642 |
@${ECHO_CMD} "no flavor: ${PKGNAME}" |
4644 |
@${ECHO_CMD} "no flavor: ${PKGNAME}" |
4643 |
.else |
4645 |
.else |
4644 |
.for f in ${FLAVORS} |
4646 |
.for f in ${FLAVORS} |
4645 |
@${ECHO_CMD} -n "${f}: " |
4647 |
@${ECHO_CMD} -n "${f}: " |
4646 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME |
4648 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME |
4647 |
.endfor |
4649 |
.endfor |
4648 |
.endif |
4650 |
.endif |
4649 |
|
4651 |
|
4650 |
flavors-package-names: .PHONY |
4652 |
flavors-package-names: .PHONY |
4651 |
.if empty(FLAVORS) |
4653 |
.if empty(FLAVORS) |
4652 |
@${ECHO_CMD} "${PKGNAME}" |
4654 |
@${ECHO_CMD} "${PKGNAME}" |
4653 |
.else |
4655 |
.else |
4654 |
.for f in ${FLAVORS} |
4656 |
.for f in ${FLAVORS} |
4655 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME |
4657 |
@cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME |
4656 |
.endfor |
4658 |
.endfor |
4657 |
.endif |
4659 |
.endif |
4658 |
|
4660 |
|
4659 |
# Fake installation of package so that user can pkg delete it later. |
4661 |
# Fake installation of package so that user can pkg delete it later. |
4660 |
.if !target(fake-pkg) |
4662 |
.if !target(fake-pkg) |
4661 |
STAGE_ARGS= -i ${STAGEDIR} |
4663 |
STAGE_ARGS= -i ${STAGEDIR} |
4662 |
|
4664 |
|
4663 |
.if !defined(NO_PKG_REGISTER) |
4665 |
.if !defined(NO_PKG_REGISTER) |
4664 |
fake-pkg: |
4666 |
fake-pkg: |
4665 |
.if defined(INSTALLS_DEPENDS) |
4667 |
.if defined(INSTALLS_DEPENDS) |
4666 |
@${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" |
4668 |
@${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" |
4667 |
.else |
4669 |
.else |
4668 |
@${ECHO_MSG} "===> Registering installation for ${PKGNAME}" |
4670 |
@${ECHO_MSG} "===> Registering installation for ${PKGNAME}" |
4669 |
.endif |
4671 |
.endif |
4670 |
.if defined(INSTALLS_DEPENDS) |
4672 |
.if defined(INSTALLS_DEPENDS) |
4671 |
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} |
4673 |
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} |
4672 |
.else |
4674 |
.else |
4673 |
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} |
4675 |
@${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} |
4674 |
.endif |
4676 |
.endif |
4675 |
@${RM} -r ${METADIR} |
4677 |
@${RM} -r ${METADIR} |
4676 |
.endif |
4678 |
.endif |
4677 |
.endif |
4679 |
.endif |
4678 |
|
4680 |
|
4679 |
# Depend is generally meaningless for arbitrary ports, but if someone wants |
4681 |
# Depend is generally meaningless for arbitrary ports, but if someone wants |
4680 |
# one they can override this. This is just to catch people who've gotten into |
4682 |
# one they can override this. This is just to catch people who've gotten into |
4681 |
# the habit of typing `make depend all install' as a matter of course. |
4683 |
# the habit of typing `make depend all install' as a matter of course. |
4682 |
# Same goes for tags |
4684 |
# Same goes for tags |
4683 |
.for _t in depend tags |
4685 |
.for _t in depend tags |
4684 |
.if !target(${_t}) |
4686 |
.if !target(${_t}) |
4685 |
${_t}: |
4687 |
${_t}: |
4686 |
.endif |
4688 |
.endif |
4687 |
.endfor |
4689 |
.endfor |
4688 |
|
4690 |
|
4689 |
.if !defined(NOPRECIOUSMAKEVARS) |
4691 |
.if !defined(NOPRECIOUSMAKEVARS) |
4690 |
# These won't change, so we can pass them through the environment |
4692 |
# These won't change, so we can pass them through the environment |
4691 |
.for var in ${_EXPORTED_VARS} |
4693 |
.for var in ${_EXPORTED_VARS} |
4692 |
.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) |
4694 |
.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) |
4693 |
.MAKEFLAGS: ${var}=${${var}:Q} |
4695 |
.MAKEFLAGS: ${var}=${${var}:Q} |
4694 |
.endif |
4696 |
.endif |
4695 |
.endfor |
4697 |
.endfor |
4696 |
.endif |
4698 |
.endif |
4697 |
PORTS_ENV_VARS+= ${_EXPORTED_VARS} |
4699 |
PORTS_ENV_VARS+= ${_EXPORTED_VARS} |
4698 |
|
4700 |
|
4699 |
.if !target(pre-check-config) |
4701 |
.if !target(pre-check-config) |
4700 |
pre-check-config: |
4702 |
pre-check-config: |
4701 |
_CHECK_OPTIONS_NAMES= OPTIONS_DEFINE |
4703 |
_CHECK_OPTIONS_NAMES= OPTIONS_DEFINE |
4702 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_GROUP:S/^/OPTIONS_GROUP_/} |
4704 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_GROUP:S/^/OPTIONS_GROUP_/} |
4703 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_MULTI:S/^/OPTIONS_MULTI_/} |
4705 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_MULTI:S/^/OPTIONS_MULTI_/} |
4704 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_RADIO:S/^/OPTIONS_RADIO_/} |
4706 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_RADIO:S/^/OPTIONS_RADIO_/} |
4705 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_SINGLE:S/^/OPTIONS_SINGLE_/} |
4707 |
_CHECK_OPTIONS_NAMES+= ${OPTIONS_SINGLE:S/^/OPTIONS_SINGLE_/} |
4706 |
.for var in ${_CHECK_OPTIONS_NAMES} |
4708 |
.for var in ${_CHECK_OPTIONS_NAMES} |
4707 |
. if defined(${var}) |
4709 |
. if defined(${var}) |
4708 |
. for o in ${${var}} |
4710 |
. for o in ${${var}} |
4709 |
. if ${o:C/[-_[:upper:][:digit:]]//g} |
4711 |
. if ${o:C/[-_[:upper:][:digit:]]//g} |
4710 |
OPTIONS_BAD_NAMES+= ${o} |
4712 |
OPTIONS_BAD_NAMES+= ${o} |
4711 |
. endif |
4713 |
. endif |
4712 |
. endfor |
4714 |
. endfor |
4713 |
. endif |
4715 |
. endif |
4714 |
.endfor |
4716 |
.endfor |
4715 |
.if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES) |
4717 |
.if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES) |
4716 |
DEV_WARNING+= "These options name have characters outside of [-_A-Z0-9]:" |
4718 |
DEV_WARNING+= "These options name have characters outside of [-_A-Z0-9]:" |
4717 |
DEV_WARNING+= "${OPTIONS_BAD_NAMES:O:u}" |
4719 |
DEV_WARNING+= "${OPTIONS_BAD_NAMES:O:u}" |
4718 |
.endif |
4720 |
.endif |
4719 |
.for single in ${OPTIONS_SINGLE} |
4721 |
.for single in ${OPTIONS_SINGLE} |
4720 |
. for opt in ${OPTIONS_SINGLE_${single}} |
4722 |
. for opt in ${OPTIONS_SINGLE_${single}} |
4721 |
. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) |
4723 |
. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) |
4722 |
. if !empty(PORT_OPTIONS:M${opt}) |
4724 |
. if !empty(PORT_OPTIONS:M${opt}) |
4723 |
OPTIONS_WRONG_SINGLE_${single}+= ${opt} |
4725 |
OPTIONS_WRONG_SINGLE_${single}+= ${opt} |
4724 |
. if defined(OPTFOUND) |
4726 |
. if defined(OPTFOUND) |
4725 |
OPTIONS_WRONG_SINGLE+= ${single} |
4727 |
OPTIONS_WRONG_SINGLE+= ${single} |
4726 |
. else |
4728 |
. else |
4727 |
OPTFOUND= true |
4729 |
OPTFOUND= true |
4728 |
. endif |
4730 |
. endif |
4729 |
. endif |
4731 |
. endif |
4730 |
. else |
4732 |
. else |
4731 |
# if conditional and if the condition is unchecked, remove opt from the list of |
4733 |
# if conditional and if the condition is unchecked, remove opt from the list of |
4732 |
# set options |
4734 |
# set options |
4733 |
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} |
4735 |
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} |
4734 |
OPTNOCHECK= true |
4736 |
OPTNOCHECK= true |
4735 |
. endif |
4737 |
. endif |
4736 |
. endfor |
4738 |
. endfor |
4737 |
. if !defined(OPTFOUND) && !defined(OPTNOCHECK) |
4739 |
. if !defined(OPTFOUND) && !defined(OPTNOCHECK) |
4738 |
OPTIONS_WRONG_SINGLE+= ${single} |
4740 |
OPTIONS_WRONG_SINGLE+= ${single} |
4739 |
. endif |
4741 |
. endif |
4740 |
. undef OPTFOUND |
4742 |
. undef OPTFOUND |
4741 |
. undef OPTNOCHECK |
4743 |
. undef OPTNOCHECK |
4742 |
.endfor |
4744 |
.endfor |
4743 |
.undef single |
4745 |
.undef single |
4744 |
|
4746 |
|
4745 |
.for radio in ${OPTIONS_RADIO} |
4747 |
.for radio in ${OPTIONS_RADIO} |
4746 |
. for opt in ${OPTIONS_RADIO_${radio}} |
4748 |
. for opt in ${OPTIONS_RADIO_${radio}} |
4747 |
. if !empty(PORT_OPTIONS:M${opt}) |
4749 |
. if !empty(PORT_OPTIONS:M${opt}) |
4748 |
OPTIONS_WRONG_RADIO_${radio}+= ${opt} |
4750 |
OPTIONS_WRONG_RADIO_${radio}+= ${opt} |
4749 |
. if defined(OPTFOUND) |
4751 |
. if defined(OPTFOUND) |
4750 |
OPTIONS_WRONG_RADIO+= ${radio} |
4752 |
OPTIONS_WRONG_RADIO+= ${radio} |
4751 |
. else |
4753 |
. else |
4752 |
OPTFOUND= true |
4754 |
OPTFOUND= true |
4753 |
. endif |
4755 |
. endif |
4754 |
. endif |
4756 |
. endif |
4755 |
. endfor |
4757 |
. endfor |
4756 |
. undef OPTFOUND |
4758 |
. undef OPTFOUND |
4757 |
.endfor |
4759 |
.endfor |
4758 |
|
4760 |
|
4759 |
.for multi in ${OPTIONS_MULTI} |
4761 |
.for multi in ${OPTIONS_MULTI} |
4760 |
. for opt in ${OPTIONS_MULTI_${multi}} |
4762 |
. for opt in ${OPTIONS_MULTI_${multi}} |
4761 |
. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) |
4763 |
. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) |
4762 |
. if !empty(PORT_OPTIONS:M${opt}) |
4764 |
. if !empty(PORT_OPTIONS:M${opt}) |
4763 |
OPTFOUND= true |
4765 |
OPTFOUND= true |
4764 |
. endif |
4766 |
. endif |
4765 |
. else |
4767 |
. else |
4766 |
# if conditional and if the condition is unchecked, remove opt from the list of |
4768 |
# if conditional and if the condition is unchecked, remove opt from the list of |
4767 |
# set options |
4769 |
# set options |
4768 |
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} |
4770 |
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} |
4769 |
OPTNOCHECK= true |
4771 |
OPTNOCHECK= true |
4770 |
. endif |
4772 |
. endif |
4771 |
. endfor |
4773 |
. endfor |
4772 |
. if !defined(OPTFOUND) && !defined(OPTNOCHECK) |
4774 |
. if !defined(OPTFOUND) && !defined(OPTNOCHECK) |
4773 |
OPTIONS_WRONG_MULTI+= ${multi} |
4775 |
OPTIONS_WRONG_MULTI+= ${multi} |
4774 |
. endif |
4776 |
. endif |
4775 |
. undef OPTFOUND |
4777 |
. undef OPTFOUND |
4776 |
. undef OPTNOCHECK |
4778 |
. undef OPTNOCHECK |
4777 |
.endfor |
4779 |
.endfor |
4778 |
.undef multi |
4780 |
.undef multi |
4779 |
|
4781 |
|
4780 |
.for opt in ${PORT_OPTIONS} |
4782 |
.for opt in ${PORT_OPTIONS} |
4781 |
. for conflict in ${${opt}_PREVENTS} |
4783 |
. for conflict in ${${opt}_PREVENTS} |
4782 |
. if ${PORT_OPTIONS:M${conflict}} |
4784 |
. if ${PORT_OPTIONS:M${conflict}} |
4783 |
. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) |
4785 |
. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) |
4784 |
OPTIONS_WRONG_PREVENTS+= ${opt} |
4786 |
OPTIONS_WRONG_PREVENTS+= ${opt} |
4785 |
. endif |
4787 |
. endif |
4786 |
OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} |
4788 |
OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} |
4787 |
. endif |
4789 |
. endif |
4788 |
. endfor |
4790 |
. endfor |
4789 |
.endfor |
4791 |
.endfor |
4790 |
.undef conflict |
4792 |
.undef conflict |
4791 |
.undef opt |
4793 |
.undef opt |
4792 |
.endif #pre-check-config |
4794 |
.endif #pre-check-config |
4793 |
|
4795 |
|
4794 |
.if !target(_check-config) |
4796 |
.if !target(_check-config) |
4795 |
_check-config: pre-check-config |
4797 |
_check-config: pre-check-config |
4796 |
.for multi in ${OPTIONS_WRONG_MULTI} |
4798 |
.for multi in ${OPTIONS_WRONG_MULTI} |
4797 |
@${ECHO_MSG} "====> You must check at least one option in the ${multi} multi" |
4799 |
@${ECHO_MSG} "====> You must check at least one option in the ${multi} multi" |
4798 |
.endfor |
4800 |
.endfor |
4799 |
.for single in ${OPTIONS_WRONG_SINGLE} |
4801 |
.for single in ${OPTIONS_WRONG_SINGLE} |
4800 |
@${ECHO_MSG} "====> You must select one and only one option from the ${single} single" |
4802 |
@${ECHO_MSG} "====> You must select one and only one option from the ${single} single" |
4801 |
.if defined(OPTIONS_WRONG_SINGLE_${single}) |
4803 |
.if defined(OPTIONS_WRONG_SINGLE_${single}) |
4802 |
@${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_SINGLE_${single}}" |
4804 |
@${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_SINGLE_${single}}" |
4803 |
.else |
4805 |
.else |
4804 |
@${ECHO_MSG} "=====> No option was selected (and one must be)" |
4806 |
@${ECHO_MSG} "=====> No option was selected (and one must be)" |
4805 |
.endif |
4807 |
.endif |
4806 |
.endfor |
4808 |
.endfor |
4807 |
.for radio in ${OPTIONS_WRONG_RADIO} |
4809 |
.for radio in ${OPTIONS_WRONG_RADIO} |
4808 |
@${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" |
4810 |
@${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" |
4809 |
@${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_RADIO_${radio}}" |
4811 |
@${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_RADIO_${radio}}" |
4810 |
.endfor |
4812 |
.endfor |
4811 |
.if defined(OPTIONS_WRONG_PREVENTS) |
4813 |
.if defined(OPTIONS_WRONG_PREVENTS) |
4812 |
@${ECHO_MSG} "====> Two or more enabled options conflict with each other" |
4814 |
@${ECHO_MSG} "====> Two or more enabled options conflict with each other" |
4813 |
. for prevents in ${OPTIONS_WRONG_PREVENTS} |
4815 |
. for prevents in ${OPTIONS_WRONG_PREVENTS} |
4814 |
@${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" |
4816 |
@${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" |
4815 |
. if defined(${prevents}_PREVENTS_MSG) |
4817 |
. if defined(${prevents}_PREVENTS_MSG) |
4816 |
@${ECHO_MSG} "======> ${${prevents}_PREVENTS_MSG}" |
4818 |
@${ECHO_MSG} "======> ${${prevents}_PREVENTS_MSG}" |
4817 |
. endif |
4819 |
. endif |
4818 |
. endfor |
4820 |
. endfor |
4819 |
.endif |
4821 |
.endif |
4820 |
.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) |
4822 |
.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) |
4821 |
_CHECK_CONFIG_ERROR= true |
4823 |
_CHECK_CONFIG_ERROR= true |
4822 |
.endif |
4824 |
.endif |
4823 |
.endif # _check-config |
4825 |
.endif # _check-config |
4824 |
|
4826 |
|
4825 |
.if !target(check-config) |
4827 |
.if !target(check-config) |
4826 |
check-config: _check-config |
4828 |
check-config: _check-config |
4827 |
.if !empty(_CHECK_CONFIG_ERROR) |
4829 |
.if !empty(_CHECK_CONFIG_ERROR) |
4828 |
@${FALSE} |
4830 |
@${FALSE} |
4829 |
.endif |
4831 |
.endif |
4830 |
.endif # check-config |
4832 |
.endif # check-config |
4831 |
|
4833 |
|
4832 |
.if !target(sanity-config) |
4834 |
.if !target(sanity-config) |
4833 |
sanity-config: _check-config |
4835 |
sanity-config: _check-config |
4834 |
.if !empty(_CHECK_CONFIG_ERROR) |
4836 |
.if !empty(_CHECK_CONFIG_ERROR) |
4835 |
@echo -n "Config is invalid. Re-edit? [Y/n] "; \ |
4837 |
@echo -n "Config is invalid. Re-edit? [Y/n] "; \ |
4836 |
read answer; \ |
4838 |
read answer; \ |
4837 |
case $$answer in \ |
4839 |
case $$answer in \ |
4838 |
[Nn]|[Nn][Oo]) \ |
4840 |
[Nn]|[Nn][Oo]) \ |
4839 |
exit 0; \ |
4841 |
exit 0; \ |
4840 |
esac; \ |
4842 |
esac; \ |
4841 |
cd ${.CURDIR} && ${MAKE} config |
4843 |
cd ${.CURDIR} && ${MAKE} config |
4842 |
.endif |
4844 |
.endif |
4843 |
.endif # sanity-config |
4845 |
.endif # sanity-config |
4844 |
|
4846 |
|
4845 |
.if !target(pre-config) |
4847 |
.if !target(pre-config) |
4846 |
pre-config: |
4848 |
pre-config: |
4847 |
D4P_ENV= PKGNAME="${PKGNAME}" \ |
4849 |
D4P_ENV= PKGNAME="${PKGNAME}" \ |
4848 |
PORT_OPTIONS="${PORT_OPTIONS}" \ |
4850 |
PORT_OPTIONS="${PORT_OPTIONS}" \ |
4849 |
ALL_OPTIONS="${ALL_OPTIONS}" \ |
4851 |
ALL_OPTIONS="${ALL_OPTIONS}" \ |
4850 |
OPTIONS_MULTI="${OPTIONS_MULTI}" \ |
4852 |
OPTIONS_MULTI="${OPTIONS_MULTI}" \ |
4851 |
OPTIONS_SINGLE="${OPTIONS_SINGLE}" \ |
4853 |
OPTIONS_SINGLE="${OPTIONS_SINGLE}" \ |
4852 |
OPTIONS_RADIO="${OPTIONS_RADIO}" \ |
4854 |
OPTIONS_RADIO="${OPTIONS_RADIO}" \ |
4853 |
OPTIONS_GROUP="${OPTIONS_GROUP}" \ |
4855 |
OPTIONS_GROUP="${OPTIONS_GROUP}" \ |
4854 |
NEW_OPTIONS="${NEW_OPTIONS}" \ |
4856 |
NEW_OPTIONS="${NEW_OPTIONS}" \ |
4855 |
DIALOG4PORTS="${DIALOG4PORTS}" \ |
4857 |
DIALOG4PORTS="${DIALOG4PORTS}" \ |
4856 |
PREFIX="${PREFIX}" \ |
4858 |
PREFIX="${PREFIX}" \ |
4857 |
LOCALBASE="${LOCALBASE}" \ |
4859 |
LOCALBASE="${LOCALBASE}" \ |
4858 |
PORTSDIR="${PORTSDIR}" \ |
4860 |
PORTSDIR="${PORTSDIR}" \ |
4859 |
MAKE="${MAKE}" \ |
4861 |
MAKE="${MAKE}" \ |
4860 |
D4PHEIGHT="${D4PHEIGHT}" \ |
4862 |
D4PHEIGHT="${D4PHEIGHT}" \ |
4861 |
D4PWIDTH="${D4PWIDTH}" \ |
4863 |
D4PWIDTH="${D4PWIDTH}" \ |
4862 |
D4PFULLSCREEN="${D4PFULLSCREEN}" |
4864 |
D4PFULLSCREEN="${D4PFULLSCREEN}" |
4863 |
.if exists(${PKGHELP}) |
4865 |
.if exists(${PKGHELP}) |
4864 |
D4P_ENV+= PKGHELP="${PKGHELP}" |
4866 |
D4P_ENV+= PKGHELP="${PKGHELP}" |
4865 |
.endif |
4867 |
.endif |
4866 |
.for opt in ${ALL_OPTIONS} |
4868 |
.for opt in ${ALL_OPTIONS} |
4867 |
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" |
4869 |
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" |
4868 |
.endfor |
4870 |
.endfor |
4869 |
.for otype in MULTI GROUP SINGLE RADIO |
4871 |
.for otype in MULTI GROUP SINGLE RADIO |
4870 |
. for m in ${OPTIONS_${otype}} |
4872 |
. for m in ${OPTIONS_${otype}} |
4871 |
D4P_ENV+= OPTIONS_${otype}_${m}="${OPTIONS_${otype}_${m}}" \ |
4873 |
D4P_ENV+= OPTIONS_${otype}_${m}="${OPTIONS_${otype}_${m}}" \ |
4872 |
${m}_DESC=""${${m}_DESC:Q}"" |
4874 |
${m}_DESC=""${${m}_DESC:Q}"" |
4873 |
. for opt in ${OPTIONS_${otype}_${m}} |
4875 |
. for opt in ${OPTIONS_${otype}_${m}} |
4874 |
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" |
4876 |
D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" |
4875 |
. endfor |
4877 |
. endfor |
4876 |
. endfor |
4878 |
. endfor |
4877 |
.endfor |
4879 |
.endfor |
4878 |
.undef m |
4880 |
.undef m |
4879 |
.undef otype |
4881 |
.undef otype |
4880 |
.undef opt |
4882 |
.undef opt |
4881 |
.endif # pre-config |
4883 |
.endif # pre-config |
4882 |
|
4884 |
|
4883 |
.if !target(do-config) |
4885 |
.if !target(do-config) |
4884 |
do-config: |
4886 |
do-config: |
4885 |
.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) |
4887 |
.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) |
4886 |
@${ECHO_MSG} "===> No options to configure" |
4888 |
@${ECHO_MSG} "===> No options to configure" |
4887 |
.else |
4889 |
.else |
4888 |
@optionsdir=${OPTIONS_FILE:H}; \ |
4890 |
@optionsdir=${OPTIONS_FILE:H}; \ |
4889 |
if [ ! -w "${PORT_DBDIR}" -a "`stat -f %u ${PORT_DBDIR:H}`" = 0 ]; \ |
4891 |
if [ ! -w "${PORT_DBDIR}" -a "`stat -f %u ${PORT_DBDIR:H}`" = 0 ]; \ |
4890 |
then \ |
4892 |
then \ |
4891 |
${ECHO_MSG} "===> Switching to root credentials to create $${optionsdir}"; \ |
4893 |
${ECHO_MSG} "===> Switching to root credentials to create $${optionsdir}"; \ |
4892 |
(${SU_CMD} "${SH} -c \"${MKDIR} $${optionsdir} 2> /dev/null\"") || \ |
4894 |
(${SU_CMD} "${SH} -c \"${MKDIR} $${optionsdir} 2> /dev/null\"") || \ |
4893 |
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1); \ |
4895 |
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1); \ |
4894 |
${ECHO_MSG} "===> Returning to user credentials" ; \ |
4896 |
${ECHO_MSG} "===> Returning to user credentials" ; \ |
4895 |
else \ |
4897 |
else \ |
4896 |
${MKDIR} $${optionsdir} 2> /dev/null || \ |
4898 |
${MKDIR} $${optionsdir} 2> /dev/null || \ |
4897 |
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1) ; \ |
4899 |
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1) ; \ |
4898 |
fi |
4900 |
fi |
4899 |
@TMPOPTIONSFILE=$$(mktemp -t portoptions); \ |
4901 |
@TMPOPTIONSFILE=$$(mktemp -t portoptions); \ |
4900 |
trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ |
4902 |
trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ |
4901 |
${SETENV} ${D4P_ENV} ${SH} ${SCRIPTSDIR}/dialog4ports.sh $${TMPOPTIONSFILE} || { \ |
4903 |
${SETENV} ${D4P_ENV} ${SH} ${SCRIPTSDIR}/dialog4ports.sh $${TMPOPTIONSFILE} || { \ |
4902 |
${RM} $${TMPOPTIONSFILE}; \ |
4904 |
${RM} $${TMPOPTIONSFILE}; \ |
4903 |
${ECHO_MSG} "===> Options unchanged"; \ |
4905 |
${ECHO_MSG} "===> Options unchanged"; \ |
4904 |
exit 0; \ |
4906 |
exit 0; \ |
4905 |
}; \ |
4907 |
}; \ |
4906 |
${ECHO_CMD}; \ |
4908 |
${ECHO_CMD}; \ |
4907 |
if [ ! -e $${TMPOPTIONSFILE} ]; then \ |
4909 |
if [ ! -e $${TMPOPTIONSFILE} ]; then \ |
4908 |
${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ |
4910 |
${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ |
4909 |
exit 0; \ |
4911 |
exit 0; \ |
4910 |
fi; \ |
4912 |
fi; \ |
4911 |
SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ |
4913 |
SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ |
4912 |
${RM} $${TMPOPTIONSFILE}; \ |
4914 |
${RM} $${TMPOPTIONSFILE}; \ |
4913 |
TMPOPTIONSFILE=$$(mktemp -t portoptions); \ |
4915 |
TMPOPTIONSFILE=$$(mktemp -t portoptions); \ |
4914 |
trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ |
4916 |
trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ |
4915 |
${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ |
4917 |
${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ |
4916 |
${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ |
4918 |
${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ |
4917 |
${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ |
4919 |
${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ |
4918 |
${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ |
4920 |
${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ |
4919 |
for i in ${COMPLETE_OPTIONS_LIST}; do \ |
4921 |
for i in ${COMPLETE_OPTIONS_LIST}; do \ |
4920 |
if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ |
4922 |
if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ |
4921 |
${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ |
4923 |
${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ |
4922 |
else \ |
4924 |
else \ |
4923 |
${ECHO_CMD} "OPTIONS_FILE_UNSET+=$${i}" >> $${TMPOPTIONSFILE}; \ |
4925 |
${ECHO_CMD} "OPTIONS_FILE_UNSET+=$${i}" >> $${TMPOPTIONSFILE}; \ |
4924 |
fi; \ |
4926 |
fi; \ |
4925 |
done; \ |
4927 |
done; \ |
4926 |
if [ ! -w "${OPTIONS_FILE:H}" -a "`stat -f %u ${OPTIONS_FILE:H}`" != ${UID} ]; \ |
4928 |
if [ ! -w "${OPTIONS_FILE:H}" -a "`stat -f %u ${OPTIONS_FILE:H}`" != ${UID} ]; \ |
4927 |
then \ |
4929 |
then \ |
4928 |
${ECHO_MSG} "===> Switching to root credentials to write ${OPTIONS_FILE}"; \ |
4930 |
${ECHO_MSG} "===> Switching to root credentials to write ${OPTIONS_FILE}"; \ |
4929 |
${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}"; \ |
4931 |
${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}"; \ |
4930 |
${ECHO_MSG} "===> Returning to user credentials"; \ |
4932 |
${ECHO_MSG} "===> Returning to user credentials"; \ |
4931 |
else \ |
4933 |
else \ |
4932 |
${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}; \ |
4934 |
${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}; \ |
4933 |
fi; \ |
4935 |
fi; \ |
4934 |
${RM} $${TMPOPTIONSFILE} |
4936 |
${RM} $${TMPOPTIONSFILE} |
4935 |
@cd ${.CURDIR} && ${MAKE} sanity-config |
4937 |
@cd ${.CURDIR} && ${MAKE} sanity-config |
4936 |
.endif |
4938 |
.endif |
4937 |
.endif # do-config |
4939 |
.endif # do-config |
4938 |
|
4940 |
|
4939 |
.if !target(config) |
4941 |
.if !target(config) |
4940 |
.if !defined(NO_DIALOG) |
4942 |
.if !defined(NO_DIALOG) |
4941 |
config: pre-config do-config |
4943 |
config: pre-config do-config |
4942 |
.else |
4944 |
.else |
4943 |
config: |
4945 |
config: |
4944 |
@${ECHO_MSG} "===> Skipping 'config' as NO_DIALOG is defined" |
4946 |
@${ECHO_MSG} "===> Skipping 'config' as NO_DIALOG is defined" |
4945 |
.endif |
4947 |
.endif |
4946 |
.endif # config |
4948 |
.endif # config |
4947 |
|
4949 |
|
4948 |
.if !target(config-recursive) |
4950 |
.if !target(config-recursive) |
4949 |
config-recursive: |
4951 |
config-recursive: |
4950 |
@${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; |
4952 |
@${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; |
4951 |
@recursive_cmd="config-conditional"; \ |
4953 |
@recursive_cmd="config-conditional"; \ |
4952 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4954 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
4953 |
${_FLAVOR_RECURSIVE_SH} |
4955 |
${_FLAVOR_RECURSIVE_SH} |
4954 |
.endif # config-recursive |
4956 |
.endif # config-recursive |
4955 |
|
4957 |
|
4956 |
.if !target(config-conditional) |
4958 |
.if !target(config-conditional) |
4957 |
config-conditional: |
4959 |
config-conditional: |
4958 |
.if !empty(NEW_OPTIONS) |
4960 |
.if !empty(NEW_OPTIONS) |
4959 |
@cd ${.CURDIR} && ${MAKE} config; |
4961 |
@cd ${.CURDIR} && ${MAKE} config; |
4960 |
.endif |
4962 |
.endif |
4961 |
.endif # config-conditional |
4963 |
.endif # config-conditional |
4962 |
|
4964 |
|
4963 |
.if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) |
4965 |
.if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) |
4964 |
.include "${PORTSDIR}/Mk/bsd.options.desc.mk" |
4966 |
.include "${PORTSDIR}/Mk/bsd.options.desc.mk" |
4965 |
MULTI_EOL= : you have to choose at least one of them |
4967 |
MULTI_EOL= : you have to choose at least one of them |
4966 |
SINGLE_EOL= : you have to select exactly one of them |
4968 |
SINGLE_EOL= : you have to select exactly one of them |
4967 |
RADIO_EOL= : you can only select none or one of them |
4969 |
RADIO_EOL= : you can only select none or one of them |
4968 |
showconfig: check-config |
4970 |
showconfig: check-config |
4969 |
.if !empty(COMPLETE_OPTIONS_LIST) |
4971 |
.if !empty(COMPLETE_OPTIONS_LIST) |
4970 |
@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": |
4972 |
@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": |
4971 |
.for opt in ${ALL_OPTIONS} |
4973 |
.for opt in ${ALL_OPTIONS} |
4972 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" |
4974 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" |
4973 |
. if !empty(${opt}_DESC) |
4975 |
. if !empty(${opt}_DESC) |
4974 |
@${ECHO_MSG} -n ": "${${opt}_DESC:Q} |
4976 |
@${ECHO_MSG} -n ": "${${opt}_DESC:Q} |
4975 |
. endif |
4977 |
. endif |
4976 |
@${ECHO_MSG} "" |
4978 |
@${ECHO_MSG} "" |
4977 |
.endfor |
4979 |
.endfor |
4978 |
|
4980 |
|
4979 |
#multi and conditional multis |
4981 |
#multi and conditional multis |
4980 |
.for otype in MULTI GROUP SINGLE RADIO |
4982 |
.for otype in MULTI GROUP SINGLE RADIO |
4981 |
. for m in ${OPTIONS_${otype}} |
4983 |
. for m in ${OPTIONS_${otype}} |
4982 |
. if empty(${m}_DESC) |
4984 |
. if empty(${m}_DESC) |
4983 |
@${ECHO_MSG} "====> Options available for the ${otype:tl} ${m}${${otype}_EOL}" |
4985 |
@${ECHO_MSG} "====> Options available for the ${otype:tl} ${m}${${otype}_EOL}" |
4984 |
. else |
4986 |
. else |
4985 |
@${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" |
4987 |
@${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" |
4986 |
. endif |
4988 |
. endif |
4987 |
. for opt in ${OPTIONS_${otype}_${m}} |
4989 |
. for opt in ${OPTIONS_${otype}_${m}} |
4988 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" |
4990 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" |
4989 |
. if !empty(${opt}_DESC) |
4991 |
. if !empty(${opt}_DESC) |
4990 |
@${ECHO_MSG} -n ": "${${opt}_DESC:Q} |
4992 |
@${ECHO_MSG} -n ": "${${opt}_DESC:Q} |
4991 |
. endif |
4993 |
. endif |
4992 |
@${ECHO_MSG} "" |
4994 |
@${ECHO_MSG} "" |
4993 |
. endfor |
4995 |
. endfor |
4994 |
. endfor |
4996 |
. endfor |
4995 |
.endfor |
4997 |
.endfor |
4996 |
|
4998 |
|
4997 |
.undef otype |
4999 |
.undef otype |
4998 |
.undef m |
5000 |
.undef m |
4999 |
.undef opt |
5001 |
.undef opt |
5000 |
@${ECHO_MSG} "===> Use 'make config' to modify these settings" |
5002 |
@${ECHO_MSG} "===> Use 'make config' to modify these settings" |
5001 |
.endif |
5003 |
.endif |
5002 |
.endif # showconfig |
5004 |
.endif # showconfig |
5003 |
|
5005 |
|
5004 |
.if !target(showconfig-recursive) |
5006 |
.if !target(showconfig-recursive) |
5005 |
showconfig-recursive: |
5007 |
showconfig-recursive: |
5006 |
@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and its dependencies"; |
5008 |
@${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and its dependencies"; |
5007 |
@recursive_cmd="showconfig"; \ |
5009 |
@recursive_cmd="showconfig"; \ |
5008 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
5010 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
5009 |
${_FLAVOR_RECURSIVE_SH} |
5011 |
${_FLAVOR_RECURSIVE_SH} |
5010 |
.endif # showconfig-recursive |
5012 |
.endif # showconfig-recursive |
5011 |
|
5013 |
|
5012 |
.if !target(rmconfig) |
5014 |
.if !target(rmconfig) |
5013 |
rmconfig: |
5015 |
rmconfig: |
5014 |
.if exists(${OPTIONS_FILE}) |
5016 |
.if exists(${OPTIONS_FILE}) |
5015 |
-@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \ |
5017 |
-@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \ |
5016 |
optionsdir=${OPTIONS_FILE:H}; \ |
5018 |
optionsdir=${OPTIONS_FILE:H}; \ |
5017 |
if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" -a ! -w "${OPTIONS_FILE}" ]; then \ |
5019 |
if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" -a ! -w "${OPTIONS_FILE}" ]; then \ |
5018 |
${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONS_FILE} and $${optionsdir}"; \ |
5020 |
${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONS_FILE} and $${optionsdir}"; \ |
5019 |
${SU_CMD} "${RM} ${OPTIONS_FILE} ; \ |
5021 |
${SU_CMD} "${RM} ${OPTIONS_FILE} ; \ |
5020 |
${RMDIR} $${optionsdir}"; \ |
5022 |
${RMDIR} $${optionsdir}"; \ |
5021 |
${ECHO_MSG} "===> Returning to user credentials"; \ |
5023 |
${ECHO_MSG} "===> Returning to user credentials"; \ |
5022 |
else \ |
5024 |
else \ |
5023 |
${RM} ${OPTIONS_FILE}; \ |
5025 |
${RM} ${OPTIONS_FILE}; \ |
5024 |
${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ |
5026 |
${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ |
5025 |
fi |
5027 |
fi |
5026 |
.else |
5028 |
.else |
5027 |
@${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" |
5029 |
@${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" |
5028 |
.endif |
5030 |
.endif |
5029 |
.endif # rmconfig |
5031 |
.endif # rmconfig |
5030 |
|
5032 |
|
5031 |
.if !target(rmconfig-recursive) |
5033 |
.if !target(rmconfig-recursive) |
5032 |
rmconfig-recursive: |
5034 |
rmconfig-recursive: |
5033 |
@${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and its dependencies"; |
5035 |
@${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and its dependencies"; |
5034 |
@recursive_cmd="rmconfig"; \ |
5036 |
@recursive_cmd="rmconfig"; \ |
5035 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
5037 |
recursive_dirs="${.CURDIR} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ |
5036 |
${_FLAVOR_RECURSIVE_SH} |
5038 |
${_FLAVOR_RECURSIVE_SH} |
5037 |
.endif # rmconfig-recursive |
5039 |
.endif # rmconfig-recursive |
5038 |
|
5040 |
|
5039 |
.if !target(pretty-print-config) |
5041 |
.if !target(pretty-print-config) |
5040 |
MULTI_START= [ |
5042 |
MULTI_START= [ |
5041 |
MULTI_END= ] |
5043 |
MULTI_END= ] |
5042 |
GROUP_START= [ |
5044 |
GROUP_START= [ |
5043 |
GROUP_END= ] |
5045 |
GROUP_END= ] |
5044 |
SINGLE_START= ( |
5046 |
SINGLE_START= ( |
5045 |
SINGLE_END= ) |
5047 |
SINGLE_END= ) |
5046 |
RADIO_START= ( |
5048 |
RADIO_START= ( |
5047 |
RADIO_END= ) |
5049 |
RADIO_END= ) |
5048 |
pretty-print-config: |
5050 |
pretty-print-config: |
5049 |
.for opt in ${ALL_OPTIONS} |
5051 |
.for opt in ${ALL_OPTIONS} |
5050 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " |
5052 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " |
5051 |
.endfor |
5053 |
.endfor |
5052 |
.for otype in MULTI GROUP SINGLE RADIO |
5054 |
.for otype in MULTI GROUP SINGLE RADIO |
5053 |
. for m in ${OPTIONS_${otype}} |
5055 |
. for m in ${OPTIONS_${otype}} |
5054 |
@${ECHO_MSG} -n "${m}${${otype}_START} " |
5056 |
@${ECHO_MSG} -n "${m}${${otype}_START} " |
5055 |
. for opt in ${OPTIONS_${otype}_${m}} |
5057 |
. for opt in ${OPTIONS_${otype}_${m}} |
5056 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " |
5058 |
@[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " |
5057 |
. endfor |
5059 |
. endfor |
5058 |
@${ECHO_MSG} -n "${${otype}_END} " |
5060 |
@${ECHO_MSG} -n "${${otype}_END} " |
5059 |
. endfor |
5061 |
. endfor |
5060 |
.endfor |
5062 |
.endfor |
5061 |
.undef otype |
5063 |
.undef otype |
5062 |
.undef m |
5064 |
.undef m |
5063 |
.undef opt |
5065 |
.undef opt |
5064 |
@${ECHO_MSG} "" |
5066 |
@${ECHO_MSG} "" |
5065 |
.endif # pretty-print-config |
5067 |
.endif # pretty-print-config |
5066 |
|
5068 |
|
5067 |
desktop-categories: |
5069 |
desktop-categories: |
5068 |
@${SETENV} \ |
5070 |
@${SETENV} \ |
5069 |
dp_CATEGORIES="${CATEGORIES}" \ |
5071 |
dp_CATEGORIES="${CATEGORIES}" \ |
5070 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5072 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5071 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5073 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5072 |
dp_SORT="${SORT}" \ |
5074 |
dp_SORT="${SORT}" \ |
5073 |
dp_TR="${TR}" \ |
5075 |
dp_TR="${TR}" \ |
5074 |
${SH} ${SCRIPTSDIR}/desktop-categories.sh |
5076 |
${SH} ${SCRIPTSDIR}/desktop-categories.sh |
5075 |
|
5077 |
|
5076 |
.if defined(DESKTOP_ENTRIES) |
5078 |
.if defined(DESKTOP_ENTRIES) |
5077 |
check-desktop-entries: |
5079 |
check-desktop-entries: |
5078 |
@${SETENV} \ |
5080 |
@${SETENV} \ |
5079 |
dp_CURDIR="${.CURDIR}" \ |
5081 |
dp_CURDIR="${.CURDIR}" \ |
5080 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5082 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5081 |
dp_ECHO_MSG=${ECHO_MSG} \ |
5083 |
dp_ECHO_MSG=${ECHO_MSG} \ |
5082 |
dp_EXPR="${EXPR}" \ |
5084 |
dp_EXPR="${EXPR}" \ |
5083 |
dp_GREP="${GREP}" \ |
5085 |
dp_GREP="${GREP}" \ |
5084 |
dp_MAKE="${MAKE}" \ |
5086 |
dp_MAKE="${MAKE}" \ |
5085 |
dp_PKGNAME="${PKGNAME}" \ |
5087 |
dp_PKGNAME="${PKGNAME}" \ |
5086 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5088 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5087 |
dp_SED="${SED}" \ |
5089 |
dp_SED="${SED}" \ |
5088 |
dp_VALID_DESKTOP_CATEGORIES="${VALID_DESKTOP_CATEGORIES}" \ |
5090 |
dp_VALID_DESKTOP_CATEGORIES="${VALID_DESKTOP_CATEGORIES}" \ |
5089 |
dp_TR="${TR}" \ |
5091 |
dp_TR="${TR}" \ |
5090 |
${SH} ${SCRIPTSDIR}/check-desktop-entries.sh ${DESKTOP_ENTRIES} |
5092 |
${SH} ${SCRIPTSDIR}/check-desktop-entries.sh ${DESKTOP_ENTRIES} |
5091 |
.endif |
5093 |
.endif |
5092 |
|
5094 |
|
5093 |
.if !target(install-desktop-entries) |
5095 |
.if !target(install-desktop-entries) |
5094 |
.if defined(DESKTOP_ENTRIES) |
5096 |
.if defined(DESKTOP_ENTRIES) |
5095 |
install-desktop-entries: |
5097 |
install-desktop-entries: |
5096 |
@${SETENV} \ |
5098 |
@${SETENV} \ |
5097 |
dp_CURDIR="${.CURDIR}" \ |
5099 |
dp_CURDIR="${.CURDIR}" \ |
5098 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5100 |
dp_ECHO_CMD=${ECHO_CMD} \ |
5099 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5101 |
dp_SCRIPTSDIR="${SCRIPTSDIR}" \ |
5100 |
dp_STAGEDIR="${STAGEDIR}" \ |
5102 |
dp_STAGEDIR="${STAGEDIR}" \ |
5101 |
dp_DESKTOPDIR="${DESKTOPDIR}" \ |
5103 |
dp_DESKTOPDIR="${DESKTOPDIR}" \ |
5102 |
dp_TMPPLIST="${TMPPLIST}" \ |
5104 |
dp_TMPPLIST="${TMPPLIST}" \ |
5103 |
dp_MAKE="${MAKE}" \ |
5105 |
dp_MAKE="${MAKE}" \ |
5104 |
dp_SED="${SED}" \ |
5106 |
dp_SED="${SED}" \ |
5105 |
${SH} ${SCRIPTSDIR}/install-desktop-entries.sh ${DESKTOP_ENTRIES} |
5107 |
${SH} ${SCRIPTSDIR}/install-desktop-entries.sh ${DESKTOP_ENTRIES} |
5106 |
.endif |
5108 |
.endif |
5107 |
.endif |
5109 |
.endif |
5108 |
|
5110 |
|
5109 |
.if !empty(BINARY_ALIAS) |
5111 |
.if !empty(BINARY_ALIAS) |
5110 |
.if !target(create-binary-alias) |
5112 |
.if !target(create-binary-alias) |
5111 |
create-binary-alias: ${BINARY_LINKDIR} |
5113 |
create-binary-alias: ${BINARY_LINKDIR} |
5112 |
.for target src in ${BINARY_ALIAS:C/=/ /} |
5114 |
.for target src in ${BINARY_ALIAS:C/=/ /} |
5113 |
@${RLN} `which ${src}` ${BINARY_LINKDIR}/${target} |
5115 |
@${RLN} `which ${src}` ${BINARY_LINKDIR}/${target} |
5114 |
.endfor |
5116 |
.endfor |
5115 |
.endif |
5117 |
.endif |
5116 |
.endif |
5118 |
.endif |
5117 |
|
5119 |
|
5118 |
.if defined(WARNING) |
5120 |
.if defined(WARNING) |
5119 |
WARNING_WAIT?= 10 |
5121 |
WARNING_WAIT?= 10 |
5120 |
show-warnings: |
5122 |
show-warnings: |
5121 |
@${ECHO_MSG} "/!\\ WARNING /!\\" |
5123 |
@${ECHO_MSG} "/!\\ WARNING /!\\" |
5122 |
@${ECHO_MSG} |
5124 |
@${ECHO_MSG} |
5123 |
.for m in ${WARNING} |
5125 |
.for m in ${WARNING} |
5124 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5126 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5125 |
@${ECHO_MSG} |
5127 |
@${ECHO_MSG} |
5126 |
.endfor |
5128 |
.endfor |
5127 |
@sleep ${WARNING_WAIT} |
5129 |
@sleep ${WARNING_WAIT} |
5128 |
.endif |
5130 |
.endif |
5129 |
|
5131 |
|
5130 |
.if defined(ERROR) |
5132 |
.if defined(ERROR) |
5131 |
show-errors: |
5133 |
show-errors: |
5132 |
@${ECHO_MSG} "/!\\ ERRORS /!\\" |
5134 |
@${ECHO_MSG} "/!\\ ERRORS /!\\" |
5133 |
@${ECHO_MSG} |
5135 |
@${ECHO_MSG} |
5134 |
.for m in ${ERROR} |
5136 |
.for m in ${ERROR} |
5135 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5137 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5136 |
@${ECHO_MSG} |
5138 |
@${ECHO_MSG} |
5137 |
.endfor |
5139 |
.endfor |
5138 |
@${FALSE} |
5140 |
@${FALSE} |
5139 |
.endif |
5141 |
.endif |
5140 |
|
5142 |
|
5141 |
.if defined(DEVELOPER) |
5143 |
.if defined(DEVELOPER) |
5142 |
.if defined(DEV_WARNING) |
5144 |
.if defined(DEV_WARNING) |
5143 |
DEV_WARNING_WAIT?= 10 |
5145 |
DEV_WARNING_WAIT?= 10 |
5144 |
show-dev-warnings: |
5146 |
show-dev-warnings: |
5145 |
@${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile warnings, please consider fixing /!\\" |
5147 |
@${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile warnings, please consider fixing /!\\" |
5146 |
@${ECHO_MSG} |
5148 |
@${ECHO_MSG} |
5147 |
.for m in ${DEV_WARNING} |
5149 |
.for m in ${DEV_WARNING} |
5148 |
@${ECHO_MSG} ${m} | ${FMT_80} |
5150 |
@${ECHO_MSG} ${m} | ${FMT_80} |
5149 |
@${ECHO_MSG} |
5151 |
@${ECHO_MSG} |
5150 |
.endfor |
5152 |
.endfor |
5151 |
.if defined(DEV_WARNING_FATAL) |
5153 |
.if defined(DEV_WARNING_FATAL) |
5152 |
@${FALSE} |
5154 |
@${FALSE} |
5153 |
.else |
5155 |
.else |
5154 |
@sleep ${DEV_WARNING_WAIT} |
5156 |
@sleep ${DEV_WARNING_WAIT} |
5155 |
.endif |
5157 |
.endif |
5156 |
.endif |
5158 |
.endif |
5157 |
|
5159 |
|
5158 |
.if defined(DEV_ERROR) |
5160 |
.if defined(DEV_ERROR) |
5159 |
show-dev-errors: |
5161 |
show-dev-errors: |
5160 |
@${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" |
5162 |
@${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" |
5161 |
@${ECHO_MSG} |
5163 |
@${ECHO_MSG} |
5162 |
.for m in ${DEV_ERROR} |
5164 |
.for m in ${DEV_ERROR} |
5163 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5165 |
@${ECHO_MSG} "${m}" | ${FMT_80} |
5164 |
@${ECHO_MSG} |
5166 |
@${ECHO_MSG} |
5165 |
.endfor |
5167 |
.endfor |
5166 |
@${FALSE} |
5168 |
@${FALSE} |
5167 |
.endif |
5169 |
.endif |
5168 |
.endif #DEVELOPER |
5170 |
.endif #DEVELOPER |
5169 |
|
5171 |
|
5170 |
${_PORTS_DIRECTORIES}: |
5172 |
${_PORTS_DIRECTORIES}: |
5171 |
@${MKDIR} ${.TARGET} |
5173 |
@${MKDIR} ${.TARGET} |
5172 |
|
5174 |
|
5173 |
# Please note that the order of the following targets is important, and |
5175 |
# Please note that the order of the following targets is important, and |
5174 |
# should not be modified. |
5176 |
# should not be modified. |
5175 |
|
5177 |
|
5176 |
_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PACKAGE STAGE |
5178 |
_TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PACKAGE STAGE |
5177 |
|
5179 |
|
5178 |
# Define the SEQ of actions to take when each target is ran, and which targets |
5180 |
# Define the SEQ of actions to take when each target is ran, and which targets |
5179 |
# it depends on before running its SEQ. |
5181 |
# it depends on before running its SEQ. |
5180 |
# |
5182 |
# |
5181 |
# Main target has a priority of 500, pre-target 300, post-target 700, |
5183 |
# Main target has a priority of 500, pre-target 300, post-target 700, |
5182 |
# target-depends 150. Other targets are spaced in between those |
5184 |
# target-depends 150. Other targets are spaced in between those |
5183 |
# |
5185 |
# |
5184 |
# If you change the pre-foo and post-foo values here, go and keep them in sync |
5186 |
# If you change the pre-foo and post-foo values here, go and keep them in sync |
5185 |
# in _OPTIONS_TARGETS in bsd.options.mk |
5187 |
# in _OPTIONS_TARGETS in bsd.options.mk |
5186 |
|
5188 |
|
5187 |
_SANITY_SEQ= 050:post-chroot 100:pre-everything \ |
5189 |
_SANITY_SEQ= 050:post-chroot 100:pre-everything \ |
5188 |
125:show-unsupported-system-error 150:check-makefile \ |
5190 |
125:show-unsupported-system-error 150:check-makefile \ |
5189 |
190:show-errors 200:show-warnings \ |
5191 |
190:show-errors 200:show-warnings \ |
5190 |
210:show-dev-errors 220:show-dev-warnings \ |
5192 |
210:show-dev-errors 220:show-dev-warnings \ |
5191 |
250:check-categories 300:check-makevars \ |
5193 |
250:check-categories 300:check-makevars \ |
5192 |
350:check-desktop-entries 400:check-depends \ |
5194 |
350:check-desktop-entries 400:check-depends \ |
5193 |
450:identify-install-conflicts 500:check-deprecated \ |
5195 |
450:identify-install-conflicts 500:check-deprecated \ |
5194 |
550:check-vulnerable 600:check-license 650:check-config \ |
5196 |
550:check-vulnerable 600:check-license 650:check-config \ |
5195 |
700:buildanyway-message 750:options-message ${_USES_sanity} |
5197 |
700:buildanyway-message 750:options-message ${_USES_sanity} |
5196 |
|
5198 |
|
5197 |
_PKG_DEP= check-sanity |
5199 |
_PKG_DEP= check-sanity |
5198 |
_PKG_SEQ= 500:pkg-depends |
5200 |
_PKG_SEQ= 500:pkg-depends |
5199 |
_FETCH_DEP= pkg |
5201 |
_FETCH_DEP= pkg |
5200 |
_FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ |
5202 |
_FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ |
5201 |
500:do-fetch 550:fetch-specials 700:post-fetch \ |
5203 |
500:do-fetch 550:fetch-specials 700:post-fetch \ |
5202 |
850:post-fetch-script \ |
5204 |
850:post-fetch-script \ |
5203 |
${_OPTIONS_fetch} ${_USES_fetch} |
5205 |
${_OPTIONS_fetch} ${_USES_fetch} |
5204 |
_EXTRACT_DEP= fetch |
5206 |
_EXTRACT_DEP= fetch |
5205 |
_EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ |
5207 |
_EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ |
5206 |
150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ |
5208 |
150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ |
5207 |
300:pre-extract 450:pre-extract-script 500:do-extract \ |
5209 |
300:pre-extract 450:pre-extract-script 500:do-extract \ |
5208 |
700:post-extract 850:post-extract-script \ |
5210 |
700:post-extract 850:post-extract-script \ |
5209 |
999:extract-fixup-modes \ |
5211 |
999:extract-fixup-modes \ |
5210 |
${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} |
5212 |
${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} |
5211 |
_PATCH_DEP= extract |
5213 |
_PATCH_DEP= extract |
5212 |
_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ |
5214 |
_PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ |
5213 |
300:pre-patch 450:pre-patch-script 500:do-patch \ |
5215 |
300:pre-patch 450:pre-patch-script 500:do-patch \ |
5214 |
700:post-patch 850:post-patch-script \ |
5216 |
700:post-patch 850:post-patch-script \ |
5215 |
${_OPTIONS_patch} ${_USES_patch} |
5217 |
${_OPTIONS_patch} ${_USES_patch} |
5216 |
_CONFIGURE_DEP= patch |
5218 |
_CONFIGURE_DEP= patch |
5217 |
_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ |
5219 |
_CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ |
5218 |
200:configure-message \ |
5220 |
200:configure-message \ |
5219 |
300:pre-configure 450:pre-configure-script \ |
5221 |
300:pre-configure 450:pre-configure-script \ |
5220 |
490:run-autotools-fixup 500:do-configure 700:post-configure \ |
5222 |
490:run-autotools-fixup 500:do-configure 700:post-configure \ |
5221 |
850:post-configure-script \ |
5223 |
850:post-configure-script \ |
5222 |
${_OPTIONS_configure} ${_USES_configure} |
5224 |
${_OPTIONS_configure} ${_USES_configure} |
5223 |
_BUILD_DEP= configure |
5225 |
_BUILD_DEP= configure |
5224 |
_BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ |
5226 |
_BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ |
5225 |
500:do-build 700:post-build 850:post-build-script \ |
5227 |
500:do-build 700:post-build 850:post-build-script \ |
5226 |
${_OPTIONS_build} ${_USES_build} |
5228 |
${_OPTIONS_build} ${_USES_build} |
5227 |
_STAGE_DEP= build |
5229 |
_STAGE_DEP= build |
5228 |
# STAGE is special in its numbering as it has install and stage, so install is |
5230 |
# STAGE is special in its numbering as it has install and stage, so install is |
5229 |
# the main, and stage goes after. |
5231 |
# the main, and stage goes after. |
5230 |
_STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ |
5232 |
_STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ |
5231 |
200:apply-slist 300:pre-install \ |
5233 |
200:apply-slist 300:pre-install \ |
5232 |
400:generate-plist 450:pre-su-install 475:create-users-groups \ |
5234 |
400:generate-plist 450:pre-su-install 475:create-users-groups \ |
5233 |
500:do-install 550:kmod-post-install 600:fixup-lib-pkgconfig 700:post-install \ |
5235 |
500:do-install 550:kmod-post-install 600:fixup-lib-pkgconfig 700:post-install \ |
5234 |
750:post-install-script 800:post-stage 850:compress-man \ |
5236 |
750:post-install-script 800:post-stage 850:compress-man \ |
5235 |
860:install-rc-script 870:install-ldconfig-file \ |
5237 |
860:install-rc-script 870:install-ldconfig-file \ |
5236 |
880:install-license 890:install-desktop-entries \ |
5238 |
880:install-license 890:install-desktop-entries \ |
5237 |
900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ |
5239 |
900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ |
5238 |
930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ |
5240 |
930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ |
5239 |
${_OPTIONS_install} ${_USES_install} \ |
5241 |
${_OPTIONS_install} ${_USES_install} \ |
5240 |
${_OPTIONS_stage} ${_USES_stage} |
5242 |
${_OPTIONS_stage} ${_USES_stage} |
5241 |
.if defined(DEVELOPER) |
5243 |
.if defined(DEVELOPER) |
5242 |
_STAGE_SEQ+= 995:stage-qa |
5244 |
_STAGE_SEQ+= 995:stage-qa |
5243 |
.else |
5245 |
.else |
5244 |
stage-qa: stage |
5246 |
stage-qa: stage |
5245 |
.endif |
5247 |
.endif |
5246 |
_TEST_DEP= stage |
5248 |
_TEST_DEP= stage |
5247 |
_TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ |
5249 |
_TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ |
5248 |
800:post-test \ |
5250 |
800:post-test \ |
5249 |
${_OPTIONS_test} ${_USES_test} |
5251 |
${_OPTIONS_test} ${_USES_test} |
5250 |
_INSTALL_DEP= stage |
5252 |
_INSTALL_DEP= stage |
5251 |
_INSTALL_SEQ= 100:install-message \ |
5253 |
_INSTALL_SEQ= 100:install-message \ |
5252 |
200:check-already-installed \ |
5254 |
200:check-already-installed \ |
5253 |
300:create-manifest |
5255 |
300:create-manifest |
5254 |
_INSTALL_SUSEQ= 400:fake-pkg 500:security-check |
5256 |
_INSTALL_SUSEQ= 400:fake-pkg 500:security-check |
5255 |
|
5257 |
|
5256 |
_PACKAGE_DEP= stage |
5258 |
_PACKAGE_DEP= stage |
5257 |
_PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ |
5259 |
_PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ |
5258 |
500:do-package 850:post-package-script \ |
5260 |
500:do-package 850:post-package-script \ |
5259 |
${_OPTIONS_package} ${_USES_package} |
5261 |
${_OPTIONS_package} ${_USES_package} |
5260 |
|
5262 |
|
5261 |
# Enforce order for -jN builds |
5263 |
# Enforce order for -jN builds |
5262 |
.for _t in ${_TARGETS_STAGES} |
5264 |
.for _t in ${_TARGETS_STAGES} |
5263 |
# Check if the port need to change the default order of some targets... |
5265 |
# Check if the port need to change the default order of some targets... |
5264 |
. if defined(TARGET_ORDER_OVERRIDE) |
5266 |
. if defined(TARGET_ORDER_OVERRIDE) |
5265 |
_tmp_seq:= |
5267 |
_tmp_seq:= |
5266 |
. for _entry in ${_${_t}_SEQ} |
5268 |
. for _entry in ${_${_t}_SEQ} |
5267 |
# for _target because :M${_target} does not work with fmake |
5269 |
# for _target because :M${_target} does not work with fmake |
5268 |
. for _target in ${_entry:C/^[0-9]+://} |
5270 |
. for _target in ${_entry:C/^[0-9]+://} |
5269 |
. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} |
5271 |
. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} |
5270 |
_tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} |
5272 |
_tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} |
5271 |
. else |
5273 |
. else |
5272 |
_tmp_seq:= ${_tmp_seq} ${_entry} |
5274 |
_tmp_seq:= ${_tmp_seq} ${_entry} |
5273 |
. endif |
5275 |
. endif |
5274 |
. endfor |
5276 |
. endfor |
5275 |
. endfor |
5277 |
. endfor |
5276 |
_${_t}_SEQ:= ${_tmp_seq} |
5278 |
_${_t}_SEQ:= ${_tmp_seq} |
5277 |
. endif |
5279 |
. endif |
5278 |
. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} |
5280 |
. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} |
5279 |
. if target(${s}) |
5281 |
. if target(${s}) |
5280 |
. if ! ${NOTPHONY:M${s}} |
5282 |
. if ! ${NOTPHONY:M${s}} |
5281 |
_PHONY_TARGETS+= ${s} |
5283 |
_PHONY_TARGETS+= ${s} |
5282 |
. endif |
5284 |
. endif |
5283 |
_${_t}_REAL_SEQ+= ${s} |
5285 |
_${_t}_REAL_SEQ+= ${s} |
5284 |
. endif |
5286 |
. endif |
5285 |
. endfor |
5287 |
. endfor |
5286 |
. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} |
5288 |
. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} |
5287 |
. if target(${s}) |
5289 |
. if target(${s}) |
5288 |
. if ! ${NOTPHONY:M${s}} |
5290 |
. if ! ${NOTPHONY:M${s}} |
5289 |
_PHONY_TARGETS+= ${s} |
5291 |
_PHONY_TARGETS+= ${s} |
5290 |
. endif |
5292 |
. endif |
5291 |
_${_t}_REAL_SUSEQ+= ${s} |
5293 |
_${_t}_REAL_SUSEQ+= ${s} |
5292 |
. endif |
5294 |
. endif |
5293 |
. endfor |
5295 |
. endfor |
5294 |
.ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} |
5296 |
.ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} |
5295 |
.endfor |
5297 |
.endfor |
5296 |
|
5298 |
|
5297 |
# Define all of the main targets which depend on a sequence of other targets. |
5299 |
# Define all of the main targets which depend on a sequence of other targets. |
5298 |
# See above *_SEQ and *_DEP. The _DEP will run before this defined target is |
5300 |
# See above *_SEQ and *_DEP. The _DEP will run before this defined target is |
5299 |
# ran. The _SEQ will run as this target once _DEP is satisfied. |
5301 |
# ran. The _SEQ will run as this target once _DEP is satisfied. |
5300 |
|
5302 |
|
5301 |
.for target in extract patch configure build stage install package |
5303 |
.for target in extract patch configure build stage install package |
5302 |
|
5304 |
|
5303 |
# Check if config dialog needs to show and execute it if needed. If is it not |
5305 |
# Check if config dialog needs to show and execute it if needed. If is it not |
5304 |
# needed (_OPTIONS_OK), then just depend on the cookie which is defined later |
5306 |
# needed (_OPTIONS_OK), then just depend on the cookie which is defined later |
5305 |
# to depend on the *_DEP and execute the *_SEQ. |
5307 |
# to depend on the *_DEP and execute the *_SEQ. |
5306 |
# If options are required, execute config-conditional and then re-execute the |
5308 |
# If options are required, execute config-conditional and then re-execute the |
5307 |
# target noting that config is no longer needed. |
5309 |
# target noting that config is no longer needed. |
5308 |
.if !target(${target}) && defined(_OPTIONS_OK) |
5310 |
.if !target(${target}) && defined(_OPTIONS_OK) |
5309 |
_PHONY_TARGETS+= ${target} |
5311 |
_PHONY_TARGETS+= ${target} |
5310 |
${target}: ${${target:tu}_COOKIE} |
5312 |
${target}: ${${target:tu}_COOKIE} |
5311 |
.elif !target(${target}) |
5313 |
.elif !target(${target}) |
5312 |
${target}: config-conditional |
5314 |
${target}: config-conditional |
5313 |
@cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} |
5315 |
@cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} |
5314 |
.elif target(${target}) && defined(IGNORE) |
5316 |
.elif target(${target}) && defined(IGNORE) |
5315 |
.endif |
5317 |
.endif |
5316 |
|
5318 |
|
5317 |
.if !exists(${${target:tu}_COOKIE}) |
5319 |
.if !exists(${${target:tu}_COOKIE}) |
5318 |
|
5320 |
|
5319 |
# Define the real target behavior. Depend on the target's *_DEP. Execute |
5321 |
# Define the real target behavior. Depend on the target's *_DEP. Execute |
5320 |
# the target's *_SEQ. Also handle su and USE_SUBMAKE needs. |
5322 |
# the target's *_SEQ. Also handle su and USE_SUBMAKE needs. |
5321 |
.if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) |
5323 |
.if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) |
5322 |
. if defined(USE_SUBMAKE) |
5324 |
. if defined(USE_SUBMAKE) |
5323 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} |
5325 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} |
5324 |
@cd ${.CURDIR} && ${MAKE} ${_${target:tu}_REAL_SEQ} |
5326 |
@cd ${.CURDIR} && ${MAKE} ${_${target:tu}_REAL_SEQ} |
5325 |
. else # !USE_SUBMAKE |
5327 |
. else # !USE_SUBMAKE |
5326 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} |
5328 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} |
5327 |
. endif # USE_SUBMAKE |
5329 |
. endif # USE_SUBMAKE |
5328 |
@${ECHO_MSG} "===> Switching to root credentials for '${target}' target" |
5330 |
@${ECHO_MSG} "===> Switching to root credentials for '${target}' target" |
5329 |
@cd ${.CURDIR} && \ |
5331 |
@cd ${.CURDIR} && \ |
5330 |
${SU_CMD} "${MAKE} ${_${target:tu}_REAL_SUSEQ}" |
5332 |
${SU_CMD} "${MAKE} ${_${target:tu}_REAL_SUSEQ}" |
5331 |
@${ECHO_MSG} "===> Returning to user credentials" |
5333 |
@${ECHO_MSG} "===> Returning to user credentials" |
5332 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5334 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5333 |
.else # No SU needed |
5335 |
.else # No SU needed |
5334 |
. if defined(USE_SUBMAKE) |
5336 |
. if defined(USE_SUBMAKE) |
5335 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} |
5337 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} |
5336 |
@cd ${.CURDIR} && \ |
5338 |
@cd ${.CURDIR} && \ |
5337 |
${MAKE} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} |
5339 |
${MAKE} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} |
5338 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5340 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5339 |
. else # !USE_SUBMAKE |
5341 |
. else # !USE_SUBMAKE |
5340 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} |
5342 |
${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} |
5341 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5343 |
@${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |
5342 |
. endif # USE_SUBMAKE |
5344 |
. endif # USE_SUBMAKE |
5343 |
.endif # SU needed |
5345 |
.endif # SU needed |
5344 |
|
5346 |
|
5345 |
.else # exists(cookie) |
5347 |
.else # exists(cookie) |
5346 |
${${target:tu}_COOKIE}:: |
5348 |
${${target:tu}_COOKIE}:: |
5347 |
@if [ ! -e ${.TARGET} ]; then \ |
5349 |
@if [ ! -e ${.TARGET} ]; then \ |
5348 |
cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ |
5350 |
cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ |
5349 |
fi |
5351 |
fi |
5350 |
.endif # !exists(cookie) |
5352 |
.endif # !exists(cookie) |
5351 |
|
5353 |
|
5352 |
.endfor # foreach(targets) |
5354 |
.endfor # foreach(targets) |
5353 |
|
5355 |
|
5354 |
.PHONY: ${_PHONY_TARGETS} check-sanity fetch pkg |
5356 |
.PHONY: ${_PHONY_TARGETS} check-sanity fetch pkg |
5355 |
|
5357 |
|
5356 |
.if !target(check-sanity) |
5358 |
.if !target(check-sanity) |
5357 |
check-sanity: ${_SANITY_REAL_SEQ} |
5359 |
check-sanity: ${_SANITY_REAL_SEQ} |
5358 |
.endif |
5360 |
.endif |
5359 |
|
5361 |
|
5360 |
.if !target(fetch) |
5362 |
.if !target(fetch) |
5361 |
fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} |
5363 |
fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} |
5362 |
.endif |
5364 |
.endif |
5363 |
|
5365 |
|
5364 |
.if !target(pkg) |
5366 |
.if !target(pkg) |
5365 |
pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} |
5367 |
pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} |
5366 |
.endif |
5368 |
.endif |
5367 |
|
5369 |
|
5368 |
.if !target(test) |
5370 |
.if !target(test) |
5369 |
test: ${_TEST_DEP} |
5371 |
test: ${_TEST_DEP} |
5370 |
.if !defined(NO_TEST) |
5372 |
.if !defined(NO_TEST) |
5371 |
test: ${_TEST_REAL_SEQ} |
5373 |
test: ${_TEST_REAL_SEQ} |
5372 |
.endif |
5374 |
.endif |
5373 |
.endif |
5375 |
.endif |
5374 |
|
5376 |
|
5375 |
.endif |
5377 |
.endif |
5376 |
# End of post-makefile section. |
5378 |
# End of post-makefile section. |
5377 |
|
5379 |
|
5378 |
.endif |
5380 |
.endif |
5379 |
# End of the DESTDIR if statement |
5381 |
# End of the DESTDIR if statement |