2007-01-01 16:39:29 +00:00
|
|
|
# bsd.wx.mk - Support for wxWidgets based ports.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
#
|
2007-01-01 16:39:29 +00:00
|
|
|
# The following variables can be defined in a port that uses the wxWidgets
|
|
|
|
# library, contributed libraries, WxPython and/or more wxWidgets related
|
2006-07-05 02:13:12 +00:00
|
|
|
# components (with run and/or build dependencies). It can be used after and/or
|
|
|
|
# before bsd.port.pre.mk, but Python components will only work if Python
|
|
|
|
# variables (e.g. USE_PYTHON) are defined before it (this is a bsd.python.mk
|
2006-11-13 21:15:38 +00:00
|
|
|
# limitation), at least it is manually included.
|
2019-02-27 12:06:57 +00:00
|
|
|
#
|
2014-06-18 09:41:25 +00:00
|
|
|
# USE_WX - Set to the list of wxWidgets versions that can be used by
|
|
|
|
# the port. The syntax allows the following elements:
|
|
|
|
# - Single version (e.g. "3.0").
|
2022-12-31 02:56:12 +00:00
|
|
|
# - Range of versions (e.g. "3.0-3.2"). Must be ascending.
|
|
|
|
# - Partial range: single version and upper (e.g. "3.2+").
|
|
|
|
# - Partial range: single version and lower (e.g. "-3.2").
|
2014-06-18 09:41:25 +00:00
|
|
|
# Multiple elements can be specified separated by spaces.
|
2007-01-01 16:39:29 +00:00
|
|
|
# USE_WX_NOT - Set to the list of wxWidgets versions that can't be used by
|
2014-06-18 09:41:25 +00:00
|
|
|
# the port. In other words, it removes some versions from
|
|
|
|
# USE_WX. If the latter is not defined, it will have the value
|
|
|
|
# of all the possible versions. The syntax is like USE_WX.
|
|
|
|
# WX_COMPS - Set to the list of wxWidgets components the port uses.
|
|
|
|
# Several components can be specified separated by spaces. By
|
|
|
|
# default it will have the value of "wx". Suffixes in the form
|
|
|
|
# ":xxx" may be added to the components to determine the
|
|
|
|
# dependency type.
|
|
|
|
# The available components are:
|
|
|
|
# wx - The wxWidgets library.
|
|
|
|
# python - The wxWidgets API for Python.
|
|
|
|
# The available dependency types are:
|
|
|
|
# build - Requires component for building.
|
|
|
|
# lib - Requires component for building and running.
|
|
|
|
# run - Requires component for running.
|
|
|
|
# If no suffix is present then "run" will be used for "python"
|
|
|
|
# and "lib" for others.
|
2006-07-05 02:13:12 +00:00
|
|
|
# WX_CONF_ARGS - Set to "absolute" or "relative" if the port needs configure
|
2014-06-18 09:41:25 +00:00
|
|
|
# arguments in addition to the WX_CONFIG environment variable.
|
|
|
|
# It determines the type of parameters that have to be passed
|
|
|
|
# to the configure script. In the first case it adds
|
|
|
|
# "--with-wx-config=${WX_CONFIG}" (absolute path of
|
|
|
|
# WX_CONFIG), and in second one "--with-wx=${LOCALBASE}" plus
|
|
|
|
# "--with-wx-config=${WX_CONFIG:T} (prefix and name).
|
|
|
|
# WX_PREMK - Define to determine version and define WX_CONFIG/WX_VERSION
|
2019-02-27 12:06:57 +00:00
|
|
|
# after <bsd.port.pre.mk> (in case the port needs to manually
|
|
|
|
# run the script).
|
2014-06-18 09:41:25 +00:00
|
|
|
# WANT_WX - Set to "yes" or a valid single version (no ranges, etc).
|
|
|
|
# In both cases it will detect the installed wxWidgets
|
|
|
|
# components and add them to the variable HAVE_WX. If a
|
|
|
|
# version is selected, HAVE_WX will contain a list of
|
|
|
|
# components in the other case it will contain a list of
|
2022-12-31 02:56:12 +00:00
|
|
|
# "component-version" pairs (e.g. wx-3.0, etc).
|
2014-06-18 09:41:25 +00:00
|
|
|
# It has to be used before bsd.port.pre.mk.
|
2019-02-27 12:06:57 +00:00
|
|
|
# WANT_WX_VER - Set to the preferred wxWidgets version for the port. It must
|
2014-06-18 09:41:25 +00:00
|
|
|
# be present in USE_WX or missing in USE_WX_NOT. This is
|
2019-02-27 12:06:57 +00:00
|
|
|
# overridden by the user variable WITH_WX_VER if set. It can
|
2014-06-18 09:41:25 +00:00
|
|
|
# contain multiple versions in order of preference (last ones
|
|
|
|
# are tried first).
|
2021-10-25 10:45:18 +00:00
|
|
|
# WANT_WXGTK_VER - Set to the preferred GTK+ version, "2" or "3", "3" being
|
|
|
|
# the default (only applicable to wxWidgets 3.0 for now).
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# The following variables are intended for the user and can be defined in
|
|
|
|
# make.conf.
|
2019-02-27 12:06:57 +00:00
|
|
|
# WITH_WX_VER - Define to the list of preferred versions in reverse order.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# The following variables are defined by this file, to be read from the port.
|
2014-06-18 09:41:25 +00:00
|
|
|
# WX_CONFIG - The path to the wx-config program (with different name).
|
|
|
|
# WXRC_CMD - The path to the wxrc program (with different name).
|
2007-01-01 16:39:29 +00:00
|
|
|
# WX_VERSION - The wxWidgets version that is going to be used.
|
2014-06-18 09:41:25 +00:00
|
|
|
# HAVE_WX - The list of wxWidgets components installed, if WANT_WX was
|
|
|
|
# defined. The components will have version suffix if it was
|
|
|
|
# set to "yes".
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# Examples:
|
2022-12-31 02:56:12 +00:00
|
|
|
# - A port that needs wxWidgets 3.0
|
|
|
|
# USE_WX= 3.0
|
|
|
|
# WX_COMPS= wx
|
|
|
|
# - A port that needs WxPython 3.0 for running.
|
2006-07-05 02:13:12 +00:00
|
|
|
# USE_PYTHON= yes
|
2022-12-31 02:56:12 +00:00
|
|
|
# USE_WX= 3.0
|
2006-11-13 21:15:38 +00:00
|
|
|
# WX_COMPS= python:run
|
2022-12-31 02:56:12 +00:00
|
|
|
# - A port that needs WxPython 3.0 or 3.2 for building.
|
2006-07-05 02:13:12 +00:00
|
|
|
# USE_PYTHON= yes
|
2022-12-31 02:56:12 +00:00
|
|
|
# USE_WX= 3.0 3.2
|
2006-11-13 21:15:38 +00:00
|
|
|
# WX_COMPS= python:build
|
2022-12-31 02:56:12 +00:00
|
|
|
# - A port that needs wxWidgets version 3.0 or higher
|
2006-07-05 02:13:12 +00:00
|
|
|
# libraries.
|
2022-12-31 02:56:12 +00:00
|
|
|
# USE_WX= 3.0+
|
|
|
|
# WX_COMPS= wx
|
|
|
|
# - A port that needs wxWidgets of any version other than 3.0.
|
|
|
|
# USE_WX_NOT= 3.0
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
2022-10-26 17:10:21 +00:00
|
|
|
WX_Include_MAINTAINER= desktop@FreeBSD.org
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Global definitions.
|
|
|
|
#
|
|
|
|
|
|
|
|
.if !defined(_WX_Definitions_Done)
|
|
|
|
_WX_Definitions_Done= yes
|
|
|
|
|
|
|
|
#
|
|
|
|
# Common variables:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_COMPS_ALL - List of valid components.
|
|
|
|
# _WX_DEP_TYPES_ALL - List of valid dependency types.
|
|
|
|
# _WX_VERS_ALL - List of supported versions.
|
|
|
|
# _WX_VERS_UC_ALL - List of Unicode capable versions.
|
|
|
|
# _WX_VERS_LISTS - Reverse lists preference order.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
2022-12-31 02:56:12 +00:00
|
|
|
_WX_COMPS_ALL= wx python
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_DEP_TYPES_ALL= build lib run
|
2022-12-31 02:56:12 +00:00
|
|
|
_WX_VERS_ALL= 3.0 3.2
|
|
|
|
_WX_VERS_UC_ALL= 3.0 3.2
|
2022-09-15 13:41:26 +00:00
|
|
|
_WX_VERS_SKIP= 3.0 3.2
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED
|
2006-12-03 18:04:39 +00:00
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# Variables used to determine what is needed:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_PORT_comp_ver - Port directory.
|
|
|
|
# _WX_LIB_comp_ver - Name of the shared library (optional).
|
2006-07-05 02:13:12 +00:00
|
|
|
# _WX_SHVER_comp_ver - Shared library version (optional).
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_FILE_comp_ver - File installed by that component.
|
2006-11-13 21:15:38 +00:00
|
|
|
# _WX_DEPTYPE_comp_ver - Default dependency type (optional).
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
2014-01-22 13:46:41 +00:00
|
|
|
# wxgtk 3.0
|
2021-10-25 10:45:18 +00:00
|
|
|
_WX_PORT_wx_3.0= x11-toolkits/wxgtk30@${_GTKFLAVOR}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_LIB_wx_3.0= wx_baseu-3.0
|
2014-01-22 13:46:41 +00:00
|
|
|
|
2022-09-02 06:16:09 +00:00
|
|
|
_WX_PORT_python_3.2= x11-toolkits/py-wxPython4@${PY_FLAVOR}
|
|
|
|
_WX_FILE_python_3.2= ${PYTHON_SITELIBDIR}/wx/__init__.py
|
|
|
|
|
|
|
|
# wxgtk 3.2
|
|
|
|
_WX_PORT_wx_3.2= x11-toolkits/wxgtk32
|
|
|
|
_WX_LIB_wx_3.2= wx_baseu-3.2
|
|
|
|
|
2019-02-27 12:06:57 +00:00
|
|
|
# Set _WX_SHVER_comp_ver to 0 and _WX_FILE_comp_ver for libs appropriately.
|
2006-11-13 21:15:38 +00:00
|
|
|
# Set _WX_DEPTYPE_comp_ver for "python" to "run", and others to "lib".
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for comp in ${_WX_COMPS_ALL}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP= ${comp}
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${_WX_VERS_ALL}
|
|
|
|
. if defined(_WX_LIB_${comp}_${ver})
|
2006-07-05 02:13:12 +00:00
|
|
|
_WX_SHVER_${comp}_${ver}= 0
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 17:56:05 +00:00
|
|
|
_WX_FILE_${comp}_${ver}= ${LOCALBASE}/lib/lib${_WX_LIB_${comp}_${ver}}.so.${_WX_SHVER_${comp}_${ver}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. if ${_WX_COMP} == "python"
|
2006-11-13 21:15:38 +00:00
|
|
|
_WX_DEPTYPE_${comp}_${ver}= run
|
2022-04-24 10:00:20 +00:00
|
|
|
. else
|
2006-11-13 21:15:38 +00:00
|
|
|
_WX_DEPTYPE_${comp}_${ver}= lib
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
.endif # !_WX_Defined_Done
|
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
#
|
|
|
|
# Check if we are going to determine the version.
|
|
|
|
#
|
|
|
|
|
|
|
|
.if !defined(_WX_Version_Done) && (defined(_POSTMKINCLUDED) || \
|
|
|
|
(defined(WX_PREMK) && defined(BEFOREPORTMK) && \
|
|
|
|
(defined(USE_WX) || defined(USE_WX_NOT))))
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_Need_Version= yes
|
2006-11-13 21:15:38 +00:00
|
|
|
.endif
|
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# Check for present components.
|
|
|
|
#
|
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
# Requested by the user.
|
|
|
|
|
2006-11-13 21:15:38 +00:00
|
|
|
.if defined(WANT_WX) && defined(BEFOREPORTMK)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WANT_WX= ${WANT_WX}
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# Used for autodetection of installed versions.
|
|
|
|
|
|
|
|
.if defined(_WX_Need_Version)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WANT_WX= yes
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(_WANT_WX)
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# These variables are reprocessed later so they won't affect other parts.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_FINAL= ${_WX_VERS_UC_ALL}
|
|
|
|
_WX_UC= u
|
|
|
|
_WX_PYSUFX= -unicode
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
# Fill _HAVE_WX with the installed components.
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2007-01-04 13:02:26 +00:00
|
|
|
. undef _HAVE_WX
|
2022-04-24 10:00:20 +00:00
|
|
|
. for __WANT_WX in ${_WANT_WX}
|
2006-12-31 04:34:27 +00:00
|
|
|
# Check if _WANT_WX contains more than one word.
|
2022-04-24 10:00:20 +00:00
|
|
|
. if defined(_HAVE_WX)
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected multiple values for WANT_WX: ${_WANT_WX}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
2014-06-18 09:41:25 +00:00
|
|
|
_HAVE_WX= #
|
2006-07-05 02:13:12 +00:00
|
|
|
# Check for all versions.
|
2022-04-24 10:00:20 +00:00
|
|
|
. if ${_WANT_WX:tl} == "yes"
|
|
|
|
. for comp in ${_WX_COMPS_ALL}
|
|
|
|
. for ver in ${_WX_VER_FINAL}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP= _WX_FILE_${comp}_${ver}
|
2022-04-24 10:00:20 +00:00
|
|
|
. if defined(${_WX_COMP}) && exists(${${_WX_COMP}})
|
2014-06-18 09:41:25 +00:00
|
|
|
_HAVE_WX+= ${comp}-${ver}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
# Check for a specific version.
|
2022-04-24 10:00:20 +00:00
|
|
|
. elif ${_WX_VERS_ALL:M${__WANT_WX}}
|
|
|
|
. for comp in ${_WX_COMPS_ALL}
|
|
|
|
. if exists(${_WX_FILE_${comp}_${__WANT_WX}})
|
2014-06-18 09:41:25 +00:00
|
|
|
_HAVE_WX+= ${comp}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. else
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected an invalid value for WANT_WX: ${__WANT_WX}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif # _WANT_WX
|
|
|
|
|
|
|
|
# Requested by the user.
|
|
|
|
|
|
|
|
.if defined(WANT_WX) && defined(BEFOREPORTMK)
|
2014-06-18 09:41:25 +00:00
|
|
|
HAVE_WX:= ${_HAVE_WX}
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# Used for autodetection of installed versions.
|
|
|
|
|
|
|
|
.if defined(_WX_Need_Version)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_INSTALLED:= ${_HAVE_WX:Mwx-*:S/wx-//}
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
2007-01-01 16:39:29 +00:00
|
|
|
# Select wxWidgets version.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
.if defined(_WX_Need_Version)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_Version_Done= yes
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2007-01-01 01:04:07 +00:00
|
|
|
#
|
|
|
|
# Basic component parsing (ignores dependency types).
|
|
|
|
#
|
|
|
|
# The variables used are:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_COMP - Component part.
|
|
|
|
# _WX_COMPS_FINAL - Final list of components.
|
2007-01-01 01:04:07 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Detect duplicated components.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMPS_FINAL= #
|
2022-04-24 10:00:20 +00:00
|
|
|
. for comp in ${WX_COMPS}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP= ${comp:C/:([[:alpha:]]+)$//}
|
2022-04-24 10:00:20 +00:00
|
|
|
. for __WX_COMP in ${_WX_COMP}
|
|
|
|
. if ${_WX_COMPS_ALL:M${__WX_COMP}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. for newcomp in ${_WX_COMP}
|
|
|
|
. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMPS_FINAL+= ${newcomp}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2007-01-01 01:04:07 +00:00
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
# Set defaults (if one isn't present).
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
USE_WX?= ${_WX_VERS_ALL}
|
|
|
|
USE_WX_NOT?= #
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Make lists of valid and invalid versions.
|
|
|
|
#
|
|
|
|
# The following variables are used:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_VER_CHECK - If the version is a single one, express in a range.
|
|
|
|
# _WX_VER_MIN - Lower version of the range.
|
|
|
|
# _WX_VER_MAX - Higher version of the range.
|
|
|
|
# _WX_VER_LIST - List of requested versions.
|
|
|
|
# _WX_VER_NOT_LIST - List of disallowed versions.
|
|
|
|
# _WX_VER_MERGED - List of requested version without disallowed ones.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for list in VER VER_NOT
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_${list}_LIST= #
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${USE_WX${list:C/VER//}}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_CHECK:= ${ver:C/^([[:digit:]]+(\.[[:digit:]]+)*)$/\1-\1/}
|
|
|
|
_WX_VER_MIN:= ${_WX_VER_CHECK:C/([[:digit:]]+(\.[[:digit:]]+)*)[-+].*/\1/}
|
|
|
|
_WX_VER_MAX:= ${_WX_VER_CHECK:C/.*-([[:digit:]]+(\.[[:digit:]]+)*)/\1/}
|
2006-07-05 02:13:12 +00:00
|
|
|
# Minimum version not specified.
|
2022-04-24 10:00:20 +00:00
|
|
|
. if ${_WX_VER_MIN} == ${_WX_VER_CHECK}
|
2006-07-05 02:13:12 +00:00
|
|
|
. undef _WX_VER_MIN
|
2022-04-24 10:00:20 +00:00
|
|
|
. for v in ${_WX_VERS_ALL}
|
|
|
|
. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_MIN?= ${v}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
2006-07-05 02:13:12 +00:00
|
|
|
# Maximum version not specified.
|
2022-04-24 10:00:20 +00:00
|
|
|
. if ${_WX_VER_MAX} == ${_WX_VER_CHECK}
|
|
|
|
. for v in ${_WX_VERS_ALL}
|
|
|
|
. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_MAX= ${v}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
2006-07-05 02:13:12 +00:00
|
|
|
# Expand versions and add valid ones to each list.
|
2022-04-24 10:00:20 +00:00
|
|
|
. for v in ${_WX_VERS_ALL}
|
|
|
|
. if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \
|
2006-07-05 02:13:12 +00:00
|
|
|
${_WX_${list}_LIST:M${v}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_${list}_LIST+= ${v}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# Merge the lists into a single list of valid versions.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_MERGED= #
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${_WX_VER_LIST}
|
|
|
|
. if ${_WX_VER_NOT_LIST:M${ver}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_MERGED+= ${ver}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# Check for a null version.
|
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. if empty(_WX_VER_MERGED)
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected a null or invalid wxWidgets version
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2007-01-01 01:04:07 +00:00
|
|
|
# Avoid versions which have unavailable components.
|
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${_WX_VER_MERGED}
|
|
|
|
. for comp in ${_WX_COMPS_FINAL}
|
|
|
|
. if !defined(_WX_PORT_${comp}_${ver})
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_WRONG_COMPS+= ${comp}
|
|
|
|
_WX_WRONG_VERS+= ${ver}
|
|
|
|
_WX_VER_MERGED:= ${_WX_VER_MERGED:N${ver}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2007-01-01 01:04:07 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. if empty(_WX_VER_MERGED)
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected wxWidgets versions (${_WX_WRONG_VERS}) which do not have the selected components (${_WX_WRONG_COMPS})
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
2007-01-01 01:04:07 +00:00
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# Unicode support.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Create a list of capable versions.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_UC= #
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${_WX_VER_MERGED}
|
|
|
|
. if ${_WX_VERS_UC_ALL:M${ver}} != ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_UC+= ${ver}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# Set Unicode variables.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_FINAL= ${_WX_VER_UC}
|
|
|
|
_WX_UC= u
|
|
|
|
_WX_PYSUFX= -unicode
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
# Remove unusable installed versions.
|
2006-12-03 18:04:39 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for ver in ${_WX_VER_INSTALLED}
|
|
|
|
. if ${_WX_VER_FINAL:M${ver}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER_INSTALLED:= ${_WX_VER_INSTALLED:N${ver}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
2006-12-03 18:04:39 +00:00
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
# Choose final version.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check for the following (in order):
|
2014-06-18 09:41:25 +00:00
|
|
|
# 1) WITH_WX_VER - User preference.
|
|
|
|
# 2) WANT_WX_VER - Port preference.
|
2006-12-31 04:34:27 +00:00
|
|
|
# 3) _WX_VER_INSTALLED - Installed versions.
|
2014-06-18 09:41:25 +00:00
|
|
|
# 4) _WX_VER_FINAL - Available versions.
|
|
|
|
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for list in _WX_VER_FINAL ${_WX_VERS_LISTS}
|
|
|
|
. if defined(${list})
|
|
|
|
. for ver in ${${list}}
|
|
|
|
. if ${_WX_VER_FINAL:M${ver}} != ""
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_VER= ${ver}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endif
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Set variables.
|
|
|
|
#
|
|
|
|
|
2022-09-15 13:41:26 +00:00
|
|
|
. if ${_WX_VER} == 3.2
|
2019-02-25 12:47:20 +00:00
|
|
|
_GTKVER= 3
|
2022-04-24 10:00:20 +00:00
|
|
|
. elif ${_WX_VER} == 3.0
|
2021-10-25 10:45:18 +00:00
|
|
|
_GTKVER= ${WANT_WXGTK_VER:U3}
|
|
|
|
_GTKFLAVOR= gtk${_GTKVER}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
2019-02-25 12:47:20 +00:00
|
|
|
|
|
|
|
WX_CONFIG?= ${LOCALBASE}/bin/wxgtk${_GTKVER}${_WX_UC}-${_WX_VER}-config
|
|
|
|
WXRC_CMD?= ${LOCALBASE}/bin/wxrc-gtk${_GTKVER}${_WX_UC}-${_WX_VER}
|
2014-06-18 09:41:25 +00:00
|
|
|
WX_VERSION?= ${_WX_VER}
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2006-12-31 04:34:27 +00:00
|
|
|
.endif # _WX_Need_Version
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Process components list and add dependencies, variables, etc.
|
|
|
|
#
|
|
|
|
|
2006-11-13 21:15:38 +00:00
|
|
|
.if defined(_POSTMKINCLUDED)
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Component parsing.
|
|
|
|
#
|
|
|
|
# The variables used are:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_COMP - Component part.
|
|
|
|
# _WX_DEP_TYPE - Dependency type part.
|
|
|
|
# _WX_COMP_NEW - Component + dependency type.
|
|
|
|
# _WX_COMPS_FINAL - Final list of components with dependency types.
|
2006-07-05 02:13:12 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Default components.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
WX_COMPS?= wx
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# Detect invalid and duplicated components.
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMPS_FINAL= #
|
2022-04-24 10:00:20 +00:00
|
|
|
. for comp in ${WX_COMPS}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP= ${comp:C/:([[:alpha:]]+)$//}
|
2022-04-24 10:00:20 +00:00
|
|
|
. if ${_WX_COMP} == ${comp}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_DEP_TYPE= ${_WX_DEPTYPE_${comp}_${_WX_VER}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. else
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_DEP_TYPE= ${comp:C/.+:([[:alpha:]]+)$/\1/}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP_NEW= ${_WX_COMP}_${_WX_DEP_TYPE}
|
2022-04-24 10:00:20 +00:00
|
|
|
. for __WX_COMP in ${_WX_COMP}
|
|
|
|
. if ${_WX_COMPS_ALL:M${__WX_COMP}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. for __WX_DEP_TYPE in ${_WX_DEP_TYPE}
|
|
|
|
. if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == ""
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected an invalid wxWidgets dependency type: ${__WX_DEP_TYPE}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER})
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected a wxWidgets component (${_WX_COMP}) which is not available for the selected version (${_WX_VER})
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. for newcomp in ${_WX_COMP_NEW}
|
|
|
|
. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMPS_FINAL+= ${newcomp}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
# Add dependencies.
|
|
|
|
#
|
|
|
|
# The variable used are:
|
2014-06-18 09:41:25 +00:00
|
|
|
# _WX_COMP - Component part.
|
|
|
|
# _WX_DEP_TYPE - Dependency type part.
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. for comp in ${_WX_COMPS_FINAL}
|
2014-06-18 09:41:25 +00:00
|
|
|
_WX_COMP= ${comp:C/_([[:alpha:]]+)$//}
|
|
|
|
_WX_DEP_TYPE= ${comp:C/.+_([[:alpha:]]+)$/\1/}
|
2006-11-13 21:15:38 +00:00
|
|
|
# XXX Need a .for loop here so the variable is expanded before the assignment.
|
2022-04-24 10:00:20 +00:00
|
|
|
. for comp_part in ${_WX_COMP}
|
|
|
|
. if ${_WX_DEP_TYPE} == "lib"
|
|
|
|
. if defined(_WX_LIB_${_WX_COMP}_${_WX_VER})
|
2016-03-27 01:23:25 +00:00
|
|
|
LIB_DEPENDS+= lib${_WX_LIB_${comp_part}_${_WX_VER}}.so:${_WX_PORT_${comp_part}_${_WX_VER}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. else
|
2016-03-27 01:23:25 +00:00
|
|
|
BUILD_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}}
|
|
|
|
RUN_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. else
|
2016-03-27 01:23:25 +00:00
|
|
|
${_WX_DEP_TYPE:tu}_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. endfor
|
2006-07-05 02:13:12 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Set build related variables.
|
|
|
|
#
|
|
|
|
|
2014-06-18 09:41:25 +00:00
|
|
|
MAKE_ENV+= WX_CONFIG=${WX_CONFIG}
|
|
|
|
CONFIGURE_ENV+= WX_CONFIG=${WX_CONFIG}
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2022-04-24 10:00:20 +00:00
|
|
|
. if defined(WX_CONF_ARGS)
|
|
|
|
. if ${WX_CONF_ARGS:tl} == "absolute"
|
2014-06-18 09:41:25 +00:00
|
|
|
CONFIGURE_ARGS+= --with-wx-config=${WX_CONFIG}
|
2022-04-24 10:00:20 +00:00
|
|
|
. elif ${WX_CONF_ARGS:tl} == "relative"
|
2014-06-18 09:41:25 +00:00
|
|
|
CONFIGURE_ARGS+= --with-wx=${LOCALBASE} \
|
|
|
|
--with-wx-config=${WX_CONFIG:T}
|
2022-04-24 10:00:20 +00:00
|
|
|
. else
|
2014-06-18 09:41:25 +00:00
|
|
|
IGNORE?= selected an invalid wxWidgets configure argument type: ${WX_CONF_ARGS}
|
2022-04-24 10:00:20 +00:00
|
|
|
. endif
|
|
|
|
. endif
|
2006-07-05 02:13:12 +00:00
|
|
|
|
2006-11-13 21:15:38 +00:00
|
|
|
.endif # _POSTMKINCLUDED
|