polyclipping: new recipe (#4055)

This commit is contained in:
Nikolay Korotkiy
2019-07-26 23:26:54 +03:00
committed by Sergei Reznikov
parent fa683c9ec4
commit f66da9e131
2 changed files with 99 additions and 0 deletions

View 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.

View File

@@ -0,0 +1,76 @@
SUMMARY="Polygon and line clipping and offsetting library"
DESCRIPTION="The Clipper library performs clipping and offsetting for \
both lines and polygons. All four boolean clipping operations are supported - \
intersection, union, difference and exclusive-or. Polygons can be of any shape \
including self-intersecting polygons."
HOMEPAGE="https://sourceforge.net/projects/polyclipping/"
COPYRIGHT="2010-2019 Angus Johnson"
LICENSE="Boost v1.0"
REVISION="1"
SOURCE_URI="http://downloads.sourceforge.net/polyclipping/clipper_ver${portVersion}.zip"
CHECKSUM_SHA256="a14320d82194807c4480ce59c98aa71cd4175a5156645c4e2b3edd330b930627"
SOURCE_DIR=""
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
PROVIDES="
polyclipping$secondaryArchSuffix = $portVersion
lib:libpolyclipping$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
polyclipping${secondaryArchSuffix}_devel = $portVersion
devel:libpolyclipping$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
polyclipping$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage polyclipping$secondaryArchSuffix \
"$libDir"/libpolyclipping.so.22
PATCH()
{
cd cpp
sed -i 's,${CMAKE_INSTALL_PREFIX}/include',$includeDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}',$libDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/share/pkgconfig',$developLibDir/pkgconfig, \
CMakeLists.txt
}
BUILD()
{
mkdir -p build && cd "$_"
cmake ../cpp \
-DCMAKE_INSTALL_PREFIX:PATH="$prefix" \
$cmakeDirArgs
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib libpolyclipping
fixPkgconfig
packageEntries devel $developDir
}