Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use pugixml and fmt submodule if already found on system #1757

Merged
merged 3 commits into from
Feb 12, 2021

Conversation

gridley
Copy link
Contributor

@gridley gridley commented Feb 6, 2021

Resolves #1756

So, I've tried to maintain this little build script for arch-based distro users to easily install openmc:

https://aur.archlinux.org/packages/openmc-git/

And it seems a handful of people have used it.

One issue is that we currently have to mark fmt and pugixml as conflicting packages, because these may already be installed on the system, as someone has previously run into. This PR makes it so that we no longer have to mark these packages as conflicting in this build script by using the system-provided libraries if they're present.

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @gridley!

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@sxiii
Copy link

sxiii commented Feb 11, 2021

I've checked this commit and seems it's working nicely.
Made the PKGBUILD for this version a bit smaller and removed the conflicts.
Bulids on Manjaro recent. Now my goal is to add support of DAGMC in here.

Can we merge this to DEV branch now maybe? :=)

PKGBUILD that I used

# Maintainer: Gavin Ridley <[email protected]>
pkgname=openmc-git
pkgver=v0.12.0
pkgrel=1
pkgdesc="Community-developed Monte Carlo neutron and photon transport simulation code"
arch=('any')
url="https://github.com/openmc-dev/openmc"
license=('MIT')
makedepends=('cmake' 'git' 'python-setuptools')
depends=('hdf5-cpp-fortran' 'python-numpy' 'python-matplotlib' 'python-scipy'
    'python-pandas' 'python-uncertainties' 'python-lxml')
#python-h5py
provides=("${pkgname%-git}" "libopenmc.so")
conflicts=("${pkgname%-git}")
source=("${pkgname}::git+https://github.com/gridley/openmc.git#branch=use_system_pugi_fmt")
noextract=()
sha1sums=('SKIP')
build() {
    printf "build"
    printf "%s" "${pkgname}"
    printf "%s" "${pkgname%-git}"
        cd "${srcdir}/${pkgname}"
    git submodule update --init --recursive
    python setup.py build
    mkdir -p build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    make
}
package() {
    cd "${srcdir}/${pkgname}/build"
    make DESTDIR=. install
    cd ..
    python setup.py install --root=. --optimize=1 --skip-build
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conflict with pugixml and fmt while trying to install package
3 participants