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: Wed,  8 May 2024 21:22:57 +0000 (UTC)	[thread overview]
Message-ID: <1715203303.374aa7a9d1f37c728157dab7672fb83d94140021.billie@gentoo> (raw)

commit:     374aa7a9d1f37c728157dab7672fb83d94140021
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Sun May  5 15:45:10 2024 +0000
Commit:     Daniel Pielmeier <billie <AT> gentoo <DOT> org>
CommitDate: Wed May  8 21:21:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=374aa7a9

media-video/projectx: update EAPI 7 -> 8

- Switches to java-pkg-simple
- No longer needs build.xml nor depends on ant
- Drops java-ant-2.eclass, edos2unix.eclass
- Uses the JAVA_MAIN_CLASS eclass variable for launchers

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/36562
Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org>

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

diff --git a/media-video/projectx/projectx-0.91.0.10-r5.ebuild b/media-video/projectx/projectx-0.91.0.10-r5.ebuild
new file mode 100644
index 000000000000..3e5d18a572cc
--- /dev/null
+++ b/media-video/projectx/projectx-0.91.0.10-r5.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+
+inherit desktop java-pkg-2 java-pkg-simple toolchain-funcs xdg
+
+XDG_P="xdg-20100731"
+
+DESCRIPTION="Converts, splits and demuxes DVB and other MPEG recordings"
+HOMEPAGE="https://project-x.sourceforge.net/"
+SRC_URI="https://dev.gentoo.org/~billie/distfiles/${P}-r4.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"
+
+S="${WORKDIR}/Project-X"
+
+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
+"
+
+JAVA_ENCODING="iso-8859-1"
+JAVA_GENTOO_CLASSPATH="commons-net"
+JAVA_RESOURCE_DIRS="resources"
+JAVA_SRC_DIR="src"
+
+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
+	if use X; then
+		eapply "${FILESDIR}/${PN}-0.91.0.10-bl2.patch"
+		JAVA_GENTOO_CLASSPATH+=" browserlauncher2-1.0"
+	fi
+	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"
+
+	# patch executable and icon
+	sed -i -e "s:^\(Exec=\).*:\1${PN}_gui:g" \
+		-e "s:^\(Icon=\).*:\1${PN}:g" *.desktop || die
+
+	JAVA_MAIN_CLASS="$(grep Main MANIFEST.MF | cut -d' ' -f2)"
+
+	# 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
+
+	java-pkg-simple_src_compile
+
+	cd lib/PORTABLE || die
+	emake CC="$(tc-getCC)" IDCT="${IDCT}" LDFLAGS="${LDFLAGS}" \
+		CPLAT="${CFLAGS} -O3 -ffast-math -fPIC"
+}
+
+src_install() {
+	java-pkg-simple_src_install
+	java-pkg_doso lib/PORTABLE/libidctfast.so
+
+	java-pkg_dolauncher ${PN}_cli --main ${JAVA_MAIN_CLASS} \
+		--java_args "-Djava.awt.headless=true -Xmx256m"
+
+	if use X; then
+		java-pkg_dolauncher ${PN}_gui --main ${JAVA_MAIN_CLASS} \
+			--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
+}


             reply	other threads:[~2024-05-08 21:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 21:22 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-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
2021-04-17 17:47 Daniel Pielmeier
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=1715203303.374aa7a9d1f37c728157dab7672fb83d94140021.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