Skip to content

Commit

Permalink
science/code_saturne: upgrade to v8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thierry-FreeBSD committed Dec 15, 2023
1 parent b73567f commit 2e9ed05
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 10,934 deletions.
9 changes: 7 additions & 2 deletions science/code_saturne/Makefile
@@ -1,6 +1,5 @@
PORTNAME= code_saturne
PORTVERSION= 8.0.2
PORTREVISION= 2
PORTVERSION= 8.1.0
CATEGORIES= science parallel
MASTER_SITES= https://www.code-saturne.org/releases/

Expand Down Expand Up @@ -83,6 +82,8 @@ TERM?= vt100 # Default value needed for tput in jail or tinderbox
# /libsaturne.so:
# undefined reference to `__atomic_compare_exchange'
CONFIGURE_ARGS+= --disable-openmp
.else
CONFIGURE_ARGS+= --enable-openmp
.endif

.if ${PORT_OPTIONS:MDOCS}
Expand All @@ -96,12 +97,16 @@ BUILD_DEPENDS+= fig2dev:print/fig2dev \
BINARY_ALIAS+= sphinx-build=sphinx-build-${PYTHON_VER}
ALL_TARGET= all pdf
DOCS= AUTHORS ChangeLog README
PORTDOCS= *
.endif

pre-configure:
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
${WRKSRC}/Makefile.am
${REINPLACE_CMD} -e 's|make -s|${GMAKE} -s|' ${WRKSRC}/m4/cs_petsc.m4
.for cs in config/cs_auto_flags.sh libple/config/ple_auto_flags.sh
${REINPLACE_CMD} -e 's|fopenmp=libomp|fopenmp|' ${WRKSRC}/${cs}
.endfor

post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/code_saturne/cs_solver
Expand Down
6 changes: 3 additions & 3 deletions science/code_saturne/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1697142365
SHA256 (code_saturne-8.0.2.tar.gz) = 48d33a55e9f7b77b486e0fa1706223910eb9add7d13f11bb18dc79583587378f
SIZE (code_saturne-8.0.2.tar.gz) = 61255604
TIMESTAMP = 1702564424
SHA256 (code_saturne-8.1.0.tar.gz) = 6f2b067337b8ad003a26b91f59971a1028f01cf14c962031629203899dc4053f
SIZE (code_saturne-8.1.0.tar.gz) = 64587304
14 changes: 14 additions & 0 deletions science/code_saturne/files/patch-build-aux_cs__compile__build.py
@@ -0,0 +1,14 @@
--- build-aux/cs_compile_build.py.orig 2023-12-14 20:49:47 UTC
+++ build-aux/cs_compile_build.py
@@ -394,8 +394,9 @@ def get_dynamic_lib_dep_flags(pkg, top_builddir=None,
if libs:
cmd_line += libs + " "

- if rpath_list:
- cmd_line += "-Wl,-rpath -Wl," + ':'.join(rpath_list)
+ # Not needed on FreeBSD, we have ldconfig, and it causes the libs to get linked against $DESTDIR
+ #if rpath_list:
+ # cmd_line += "-Wl,-rpath -Wl," + ':'.join(rpath_list)

return cmd_line.rstrip()

12 changes: 12 additions & 0 deletions science/code_saturne/files/patch-build-aux_cs__link__library.py
@@ -0,0 +1,12 @@
--- build-aux/cs_link_library.py.orig 2023-12-14 20:36:11 UTC
+++ build-aux/cs_link_library.py
@@ -263,8 +263,7 @@ def build_shared_library(linker,
for o in other:
if o in ignore_deps:
continue
- if o[:2] == '-R':
- cmd += ["-Wl,-rpath", "-Wl,"+o[2:]]
+ # Not useful on FreeBSD (we have lsconfig) and causes libs to be linked against $DESTDIR
else:
cmd.append(o)

11 changes: 11 additions & 0 deletions science/code_saturne/files/patch-src_apps_Makefile.am
@@ -0,0 +1,11 @@
--- src/apps/Makefile.am.orig 2023-12-10 13:11:41 UTC
+++ src/apps/Makefile.am
@@ -221,7 +221,7 @@ install-exec-hook: ${local_libraries_add}
$(PYTHON) -B $(top_srcdir)/build-aux/cs_compile_build.py \
--lib-flags-only --mode=install --dest "$(DESTDIR)"` ; \
$(PYTHON) -B $(top_srcdir)/build-aux/cs_link_library.py -o "$(DESTDIR)$(libdir)/libsaturne.${SHARED_LIB_EXT}" --echo --linker ${CS_LD} --version ${cs_version_lib} --whole-archive-start ${libsaturne_a_libs} --whole-archive-end ${LDFLAGS_SHARED} ${CXXFLAGS_SHARED} ${LDFLAGS} ${AM_LDFLAGS} $${ldadd_saturne}; \
- $(PYTHON) -B $(top_srcdir)/build-aux/cs_link_library.py -o "$(DESTDIR)$(libdir)/libcs_solver.${SHARED_LIB_EXT}" --echo --linker ${CS_LD} --version ${cs_version_lib} ${LDFLAGS_SHARED} ${CXXFLAGS_SHARED} cs_solver.$(OBJEXT) ${LDFLAGS} -L"$(DESTDIR)$(libdir)" -lsaturne-${cs_version_lib} ${AM_LDFLAGS} $${ldadd_saturne}; \
+ $(PYTHON) -B $(top_srcdir)/build-aux/cs_link_library.py -o "$(DESTDIR)$(libdir)/libcs_solver.${SHARED_LIB_EXT}" --echo --linker ${CS_LD} --version ${cs_version_lib} ${LDFLAGS_SHARED} ${CXXFLAGS_SHARED} cs_solver.$(OBJEXT) ${LDFLAGS} -lsaturne-${cs_version_lib} ${AM_LDFLAGS} $${ldadd_saturne}; \
}; \
PYTHONPATH=$(top_srcdir)/python/code_saturne/base \
CS_TOP_BUILDDIR=$(top_builddir) \

0 comments on commit 2e9ed05

Please sign in to comment.