summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-11 16:54:25 +0000
committerSam James <sam@gentoo.org>2024-03-11 16:55:19 +0000
commite2086390e7aa813502ca7cdc077cd7952353d13c (patch)
tree2bca081263c5ed03c0392612a47db9237c0a7d32 /sci-libs/dcmtk
parentsci-libs/dcmtk: add github upstream metadata (diff)
downloadgentoo-e2086390e7aa813502ca7cdc077cd7952353d13c.tar.gz
gentoo-e2086390e7aa813502ca7cdc077cd7952353d13c.tar.bz2
gentoo-e2086390e7aa813502ca7cdc077cd7952353d13c.zip
sci-libs/dcmtk: add 3.6.8
Reported the LTO issue upstream via email. The one reported in bug #862699 seems fixed upstream in git but another one involving JPEG appeared. Closes: https://bugs.gentoo.org/862699 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/dcmtk')
-rw-r--r--sci-libs/dcmtk/Manifest1
-rw-r--r--sci-libs/dcmtk/dcmtk-3.6.8.ebuild95
-rw-r--r--sci-libs/dcmtk/files/dcmtk-3.6.8-docdir.patch12
3 files changed, 108 insertions, 0 deletions
diff --git a/sci-libs/dcmtk/Manifest b/sci-libs/dcmtk/Manifest
index 50d810f71702..283fc868453b 100644
--- a/sci-libs/dcmtk/Manifest
+++ b/sci-libs/dcmtk/Manifest
@@ -1 +1,2 @@
DIST dcmtk-3.6.7.tar.gz 6877857 BLAKE2B 242ba19ed3876b27c8eeb6917f9264911c951e91ab27d2ebd3e95ab5dcf55a0e18986cede87c8ab7e6280eafeb19fda120ccb2114d24a16f222b411b44cc28d8 SHA512 b9c227f496de65424256636fa7ad266affc6593f72c6849271da94837b68c93a5b8e056ecd09d46550b6ac0530c406ab9f71751d317a5fd4171a222f9fc9ca45
+DIST dcmtk-3.6.8.tar.gz 9628364 BLAKE2B 367885c3fda65b7b2e42555ba648800f9585cbd4c4d94e01f737110fc726ce3396df50ccd6f2c9bacc59284fc1381683b72506a3c566f795c8157da39a95fb2a SHA512 1bb2aad1aa63e0a1b79d92d7c932a969deccde03fdb484dbd44198effb58d50de44a2b0cda150ce7df63e4e986af5bc1f694c8a7988b4c049c578d83ba81184a
diff --git a/sci-libs/dcmtk/dcmtk-3.6.8.ebuild b/sci-libs/dcmtk/dcmtk-3.6.8.ebuild
new file mode 100644
index 000000000000..1a375189d12c
--- /dev/null
+++ b/sci-libs/dcmtk/dcmtk-3.6.8.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic 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"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="doc png ssl tcpd tiff +threads xml zlib"
+
+RDEPEND="
+ dev-libs/icu:=
+ png? ( media-libs/libpng:* )
+ ssl? ( dev-libs/openssl:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+ tiff? ( media-libs/tiff:= )
+ xml? ( dev-libs/libxml2:2 )
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? (
+ app-text/doxygen
+ virtual/latex-base
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.6.8-docdir.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed -i -e "s:COPYRIGHT::" 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() {
+ # ODR violations (bug #862699). Reported upstream by email on 2024-03-11.
+ # master (>3.6.8) seems to have that original issue fixed but has another
+ # JPEG-related violation.
+ filter-lto
+
+ # bug 908398
+ use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
+ 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
+}
diff --git a/sci-libs/dcmtk/files/dcmtk-3.6.8-docdir.patch b/sci-libs/dcmtk/files/dcmtk-3.6.8-docdir.patch
new file mode 100644
index 000000000000..291571d0ce37
--- /dev/null
+++ b/sci-libs/dcmtk/files/dcmtk-3.6.8-docdir.patch
@@ -0,0 +1,12 @@
+--- a/CMake/GenerateDCMTKConfigure.cmake
++++ b/CMake/GenerateDCMTKConfigure.cmake
+@@ -202,9 +202,6 @@ else()
+
+ # Modify the installation paths for configuration files, data files and documents
+ # by adding a subdirectory with the DCMTK name and version number
+- set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}")
+- set(CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}")
+- set(CMAKE_INSTALL_FULL_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}-${DCMTK_COMPLETE_PACKAGE_VERSION}")
+
+ # These variables are defined as macros in osconfig.h and must end with a path separator
+ set(DCMTK_DEFAULT_CONFIGURATION_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/")