[Pkg-xen-changes] r92 - trunk/xen-3.0/debian/patches
Bastian Blank
waldi at costa.debian.org
Thu Mar 9 19:42:49 UTC 2006
Author: waldi
Date: 2006-03-09 19:42:49 +0000 (Thu, 09 Mar 2006)
New Revision: 92
Added:
trunk/xen-3.0/debian/patches/libdir.dpatch
Log:
debian/patch/libdir.dpatch:
Add patch to change library path to /usr/lib/xen-3.0 and set appropriate rpath.
Added: trunk/xen-3.0/debian/patches/libdir.dpatch
===================================================================
--- trunk/xen-3.0/debian/patches/libdir.dpatch 2006-03-09 16:27:22 UTC (rev 91)
+++ trunk/xen-3.0/debian/patches/libdir.dpatch 2006-03-09 19:42:49 UTC (rev 92)
@@ -0,0 +1,215 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## libdir.dpatch by Bastian Blank <waldi at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad xen-3.0~/Config.mk xen-3.0/Config.mk
+--- xen-3.0~/Config.mk 2006-02-23 22:07:46.000000000 +0100
++++ xen-3.0/Config.mk 2006-03-09 20:40:48.760540852 +0100
+@@ -27,11 +27,7 @@
+ INSTALL_DATA = $(INSTALL) -m0644
+ INSTALL_PROG = $(INSTALL) -m0755
+
+-ifeq ($(XEN_TARGET_ARCH),x86_64)
+-LIBDIR = lib64
+-else
+-LIBDIR = lib
+-endif
++LIBDIR = lib/xen-3.0
+
+ ifneq ($(EXTRA_PREFIX),)
+ EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
+diff -urNad xen-3.0~/tools/Rules.mk xen-3.0/tools/Rules.mk
+--- xen-3.0~/tools/Rules.mk 2006-02-23 22:07:47.000000000 +0100
++++ xen-3.0/tools/Rules.mk 2006-03-09 20:40:48.760540852 +0100
+@@ -20,6 +20,9 @@
+ LDFLAGS += -m64
+ endif
+
++RPATH_ARG := -Wl,-rpath,/usr/$(LIBDIR)
++LDFLAGS += $(RPATH_ARG)
++
+ X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
+
+ %.opic: %.c
+diff -urNad xen-3.0~/tools/console/Makefile xen-3.0/tools/console/Makefile
+--- xen-3.0~/tools/console/Makefile 2006-02-23 22:07:47.000000000 +0100
++++ xen-3.0/tools/console/Makefile 2006-03-09 20:40:48.760540852 +0100
+@@ -23,11 +23,11 @@
+ $(RM) client/*.o daemon/*.o
+
+ xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
+- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ -lxenctrl -lxenstore
+
+ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
+- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
+ -lxenctrl -lxenstore
+
+ install: $(BIN)
+diff -urNad xen-3.0~/tools/ioemu/target-i386-dm/Makefile xen-3.0/tools/ioemu/target-i386-dm/Makefile
+--- xen-3.0~/tools/ioemu/target-i386-dm/Makefile 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/ioemu/target-i386-dm/Makefile 2006-03-09 20:40:48.761540714 +0100
+@@ -188,7 +188,7 @@
+ #########################################################
+
+ DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+-LIBS+=-lm -L../../libxc -lxenctrl -lxenguest -L../../xenstore -lxenstore
++LIBS+=-lm $(RPATH_PATH) -L../../libxc -lxenctrl -lxenguest -L../../xenstore -lxenstore
+ ifndef CONFIG_USER_ONLY
+ LIBS+=-lz
+ endif
+diff -urNad xen-3.0~/tools/libxc/Makefile xen-3.0/tools/libxc/Makefile
+--- xen-3.0~/tools/libxc/Makefile 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/libxc/Makefile 2006-03-09 20:40:48.761540714 +0100
+@@ -4,9 +4,6 @@
+ INSTALL_DATA = $(INSTALL) -m0644
+ INSTALL_DIR = $(INSTALL) -d -m0755
+
+-MAJOR = 3.0
+-MINOR = 0
+-
+ CC = gcc
+
+ XEN_ROOT = ../..
+@@ -69,11 +66,9 @@
+ LIB_BUILD_OBJS := $(patsubst %.c,%.o,$(BUILD_SRCS))
+ PIC_BUILD_OBJS := $(patsubst %.c,%.opic,$(BUILD_SRCS))
+
+-LIB := libxenctrl.a
+-LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
++LIB += libxenctrl.so
+
+-LIB += libxenguest.a
+-LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
++LIB += libxenguest.so
+
+ all: build
+ build: check-for-zlib mk-symlinks
+@@ -90,16 +85,10 @@
+ install: build
+ [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
+ [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
+- $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
+- $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
+- ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
+- ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
++ $(INSTALL_PROG) libxenctrl.so. $(DESTDIR)/usr/$(LIBDIR)
+ $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
+
+- $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
+- $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
+- ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
+- ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
++ $(INSTALL_PROG) libxenguest.so $(DESTDIR)/usr/$(LIBDIR)
+ $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
+
+ .PHONY: TAGS clean rpm install all
+@@ -124,25 +113,15 @@
+ libxenctrl.a: $(LIB_OBJS)
+ $(AR) rc $@ $^
+
+-libxenctrl.so: libxenctrl.so.$(MAJOR)
+- ln -sf $< $@
+-libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
+- ln -sf $< $@
+-
+-libxenctrl.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) -shared -o $@ $^
++libxenctrl.so: $(PIC_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so -shared -o $@ $^
+
+ # libxenguest
+
+ libxenguest.a: $(LIB_BUILD_OBJS)
+ $(AR) rc $@ $^
+
+-libxenguest.so: libxenguest.so.$(MAJOR)
+- ln -sf $< $@
+-libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
+- ln -sf $< $@
+-
+-libxenguest.so.$(MAJOR).$(MINOR): $(PIC_BUILD_OBJS) libxenctrl.so
+- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) -shared -o $@ $^ -lz -lxenctrl
++libxenguest.so: $(PIC_BUILD_OBJS) libxenctrl.so
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so -shared -o $@ $^ -lz -lxenctrl
+
+ -include $(DEPS)
+diff -urNad xen-3.0~/tools/misc/Makefile xen-3.0/tools/misc/Makefile
+--- xen-3.0~/tools/misc/Makefile 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/misc/Makefile 2006-03-09 20:40:48.761540714 +0100
+@@ -50,4 +50,4 @@
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ $(TARGETS): %: %.o Makefile
+- $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
++ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
+diff -urNad xen-3.0~/tools/misc/cpuperf/Makefile xen-3.0/tools/misc/cpuperf/Makefile
+--- xen-3.0~/tools/misc/cpuperf/Makefile 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/misc/cpuperf/Makefile 2006-03-09 20:40:48.761540714 +0100
+@@ -37,7 +37,7 @@
+ $(CC) $(CFLAGS) -o $@ $<
+
+ cpuperf-xen: cpuperf.c $(HDRS) Makefile
+- $(CC) $(CFLAGS) -I $(XEN_LIBXC) -L$(XEN_LIBXC) -lxenctrl -DXENO -o $@ $<
++ $(CC) $(CFLAGS) -I $(XEN_LIBXC) $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl -DXENO -o $@ $<
+
+ cpuperf-perfcntr: cpuperf.c $(HDRS) Makefile
+ $(CC) $(CFLAGS) -DPERFCNTR -o $@ $<
+diff -urNad xen-3.0~/tools/python/Makefile xen-3.0/tools/python/Makefile
+--- xen-3.0~/tools/python/Makefile 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/python/Makefile 2006-03-09 20:40:48.762540576 +0100
+@@ -5,7 +5,7 @@
+
+ all: build
+ build:
+- CFLAGS="$(CFLAGS)" python setup.py build
++ CFLAGS="$(CFLAGS)" python setup.py build $(RPATH_ARG)
+
+ ifndef XEN_PYTHON_NATIVE_INSTALL
+ install: all
+diff -urNad xen-3.0~/tools/python/setup.py xen-3.0/tools/python/setup.py
+--- xen-3.0~/tools/python/setup.py 2006-02-23 22:07:48.000000000 +0100
++++ xen-3.0/tools/python/setup.py 2006-03-09 20:40:48.762540576 +0100
+@@ -1,10 +1,12 @@
+
++import sys
+ from distutils.core import setup, Extension
+ import os
+
+ XEN_ROOT = "../.."
+
+ extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
++extra_link_args = [ sys.argv.pop() ]
+
+
+ include_dirs = [ XEN_ROOT + "/tools/libxc",
+@@ -19,6 +21,7 @@
+
+ xc = Extension("xc",
+ extra_compile_args = extra_compile_args,
++ extra_link_args = extra_link_args,
+ include_dirs = include_dirs + [ "xen/lowlevel/xc" ],
+ library_dirs = library_dirs,
+ libraries = libraries,
+@@ -26,6 +29,7 @@
+
+ xs = Extension("xs",
+ extra_compile_args = extra_compile_args,
++ extra_link_args = extra_link_args,
+ include_dirs = include_dirs + [ "xen/lowlevel/xs" ],
+ library_dirs = library_dirs,
+ libraries = libraries,
+diff -urNad xen-3.0~/tools/xentrace/Makefile xen-3.0/tools/xentrace/Makefile
+--- xen-3.0~/tools/xentrace/Makefile 2006-02-23 22:07:49.000000000 +0100
++++ xen-3.0/tools/xentrace/Makefile 2006-03-09 20:40:48.762540576 +0100
+@@ -48,4 +48,4 @@
+ $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
+
+ %: %.c $(HDRS) Makefile
+- $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
++ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
More information about the Pkg-xen-changes
mailing list