components/python/python26/Makefile
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Tue, 22 Mar 2011 16:12:59 -0700
changeset 145 1e2390f5555e
parent 127 3e3c266b3a81
child 181 87e11e685b1f
permissions -rw-r--r--
7020836 revert workaround in 7014413 now that pkglint doesn't complain 7028457 userland python2.6 should autogenerate dependencies 7028462 historical packaging should move to its own space 7028868 userland build should create architecture specific repositories 7028867 full userland build should refresh its repo catalog 7028870 userland's default publisher should be 'userland'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 118
diff changeset
    23
include ../../../make-rules/shared-macros.mk
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_NAME=		Python
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_VERSION=	2.6.4
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_ARCHIVE_HASH=	sha1:bee572680d1966501247cb2b26e0e51f94d1cd13
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	http://python.org/ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
include $(WS_TOP)/make-rules/prep.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
include $(WS_TOP)/make-rules/configure.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
include $(WS_TOP)/make-rules/ips.mk
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
118
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    38
# We patch auto* files, so regenerate headers and configure
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    39
COMPONENT_PREP_ACTION = \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    40
	(cd $(@D) ; autoheader ; autoconf)
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    41
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    42
# This seems horribly wrong, but these defines break the ability to build c99
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    43
# compliant modules or with gcc.
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    44
COMPONENT_POST_CONFIGURE_ACTION = \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    45
	(cd $(@D) ; \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    46
	 perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    47
	 perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h ; \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    48
	 perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' \
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    49
			pyconfig.h)
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    50
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
# python-config
118
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    53
CC +=	$(CFLAGS)
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    55
C99MODE=
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    56
CPPFLAGS +=	-IPython
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    57
118
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    58
# so we find the ncurses headers
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    59
CPPFLAGS +=	-I/usr/include/ncurses
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    60
# enable large files how they did in JDS
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    61
CPPFLAGS +=	-D_LARGEFILE64_SOURCE
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    62
# libffi for _ctypes
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    63
CPPFLAGS +=	$(shell pkg-config --cflags-only-I libffi)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    64
118
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    65
CCFLAGS +=		-norunpath -compat=5
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    66
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    67
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    68
CONFIGURE_OPTIONS  +=		--enable-shared
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    69
CONFIGURE_OPTIONS  +=		--disable-static
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    70
CONFIGURE_OPTIONS  +=		--with-system-ffi
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    71
CONFIGURE_OPTIONS  +=		--without-gcc
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    72
CONFIGURE_OPTIONS  +=		ac_cv_opt_olimit_ok=no
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    73
CONFIGURE_OPTIONS  +=		ac_cv_olimit_ok=no
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    74
CONFIGURE_OPTIONS  +=		CPPFLAGS="$(CPPFLAGS)"
118
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    75
CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    76
CONFIGURE_OPTIONS  +=		CCSHARED="$(CC_PIC)"
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    77
CONFIGURE_OPTIONS  +=		CXX="$(CCC)"
049f3b3d6903 7016735 move mercurial from sfw to userland (fix module building)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 99
diff changeset
    78
CONFIGURE_OPTIONS  +=		CXXFLAGS="$(CCFLAGS)"
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    79
CONFIGURE_OPTIONS  +=		DFLAGS="-$(BITS)"
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    80
COMPONENT_BUILD_ENV  +=		DFLAGS="-$(BITS)"
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    81
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    82
# 64 bit shared objects need to go in a 64-bit directory
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    83
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.6/lib-dynload
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    84
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    85
# common targets
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    86
build:		$(BUILD_32_and_64)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    87
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    88
$(INSTALL_32):	$(INSTALL_64)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    89
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    90
install:	$(INSTALL_32_and_64)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    91
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    92
test:	$(TEST_32_and_64)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    93
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    94
$(BUILD_DIR)/%/.tested:	$(BUILD_DIR)/%/.built
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    95
	(cd $(@D) ; gmake test || exit 0) 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    96
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    97
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    98
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    99
include $(WS_TOP)/make-rules/depend.mk