pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
(mk/wxGTK.mk) New file. Ref:jpeg.buildlink3.mk (wxGTK/wxGTKversion.mk) deleted
Module Name: pkgsrc-wip
Committed By: Makoto Fujiwara <makoto%ki.nu@localhost>
Pushed By: mef
Date: Tue Nov 3 08:30:24 2015 +0900
Changeset: 586f25868b41b3afc4eba51d42f3531d17f1a475
Added Files:
mk/wxGTK.mk
Removed Files:
wxGTK/wxGTKversion.mk
Log Message:
(mk/wxGTK.mk) New file. Ref:jpeg.buildlink3.mk (wxGTK/wxGTKversion.mk) deleted
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=586f25868b41b3afc4eba51d42f3531d17f1a475
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mk/wxGTK.mk | 58 ++++++++++++++
wxGTK/wxGTKversion.mk | 215 --------------------------------------------------
2 files changed, 58 insertions(+), 215 deletions(-)
diffs:
diff --git a/mk/wxGTK.mk b/mk/wxGTK.mk
new file mode 100644
index 0000000..fef840d
--- /dev/null
+++ b/mk/wxGTK.mk
@@ -0,0 +1,58 @@
+# $NetBSD$
+#
+# This Makefile fragment is meant to be included by packages that
+# require a wxGTK library. wxGTK.mk will:
+#
+# * set WXGTKBASE to the directory of wxGTK package
+# * set WXGTK_TYPE to the version of wxGTK used.
+#
+# There are two variables that can be used to tweak the selection of
+# the version of wxGTK.
+#
+# WXGTK_DEFAULT is a user-settable variable whose value is the default
+# version of wxGTK, for exampe WXGTK28 or WXGTK30.
+#
+# WXGTK_ACCEPTED is a package-settable list of wxGTK versions
+# that may be used by the package.
+#
+
+MK_WXGTK_BUILDLINK3_MK:= ${MK_WXGTK_BUILDLINK3_MK}+
+
+.include "bsd.fast.prefs.mk"
+
+.if !empty(MK_WXGTK_BUILDLINK3_MK:M+)
+
+# This is an exhaustive list of all of the versions of wxGTK
+# that may be used.
+#
+_WXGTK_PKGS?= WXGTK28 WXGTK30
+
+WXGTK_DEFAULT?= WXGTK28
+WXGTK_ACCEPTED?= ${_WXGTK_PKGS}
+
+_WXGTK_DEFAULT= ${WXGTK_DEFAULT}
+_WXGTK_ACCEPTED= ${WXGTK_ACCEPTED}
+
+_WXGTK_TYPE?= ${_WXGTK_DEFAULT}
+
+. if !empty(_WXGTK_ACCEPTED:M${_WXGTK_TYPE})
+WXGTK_TYPE= ${_WXGTK_TYPE}
+. else
+WXGTK_TYPE= none
+. endif
+
+BUILD_DEFS+= WXGTK_DEFAULT
+BUILD_DEFS_EFFECTS+= WXGTKBASE WXGTK_TYPE
+
+.if ${WXGTK_TYPE} == "none"
+PKG_FAIL_REASON= \
+ "${_WXGTK_TYPE} is not an acceptable version of wxGTK for ${PKGNAME}."
+.elif ${WXGTK_TYPE} == "WXGTK28"
+. include "../../x11/wxGTK28/buildlink3.mk"
+.elif ${WXGTK_TYPE} == "WXGTK30"
+. include "../../x11/wxGTK30/buildlink3.mk"
+.endif
+
+WXGTKBASE= ${BUILDLINK_PREFIX.${WXGTK_TYPE}}
+
+.endif # MK_WXGTK_BUILDLINK3_MK
diff --git a/wxGTK/wxGTKversion.mk b/wxGTK/wxGTKversion.mk
deleted file mode 100644
index 587dfcd..0000000
--- a/wxGTK/wxGTKversion.mk
+++ /dev/null
@@ -1,215 +0,0 @@
-# $NetBSD$
-#
-# This file selects a wxGTK version, based on the user's preferences and
-# the installed packages. It does not add a dependency on the wxGTK
-# package. You may place following line after this file included:
-# .include "${WXGTKPKGSRCDIR}/buildlink3.mk"
-#
-# === User-settable variables ===
-#
-# WXGTK_VERSION_DEFAULT
-# The wxGTK version to choose when more than one is acceptable to
-# the package.
-#
-# Possible: 28 30
-# Default: 28
-#
-# === Infrastructure variables ===
-#
-# WXGTK_VERSION_REQD
-# wxGTK version to use. This variable should not be set in
-# packages. Normally it is used by bulk build tools.
-#
-# Possible: ${WXGTK_VERSIONS_ACCEPTED}
-# Default: ${WXGTK_VERSION_DEFAULT}
-#
-# === Package-settable variables ===
-#
-# WXGTK_VERSIONS_ACCEPTED
-# The wxGTK versions that are accepted by the package.
-#
-# Possible: 28 30
-# Default: 28
-#
-# WXGTK_CHECK_INSTALLED
-# Check installed version of wxGTK. Should be used by x11/wxGTK28
-# and x11/wxGTK30 (etc) only.
-#
-# Possible: Yes No
-# Default: Yes
-#
-# === Variables defined by this file ===
-#
-# PKG_WXGTK_VERSION
-# The selected wxGTK version.
-#
-# Possible: 28 30
-# Default: ${WXGTK_VERSION_DEFAULT}
-#
-# WXGTK_BASE_VERS
-# The selected wxGTK's full version depends on PKG_WXGTK_VERSION
-#
-## PKG_WXGTK_MAJOR_VERS
-## The selected wxGTK's major version.
-##
-## Possible: 5
-## Default: 5
-#
-# PKG_WXGTK
-# The same as ${PKG_WXGTK_VERSION}, prefixed with "wxGTK-".
-#
-# WXGTKPKGSRCDIR
-# The directory of the wxGTK implementation, relative to the
-# package directory.
-#
-# Example: ../../x11/wxGTK28
-#
-# WXGTK_PKG_PREFIX
-# The prefix that is prepended to the package name.
-#
-# Example: wxGTK28-, wxGTK30-
-#
-## WXGTK_EXTENSION_DIR
-## Relative path to ${PREFIX} for wxGTK's extensions. It is derived from
-## initial release of major version.
-##
-## Example: lib/php/20090630
-#
-# Keywords: wxGTK
-#
-
-.if !defined(WXGTKVERSION_MK)
-WXGTKVERSION_MK= defined
-
-# Define each wxGTK's version.
-WXGTK24_VERSION= 2.4.2
-WXGTK26_VERSION= 2.6.3
-WXGTK28_VERSION= 2.8.12
-WXGTK30_VERSION= 3.0.2
-
-# # Define initial release of major version.
-# WXGTK54_RELDATE= 20120301
-# WXGTK55_RELDATE= 20130620
-# WXGTK56_RELDATE= 20140828
-
-_VARGROUPS+= wxGTK
-_USER_VARS.wxGTK= WXGTK_VERSION_DEFAULT
-_PKG_VARS.wxGTK= WXGTK_VERSIONS_ACCEPTED WXGTK_VERSION_REQD
-_SYS_VARS.wxGTK= PKG_WXGTK_VERSION PKG_WXGTK WXGTKPKGSRCDIR WXGTK_PKG_PREFIX \
- PKG_WXGTK_MAJOR_VERS
-
-.include "../../mk/bsd.prefs.mk"
-
-WXGTK_VERSION_DEFAULT?= 28
-WXGTK_VERSIONS_ACCEPTED?= 28 30
-
-# transform the list into individual variables
-.for wv in ${WXGTK_VERSIONS_ACCEPTED}
-_WXGTK_VERSION_${wv}_OK= yes
-.endfor
-
-# check what is installed
-.if exists(${LOCALBASE}/include/wx-2.8)
-_WXGTK_VERSION_28_INSTALLED= yes
-_WXGTK_INSTALLED= yes
-.elif exists(${LOCALBASE}/include/wx-3.0)
-_WXGTK_VERSION_30_INSTALLED= yes
-_WXGTK_INSTALLED= yes
-.endif
-
-# if a version is explicitely required, take it
-.if defined(WXGTK_VERSION_REQD)
-_WXGTK_VERSION= ${WXGTK_VERSION_REQD}
-.endif
-# if the default is already installed, it is first choice
-.if !defined(_WXGTK_VERSION)
-.if defined(_WXGTK_VERSION_${WXGTK_VERSION_DEFAULT}_OK)
-.if defined(_WXGTK_VERSION_${WXGTK_VERSION_DEFAULT}_INSTALLED)
-_WXGTK_VERSION= ${WXGTK_VERSION_DEFAULT}
-.endif
-.endif
-.endif
-# prefer an already installed version, in order of "accepted"
-.if !defined(_WXGTK_VERSION)
-.for wv in ${WXGTK_VERSIONS_ACCEPTED}
-.if defined(_WXGTK_VERSION_${wv}_INSTALLED)
-_WXGTK_VERSION?= ${wv}
-.else
-# keep information as last resort - see below
-_WXGTK_VERSION_FIRSTACCEPTED?= ${wv}
-.endif
-.endfor
-.endif
-# if the default is OK for the addon pkg, take this
-.if !defined(_WXGTK_VERSION)
-.if defined(_WXGTK_VERSION_${WXGTK_VERSION_DEFAULT}_OK)
-_WXGTK_VERSION= ${WXGTK_VERSION_DEFAULT}
-.endif
-.endif
-# take the first one accepted by the package
-.if !defined(_WXGTK_VERSION)
-_WXGTK_VERSION= ${_WXGTK_VERSION_FIRSTACCEPTED}
-.endif
-
-#
-# Variable assignment for multi-wxGTK packages
-MULTI+= WXGTK_VERSION_REQD=${_WXGTK_VERSION}
-
-# export some of internal variables
-PKG_WXGTK_VERSION:= ${_WXGTK_VERSION:C/\.[0-9]//}
-PKG_WXGTK:= WXGTK${_WXGTK_VERSION:C/([0-9])([0-9])/\1.\2/}
-
-# currently we have only wxGTK 5.x packages.
-#PKG_WXGTK_MAJOR_VERS:= 5
-
-WXGTK_CHECK_INSTALLED?= Yes
-
-# if installed wxGTK isn't compatible with required wxGTK, bail out
-.if empty(WXGTK_CHECK_INSTALLED:M[nN][oO])
-.if defined(_WXGTK_INSTALLED) && !defined(_WXGTK_VERSION_${_WXGTK_VERSION}_INSTALLED)
-PKG_FAIL_REASON+= "Package accepts ${PKG_WXGTK}, but different version is installed"
-.endif
-.endif
-
-MESSAGE_SUBST+= PKG_WXGTK_VERSION=${PKG_WXGTK_VERSION} \
- PKG_WXGTK=${PKG_WXGTK}
-PLIST_SUBST+= PKG_WXGTK_VERSION=${PKG_WXGTK_VERSION} \
- PKG_WXGTK_MAJOR_VERS=${PKG_WXGTK_MAJOR_VERS} \
- WXGTK_EXTENSION_DIR=${WXGTK_EXTENSION_DIR}
-
-# force the selected wxGTK version for recursive builds
-WXGTK_VERSION_REQD:= ${PKG_WXGTK_VERSION}
-
-#
-# set variables for the version we decided to use:
-#
-.if ${_WXGTK_VERSION} == "28"
-WXGTKPKGSRCDIR= ../../x11/wxGTK28
-WXGTK_VERSION= ${WXGTK28_VERSION}
-WXGTK_INITIAL_TEENY= 12
-WXGTK_PKG_PREFIX= wxGTK28
-.elif ${_WXGTK_VERSION} == "30"
-WXGTKPKGSRCDIR= ../../x11/wxGTK30
-WXGTK_VERSION= ${WXGTK30_VERSION}
-WXGTK_INITIAL_TEENY= 2
-WXGTK_PKG_PREFIX= wxGTK30
-.else
-# force an error
-PKG_FAIL_REASON+= "${PKG_WXGTK} is not a valid package"
-.endif
-
-_WXGTK_VER_MAJOR= ${WXGTK_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
-_WXGTK_VER_MINOR= ${WXGTK_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
-
-WXGTK_BASE_VERS= ${_WXGTK_VER_MAJOR}.${_WXGTK_VER_MINOR}.${WXGTK_INITIAL_TEENY}
-
-#
-# check installed version aginst required:
-#
-.if !empty(WXGTK_CHECK_INSTALLED:M[nN][oO])
-.if defined(_WXGTK_VERSION_INSTALLED) && ${_WXGTK_VERSION} != ${_WXGTK_VERSION_INSTALLED}
-PKG_FAIL_REASON+= "${PKGBASE} requires ${PKG_WXGTK}, but wxGTK-${_WXGTK_VERSION_INSTALLED} is already installed."
-.endif
-.endif
-
-.endif # WXGTKVERSION_MK
Home |
Main Index |
Thread Index |
Old Index