extra/genxrdpattern to 1.1-4

This commit is contained in:
Kevin Mihelich 2024-07-03 00:29:07 +00:00
parent 41e5879b4c
commit 87a928e03f
3 changed files with 33 additions and 8 deletions

View file

@ -0,0 +1,17 @@
pkgbase = genxrdpattern
pkgdesc = Uses ObjCryst++ to generate a theoretical XRD pattern
pkgver = 1.1
pkgrel = 4
url = https://github.com/psavery/genXrdPattern
arch = x86_64
license = GPL-2.0-or-later
makedepends = cmake
makedepends = git
depends = gcc-libs
depends = glibc
source = git+https://github.com/psavery/genXrdPattern#tag=1.1-linux
source = https://github.com/psavery/genXrdPattern/releases/download/1.1-linux/objcryst.tgz
sha256sums = 02de8acb488a9a51e09882bf67dbbea89406a98c92bebdc1de66cf2aad74cc91
sha256sums = 5523eae9937388260b3e491a1a11a443ab00a0961318ec92eee08f9366a0953f
pkgname = genxrdpattern

View file

@ -0,0 +1,4 @@
[genxrdpattern]
source = 'github'
github = 'psavery/genXrdPattern'
use_max_tag = true

View file

@ -5,24 +5,28 @@
pkgname=genxrdpattern
pkgver=1.1
pkgrel=3
pkgrel=4
pkgdesc='Uses ObjCryst++ to generate a theoretical XRD pattern'
arch=(x86_64)
url='https://github.com/psavery/genXrdPattern'
license=(GPL)
depends=(gcc-libs)
makedepends=(cmake)
source=(https://github.com/psavery/genXrdPattern/archive/$pkgver-linux/$pkgname-$pkgver.tar.gz
license=(GPL-2.0-or-later)
depends=(gcc-libs
glibc)
makedepends=(cmake
git)
source=(git+https://github.com/psavery/genXrdPattern#tag=$pkgver-linux
https://github.com/psavery/genXrdPattern/releases/download/$pkgver-linux/objcryst.tgz)
sha256sums=('9bc01dbf637d6520d8e2f5743bb1b46f8319432af5ce2d2a484a36615c1586d3'
sha256sums=('02de8acb488a9a51e09882bf67dbbea89406a98c92bebdc1de66cf2aad74cc91'
'5523eae9937388260b3e491a1a11a443ab00a0961318ec92eee08f9366a0953f')
prepare() {
sed -e 's|/user/psavery/src/objcryst/Fox/src|.|g' -i objcryst/Fox/src/Fox.dep
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}")|' \
-i genXrdPattern-$pkgver-linux/CMakeLists.txt # Honor system LDFLAGS
-i genXrdPattern/CMakeLists.txt # Honor system LDFLAGS
sed -e 's/indx > 0/*indx > 0/' -i objcryst/newmat/newmat6.cpp
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}
}
build() {
@ -30,7 +34,7 @@ build() {
make Fox-nogui shared=0 sse=0 -j1
cd "$srcdir"
cmake -B build -S genXrdPattern-$pkgver-linux \
cmake -B build -S genXrdPattern \
-DCMAKE_INSTALL_PREFIX=/usr \
-DObjCryst_ROOT="$srcdir"/objcryst
cmake --build build