public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Daniel Pielmeier" <billie@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/projectx/
Date: Sat, 17 Apr 2021 17:47:32 +0000 (UTC)	[thread overview]
Message-ID: <1618681632.d1d19f945b50ad3d430c1929594eb8f38f8727b1.billie@gentoo> (raw)

commit:     d1d19f945b50ad3d430c1929594eb8f38f8727b1
Author:     Daniel Pielmeier <billie <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 17:47:12 2021 +0000
Commit:     Daniel Pielmeier <billie <AT> gentoo <DOT> org>
CommitDate: Sat Apr 17 17:47:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1d19f94

media-video/projectx: Bump java virtuals to 1.8.

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>

 media-video/projectx/projectx-0.91.0.10-r3.ebuild | 134 ++++++++++++++++++++++
 1 file changed, 134 insertions(+)

diff --git a/media-video/projectx/projectx-0.91.0.10-r3.ebuild b/media-video/projectx/projectx-0.91.0.10-r3.ebuild
new file mode 100644
index 00000000000..2663408f4e0
--- /dev/null
+++ b/media-video/projectx/projectx-0.91.0.10-r3.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2021 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.8:*
+"
+DEPEND="
+	${COMMON_DEPEND}
+	>=virtual/jdk-1.8:*
+	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
+}


             reply	other threads:[~2021-04-17 17:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17 17:47 Daniel Pielmeier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-17 15:32 [gentoo-commits] repo/gentoo:master commit in: media-video/projectx/ Arthur Zamarin
2024-06-07 16:24 Daniel Pielmeier
2024-06-07 15:05 Arthur Zamarin
2024-06-07  5:14 Arthur Zamarin
2024-06-07  5:14 Arthur Zamarin
2024-05-08 21:22 Daniel Pielmeier
2024-05-04  9:40 Daniel Pielmeier
2024-03-08 14:23 Daniel Pielmeier
2022-10-09 12:29 Daniel Pielmeier
2022-10-08 18:43 Sam James
2022-03-20  0:16 Sam James
2021-08-19 17:39 Daniel Pielmeier
2021-08-19  1:08 Sam James
2021-08-10  6:41 Agostino Sarubbo
2021-08-09  6:41 Agostino Sarubbo
2020-05-18 13:02 Agostino Sarubbo
2020-05-18 12:55 Agostino Sarubbo
2020-05-17 10:06 Sergei Trofimovich
2019-04-07 13:06 Daniel Pielmeier
2019-04-01 19:58 Thomas Deutschmann
2019-03-24 20:25 Sergei Trofimovich
2019-03-24 11:23 Daniel Pielmeier
2019-03-24 10:01 Agostino Sarubbo
2017-11-19 11:19 Daniel Pielmeier

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=1618681632.d1d19f945b50ad3d430c1929594eb8f38f8727b1.billie@gentoo \
    --to=billie@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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