python3/UnpackedTarball_python3.mk     |    6 ++++++
 python3/python-3.3.0-elf-rpath.patch.1 |   13 +++++++++++++
 pyuno/CustomTarget_python_shell.mk     |    1 -
 pyuno/zipcore/nonmac.sh                |    4 ----
 solenv/gbuild/PythonTest.mk            |    2 +-
 5 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 0fcc1968daa6b6c877a3c17cc800b47d82c8a10f
Author: Michael Stahl <mst...@redhat.com>
Date:   Fri Apr 19 16:11:24 2013 +0200

    gbuild: PythonTest: do not invoke the python.bin directly
    
    This works to run the test (with the fixed RPATH in python.bin from
    previous commit), but debugging with gdb becomes impossible.
    
    The tests need PYTHONPATH set to find the internal python libraries,
    but gdb also uses PYTHONPATH and then tries to load the libraries
    there which do not necessarily match the Python version that gdb
    is built against.  Invoking the python wrapper shell script avoids this,
    and since that "exec"'s python.bin debugging with gdb works too.
    
    Change-Id: I6ea2feb44cebeda1ba2c397baa3837f9f1259a08

diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index 199ffcc..bbf7877 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -10,7 +10,7 @@
 # PythonTest class
 
 ifeq ($(SYSTEM_PYTHON),NO)
-gb_Python_EXE := $(OUTDIR)/installation/opt/program/python.bin
+gb_Python_EXE := /bin/sh $(DEVINSTALLDIR)/opt/program/python
 else
 gb_Python_EXE := $(PYTHON_FOR_BUILD)
 endif
commit b865ff3d75a4611eaefe1f35b0dc9c7d9256f1ff
Author: Michael Stahl <mst...@redhat.com>
Date:   Fri Apr 19 15:33:57 2013 +0200

    python3: put an RPATH into python binary ...
    
    ... and get rid of LD_LIBRARY_PATH hack in wrapper shell script.
    
    Change-Id: I7d91c6086460504d656de7b018087264165f396b

diff --git a/python3/UnpackedTarball_python3.mk 
b/python3/UnpackedTarball_python3.mk
index 696c869..0d5fce5 100644
--- a/python3/UnpackedTarball_python3.mk
+++ b/python3/UnpackedTarball_python3.mk
@@ -40,4 +40,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 ))
 endif
 
+ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
+$(eval $(call gb_UnpackedTarball_add_patches,python3,\
+       python3/python-3.3.0-elf-rpath.patch.1 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/python3/python-3.3.0-elf-rpath.patch.1 
b/python3/python-3.3.0-elf-rpath.patch.1
new file mode 100644
index 0000000..0007d6b
--- /dev/null
+++ b/python3/python-3.3.0-elf-rpath.patch.1
@@ -0,0 +1,13 @@
+set RPATH (only to be used on ELF platforms)
+
+--- python3/Makefile.pre.in    2013-04-19 15:08:43.637715422 +0200
++++ python3/Makefile.pre.in    2013-04-19 15:07:32.685711138 +0200
+@@ -464,7 +464,7 @@
+ 
+ # Build the interpreter
+ $(BUILDPYTHON):       Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+-      $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o 
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
++      $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o 
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
+ 
+ platform: $(BUILDPYTHON) $(SYSCONFIGDATA)
+       $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import 
get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
diff --git a/pyuno/CustomTarget_python_shell.mk 
b/pyuno/CustomTarget_python_shell.mk
index f4df015..0f254ba 100644
--- a/pyuno/CustomTarget_python_shell.mk
+++ b/pyuno/CustomTarget_python_shell.mk
@@ -47,7 +47,6 @@ $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/os.sh 
: \
                $(SRCDIR)/pyuno/zipcore/$(if $(filter 
MACOSX,$(OS)),mac,nonmac).sh
        $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
        sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" \
-               -e "s/%%OOO_LIBRARY_PATH_VAR%%/$(gb_Helper_LIBRARY_PATH_VAR)/g" 
\
                $< > $@
 
 # vim: set noet sw=4 ts=4:
diff --git a/pyuno/zipcore/nonmac.sh b/pyuno/zipcore/nonmac.sh
index 0757b11..791a340 100644
--- a/pyuno/zipcore/nonmac.sh
+++ b/pyuno/zipcore/nonmac.sh
@@ -1,7 +1,3 @@
-# Set %%OOO_LIBRARY_PATH_VAR%% so that python.bin finds libpython2.6.so (this
-# can go once python.bin contains a proper RPATH):
-%%OOO_LIBRARY_PATH_VAR%%=$sd_prog${%%OOO_LIBRARY_PATH_VAR%%:+:$%%OOO_LIBRARY_PATH_VAR%%}
-export %%OOO_LIBRARY_PATH_VAR%%
 
 
PYTHONPATH=$sd_prog:$sd_prog/python-core-%%PYVERSION%%/lib:$sd_prog/python-core-%%PYVERSION%%/lib/lib-dynload:$sd_prog/python-core-%%PYVERSION%%/lib/lib-tk:$sd_prog/python-core-%%PYVERSION%%/lib/site-packages${PYTHONPATH+:$PYTHONPATH}
 export PYTHONPATH
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to