Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions archimedes-tools/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,33 @@
pkgbase=archimedes-tools
pkgname=('triangle' 'showme')
pkgver=1.6
pkgrel=8
pkgrel=9
arch=('i686' 'x86_64')
url='http://www.cs.cmu.edu/~quake/archimedes.html'
pkgdesc='Archimedes is a set of tools, including mesh generators, for performing unstructured finite element simulations'
license=('custom')
source=('http://www.netlib.org/voronoi/triangle.zip'
'triangle_definitions.patch')
'triangle_definitions.patch'
'showme_functions.patch'
'triangle_functions.patch')
md5sums=('10aff8d7950f5e0e2fb6dd2e340be2c9'
'98844d1b1d9de73101b660412132cd07')
'98844d1b1d9de73101b660412132cd07'
'ec7def5c6a10d2e854440ab0a221c0b9'
'749da38851cac18494ec7cc2b56c6a19')
makedepends=('libx11')

prepare() {
patch < ${srcdir}/triangle_definitions.patch triangle.h
patch < ${srcdir}/triangle_functions.patch triangle.c
patch < ${srcdir}/showme_functions.patch showme.c
}

build(){
gcc ${CFLAGS} -o triangle triangle.c -lm
gcc ${CFLAGS} -DTRILIBRARY -Wall -fpic -c triangle.c
gcc ${CFLAGS} -DANSI_DECLARATORS -o triangle triangle.c -lm
gcc ${CFLAGS} -DANSI_DECLARATORS -DTRILIBRARY -Wall -fpic -c triangle.c
gcc ${CFLAGS} -shared -o libtriangle.so triangle.o

gcc ${CFLAGS} -o showme showme.c -lX11
gcc ${CFLAGS} -DANSI_DECLARATORS -o showme showme.c -lX11
}

package_triangle() {
Expand Down
11 changes: 11 additions & 0 deletions archimedes-tools/showme_functions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- showme.c.orig 2005-07-28 17:44:26.000000000 +0200
+++ showme.c.new 2025-05-14 23:04:25.076290384 +0200
@@ -107,7 +107,7 @@

/* A necessary forward declaration. */

-int load_image();
+int load_image(int inc, int image);

Display *display;
int screen;
13 changes: 13 additions & 0 deletions archimedes-tools/triangle_functions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- triangle.c.orig 2005-07-29 00:11:32.000000000 +0200
+++ triangle.c.new 2025-05-14 22:57:38.610943287 +0200
@@ -360,8 +360,8 @@
/* A few forward declarations. */

#ifndef TRILIBRARY
-char *readline();
-char *findfield();
+char *readline(char *string, FILE *infile, char *infilename);
+char *findfield(char *string);
#endif /* not TRILIBRARY */

/* Labels that signify the result of point location. The result of a */