From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1636886-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 869001581D3
	for <garchives@archives.gentoo.org>; Thu, 30 May 2024 02:29:49 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BD493E29EC;
	Thu, 30 May 2024 02:29:48 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9E670E29EC
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 May 2024 02:29:48 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D592333BF3B
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 May 2024 02:29:47 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id CF049149C
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 May 2024 02:29:45 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1717036124.9ccda5abde9f7e8625f6ec390c61be47382df7b7.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libjpeg-turbo/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/libjpeg-turbo/Manifest media-libs/libjpeg-turbo/libjpeg-turbo-3.0.3.ebuild
X-VCS-Directories: media-libs/libjpeg-turbo/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 9ccda5abde9f7e8625f6ec390c61be47382df7b7
X-VCS-Branch: master
Date: Thu, 30 May 2024 02:29:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a495bd1d-7a54-4f6d-95f3-6ff1d10027f2
X-Archives-Hash: 1c33f0045c46812fc9137e03c5611f88

commit:     9ccda5abde9f7e8625f6ec390c61be47382df7b7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 30 02:28:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 30 02:28:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ccda5ab

media-libs/libjpeg-turbo: add 3.0.3

Note that while upstream updated their licencing docs in this release
to say there's 2 licences, not 3, they do still say:
> Note that the libjpeg-turbo SIMD source code bears the
> [zlib License](https://opensource.org/licenses/Zlib), but in the context of
> the overall libjpeg API library, the terms of the zlib License are subsumed
> by the terms of the IJG License.

And by our handling of licences, that seems to me like we should still
list the zlib licence.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libjpeg-turbo/Manifest                  |   1 +
 .../libjpeg-turbo/libjpeg-turbo-3.0.3.ebuild       | 128 +++++++++++++++++++++
 2 files changed, 129 insertions(+)

diff --git a/media-libs/libjpeg-turbo/Manifest b/media-libs/libjpeg-turbo/Manifest
index d79b65572490..551b47ca125b 100644
--- a/media-libs/libjpeg-turbo/Manifest
+++ b/media-libs/libjpeg-turbo/Manifest
@@ -2,4 +2,5 @@ DIST libjpeg-turbo-2.1.5.1.tar.gz 2264936 BLAKE2B 9583a0a91e45347d651de6bf5192a2
 DIST libjpeg-turbo-3.0.0.tar.gz 2799663 BLAKE2B 9a4b74aad81c2999ab7f3cd7d8695e1132edda141f4cc8a57e671f42cad4ac16b66b0f19cf4b874b61a82c008287ad88cd81d85547c195ed30456e29cb505285 SHA512 2307a2e240faf5b3119cdc5cf6a0255813d74591d4a4201fd2374940683cb9de90cb5926367e633f3624b27edd292209c7cd3c38d64522716e83fc81361289b4
 DIST libjpeg-turbo-3.0.1.tar.gz 2800900 BLAKE2B 9d2c784edd6493c4d9e2379fc4a8f0844e440d7afe774b231f611034d481dcf1be35979fb7d731a5a8f99000780f1343b7934a59df22c1dcaef295b6294ea494 SHA512 26a2c821a023579e82a7c2a00582747f5f24089aa0820ba304f1ff71c6894b7a6bd0468acc5ff90e2655e0a1c23a5a35a779df51f5cfa3e9eba527c709fab55b
 DIST libjpeg-turbo-3.0.2.tar.gz 2831164 BLAKE2B b6eff81657707852ee9ea81099179c6e20914f513fd32b12b1bfbf5233f850f54a1062a98150044aa34476f0c54e42a67c88633a59834a764d3f8bb394f374f0 SHA512 f5eadda0712feb810a8c3bb2621fda24a4c30574998ce30f423b3ffa25225c7a87cb14b696232bc0270485f422a2853a5c32eafb65bc5eeab1b41d8aeb32ad29
+DIST libjpeg-turbo-3.0.3.tar.gz 2832827 BLAKE2B 9d141dadd0dce970bf857b51352c57a8e15180438abd7d6d66f9dfd24e23889add8c6c89120b84026e40ab61611516b0567984bd1db37e9c45b41917cf32e9a6 SHA512 7c3a6660e7a54527eaa40929f5cc3d519842ffb7e961c32630ae7232b71ecaa19e89dbf5600c61038f0c5db289b607c2316fe9b6b03d482d770bcac29288d129
 DIST libjpeg8_8d-2.debian.tar.gz 14764 BLAKE2B e93d12afa062da28b717b540492221f70e8d9ccf3885371647cf85a2937f938ca723d4a27d5e1c5d79c26aa25dddf69b38754558851a1704172e8b52baf8e17c SHA512 8c5959fb7583a2d61e9442187f67b91b45e72d9dd30db3360d583a3b5d8e1a908db5659f760bdd455b3056e6ae3535b2fd3b847df3d58b140a1816b754003675

diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-3.0.3.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-3.0.3.ebuild
new file mode 100644
index 000000000000..8a6082694031
--- /dev/null
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-3.0.3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib java-pkg-opt-2
+
+DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
+HOMEPAGE="https://libjpeg-turbo.org/ https://github.com/libjpeg-turbo/libjpeg-turbo"
+SRC_URI="
+	https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/${PV}/${P}.tar.gz
+	mirror://gentoo/libjpeg8_8d-2.debian.tar.gz
+"
+
+LICENSE="BSD IJG ZLIB java? ( GPL-2-with-classpath-exception )"
+SLOT="0/0.2"
+if [[ $(ver_cut 3) -lt 90 ]] ; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos ~x64-solaris"
+fi
+IUSE="cpu_flags_arm_neon java static-libs"
+
+ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
+COMMON_DEPEND="
+	!media-libs/jpeg:0
+	!media-libs/jpeg:62
+"
+DEPEND="
+	${COMMON_DEPEND}
+	java? ( >=virtual/jdk-1.8:*[-headless-awt] )
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	java? ( >=virtual/jre-1.8:* )
+"
+BDEPEND="
+	amd64? ( ${ASM_DEPEND} )
+	x86? ( ${ASM_DEPEND} )
+	amd64-linux? ( ${ASM_DEPEND} )
+	x86-linux? ( ${ASM_DEPEND} )
+	x64-macos? ( ${ASM_DEPEND} )
+"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
+
+src_prepare() {
+	local FILE
+	ln -snf ../debian/extra/*.c . || die
+
+	for FILE in ../debian/extra/*.c; do
+		FILE=${FILE##*/}
+		cat >> CMakeLists.txt <<-EOF || die
+		add_executable(${FILE%.c} ${FILE})
+		install(TARGETS ${FILE%.c})
+		EOF
+	done
+
+	cmake_src_prepare
+	java-pkg-opt-2_src_prepare
+}
+
+multilib_src_configure() {
+	if multilib_is_native_abi && use java ; then
+		export JAVACFLAGS="$(java-pkg_javac-args)"
+		export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
+	fi
+
+	local mycmakeargs=(
+		-DCMAKE_INSTALL_DEFAULT_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+		-DENABLE_STATIC="$(usex static-libs)"
+		-DWITH_JAVA="$(multilib_native_usex java)"
+	)
+
+	# Avoid ARM ABI issues by disabling SIMD for CPUs without NEON, bug #792810
+	if use arm || use arm64; then
+		mycmakeargs+=(
+			-DWITH_SIMD=$(usex cpu_flags_arm_neon)
+			-DNEON_INTRINSICS=$(usex cpu_flags_arm_neon)
+		)
+	fi
+
+	# We should tell the test suite which floating-point flavor we are
+	# expecting: https://github.com/libjpeg-turbo/libjpeg-turbo/issues/597
+	# For now, mark loong as fp-contract.
+	if use loong; then
+		mycmakeargs+=(
+			-DFLOATTEST=fp-contract
+		)
+	fi
+
+	# Mostly for Prefix, ensure that we use our yasm if installed and
+	# not pick up host-provided nasm
+	if has_version -b dev-lang/yasm && ! has_version -b dev-lang/nasm; then
+		mycmakeargs+=(
+			-DCMAKE_ASM_NASM_COMPILER=$(type -P yasm)
+		)
+	fi
+
+	cmake_src_configure
+}
+
+multilib_src_install() {
+	cmake_src_install
+
+	if multilib_is_native_abi && use java ; then
+		rm -rf "${ED}"/usr/classes || die
+		java-pkg_dojar java/turbojpeg.jar
+	fi
+}
+
+multilib_src_install_all() {
+	find "${ED}" -type f -name '*.la' -delete || die
+
+	local -a DOCS=( README.md ChangeLog.md )
+	einstalldocs
+
+	newdoc "${WORKDIR}"/debian/changelog changelog.debian
+	dobin "${WORKDIR}"/debian/extra/exifautotran
+	doman "${WORKDIR}"/debian/extra/*.[0-9]*
+
+	docinto html
+	dodoc -r "${S}"/doc/html/.
+
+	if use java; then
+		docinto html/java
+		dodoc -r "${S}"/java/doc/.
+		newdoc "${S}"/java/README README.java
+	fi
+}