ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/python.spec
(Generate patch)

Comparing COMP/CMSDIST/python.spec (file contents):
Revision 1.5 by eulisse, Mon Apr 24 22:22:12 2006 UTC vs.
Revision 1.18 by eulisse, Mon Aug 14 13:00:49 2006 UTC

# Line 2 | Line 2
2   ## INITENV +PATH PATH %i/bin
3   ## INITENV +PATH LD_LIBRARY_PATH %i/lib
4   # OS X patches and build fudging stolen from fink
5 < Requires: zlib expat openssl bz2lib
6 < # FIXME: readline, ncurses, crypt, various [ng]dbm, db-*, db[1-3],
5 > Requires: zlib expat openssl bz2lib db4 gdbm openssl
6 > # FIXME: readline, crypt
7   # FIXME: gmp, panel, tk/tcl, x11
8  
9   Source0: http://www.python.org/ftp/%n/%v/Python-%v.tgz
10 < #Patch0: python-osx
10 > Patch0: python-Include-pyport.h
11 > Patch1: python-Lib-plat-mac-applesingle.py
12 > Patch2: python-Lib-site.py
13 > Patch3: python-Mac-OSX-Makefile
14 > Patch4: python-Makefile.pre.in
15 > Patch5: python-configure
16 > Patch6: python-setup.py
17  
18   %prep
19   %setup -n Python-%v
20 + #%patch0
21 + #%patch1
22 + #%patch2
23 + #%patch3
24 + #%patch4
25 + #%patch5
26 + #%patch6
27   perl -p -i -e "s|#!.*/usr/local/bin/python|#!/usr/bin/env python|" Lib/cgi.py
28  
29   %ifos darwin
# Line 30 | Line 43 | perl -p -i -e "s|#!.*/usr/local/bin/pyth
43   # linked specifically, or could be built by ourselves, depending on
44   # whether we like to pick up system libraries or want total control.
45   mkdir -p %i/include %i/lib
46 < dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT"
46 > dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT"
47 > echo $dirs
48   for d in $dirs; do
49    for f in $d/include/*; do
50      [ -f $f ] || continue
# Line 44 | Line 58 | for d in $dirs; do
58    done
59   done
60  
61 < ./configure --prefix=%i --enable-shared --without-tk --disable-tk --without-readline
61 > ./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline
62   make %makeprocesses
63  
64   %install
65   make install
66 < if [ $(uname) = Darwin ]; then
66 > %define pythonv %(echo %v | cut -d. -f 1,2)
67 >
68 > #if [ $(uname) = Darwin ]; then
69    # make install prefix=%i
70    # (cd Misc; /bin/rm -rf RPM)
71    # mkdir -p %i/share/doc/%n
72    # cp -R Demo Doc %i/share/doc/%n
73 <  # cp -R Misc Tools %i/lib/python2.3
74 <  cc -dynamiclib -all_load -single_module \
75 <    -framework System -framework CoreServices -framework Foundation \
76 <    %i/lib/python2.3/config/libpython2.3.a \
77 <    -o %i/lib/python2.3/config/libpython2.3.dylib \
78 <    -install_name %i/lib/python2.3/config/libpython2.3.dylib \
79 <    -current_version 2.3 -compatibility_version 2.3 -ldl
80 <  ln -s libpython2.3.dylib %i/lib/python2.3/config/libpython23.dylib # for boost
81 <  # (cd %i/lib/python2.3/config; mv Makefile Makefile.orig;
73 >  # cp -R Misc Tools %i/lib/python%{pythonv}
74 > #  gcc -dynamiclib -all_load -single_module \
75 > #    -framework System -framework CoreServices -framework Foundation \
76 > #    %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \
77 > #    -undefined dynamic_lookup \
78 > #    -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
79 > #    -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
80 > #    -current_version %{pythonv} -compatibility_version %{pythonv} -ldl
81 > #  ln -s libpython%{pythonv}.dylib %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib # for boost
82 >  # (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig;
83    #  sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig)
84 < fi
84 > #fi
85 >
86 > perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \
87 >                    %{i}/bin/pydoc \
88 >                    %{i}/bin/smtpd.py \
89 >                    %{i}/lib/python2.4/bsddb/dbshelve.py \
90 >                    %{i}/lib/python2.4/test/test_bz2.py \
91 >                    %{i}/lib/python2.4/test/test_largefile.py \
92 >                    %{i}/lib/python2.4/test/test_optparse.py
93 > # boost.spec rfio.spec
94 > #
95 > #
96 > rm  `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'`
97 > rm  `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'`
98 > %post
99 > find $RPM_INSTALL_PREFIX/%pkgrel/lib -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" | xargs -n2 ln -sf

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines