mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-19 02:00:06 +02:00
range-v3: add recipe
This commit is contained in:
23
dev-cpp/range_v3/licenses/Boost v1.0
Normal file
23
dev-cpp/range_v3/licenses/Boost v1.0
Normal file
@@ -0,0 +1,23 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
52
dev-cpp/range_v3/patches/range_v3-0.10.0.patchset
Normal file
52
dev-cpp/range_v3/patches/range_v3-0.10.0.patchset
Normal file
@@ -0,0 +1,52 @@
|
||||
From ebd2332ea0113d5da45b44457cab7ae6befd6f38 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 18 Jan 2020 20:34:01 +1000
|
||||
Subject: Fix for Haiku
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8d2d73b..470525d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -167,6 +167,15 @@ write_basic_package_version_file(
|
||||
)
|
||||
set(CMAKE_SIZEOF_VOID_P ${OLD_CMAKE_SIZEOF_VOID_P})
|
||||
|
||||
+if (HAIKU)
|
||||
+install(TARGETS range-v3-concepts range-v3-meta range-v3 EXPORT range-v3-targets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(EXPORT range-v3-targets FILE range-v3-targets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/range-v3)
|
||||
+install(FILES
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/range-v3-config-version.cmake
|
||||
+ cmake/range-v3-config.cmake
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/range-v3)
|
||||
+install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*")
|
||||
+else()
|
||||
install(TARGETS range-v3-concepts range-v3-meta range-v3 EXPORT range-v3-targets DESTINATION lib)
|
||||
install(EXPORT range-v3-targets FILE range-v3-targets.cmake DESTINATION lib/cmake/range-v3)
|
||||
install(FILES
|
||||
@@ -174,5 +183,6 @@ install(FILES
|
||||
cmake/range-v3-config.cmake
|
||||
DESTINATION lib/cmake/range-v3)
|
||||
install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*")
|
||||
+endif()
|
||||
|
||||
export(EXPORT range-v3-targets FILE range-v3-config.cmake)
|
||||
diff --git a/cmake/ranges_env.cmake b/cmake/ranges_env.cmake
|
||||
index 6d808ca..04161cd 100644
|
||||
--- a/cmake/ranges_env.cmake
|
||||
+++ b/cmake/ranges_env.cmake
|
||||
@@ -41,6 +41,11 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if (RANGES_VERBOSE_BUILD)
|
||||
message(STATUS "[range-v3]: system is Linux.")
|
||||
endif()
|
||||
+elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
||||
+ set (RANGES_ENV_HAIKU TRUE)
|
||||
+ if (RANGES_VERBOSE_BUILD)
|
||||
+ message(STATUS "[range-v3]: system is Haiku.")
|
||||
+ endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
set (RANGES_ENV_WINDOWS TRUE)
|
||||
if (RANGES_VERBOSE_BUILD)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
64
dev-cpp/range_v3/range_v3-0.10.0.recipe
Normal file
64
dev-cpp/range_v3/range_v3-0.10.0.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
SUMMARY="Experimental range library for C++11/14/17"
|
||||
DESCRIPTION="Ranges are an extension of the Standard Template Library that \
|
||||
makes its iterators and algorithms more powerful by making them composable. \
|
||||
Unlike other range-like solutions which seek to do away with iterators, in \
|
||||
range-v3 ranges are an abstration layer on top of iterators.
|
||||
|
||||
Range-v3 is built on three pillars: Views, Actions, and Algorithms. \
|
||||
The algorithms are the same as those with which you are already familiar \
|
||||
in the STL, except that in range-v3 all the algorithms have overloads that \
|
||||
take ranges in addition to the overloads that take iterators. Views are \
|
||||
composable adaptations of ranges where the adaptation happens lazily as the \
|
||||
view is iterated. And an action is an eager application of an algorithm to a \
|
||||
container that mutates the container in-place and returns it for further processing."
|
||||
HOMEPAGE="https://github.com/ericniebler/range-v3"
|
||||
COPYRIGHT="2019 Eric Niebler"
|
||||
LICENSE="Boost v1.0"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/ericniebler/range-v3/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5a1cd44e7315d0e8dcb1eee4df6802221456a9d1dbeac53da02ac7bd4ea150cd"
|
||||
SOURCE_DIR="range-v3-$portVersion"
|
||||
PATCHES="range_v3-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
range_v3$secondaryArchSuffix = $portVersion
|
||||
devel:range_v3$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DRANGE_V3_TESTS=OFF \
|
||||
-DRANGE_V3_EXAMPLES=OFF \
|
||||
-DRANGES_MODULES=ON \
|
||||
-DRANGE_V3_PERF=OFF
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
sed -i 's,\/include,/'${relativeIncludeDir}',g' \
|
||||
$libDir/cmake/range-v3/range-v3-targets.cmake
|
||||
}
|
||||
Reference in New Issue
Block a user