View | Details | Raw Unified | Return to bug 36537
Collapse All | Expand All

(-)bsd.port.mk (-1 / +5 lines)
Lines 778-784 Link Here
778
.include "${PORTSDIR}/Mk/bsd.emacs.mk"
778
.include "${PORTSDIR}/Mk/bsd.emacs.mk"
779
.endif
779
.endif
780
780
781
.if defined(USE_PYTHON) || defined(PYTHON_VERSION)
781
.if defined(USE_PYTHON) || defined(PYTHON_VERSION) || defined(USE_PYDISTUTILS)
782
.include "${PORTSDIR}/Mk/bsd.python.mk"
782
.include "${PORTSDIR}/Mk/bsd.python.mk"
783
.endif
783
.endif
784
784
Lines 1035-1040 Link Here
1035
.if defined(GNU_CONFIGURE)
1035
.if defined(GNU_CONFIGURE)
1036
CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
1036
CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
1037
.endif
1037
.endif
1038
.endif
1039
1040
.if defined(USE_PYTHON) || defined(PYTHON_VERSION) || defined(USE_PYDISTUTILS)
1041
.include "${PORTSDIR}/Mk/bsd.python.mk"
1038
.endif
1042
.endif
1039
1043
1040
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
1044
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
(-)bsd.python.mk (-6 / +38 lines)
Lines 4-19 Link Here
4
# $FreeBSD: ports/Mk/bsd.python.mk,v 1.19 2002/01/22 12:53:27 tg Exp $
4
# $FreeBSD: ports/Mk/bsd.python.mk,v 1.19 2002/01/22 12:53:27 tg Exp $
5
#
5
#
6
6
7
.if !defined(Python_Include)
7
.if !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)
8
8
9
Python_Include=				bsd.python.mk
9
Python_Pre_Include=			bsd.python.mk
10
Python_Include_MAINTAINER=	tg@FreeBSD.org
10
Python_Include_MAINTAINER=	tg@FreeBSD.org
11
11
12
# This file contains some variable definitions that are supposed to
12
# This file contains some variable definitions that are supposed to
13
# make your life easier when dealing with ports related to the Python
13
# make your life easier when dealing with ports related to the Python
14
# language. It's automatically included when USE_PYTHON or PYTHON_VERSION
14
# language. It's automatically included when USE_PYTHON, PYTHON_VERSION or
15
# is defined in the ports' makefile. Define PYTHON_VERSION to override the
15
# USE_PYDISTUTILS is defined in the ports' makefile. Define PYTHON_VERSION
16
# defaults that USE_PYTHON would give you.
16
# to override the defaults that USE_PYTHON would give you.
17
#
17
#
18
# The variables:
18
# The variables:
19
#
19
#
Lines 71-76 Link Here
71
#
71
#
72
# PYXML:		Dependency line for the XML entension. As of Python-2.0,
72
# PYXML:		Dependency line for the XML entension. As of Python-2.0,
73
#				this extension is in the base distribution.
73
#				this extension is in the base distribution.
74
#
75
# USE_PYDISTUTILS:	Use distutils as do-build and do-install target.
76
#
77
# PYDISTUTILS_BUILDARGS:	Arguments to build with distutils.
78
#
79
# PYDISTUTILS_INSTALLARGS:	Arguments to install with distutils.
80
#
74
81
75
# XXX Ugly hack, but running python is the best way to determine the
82
# XXX Ugly hack, but running python is the best way to determine the
76
# currently installed version. If Python is not installed, a default 
83
# currently installed version. If Python is not installed, a default 
Lines 161-166 Link Here
161
PYTHON_PKGNAMEPREFIX=	py${PYTHON_SUFFIX}-
168
PYTHON_PKGNAMEPREFIX=	py${PYTHON_SUFFIX}-
162
PYTHON_PLATFORM!=		expr ${OPSYS:L}${OSREL} : '\(.*\)\.'
169
PYTHON_PLATFORM!=		expr ${OPSYS:L}${OSREL} : '\(.*\)\.'
163
PYTHON_SITELIBDIR=		${PYTHON_LIBDIR}/site-packages
170
PYTHON_SITELIBDIR=		${PYTHON_LIBDIR}/site-packages
171
PYDISTUTILS_INSTALLARGS?=	-c -O1 --prefix=${PREFIX}
164
172
165
# dependencies
173
# dependencies
166
PYTHON_NO_DEPENDS?=		NO
174
PYTHON_NO_DEPENDS?=		NO
Lines 168-174 Link Here
168
.if ${PYTHON_NO_DEPENDS} == "NO"
176
.if ${PYTHON_NO_DEPENDS} == "NO"
169
BUILD_DEPENDS+=	${PYTHON_CMD}:${PYTHON_PORTSDIR}
177
BUILD_DEPENDS+=	${PYTHON_CMD}:${PYTHON_PORTSDIR}
170
RUN_DEPENDS+=	${PYTHON_CMD}:${PYTHON_PORTSDIR}
178
RUN_DEPENDS+=	${PYTHON_CMD}:${PYTHON_PORTSDIR}
179
180
.if defined(USE_PYDISTUTILS) && ${PYTHON_REL} < 200
181
BUILD_DEPENDS+=	${PYDISTUTILS}
171
.endif
182
.endif
183
.endif		# ${PYTHON_NO_DEPENDS} == "NO"
172
184
173
# pkg/PLIST substrings
185
# pkg/PLIST substrings
174
PLIST_SUB+=		PYTHON_VERSION=${PYTHON_VERSION} \
186
PLIST_SUB+=		PYTHON_VERSION=${PYTHON_VERSION} \
Lines 176-179 Link Here
176
188
177
# XXX Hm, should I export some of the variables above to *_ENV?
189
# XXX Hm, should I export some of the variables above to *_ENV?
178
190
179
.endif		# !defined(Python_Include)
191
.endif		# !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)
192
193
194
.if defined(_POSTMKINCLUDED) && !defined(Python_Post_Include)
195
196
Python_Post_Include=			bsd.python.mk
197
198
# py-distutils support
199
.if defined(USE_PYDISTUTILS)
200
.if !target(do-build)
201
do-build:
202
	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py build ${PYDISTUTILS_BUILDARGS})
203
.endif
204
205
.if !target(do-install)
206
do-install:
207
	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py install ${PYDISTUTILS_INSTALLARGS})
208
.endif
209
.endif		# defined(USE_PYDISTUTILS)
210
211
.endif		# defined(_POSTMKINCLUDED) && !defined(Python_Post_Include)
(-)py-snmp/Makefile (-8 / +2 lines)
Lines 15-32 Link Here
15
15
16
MAINTAINER=	perky@fallin.lv
16
MAINTAINER=	perky@fallin.lv
17
17
18
USE_PYTHON=	yes
18
USE_PYDISTUTILS=yes
19
EXAMPLESDIR=	${PREFIX}/share/examples/py-snmp
19
EXAMPLESDIR=	${PREFIX}/share/examples/py-snmp
20
DOCSDIR=	${PREFIX}/share/doc/py-snmp
20
DOCSDIR=	${PREFIX}/share/doc/py-snmp
21
SETUP_CMD=	cd ${WRKSRC} && ${PYTHON_CMD} setup.py
22
23
do-build:
24
	${SETUP_CMD} build
25
26
do-install:
27
	${SETUP_CMD} install -c -O1 --prefix=${PREFIX}
28
21
29
.if !defined(NOPORTDOCS)
22
.if !defined(NOPORTDOCS)
23
post-install:
30
	${MKDIR} ${EXAMPLESDIR}
24
	${MKDIR} ${EXAMPLESDIR}
31
	${INSTALL_SCRIPT} ${WRKSRC}/examples/* ${EXAMPLESDIR}
25
	${INSTALL_SCRIPT} ${WRKSRC}/examples/* ${EXAMPLESDIR}
32
	${MKDIR} ${DOCSDIR}
26
	${MKDIR} ${DOCSDIR}

Return to bug 36537