View | Details | Raw Unified | Return to bug 152804 | Differences between
and this patch

Collapse All | Expand All

(-)bsd.port.mk (+96 lines)
Lines 222-227 Link Here
222
#				- Set this instead of ONLY_FOR_ARCHS if the given port
222
#				- Set this instead of ONLY_FOR_ARCHS if the given port
223
#				  fetches and installs compiled i386 binaries.
223
#				  fetches and installs compiled i386 binaries.
224
#
224
#
225
# ONLY_FOR_OSVER
226
#				- A space-separated list of OS versions the port can be built on.
227
#				  An OS version may be :
228
#				   - a single value (e.g. 700000),
229
#				   - a lower limit (e.g. 700000+),
230
#				   - a higher limit (e.g. 800000-),
231
#				   - a range (e.g. 700000-800000).
232
# ONLY_FOR_OSVER_REASON
233
#				- Reason why it's only for ${ONLY_FOR_OSVER}
234
#
225
# Dependency checking.  Use these if your port requires another port
235
# Dependency checking.  Use these if your port requires another port
226
# not in the list below.  (Default: empty.)
236
# not in the list below.  (Default: empty.)
227
#
237
#
Lines 295-300 Link Here
295
#                         passed to the compiler by setting DEBUG_FLAGS. It is
305
#                         passed to the compiler by setting DEBUG_FLAGS. It is
296
#                         set to "-g" at default.
306
#                         set to "-g" at default.
297
#
307
#
308
##
309
# USE_SRC		- If set, this port needs kernel sources to build.
310
#				  If set to "yes", presence of ${SRC_BASE}/sys/Makefile
311
#				  is checked. If set to a space-separated list of files,
312
#				  presence of those files under ${SRC_BASE}/ is checked.
313
##
298
# USE_BZIP2		- If set, this port tarballs use bzip2, not gzip, for
314
# USE_BZIP2		- If set, this port tarballs use bzip2, not gzip, for
299
#				  compression.
315
#				  compression.
300
# USE_XZ		- If set, this port tarballs use xz (or lzma)
316
# USE_XZ		- If set, this port tarballs use xz (or lzma)
Lines 1361-1366 Link Here
1361
WWWDIR?=		${PREFIX}/www/${PORTNAME}
1377
WWWDIR?=		${PREFIX}/www/${PORTNAME}
1362
ETCDIR?=		${PREFIX}/etc/${PORTNAME}
1378
ETCDIR?=		${PREFIX}/etc/${PORTNAME}
1363
1379
1380
.if defined(USE_SRC)
1381
. if exists(${SRC_BASE}/sys/sys/param.h)
1382
_SRC_OSVERSION!=	${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h
1383
.  if ${OSVERSION} != ${_SRC_OSVERSION}
1384
IGNORE=	requires source files for OS version ${OSVERSION}
1385
.  endif
1386
. endif
1387
1388
. if !defined(${IGNORE})
1389
.  if ${USE_SRC:L} == "yes"
1390
_SRC_CHECK_FILES=	sys/Makefile
1391
.  else
1392
_SRC_CHECK_FILES=	${USE_SRC}
1393
.  endif
1394
1395
.  for file in ${_SRC_CHECK_FILES}
1396
.   if !defined(${IGNORE}) && !exists(${SRC_BASE}/${file})
1397
IGNORE=	requires kernel source files
1398
.   endif
1399
.  endfor
1400
. endif
1401
.endif # defined(USE_SRC)
1402
1364
.if defined(USE_LINUX_RPM)
1403
.if defined(USE_LINUX_RPM)
1365
.include "${PORTSDIR}/Mk/bsd.linux-rpm.mk"
1404
.include "${PORTSDIR}/Mk/bsd.linux-rpm.mk"
1366
.endif
1405
.endif
Lines 3162-3167 Link Here
3162
3201
3163
.endif
3202
.endif
3164
3203
3204
# Check for OS version compatibility
3205
.if defined(ONLY_FOR_OSVER)
3206
3207
# Sanity check
3208
_ONLY_FOR_OSVER_CHECK:=	${ONLY_FOR_OSVER:C/^[[:digit:]]+((-[[:digit:]]+)|[-+])?$//}
3209
3210
. if (${_ONLY_FOR_OSVER_CHECK}x != "x")
3211
IGNORE=    invalid value specified for ONLY_FOR_OSVER: ${_ONLY_FOR_OSVER_CHECK}
3212
. else
3213
_ONLY_FOR_OSVER_IGNORE=	requires FreeBSD ${ONLY_FOR_OSVER}
3214
3215
.  for version in ${ONLY_FOR_OSVER}
3216
_ONLY_FOR_OSVER:=	${version:C/\+$//}
3217
.   if ${_ONLY_FOR_OSVER} != "${version}"
3218
#  OSVERSION+ provided
3219
_ONLY_FOR_MIN_OSVER:=	${_ONLY_FOR_OSVER}
3220
.   else
3221
_ONLY_FOR_OSVER:=	${version:C/-$//}
3222
.    if ${_ONLY_FOR_OSVER} != "${version}"
3223
#   OSVERSION- provided
3224
_ONLY_FOR_MAX_OSVER:=	${_ONLY_FOR_OSVER}
3225
.    else
3226
_ONLY_FOR_OSVER:=	${version:C/-//}
3227
.     if ${_ONLY_FOR_OSVER} != "${version}"
3228
#    OSVERSION-OSVERSION range provided
3229
_ONLY_FOR_MIN_OSVER:=	${version:C/-.*$//}
3230
_ONLY_FOR_MAX_OSVER:=	${version:C/^.*-//}
3231
.     else
3232
#    single OSVERSION provided
3233
_ONLY_FOR_MIN_OSVER:=	${version}
3234
_ONLY_FOR_MAX_OSVER:=	${version}
3235
.     endif
3236
.    endif
3237
.   endif
3238
3239
# Check OSVERSION against current requirements, one success is enough to continue
3240
.   if (!defined(_ONLY_FOR_MAX_OSVER) && (${OSVERSION} >= ${_ONLY_FOR_MIN_OSVER})) || \
3241
       (!defined(_ONLY_FOR_MIN_OSVER) && (${OSVERSION} <= ${_ONLY_FOR_MAX_OSVER})) || \
3242
       (defined(_ONLY_FOR_MIN_OSVER) && defined(_ONLY_FOR_MAX_OSVER) && \
3243
         (${OSVERSION} >= ${_ONLY_FOR_MIN_OSVER}) && (${OSVERSION} <= ${_ONLY_FOR_MAX_OSVER}))
3244
.    undef _ONLY_FOR_OSVER_IGNORE
3245
.   endif
3246
3247
.   undef _ONLY_FOR_OSVER
3248
.   undef _ONLY_FOR_MIN_OSVER
3249
.   undef _ONLY_FOR_MAX_OSVER
3250
.  endfor
3251
3252
.  if defined(_ONLY_FOR_OSVER_IGNORE)
3253
IGNORE=	${_ONLY_FOR_OSVER_IGNORE}
3254
.   if defined(ONLY_FOR_OSVER_REASON)
3255
IGNORE+= (${ONLY_FOR_OSVER_REASON})
3256
.   endif
3257
.  endif
3258
. endif
3259
.endif # defined(ONLY_FOR_OSVER)
3260
3165
# Check the user interaction and legal issues
3261
# Check the user interaction and legal issues
3166
.if !defined(NO_IGNORE)
3262
.if !defined(NO_IGNORE)
3167
.if (defined(IS_INTERACTIVE) && defined(BATCH))
3263
.if (defined(IS_INTERACTIVE) && defined(BATCH))

Return to bug 152804