Print this page
Remove Python 2.6
| Split |
Close |
| Expand all |
| Collapse all |
--- old/build/libxml2/build.sh
+++ new/build/libxml2/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
|
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
28 28 . ../../lib/functions.sh
29 29
30 30 PROG=libxml2 # App name
31 31 VER=2.9.4 # App version
32 32 PKG=library/libxml2 # Package name (without prefix)
33 33 SUMMARY="$PROG - XML C parser and toolkit"
34 34 DESC="$SUMMARY"
35 35
36 36 DEPENDS_IPS="compress/xz system/library/gcc-5-runtime library/zlib"
37 37 BUILD_DEPENDS_IPS="$DEPENDS_IPS developer/sunstudio12.1"
38 +# Keep python tied to the version we're supporting, to aid future changes.
39 +CONFIGURE_OPTS="--with-python=/usr/bin/python2.7"
38 40
39 41 fix_python_install() {
40 - logcmd mkdir -p $DESTDIR/usr/lib/python2.6/vendor-packages
41 - logcmd mv $DESTDIR/usr/lib/python2.6/site-packages/* $DESTDIR/usr/lib/python2.6/vendor-packages/ || logerr "failed relocating python install"
42 - logcmd rm -f $DESTDIR/usr/lib/python2.6/vendor-packages/64/drv_libxml2.py
43 - logcmd rm -rf $DESTDIR/usr/lib/python2.6/site-packages || logerr "failed removing bad python install"
42 + logcmd mkdir -p $DESTDIR/usr/lib/python2.7/vendor-packages
43 + logcmd mv $DESTDIR/usr/lib/python2.7/site-packages/* $DESTDIR/usr/lib/python2.7/vendor-packages/ || logerr "failed relocating python install"
44 + logcmd rm -f $DESTDIR/usr/lib/python2.7/vendor-packages/64/drv_libxml2.py
45 + logcmd rm -rf $DESTDIR/usr/lib/python2.7/site-packages || logerr "failed removing bad python install"
44 46 logcmd rm -rf $DESTDIR/usr/include/amd64 || logerr "failed removing bad includes install"
45 47 }
46 48
47 49 install_license(){
48 50 logcmd cp $TMPDIR/$BUILDDIR/COPYING $DESTDIR/license
49 51 }
50 52
51 53 make_prog64() {
52 54 logcmd perl -pi -e 's#(\$CC.*\$compiler_flags)#$1 -nostdlib#g;' libtool ||
53 55 logerr "libtool patch failed"
54 56 logcmd gmake || logerr "Make failed"
55 57 }
56 58
57 59 make_prog32() {
58 60 logcmd perl -pi -e 's#(\$CC.*\$compiler_flags)#$1 -nostdlib#g;' libtool ||
59 61 logerr "libtool patch failed"
60 62 logcmd gmake || logerr "Make failed"
61 63 }
62 64
63 65 make_install64() {
|
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
64 66 logmsg "--- make install"
65 67 logcmd perl -pi -e 's#(\/site-packages)#$1\/64#g;' python/.libs/libxml2mod.la ||
66 68 logerr "libtool libxml2mod.la patch failed"
67 69 logcmd perl -pi -e 's#(\/site-packages)#$1\/64#g;' python/libxml2mod.la ||
68 70 logerr "libtool libxml2mod.la patch failed"
69 71
70 72 logcmd perl -pi -e 's#(\/site-packages)#$1\/64#g;' python/.libs/libxml2mod.lai ||
71 73 logerr "libtool libxml2mod.la patch failed"
72 74
73 75 logcmd $MAKE DESTDIR=${DESTDIR} \
74 - PYTHON_SITE_PACKAGES=/usr/lib/python2.6/site-packages/64 \
76 + PYTHON_SITE_PACKAGES=/usr/lib/python2.7/site-packages/64 \
75 77 install || \
76 78 logerr "--- Make install failed"
77 79 }
78 80
79 81 # Relocate the libs to /lib, to match upstream
80 82 move_libs() {
81 83 logcmd mkdir -p $DESTDIR/lib/amd64
82 84 logcmd mv $DESTDIR/usr/lib/lib* $DESTDIR/lib || \
83 85 logerr "failed to move libs (32-bit)"
84 86 logcmd mv $DESTDIR/usr/lib/amd64/lib* $DESTDIR/lib/amd64 || \
85 87 logerr "failed to move libs (64-bit)"
86 88 pushd $DESTDIR/usr/lib >/dev/null
87 89 logcmd ln -s ../../lib/libxml2.so.$VER libxml2.so
88 90 logcmd ln -s ../../lib/libxml2.so.$VER libxml2.so.2
89 91 logcmd ln -s ../../lib/libxml2.so.$VER libxml2.so.$VER
90 92 popd >/dev/null
91 93 pushd $DESTDIR/usr/lib/amd64 >/dev/null
92 94 logcmd ln -s ../../../lib/64/libxml2.so.$VER libxml2.so
93 95 logcmd ln -s ../../../lib/64/libxml2.so.$VER libxml2.so.2
94 96 logcmd ln -s ../../../lib/64/libxml2.so.$VER libxml2.so.$VER
95 97 popd>/dev/null
96 98 }
97 99
98 100 init
99 101 download_source $PROG $PROG $VER
100 102 patch_source
101 103 prep_build
102 104 build
103 105 make_lintlibs xml2 /usr/lib /usr/include/libxml2 "libxml/*.h"
104 106 fix_python_install
105 107 make_isa_stub
106 108 install_license
107 109 move_libs
108 110 make_package
109 111 clean_up
|
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX