[Pkg-voip-commits] r2943 - in pwlib/trunk/debian: . patches
Kilian Krause
kilian at alioth.debian.org
Thu Jan 4 18:49:02 CET 2007
Author: kilian
Date: 2007-01-04 18:49:02 +0100 (Thu, 04 Jan 2007)
New Revision: 2943
Removed:
pwlib/trunk/debian/patches/02_debug_names.dpatch
Modified:
pwlib/trunk/debian/changelog
pwlib/trunk/debian/patches/00list
pwlib/trunk/debian/patches/04_names.dpatch
pwlib/trunk/debian/rules
Log:
* Update debian/rules to build also debug versions (with extra PTRACE code)
and install it to libpt-dbg.
Modified: pwlib/trunk/debian/changelog
===================================================================
--- pwlib/trunk/debian/changelog 2007-01-04 16:10:17 UTC (rev 2942)
+++ pwlib/trunk/debian/changelog 2007-01-04 17:49:02 UTC (rev 2943)
@@ -1,8 +1,10 @@
pwlib (1.10.2-3) UNRELEASED; urgency=low
* NOT RELEASED YET
+ * Update debian/rules to build also debug versions (with extra PTRACE code)
+ and install it to libpt-dbg.
- -- Kilian Krause <kilian at debian.org> Sun, 22 Oct 2006 12:52:42 +0200
+ -- Kilian Krause <kilian at debian.org> Thu, 4 Jan 2007 18:46:45 +0100
pwlib (1.10.2-2) unstable; urgency=high
Modified: pwlib/trunk/debian/patches/00list
===================================================================
--- pwlib/trunk/debian/patches/00list 2007-01-04 16:10:17 UTC (rev 2942)
+++ pwlib/trunk/debian/patches/00list 2007-01-04 17:49:02 UTC (rev 2943)
@@ -1,5 +1,4 @@
01_unix.mak_Os
-02_debug_names
04_names
05_hppa
06_plugins_shared
Deleted: pwlib/trunk/debian/patches/02_debug_names.dpatch
===================================================================
--- pwlib/trunk/debian/patches/02_debug_names.dpatch 2007-01-04 16:10:17 UTC (rev 2942)
+++ pwlib/trunk/debian/patches/02_debug_names.dpatch 2007-01-04 17:49:02 UTC (rev 2943)
@@ -1,38 +0,0 @@
-#! /bin/sh -e
-## 02_debug_names.dpatch by Jose Carlos Garcia Sogo <jsogo at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-if [ $# -lt 1 ]; then
- echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
- exit 1
-fi
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
-
-case "$1" in
- -patch) patch -p1 ${patch_opts} < $0;;
- -unpatch) patch -R -p1 ${patch_opts} < $0;;
- *)
- echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
- exit 1;;
-esac
-
-exit 0
-
- at DPATCH@
-diff -urNad /home/jose/devel/pkg-voip/pwlib/build-area/pwlib-1.7.5/make/unix.mak pwlib-1.7.5/make/unix.mak
---- /home/jose/devel/pkg-voip/pwlib/build-area/pwlib-1.7.5/make/unix.mak 2004-07-19 23:09:26.000000000 +0200
-+++ pwlib-1.7.5/make/unix.mak 2004-07-19 23:11:09.000000000 +0200
-@@ -833,7 +833,8 @@
- LIB_TYPE =
- else
- LIB_SUFFIX = a
--LIB_TYPE = _s
-+#LIB_TYPE = _s
-+LIB_TYPE =
- endif # P_SHAREDLIB
-
- ifndef INSTALL_DIR
Modified: pwlib/trunk/debian/patches/04_names.dpatch
===================================================================
--- pwlib/trunk/debian/patches/04_names.dpatch 2007-01-04 16:10:17 UTC (rev 2942)
+++ pwlib/trunk/debian/patches/04_names.dpatch 2007-01-04 17:49:02 UTC (rev 2943)
@@ -1,8 +1,9 @@
#! /bin/sh -e
-## 04_names.dpatch by Jose Carlos Garcia Sogo <jsogo at debian.org>
+## 04_names.dpatch by Kilian Krause <kilian at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix name to be libpt rather than libpt_linux_blah...
+## DP: Also do not include libtype into filename.
if [ $# -lt 1 ]; then
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
@@ -23,20 +24,21 @@
exit 0
@DPATCH@
-diff -urNad /home/jose/devel/temp/pwlib-1.7.5/make/unix.mak pwlib-1.7.5/make/unix.mak
---- /home/jose/devel/temp/pwlib-1.7.5/make/unix.mak 2004-07-18 15:54:51.000000000 +0200
-+++ pwlib-1.7.5/make/unix.mak 2004-07-18 15:58:54.000000000 +0200
-@@ -883,7 +883,12 @@
+diff -urNad pwlib-1.10.2~/make/unix.mak pwlib-1.10.2/make/unix.mak
+--- pwlib-1.10.2~/make/unix.mak 2007-01-04 17:25:52.000000000 +0100
++++ pwlib-1.10.2/make/unix.mak 2007-01-04 17:26:19.000000000 +0100
+@@ -939,8 +939,13 @@
PW_LIBDIR = $(PWLIBDIR)/lib
# set name of the PT library
-PTLIB_BASE = pt_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
+#PTLIB_BASE = pt_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
-+#ifeq ($(findstring $(OBJ_SUFFIX),d),)
++ifeq ($(findstring $(OBJ_SUFFIX),d),)
+PTLIB_BASE = pt
-+#else
-+#PTLIB_BASE = pt_$(OBJ_SUFFIX)
-+#endif
++else
++PTLIB_BASE = pt_$(OBJ_SUFFIX)
++endif
PTLIB_FILE = lib$(PTLIB_BASE)$(LIB_TYPE).$(LIB_SUFFIX)
PT_OBJBASE = obj_$(PLATFORM_TYPE)_$(OBJDIR_SUFFIX)
PT_OBJDIR = $(PW_LIBDIR)/$(PT_OBJBASE)
+
Modified: pwlib/trunk/debian/rules
===================================================================
--- pwlib/trunk/debian/rules 2007-01-04 16:10:17 UTC (rev 2942)
+++ pwlib/trunk/debian/rules 2007-01-04 17:49:02 UTC (rev 2943)
@@ -11,10 +11,11 @@
PACKAGE=libpt-1.10.0
-# can err if the tarball is not yet extracted
+ifneq (,$(shell test -f version.h&&grep MAJOR_VERSION version.h))
VER_MAJOR := $(shell awk '/MAJOR_VERSION/ { print $$3 }' version.h 2>/dev/null)
VER_MINOR := $(shell awk '/MINOR_VERSION/ { print $$3 }' version.h 2>/dev/null)
VER_SUB := $(shell awk '/BUILD_NUMBER/ { print $$3 }' version.h 2>/dev/null)
+endif
SHLIBSVER := $(VER_MAJOR).$(VER_MINOR).$(VER_SUB)
@@ -71,20 +72,39 @@
touch autotools
build-arch-stamp:
- # Compile it all, first static and then shared, so we get shared bins
- $(MAKE) PWLIBDIR=$(CURDIR) optnoshared clean
- $(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ optnoshared
+ # first build static so that we do get proper static linking
+ $(MAKE) PWLIBDIR=$(CURDIR) bothnoshared
+ # ensure we do a fresh check with hello world.
+ -$(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ clean
+ -$(RM) -rf samples/hello_world/obj_*
+ $(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ bothnoshared
+ # try if our build actually works ...
+ samples/hello_world/obj_*_d/hello
samples/hello_world/obj_*_r/hello
+
+ # secondly we need to cleanup and rebuild shared to ensure we get PIC code
+ $(MAKE) PWLIBDIR=$(CURDIR) clean
$(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ clean
-
- $(MAKE) PWLIBDIR=$(CURDIR) optshared
-
- # try if our build actually works ;)
- $(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ optshared
-
+ -$(RM) -rf samples/hello_world/obj_*
+ # and now build shared aswell
+ $(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ bothshared
+ # try if our build actually works ...
+ if (samples/hello_world/obj_*_d/hello 2>/dev/null);then \
+ echo debug hello_world sample incorrectly compiled static; false ; \
+ else \
+ echo debug hello_world sample correctly compiled non-static; \
+ fi
+ LD_LIBRARY_PATH=$(CURDIR)/lib samples/hello_world/obj_*_d/hello
+ if (samples/hello_world/obj_*_r/hello 2>/dev/null);then \
+ echo opt hello_world sample incorrectly compiled static; false ; \
+ else \
+ echo opt hello_world sample correctly compiled non-static; \
+ fi
LD_LIBRARY_PATH=$(CURDIR)/lib samples/hello_world/obj_*_r/hello
+ # if this won't work, we needn't even try going any further...
+ # cleanup to make sure we don't install any of the samples we just compiled
$(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ clean
- # if this won't work, we needn't even try going any further...
+ -$(RM) -rf samples/hello_world/obj_*
touch build-arch-stamp
@@ -100,6 +120,8 @@
-if [ -f Makefile ];then \
$(MAKE) PWLIBDIR=$(CURDIR) clean || true;\
fi
+ $(MAKE) PWLIBDIR=$(CURDIR) -C samples/hello_world/ clean||true
+ -rm -rf samples/hello_world/obj_*
-rm -f include/ptbuildopts.h
-rm -f Makefile config.log config.status autotools
-rm -f config.sub config.guess plugins/config.sub plugins/config.guess
@@ -145,8 +167,13 @@
debian/$(PACKAGE)/usr/lib/libpt.so.$(LIBPTCOMPAT3)
endif
+# libpt-dbg
+ cp lib/libpt_d_s.a debian/libpt-dbg/usr/lib
+ $(MAKE) -C src/ptlib/unix install PWLIBDIR=$(CURDIR) DEBUG=1 INSTALL_DIR=$(CURDIR)/debian/libpt-dbg/usr
+
# libpt-dev
dh_movefiles -plibpt-dev --sourcedir=debian/$(PACKAGE) usr/lib/libpt.so
+ dh_movefiles -plibpt-dev --sourcedir=debian/libpt-dbg usr/lib/libpt_d.so
-rm -f debian/$(PACKAGE)/usr/lib/libpt.so.? \
debian/$(PACKAGE)/usr/lib/libpt.so.?.?
@@ -156,7 +183,8 @@
sed -e 's/$$(PWLIBDIR)\/include\/ptlib\/unix/\/usr\/include\/ptlib\/unix/g' \
-e 's/$$(PWLIBDIR)\/lib/\/usr\/lib/g' \
make/unix.mak > debian/libpt-dev/usr/share/pwlib/make/unix.mak
- cp lib/libpt.a debian/libpt-dev/usr/lib
+ # copy static opt version to libpt-dev
+ cp lib/libpt_s.a debian/libpt-dev/usr/lib
find debian/libpt-dev/usr/include -type f -exec chmod 644 {} \;
# ptlib-config in libpt-dev
# changing build/machine dependent data in ptlib-config
More information about the Pkg-voip-commits
mailing list