summaryrefslogtreecommitdiff
path: root/app-text/jmupdf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/jmupdf
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/jmupdf')
-rw-r--r--app-text/jmupdf/Manifest8
-rw-r--r--app-text/jmupdf/files/jmupdf-0.4.1-build-xml.patch27
-rw-r--r--app-text/jmupdf/files/jmupdf-0.4.1-umlaut.patch11
-rw-r--r--app-text/jmupdf/jmupdf-0.4.1-r1.ebuild74
-rw-r--r--app-text/jmupdf/jmupdf-9999.ebuild69
-rw-r--r--app-text/jmupdf/metadata.xml18
6 files changed, 207 insertions, 0 deletions
diff --git a/app-text/jmupdf/Manifest b/app-text/jmupdf/Manifest
new file mode 100644
index 000000000000..a726ec61736d
--- /dev/null
+++ b/app-text/jmupdf/Manifest
@@ -0,0 +1,8 @@
+AUX jmupdf-0.4.1-build-xml.patch 792 SHA256 33e580ad84a7f2df9c98ba38d70b3d44195ac278d7f70c8c3fa5c462184267e3 SHA512 307d6feb98cec0bf06873b53e9eab7de238a8ef64f65164f7ae52ec8362afe4123410629e8bc18862fa70b2ea153e46c991152663142c5078378550c1279690d WHIRLPOOL 979f3621d249f5c0c67b8c14670ce11f6d34f822b7a7361a4d8c5f7775701db6293ce12b4eb9d23b2c68117309beb269f1dc3b2abc32c9caea182d34780e61ef
+AUX jmupdf-0.4.1-umlaut.patch 415 SHA256 efae6fbcb18ac4164188cf613b0963077fe080b94346b8aa2c5a7b1af09bb72d SHA512 f67ee76cb5f2cf5a30010a914c0cf370a283e16c2ccb1500f8b9301a372707cb41a1e89bb108a13088cd348d44c8b8e568274f4eff6efd9b8c62e4f11bfc8159 WHIRLPOOL 163a46bfb96224fc9f637e3b8d64ac1b15d67bedd8011b92bb27a012a3b1e29639bedab6a7f824cf4860c9cc6aec07b78e75781acbbc5c0fe60d77cf120f756a
+DIST 2012-02-23-source-jmupdf-0.4.1.7z 4212084 SHA256 cb7311021dce6e1e7425b088f4d60c12f43c0e26eff794b057d78e105cdbbbc0 SHA512 f16190d02f9c3f6fe9aa2acd7bd270b6e807b61e926cd1bc4e17628f2d62a45d0f024c2748e4eb0a20e7da55895289f6c74685cb371e101a0901235a48eb1f42 WHIRLPOOL e8e93d303e925d1c1313d9951b3306d01abcb9ce1bca50fb40054e807c67f0347ee7c2375de11fde4f957f56fdc98e70620698fb3a02ff8a9f651fb6a21ffe86
+EBUILD jmupdf-0.4.1-r1.ebuild 1707 SHA256 4b8b798d21b60d1d48fe6bdc7d10dde4910587197c8fdeda134e6075a5af73bd SHA512 9c2a462b912b11776d1dec605704ae6c8c2e107c59c2b346d929dcdf328a85b9dabb690643ef512bde058e4a824bcff871eab66a15a87dcec39b98c64c74b388 WHIRLPOOL 963e35f7d4f0aaa4fafe624f8555d7b7970695ac1085ee53c644371f82359245a5ea1f90a9682e2344335b2a5f68c4303d27cacb18e7021a67914d29795a3ec5
+EBUILD jmupdf-9999.ebuild 1557 SHA256 ad36634a9b94f5d24082e1070850614392664d8ca680cd2438da7db4c5a256c9 SHA512 03e325bf300c265eb8f5b7e0ef9f8119130bb2d161bbac5f99bae531482fb7949b302eac56c112819d20391e074207970c62196bfdf416749832b57dc03763a1 WHIRLPOOL 304f7e52f0a9caa0cb627291109fef890ab3d3ed7f4685758d9c97b7f52a194bbd5691e862416fceec48ddcdc63fbfafd520473dc07a0d9c13b911fa72a97c2f
+MISC ChangeLog 2791 SHA256 796240b8772f1072c0011408a683044e8fddff110fa2378130efeeffd2dafe3c SHA512 45744e2403efba91cb5f0351c2c27b03daae9fe1ae393d3764bc0d3d7ca10617b73690ae4ab117a2dd82aaa56c4443d66ec47295513557e8a0019cafd2b5a544 WHIRLPOOL fec105b1d456d9c00507928b9038f8b29a8b9cdd73c6cca2888bff16d3edf044a2951d896b614082ef4028c569c9da9d37e26d6fe0eccad0f28c81b6fb86c935
+MISC ChangeLog-2015 796 SHA256 e0d2715bdb1897050ea3e942a879bc434888688527a85cb16c641b3b18c80362 SHA512 6e4df804caea7b06ff4d076224e83a08e8eed930833f2b46c7af9e6e7be0fdea7e885510a59e4d28ac3d38bca8a8a6af0f67ff0ed13906ed627c869a5d971688 WHIRLPOOL d8fd6ed44aa3bc7ff311df45d367aa0e63aaaa6d763f9f5d621422e59c48e9a81b89b3fbbd193e671a8e98995b2731725675e488c1cd30e25e8009fd2d133773
+MISC metadata.xml 761 SHA256 4f642a06499cf9d5953a853fed73cb994b60caa51b77e086bcb5b5cf92fabf9e SHA512 08b8a8cee776f079485289f9b1925eec9c7ba47f08fcb64d8b42c1d7c2ca2544a3963e2525fd1fd4de9c38f9a2b6744a63100f39c83d07a0a2b259c80e1bf564 WHIRLPOOL b7d979a65ff70ac49f25a334b901fd7e8bab43ab490746450c7ebd953c61419a499b037d2b50cf9b6878325bc7a74ae82d0a1f2ffc8404d2b9c957fbd12b5da8
diff --git a/app-text/jmupdf/files/jmupdf-0.4.1-build-xml.patch b/app-text/jmupdf/files/jmupdf-0.4.1-build-xml.patch
new file mode 100644
index 000000000000..3eb6a12c5f71
--- /dev/null
+++ b/app-text/jmupdf/files/jmupdf-0.4.1-build-xml.patch
@@ -0,0 +1,27 @@
+--- jmupdf-0.4.1/jmupdf/build.xml
++++ jmupdf-0.4.1/jmupdf/build.xml
+@@ -1,7 +1,7 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <project name="jmupdf" default="jmupdf" basedir=".">
+
+- <property name="source.dir" value="${basedir}/bin"/>
++ <property name="source.dir" value="${basedir}/src"/>
+ <property name="target.dir" value="${basedir}"/>
+ <property name="build.dir" value="${basedir}/build"/>
+
+@@ -11,9 +11,12 @@
+
+ <mkdir dir="${build.dir}"/>
+
+- <copy todir="${build.dir}">
+- <fileset dir="${source.dir}" includes="**/*"/>
+- </copy>
++ <javac srcdir="${source.dir}"
++ includeantruntime="false"
++ destdir="${build.dir}"
++ debug="on"
++ source="1.5"
++ />
+
+ <jar destfile="${build.dir}/jmupdf.jar">
+ <manifest>
diff --git a/app-text/jmupdf/files/jmupdf-0.4.1-umlaut.patch b/app-text/jmupdf/files/jmupdf-0.4.1-umlaut.patch
new file mode 100644
index 000000000000..c53e7bd0d813
--- /dev/null
+++ b/app-text/jmupdf/files/jmupdf-0.4.1-umlaut.patch
@@ -0,0 +1,11 @@
+--- jmupdf-0.4.1/jmupdf/src/com/examples/pdf/convert/Pdf_2_Png.java
++++ jmupdf-0.4.1/jmupdf/src/com/examples/pdf/convert/Pdf_2_Png.java
+@@ -26,7 +26,7 @@
+ */
+ pdfDoc.saveAsPng(
+ 1, // Page number
+- "e:\\tmp\\Lösung.png", // PNG file
++ "e:\\tmp\\Loesung.png", // PNG file
+ 2f, // Zoom
+ ImageType.IMAGE_TYPE_RGB); // Color space. Only RGB, ARGB & Gray.
+
diff --git a/app-text/jmupdf/jmupdf-0.4.1-r1.ebuild b/app-text/jmupdf/jmupdf-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..df7924d2755f
--- /dev/null
+++ b/app-text/jmupdf/jmupdf-0.4.1-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-2 java-ant-2 multilib
+EANT_BUILD_TARGET=${PN}
+
+DESCRIPTION="Java library for rendering PDF, XPS and CBZ (Comic Book) documents"
+HOMEPAGE="https://code.google.com/p/jmupdf/"
+SRC_URI="https://jmupdf.googlecode.com/files/2012-02-23-source-${P}.7z"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="system-mupdf"
+
+REQUIRED_USE="!system-mupdf"
+
+RDEPEND="
+ media-libs/freetype:2
+ media-libs/openjpeg:0=
+ system-mupdf? ( >=app-text/mupdf-1.2 )
+ virtual/jdk:1.7
+"
+DEPEND="${RDEPEND}
+ app-arch/p7zip
+ media-libs/libbmp
+"
+
+S=${WORKDIR}/${PN}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build-xml.patch \
+ "${FILESDIR}"/${P}-umlaut.patch
+
+ edos2unix ../mupdf/jni/*
+
+ sed -e "/^JVM_INCLUDES/s:=.*:= $(java-pkg_get-jni-cflags):" \
+ -i ../mupdf/MakeJNI2 || die
+ sed -e "s:-pipe -O2::" \
+ -i ../mupdf/Makerules || die
+
+ rm -r ../mupdf/thirdparty || die
+ if use system-mupdf ; then
+ for i in android apps cbz cmaps debian draw fitz fonts ios pdf scripts viewer win32 xps ; do
+ einfo remove mupdf/${i}
+ rm -r ../mupdf/${i} || die
+ done
+ fi
+}
+
+src_compile() {
+ local system-fitz=$(usex system-mupdf "FITZ_LIB=\"${EROOT}usr/$(get_libdir)/libfitz.so\"" "" )
+ emake -C ../mupdf \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ SYS_FREETYPE_INC="$($(tc-getPKG_CONFIG) --cflags freetype2)" \
+ "${system-fitz}" \
+ JNI_DLL=build/libjmupdf.so \
+ JNI_CMD="-shared -Wl,-soname -Wl,lib${PN}.so" \
+ build/libjmupdf.so
+
+ java-pkg-2_src_compile
+}
+
+src_install() {
+ dolib.so ../mupdf/build/lib${PN}.so
+
+ java-pkg_dojar build/${PN}{,-viewer}.jar
+
+ dodoc Readme
+}
diff --git a/app-text/jmupdf/jmupdf-9999.ebuild b/app-text/jmupdf/jmupdf-9999.ebuild
new file mode 100644
index 000000000000..a2b0354b57ec
--- /dev/null
+++ b/app-text/jmupdf/jmupdf-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic git-2 java-pkg-2 java-ant-2 multilib
+EANT_BUILD_TARGET=${PN}
+
+DESCRIPTION="Java library for rendering PDF, XPS and CBZ (Comic Book) documents"
+HOMEPAGE="https://code.google.com/p/jmupdf/"
+EGIT_REPO_URI="https://code.google.com/p/${PN}/"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS=""
+IUSE="system-mupdf"
+
+REQUIRED_USE="!system-mupdf"
+
+RDEPEND="system-mupdf? ( >=app-text/mupdf-1.2 )
+ virtual/jdk:1.7"
+DEPEND="${RDEPEND}
+ app-arch/p7zip
+ media-libs/libbmp"
+
+src_prepare() {
+ if ! grep javac ${PN}/build.xml >/dev/null ; then
+ epatch \
+ "${FILESDIR}"/${PN}-0.4.1-build-xml.patch
+ fi
+
+ edos2unix $(find mupdf/jni -type f)
+
+ sed -e "/^JVM_INCLUDES/s:=.*:= $(java-pkg_get-jni-cflags):" \
+ -i mupdf/MakeJNI2 || die
+ sed -e "s:-pipe -O2::" \
+ -i mupdf/Makerules || die
+
+ rm -r mupdf/thirdparty || die
+ if use system-mupdf ; then
+ for i in android apps cbz cmaps debian draw fitz fonts ios pdf scripts viewer win32 xps ; do
+ einfo remove mupdf/${i}
+ rm -r mupdf/${i} || die
+ done
+ fi
+}
+
+src_compile() {
+ #append-cflags -Ijni/includes
+ emake -C mupdf \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ SYS_FREETYPE_INC="$($(tc-getPKG_CONFIG) --cflags freetype2)" \
+ JNI_DLL=build/libjmupdf.so \
+ JNI_CMD="-shared -Wl,-soname -Wl,lib${PN}.so" \
+ build/libjmupdf.so
+
+ cd ${PN}
+ java-pkg-2_src_compile
+}
+
+src_install() {
+ dolib.so mupdf/build/lib${PN}.so
+
+ cd ${PN}
+ java-pkg_dojar build/${PN}{,-viewer}.jar
+
+ dodoc Readme
+}
diff --git a/app-text/jmupdf/metadata.xml b/app-text/jmupdf/metadata.xml
new file mode 100644
index 000000000000..42a250af9af9
--- /dev/null
+++ b/app-text/jmupdf/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+<use>
+ <flag name="system-mupdf">Link against system version of app-text/mupdf</flag>
+</use>
+<longdescription>
+JMuPdf is a Java library for rendering PDF, XPS and CBZ (Comic Book) documents. It can render pages and export them into various formats as well as generate a Java buffered image. It has the ability to render the whole page or sections (cropping). It can also extract page text, links, outlines, etc.
+</longdescription>
+</pkgmetadata>