From fddbbeeff66a4513e0e671f243948e97332d13c3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 15 May 2023 15:57:43 -0400 Subject: [PATCH] backports/lib3mf: new aport --- backports/lib3mf/APKBUILD | 46 ++++++++++++++++++++++++++++++ backports/libspnav/APKBUILD | 44 ++++++++++++++++++++++++++++ backports/libspnav/configure.patch | 22 ++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 backports/lib3mf/APKBUILD create mode 100644 backports/libspnav/APKBUILD create mode 100644 backports/libspnav/configure.patch diff --git a/backports/lib3mf/APKBUILD b/backports/lib3mf/APKBUILD new file mode 100644 index 0000000..4d16134 --- /dev/null +++ b/backports/lib3mf/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Marian Buschsieweke +pkgname=lib3mf +pkgver=2.2.0 +pkgrel=0 +pkgdesc="A C++ implementation of the 3D Manufacturing Format file standard" +url="https://github.com/3MFConsortium/lib3mf" +# "Generating hourglass API bindings and implementation stub" fail on ARM, s390x, and ppc64le +arch="all !armv7 !armhf !aarch64 !s390x !ppc64le" +license="BSD-2-Clause" +subpackages="$pkgname-dev" +makedepends=" + cmake + libzip-dev + ninja + util-linux-dev + zlib-dev + " +source="$pkgname-$pkgver.tar.gz::https://github.com/3MFConsortium/lib3mf/archive/v$pkgver.tar.gz" +options="!check" # Unit tests requires source code of googletest, which is git submodule but not included in the release + +build() { + cmake -B build \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_INCLUDEDIR=include/lib3mf \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DUSE_INCLUDED_ZLIB=OFF \ + -DUSE_INCLUDED_LIBZIP=OFF \ + -DLIB3MF_TESTS=FALSE + cmake --build build +} + +package() { + DESTDIR="$pkgdir" cmake --install build + # fix Cflags in lib3mf.pc + sed -e 's!Cflags: -I${includedir}!Cflags: -I${includedir} -I${includedir}/Bindings/C -I${includedir}/Bindings/Cpp!' \ + -i "$pkgdir"/usr/lib/pkgconfig/lib3mf.pc + + # some packages expect lib3MF.pc instead of lib3mf.pc + ln -s lib3mf.pc "$pkgdir"/usr/lib/pkgconfig/lib3MF.pc +} + +sha512sums=" +2a9ee92312396b8966967a7ed696c58c69a77438f94432ad071659adc8c9d12fba34a3cf3d8c8d3ad3b26c12c9a89f4d8645e6f396987dc05b04952b004a1f07 lib3mf-2.2.0.tar.gz +" diff --git a/backports/libspnav/APKBUILD b/backports/libspnav/APKBUILD new file mode 100644 index 0000000..59763af --- /dev/null +++ b/backports/libspnav/APKBUILD @@ -0,0 +1,44 @@ +# Contributor: guddaff +# Maintainer: guddaff +pkgname=libspnav +pkgver=1.1 +pkgrel=0 +pkgdesc="library for communicating with spacenavd or 3dxsrv" +url="https://spacenav.sourceforge.net/" +arch="all" +license="BSD-3-Clause" +options="!check" #no checks +makedepends="libx11-dev" +subpackages="$pkgname-static $pkgname-dev" +source="https://github.com/FreeSpacenav/libspnav/releases/download/v$pkgver/libspnav-$pkgver.tar.gz + configure.patch + " + +prepare() { + default_prepare + sed -i "s/@PKGVERSION@/$pkgver/" "$builddir"/configure +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums=" +94770d9449dd02ade041d3589bcae7664fa990c4a4feca7b2b1e6542b65aa7073305595310b9e639f10716cf15aaad913e57496fb79bdd4dba5bf703ec8299ab libspnav-1.1.tar.gz +1536a172843459c1f26806ad774194afddf93baca0421d0803337eb90b6dd4bcc9dc9b6ebcb1a4e7de0c6f52b16da51538d302a07d57f0625a3a3311a14327f9 configure.patch +" diff --git a/backports/libspnav/configure.patch b/backports/libspnav/configure.patch new file mode 100644 index 0000000..5cc2fbb --- /dev/null +++ b/backports/libspnav/configure.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -6,18 +6,8 @@ + OPT=yes + DBG=yes + X11=yes +-VER=`git describe --tags 2>/dev/null` ++VER="@PKGVERSION@" + +-if [ -z "$VER" ]; then +- VER=`git rev-parse --short HEAD 2>/dev/null` +- if [ -z "$VER" ]; then +- VER=v`pwd | grep 'libspnav-[0-9]\+\.' | sed 's/.*libspnav-\(\([0-9]\+\.\)\+[0-9]\+\).*$/\1/'` +- if [ $VER = v ]; then +- VER='' +- fi +- fi +-fi +- + echo "configuring libspnav - $VER" + + srcdir="`dirname "$0"`"