diff options
author | Sam James <sam@gentoo.org> | 2021-11-19 06:28:45 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-11-19 06:29:31 +0000 |
commit | 9a1c0376c9e1e22ebfabe4333773d390395d5652 (patch) | |
tree | dec32cf21ad806d3c0ea3e51e0030bf4313a24b8 /media-libs/libjpeg-turbo | |
parent | xfce-extra/xfce4-time-out-plugin: keyword ~riscv (diff) | |
download | gentoo-9a1c0376c9e1e22ebfabe4333773d390395d5652.tar.gz gentoo-9a1c0376c9e1e22ebfabe4333773d390395d5652.tar.bz2 gentoo-9a1c0376c9e1e22ebfabe4333773d390395d5652.zip |
media-libs/libjpeg-turbo: add 2.1.2
Just tagging the security bug to note that while this
release upstream contains the executable sections fix,
it was already fixed in Gentoo a while ago.
Bug: https://bugs.gentoo.org/814206
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libjpeg-turbo')
-rw-r--r-- | media-libs/libjpeg-turbo/Manifest | 1 | ||||
-rw-r--r-- | media-libs/libjpeg-turbo/libjpeg-turbo-2.1.2.ebuild | 128 |
2 files changed, 129 insertions, 0 deletions
diff --git a/media-libs/libjpeg-turbo/Manifest b/media-libs/libjpeg-turbo/Manifest index 5ba827745c76..eb6fe97ace24 100644 --- a/media-libs/libjpeg-turbo/Manifest +++ b/media-libs/libjpeg-turbo/Manifest @@ -1,2 +1,3 @@ DIST libjpeg-turbo-2.1.1.tar.gz 2256321 BLAKE2B ad3fc108e0136220586cc59a277735d573a82d740146d2ac091cbb50af84019b7c623ca1c9c2e6e0f8a672b6fde7ed23441b199eef2435a52013abd73a3a7157 SHA512 9cf61b4677b38e254063248a3fdbe138634d23a35ae8f2ee2661bdb3248b1d0500bd43201b8d9fe66c779d578074fd9ed19bc097ba22e10143530c2a19738673 +DIST libjpeg-turbo-2.1.2.tar.gz 2257645 BLAKE2B ae8b7db9fd634b3b29a916098e2b54a8e045cb7a9d883de1f2e8a34542154a724e5d7788fb4b4d816c36d6503fc2a7427165dc3af9d47c77bfb7c51a42bc1d51 SHA512 f0377b58d00310b2e644da31f807ac6c3425823f362ea88bcbed32991dddbea4e7a478676a7c1c4874a34bc578f262bf1d32c925e2f14fa517a50fd911ba8dd5 DIST libjpeg8_8d-2.debian.tar.gz 14764 BLAKE2B e93d12afa062da28b717b540492221f70e8d9ccf3885371647cf85a2937f938ca723d4a27d5e1c5d79c26aa25dddf69b38754558851a1704172e8b52baf8e17c SHA512 8c5959fb7583a2d61e9442187f67b91b45e72d9dd30db3360d583a3b5d8e1a908db5659f760bdd455b3056e6ae3535b2fd3b847df3d58b140a1816b754003675 diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-2.1.2.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-2.1.2.ebuild new file mode 100644 index 000000000000..9fa044960821 --- /dev/null +++ b/media-libs/libjpeg-turbo/libjpeg-turbo-2.1.2.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +inherit cmake-multilib java-pkg-opt-2 + +DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library" +HOMEPAGE="https://libjpeg-turbo.org/ https://sourceforge.net/projects/libjpeg-turbo/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz + mirror://gentoo/libjpeg8_8d-2.debian.tar.gz" + +LICENSE="BSD IJG ZLIB" +SLOT="0/0.2" +if [[ "$(ver_cut 3)" -lt 90 ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-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" + +BDEPEND=">=dev-util/cmake-3.16.5 + amd64? ( ${ASM_DEPEND} ) + x86? ( ${ASM_DEPEND} ) + amd64-fbsd? ( ${ASM_DEPEND} ) + x86-fbsd? ( ${ASM_DEPEND} ) + amd64-linux? ( ${ASM_DEPEND} ) + x86-linux? ( ${ASM_DEPEND} ) + x64-macos? ( ${ASM_DEPEND} ) + x64-cygwin? ( ${ASM_DEPEND} )" + +DEPEND="${COMMON_DEPEND} + java? ( >=virtual/jdk-1.8:*[-headless-awt] )" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* )" + +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 + + for FILE in ../debian/extra/exifautotran; do + cat >> CMakeLists.txt <<EOF || die +install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DESTINATION \${CMAKE_INSTALL_BINDIR}) +EOF + done + + for FILE in ../debian/extra/*.[0-9]*; do + cat >> CMakeLists.txt <<EOF || die +install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DESTINATION \${CMAKE_INSTALL_MANDIR}/man${FILE##*.}) +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)" + -DWITH_MEM_SRCDST=ON + ) + + # Avoid ARM ABI issues by disabling SIMD for CPUs without NEON. #792810 + if use arm; then + mycmakeargs+=( + -DWITH_SIMD:BOOL=$(usex cpu_flags_arm_neon ON OFF) + ) + 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 + + 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 +} |