PKGBUILDs/extra/genxrdpattern/PKGBUILD

47 lines
1.6 KiB
Bash
Raw Normal View History

2020-02-09 12:58:51 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - add sse=0 to objcryst make line
pkgname=genxrdpattern
pkgver=1.1
2024-07-03 00:29:07 +00:00
pkgrel=4
2023-02-18 00:25:49 +00:00
pkgdesc='Uses ObjCryst++ to generate a theoretical XRD pattern'
2020-02-09 12:58:51 +00:00
arch=(x86_64)
2023-02-18 00:25:49 +00:00
url='https://github.com/psavery/genXrdPattern'
2024-07-03 00:29:07 +00:00
license=(GPL-2.0-or-later)
depends=(gcc-libs
glibc)
makedepends=(cmake
git)
source=(git+https://github.com/psavery/genXrdPattern#tag=$pkgver-linux
2020-02-09 12:58:51 +00:00
https://github.com/psavery/genXrdPattern/releases/download/$pkgver-linux/objcryst.tgz)
2024-07-03 00:29:07 +00:00
sha256sums=('02de8acb488a9a51e09882bf67dbbea89406a98c92bebdc1de66cf2aad74cc91'
2020-02-09 12:58:51 +00:00
'5523eae9937388260b3e491a1a11a443ab00a0961318ec92eee08f9366a0953f')
prepare() {
sed -e 's|/user/psavery/src/objcryst/Fox/src|.|g' -i objcryst/Fox/src/Fox.dep
2020-06-24 12:32:05 +00:00
sed -e 's|-march=native||' -i objcryst/ObjCryst/*.mak # Don't use -march=native
sed -e 's|set(CMAKE_EXE_LINKER_FLAGS \"-static\")|set(CMAKE_EXE_LINKER_FLAGS "$ENV{LDFLAGS}")|' \
2024-07-03 00:29:07 +00:00
-i genXrdPattern/CMakeLists.txt # Honor system LDFLAGS
2023-02-18 00:25:49 +00:00
sed -e 's/indx > 0/*indx > 0/' -i objcryst/newmat/newmat6.cpp
2024-07-03 00:29:07 +00:00
sed -e "s|CPPFLAGS = -w -ffast-math.*|CPPFLAGS = ${CXXFLAGS}|" -i objcryst/ObjCryst/*.mak # Honor system CFLAGS
sed -e "s|CXXFLAGS = -O2 -Wall|CXXFLAGS = ${CXXFLAGS}|" -i objcryst/{cctbx/gnu.mak,newmat/nm_gnu.mak}
2020-02-09 12:58:51 +00:00
}
build() {
cd objcryst/Fox
make Fox-nogui shared=0 sse=0 -j1
2020-06-24 12:32:05 +00:00
cd "$srcdir"
2024-07-03 00:29:07 +00:00
cmake -B build -S genXrdPattern \
2020-02-09 12:58:51 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DObjCryst_ROOT="$srcdir"/objcryst
2020-06-24 12:32:05 +00:00
cmake --build build
2020-02-09 12:58:51 +00:00
}
package() {
cd build
install -Dm755 genXrdPattern -t "$pkgdir"/usr/bin
}