mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
o Prepare it to become a master port:
1) This port will build an ansi based version of x11-toolkits/py-wxPython26 2) A slave port x11-toolkits/py-wxPython26-unicode will build a unicode version 3) Move the common parts shared amongst both the ansi and the unicode ports to a slave port x11-toolkits/py-wxPython26-common Approved by: maintainer
This commit is contained in:
parent
33e8adf111
commit
16b3d35ec8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=143954
@ -16,8 +16,6 @@ DISTNAME= ${PORTNAME}-src-${PORTVERSION}
|
||||
MAINTAINER= neal@nelson.name
|
||||
COMMENT= Python bindings for the wxWidgets/GTK GUI toolkit
|
||||
|
||||
LIB_DEPENDS= wx_gtk2_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26 \
|
||||
wx_gtk2_gizmos-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-contrib
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenGL/__init__.py:${PORTSDIR}/graphics/py-opengl
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/wxPython
|
||||
@ -25,37 +23,163 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/wxPython
|
||||
USE_GMAKE= yes
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS=yes
|
||||
PYDISTUTILS_BUILDARGS= WX_CONFIG="${WX_CONFIG}"
|
||||
PYDISTUTILS_CONFIGUREARGS+= WX_CONFIG="${WX_CONFIG}"
|
||||
USE_REINPLACE= yes
|
||||
PYDISTUTILS_BUILDARGS= \
|
||||
WX_CONFIG="${WX_CONFIG}" \
|
||||
WXPORT="${WXPORT}"
|
||||
PYDISTUTILS_CONFIGUREARGS= ${PYDISTUTILS_BUILDARGS}
|
||||
DEMO_DIR= ${PYTHONPREFIX_SITELIBDIR}/wxPython/demo
|
||||
WXPORT= gtk2
|
||||
|
||||
INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/%%PYTHON_SITELIBDIR%%/wx-2.6-gtk2-ansi/wx/
|
||||
post-extract:
|
||||
# only keep the scripts we need
|
||||
@${RM} ${WRKSRC}/scripts/*.py
|
||||
|
||||
post-patch:
|
||||
# fix python location
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
||||
${WRKSRC}/scripts/*
|
||||
@${RM} ${WRKSRC}/scripts/*.bak
|
||||
|
||||
pre-configure:
|
||||
# uphold PREFIX
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e "s|([[:space:]]*WXPREFIX[[:space:]]*=).*$$|\1'${PREFIX}'|" \
|
||||
${CONFIGURE_WRKSRC}/config.py
|
||||
|
||||
post-build:
|
||||
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/demo
|
||||
# Shared amongst ansi/unicode installations
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
. for dir in demo wxversion
|
||||
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/${dir}
|
||||
@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/${dir}
|
||||
. endfor
|
||||
.endif
|
||||
.if !defined(DEBUG_FLAGS)
|
||||
@${FIND} ${WRKSRC} -name "*.so" | ${XARGS} ${STRIP_CMD}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# are we ready for unicode?
|
||||
.if defined(WITH_UNICODE)
|
||||
. if ${OSVERSION} < 500000
|
||||
IGNORE= Systems prior to FreeBSD 5.0 do not support Unicode
|
||||
. endif
|
||||
.endif
|
||||
|
||||
# build dependencies
|
||||
.if defined(WITH_UNICODE)
|
||||
BUILD_DEPENDS+= ${WX_CONFIG}:${PORTSDIR}/x11-toolkits/wxgtk26-unicode
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2u-2.6-config
|
||||
.else
|
||||
BUILD_DEPENDS+= ${WX_CONFIG}:${PORTSDIR}/x11-toolkits/wxgtk26
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2-2.6-config
|
||||
.endif
|
||||
|
||||
# wx version
|
||||
.if exists(${WX_CONFIG})
|
||||
WX_VERSION!= ${WX_CONFIG} --release
|
||||
|
||||
PLIST_SUB+= WX_VERSION=${WX_VERSION}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
## These are not shared amongst installations
|
||||
PKGNAMESUFFIX= -common
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
INSTALL_MULTIVERSION=1
|
||||
.else
|
||||
## These are shared
|
||||
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/wxversion.py:${PORTSDIR}/x11-toolkits/py-wxPython26-common
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
NO_HEADERS=1 \
|
||||
NO_SCRIPTS=1 \
|
||||
INSTALL_MULTIVERSION=0
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
. if defined(WITH_UNICODE)
|
||||
LIB_DEPENDS+= wx_gtk2u_core-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
|
||||
wx_gtk2u_gizmos-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-unicode-contrib
|
||||
|
||||
PKGNAMESUFFIX= -unicode
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
UNICODE=1
|
||||
WX_PYTHON_DIR= wx-${WX_VERSION}-${WXPORT}-unicode
|
||||
. else
|
||||
LIB_DEPENDS+= wx_gtk2_core-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26 \
|
||||
wx_gtk2_gizmos-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-contrib
|
||||
|
||||
WX_PYTHON_DIR=wx-${WX_VERSION}-${WXPORT}-ansi
|
||||
. endif # defined(WITH_UNICODE)
|
||||
|
||||
# plist substitutions and library dirs
|
||||
PLIST_SUB+= WX_PYTHON_DIR=${WX_PYTHON_DIR}
|
||||
LDCONFIG_DIRS+= %%PREFIX%%/%%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wx/
|
||||
|
||||
.endif # !defined(WITH_COMMON_ONLY)
|
||||
|
||||
# install arguments
|
||||
PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} ${PYDISTUTILS_BUILDARGS}
|
||||
|
||||
## Shared amongst ansi/unicode installations
|
||||
# XXX - Override do-install since I was not able to tell setup.py to
|
||||
# do the right thing
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
do-install:
|
||||
# DEMO
|
||||
@${MKDIR} ${DEMO_DIR}
|
||||
.for glob in *.py *.pyc
|
||||
.for glob in *.py *.pyc *.pyo
|
||||
@${INSTALL_DATA} ${WRKSRC}/demo/${glob} ${DEMO_DIR}
|
||||
.endfor
|
||||
.for dir in bitmaps bmp_source data
|
||||
@${MKDIR} ${DEMO_DIR}/${dir}
|
||||
.for glob in *
|
||||
. for glob in *
|
||||
@${INSTALL_DATA} ${WRKSRC}/demo/${dir}/${glob} ${DEMO_DIR}/${dir}
|
||||
. endfor
|
||||
.endfor
|
||||
# header files
|
||||
@${MKDIR} ${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython/i_files
|
||||
.for glob in *.i *.py
|
||||
@${INSTALL_DATA} ${WRKSRC}/src/${glob} \
|
||||
${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython/i_files
|
||||
.endfor
|
||||
@${INSTALL_DATA} ${WRKSRC}/include/wx/wxPython/*.h \
|
||||
${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython
|
||||
# scripts
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${PREFIX}/bin
|
||||
## wxversion
|
||||
@${MKDIR} ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}
|
||||
# wxversion script
|
||||
@${INSTALL_DATA} ${WRKSRC}/wxversion/* \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}
|
||||
.endif # defined(WITH_COMMON_ONLY)
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2-2.6-config
|
||||
|
||||
CONFIGURE_ARGS+= --enable-gtk2
|
||||
PYDISTUTILS_BUILDARGS+= WXPORT=gtk2
|
||||
PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} ${PYDISTUTILS_BUILDARGS}
|
||||
post-install:
|
||||
.if !defined(WITH_COMMON_ONLY)
|
||||
# fix installation permissions
|
||||
${CHMOD} -R a+rX \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR}
|
||||
.endif
|
||||
##
|
||||
# wxversion wxPython available list
|
||||
##
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
# create the file
|
||||
@${ECHO_CMD} -n >> \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
.else
|
||||
# add ansi/unicode to the available list
|
||||
@${ECHO_CMD} ${WX_PYTHON_DIR} >> \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
.endif
|
||||
@${CHMOD} ${SHAREMODE} \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
10
x11-toolkits/py-wxPython26/files/patch-setup.py
Normal file
10
x11-toolkits/py-wxPython26/files/patch-setup.py
Normal file
@ -0,0 +1,10 @@
|
||||
--- setup.py.orig Sat Apr 16 18:41:06 2005
|
||||
+++ setup.py Sat Oct 1 21:43:17 2005
|
||||
@@ -764,6 +764,7 @@
|
||||
EXTRA_PATH = None
|
||||
|
||||
|
||||
+EXTRA_PATH = getExtraPath(addOpts=EP_ADD_OPTS)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Do the Setup/Build/Install/Whatever
|
File diff suppressed because it is too large
Load Diff
@ -16,8 +16,6 @@ DISTNAME= ${PORTNAME}-src-${PORTVERSION}
|
||||
MAINTAINER= neal@nelson.name
|
||||
COMMENT= Python bindings for the wxWidgets/GTK GUI toolkit
|
||||
|
||||
LIB_DEPENDS= wx_gtk2_core-2.6:${PORTSDIR}/x11-toolkits/wxgtk26 \
|
||||
wx_gtk2_gizmos-2.6:${PORTSDIR}/x11-toolkits/wxgtk26-contrib
|
||||
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenGL/__init__.py:${PORTSDIR}/graphics/py-opengl
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/wxPython
|
||||
@ -25,37 +23,163 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/wxPython
|
||||
USE_GMAKE= yes
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS=yes
|
||||
PYDISTUTILS_BUILDARGS= WX_CONFIG="${WX_CONFIG}"
|
||||
PYDISTUTILS_CONFIGUREARGS+= WX_CONFIG="${WX_CONFIG}"
|
||||
USE_REINPLACE= yes
|
||||
PYDISTUTILS_BUILDARGS= \
|
||||
WX_CONFIG="${WX_CONFIG}" \
|
||||
WXPORT="${WXPORT}"
|
||||
PYDISTUTILS_CONFIGUREARGS= ${PYDISTUTILS_BUILDARGS}
|
||||
DEMO_DIR= ${PYTHONPREFIX_SITELIBDIR}/wxPython/demo
|
||||
WXPORT= gtk2
|
||||
|
||||
INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/%%PYTHON_SITELIBDIR%%/wx-2.6-gtk2-ansi/wx/
|
||||
post-extract:
|
||||
# only keep the scripts we need
|
||||
@${RM} ${WRKSRC}/scripts/*.py
|
||||
|
||||
post-patch:
|
||||
# fix python location
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
||||
${WRKSRC}/scripts/*
|
||||
@${RM} ${WRKSRC}/scripts/*.bak
|
||||
|
||||
pre-configure:
|
||||
# uphold PREFIX
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e "s|([[:space:]]*WXPREFIX[[:space:]]*=).*$$|\1'${PREFIX}'|" \
|
||||
${CONFIGURE_WRKSRC}/config.py
|
||||
|
||||
post-build:
|
||||
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/demo
|
||||
# Shared amongst ansi/unicode installations
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
. for dir in demo wxversion
|
||||
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/${dir}
|
||||
@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/${dir}
|
||||
. endfor
|
||||
.endif
|
||||
.if !defined(DEBUG_FLAGS)
|
||||
@${FIND} ${WRKSRC} -name "*.so" | ${XARGS} ${STRIP_CMD}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# are we ready for unicode?
|
||||
.if defined(WITH_UNICODE)
|
||||
. if ${OSVERSION} < 500000
|
||||
IGNORE= Systems prior to FreeBSD 5.0 do not support Unicode
|
||||
. endif
|
||||
.endif
|
||||
|
||||
# build dependencies
|
||||
.if defined(WITH_UNICODE)
|
||||
BUILD_DEPENDS+= ${WX_CONFIG}:${PORTSDIR}/x11-toolkits/wxgtk26-unicode
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2u-2.6-config
|
||||
.else
|
||||
BUILD_DEPENDS+= ${WX_CONFIG}:${PORTSDIR}/x11-toolkits/wxgtk26
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2-2.6-config
|
||||
.endif
|
||||
|
||||
# wx version
|
||||
.if exists(${WX_CONFIG})
|
||||
WX_VERSION!= ${WX_CONFIG} --release
|
||||
|
||||
PLIST_SUB+= WX_VERSION=${WX_VERSION}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
## These are not shared amongst installations
|
||||
PKGNAMESUFFIX= -common
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
INSTALL_MULTIVERSION=1
|
||||
.else
|
||||
## These are shared
|
||||
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/wxversion.py:${PORTSDIR}/x11-toolkits/py-wxPython26-common
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
NO_HEADERS=1 \
|
||||
NO_SCRIPTS=1 \
|
||||
INSTALL_MULTIVERSION=0
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
. if defined(WITH_UNICODE)
|
||||
LIB_DEPENDS+= wx_gtk2u_core-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-unicode \
|
||||
wx_gtk2u_gizmos-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-unicode-contrib
|
||||
|
||||
PKGNAMESUFFIX= -unicode
|
||||
|
||||
PYDISTUTILS_BUILDARGS+= \
|
||||
UNICODE=1
|
||||
WX_PYTHON_DIR= wx-${WX_VERSION}-${WXPORT}-unicode
|
||||
. else
|
||||
LIB_DEPENDS+= wx_gtk2_core-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26 \
|
||||
wx_gtk2_gizmos-2.6.0:${PORTSDIR}/x11-toolkits/wxgtk26-contrib
|
||||
|
||||
WX_PYTHON_DIR=wx-${WX_VERSION}-${WXPORT}-ansi
|
||||
. endif # defined(WITH_UNICODE)
|
||||
|
||||
# plist substitutions and library dirs
|
||||
PLIST_SUB+= WX_PYTHON_DIR=${WX_PYTHON_DIR}
|
||||
LDCONFIG_DIRS+= %%PREFIX%%/%%PYTHON_SITELIBDIR%%/%%WX_PYTHON_DIR%%/wx/
|
||||
|
||||
.endif # !defined(WITH_COMMON_ONLY)
|
||||
|
||||
# install arguments
|
||||
PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} ${PYDISTUTILS_BUILDARGS}
|
||||
|
||||
## Shared amongst ansi/unicode installations
|
||||
# XXX - Override do-install since I was not able to tell setup.py to
|
||||
# do the right thing
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
do-install:
|
||||
# DEMO
|
||||
@${MKDIR} ${DEMO_DIR}
|
||||
.for glob in *.py *.pyc
|
||||
.for glob in *.py *.pyc *.pyo
|
||||
@${INSTALL_DATA} ${WRKSRC}/demo/${glob} ${DEMO_DIR}
|
||||
.endfor
|
||||
.for dir in bitmaps bmp_source data
|
||||
@${MKDIR} ${DEMO_DIR}/${dir}
|
||||
.for glob in *
|
||||
. for glob in *
|
||||
@${INSTALL_DATA} ${WRKSRC}/demo/${dir}/${glob} ${DEMO_DIR}/${dir}
|
||||
. endfor
|
||||
.endfor
|
||||
# header files
|
||||
@${MKDIR} ${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython/i_files
|
||||
.for glob in *.i *.py
|
||||
@${INSTALL_DATA} ${WRKSRC}/src/${glob} \
|
||||
${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython/i_files
|
||||
.endfor
|
||||
@${INSTALL_DATA} ${WRKSRC}/include/wx/wxPython/*.h \
|
||||
${PREFIX}/include/wx-${WX_VERSION}/wx/wxPython
|
||||
# scripts
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${PREFIX}/bin
|
||||
## wxversion
|
||||
@${MKDIR} ${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}
|
||||
# wxversion script
|
||||
@${INSTALL_DATA} ${WRKSRC}/wxversion/* \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}
|
||||
.endif # defined(WITH_COMMON_ONLY)
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
WX_CONFIG= ${X11BASE}/bin/wxgtk2-2.6-config
|
||||
|
||||
CONFIGURE_ARGS+= --enable-gtk2
|
||||
PYDISTUTILS_BUILDARGS+= WXPORT=gtk2
|
||||
PYDISTUTILS_INSTALLARGS:= ${PYDISTUTILS_INSTALLARGS} ${PYDISTUTILS_BUILDARGS}
|
||||
post-install:
|
||||
.if !defined(WITH_COMMON_ONLY)
|
||||
# fix installation permissions
|
||||
${CHMOD} -R a+rX \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/${WX_PYTHON_DIR}
|
||||
.endif
|
||||
##
|
||||
# wxversion wxPython available list
|
||||
##
|
||||
.if defined(WITH_COMMON_ONLY)
|
||||
# create the file
|
||||
@${ECHO_CMD} -n >> \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
.else
|
||||
# add ansi/unicode to the available list
|
||||
@${ECHO_CMD} ${WX_PYTHON_DIR} >> \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
.endif
|
||||
@${CHMOD} ${SHAREMODE} \
|
||||
${PYTHON_SITELIBDIR:C@^${LOCALBASE}@${PREFIX}@}/wx.pth
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
10
x11-toolkits/py-wxPython28/files/patch-setup.py
Normal file
10
x11-toolkits/py-wxPython28/files/patch-setup.py
Normal file
@ -0,0 +1,10 @@
|
||||
--- setup.py.orig Sat Apr 16 18:41:06 2005
|
||||
+++ setup.py Sat Oct 1 21:43:17 2005
|
||||
@@ -764,6 +764,7 @@
|
||||
EXTRA_PATH = None
|
||||
|
||||
|
||||
+EXTRA_PATH = getExtraPath(addOpts=EP_ADD_OPTS)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Do the Setup/Build/Install/Whatever
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user