summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-05-23 14:37:28 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2021-05-23 14:47:40 +0200
commitfc55a1624d72aedb24af9db44538162fbbdfd480 (patch)
treedfe7c45028a5dab2aa9d3cccf9969947a08efabc /sci-libs
parentsci-visualization/scidavis: import from ::sci (diff)
downloadgentoo-fc55a1624d72aedb24af9db44538162fbbdfd480.tar.gz
gentoo-fc55a1624d72aedb24af9db44538162fbbdfd480.tar.bz2
gentoo-fc55a1624d72aedb24af9db44538162fbbdfd480.zip
sci-libs/liborigin: add version 3.0.1
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/liborigin/Manifest1
-rw-r--r--sci-libs/liborigin/files/liborigin-3.0.1-buildsystem.patch47
-rw-r--r--sci-libs/liborigin/files/liborigin-3.0.1-missing-header.patch24
-rw-r--r--sci-libs/liborigin/liborigin-3.0.1.ebuild53
-rw-r--r--sci-libs/liborigin/metadata.xml4
5 files changed, 129 insertions, 0 deletions
diff --git a/sci-libs/liborigin/Manifest b/sci-libs/liborigin/Manifest
index 325e5f11cc4c..3296248678ba 100644
--- a/sci-libs/liborigin/Manifest
+++ b/sci-libs/liborigin/Manifest
@@ -1 +1,2 @@
DIST liborigin-3.0.0.tar.gz 156736 BLAKE2B 1c1fda3fc3ad47394b65637a808eca1ecf4cff19eb49de0811e50d395c3b7759f8ec19c680ed83f7a8191022aa17b4ba1211baa6ea16a48a5153736d9138ed5c SHA512 1cf00ec33a90b4baede0cd3b2a3e6d78ca4810511c6be58c4d1cce12e7e1001752422fe2ddbca80cd9016b91c5321eca1ab43606ace3acc21955a034ebc4094c
+DIST liborigin-3.0.1.tar.gz 156842 BLAKE2B 2c88d0419c4c7be1ff6d3aaba1f794fe67174e02e591878c754a32d9b2789bd8594d39f4786d9ac04884b443b528086617a9e1fdbca8815089c8ebb400dd321c SHA512 c3fde3549bce462ea38b961885d6c835aac53db64375645db1d3636eb78396b3353c5bcc9ea3313dac3ffb436de35677ecec6fddb2fcf1eb37eaf6a78e2a31f8
diff --git a/sci-libs/liborigin/files/liborigin-3.0.1-buildsystem.patch b/sci-libs/liborigin/files/liborigin-3.0.1-buildsystem.patch
new file mode 100644
index 000000000000..36e5d7fc7a9c
--- /dev/null
+++ b/sci-libs/liborigin/files/liborigin-3.0.1-buildsystem.patch
@@ -0,0 +1,47 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f3b26d..4c543bf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,6 +28,8 @@ else()
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic" )
+ endif()
+
++option(ENABLE_TOOLS "Install opj2dat command line util" ON)
++
+ # compile-time configuration variables to be linked in
+ configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+@@ -44,7 +46,6 @@ set (devel-headers
+ OriginObj.h
+ OriginFile.h
+ OriginParser.h
+- tree.hh
+ )
+
+ # object library
+@@ -87,6 +88,7 @@ if (BUILD_SHARED_LIBS)
+ endif ()
+
+ # command line util
++if(ENABLE_TOOLS)
+ if (BUILD_STATIC_LIBS)
+ add_executable(opj2dat opj2dat.cpp)
+ target_link_libraries (opj2dat origin_static)
+@@ -94,6 +96,7 @@ elseif (BUILD_SHARED_LIBS)
+ add_executable(opj2dat opj2dat.cpp)
+ target_link_libraries (opj2dat origin_shared)
+ endif ()
++endif ()
+
+ # Generate a pkg-config file matching this config
+ configure_file("liborigin.pc.in" "liborigin.pc" @ONLY)
+@@ -103,7 +106,9 @@ install(FILES ${devel-headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liborigin
+ # install pkg-config file
+ if (BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
++ if(ENABLE_TOOLS)
+ install(TARGETS opj2dat DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
++ endif ()
+ endif ()
+
+ # documentation
diff --git a/sci-libs/liborigin/files/liborigin-3.0.1-missing-header.patch b/sci-libs/liborigin/files/liborigin-3.0.1-missing-header.patch
new file mode 100644
index 000000000000..3f78c61ebabe
--- /dev/null
+++ b/sci-libs/liborigin/files/liborigin-3.0.1-missing-header.patch
@@ -0,0 +1,24 @@
+diff --git a/OriginAnyParser.cpp b/OriginAnyParser.cpp
+index 05bfb95..dd5dd9b 100644
+--- a/OriginAnyParser.cpp
++++ b/OriginAnyParser.cpp
+@@ -22,6 +22,7 @@
+ #include "OriginAnyParser.h"
+ #include <sstream>
+ #include <cinttypes>
++#include <iostream>
+
+ /* define a macro to get an int (or uint) from a istringstream in binary mode */
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+diff --git a/opj2dat.cpp b/opj2dat.cpp
+index 4b8d57a..5a31b4e 100644
+--- a/opj2dat.cpp
++++ b/opj2dat.cpp
+@@ -31,6 +31,7 @@
+ #include <cmath>
+ #include <fstream>
+ #include <sstream>
++#include <iostream>
+ #include <string>
+
+ using namespace std;
diff --git a/sci-libs/liborigin/liborigin-3.0.1.ebuild b/sci-libs/liborigin/liborigin-3.0.1.ebuild
new file mode 100644
index 000000000000..c7fb5af70c2b
--- /dev/null
+++ b/sci-libs/liborigin/liborigin-3.0.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Library for reading OriginLab OPJ project files"
+HOMEPAGE="https://sourceforge.net/projects/liborigin/ https://github.com/SciDAVis/liborigin/"
+SRC_URI="http://downloads.sourceforge.net/liborigin/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc tools"
+
+BDEPEND="
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="
+ dev-cpp/tree
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # add missing header
+ "${FILESDIR}/${P}-missing-header.patch"
+ # downstream
+ "${FILESDIR}/${P}-buildsystem.patch" # ENABLE_TOOLS, shared link, doc paths
+)
+
+src_prepare() {
+ cmake_src_prepare
+ rm tree.hh || die "failed to remove bundled tree.hh"
+
+ sed -e "/install.*html/s/liborigin/${PF}/" \
+ -i CMakeLists.txt || die "failed to fix htmldoc install path"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGENERATE_CODE_FOR_LOG=$(usex debug)
+ $(cmake_use_find_package doc Doxygen)
+ -DENABLE_TOOLS=$(usex tools)
+ -DBUILD_STATIC_LIBS=NO
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use doc && cmake_src_compile doc
+}
diff --git a/sci-libs/liborigin/metadata.xml b/sci-libs/liborigin/metadata.xml
index e7dc202da9b1..54bfdbb82e34 100644
--- a/sci-libs/liborigin/metadata.xml
+++ b/sci-libs/liborigin/metadata.xml
@@ -8,4 +8,8 @@
<use>
<flag name="tools">Install opj2dat command line util</flag>
</use>
+ <upstream>
+ <remote-id type="sourceforge">liborigin</remote-id>
+ <remote-id type="github">SciDAVis/liborigin</remote-id>
+ </upstream>
</pkgmetadata>