[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, debian-experimental-4.0, updated. libreoffice_4.0.0-1-24-g566af7c



The following commit has been merged in the debian-experimental-4.0 branch:
commit 566af7c56be45022e6ec3936edf3ae7045f815b3
Author: Rene Engelhard <rene@debian.org>
Date:   Sat Feb 16 15:40:09 2013 +0100

    conditionalize pyuno build/install more so that we can build only python-uno on wheezy-backports

diff --git a/changelog b/changelog
index 56d8ffd..e4edbf5 100644
--- a/changelog
+++ b/changelog
@@ -10,8 +10,10 @@ libreoffice (1:4.0.0-2) UNRELEASED; urgency=low
   * debian/rules:
     - use /usr/share/dpkg/buildflags.mk for C(XX)FLAGS, LDFLAGS now that LO
       honours those from the env in configure. Remove manual passing to make. 
+    - conditionalize pyuno build/install more so that we can build only python-uno
+      on wheezy-backports. Bit obscure, but...
 
- -- Rene Engelhard <rene@debian.org>  Fri, 08 Feb 2013 22:14:15 +0100
+ -- Rene Engelhard <rene@debian.org>  Thu, 14 Feb 2013 22:07:36 +0100
 
 libreoffice (1:4.0.0-1) experimental; urgency=low
 
diff --git a/control b/control
index 7d9bcb7..4c5bf07 100644
--- a/control
+++ b/control
@@ -17,7 +17,7 @@ Homepage: http://www.libreoffice.org
 Package: libreoffice
 Architecture: amd64 armel armhf hppa i386 ia64 mips mipsel powerpc powerpcspe ppc64 s390 s390x sparc kfreebsd-amd64 kfreebsd-i386
 Section: metapackages
-Depends: libreoffice-base, libreoffice-calc, libreoffice-core (= ${binary:Version}), libreoffice-draw, libreoffice-filter-mobiledev, libreoffice-impress, libreoffice-math, libreoffice-report-builder-bin [!hppa !kfreebsd-amd64 !kfreebsd-i386], libreoffice-writer, python3-uno (>= 4.0~) | python-uno, ttf-dejavu, ttf-sil-gentium-basic, ${java-common-depends}, ${misc:Depends}
+Depends: libreoffice-base, libreoffice-calc, libreoffice-core (= ${binary:Version}), libreoffice-draw, libreoffice-filter-mobiledev, libreoffice-impress, libreoffice-math, libreoffice-report-builder-bin [!hppa !kfreebsd-amd64 !kfreebsd-i386], libreoffice-writer, ${pyuno-depends}, ttf-dejavu, ttf-sil-gentium-basic, ${java-common-depends}, ${misc:Depends}
 Recommends: fonts-liberation | ttf-mscorefonts-installer, libpaper-utils
 Suggests: cups-bsd, hunspell-dictionary, hyphen-hyphenation-patterns, iceweasel | firefox | icedove | thunderbird | iceape-browser | mozilla-browser, imagemagick | graphicsmagick-imagemagick-compat, libgl1, libreoffice-grammarcheck, libreoffice-gnome | libreoffice-kde, libreoffice-help-${help-l10n-virtual-version}, libreoffice-l10n-${help-l10n-virtual-version}, libsane, libxrender1, myspell-dictionary, mythes-thesaurus, openclipart-libreoffice, pstoedit, unixodbc, ${gstreamer-plugins-suggests}, ${java-runtime-depends}, ${ooo-officebean-dep}
 Description: office productivity suite (metapackage)
@@ -171,7 +171,7 @@ Architecture: all
 Pre-Depends: dpkg (>= 1.15.7.2~)
 Depends: libreoffice-style-default | libreoffice-style, ure, ${misc:Depends}
 Suggests: libreoffice-style-crystal, libreoffice-style-hicontrast, libreoffice-style-oxygen, libreoffice-style-tango
-Recommends: python3-uno (>= 4.0~) | python-uno, xfonts-mathml, ${textcat-data-recommends}
+Recommends: ${pyuno-depends}, xfonts-mathml, ${textcat-data-recommends}
 Conflicts: broffice, libreoffice-l10n-3.5, libreoffice-l10n-3.6, libtextcat-data (<< 2.2-8), openoffice.org-common (<< 1:3.3.0~)
 Provides: libreoffice-l10n-en-us
 Breaks: libreoffice-core (<< 1:${oover}~),
@@ -412,7 +412,7 @@ Description: office productivity suite -- GNOME integration
 
 Package: libreoffice-emailmerge
 Architecture: all
-Depends: libreoffice-core, python3-uno (>= 4.0~) | python-uno, ${misc:Depends}, ${python:Depends}
+Depends: libreoffice-core, ${pyuno-depends}, ${misc:Depends}, ${python:Depends}
 Enhances: libreoffice-writer
 Replaces: python-uno (<< 1:2.4.1-5)
 Conflicts: ure (<< 1.5.1+OOo3.1.1-15)
@@ -496,7 +496,7 @@ Description: office productivity suite -- legacy 1.0 XML DTD
 Package: libreoffice-script-provider-python
 Architecture: all
 Section: python
-Depends: libreoffice-common (>= 1:3.5.0~alpha0~), libreoffice-core (>= 1:3.5.0~alpha0~), python3-uno (>= 4.0~) | python-uno, ${misc:Depends}, ${python:Depends}
+Depends: libreoffice-common (>= 1:3.5.0~alpha0~), libreoffice-core (>= 1:3.5.0~alpha0~), ${pyuno-depends}, ${misc:Depends}, ${python:Depends}
 Replaces: python-uno (<< 1:3.5.2-2), python3-uno (<< 1:3.5.2-2)
 Conflicts: libreoffice-common (<< 1:3.5~), libreoffice-core (<< 1:3.5~)
 Description: Python script support provider for LibreOffice scripting framework
diff --git a/control.in b/control.in
index 8ccef4b..5dc2b90 100644
--- a/control.in
+++ b/control.in
@@ -76,7 +76,7 @@ Depends: libreofficeVER-base%OOO_NO_BASE_ARCHS%,
          libreofficeVER-math,
          libreofficeVER-report-builder-bin%OOO_NO_REPORTDESIGN_ARCHS%,
          libreofficeVER-writer,
-         python3-uno (>= 4.0~) | python-uno,
+         ${pyuno-depends},
          ttf-dejavu,
          ttf-sil-gentium-basic,
          ${java-common-depends},
@@ -307,7 +307,7 @@ Suggests: libreofficeVER-style-crystal,
           libreofficeVER-style-hicontrast,
           libreofficeVER-style-oxygen,
           libreofficeVER-style-tango
-Recommends: python3-uno (>= 4.0~) | python-uno,
+Recommends: ${pyuno-depends},
             xfonts-mathml,
             ${textcat-data-recommends}
 Conflicts: broffice,
@@ -592,7 +592,7 @@ Description: office productivity suite -- GNOME integration
 Package: libreofficeVER-emailmerge
 Architecture: all
 Depends: libreofficeVER-core,
-         python3-uno (>= 4.0~) | python-uno,
+         ${pyuno-depends},
          ${misc:Depends},
          ${python:Depends}
 Enhances: libreofficeVER-writer
@@ -696,7 +696,7 @@ Architecture: all
 Section: python
 Depends: libreoffice-common (>= 1:3.5.0~alpha0~),
          libreoffice-core (>= 1:3.5.0~alpha0~),
-         python3-uno (>= 4.0~) | python-uno,
+         ${pyuno-depends},
          ${misc:Depends},
          ${python:Depends}
 Replaces: python-uno (<< 1:3.5.2-2), python3-uno (<< 1:3.5.2-2)
diff --git a/patches/series b/patches/series
index ef83820..16a5e4a 100644
--- a/patches/series
+++ b/patches/series
@@ -29,3 +29,4 @@ dont-touch-urd.diff
 sdremote-close-on-non-bluetooth.diff
 odk-link-to-jdk-1.5-docs.diff
 gendocu-no-notimestamp-with-gjdoc.diff
+wheezy-backports-python.diff
diff --git a/patches/wheezy-backports-python.diff b/patches/wheezy-backports-python.diff
new file mode 100644
index 0000000..0e133ec
--- /dev/null
+++ b/patches/wheezy-backports-python.diff
@@ -0,0 +1,20 @@
+--- a/configure.ac-old	2013-02-14 22:36:09.220868022 +0100
++++ b/configure.ac	2013-02-14 22:36:40.228867104 +0100
+@@ -7254,7 +7254,7 @@
+             PYTHON_LIBS="-framework Python"
+         else
+             # This causes an error if no python command is found
+-            AM_PATH_PYTHON([3.3])
++            AM_PATH_PYTHON([2.6])
+         fi
+     elif test $enable_python = auto; then
+         # We should not come here in a MSVC build, I think?
+@@ -7264,7 +7264,7 @@
+ 
+         # This allows a lack of system Python 3.3 with no error, we check below for a system Python of
+         # earlier version.
+-        AM_PATH_PYTHON([3.3],, [:])
++        AM_PATH_PYTHON([2.6],, [:])
+ 
+         if test "$PYTHON" = :; then
+             enable_python=internal
diff --git a/rules b/rules
index 343ae93..46c59a3 100755
--- a/rules
+++ b/rules
@@ -494,6 +494,7 @@ endif
 ifeq "$(shell dpkg-parsechangelog | grep Distribution | awk '{ print $$2 }')" "wheezy-backports"
   BUGS=mailto:debian-backports@lists.debian.org
   SYSTEM_STUFF := $(filter-out libcmis libcdr clucene libmspub mdds liblangtag orcus, $(SYSTEM_STUFF))
+  WHEEZY_BACKPORT=y
 endif
 ifeq "$(shell dpkg-parsechangelog | grep Distribution | awk '{ print $$2 }')" "UNRELEASED"
   BUGS=mailto:debian-openoffice@lists.debian.org
@@ -631,6 +632,7 @@ ifeq (debug,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 endif
 
 
+ifneq "$(WHEEZY_BACKPORT)" "y"
 PYMAJOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[0])")
 PYMINOR:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1])")
 PYMINORPLUS1:=$(shell $(PYTHON) -c "import sys; print (sys.version_info[1]+1)")
@@ -639,6 +641,14 @@ PY2MAJOR:=$(shell $(PYTHON2) -c "import sys; print sys.version_info[0]")
 PY2MINOR:=$(shell $(PYTHON2) -c "import sys; print sys.version_info[1]")
 PY2MINORPLUS1:=$(shell $(PYTHON2) -c "import sys; print sys.version_info[1]+1")
 PYTHON2_SITE:=debian/python-uno/$(shell $(PYTHON2) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+else
+PYMAJOR:=$(shell $(PYTHON2) -c "import sys; print (sys.version_info[0])")
+PYMINOR:=$(shell $(PYTHON2) -c "import sys; print (sys.version_info[1])")
+PYMINORPLUS1:=$(shell $(PYTHON2) -c "import sys; print (sys.version_info[1]+1)")
+# YES, really! python3-uno. see "OMG!" below :-)
+PYTHON_SITE:=debian/python3-uno/$(shell $(PYTHON2) -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+PYTHON:=$(PYTHON2)
+endif
 
 ifeq "$(PYTHON_VERSION)" "current"
 	PYTHON_VERSION_CONTROL := $(PYMAJOR).$(PYMINOR)
@@ -649,9 +659,13 @@ endif
 ifeq "$(BUILD_PYUNO)" "y"
 	BUILD_DEPS += , python (>= 2.6.6-3+squeeze4)
 	DBG_DBG_SUGGESTS+= , python-dbg
+  ifneq "$(WHEEZY_BACKPORT)" "y"
 	BUILD_DEPS += , $(PYTHON)-dev (>= 3.3)
-  ifeq "$(ENABLE_PYTHON2)" "y"
+    ifeq "$(ENABLE_PYTHON2)" "y"
 	BUILD_DEPS += , $(PYTHON2)-dev (>= 2.6)
+    endif
+  else
+	BUILD_DEPS += , $(PYTHON2)-dev (>= 2.7)
   endif
 else
 	BUILD_DEPS += , python
@@ -1072,6 +1086,13 @@ endif
 ifneq "$(BUILD_PYUNO)" "y"
 	DEBHELPER_OPTIONS+= -Npython-uno -Npython3-uno -Nlibreoffice-script-provider-python
 	CONFIGURE_FLAGS += --disable-python
+else
+  ifeq "$(WHEEZY_BACKPORT)" "y"
+	DEBHELPER_OPTIONS+= -Npython3-uno
+	PYUNO_DEPENDS = python-uno
+  else
+	PYUNO_DEPENDS = python3-uno (>= 4.0~) | python-uno
+  endif
 endif
 
 ifeq "$(ENABLE_JAVA)" "y"
@@ -1571,12 +1592,14 @@ ifneq "$(PACKAGE_UNOWINREG_DLL)" "y"
   endif
 endif
 
-ifeq "$(BUILD_PYUNO)" "y"
-  ifeq "$(ENABLE_PYTHON2)" "y"
+ifneq "$(WHEEZY_BACKPORT)" "y"
+   ifeq "$(BUILD_PYUNO)" "y"
+    ifeq "$(ENABLE_PYTHON2)" "y"
 	rm -rf $(SOURCE_TREE)/py2uno
 	cp -ra $(SOURCE_TREE)/pyuno $(SOURCE_TREE)/py2uno
 	cd py2uno && \
 		patch -p1 < $(CURDIR)/debian/patches/pyuno-copy-for-python2.diff
+    endif
   endif
 endif
 
@@ -1604,10 +1627,12 @@ $(STAMP_DIR)/build-arch:
 
 	PATH=$(BUILD_PATH) LD_LIBRARY_PATH=$(BUILD_LD_LIBRARY_PATH) DEFAULT_TO_ENGLISH_FOR_PACKING=1 ARCH_FLAGS=$(ARCH_FLAGS) TMP=`mktemp -q -d` $(MAKE) build
 
-ifeq "$(BUILD_PYUNO)" "y"
-  ifeq "$(ENABLE_PYTHON2)" "y"
+ifneq "$(WHEEZY_BACKPORT)" "y"
+  ifeq "$(BUILD_PYUNO)" "y"
+    ifeq "$(ENABLE_PYTHON2)" "y"
 	$(MAKE) py2uno.clean
 	make cmd cmd='cd py2uno; export PYTHON=$(PYTHON2); export PYTHON_CFLAGS="$(shell pkg-config --cflags python-$(PY2MAJOR).$(PY2MINOR))"; export PYTHON_LIBS="$(shell pkg-config --libs python-$(PY2MAJOR).$(PY2MINOR))"; $(MAKE)'
+    endif
   endif
 endif
 
@@ -2221,7 +2246,8 @@ ifeq "$(BUILD_PYUNO)" "y"
 	  echo 'PYTHONPATH=$$PYTHONHOME $$PYTHONHOME/site-packages $$PYTHONHOME/lib-dynload $$PYTHONHOME/lib-tk $$ORIGIN' \
 	) > debian/python3-uno/$(OODIR)/program/pythonloader.unorc
 	chmod u-w debian/python3-uno/$(OODIR)/program/pythonloader.unorc
-  ifeq "$(ENABLE_PYTHON2)" "y"
+  ifneq "$(WHEEZY_BACKPORT)" "y"
+    ifeq "$(ENABLE_PYTHON2)" "y"
 	install -d $(PYTHON2_SITE)
 	cp $(PYTHON_SITE)/uno.py \
 		$(PYTHON2_SITE)
@@ -2247,6 +2273,7 @@ ifeq "$(BUILD_PYUNO)" "y"
 		debian/python-uno/$(OODIR)/share/registry
 	cp -r debian/python3-uno/$(OODIR)/share/Scripts/python \
 		debian/python-uno/$(OODIR)/share/Scripts
+    endif
   endif
   ifeq "$(ENABLE_SCRIPT_PROVIDER_PYTHON)" "y"
 	rm -f debian/libreoffice$(VER)-script-provider-python/$(OODIR)/share/extensions/script-provider-for-python/registration/LICENSE
@@ -2260,7 +2287,8 @@ ifeq "$(BUILD_PYUNO)" "y"
 	done
 	cd debian/python3-uno/usr/share/doc/python3-uno && \
 		find . -type d -name "CVS" | xargs -r rm -rf
-  ifeq "$(ENABLE_PYTHON2)" "y"
+  ifneq "$(WHEEZY_BACKPORT)" "y"
+    ifeq "$(ENABLE_PYTHON2)" "y"
 	mkdir -p debian/python-uno/usr/share/doc/python-uno
 	cp -r $(SOURCE_TREE)/pyuno/demo \
 	  debian/python-uno/usr/share/doc/python-uno; \
@@ -2269,9 +2297,16 @@ ifeq "$(BUILD_PYUNO)" "y"
 	done
 	cd debian/python-uno/usr/share/doc/python-uno && \
 		find . -type d -name "CVS" | xargs -r rm -rf
+    endif
   endif
 endif
 
+ifeq "$(WHEEZY_BACKPORT)" "y"
+	# OMG!!
+	rm -rf debian/python-uno
+	mv debian/python3-uno debian/python-uno
+endif
+
 	# should be empty now, remove if there
 	rm -rf $(PKGDIR)-core/$(OODIR)/ure
 
@@ -2821,17 +2856,21 @@ ifeq "$(ENABLE_JAVA)" "y"
 	dh_nativejava -plibreoffice$(VER)-gcj -o
   endif
 endif
+ifeq "$(WHEEZY_BACKPORT)" "y"
+	dh_python2 -ppython-uno --no-guessing-versions --no-guessing-deps
+else
 	dh_python3 -ppython3-uno --no-guessing-deps
 	# adds a python3 (>= 3.2.3-3~)
-ifeq "$(PYTHON_VERSION)" "current"
+  ifeq "$(PYTHON_VERSION)" "current"
 	sed -i -e 's/python$(PYMAJOR) (>= .*)/python$(PYMAJOR) (>= 3.3~)/g' \
 		debian/python3-uno.substvars
-else
+  else
 	sed -i -e 's/python$(PYMAJOR) (>= .*)/python$(PYMAJOR).$(PYMINOR)/g' \
 		debian/python3-uno.substvars
-endif
-ifeq "$(ENABLE_PYTHON2)" "y"
+  endif
+  ifeq "$(ENABLE_PYTHON2)" "y"
 	dh_python2 -ppython-uno --no-guessing-versions --no-guessing-deps
+  endif
 endif
 	dh_lintian -s
 	dh_bugfiles -s -A
@@ -2953,6 +2992,7 @@ endif
 		-V'gstreamer-plugins-suggests=$(GSTREAMER_PLUGINS_SUGGESTS)' \
 		-V'libebook-dep=$(shell debian/scripts/get_libebook_dep.sh)' \
 		-V'idlc-cpp-depends=$(IDLC_CPP_DEPENDS)' \
+		-V'pyuno-depends=$(PYUNO_DEPENDS)' \
 		-V'dbg-dbg-suggests=$(DBG_DBG_SUGGESTS)' \
 		-v$(BINARY_VERSION)
 ifeq "$(ENABLE_JAVA)" "y"
@@ -3077,6 +3117,7 @@ endif
 		-V'java-common-depends=$(JAVA_COMMON_DEPENDS)' \
 		-V'java-runtime-depends=$(JAVA_RUNTIME_DEPENDS)' \
 		-V'textcat-data-recommends=$(TEXTCAT_DATA_RECOMMENDS)' \
+		-V'pyuno-depends=$(PYUNO_DEPENDS)' \
 		-V'Binary-Version=$(BINARY_VERSION)' \
 		-V'dbg-dbg-suggests=$(DBG_DBG_SUGGESTS)' \
 		-v$(BINARY_VERSION)

-- 
LibreOffice packaging repository


Reply to: