summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois-Xavier Carton <fx.carton91@gmail.com>2022-05-16 17:41:43 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-06-21 11:57:16 +0200
commit7d7c53ec31479a88eeee0249a831ec0f82d269bd (patch)
tree701ad16237207da1e87d48740457419b33b4112f /sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild
parentapp-office/texmacs: update HOMEPAGE, SRC_URI (diff)
downloadgentoo-7d7c53ec31479a88eeee0249a831ec0f82d269bd.tar.gz
gentoo-7d7c53ec31479a88eeee0249a831ec0f82d269bd.tar.bz2
gentoo-7d7c53ec31479a88eeee0249a831ec0f82d269bd.zip
sci-libs/dcmtk: rename bundled charls to avoid conflicts
Using upstream patch [1]. Note: both Debian [2] and Fedora [3] have given up unbundling charls as the newer charls 2.0 is incompatible with charls 1.0 used by dcmtk and causes regressions. [1] https://git.dcmtk.org/?p=dcmtk.git;a=commitdiff;h=09afb527bb889932f919c28f47b08c84fe19ab32 [2] https://salsa.debian.org/med-team/dcmtk/-/commit/12aad369f3e5a6a4eac78b206a940cad80608bc7 [3] https://src.fedoraproject.org/rpms/dcmtk/c/d9cff801c2e4e2928e247a8c973b7118ec589ed5?branch=rawhide Closes: https://bugs.gentoo.org/832453 Signed-off-by: François-Xavier Carton <fx.carton91@gmail.com> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild')
-rw-r--r--sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild90
1 files changed, 90 insertions, 0 deletions
diff --git a/sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild b/sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild
new file mode 100644
index 000000000000..d151996f1e2e
--- /dev/null
+++ b/sci-libs/dcmtk/dcmtk-3.6.5-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="The DICOM Toolkit"
+HOMEPAGE="https://dicom.offis.de/dcmtk.php.en"
+SRC_URI="https://dicom.offis.de/download/dcmtk/release/${P}.tar.gz"
+
+LICENSE="OFFIS"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+SLOT="0"
+IUSE="doc png ssl tcpd tiff +threads xml zlib"
+
+RDEPEND="
+ dev-libs/icu:=
+ virtual/jpeg:0
+ png? ( media-libs/libpng:* )
+ ssl? ( dev-libs/openssl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+ tiff? ( media-libs/tiff:0 )
+ xml? ( dev-libs/libxml2:2 )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-rename-bundled-charls.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -e "s:share/doc/dcmtk:&-${PV}:" \
+ -e "s:DIR \"/:DIR \"/usr/:" \
+ -e "s:usr/etc:etc:" \
+ -e "s:/lib\":/$(get_libdir)\":" \
+ -e "s:COPYRIGHT::" \
+ -i CMakeLists.txt || die
+ sed -e 's:${CMAKE_INSTALL_PREFIX}/::' \
+ -i dcmwlm/data/CMakeLists.txt doxygen/CMakeLists.txt || die
+ # Temporary workaround: docs are not built with CMake
+ sed -i -e '/include/d' doxygen/Makefile.in || die
+
+ # fix -D deprecation warnings
+ sed -i -e "s|_BSD_SOURCE|_DEFAULT_SOURCE|g" \
+ "${S}"/config/configure.in \
+ "${S}"/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DDCMTK_WITH_ICU=ON
+ -DDCMTK_WITH_TIFF=$(usex tiff)
+ -DDCMTK_WITH_PNG=$(usex png)
+ -DDCMTK_WITH_XML=$(usex xml)
+ -DDCMTK_WITH_ZLIB=$(usex zlib)
+ -DDCMTK_WITH_OPENSSL=$(usex ssl)
+ -DDCMTK_WITH_DOXYGEN=$(usex doc)
+ -DDCMTK_WITH_THREADS=$(usex threads)
+ )
+
+ cmake_src_configure
+
+ if use doc; then
+ cd "${S}"/doxygen || die
+ econf
+ fi
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use doc; then
+ emake -C "${S}"/doxygen
+ fi
+}
+
+src_install() {
+ doman doxygen/manpages/man1/*
+
+ if use doc; then
+ local HTML_DOCS=( "${S}"/doxygen/htmldocs/. )
+ fi
+ cmake_src_install
+}