public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/
Date: Sat,  3 Nov 2018 21:46:26 +0000 (UTC)	[thread overview]
Message-ID: <1541280652.6c8b95f0ffa4570543e8c10e594584db64e1541a.asturm@gentoo> (raw)

commit:     6c8b95f0ffa4570543e8c10e594584db64e1541a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  3 21:04:02 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov  3 21:30:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c8b95f0

media-libs/openjpeg: Fix USE static-libs

Bug: https://bugs.gentoo.org/634144
Bug: https://bugs.gentoo.org/650322
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../openjpeg-2.3.0-fix-disable-static-libs.patch   |  23 ++++
 media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild       | 117 +++++++++++++++++++++
 2 files changed, 140 insertions(+)

diff --git a/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch b/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch
new file mode 100644
index 00000000000..9e30f4694f3
--- /dev/null
+++ b/media-libs/openjpeg/files/openjpeg-2.3.0-fix-disable-static-libs.patch
@@ -0,0 +1,23 @@
+From 66297f07a43d2770a97c8456d20202f3d051d980 Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Mon, 9 Oct 2017 11:40:43 +0200
+Subject: [PATCH] Unix build: fix regression of 2.3.0 where a shared-only or
+ static-only build lacks the installation target for the library (#1019, fixes
+ regression introduced by 3dfc6ca2bcf06fd1adb6b6b4cecc6c092f08ba0b)
+
+---
+ src/lib/openjp2/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
+index 0b4520384..f8990ccf0 100644
+--- a/src/lib/openjp2/CMakeLists.txt
++++ b/src/lib/openjp2/CMakeLists.txt
+@@ -99,6 +99,7 @@ else()
+     set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
+   else()
+     add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
++    set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
+   endif()
+ endif()
+ 

diff --git a/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
new file mode 100644
index 00000000000..d0f7f1e15ff
--- /dev/null
+++ b/media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+# Make sure that test data are not newer than release;
+# otherwise we will see "Found-But-No-Test" test failures!
+MY_TESTDATA_COMMIT="c07f38fae1e67adc288c2d6679df5d3652017fbe"
+
+DESCRIPTION="Open-source JPEG 2000 library"
+HOMEPAGE="https://www.openjpeg.org"
+SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20170814.tar.gz )"
+
+LICENSE="BSD-2"
+SLOT="2/7" # based on SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc static-libs test"
+
+RDEPEND="
+	media-libs/lcms:2
+	media-libs/libpng:0=
+	media-libs/tiff:0
+	sys-libs/zlib"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-disable-static-libs.patch" # bug 650322
+)
+
+src_prepare() {
+	if use test; then
+		mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
+			die "Failed to rename test data"
+	fi
+
+	cmake-utils_src_prepare
+
+	# Stop installing LICENSE file, and install CHANGES from DOCS instead:
+	sed -i -e '/install.*FILES.*DESTINATION.*OPENJPEG_INSTALL_DOC_DIR/d' CMakeLists.txt || die
+
+	# Install doxygen docs to the right directory:
+	sed -i -e "s:DESTINATION\s*share/doc:\0/${PF}:" doc/CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+	local mycmakeargs=(
+		-DOPENJPEG_INSTALL_LIB_DIR="$(get_libdir)"
+		-DBUILD_TESTING="$(multilib_native_usex test)"
+		-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
+		-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
+		-DBUILD_STATIC_LIBS=$(usex static-libs)
+	)
+
+	cmake-utils_src_configure
+}
+
+multilib_src_test() {
+	if ! multilib_is_native_abi ; then
+		elog "Cannot run tests for non-multilib abi."
+		return 0
+	fi
+
+	local myctestargs=
+
+	pushd "${BUILD_DIR}" > /dev/null || die
+	[[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
+
+	[[ -n ${TEST_VERBOSE} ]] && myctestargs+=( --extra-verbose --output-on-failure )
+
+	echo ctest "${myctestargs[@]}" "$@"
+	if ctest "${myctestargs[@]}" "$@" ; then
+		einfo "Tests succeeded."
+		popd > /dev/null || die
+		return 0
+	else
+		echo ""
+		einfo "Note: Upstream is maintaining a list of known test failures."
+		einfo "We will now compare our test results against this list and sort out any known failure."
+
+		local KNOWN_FAILURES_LIST="${S}/tools/travis-ci/knownfailures-all.txt"
+		local FAILEDTEST_LOG="${BUILD_DIR}/Testing/Temporary/LastTestsFailed.log"
+		local FAILURES_LOG="${BUILD_DIR}/Testing/Temporary/failures.txt"
+		local FAILEDTEST=
+		local HAS_UNKNOWN_TEST_FAILURES=0
+		if [[ -f "${KNOWN_FAILURES_LIST}" && -f "${FAILEDTEST_LOG}" ]]; then
+			# Logic copied from $S/tools/travis-ci/run.sh
+
+			echo ""
+
+			awk -F: '{ print $2 }' "${FAILEDTEST_LOG}" > "${FAILURES_LOG}"
+			while read FAILEDTEST; do
+				# Common errors
+				if grep -x "${FAILEDTEST}" "${S}/tools/travis-ci/knownfailures-all.txt" > /dev/null; then
+					ewarn "Test '${FAILEDTEST}' is known to fail, ignoring ..."
+					continue
+				fi
+				eerror "New/unknown test failure found: '${FAILEDTEST}'"
+				HAS_UNKNOWN_TEST_FAILURES=1
+			done < "${FAILURES_LOG}"
+
+			if [[ ${HAS_UNKNOWN_TEST_FAILURES} -ne 0 ]]; then
+				die "Test suite failed. New/unknown test failure(s) found!"
+			else
+				echo ""
+				einfo "Test suite passed. No new/unknown test failure(s) found!"
+			fi
+
+			return 0
+		fi
+	fi
+}


             reply	other threads:[~2018-11-03 21:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03 21:46 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-14 17:06 [gentoo-commits] repo/gentoo:master commit in: media-libs/openjpeg/, media-libs/openjpeg/files/ Matt Turner
2022-08-15 14:10 Andreas Sturmlechner
2022-05-23 17:26 Sam James
2022-05-22 20:35 Sam James
2022-04-24  7:24 Joonas Niilola
2022-04-07  2:22 Sam James
2021-02-11  8:15 Sam James
2020-03-25 22:42 Thomas Deutschmann
2018-11-03 21:46 Andreas Sturmlechner

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=1541280652.6c8b95f0ffa4570543e8c10e594584db64e1541a.asturm@gentoo \
    --to=asturm@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