82
83 make_prog32() {
84 post_config
85 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
86 logmsg "--- make"
87 logcmd $MAKE $MAKE_JOBS DFLAGS=-32 || \
88 logerr "--- Make failed"
89 }
90
91 make_prog64() {
92 post_config
93 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
94 logmsg "--- make"
95 logcmd $MAKE $MAKE_JOBS DFLAGS=-64 DESTSHARED=/usr/lib/python2.7/lib-dynload || \
96 logerr "--- Make failed"
97 }
98
99 make_install32() {
100 make_install
101 rm $DESTDIR/usr/bin/i386/python || logerr "--- cannot remove arch hardlink"
102 # mv $DESTDIR/usr/lib/python2.7/config/Makefile $DESTDIR/usr/lib/python2.7/config/Makefile.32 || logerr "--- Makefile backup (32)"
103 }
104 make_install64() {
105 logmsg "--- make install"
106 logcmd $MAKE DESTDIR=${DESTDIR} install DESTSHARED=/usr/lib/python2.7/lib-dynload || \
107 logerr "--- Make install failed"
108 rm $DESTDIR/usr/bin/amd64/python || logerr "--- cannot remove arch hardlink"
109 rm $DESTDIR/usr/lib/python2.7/config/libpython2.7.a || logerr "--- cannot remove static lib"
110 # XXX KEBE SAYS Uncomment me eventually...
111 # (cd $DESTDIR/usr/bin && ln -s python2.7 python) || logerr "--- could not setup python softlink"
112 # XXX KEBE SAYS Python2.7 appears to honor $LIB/amd64 for 64-bit python...
113 # mv $DESTDIR/usr/lib/python2.7/config/Makefile $DESTDIR/usr/lib/python2.7/config/Makefile.64 || logerr "--- Makefile backup (64)"
114 # mv $DESTDIR/usr/lib/python2.7/config/Makefile.32 $DESTDIR/usr/lib/python2.7/config/Makefile || logerr "--- Makefile restore (32)"
115 }
116
117 install_license(){
118 logcmd cp $TMPDIR/$BUILDDIR/LICENSE $DESTDIR/license
119 }
120
121 init
122 download_source $PROG $PROG $VER
123 patch_source
124 preprep_build
125 prep_build
126 build
127 make_isa_stub
128 strip_install -x
129 install_license
130 make_package
131 clean_up
|
82
83 make_prog32() {
84 post_config
85 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
86 logmsg "--- make"
87 logcmd $MAKE $MAKE_JOBS DFLAGS=-32 || \
88 logerr "--- Make failed"
89 }
90
91 make_prog64() {
92 post_config
93 [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
94 logmsg "--- make"
95 logcmd $MAKE $MAKE_JOBS DFLAGS=-64 DESTSHARED=/usr/lib/python2.7/lib-dynload || \
96 logerr "--- Make failed"
97 }
98
99 make_install32() {
100 make_install
101 rm $DESTDIR/usr/bin/i386/python || logerr "--- cannot remove arch hardlink"
102 # Copy off _sysconfigdata.py
103 sed 's/^/ /g' < $DESTDIR/usr/lib/python2.7/_sysconfigdata.py > \
104 /tmp/_sysconfigdata-32-$$.py
105
106
107 # Move pyconfig.h header to 32-bit-specific version.
108 mv $DESTDIR/usr/include/python2.7/pyconfig.h \
109 $DESTDIR/usr/include/python2.7/pyconfig-32.h
110 }
111 make_install64() {
112 logmsg "--- make install"
113 logcmd $MAKE DESTDIR=${DESTDIR} install DESTSHARED=/usr/lib/python2.7/lib-dynload || \
114 logerr "--- Make install failed"
115 rm $DESTDIR/usr/bin/amd64/python || logerr "--- cannot remove arch hardlink"
116 rm $DESTDIR/usr/lib/python2.7/config/libpython2.7.a || logerr "--- cannot remove static lib"
117 # XXX KEBE SAYS Uncomment me eventually...
118 # (cd $DESTDIR/usr/bin && ln -s python2.7 python) || logerr "--- could not setup python softlink"
119 # Copy off _sysconfigdata.py
120 sed 's/^/ /g' < $DESTDIR/usr/lib/python2.7/_sysconfigdata.py > \
121 /tmp/_sysconfigdata-64-$$.py
122 # Generate 32/64-bit agile _sysconfigdata.py
123 echo "import sys" > $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
124 echo "" >> $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
125 echo "if sys.maxsize > 2**32:" >> \
126 $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
127 cat /tmp/_sysconfigdata-64-$$.py \
128 >> $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
129 echo "else:" >> $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
130 cat /tmp/_sysconfigdata-32-$$.py \
131 >> $DESTDIR/usr/lib/python2.7/_sysconfigdata.py
132 # Clean up the 32/64 stragglers.
133 rm -f /tmp/_sysconfigdata-*-$$.py
134 # Postprocessing steps in either IPS or the omnios-build system create
135 # the .pyo and .pyc files.
136
137 # Move pyconfig.h header to 64-bit-specific version.
138 mv $DESTDIR/usr/include/python2.7/pyconfig.h \
139 $DESTDIR/usr/include/python2.7/pyconfig-64.h
140
141 logcmd cp $SRCDIR/files/pyconfig.h $DESTDIR/usr/include/python2.7/pyconfig.h
142 }
143
144 install_license(){
145 logcmd cp $TMPDIR/$BUILDDIR/LICENSE $DESTDIR/license
146 }
147
148 init
149 download_source $PROG $PROG $VER
150 patch_source
151 preprep_build
152 prep_build
153 build
154 make_isa_stub
155 strip_install -x
156 install_license
157 make_package
158 clean_up
|