diff --git a/utils/wxPython/distrib/.cvsignore b/utils/wxPython/distrib/.cvsignore index ac95d78017..3f2a47b337 100644 --- a/utils/wxPython/distrib/.cvsignore +++ b/utils/wxPython/distrib/.cvsignore @@ -3,5 +3,4 @@ *.zip build.pyc filelist -wxPython.spec wxp2.wse diff --git a/utils/wxPython/distrib/.rpmrc b/utils/wxPython/distrib/.rpmrc index 1fbb510693..46a92a2043 100644 --- a/utils/wxPython/distrib/.rpmrc +++ b/utils/wxPython/distrib/.rpmrc @@ -1,5 +1,5 @@ -sourcedir : . -builddir : . -rpmdir : . -srcrpmdir : . +sourcedir: . +builddir: . +rpmdir: . +srcrpmdir: . diff --git a/utils/wxPython/distrib/wxPython.rsp b/utils/wxPython/distrib/wxPython.rsp index 9f1f3fd005..1687e5000f 100644 --- a/utils/wxPython/distrib/wxPython.rsp +++ b/utils/wxPython/distrib/wxPython.rsp @@ -11,8 +11,11 @@ wxPython/demo/*.xml wxPython/demo/data/*.png wxPython/demo/data/*.htm wxPython/demo/data/*.bmp +wxPython/demo/data/*.i +wxPython/demo/data/*.h wxPython/distrib/build.py +wxPython/distrib/wxPython.spec wxPython/lib/*.py wxPython/lib/*.txt @@ -88,6 +91,7 @@ wxPython/modules/utils/gtk/*.h wxPython/modules/utils/gtk/*.py wxPython/modules/ogl/build.cfg +wxPython/modules/ogl/*.txt wxPython/modules/ogl/*.i wxPython/modules/ogl/*.py wxPython/modules/ogl/*.cpp @@ -98,7 +102,28 @@ wxPython/modules/ogl/*.rc wxPython/modules/ogl/*.cpp wxPython/modules/ogl/*.h wxPython/modules/ogl/*.py - +wxPython/modules/ogl/contrib/include/wx/ogl/*.h +wxPython/modules/ogl/contrib/src/ogl/*.cpp + + +wxPython/modules/stc/build.cfg +wxPython/modules/stc/*.txt +wxPython/modules/stc/*.i +wxPython/modules/stc/*.py +wxPython/modules/stc/*.cpp +wxPython/modules/stc/*.c +wxPython/modules/stc/*.h +wxPython/modules/stc/*.def +wxPython/modules/stc/*.rc +wxPython/modules/stc/*.cpp +wxPython/modules/stc/*.h +wxPython/modules/stc/*.py +wxPython/modules/stc/contrib/include/wx/stc/*.h +wxPython/modules/stc/contrib/src/stc/*.h +wxPython/modules/stc/contrib/src/stc/*.cpp +wxPython/modules/stc/contrib/src/stc/scintilla/include/*.h +wxPython/modules/stc/contrib/src/stc/scintilla/src/*.h +wxPython/modules/stc/contrib/src/stc/scintilla/src/*.cxx diff --git a/utils/wxPython/distrib/wxPython.spec b/utils/wxPython/distrib/wxPython.spec new file mode 100644 index 0000000000..baa0607837 --- /dev/null +++ b/utils/wxPython/distrib/wxPython.spec @@ -0,0 +1,76 @@ +%define pref /usr +%define ver 2.1.15 +%define rpmver 1 + +Summary: Cross platform GUI toolkit for use with the Python language. +Name: wxPython +Version: %{ver} +Release: %{rpmver} +Copyright: wxWindows License +Group: Development/Languages/Python +Source: wxPython-%{ver}.tar.gz +Packager: Robin Dunn +URL:http://alldunn.com/wxPython/index.html +Vendor: Total Control Software +Requires: python >= 1.5.1 +##BuildRoot: /tmp/wxPython-build +##Prefix: /usr/lib/python1.5/site-packages + +Prefix: %{pref} + +%description +wxPython is a GUI toolkit for Python that is a wrapper around the +wxWindows C++ GUI library. wxPython provides a large variety of +window types and controls, all imlemented with a native look and +feel (and runtime speed) on the platforms it is supported on. + +%prep + +%setup + +%build +cd src +python ../distrib/build.py -b +cd ../modules/html +python ../../distrib/build.py -b +cd ../utils +python ../../distrib/build.py -b +cd ../glcanvas +python ../../distrib/build.py -b +cd ../ogl +python ../../distrib/build.py -b +cd ../stc +python ../../distrib/build.py -b + + +%install +cd src +python ../distrib/build.py -i +cd ../modules/html +python ../../distrib/build.py -i +cd ../utils +python ../../distrib/build.py -i +cd ../glcanvas +python ../../distrib/build.py -i +cd ../ogl +python ../../distrib/build.py -i +cd ../stc +python ../../distrib/build.py -i + + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files +%doc BUILD.txt CHANGES.txt README.txt gpl.txt lgpl.txt licence.txt licendoc.txt preamble.txt +%{pref}/lib/libwxPyHelpers.so +%{pref}/lib/python1.5/site-packages/wxPython + + + + + + diff --git a/utils/wxPython/modules/ogl/README.txt b/utils/wxPython/modules/ogl/README.txt new file mode 100644 index 0000000000..7f97e87d0f --- /dev/null +++ b/utils/wxPython/modules/ogl/README.txt @@ -0,0 +1,7 @@ +Since OGL is not always bundled with distributions of wxWindows, in +order for it to be a standard part of wxPython I need to bundle it +here. The contents of the contrib directory are copies of the +relevant parts of the main contrib directory in wxWindows. The +build.py script in this directory will also build the needed files +from there, so you no longer have to worry about aquiring and building +additional libraries beyond wxWindows itself. diff --git a/utils/wxPython/modules/ogl/build.cfg b/utils/wxPython/modules/ogl/build.cfg index f0c1ba66af..cd3a50e750 100644 --- a/utils/wxPython/modules/ogl/build.cfg +++ b/utils/wxPython/modules/ogl/build.cfg @@ -9,11 +9,37 @@ SOURCES = ['oglhelpers.cpp'] OTHERCFLAGS = '-I$(WXWIN)/contrib/include' if sys.platform == 'win32': + OTHERCFLAGS = '-I$(WXWIN)/contrib/include' OTHERLIBS = '$(WXWIN)/contrib/lib/ogl$(LIBEXT).lib' else: - OTHERLIBS = '-logl' + OTHERCFLAGS = '-Icontrib/include' + SOURCES = SOURCES + [ + 'contrib/src/ogl/basic.cpp', + 'contrib/src/ogl/bmpshape.cpp', + 'contrib/src/ogl/composit.cpp', + 'contrib/src/ogl/divided.cpp', + 'contrib/src/ogl/lines.cpp', + 'contrib/src/ogl/misc.cpp', + 'contrib/src/ogl/basic2.cpp', + 'contrib/src/ogl/canvas.cpp', + 'contrib/src/ogl/constrnt.cpp', + 'contrib/src/ogl/drawn.cpp', + 'contrib/src/ogl/mfutils.cpp', + 'contrib/src/ogl/ogldiag.cpp', + ] + DEFAULTRULE = 'default: contrib $(GENCODEDIR) $(TARGET)' + + + OTHERRULES = """ +%.o : contrib/src/ogl/%.cpp + $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< + +contrib : + ln -s $(WXWIN)/contrib contrib + +""" + -#OTHERSWIGFLAGS = '-stat' SWIGDEPS = '_ogldefs.i' OTHERDEPS = 'oglhelpers.h $(WXPSRCDIR)/helpers.h' diff --git a/utils/wxPython/modules/stc/.cvsignore b/utils/wxPython/modules/stc/.cvsignore new file mode 100644 index 0000000000..f3c7a7c5da --- /dev/null +++ b/utils/wxPython/modules/stc/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/utils/wxPython/modules/stc/README.txt b/utils/wxPython/modules/stc/README.txt new file mode 100644 index 0000000000..3b772c9cfe --- /dev/null +++ b/utils/wxPython/modules/stc/README.txt @@ -0,0 +1,7 @@ +Since STC is not always bundled with distributions of wxWindows, in +order for it to be a standard part of wxPython I need to bundle it +here. The contents of the contrib directory are copies of the +relevant parts of the main contrib directory in wxWindows. The +build.py script in this directory will also build the needed files +from there, so you no longer have to worry about aquiring and building +additional libraries beyond wxWindows itself. diff --git a/utils/wxPython/modules/stc/build.cfg b/utils/wxPython/modules/stc/build.cfg index db7f45a650..7e237e31c7 100644 --- a/utils/wxPython/modules/stc/build.cfg +++ b/utils/wxPython/modules/stc/build.cfg @@ -7,18 +7,61 @@ SOURCES = [] PYFILES = ['stc.py'] -OTHERCFLAGS = '-I$(WXWIN)/contrib/include' OTHERSWIGFLAGS = '-I$(WXWIN)/contrib/include/wx/stc' SWIGDEPS = '$(WXWIN)/contrib/include/wx/stc/stc.h' if sys.platform == 'win32': + OTHERCFLAGS = '-I$(WXWIN)/contrib/include' OTHERLIBS = '$(WXWIN)/contrib/lib/stc$(LIBEXT).lib' else: - OTHERLIBS = '-lstc' + OTHERCFLAGS = '-D__WX__ -DSCI_LEXER ' + \ + '-Icontrib/src/stc/scintilla/include -Icontrib/include ' + \ + '-Icontrib/src/stc/scintilla/src' + SOURCES = SOURCES + [ + 'contrib/src/stc/scintilla/src/Accessor.cxx', + 'contrib/src/stc/scintilla/src/AutoComplete.cxx', + 'contrib/src/stc/scintilla/src/CallTip.cxx', + 'contrib/src/stc/scintilla/src/CellBuffer.cxx', + 'contrib/src/stc/scintilla/src/ContractionState.cxx', + 'contrib/src/stc/scintilla/src/Document.cxx', + 'contrib/src/stc/scintilla/src/Editor.cxx', + 'contrib/src/stc/scintilla/src/Indicator.cxx', + 'contrib/src/stc/scintilla/src/KeyMap.cxx', + 'contrib/src/stc/scintilla/src/KeyWords.cxx', + 'contrib/src/stc/scintilla/src/LineMarker.cxx', + 'contrib/src/stc/scintilla/src/PropSet.cxx', + 'contrib/src/stc/scintilla/src/ScintillaBase.cxx', + 'contrib/src/stc/scintilla/src/Style.cxx', + 'contrib/src/stc/scintilla/src/ViewStyle.cxx', + 'contrib/src/stc/scintilla/src/LexCPP.cxx', + 'contrib/src/stc/scintilla/src/LexHTML.cxx', + 'contrib/src/stc/scintilla/src/LexOthers.cxx', + 'contrib/src/stc/scintilla/src/LexPerl.cxx', + 'contrib/src/stc/scintilla/src/LexPython.cxx', + 'contrib/src/stc/scintilla/src/LexSQL.cxx', + 'contrib/src/stc/scintilla/src/LexVB.cxx', + 'contrib/src/stc/PlatWX.cpp', + 'contrib/src/stc/ScintillaWX.cpp', + 'contrib/src/stc/stc.cpp', + ] + DEFAULTRULE = 'default: contrib $(GENCODEDIR) $(TARGET)' + + OTHERRULES = """ +%.o : contrib/src/stc/%.cpp + $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< + +%.o : contrib/src/stc/scintilla/src/%.cxx + $(CCC) $(CCSHARED) $(CFLAGS) $(OTHERCFLAGS) -c $< + +contrib : + ln -s $(WXWIN)/contrib contrib + +""" # There are no platform differences so we don't need separate code directories GENCODEDIR='.' SWIGTOOLKITFLAG='' +