From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DDC52138334 for ; Sun, 24 Mar 2019 11:23:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB807E0995; Sun, 24 Mar 2019 11:23:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 84909E0995 for ; Sun, 24 Mar 2019 11:23:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 657F8335D13 for ; Sun, 24 Mar 2019 11:23:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C5B544B for ; Sun, 24 Mar 2019 11:23:48 +0000 (UTC) From: "Daniel Pielmeier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Daniel Pielmeier" Message-ID: <1553426519.326b74f81e9368f38e9132e746dd56346632132e.billie@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/projectx/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/projectx/projectx-0.91.0.10-r2.ebuild X-VCS-Directories: media-video/projectx/ X-VCS-Committer: billie X-VCS-Committer-Name: Daniel Pielmeier X-VCS-Revision: 326b74f81e9368f38e9132e746dd56346632132e X-VCS-Branch: master Date: Sun, 24 Mar 2019 11:23:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d430f13f-45d0-432a-964d-4912e1521eab X-Archives-Hash: d4e28e00f2c7540cfb8d170cc6f72170 commit: 326b74f81e9368f38e9132e746dd56346632132e Author: Daniel Pielmeier gentoo org> AuthorDate: Sun Mar 24 11:21:59 2019 +0000 Commit: Daniel Pielmeier gentoo org> CommitDate: Sun Mar 24 11:21:59 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=326b74f8 media-video/projectx: Revision bump to projectx-0.91.0.10-r2. Switch to EAPI 7. Signed-off-by: Daniel Pielmeier gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 media-video/projectx/projectx-0.91.0.10-r2.ebuild | 134 ++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/media-video/projectx/projectx-0.91.0.10-r2.ebuild b/media-video/projectx/projectx-0.91.0.10-r2.ebuild new file mode 100644 index 00000000000..664b3f10673 --- /dev/null +++ b/media-video/projectx/projectx-0.91.0.10-r2.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source" + +inherit desktop eutils java-pkg-2 java-ant-2 toolchain-funcs xdg + +XDG_P="xdg-20100731" + +DESCRIPTION="Converts, splits and demuxes DVB and other MPEG recordings" +HOMEPAGE="http://project-x.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~billie/distfiles/${P}.tar.xz + https://dev.gentoo.org/~billie/distfiles/${PN}-idctfast.tar.xz + https://dev.gentoo.org/~billie/distfiles/${XDG_P}.java.xz + https://dev.gentoo.org/~billie/distfiles/${PN}-icon.png" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="X cpu_flags_x86_mmx cpu_flags_x86_sse" + +COMMON_DEPEND=" + dev-java/commons-net:0 + X? ( dev-java/browserlauncher2:1.0 ) +" +RDEPEND=" + ${COMMON_DEPEND} + >=virtual/jre-1.5 +" +DEPEND=" + ${COMMON_DEPEND} + >=virtual/jdk-1.5 + app-arch/xz-utils + virtual/libiconv +" + +S="${WORKDIR}/Project-X" + +mainclass() { + # read Main-Class from MANIFEST.MF + sed -n "s/^Main-Class: \([^ ]\+\).*/\1/p" "${S}/MANIFEST.MF" || die +} + +src_prepare() { + default + + xdg_environment_reset + + local X + + # apply stdout corruption patch (zzam@gentoo.org) + eapply "${FILESDIR}/${PN}-0.91.0.10-stdout-corrupt.patch" + + # apply BrowserLauncher2 patch + use X && eapply "${FILESDIR}/${PN}-0.91.0.10-bl2.patch" + rm -rf src/edu || die + + # apply IDCTFast patch + eapply "${FILESDIR}/${PN}-0.91.0.10-idctfast.patch" + + # apply XDG patch + cp -f "${WORKDIR}/${XDG_P}.java" "${S}/src/xdg.java" || die + eapply "${FILESDIR}/${PN}-0.91.0.10-xdg.patch" + + # copy build.xml + cp -f "${FILESDIR}/build-0.91.0.10.xml" build.xml || die + + # patch executable and icon + sed -i -e "s:^\(Exec=\).*:\1${PN}_gui:g" \ + -e "s:^\(Icon=\).*:\1${PN}:g" *.desktop || die + + # convert CRLF to LF + edos2unix *.txt MANIFEST.MF + + # convert docs to utf-8 + if [ -x "$(type -p iconv)" ]; then + for X in zutun.txt; do + iconv -f LATIN1 -t UTF8 -o "${X}~" "${X}" && mv -f "${X}~" "${X}" || die + done + fi + + # merge/remove resources depending on USE="X" + if use X; then + mv -f htmls resources/ || die + else + rm -rf src/net/sourceforge/dvb/projectx/gui || die + rm resources/*.gif || die + fi + + # update library packages + cd lib || die + rm -f {commons-net,jakarta-oro}*.jar || die + java-pkg_jar-from commons-net + use X && java-pkg_jar-from browserlauncher2-1.0 + java-pkg_ensure-no-bundled-jars +} + +src_compile() { + local IDCT="idct-mjpeg" # default IDCT implementation + if use x86 || use amd64; then + use cpu_flags_x86_mmx && IDCT="idct-mjpeg-mmx" + use cpu_flags_x86_sse && IDCT="idct-mjpeg-sse" + fi + + eant build $(use_doc) -Dmanifest.mainclass=$(mainclass) + + cd lib/PORTABLE || die + emake CC=$(tc-getCC) IDCT="${IDCT}" LDFLAGS="${LDFLAGS}" \ + CPLAT="${CFLAGS} -O3 -ffast-math -fPIC" +} + +src_install() { + java-pkg_dojar dist/${PN}.jar + java-pkg_doso lib/PORTABLE/libidctfast.so + + java-pkg_dolauncher ${PN}_cli --main $(mainclass) \ + --java_args "-Djava.awt.headless=true -Xmx256m" + + if use X; then + java-pkg_dolauncher ${PN}_gui --main $(mainclass) \ + --java_args "-Xmx256m" + dosym ${PN}_gui /usr/bin/${PN} + newicon "${DISTDIR}/${PN}-icon.png" "${PN}.png" + domenu *.desktop + else + dosym ${PN}_cli /usr/bin/${PN} + fi + + dodoc *.txt + use doc && java-pkg_dojavadoc apidocs + use source && java-pkg_dosrc src +}