1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
6 pkgdesc='Uses ObjCryst++ to generate a theoretical XRD pattern'
8 url='https://github.com/psavery/genXrdPattern'
12 source=(https://github.com/psavery/genXrdPattern/archive/$pkgver-linux/$pkgname-$pkgver.tar.gz
13 https://github.com/psavery/genXrdPattern/releases/download/$pkgver-linux/objcryst.tgz)
14 sha256sums=('9bc01dbf637d6520d8e2f5743bb1b46f8319432af5ce2d2a484a36615c1586d3'
15 '5523eae9937388260b3e491a1a11a443ab00a0961318ec92eee08f9366a0953f')
18 sed -e 's|/user/psavery/src/objcryst/Fox/src|.|g' -i objcryst/Fox/src/Fox.dep
19 sed -e 's|-march=native||' -i objcryst/ObjCryst/*.mak # Don't use -march=native
20 sed -e 's|set(CMAKE_EXE_LINKER_FLAGS \"-static\")|set(CMAKE_EXE_LINKER_FLAGS "$ENV{LDFLAGS}")|' \
21 -i genXrdPattern-$pkgver-linux/CMakeLists.txt # Honor system LDFLAGS
22 sed -e 's/indx > 0/*indx > 0/' -i objcryst/newmat/newmat6.cpp
27 make Fox-nogui shared=0 -j1
30 cmake -B build -S genXrdPattern-$pkgver-linux \
31 -DCMAKE_INSTALL_PREFIX=/usr \
32 -DObjCryst_ROOT="$srcdir"/objcryst
38 install -Dm755 genXrdPattern -t "$pkgdir"/usr/bin