Skip to content

Commit

Permalink
Merge pull request #1702 from willend/main
Browse files Browse the repository at this point in the history
Allow to build installable packages for linux aarch64 Debian / arm64
  • Loading branch information
willend authored Sep 18, 2024
2 parents 6a76671 + 72ff305 commit 97d49f8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion buildscripts/build_debs_mcstas_arm64
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FLAVOUR=mcstas
# From 2.1 onwards, let McStas reside in /usr/share on Debian-like systems
export MCINSTALL_PREFIX=/usr # Debian standard /usr/bin and /usr/share/$FLAVOUR
export MCCODE_USE_LEGACY_DESTINATIONS=OFF # install in e.g. /usr/share/$FLAVOUR/resources
export ENABLE_CIF2HKL=OFF # cif2hkl is available as a separate package
export ENABLE_CIF2HKL=ON # cif2hkl is available as a separate package

./mkdist $FLAVOUR $1 "" "" $MCCODE_ARCH "" -- deb
./mkdist $FLAVOUR-comps $1 "" "" $MCCODE_ARCH "" -- deb
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/build_debs_mcxtrace_arm64
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FLAVOUR=mcxtrace
# From 2.1 onwards, let McStas reside in /usr/share on Debian-like systems
export MCINSTALL_PREFIX=/usr # Debian standard /usr/bin and /usr/share/$FLAVOUR
export MCCODE_USE_LEGACY_DESTINATIONS=OFF # install in e.g. /usr/share/$FLAVOUR/resources
export ENABLE_CIF2HKL=OFF # cif2hkl is available as a separate package
export ENABLE_CIF2HKL=ON # cif2hkl is available as a separate package

./mkdist $FLAVOUR $1 "" "" $MCCODE_ARCH "" -- deb
./mkdist $FLAVOUR-comps $1 "" "" $MCCODE_ARCH "" -- deb
Expand Down
11 changes: 7 additions & 4 deletions mcstas-comps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ set(CPACK_PACKAGE_VERSION "1.0")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")


# Debian
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libgsl-dev, cif2hkl")

# NSIS
set(CPACK_NSIS_PACKAGE_NAME "${MCCODE_STRING} Components")
set(CPACK_NSIS_DISPLAY_NAME "${MCCODE_STRING} Components")
Expand All @@ -45,6 +41,13 @@ if ( ENABLE_CIF2HKL )
)
endif()

# Debian
if ( ENABLE_CIF2HKL )
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libgsl-dev")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libgsl-dev, cif2hkl")
endif()

option( ENABLE_NEUTRONICS "Build Third Party code neutronics (fortran)" ON )#TODO: Only enable enable Fortran if this is on
if ( ENABLE_NEUTRONICS )
enable_language( Fortran )
Expand Down
10 changes: 7 additions & 3 deletions mcxtrace-comps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")


# Debian
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libxrl-dev, libgsl-dev, cif2hkl")

# NSIS
set(CPACK_NSIS_PACKAGE_NAME "${MCCODE_STRING} Components")
set(CPACK_NSIS_DISPLAY_NAME "${MCCODE_STRING} Components")
Expand All @@ -45,6 +42,13 @@ if ( ENABLE_CIF2HKL )
)
endif()

# Debian
if ( ENABLE_CIF2HKL )
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libxrl-dev, libgsl-dev")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${FLAVOR}-${MCCODE_VERSION}, libnexus-dev, libxrl-dev, libgsl-dev, cif2hkl")
endif()

# System c-code
install( DIRECTORY "share/" DESTINATION "${DEST_DATADIR_CODEFILES}")

Expand Down

0 comments on commit 97d49f8

Please sign in to comment.