Print this page
Other packages up to gcc51 runtime
| Split |
Close |
| Expand all |
| Collapse all |
--- old/build/python26/build.sh
+++ new/build/python26/build.sh
1 1 #!/usr/bin/bash
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License, Version 1.0 only
7 7 # (the "License"). You may not use this file except in compliance
8 8 # with the License.
9 9 #
10 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 11 # or http://www.opensolaris.org/os/licensing.
12 12 # See the License for the specific language governing permissions
13 13 # and limitations under the License.
14 14 #
15 15 # When distributing Covered Code, include this CDDL HEADER in each
16 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 17 # If applicable, add the following below this CDDL HEADER, with the
18 18 # fields enclosed by brackets "[]" replaced with your own identifying
19 19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 20 #
21 21 # CDDL HEADER END
22 22 #
23 23 #
24 24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 27 # Load support functions
28 28 . ../../lib/functions.sh
29 29
|
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
30 30 CC=gcc
31 31 CXX=g++
32 32
33 33 PROG=Python
34 34 VER=2.6.8
35 35 PKG=runtime/python-26
36 36 SUMMARY="$PROG"
37 37 DESC="$SUMMARY"
38 38
39 39 BUILD_DEPENDS_IPS="developer/build/autoconf"
40 -DEPENDS_IPS="system/library/gcc-4-runtime library/zlib library/libffi@$FFIVERS
40 +DEPENDS_IPS="system/library/gcc-5-runtime library/zlib library/libffi@$FFIVERS
41 41 library/readline database/sqlite-3 compress/bzip2 library/libxml2
42 42 library/ncurses library/security/openssl"
43 43
44 44 export CCSHARED="-fPIC"
45 45 CFLAGS="$CFLAGS -std=c99"
46 46 LDFLAGS32="-L/usr/gnu/lib -R/usr/gnu/lib"
47 47 LDFLAGS64="-L/usr/gnu/lib/amd64 -R/usr/gnu/lib/amd64"
48 48 CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses -D_LARGEFILE64_SOURCE"
49 49 CPPFLAGS32="-I/usr/lib/libffi-$FFIVERS/include"
50 50 CPPFLAGS64="-I/usr/lib/amd64/libffi-$FFIVERS/include"
51 51 CONFIGURE_OPTS="--enable-shared
52 52 --with-system-ffi
53 53 ac_cv_opt_olimit_ok=no
54 54 ac_cv_olimit_ok=no"
55 55
56 56 preprep_build() {
57 57 pushd $TMPDIR/$BUILDDIR > /dev/null || logerr "Cannot change to build directory"
58 58 /usr/bin/autoheader || logerr "autoheaer failed"
59 59 /usr/bin/autoconf || logerr "autoreconf failed"
60 60 popd > /dev/null
61 61 }
62 62
63 63 post_config() {
64 64 pushd $TMPDIR/$BUILDDIR > /dev/null || logerr "Cannot change to build directory"
65 65 perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h
66 66 perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h
67 67 perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' pyconfig.h
68 68 popd > /dev/null
69 69 }
70 70
71 71 configure64() {
72 72 logmsg "--- configure (64-bit)"
73 73 CFLAGS="$CFLAGS $CFLAGS64" \
74 74 CXXFLAGS="$CXXFLAGS $CXXFLAGS64" \
75 75 CPPFLAGS="$CPPFLAGS $CPPFLAGS64" \
76 76 LDFLAGS="$LDFLAGS $LDFLAGS64" \
77 77 CC="$CC -m64" CXX=$CXX \
78 78 logcmd $CONFIGURE_CMD $CONFIGURE_OPTS_64 \
79 79 $CONFIGURE_OPTS || \
80 80 logerr "--- Configure failed"
81 81 }
82 82
83 83 make_prog32() {
84 84 post_config
85 85 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
86 86 logmsg "--- make"
87 87 logcmd $MAKE $MAKE_JOBS DFLAGS=-32 || \
88 88 logerr "--- Make failed"
89 89 }
90 90
91 91 make_prog64() {
92 92 post_config
93 93 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
94 94 logmsg "--- make"
95 95 logcmd $MAKE $MAKE_JOBS DFLAGS=-64 DESTSHARED=/usr/lib/python2.6/lib-dynload || \
96 96 logerr "--- Make failed"
97 97 }
98 98
99 99 make_install32() {
100 100 make_install
101 101 rm $DESTDIR/usr/bin/i386/python || logerr "--- cannot remove arch hardlink"
102 102 mv $DESTDIR/usr/lib/python2.6/config/Makefile $DESTDIR/usr/lib/python2.6/config/Makefile.32 || logerr "--- Makefile backup (32)"
103 103 }
104 104 make_install64() {
105 105 logmsg "--- make install"
106 106 logcmd $MAKE DESTDIR=${DESTDIR} install DESTSHARED=/usr/lib/python2.6/lib-dynload || \
107 107 logerr "--- Make install failed"
108 108 rm $DESTDIR/usr/bin/amd64/python || logerr "--- cannot remove arch hardlink"
109 109 rm $DESTDIR/usr/lib/python2.6/config/libpython2.6.a || logerr "--- cannot remove static lib"
110 110 (cd $DESTDIR/usr/bin && ln -s python2.6 python) || logerr "--- could not setup python softlink"
111 111 mv $DESTDIR/usr/lib/python2.6/config/Makefile $DESTDIR/usr/lib/python2.6/config/Makefile.64 || logerr "--- Makefile backup (64)"
112 112 mv $DESTDIR/usr/lib/python2.6/config/Makefile.32 $DESTDIR/usr/lib/python2.6/config/Makefile || logerr "--- Makefile restore (32)"
113 113 }
114 114
115 115 install_license(){
116 116 logcmd cp $TMPDIR/$BUILDDIR/LICENSE $DESTDIR/license
117 117 }
118 118
119 119 init
120 120 download_source $PROG $PROG $VER
121 121 patch_source
122 122 preprep_build
123 123 prep_build
124 124 build
125 125 make_isa_stub
126 126 strip_install -x
127 127 install_license
128 128 make_package
129 129 clean_up
|
↓ open down ↓ |
79 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX