~alpine/aports

testing/opencsg: New aport v1 APPLIED

Marian Buschsieweke: 1
 testing/opencsg: New aport

 2 files changed, 49 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/3094/mbox | git am -3
Learn more about email & git

[PATCH] testing/opencsg: New aport Export this patch

A library that does image-based CSG rendering using OpenGL
http://www.opencsg.org/
---
 testing/opencsg/APKBUILD       | 38 ++++++++++++++++++++++++++++++++++
 testing/opencsg/freeglut.patch | 11 ++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 testing/opencsg/APKBUILD
 create mode 100644 testing/opencsg/freeglut.patch

diff --git a/testing/opencsg/APKBUILD b/testing/opencsg/APKBUILD
new file mode 100644
index 0000000000..f85fffafd7
--- /dev/null
+++ b/testing/opencsg/APKBUILD
@@ -0,0 +1,38 @@
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=opencsg
pkgver=1.4.2
pkgrel=0
pkgdesc="A library that does image-based CSG rendering using OpenGL"
url="http://www.opencsg.org/"
arch="all"
license="GPL-2.0-only"
subpackages="$pkgname-dev $pkgname-example"
makedepends="glew-dev freeglut-dev"
source="
	http://www.opencsg.org/OpenCSG-${pkgver}.tar.gz
	freeglut.patch
	"
builddir="$srcdir/OpenCSG-$pkgver"

build() {
	make -j1
}

check() {
	make check
}

package() {
	for folder in src example; do
		sed -e 's/\/usr\/local\//\/usr\//g' -i $folder/Makefile
		make INSTALL_ROOT="$pkgdir" install -j 1 -C $folder
	done
}

example() {
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="fbe6f925982717ecca7bd0eacc4fc5b362c80c7663b1ff0d9a228f2b5e1d3625d3e6d324d9e634665c74e9c0fc37d10290ece293e59a3eba67035b6b700b7778  OpenCSG-1.4.2.tar.gz
5927a6e9b90a44f7f427003b6367ec986827ee135fe4817c12cd7ef1dae2e7db6be146b987fa4054cc2803eff6bf026ad81c7e6521cf43144da7b4c5990ae78d  freeglut.patch"
diff --git a/testing/opencsg/freeglut.patch b/testing/opencsg/freeglut.patch
new file mode 100644
index 0000000000..08a91a8c85
--- /dev/null
+++ b/testing/opencsg/freeglut.patch
@@ -0,0 +1,11 @@
--- OpenCSG-1.4.2.old/example/main.cpp
+++ OpenCSG-1.4.2/example/main.cpp
@@ -35,7 +35,7 @@
 #ifdef __APPLE__
 #include <GLUT/glut.h>
 #else
-#include <GL/glut.h>
+#include <GL/freeglut.h>
 #endif
 
 enum { 
-- 
2.23.0
Milan P. Stanić <mps@arvanta.net>
Hi Marian,

Tried to apply your patch but got next error:
-------------------------------------------------
Applying: testing/opencsg: New aport
Using index info to reconstruct a base tree...
.git/rebase-apply/patch:67: trailing whitespace.

.git/rebase-apply/patch:68: trailing whitespace.
 enum {
warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
CONFLICT (add/add): Merge conflict in testing/opencsg/APKBUILD
Auto-merging testing/opencsg/APKBUILD
error: Failed to merge in the changes.
Patch failed at 0001 testing/opencsg: New aport
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
-------------------------------------------------

You can now use https://gitlab.alpinelinux.org where you can 'git push'
an  test your patches with CI so it will be easier for review and add to
aports. It would be easier for you, imo.

Thank you for helping Alpine linux.

-- 

On Wed, 2019-10-09 at 22:41, Marian Buschsieweke wrote: