Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/liborigin/files/, sci-libs/liborigin/
Date: Tue, 07 Dec 2021 22:40:12
Message-Id: 1638916802.d5fd1a6ad2a5373a4ab06b1b8f123091417228ed.andrewammerlaan@gentoo
1 commit: d5fd1a6ad2a5373a4ab06b1b8f123091417228ed
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 7 19:38:17 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 7 22:40:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5fd1a6a
7
8 sci-libs/liborigin: add new snapshot
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
12
13 sci-libs/liborigin/Manifest | 1 +
14 .../liborigin-3.0.1_p20210828-buildsystem.patch | 37 +++++++++++++++
15 .../liborigin/liborigin-3.0.1_p20210828.ebuild | 55 ++++++++++++++++++++++
16 3 files changed, 93 insertions(+)
17
18 diff --git a/sci-libs/liborigin/Manifest b/sci-libs/liborigin/Manifest
19 index 3e0b88d860e1..05362459eb68 100644
20 --- a/sci-libs/liborigin/Manifest
21 +++ b/sci-libs/liborigin/Manifest
22 @@ -1 +1,2 @@
23 DIST liborigin-3.0.1.tar.gz 156842 BLAKE2B 2c88d0419c4c7be1ff6d3aaba1f794fe67174e02e591878c754a32d9b2789bd8594d39f4786d9ac04884b443b528086617a9e1fdbca8815089c8ebb400dd321c SHA512 c3fde3549bce462ea38b961885d6c835aac53db64375645db1d3636eb78396b3353c5bcc9ea3313dac3ffb436de35677ecec6fddb2fcf1eb37eaf6a78e2a31f8
24 +DIST liborigin-3.0.1_p20210828.tar.gz 156437 BLAKE2B 48713d8854ccd7f46b1aca72bf7b7739af588f08aea32e1d27ff4416ca4fa96a942b19e37fb151f5e7afbd5133d870c305a608e639c620672e683fe805d4f5d1 SHA512 0c9866bef16844102be6ae6e150c927420ca07e6ee50342e9fbd4312f9cd3c476c8d730464b010076f31d7fdcc16bd1133de9ace3a6e5b9b321a231ddab00458
25
26 diff --git a/sci-libs/liborigin/files/liborigin-3.0.1_p20210828-buildsystem.patch b/sci-libs/liborigin/files/liborigin-3.0.1_p20210828-buildsystem.patch
27 new file mode 100644
28 index 000000000000..a34067aeb1b8
29 --- /dev/null
30 +++ b/sci-libs/liborigin/files/liborigin-3.0.1_p20210828-buildsystem.patch
31 @@ -0,0 +1,37 @@
32 +diff --git a/CMakeLists.txt b/CMakeLists.txt
33 +index a8e5914..8eb13c2 100644
34 +--- a/CMakeLists.txt
35 ++++ b/CMakeLists.txt
36 +@@ -41,7 +41,6 @@ set (devel-headers
37 + OriginObj.h
38 + OriginFile.h
39 + OriginParser.h
40 +- tree.hh
41 + )
42 +
43 + # allow for installation of individual targets
44 +@@ -74,11 +73,13 @@ if( "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" )
45 + SOVERSION ${PROJECT_VERSION_MAJOR}
46 + )
47 + # Generate a pkg-config file matching this config
48 +- configure_file( "liborigin.pc.in" "$liborigin.pc" @ONLY )
49 ++ configure_file( "liborigin.pc.in" "liborigin.pc" @ONLY )
50 +
51 ++ if(ENABLE_TOOLS)
52 + # command line util
53 + add_executable(opj2dat opj2dat.cpp)
54 + target_link_libraries (opj2dat origin_static)
55 ++ endif ()
56 +
57 + include(GNUInstallDirs)
58 + # install libraries
59 +@@ -92,7 +93,9 @@ if( "${CMAKE_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" )
60 + # install pkg-config file
61 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
62 + #
63 ++ if(ENABLE_TOOLS)
64 + install(TARGETS opj2dat DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
65 ++ endif ()
66 + # documentation
67 + install(FILES COPYING FORMAT README
68 + DESTINATION ${CMAKE_INSTALL_DOCDIR}
69
70 diff --git a/sci-libs/liborigin/liborigin-3.0.1_p20210828.ebuild b/sci-libs/liborigin/liborigin-3.0.1_p20210828.ebuild
71 new file mode 100644
72 index 000000000000..9b2c2bb6e60f
73 --- /dev/null
74 +++ b/sci-libs/liborigin/liborigin-3.0.1_p20210828.ebuild
75 @@ -0,0 +1,55 @@
76 +# Copyright 1999-2021 Gentoo Authors
77 +# Distributed under the terms of the GNU General Public License v2
78 +
79 +EAPI=8
80 +
81 +inherit cmake
82 +
83 +COMMIT="970b90ada051dfa2e80929cde91d052bf28be674"
84 +
85 +DESCRIPTION="Library for reading OriginLab OPJ project files"
86 +HOMEPAGE="https://sourceforge.net/projects/liborigin/ https://github.com/SciDAVis/liborigin/"
87 +SRC_URI="https://github.com/SciDAVis/liborigin/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
88 +S="${WORKDIR}/${PN}-${COMMIT}"
89 +
90 +LICENSE="GPL-3"
91 +SLOT="2"
92 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
93 +IUSE="debug doc tools"
94 +
95 +BDEPEND="
96 + doc? ( app-doc/doxygen )
97 +"
98 +RDEPEND="
99 + dev-cpp/tree
100 +"
101 +DEPEND="${RDEPEND}"
102 +
103 +PATCHES=(
104 + # add missing header
105 + "${FILESDIR}/${PN}-3.0.1-missing-header.patch"
106 + # downstream
107 + "${FILESDIR}/${P}-buildsystem.patch" # ENABLE_TOOLS, shared link, doc paths
108 +)
109 +
110 +src_prepare() {
111 + cmake_src_prepare
112 + rm tree.hh || die "failed to remove bundled tree.hh"
113 +
114 + sed -e "/install.*html/s/liborigin/${PF}/" \
115 + -i CMakeLists.txt || die "failed to fix htmldoc install path"
116 +}
117 +
118 +src_configure() {
119 + local mycmakeargs=(
120 + -DGENERATE_CODE_FOR_LOG=$(usex debug)
121 + $(cmake_use_find_package doc Doxygen)
122 + -DENABLE_TOOLS=$(usex tools)
123 + )
124 + cmake_src_configure
125 +}
126 +
127 +src_compile() {
128 + cmake_src_compile
129 + use doc && cmake_src_compile doc
130 +}