db-move: moved gnome-font-viewer from [testing] to [extra] (x86_64)
[arch-packages.git] / genxrdpattern / trunk / PKGBUILD
blobdbac54e5d9c0bd68297dc34be01df4be11b4d9a3
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
3 pkgname=genxrdpattern
4 pkgver=1.1
5 pkgrel=3
6 pkgdesc='Uses ObjCryst++ to generate a theoretical XRD pattern'
7 arch=(x86_64)
8 url='https://github.com/psavery/genXrdPattern'
9 license=(GPL)
10 depends=(gcc-libs)
11 makedepends=(cmake)
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')
17 prepare() {
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
25 build() {
26   cd objcryst/Fox
27   make Fox-nogui shared=0 -j1
29   cd "$srcdir"
30   cmake -B build -S genXrdPattern-$pkgver-linux \
31     -DCMAKE_INSTALL_PREFIX=/usr \
32     -DObjCryst_ROOT="$srcdir"/objcryst
33   cmake --build build
36 package() {
37   cd build
38   install -Dm755 genXrdPattern -t "$pkgdir"/usr/bin