]> git.saurik.com Git - wxWidgets.git/blobdiff - debian/rules
remove miniframe stuff from GtkOnSize(), it's handled by wxFrame
[wxWidgets.git] / debian / rules
index fa48839e7656137a0bfc33d7efb8085a3920087f..8c89fd845b363b871dd1534893560f2449805f96 100755 (executable)
@@ -56,7 +56,14 @@ endif
 # to correctly set the release below.
 DEBIAN_WXFLAVOUR := $(shell pwd | sed -e 's@.*/wxwidgets[0-9.]\+-\?\(.*\)-[0-9.]\+-\?.*@\1@')
 
-release   := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
+
+wx_major_version_number := $(shell sed -n 's/^wx_major_version_number=//p' configure.in)
+wx_minor_version_number := $(shell sed -n 's/^wx_minor_version_number=//p' configure.in)
+wx_release_number       := $(shell sed -n 's/^wx_release_number=//p' configure.in)
+wx_subrelease_number    := $(shell sed -n 's/^wx_subrelease_number=//p' configure.in)
+
+##release   := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//')
+release  := $(wx_major_version_number).$(wx_minor_version_number)
 
 # This is broken completely now by bakefiles changes.  Until we add
 # some hocus pocus to the main tree, to export these values from it
@@ -67,12 +74,23 @@ release   := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | se
 soversion := 0
 sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%)-$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR))
 
+# In some places we use the full version number, including the micro version,
+# for the development releases (which can be incompatible for the same major
+# and minor version) but just the major.minor for the stable releases (which
+# are supposed to be compatible), this variable contains the appropriate value
+ifeq ($(shell echo `echo $(release) | sed 's/.\+\.\(.\+\)/\1/'`%2 | bc),1)
+    # development release
+    compatible_release := $(release).$(wx_release_number)
+else
+    compatible_release := $(release)
+endif
+
 # Base value for alternative priorities.
 alt_prio  := $(subst .,,$(release))
 
 pytoolkit := gtk2
 pydir     := usr/lib/$(python_ver)/site-packages
-wxpydir   := $(pydir)/wx-$(release)-$(pytoolkit)
+wxpydir   := $(pydir)/wx-$(compatible_release)-$(pytoolkit)
 
 cross_host  := i586-mingw32msvc
 cross_build := $(shell ./config.guess)
@@ -94,11 +112,12 @@ BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
 
 GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
     --with-gtk \
-    --with-gnomeprint \
     --enable-mediactrl \
     --enable-sound \
     --with-sdl \
     --enable-display \
+    --enable-geometry \
+    --enable-graphics_ctx \
     --with-libjpeg=sys \
     --with-libpng=sys \
     --with-libtiff=sys \
@@ -113,7 +132,7 @@ ifeq ($(WX_UNICODE),1)
     COMMON_CONFIGURE_OPTIONS += --enable-unicode
     PY_WX_CONFIG_OPTIONS += --unicode
     PY_UNICODE="UNICODE=1"
-    wxpydir := $(pydir)/wx-$(release)-$(pytoolkit)-unicode
+    wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit)-unicode
 
     # for compatibility with the existing 2.6 packages, we don't use "u" in
     # the Unicode (default) package names
@@ -142,9 +161,10 @@ package_gtk_dbg         := libwxgtk$(release)$(unicode_suffix)-dbg
 
 
 
-package_gtk_py_lib      := python-wxgtk$(release)
+package_gtk_py_lib      := python-wxgtk$(release)$(unicode_suffix)
 package_gtk_py_ver       = python-wxversion
 package_gtk_py_tools     = python-wxtools
+package_gtk_py_addons    = python-wxaddons
 
 package_headers         := wx$(release)-headers
 package_i18n            := wx$(release)-i18n
@@ -154,15 +174,15 @@ package_common           = wx-common
 
 # The packages listed here are common to all wx versions, and may be provided
 # by another source package if more than one is in the release simultaneously.
-common_packages        := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools)
+common_packages        := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools) $(package_gtk_py_addons)
 
 
-package_gtk_dbg_py      := python-wxgtk$(release)-dbg
+package_gtk_dbg_py      := python-wxgtk$(release)$(unicode_suffix)-dbg
 
 
 
-package_msw_dev         := libwxmsw$(release)-dev
-package_msw_dbg         := libwxmsw$(release)-dbg
+package_msw_dev         := libwxmsw$(release)$(unicode_suffix)-dev
+package_msw_dbg         := libwxmsw$(release)$(unicode_suffix)-dbg
 package_headers_msw     := wx$(release)-headers-msw
 
 # The packages listed here will not be built by default.
@@ -449,20 +469,29 @@ build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py
 
 build-doc-stamp: build-gtk-shared-stamp
        dh_testdir
-       cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE)
-       rm -rf $(objdir_doc)
-       rm -rf $(objdir_doc_cruft)
-       mkdir $(objdir_doc)
-       mkdir $(objdir_doc_cruft)
-       cd $(objdir_doc_cruft) \
-               && LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
-                  ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf              \
-                  ../docs/latex/wx/manual.tex                                    \
-                  ../$(objdir_doc)/wx$(release)-manual.html                      \
-                  -twice -html
-       cp docs/latex/wx/*.gif $(objdir_doc)
-       rm -rf $(objdir_doc_cruft)
-       rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}
+       # the tarball may already have the generated docs in it
+       if [ ! -e docs/html/wx/index.html ]; then \
+               cd $(objdir_gtk_shared)/utils/tex2rtf/src && $(FAST_MAKE); \
+               cd -; \
+               rm -rf $(objdir_doc); \
+               rm -rf $(objdir_doc_cruft); \
+               mkdir $(objdir_doc); \
+               mkdir $(objdir_doc_cruft); \
+               cd $(objdir_doc_cruft); \
+               LD_LIBRARY_PATH=../$(objdir_gtk_shared)/lib:$(LD_LIBRARY_PATH) \
+                  ../$(objdir_gtk_shared)/utils/tex2rtf/src/tex2rtf           \
+                  ../docs/latex/wx/manual.tex                                 \
+                  ../$(objdir_doc)/wx$(release)-manual.html                   \
+                  -twice -html;                                               \
+               cd -; \
+               cp docs/latex/wx/*.gif $(objdir_doc); \
+               rm -rf $(objdir_doc_cruft); \
+               rm -f $(objdir_doc)/wx$(release)-manual.{con,hh*,htx,ref}; \
+       else \
+               mkdir $(objdir_doc); \
+               cp docs/html/wx/* $(objdir_doc); \
+               mv $(objdir_doc)/index.html $(objdir_doc)/wx-$(release)-manual_contents.html; \
+       fi
        touch $@
 
 build-examples-stamp: build-gtk-shared-stamp
@@ -719,6 +748,8 @@ else
        rm debian/$(package_gtk_py_lib)/$(pydir)/wxversion.py
 endif
 
+
+
 install-gtk-py-tools: DH_OPTIONS=-p$(package_gtk_py_tools)
 install-gtk-py-tools: install-gtk-py-ver
        dh_testdir
@@ -757,7 +788,20 @@ endif
 
        rm -r debian/$(package_gtk_py_lib)/usr/bin
 
-install-gtk-py: install-gtk-py-tools
+install-gtk-py-addons: DH_OPTIONS=-p$(package_gtk_py_addons)
+install-gtk-py-addons: install-gtk-py-tools
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+ifndef DEBIAN_WX_DEFAULT_VERSION
+
+       dh_movefiles --sourcedir=debian/$(package_gtk_py_lib) $(pydir)/wxaddons
+else
+       rm -r debian/$(package_gtk_py_lib)/$(pydir)/wxaddons
+endif
+
+
+install-gtk-py: install-gtk-py-addons
 
 
 install-common: DH_OPTIONS=-p$(package_common)
@@ -766,10 +810,13 @@ install-common: install-gtk-shared-stamp
        dh_testroot
        dh_clean -k
 
-       dh_install $(objdir_gtk_install)/share/aclocal  usr/share
+       dh_install $(objdir_gtk_install)/share/bakefile/presets usr/share/bakefile
+       dh_install $(objdir_gtk_install)/share/bakefile/presets/wx*.bkl usr/share/bakefile/presets
+
+       dh_install $(objdir_gtk_install)/share/aclocal usr/share
        dh_installman debian/wx-config.1
 
-       dh_install $(objdir_gtk_shared)/utils/wxrc/wxrc usr/bin
+       dh_install $(objdir_gtk_shared)/utils/wxrc/wxrc usr/bin
        dh_installman debian/wxrc-tools.1
        dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1
 
@@ -929,7 +976,7 @@ binary-common:
        fi
 
        dh_installdeb
-       dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
+       dh_shlibdeps -ldebian/$(package_wxbase_lib)/usr/lib:debian/$(package_wxbase_dbg)/usr/lib:debian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
        dh_gencontrol
        dh_md5sums
        dh_builddeb