Package: src:luajit
Version: 2.0.4+dfsg-1
Severity: wishlist
Tags: patch

Dear Maintainer,

please add a package with debugging symbols to help with debugging
crashes in programs that use LuaJIT, patch attached.

As a side note, you should probably add a working debian/gbp.conf to
match your setup, so the gbp works after cloning your repository.

Cheers,
Ondrej

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable'), (700, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From 268b49973f68968ff0b2260372e88f7bf5fd5b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ond...@sury.org>
Date: Tue, 17 Nov 2015 16:11:33 +0100
Subject: [PATCH] Add a package with debugging symbols

---
 debian/control | 9 +++++++++
 debian/rules   | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 7d93be5..aa343f4 100644
--- a/debian/control
+++ b/debian/control
@@ -51,3 +51,12 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, libluajit-5.1-2 (= ${binary:Version
 Description: Just in time compiler for Lua - development files
  This package contains header files and a statically linkable library for
  LuaJIT.
+
+Package: luajit-dbg
+Architecture: i386 amd64 kfreebsd-i386 armel armhf powerpc powerpcspe mips mipsel hurd-i386
+Multi-Arch: same
+Priority: extra
+Section: debug
+Depends: ${shlibs:Depends}, ${misc:Depends}, libluajit-5.1-2 (= ${binary:Version}) | luajit (= ${binary:Version})
+Description: Just in time compiler for Lua - debug
+ This package contains debugging symbols for LuaJIT.
diff --git a/debian/rules b/debian/rules
index 7f42279..fe04441 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,4 +15,5 @@ override_dh_auto_install:
 	sed -i 's?^multilib=.*?multilib=lib/$(DEB_HOST_MULTIARCH)?' \
 		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc
 
-
+override_dh_strip:
+	dh_strip --dbg-package=luajit-dbg
-- 
2.1.4

>From ca8595e7871ca980270d975e992cc218659b46da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ond...@sury.org>
Date: Tue, 17 Nov 2015 16:27:34 +0100
Subject: [PATCH] Enable debugging symbols in the LuaJIT build

---
 ...002-Enable-debugging-symbols-in-the-build.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 debian/patches/0002-Enable-debugging-symbols-in-the-build.patch

diff --git a/debian/patches/0002-Enable-debugging-symbols-in-the-build.patch b/debian/patches/0002-Enable-debugging-symbols-in-the-build.patch
new file mode 100644
index 0000000..7462e58
--- /dev/null
+++ b/debian/patches/0002-Enable-debugging-symbols-in-the-build.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ond...@sury.org>
+Date: Tue, 17 Nov 2015 16:27:11 +0100
+Subject: Enable debugging symbols in the build
+
+---
+ src/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index acd704e..3e4e237 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -55,9 +55,9 @@ CCOPT_ppc=
+ CCOPT_ppcspe=
+ CCOPT_mips=
+ #
+-CCDEBUG=
++#CCDEBUG=
+ # Uncomment the next line to generate debug information:
+-#CCDEBUG= -g
++CCDEBUG= -g
+ #
+ CCWARN= -Wall
+ # Uncomment the next line to enable more warnings:
diff --git a/debian/patches/series b/debian/patches/series
index aa87f11..dd55326 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-consider-Hurd-as-a-POSIX-system.patch
+0002-Enable-debugging-symbols-in-the-build.patch
-- 
2.1.4

Reply via email to