summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
-rw-r--r--gts-mingw.patch27
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4827ef49b25
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = mingw-w64-gts
+ pkgdesc = Provides useful functions to deal with 3D surfaces meshed with interconnected triangles (mingw-w64)
+ pkgver = 0.7.6
+ pkgrel = 1
+ url = http://gts.sourceforge.net/
+ arch = any
+ license = LGPL
+ makedepends = mingw-w64-configure
+ makedepends = mingw-w64-wine
+ depends = mingw-w64-crt
+ depends = mingw-w64-glib2
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = https://downloads.sourceforge.net/project/gts/gts/0.7.6/gts-0.7.6.tar.gz
+ source = gts-mingw.patch
+ sha256sums = 059c3e13e3e3b796d775ec9f96abdce8f2b3b5144df8514eda0cc12e13e8b81e
+ sha256sums = d16c24ce5766c9dc36a2ad02d1298c79f7576a29ac8ec79268020fa9bc453f60
+
+pkgname = mingw-w64-gts
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0255753f746
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+
+pkgname=mingw-w64-gts
+pkgver=0.7.6
+pkgrel=1
+pkgdesc="Provides useful functions to deal with 3D surfaces meshed with interconnected triangles (mingw-w64)"
+arch=('any')
+url="http://gts.sourceforge.net/"
+license=('LGPL')
+makedepends=('mingw-w64-configure' 'mingw-w64-wine')
+depends=('mingw-w64-crt' 'mingw-w64-glib2')
+options=('!strip' '!buildflags' 'staticlibs')
+source=("https://downloads.sourceforge.net/project/gts/gts/${pkgver}/gts-${pkgver}.tar.gz"
+ "gts-mingw.patch")
+sha256sums=('059c3e13e3e3b796d775ec9f96abdce8f2b3b5144df8514eda0cc12e13e8b81e'
+ 'd16c24ce5766c9dc36a2ad02d1298c79f7576a29ac8ec79268020fa9bc453f60')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}/gts-$pkgver/"
+ patch -Np1 -i "${srcdir}/gts-mingw.patch"
+ autoreconf -fiv
+}
+
+build() {
+ cd "${srcdir}/gts-$pkgver/"
+ export LDFLAGS=${LDFLAGS//--as-needed,}
+ for _arch in ${_architectures}; do
+ mkdir -p "${srcdir}/build-${_arch}" && pushd "${srcdir}/build-${_arch}"
+ cp -rf "${srcdir}/gts-$pkgver/." "${srcdir}/build-${_arch}"
+ ${_arch}-configure .
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ done
+}
diff --git a/gts-mingw.patch b/gts-mingw.patch
new file mode 100644
index 00000000000..7cd0dca7a89
--- /dev/null
+++ b/gts-mingw.patch
@@ -0,0 +1,27 @@
+diff -Naur gts-0.7.6.orig/src/Makefile.am gts-0.7.6/src/Makefile.am
+--- gts-0.7.6.orig/src/Makefile.am 2018-06-15 07:53:09.209430583 -0400
++++ gts-0.7.6/src/Makefile.am 2018-06-15 07:57:00.839780556 -0400
+@@ -13,7 +13,7 @@
+ lib_LTLIBRARIES = libgts.la
+
+ libgts_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)\
+- -release $(LT_RELEASE) -export-dynamic
++ -release $(LT_RELEASE) -export-dynamic -no-undefined
+
+ libgts_la_DEPENDENCIES = \
+ predicates_init.h
+@@ -65,11 +65,11 @@
+ predicates.o: predicates.c predicates_init.h predicates.h
+ $(COMPILE) -c $(srcdir)/predicates.c
+
+-predicates_init: predicates_init.c rounding.h
+- $(COMPILE) $(srcdir)/predicates_init.c -o $(srcdir)/predicates_init
++predicates_init$(EXEEXT): predicates_init.c rounding.h
++ $(COMPILE) $(srcdir)/predicates_init.c -o $(srcdir)/predicates_init$(EXEEXT)
+
+-predicates_init.h: predicates_init
+- ./predicates_init > $(srcdir)/predicates_init.h
++predicates_init.h: predicates_init$(EXEEXT)
++ ./predicates_init$(EXEEXT) > $(srcdir)/predicates_init.h
+
+ CLEANFILES = $(BUILT_SOURCES)