From 1e5e10f6661db0998bac55d76c1078e2d1bc6314 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Thu, 18 Feb 2016 23:08:17 +0000 Subject: dev-java/metadata-extractor: Version bump and java-pkg-simple rewrite Patching build.xml was annoying. This version isn't limited to Java 6. Nothing currently requires it but it's well-maintained and looks useful. Package-Manager: portage-2.2.27 --- dev-java/metadata-extractor/Manifest | 1 + .../files/metadata-extractor-2.2.2-buildfix.patch | 46 ------------------- .../metadata-extractor-2.2.2-r4.ebuild | 45 ------------------- .../metadata-extractor-2.8.1.ebuild | 52 ++++++++++++++++++++++ dev-java/metadata-extractor/metadata.xml | 13 ++++-- 5 files changed, 63 insertions(+), 94 deletions(-) delete mode 100644 dev-java/metadata-extractor/files/metadata-extractor-2.2.2-buildfix.patch delete mode 100644 dev-java/metadata-extractor/metadata-extractor-2.2.2-r4.ebuild create mode 100644 dev-java/metadata-extractor/metadata-extractor-2.8.1.ebuild (limited to 'dev-java') diff --git a/dev-java/metadata-extractor/Manifest b/dev-java/metadata-extractor/Manifest index 6e18d8ce580c..52d94f8341df 100644 --- a/dev-java/metadata-extractor/Manifest +++ b/dev-java/metadata-extractor/Manifest @@ -1 +1,2 @@ DIST metadata-extractor-2.2.2-src.jar 3936358 SHA256 38f8b12418afde99286b9b7c86158eb4fd2c47a23ed4af025af77bae301e1783 SHA512 5004ecef28e9fc1f24a4b13b4596c801e9b20fcb9c20165e79b2543837187b8cb019aa32c301e2850939a95a23224444d6eb7e23c45d8bf54cf267899052b2f7 WHIRLPOOL ff35285df14741babe45b2b1906b0d5ceacbc76a12684d0e676cb7ad784eeafaa9bee4016489ce5643d5bcf85d1140d69667f8f9a646c9720ae4eb2602bbf031 +DIST metadata-extractor-2.8.1.tar.gz 3132397 SHA256 0d734971e9896709fb9e11406cefbeaa0cf11d57fa7dca6b02acaf92a2a686fd SHA512 4e9fe88be4112fbf9ce481e7fd3b3a7c9544d1d5b1ebd646d2c6e2a2a1fe2d53a4b80ab859fe5e277c3e72f5e035aa46d7af7a953a182f5b8215edf9cde99974 WHIRLPOOL bc296ebe64b82ec9485f364e287139369bb1da5f98eab47db5014d0f1d263378d0341383da95bda3efa5fba6c81c3ebb9c30a3586aa7277ec893d2ad6ac5e52f diff --git a/dev-java/metadata-extractor/files/metadata-extractor-2.2.2-buildfix.patch b/dev-java/metadata-extractor/files/metadata-extractor-2.2.2-buildfix.patch deleted file mode 100644 index fb455f4f0943..000000000000 --- a/dev-java/metadata-extractor/files/metadata-extractor-2.2.2-buildfix.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- metadata-extractor.build 2009-01-31 15:22:58.000000000 +0200 -+++ metadata-extractor.build.fixed 2009-01-31 15:37:02.000000000 +0200 -@@ -24,25 +24,38 @@ - srcdir="${src}" - destdir="${build}" - debug="${debug}" -- verbose="${verbose}"/> -+ verbose="${verbose}"> -+ -+ -+ -+ -+ -+ -+ -+ - - -- -+ - - - -- -+ -+ - - - -- -+ - - - - - -- -+ - - - diff --git a/dev-java/metadata-extractor/metadata-extractor-2.2.2-r4.ebuild b/dev-java/metadata-extractor/metadata-extractor-2.2.2-r4.ebuild deleted file mode 100644 index 76b02905cb2a..000000000000 --- a/dev-java/metadata-extractor/metadata-extractor-2.2.2-r4.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit java-pkg-2 java-ant-2 eutils - -DESCRIPTION="Metadata extraction framework for Exif and IPTC metadata segments, extraction support for JPEG files" -HOMEPAGE="http://www.drewnoakes.com/code/exif/" -SRC_URI="http://www.drewnoakes.com/code/exif/metadata-extractor-${PV}-src.jar" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="test" - -DEPEND="|| ( =virtual/jdk-1.6* =virtual/jdk-1.5* =virtual/jdk-1.4* ) - test? ( dev-java/junit:0 ) - app-arch/unzip:0" - -RDEPEND=">=virtual/jre-1.4" -S=${WORKDIR} - -java_prepare() { - epatch "${FILESDIR}"/${P}-buildfix.patch - - mv metadata-extractor.build build.xml || die - - use test && java-pkg_jar-from --build-only --into lib/ junit junit.jar -} - -EANT_DOC_TARGET="" -EANT_BUILD_TARGET="dist-binaries" - -src_install() { - java-pkg_newjar dist/*.jar ${PN}.jar - - dodoc ReleaseNotes.txt -} - -src_test() { - ANT_TASKS="ant-junit" eant test -} diff --git a/dev-java/metadata-extractor/metadata-extractor-2.8.1.ebuild b/dev-java/metadata-extractor/metadata-extractor-2.8.1.ebuild new file mode 100644 index 000000000000..039db5ee1faf --- /dev/null +++ b/dev-java/metadata-extractor/metadata-extractor-2.8.1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Access the metadata in digital images and video via a simple Java API" +HOMEPAGE="http://www.drewnoakes.com/code/exif/" +SRC_URI="https://github.com/drewnoakes/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples test" + +CDEPEND="dev-java/xmpcore:0" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.6 + test? ( dev-java/junit:4 )" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.6" + +S="${WORKDIR}/${P}" +JAVA_SRC_DIR="Source" +JAVA_GENTOO_CLASSPATH="xmpcore" + +java_prepare() { + java-pkg_clean +} + +src_install() { + java-pkg-simple_src_install + dodoc {CONTRIBUTING,README}.md + use examples && java-pkg_doexamples Samples +} + +src_test() { + local DIR=Tests + local CP="${DIR}:${S}/${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})" + local TESTS=$(find ${DIR} -name "*Test.java") + TESTS="${TESTS//Tests\/}" + TESTS="${TESTS//.java}" + TESTS="${TESTS//\//.}" + + ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java") + ejunit4 -classpath "${CP}" ${TESTS} +} diff --git a/dev-java/metadata-extractor/metadata.xml b/dev-java/metadata-extractor/metadata.xml index a00c8821038a..3d82341578d3 100644 --- a/dev-java/metadata-extractor/metadata.xml +++ b/dev-java/metadata-extractor/metadata.xml @@ -6,8 +6,15 @@ Java - A general metadata extraction framework. Support currently exists for - Exif and Iptc metadata segments. Extraction of these segments is - provided for Jpeg files. + metadata-extractor is a straightforward Java library for reading metadata from image files. + + Metadata metadata = ImageMetadataReader.readMetadata(imagePath); + + With that metadata object, you can iterate or query the various tag values that were read from the image. + + The library understands several formats of metadata, many of which may be present in a single image. + + drewnoakes/metadata-extractor + -- cgit v1.2.3-65-gdbad