X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6de5430bc60de602bbd99ebc124251395aa798b4..982a44cc9fc00dfe37d50488c89785302af55074:/debian/rules diff --git a/debian/rules b/debian/rules index 3e9d62b5e5..6e30aa4554 100755 --- a/debian/rules +++ b/debian/rules @@ -56,7 +56,7 @@ 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') +release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p' | sed 's/-ansi//') # 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 +67,23 @@ release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwidgets//p') 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).$(soversion) +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)-unicode +wxpydir := $(pydir)/wx-$(compatible_release)-$(pytoolkit) cross_host := i586-mingw32msvc cross_build := $(shell ./config.guess) @@ -81,19 +92,68 @@ config_cache = ../config_deb.cache config_cache_cross = ../config_deb_cross.cache +# build options +COMMON_CONFIGURE_OPTIONS = \ + --prefix=/usr \ + --cache-file=$(config_cache) \ + --with-flavour=$(DEBIAN_WXFLAVOUR) \ + --with-zlib=sys \ + --disable-reserved_virtual \ + +BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \ + --disable-gui \ + +GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \ + --with-gtk \ + --with-gnomeprint \ + --enable-mediactrl \ + --enable-sound \ + --with-sdl \ + --enable-display \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ + + +PY_WX_CONFIG_OPTIONS = --version=$(release) --toolkit=$(pytoolkit) --static=no + +WX_UNICODE := 1 +WX_OPENGL := 1 + +ifeq ($(WX_UNICODE),1) + COMMON_CONFIGURE_OPTIONS += --enable-unicode + PY_WX_CONFIG_OPTIONS += --unicode + PY_UNICODE="UNICODE=1" + 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 + unicode_suffix := +else + # but we do need to use something for non-Unicode packages to distinguish + # them + unicode_suffix := -ansi +endif + +ifeq ($(WX_OPENGL),1) + GTK_CONFIGURE_OPTIONS += --with-opengl +else + GTK_CONFIGURE_OPTIONS += --without-opengl +endif + # Packages to build: -package_wxbase_lib := libwxbase$(sorelease) -package_wxbase_dev := libwxbase$(release)-dev -package_wxbase_dbg := libwxbase$(release)-dbg +package_wxbase_lib := libwxbase$(sorelease)$(unicode_suffix) +package_wxbase_dev := libwxbase$(release)$(unicode_suffix)-dev +package_wxbase_dbg := libwxbase$(release)$(unicode_suffix)-dbg -package_gtk_lib := libwxgtk$(sorelease) -package_gtk_dev := libwxgtk$(release)-dev -package_gtk_dbg := libwxgtk$(release)-dbg +package_gtk_lib := libwxgtk$(sorelease)$(unicode_suffix) +package_gtk_dev := libwxgtk$(release)$(unicode_suffix)-dev +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 @@ -108,12 +168,12 @@ package_common = wx-common common_packages := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools) -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. @@ -198,10 +258,8 @@ wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config --no_rpath wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config --no_rpath # and this after it is installed. -py_wxconfig := wx-config --version=$(release) --toolkit=$(pytoolkit) \ - --unicode --debug=no --static=no -pyd_wxconfig := wx-config --version=$(release) --toolkit=$(pytoolkit) \ - --unicode --debug --static=no +py_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug=no +pyd_wxconfig := wx-config $(PY_WX_CONFIG_OPTIONS) --debug #contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*))) @@ -213,7 +271,7 @@ debian/python-version: echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@ debian/control: $(addprefix debian/,control.in python-version) - sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g'\ + sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g;s/=U/$(unicode_suffix)/g'\ < debian/control.in > debian/control control-files-stamp: debian/control @@ -321,14 +379,8 @@ build: build_arch configure-wxbase-shared-stamp: dh_testdir mkdir -p $(objdir_wxbase_shared) - cd $(objdir_wxbase_shared) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-flavour=$(DEBIAN_WXFLAVOUR) \ - --disable-gui \ - --with-zlib=sys \ - --enable-unicode \ - --disable-reserved_virtual + cd $(objdir_wxbase_shared) \ + && ../configure $(BASE_CONFIGURE_OPTIONS) touch $@ build-wxbase-shared-stamp: configure-wxbase-shared-stamp @@ -341,14 +393,7 @@ configure-wxbase-debug-stamp: dh_testdir mkdir -p $(objdir_wxbase_debug) cd $(objdir_wxbase_debug) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-flavour=$(DEBIAN_WXFLAVOUR) \ - --disable-gui \ - --enable-debug \ - --with-zlib=sys \ - --enable-unicode \ - --disable-reserved_virtual + && ../configure $(BASE_CONFIGURE_OPTIONS) --enable-debug touch $@ build-wxbase-debug-stamp: configure-wxbase-debug-stamp @@ -361,18 +406,7 @@ configure-gtk-shared-stamp: dh_testdir mkdir -p $(objdir_gtk_shared) cd $(objdir_gtk_shared) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-flavour=$(DEBIAN_WXFLAVOUR) \ - --with-gtk \ - --with-opengl \ - --with-gnomeprint \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-unicode \ - --disable-reserved_virtual + && ../configure $(GTK_CONFIGURE_OPTIONS) touch $@ build-gtk-shared-stamp: configure-gtk-shared-stamp @@ -385,19 +419,7 @@ configure-gtk-debug-stamp: dh_testdir mkdir -p $(objdir_gtk_debug) cd $(objdir_gtk_debug) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-flavour=$(DEBIAN_WXFLAVOUR) \ - --with-gtk \ - --with-opengl \ - --with-gnomeprint \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-debug \ - --enable-unicode \ - --disable-reserved_virtual + && ../configure $(GTK_CONFIGURE_OPTIONS) --enable-debug touch $@ build-gtk-debug-stamp: configure-gtk-debug-stamp @@ -432,7 +454,7 @@ build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py && $(python_ver) ./setup.py build \ WX_CONFIG='$(wxconfig)' \ WXPORT=$(pytoolkit) \ - UNICODE=1 \ + $(PY_UNICODE) \ FLAVOUR=$(DEBIAN_WXFLAVOUR) touch $@ @@ -504,7 +526,7 @@ build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py && $(python_ver) ./setup.py build \ WX_CONFIG='$(wxconfig-dbg)' \ WXPORT=$(pytoolkit) \ - UNICODE=1 \ + $(PY_UNICODE) \ FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg touch $@ @@ -684,7 +706,7 @@ install-gtk-py-lib: build-gtk-py-stamp WX_CONFIG='$(wxconfig)' \ SYS_WX_CONFIG='$(py_wxconfig)' \ WXPORT=$(pytoolkit) \ - UNICODE=1 \ + $(PY_UNICODE) \ FLAVOUR=$(DEBIAN_WXFLAVOUR) mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \ @@ -755,10 +777,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 @@ -815,7 +840,7 @@ install-gtk-dbg-py: build-gtk-dbg-py-stamp WX_CONFIG='$(wxconfig-dbg)' \ SYS_WX_CONFIG='$(pyd_wxconfig)' \ WXPORT=$(pytoolkit) \ - UNICODE=1 \ + $(PY_UNICODE) \ FLAVOUR=$(addsuffix -,$(DEBIAN_WXFLAVOUR))dbg mv debian/$(package_gtk_py_lib)/$(pydir)/wx.pth \ @@ -918,7 +943,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 @@ -966,17 +991,21 @@ binary-dbg-py: control-files-stamp install-gtk-dbg-py # Debian policy. Do not distribute packages built with these rules, they # are currently useful for rapid in-house testing by developers only. +DH_OPTIONS_GTK := -p$(package_wxbase_lib) -p$(package_gtk_lib) -p$(package_headers) + # libwxgtk shared lib package -binary-gtk: control-files-stamp install-gtk-lib install-headers - $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_lib) -p$(package_headers)" binary-common +binary-gtk: control-files-stamp install-gtk-lib install-wxbase-lib install-headers + $(MAKE) -f debian/rules DH_OPTIONS="$(DH_OPTIONS_GTK)" binary-common -binary-gtk-dev: control-files-stamp install-gtk-dev install-headers +binary-gtk-dev: control-files-stamp install-gtk-dev install-wxbase-dev install-headers $(MAKE) -f debian/rules \ - DH_OPTIONS="-p$(package_gtk_lib) -p$(package_gtk_dev) -p$(package_headers)" \ - binary-common + DH_OPTIONS="-p$(package_wxbase_dev) -p$(package_gtk_dev) $(DH_OPTIONS_GTK)" \ + binary-common -binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers - $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common +binary-gtk-dbg: control-files-stamp install-gtk-dbg install-wxbase-dbg install-headers + $(MAKE) -f debian/rules \ + DH_OPTIONS="-p$(package_wxbase_dbg) -p$(package_gtk_dbg) -p$(package_headers)" \ + binary-common # docs package