Skip to content

Commit a3e5703

Browse files
committed
Overhaul packaging, fixup dependencies and other issues
1 parent 9c565c9 commit a3e5703

File tree

6 files changed

+73
-14
lines changed

6 files changed

+73
-14
lines changed

clipper2/.SRCINFO

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
pkgbase = clipper2
22
pkgdesc = Polygon Clipping and Offsetting
33
pkgver = 1.5.4
4-
pkgrel = 1
4+
pkgrel = 2
55
url = https://github.com/AngusJohnson/Clipper2
66
arch = x86_64
77
license = BSL-1.0
8+
makedepends = cmake
89
depends = glibc
910
depends = gcc-libs
10-
source = https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.5.4.tar.gz
11+
provides = libClipper2Z.so
12+
provides = libClipper2.so
13+
conflicts = manifold
14+
source = https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.5.4/Clipper2-Clipper2_1.5.4.tar.gz
1115
sha256sums = 9d8a35a29d04cd1b7b45f542c0ba48015feece1210036ea9e4efaad3140af4b0
1216

1317
pkgname = clipper2

clipper2/.nvchecker.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[clipper2]
2+
source = "git"
3+
git = "https://github.com/AngusJohnson/Clipper2.git"
4+
prefix = "Clipper2_"

clipper2/LICENSE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright Arch Linux Contributors
2+
3+
Permission to use, copy, modify, and/or distribute this software for
4+
any purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
7+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
8+
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
9+
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
10+
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
11+
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

clipper2/LICENSES/0BSD.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE

clipper2/PKGBUILD

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1+
# Maintainer: Caleb Maclennan <caleb@alerque.com>
2+
13
pkgname=clipper2
24
pkgver=1.5.4
3-
pkgrel=1
4-
pkgdesc="Polygon Clipping and Offsetting"
5-
arch=('x86_64')
6-
url="https://github.com/AngusJohnson/Clipper2"
7-
license=('BSL-1.0')
8-
depends=('glibc' 'gcc-libs')
9-
source=("https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_${pkgver}.tar.gz")
5+
pkgrel=2
6+
pkgdesc='Polygon Clipping and Offsetting'
7+
arch=(x86_64)
8+
url="https://github.com/AngusJohnson/${pkgname^}"
9+
license=(BSL-1.0)
10+
depends=(glibc
11+
gcc-libs)
12+
makedepends=(cmake)
13+
provides=(libClipper2Z.so
14+
libClipper2.so)
15+
conflicts=(manifold)
16+
_tag="${pkgname^}_$pkgver"
17+
_archive="${pkgname^}-$_tag"
18+
source=("$url/archive/refs/tags/$_tag/$_archive.tar.gz")
1019
sha256sums=('9d8a35a29d04cd1b7b45f542c0ba48015feece1210036ea9e4efaad3140af4b0')
1120

1221
build () {
13-
cd "$srcdir"/Clipper2-Clipper2_${pkgver}/CPP
14-
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCLIPPER2_TESTS=OFF -DCLIPPER2_EXAMPLES=OFF -DCLIPPER2_UTILS=OFF .
15-
make
22+
cd "$_archive/CPP"
23+
local cmake_options=(
24+
-D CMAKE_INSTALL_PREFIX=/usr
25+
-D BUILD_SHARED_LIBS=On
26+
-D CLIPPER2_TESTS=Off
27+
-D CLIPPER2_EXAMPLES=Off
28+
-D CLIPPER2_UTILS=Off
29+
)
30+
cmake -B build -W no-dev "${cmake_options[@]}"
31+
cmake --build build
1632
}
1733

1834
package () {
19-
cd "$srcdir"/Clipper2-Clipper2_${pkgver}/CPP
20-
make install DESTDIR="$pkgdir"
35+
cd "$_archive/CPP"
36+
DESTDIR="$pkgdir" cmake --install build
2137
}

clipper2/REUSE.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version = 1
2+
3+
[[annotations]]
4+
path = [
5+
"PKGBUILD",
6+
"README.md",
7+
"keys/**",
8+
".SRCINFO",
9+
".nvchecker.toml",
10+
"*.install",
11+
"*.sysusers",
12+
"*.tmpfiles",
13+
"*.logrotate",
14+
"*.pam",
15+
"*.service",
16+
"*.socket",
17+
"*.timer",
18+
"*.desktop",
19+
"*.hook",
20+
]
21+
SPDX-FileCopyrightText = "Arch Linux contributors"
22+
SPDX-License-Identifier = "0BSD"

0 commit comments

Comments
 (0)