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.33 by dlange, Tue Oct 9 04:46:40 2007 UTC vs.
Revision 1.47 by andreasp, Tue May 19 09:01:05 2009 UTC

# Line 1 | Line 1
1 < ### RPM external python 2.4.2-CMS10
1 > ### RPM external python 2.4.2-CMS19
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 db4 gdbm
5 >
6 > Requires: expat bz2lib db4 gdbm
7 >
8 > %if "%{?online_release:set}" != "set"
9 > Requires: zlib openssl
10 > %endif
11 >
12   # FIXME: readline, crypt
13   # FIXME: gmp, panel, tk/tcl, x11
14  
# Line 27 | Line 33 | Patch6: python-setup.py
33   #%patch6
34   perl -p -i -e "s|#!.*/usr/local/bin/python|#!/usr/bin/env python|" Lib/cgi.py
35  
36 < %ifos darwin
36 > %if %cmsplatf == "osx105_ia32_gcc345"
37   sed 's|@PREFIX@|%i|g' < %_sourcedir/python-osx | patch -p1
38   %endif
39  
# Line 44 | Line 50 | perl -p -i -e "s|#!.*/usr/local/bin/pyth
50   # linked specifically, or could be built by ourselves, depending on
51   # whether we like to pick up system libraries or want total control.
52   mkdir -p %i/include %i/lib
53 < dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT"
53 >
54 > %if "%{?online_release:set}" != "set"
55 > %define extradirs $ZLIB_ROOT $OPENSSL_ROOT
56 > %else
57 > %define extradirs %{nil}
58 > %endif
59 >
60 > %if %cmsplatf == "osx105_ia32_gcc345"
61 > %define extradirs $ZLIB_ROOT $OPENSSL_ROOT
62 > %endif
63 >
64 > dirs="$EXPAT_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT %{extradirs}"
65 >
66   echo $dirs
67   for d in $dirs; do
68    for f in $d/include/*; do
# Line 59 | Line 77 | for d in $dirs; do
77    done
78   done
79  
80 < ./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter
81 <
82 < # Link 32-bit readline library missing in the system area on 64-bit
83 < # machines:
84 <
85 < mkdir -p %{i}/lib
86 < ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so
87 <
80 > additionalConfigureOptions=""
81 > case %cmsplatf in
82 >    osx105* )
83 >    additionalConfigureOptions="--disable-readline"
84 >    ;;
85 > esac
86 >
87 > ./configure --prefix=%i $additionalConfigureOptions --enable-shared \
88 >            --without-tkinter --disable-tkinter
89 >
90 > # The following is a kludge around the fact that the /usr/lib/libreadline.so
91 > # symlink (for 32-bit lib) is missing on the 64bit machines
92 > %if "%cmsplatf" == "slc4_ia32_gcc345"
93 >  mkdir -p %{i}/lib
94 >  ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so
95 > %endif
96 > %if "%cmsplatf" == "slc4_ia32_gcc412"
97 >  mkdir -p %{i}/lib
98 >  ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so
99 > %endif
100   make %makeprocesses
101  
102   %install
103   make install
104   %define pythonv %(echo %realversion | cut -d. -f 1,2)
105  
106 < #if [ $(uname) = Darwin ]; then
107 <  # make install prefix=%i
108 <  # (cd Misc; /bin/rm -rf RPM)
109 <  # mkdir -p %i/share/doc/%n
110 <  # cp -R Demo Doc %i/share/doc/%n
111 <  # cp -R Misc Tools %i/lib/python%{pythonv}
112 < #  gcc -dynamiclib -all_load -single_module \
113 < #    -framework System -framework CoreServices -framework Foundation \
114 < #    %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \
115 < #    -undefined dynamic_lookup \
116 < #    -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
117 < #    -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
118 < #    -current_version %{pythonv} -compatibility_version %{pythonv} -ldl
119 < #  ln -s libpython%{pythonv}.dylib %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib # for boost
120 <  # (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig;
121 <  #  sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig)
122 < #fi
106 > # if [ $(uname) = Darwin ]; then
107 > #  # make install prefix=%i
108 > #  # (cd Misc; /bin/rm -rf RPM)
109 > #  # mkdir -p %i/share/doc/%n
110 > #  # cp -R Demo Doc %i/share/doc/%n
111 > #  # cp -R Misc Tools %i/lib/python%{pythonv}
112 >  gcc -dynamiclib -all_load -single_module \
113 >    -framework System -framework CoreServices -framework Foundation \
114 >    %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \
115 >    -undefined dynamic_lookup \
116 >    -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
117 >    -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \
118 >    -current_version %{pythonv} -compatibility_version %{pythonv} -ldl
119 >   (cd %i/lib/; ln -s python%{pythonv}/config/libpython%{pythonv}.dylib libpython%{pythonv}.dylib )
120 > # (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig;
121 > #  #  sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig)
122 > # fi
123  
124   perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \
125                      %{i}/bin/pydoc \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines