pdftoipe: Add patch for missing <page>-bug
authorStefan Huber <shuber@sthu.org>
Thu, 6 Feb 2014 11:47:37 +0000 (12:47 +0100)
committerStefan Huber <shuber@sthu.org>
Thu, 6 Feb 2014 11:47:37 +0000 (12:47 +0100)
media-gfx/pdftoipe/Manifest
media-gfx/pdftoipe/files/missingpage.patch [new file with mode: 0644]
media-gfx/pdftoipe/pdftoipe-20130124-r1.ebuild [new file with mode: 0644]

index 7b5e8f2..93462e6 100644 (file)
@@ -1,7 +1,9 @@
+AUX missingpage.patch 4029 SHA256 58a58407e770f3254fcd0e8b739d85e857c3c73024c67029dc5d79af002706ca SHA512 9fbd49d2b13a35b3cc01c041dfbdd47df27a10fccc31d33b9ec4e7bd4746bff31d07094a15fbdacd1d453075e5f34423e23ac3168405d1f09e029942534ec935 WHIRLPOOL 082739d9fb1ac16ec1a21dc6e6962331e137afe7e3f25cb3567547e708399c02c7c98b638e04fc8f46c601d65bfe1467d877b3e485b4db99f8e5082bddf408a8
 AUX poppler-0.18.patch 308 SHA256 f2a0ba22b1eb052fe6a671bbcc7c83be0a2f4e8ff3f49e21b68dec64c875f8ca SHA512 c96e224f01378c9a849a30a7dcc0cb46d5f041fda6588c56b9512f1ea0c79821b1c75b2c6df56b0aa8bc1f897047b046e2337876f80f4a01fb261093bd83dd7a WHIRLPOOL 23f694c7a96636031b000ece00dea214bccf52ae3d4b3b4e9207ed4180dfda425299c85a52e897ffe49e623a6ce2e7faa4f7e929ee16150521b0ae366ae3e8db
 AUX poppler-0.20.patch 281 SHA256 08a8ad78369a1062a840d48c7d85fe0dbcc507d1e2565ef357be62e5d3503def SHA512 68149b180855bd47700dc24ff4858e1c7be874370bb84efeae9a44e49c6c7f59303544e9aa84bb6c1f8a634badd9ff5a4152e16c8eeb4f8fb7135b2bc2cfd0f9 WHIRLPOOL 9e687787942c53721efa9767641f0c1acc04f4c526376f445a333d04058605029356555375d385a9403e488bfd0a7fb39040de3a2aa6a68ba8ac5b58997754fc
 DIST pdftoipe-20110916.tar.gz 105648 SHA256 0c331d7d5ce7d0cca5d64e5f26a3a24934810896cdcbb4a18ce30b9245bdcfae SHA512 4781edd3224d7c09191e3a944a52b4b807830fdd433df89cf645e6ab3d150a5a3a007b00cd069f274b8f4ccbd2152c2c4394584d604fae7f2aae5f04680c8521 WHIRLPOOL 1d7936560444bcbdafb0ef826cb44ab8b49e6e1a1b9cf628b83c493ae6374d97c261009f03925751b67525eda4cfb54358ed43fb0f8f4c706d5f1297a4b1380b
 DIST pdftoipe-20130124.tar.gz 92652 SHA256 d93dd1e129013865a44405caad213d598dc42fb487505743140bd2215c740113 SHA512 9a65af12fdc517e6ce45b5290f41aea7223ba114a5aa75cb962e1e3ac1e17d54f21dcd80782e31235f84536896a84e480cbc818e76a8ee2a4b01b3b1ed2d7a95 WHIRLPOOL a1edfeb4b02849a73385d5129f2c2dd0da877eadcaf291f31e309b3d8bdf1de2c88e8aca220d70eeff67e6686b5a183a84cb74135bc62c139e33bee657e61e31
 EBUILD pdftoipe-20110916-r2.ebuild 774 SHA256 aa441d138b71fe097b5dc5ceebb0bc1d1d6b71144950c2260dc155cf991dfabe SHA512 36b72760157ec13ef0e75b1a9caa1c70a0a39c0ba73966fa0bb8e582c82121918c3536ae358854e9db823cc118157e285c3e8944b691ad0701483b62b789c2c1 WHIRLPOOL f90a817daea1274722441296b76358cf9fc8569d9f7f7aa053191325e4e483054c7a1aba648205724af6339c85db629d5f35ba815781b775c82914ed8feaa34d
 EBUILD pdftoipe-20110916.ebuild 642 SHA256 0b1544e728e545dd6f620ed0138e39d5cc9bf4e659724f4f9ad25981dc9a87a4 SHA512 15b2ef4b3f33c333230bf282303a148bc95cf9e62866957c02c841de5058426e1b5273113f2b2ed17d7081a5a36c8643acd9694358f4ef2407e91fe19cf004e3 WHIRLPOOL c11883a7cde9c554980665fd31095e67d18cdd4854be879afe0a9ad86daa1a3dcf5a421e8f1abb3c44dfae11260c21d4a08c087b93460d4abcba44922ec4fb4f
+EBUILD pdftoipe-20130124-r1.ebuild 725 SHA256 e1006da9d186b01aceb15fd67638880cbba2f2ef77baf1496ff7a68979da0ec2 SHA512 aa3e8988092393da486926bcea2af93daee260f70165dc146e4bb50b61e1ff260d9fb566ef23c5fab728386957c8d4f8b83b57680e1a7975a8546c57bc5a9e08 WHIRLPOOL 900ecbefe3c02a75ae9d1761a6da4726fee768f58c6355267f8d941d89806f781b940faf7d371a6804c81bb78f4f918b96bc5de5c1803d1268535cacc28b456a
 EBUILD pdftoipe-20130124.ebuild 659 SHA256 3e02fd2182f5ebbbd69db09976df3e71969068c6eb6061d9d37f67365370768c SHA512 0edef273df2148a4eda65bd3af7c7e989fdd46a79bf6e9aed59e174d9b54059d04614cc149a51fb91d4767d9429e967720e7ad09ad5e85d2cc0e9b3b8f28e283 WHIRLPOOL bf89b59183ca51dc87339dee309c510eaf8f17c2831053d355e8b1e4e343ea6d63ffa4070e6b2e19ba2d9f8d230f082ebc0444fa8496475ecba927758d2d0f0b
diff --git a/media-gfx/pdftoipe/files/missingpage.patch b/media-gfx/pdftoipe/files/missingpage.patch
new file mode 100644 (file)
index 0000000..9c66923
--- /dev/null
@@ -0,0 +1,126 @@
+diff -rup pdftoipe-20130124-src/xmloutputdev.cpp pdftoipe-20130124-src-patched/xmloutputdev.cpp
+--- pdftoipe-20130124-src/xmloutputdev.cpp     2013-01-24 01:32:29.000000000 -0600
++++ pdftoipe-20130124-src-patched/xmloutputdev.cpp     2013-08-15 12:49:49.188415695 -0500
+@@ -116,6 +116,11 @@ void XmlOutputDev::setTextHandling(GBool
+ void XmlOutputDev::startPage(int pageNum, GfxState *state)
+ {
++  startPage(pageNum, state, NULL);  // for poppler <= 0.22
++}
++
++void XmlOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA)
++{
+   writePSFmt("<!-- Page: %d %d -->\n", pageNum, seqPage);
+   fprintf(stderr, "Converting page %d (numbered %d)\n", 
+         seqPage, pageNum);
+@@ -433,53 +438,53 @@ static const UnicodeToLatex unicode2late
+   // --------------------------------------------------------------------
+   { 0x391, "$\\Alpha$" },
+   { 0x392, "$\\Beta$" },
+-  { 0x393, "$\\Gamma" },
+-  { 0x394, "$\\Delta" },
+-  { 0x395, "$\\Epsilon" },
+-  { 0x396, "$\\Zeta" },
+-  { 0x397, "$\\Eta" },
+-  { 0x398, "$\\Theta" },
+-  { 0x399, "$\\Iota" },
+-  { 0x39a, "$\\Kappa" },
+-  { 0x39b, "$\\Lambda" },
+-  { 0x39c, "$\\Mu" },
+-  { 0x39e, "$\\Nu" },
+-  { 0x39e, "$\\Xi" },
+-  { 0x39f, "$\\Omicron" },
+-  { 0x3a0, "$\\Pi" },
+-  { 0x3a1, "$\\Rho" },
+-  { 0x3a3, "$\\Sigma" },   // sometimes \\sum would be better
+-  { 0x3a4, "$\\Tau" },
+-  { 0x3a5, "$\\Upsilon" },
+-  { 0x3a6, "$\\Phi" },
+-  { 0x3a7, "$\\Chi" },
+-  { 0x3a8, "$\\Psi" },
+-  { 0x3a9, "$\\Omega" },
++  { 0x393, "$\\Gamma$" },
++  { 0x394, "$\\Delta$" },
++  { 0x395, "$\\Epsilon$" },
++  { 0x396, "$\\Zeta$" },
++  { 0x397, "$\\Eta$" },
++  { 0x398, "$\\Theta$" },
++  { 0x399, "$\\Iota$" },
++  { 0x39a, "$\\Kappa$" },
++  { 0x39b, "$\\Lambda$" },
++  { 0x39c, "$\\Mu$" },
++  { 0x39e, "$\\Nu$" },
++  { 0x39e, "$\\Xi$" },
++  { 0x39f, "$\\Omicron$" },
++  { 0x3a0, "$\\Pi$" },
++  { 0x3a1, "$\\Rho$" },
++  { 0x3a3, "$\\Sigma$" },   // sometimes \\sum would be better
++  { 0x3a4, "$\\Tau$" },
++  { 0x3a5, "$\\Upsilon$" },
++  { 0x3a6, "$\\Phi$" },
++  { 0x3a7, "$\\Chi$" },
++  { 0x3a8, "$\\Psi$" },
++  { 0x3a9, "$\\Omega$" },
+   // --------------------------------------------------------------------
+   { 0x3b1, "$\\alpha$" },
+   { 0x3b2, "$\\beta$" },
+-  { 0x3b3, "$\\gamma" },
+-  { 0x3b4, "$\\delta" },
+-  { 0x3b5, "$\\varepsilon" },
+-  { 0x3b6, "$\\zeta" },
+-  { 0x3b7, "$\\eta" },
+-  { 0x3b8, "$\\theta" },
+-  { 0x3b9, "$\\iota" },
+-  { 0x3ba, "$\\kappa" },
+-  { 0x3bb, "$\\lambda" },
+-  { 0x3bc, "$\\mu" },
+-  { 0x3be, "$\\nu" },
+-  { 0x3be, "$\\xi" },
+-  { 0x3bf, "$\\omicron" },
+-  { 0x3c0, "$\\pi" },
+-  { 0x3c1, "$\\rho" },
+-  { 0x3c3, "$\\sigma" },
+-  { 0x3c4, "$\\tau" },
+-  { 0x3c5, "$\\upsilon" },
+-  { 0x3c6, "$\\phi" },
+-  { 0x3c7, "$\\chi" },
+-  { 0x3c8, "$\\psi" },
+-  { 0x3c9, "$\\omega" },
++  { 0x3b3, "$\\gamma$" },
++  { 0x3b4, "$\\delta$" },
++  { 0x3b5, "$\\varepsilon$" },
++  { 0x3b6, "$\\zeta$" },
++  { 0x3b7, "$\\eta$" },
++  { 0x3b8, "$\\theta$" },
++  { 0x3b9, "$\\iota$" },
++  { 0x3ba, "$\\kappa$" },
++  { 0x3bb, "$\\lambda$" },
++  { 0x3bc, "$\\mu$" },
++  { 0x3be, "$\\nu$" },
++  { 0x3be, "$\\xi$" },
++  { 0x3bf, "$\\omicron$" },
++  { 0x3c0, "$\\pi$" },
++  { 0x3c1, "$\\rho$" },
++  { 0x3c3, "$\\sigma$" },
++  { 0x3c4, "$\\tau$" },
++  { 0x3c5, "$\\upsilon$" },
++  { 0x3c6, "$\\phi$" },
++  { 0x3c7, "$\\chi$" },
++  { 0x3c8, "$\\psi$" },
++  { 0x3c9, "$\\omega$" },
+   // --------------------------------------------------------------------
+   { 0x2013, "-" },
+   { 0x2019, "'" },
+diff -rup pdftoipe-20130124-src/xmloutputdev.h pdftoipe-20130124-src-patched/xmloutputdev.h
+--- pdftoipe-20130124-src/xmloutputdev.h       2013-01-24 01:32:29.000000000 -0600
++++ pdftoipe-20130124-src-patched/xmloutputdev.h       2013-08-15 12:50:16.365122073 -0500
+@@ -51,7 +51,8 @@ public:
+   //----- initialization and control
+   // Start a page.
+-  virtual void startPage(int pageNum, GfxState *state);
++  virtual void startPage(int pageNum, GfxState *state); // poppler <=0.22
++  virtual void startPage(int pageNum, GfxState *state, XRef *xrefA);
+   // End a page.
+   virtual void endPage();
diff --git a/media-gfx/pdftoipe/pdftoipe-20130124-r1.ebuild b/media-gfx/pdftoipe/pdftoipe-20130124-r1.ebuild
new file mode 100644 (file)
index 0000000..51255b8
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Converts pdf files to Ipe xml files"
+HOMEPAGE="http://ipe7.sourceforge.net/"
+PEXT="${P}-src"
+SRC_URI="http://sourceforge.net/projects/ipe7/files%2Ftools%2F${PEXT}.tar.gz/download
+               -> ${P}.tar.gz"
+
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror"
+IUSE=""
+S="${WORKDIR}/${PEXT}"
+
+DEPEND="app-text/poppler
+       >=media-gfx/ipe-7.0.0"
+RDEPEND="${DEPEND}"
+
+
+src_prepare() {
+       epatch "${FILESDIR}"/missingpage.patch || die
+}
+
+src_compile() {
+       emake || die
+}
+
+src_install() {
+       exeinto /usr/bin/
+       doexe $S/pdftoipe
+       doman $S/pdftoipe.1
+       dodoc $S/readme.txt
+}
+
+