summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2009-11-14 14:17:04 +0000
committerRobert Buchholz <rbu@gentoo.org>2009-11-14 14:17:04 +0000
commitb7806b5a0850a2c9c570d3cc1020ac7fba4d1352 (patch)
treef303991abb69d37d14c273bf6b005d870c61fbf7 /app-text/xournal
parentCommit the partial cleanup of p.mask i did so far. (diff)
downloadhistorical-b7806b5a0850a2c9c570d3cc1020ac7fba4d1352.tar.gz
historical-b7806b5a0850a2c9c570d3cc1020ac7fba4d1352.tar.bz2
historical-b7806b5a0850a2c9c570d3cc1020ac7fba4d1352.zip
Fix alignment bug that causes out of memory aborts at PDF export. Bug #287701.
Package-Manager: portage-2.1.7.1/cvs/Linux x86_64
Diffstat (limited to 'app-text/xournal')
-rw-r--r--app-text/xournal/ChangeLog9
-rw-r--r--app-text/xournal/Manifest5
-rw-r--r--app-text/xournal/files/xournal-0.4.5-xoprint-len.patch88
-rw-r--r--app-text/xournal/xournal-0.4.5-r1.ebuild (renamed from app-text/xournal/xournal-0.4.2.1.ebuild)23
4 files changed, 112 insertions, 13 deletions
diff --git a/app-text/xournal/ChangeLog b/app-text/xournal/ChangeLog
index 158f01f18d8b..8a17551df4e5 100644
--- a/app-text/xournal/ChangeLog
+++ b/app-text/xournal/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-text/xournal
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/xournal/ChangeLog,v 1.10 2009/11/01 17:48:37 rbu Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/xournal/ChangeLog,v 1.11 2009/11/14 14:17:04 rbu Exp $
+
+*xournal-0.4.5-r1 (14 Nov 2009)
+
+ 14 Nov 2009; Robert Buchholz <rbu@gentoo.org> -xournal-0.4.2.1.ebuild,
+ +xournal-0.4.5-r1.ebuild, +files/xournal-0.4.5-xoprint-len.patch:
+ Fix alignment bug that causes out of memory aborts at PDF export.
+ Bug #287701.
01 Nov 2009; Robert Buchholz <rbu@gentoo.org> xournal-0.4.5.ebuild:
Override src_configure of the gnome2 eclass because of a QA warning
diff --git a/app-text/xournal/Manifest b/app-text/xournal/Manifest
index d0e84e8aee5d..2dad9f657389 100644
--- a/app-text/xournal/Manifest
+++ b/app-text/xournal/Manifest
@@ -1,8 +1,9 @@
AUX xournal-0.4.2.1-pdf-annotation.patch 997 RMD160 e03546e87d39d18af2e93c8d2f62a51d38c5a0a4 SHA1 6fc1bbdd695c485416069dd96d5f734ad60aa458 SHA256 ce4654a3449af65422c1a5002934e0c847613c42f4f971656111ae49fab9bf9d
+AUX xournal-0.4.5-xoprint-len.patch 4299 RMD160 e1fe28debea0d010494aa79f3a6eaf47853dd0b2 SHA1 2b642dc6d01a8c89095e150323ca755276000636 SHA256 0b2bb739e2719658186df82379f083daf71f0a6883aeb7f93f97312cf4cdb96e
DIST xournal-0.4.2.1.tar.gz 516147 RMD160 8daf2deac1f4e07284ba8818eec2968bdbd9baea SHA1 e401675154afd207f7b345c2191714f351837251 SHA256 2eea4c3d455b54020af738467ac026c632bb509ebc9d7f0d4b019ea66163b8ff
DIST xournal-0.4.5.tar.gz 425062 RMD160 a4228e6874482bd381c59cd8e3db1100361c1d40 SHA1 390cb275774469ed1b04b7268dd625bd456c895e SHA256 a7d7c2cb544451939779276e6e5ee5acc756bd0efb5253de15dc00bfe07755d1
EBUILD xournal-0.4.2.1-r1.ebuild 1083 RMD160 794128de0437126460bc6ac9ab8877893364f8c8 SHA1 fc91636276d0c6e810eca35688fe915f17cd3181 SHA256 4fcab7d460388ef67e3ac9293b614f143b56a9761fceba5b5a878a57a3d6c1c8
-EBUILD xournal-0.4.2.1.ebuild 1038 RMD160 f9e33795ba1abb8b3ee794d7820a4252f3f544cf SHA1 69bb946d2e2b9fb0e1fff124f2b9f12624855873 SHA256 731f016f110b0fff0465c01b08605bb0e32c5906a58b33efe50641654ada6896
+EBUILD xournal-0.4.5-r1.ebuild 1111 RMD160 7e4c0cabfcc0e5b23b9243d04d3e6823c0dbb503 SHA1 558a8aa1226ba925a91e25ce1e830ea96c7cbc63 SHA256 3f7e84f5de17f09d97ea95839d214646545862a956fd516d4eaa5670d91e9e52
EBUILD xournal-0.4.5.ebuild 1025 RMD160 ff5ec54d45bda6141809cd9f71c33cd8e467a467 SHA1 f54a95d04249f4938a52769a42d4ccab422e9667 SHA256 a1a9d56cfdcefd14d2ff010f246dbaecdedb962f4cb0b0f5d3df73488aedfe36
-MISC ChangeLog 1759 RMD160 f72fbd8ccf463addc801ccbf90eb9b15bb11ad14 SHA1 36314f29301c80488c696bd85f88cb4e70870559 SHA256 9b208be46da5b7a99c092b32c9016c142ab4badb677e8eb65d2dee1200a072d1
+MISC ChangeLog 2017 RMD160 d4f13d04a5cea03f1a2665b6d02fbe206c0315c1 SHA1 daac6ff0fe5a47cf7bceb5dadff7456963ed9a59 SHA256 e5780cfcf4a6cf57a3378cf4fc84f9b348f3185a3a217c8e4bd3e679b3d24ddd
MISC metadata.xml 608 RMD160 3a4dfac1c981219f56ff49aae0e1f0a18ca5a439 SHA1 a06f91dfa4bfd4d99e8175378c2b72f5912c6833 SHA256 f6691d5ca74e6fed04ae9cf84888def47bd29b3df5626d6d33b412bd9bde04aa
diff --git a/app-text/xournal/files/xournal-0.4.5-xoprint-len.patch b/app-text/xournal/files/xournal-0.4.5-xoprint-len.patch
new file mode 100644
index 000000000000..56105af6cf4b
--- /dev/null
+++ b/app-text/xournal/files/xournal-0.4.5-xoprint-len.patch
@@ -0,0 +1,88 @@
+--- a/src/xo-print.c
++++ b/src/xo-print.c
+@@ -761,7 +761,7 @@ int pdf_draw_bitmap_background(struct Page *pg, GString *str,
+
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Filter /FlateDecode /Type /Xobject "
++ "%d 0 obj\n<< /Length %zu /Filter /FlateDecode /Type /Xobject "
+ "/Subtype /Image /Width %d /Height %d /ColorSpace /DeviceRGB "
+ "/BitsPerComponent 8 >> stream\n",
+ xref->last, zpix->len, width, height);
+@@ -840,8 +840,10 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
+ gboolean fallback, is_binary;
+ guchar encoding[256];
+ gushort glyphs[256];
+- int i, j, num, len1, len2;
+- gsize len;
++ int i, j, num;
++ guint32 len1, len2;
++ guint32 tt_len;
++ gsize t1_len;
+ TrueTypeFont *ttfnt;
+ char *seg1, *seg2;
+ char *fontdata, *p;
+@@ -862,14 +864,14 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
+ }
+ font->num_glyphs_used = num-1;
+ if (OpenTTFont(font->filename, 0, &ttfnt) == SF_OK) {
+- if (CreateTTFromTTGlyphs_tomemory(ttfnt, (guint8**)&fontdata, &len, glyphs, encoding, num,
++ if (CreateTTFromTTGlyphs_tomemory(ttfnt, (guint8**)&fontdata, &tt_len, glyphs, encoding, num,
+ 0, NULL, TTCF_AutoName | TTCF_IncludeOS2) == SF_OK) {
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ nobj_fontprog = xref->last;
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Length1 %d >> stream\n",
+- nobj_fontprog, (int)len, (int)len);
+- g_string_append_len(pdfbuf, fontdata, len);
++ "%d 0 obj\n<< /Length %u /Length1 %u >> stream\n",
++ nobj_fontprog, tt_len, tt_len);
++ g_string_append_len(pdfbuf, fontdata, tt_len);
+ g_string_append(pdfbuf, "endstream\nendobj\n");
+ g_free(fontdata);
+ }
+@@ -879,7 +881,7 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
+ else fallback = TRUE;
+ } else {
+ // embed the font file: Type1 case
+- if (g_file_get_contents(font->filename, &fontdata, &len, NULL) && len>=8) {
++ if (g_file_get_contents(font->filename, &fontdata, &t1_len, NULL) && t1_len>=8) {
+ if (fontdata[0]==(char)0x80 && fontdata[1]==(char)0x01) {
+ is_binary = TRUE;
+ len1 = pfb_get_length((unsigned char *)fontdata+2);
+@@ -898,7 +900,7 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
+ if (*p=='\n' || *p=='\r') p++;
+ if (*p=='\n' || *p=='\r') p++;
+ len1 = p-fontdata;
+- p = g_strrstr_len(fontdata, len, T1_SEGMENT_3_END);
++ p = g_strrstr_len(fontdata, t1_len, T1_SEGMENT_3_END);
+ if (p==NULL) fallback = TRUE;
+ else {
+ // rewind 512 zeros
+@@ -936,7 +938,7 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ nobj_fontprog = xref->last;
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Length1 %d /Length2 %d /Length3 0 >> stream\n",
++ "%d 0 obj\n<< /Length %u /Length1 %u /Length2 %u /Length3 0 >> stream\n",
+ nobj_fontprog, len1+len2, len1, len2);
+ g_string_append_len(pdfbuf, seg1, len1);
+ g_string_append_len(pdfbuf, seg2, len2);
+@@ -1258,7 +1260,7 @@ gboolean print_to_pdf(char *filename)
+ tmpstr = make_pdfprefix(pdfinfo.pages+(pg->bg->file_page_seq-1),
+ pg->width, pg->height);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d >> stream\n%s\nendstream\nendobj\n",
++ "%d 0 obj\n<< /Length %zu >> stream\n%s\nendstream\nendobj\n",
+ n_obj_prefix, tmpstr->len, tmpstr->str);
+ g_string_free(tmpstr, TRUE);
+ g_string_prepend(pgstrm, "Q Q Q ");
+@@ -1276,7 +1278,7 @@ gboolean print_to_pdf(char *filename)
+
+ make_xref(&xref, xref.last+1, pdfbuf->len);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Filter /FlateDecode>> stream\n",
++ "%d 0 obj\n<< /Length %zu /Filter /FlateDecode>> stream\n",
+ xref.last, zpgstrm->len);
+ g_string_append_len(pdfbuf, zpgstrm->str, zpgstrm->len);
+ g_string_free(zpgstrm, TRUE);
diff --git a/app-text/xournal/xournal-0.4.2.1.ebuild b/app-text/xournal/xournal-0.4.5-r1.ebuild
index f77767735da4..fff4467e68b8 100644
--- a/app-text/xournal/xournal-0.4.2.1.ebuild
+++ b/app-text/xournal/xournal-0.4.5-r1.ebuild
@@ -1,8 +1,10 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/xournal/xournal-0.4.2.1.ebuild,v 1.5 2009/03/30 02:11:18 loki_val Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/xournal/xournal-0.4.5-r1.ebuild,v 1.1 2009/11/14 14:17:04 rbu Exp $
+
+EAPI=2
+inherit gnome2 eutils
-inherit gnome2 autotools
DESCRIPTION="Xournal is an application for notetaking, sketching, and keeping a journal using a stylus."
HOMEPAGE="http://xournal.sourceforge.net/"
@@ -10,24 +12,25 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 x86"
+KEYWORDS="~amd64 ~x86"
IUSE="pdf doc"
-DEPEND="${DEPEND}
- >=x11-libs/gtk+-2.6
+DEPEND=">=x11-libs/gtk+-2.10
>=gnome-base/libgnomecanvas-2.4
>=gnome-base/libgnomeprint-2.2
- >=gnome-base/libgnomeprintui-2.2"
+ >=gnome-base/libgnomeprintui-2.2
+ >=virtual/poppler-glib-0.5.4"
RDEPEND="${DEPEND}
pdf? ( virtual/poppler-utils virtual/ghostscript )"
DEPEND="${DEPEND}
dev-util/pkgconfig"
-src_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-xoprint-len.patch #bug 287701
+}
- eautoreconf
+src_configure() {
+ default
}
src_install() {