Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Graham Gower <graham.gower@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 1/2] mupdf_git.bb: add recipe.
Date: Mon, 06 Sep 2010 14:00:32 +0930	[thread overview]
Message-ID: <4C846E68.3000004@gmail.com> (raw)

Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 recipes/mupdf/files/wintitle.patch |   15 +++++++++
 recipes/mupdf/mupdf_git.bb         |   60 ++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 0 deletions(-)
 create mode 100644 recipes/mupdf/files/wintitle.patch
 create mode 100644 recipes/mupdf/mupdf_git.bb

diff --git a/recipes/mupdf/files/wintitle.patch b/recipes/mupdf/files/wintitle.patch
new file mode 100644
index 0000000..dbcf834
--- /dev/null
+++ b/recipes/mupdf/files/wintitle.patch
@@ -0,0 +1,15 @@
+Upstream: http://bugs.ghostscript.com/show_bug.cgi?id=691577
+Status: pending
+
+diff --git a/apps/x11_main.c b/apps/x11_main.c
+index 395f9fd..c045863 100644
+--- a/apps/x11_main.c
++++ b/apps/x11_main.c
+@@ -198,6 +198,7 @@ void wincursor(pdfapp_t *app, int curs)
+
+ void wintitle(pdfapp_t *app, char *s)
+ {
++    XStoreName(xdpy, xwin, s);
+ #ifdef X_HAVE_UTF8_STRING
+     Xutf8SetWMProperties(xdpy, xwin, s, s, nil, 0, nil, nil, nil);
+ #else
diff --git a/recipes/mupdf/mupdf_git.bb b/recipes/mupdf/mupdf_git.bb
new file mode 100644
index 0000000..ddec287
--- /dev/null
+++ b/recipes/mupdf/mupdf_git.bb
@@ -0,0 +1,60 @@
+DESCRIPTION = "A lightweight PDF viewer and toolkit written in portable C."
+HOMEPAGE = "http://www.mupdf.com"
+SECTION = "x11/applications"
+LICENSE = "GPLv3"
+
+SRCREV = "8147dd7fe7107de60f2c7de3bcd78e0048c26241"
+PV = "0.7+gitr${SRCPV}"
+PR = "r0"
+
+DEPENDS = "openjpeg-native jbig2dec-native jpeg-native freetype-native libpng-native openjpeg jbig2dec jpeg zlib virtual/libx11 libxext freetype"
+
+SRC_URI = "git://mupdf.com/repos/mupdf.git;protocol=http \
+		file://wintitle.patch"
+
+S = "${WORKDIR}/git"
+
+PACKAGES =+ "${PN}-tools ${PN}-tools-doc "
+FILES_${PN}-tools = "${bindir}/pdfclean ${bindir}/pdfdraw ${bindir}/pdfshow \
+                     ${bindir}/pdfextract ${bindir}/pdfinfo"
+FILES_${PN}-tools-doc = "${mandir}/man1/pdfclean.1 ${mandir}/man1/pdfdraw.1 \
+                         ${mandir}/man1/pdfshow.1"
+
+# mupdf crashes when built with -ggdb3
+# http://bugs.ghostscript.com/show_bug.cgi?id=691578
+FULL_OPTIMIZATION := "${@oe_filter_out('-ggdb3', '${FULL_OPTIMIZATION}', d)}"
+
+do_configure() {
+    # we don't include CJK fonts to make binary more slim
+    # comment out following two lines if you need support for CJK
+    sed -i 's:^\t\$.GENDIR./font_cjk.c::g' ${S}/Makefile
+    echo "CFLAGS += -DNOCJK" >> ${S}/Makerules
+}
+
+do_compile() {
+    # mupdf uses couple of tools for code generation during build process
+    # so we need to compile them first with host compiler
+    unset CFLAGS LDFLAGS
+    export PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig
+    oe_runmake build=release build/release
+    oe_runmake build=release build/release/cmapdump LD="${BUILD_CC} -L${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE}" CC=${BUILD_CC}
+    oe_runmake build=release build/release/fontdump LD="${BUILD_CC} -L${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE}" CC=${BUILD_CC}
+
+    export PKG_CONFIG_PATH=${STAGING_LIBDIR}/pkgconfig
+    # ...and then we fire 'make', feeding proper
+    # cross-compilation flags through Makerules file
+    echo "CFLAGS += ${CFLAGS}" >> ${S}/Makerules
+    echo "LDFLAGS += ${LDFLAGS}" >> ${S}/Makerules
+    oe_runmake build=release LD="${CC}"
+}
+
+do_install() {
+    oe_runmake install build=release prefix="${D}/usr"
+    install -d ${D}/${datadir}/applications
+    install -d ${D}/${datadir}/pixmaps
+    install -d ${D}/${mandir}/man1
+    install -m 0644 ${S}/debian/mupdf.xpm ${D}/${datadir}/pixmaps/
+    install -m 0644 ${S}/debian/mupdf.desktop ${D}/${datadir}/applications/
+    install -m 0644 ${S}/debian/*.1 ${D}/${mandir}/man1/
+}
+
-- 
1.7.1




                 reply	other threads:[~2010-09-06  4:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C846E68.3000004@gmail.com \
    --to=graham.gower@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox