Do the PFRAG dance to produce a working debug-flavoured tb package.

Mozilla likes to build different libs when debug is enabled...
patch run-mozilla.sh so that it finds our gdb by default, and amend
README.OpenBSD to teach user how to properly debug tb.
This commit is contained in:
landry 2010-10-27 12:54:34 +00:00
parent aaea5782a9
commit 76a777fee2
6 changed files with 74 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.106 2010/10/24 21:25:12 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.107 2010/10/27 12:54:34 landry Exp $
COMMENT-main = Mozilla e-mail, rss and usenet client
COMMENT-lightning = Mozilla Thunderbird calendar extension
@ -14,19 +14,20 @@ MULTI_PACKAGES = -main -lightning
PKGNAME-main = ${PKGNAME}
PKGNAME-lightning = lightning-1.0beta2
EPOCH-lightning = 0
REVISION-lightning = 6
REVISION-lightning = 7
REVISION-main = 0
# need to be in synch with SO_VERSION in mail/enigmail/thunderbird
SO_VERSION = 17.0
# NOTE: Must bump minor version if any shlib's are removed from the
# components dir to avoid pkg_add -r issues. Whenever PKGNAME gets
# bumped and/or SO_VERSION changes, remember to update enigmail's
# and sunbird SO_VERSION and LIB_DEPENDS to match.
# SO_VERSION and LIB_DEPENDS to match.
MOZILLA_LIBS = accessibility appcomps auth autoconfig caps chardet chrome commandlines \
calbasecomps composer cookie docshell embedcomponents fileview \
gkgfxthebes gklayout gkplugin htmlpars i18n imgicon imglib2 import \
intlapp jar50 jsctypes jsd mail mailcomps mork mozfind mozldap msgsmime necko \
intlapp jar50 jsctypes jsd mailcomps mork mozfind mozldap msgsmime necko \
nsappshell permissions pipboot pipnss pippki pref rdf remoteservice \
satchel spellchecker storagecomps system-pref tkautocomplete \
toolkitcomps txmgr uconv ucvmath universalchardet unixproxy webbrwsr \
@ -34,6 +35,14 @@ MOZILLA_LIBS = accessibility appcomps auth autoconfig caps chardet chrome comman
gfxpsshar gkgfx gtkxtbin ldap60 ldif60 mozjs prldap60 sqlite3 ssldap60 \
thebes xpcom xpcom_core xul nullplugin unixprintplugin
FLAVOR ?=
.if ${FLAVOR:L:Mdebug}
MOZILLA_LIBS += addrbook bayesflt fts3tok mailview mime mimeemitter msgbase \
msgcompose msgdb msgimap msglocal msgmdn msgnews vcard msgbaseutil
.else
MOZILLA_LIBS+= mail
.endif
CATEGORIES= mail news
# MPL

View File

@ -1,4 +1,4 @@
$OpenBSD: README.OpenBSD,v 1.5 2010/07/27 17:01:16 landry Exp $
$OpenBSD: README.OpenBSD,v 1.6 2010/10/27 12:54:34 landry Exp $
If you encounter strange problems or Thunderbird doesn't start at
all, try the -safe-mode switch.
@ -21,3 +21,10 @@ ${TRUEPREFIX}/mozilla-thunderbird/plugins and
${LOCALBASE}/lib/mozilla/plugins.
If the environment variable MOZ_PLUGIN_PATH is specified, this
location will be overridden.
Debugging
If you encounter crashes, you might want to build the debug FLAVOR of
this package, and run 'thunderbird -g' to run thunderbird inside gdb, so
that you can gather debugging logs and traces.
Bug reports without that information will be ignored.

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-mozilla_build_unix_run-mozilla_sh,v 1.1 2010/10/27 12:54:34 landry Exp $
help finding our debugger
--- mozilla/build/unix/run-mozilla.sh.orig Wed Oct 13 17:40:57 2010
+++ mozilla/build/unix/run-mozilla.sh Wed Oct 27 12:59:15 2010
@@ -105,25 +105,7 @@ moz_test_binary()
##########################################################################
moz_get_debugger()
{
- debuggers="ddd gdb dbx bdb"
- debugger="notfound"
- done="no"
- for d in $debuggers
- do
- moz_test_binary /bin/which
- if [ $? -eq 1 ]
- then
- dpath=`which ${d}`
- else
- dpath=`LC_MESSAGES=C type ${d} | awk '{print $3;}' | sed -e 's/\.$//'`
- fi
- if [ -x "$dpath" ]
- then
- debugger=$dpath
- break
- fi
- done
- echo $debugger
+ echo "/usr/bin/gdb"
return 0
}
##########################################################################

View File

@ -0,0 +1,16 @@
@comment $OpenBSD: PFRAG.debug-main,v 1.1 2010/10/27 12:54:34 landry Exp $
@lib ${MOZILLA_PROJECT}/components/libaddrbook.so.${LIBaddrbook_VERSION}
@lib ${MOZILLA_PROJECT}/components/libbayesflt.so.${LIBbayesflt_VERSION}
@lib ${MOZILLA_PROJECT}/components/libfts3tok.so.${LIBfts3tok_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmailview.so.${LIBmailview_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmime.so.${LIBmime_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmimeemitter.so.${LIBmimeemitter_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgbase.so.${LIBmsgbase_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgcompose.so.${LIBmsgcompose_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgdb.so.${LIBmsgdb_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgimap.so.${LIBmsgimap_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsglocal.so.${LIBmsglocal_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgmdn.so.${LIBmsgmdn_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmsgnews.so.${LIBmsgnews_VERSION}
@lib ${MOZILLA_PROJECT}/components/libvcard.so.${LIBvcard_VERSION}
@lib ${MOZILLA_PROJECT}/libmsgbaseutil.so.${LIBmsgbaseutil_VERSION}

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.no-debug-main,v 1.1 2010/10/27 12:54:34 landry Exp $
@lib ${MOZILLA_PROJECT}/components/libmail.so.${LIBmail_VERSION}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.1 2010/07/27 17:01:16 landry Exp $
@comment $OpenBSD: PLIST-main,v 1.2 2010/10/27 12:54:34 landry Exp $
@conflict mozilla-thunderbird-<=3.0.5
@pkgpath mail/mozilla-thunderbird
bin/thunderbird
@ -135,7 +135,6 @@ ${MOZILLA_PROJECT}/components/layout_xul_tree.xpt
@lib ${MOZILLA_PROJECT}/components/libjar50.so.${LIBjar50_VERSION}
@lib ${MOZILLA_PROJECT}/components/libjsctypes.so.${LIBjsctypes_VERSION}
@lib ${MOZILLA_PROJECT}/components/libjsd.so.${LIBjsd_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmail.so.${LIBmail_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmailcomps.so.${LIBmailcomps_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmork.so.${LIBmork_VERSION}
@lib ${MOZILLA_PROJECT}/components/libmozfind.so.${LIBmozfind_VERSION}
@ -482,8 +481,11 @@ ${MOZILLA_PROJECT}/res/viewsource.css
${MOZILLA_PROJECT}/run-mozilla.sh
@bin ${MOZILLA_PROJECT}/thunderbird-bin
share/applications/thunderbird.desktop
%%debug%%
!%%debug%%
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@exec TEMP=`mktemp -d` && cd %D/mozilla-thunderbird && env HOME=$TEMP LD_LIBRARY_PATH=%D/mozilla-thunderbird ./regxpcom && rm -fr $TEMP
@unexec rm -f %D/mozilla-thunderbird/components/compreg.dat
@unexec rm -f %D/mozilla-thunderbird/components/xpti.dat
@unexec rm -Rf %D/mozilla-thunderbird/updates