Skip to content

Commit

Permalink
jags: Use bundled ltdl; fix implicit func decl
Browse files Browse the repository at this point in the history
Use bundled libtool dynamic loader instead of MacPosts copy.

Closes: https://trac.macports.org/ticket/72052

Fix implicit declaration of function exit.

Ignore expected implicit declaration of function strchr.
  • Loading branch information
ryandesign committed Feb 14, 2025
1 parent 629c582 commit aded4a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 9 additions & 3 deletions science/jags/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup compilers 1.0

name jags
version 4.3.2
revision 0
revision 1
set major [lindex [split ${version} .] 0]
categories science math
license GPL-2
Expand All @@ -25,14 +25,20 @@ checksums rmd160 35e7695072b6bb5a6dfb60d789ac0474eafb92a5 \
# test deps pkgconfig and cppunit have to be added in build to work
depends_build-append path:libexec/coreutils/libstdbuf.so:coreutils \
port:cppunit \
port:libtool \
port:pkgconfig
path:bin/pkg-config:pkgconfig

patchfiles implicit.patch

compilers.choose cc cxx f77
compilers.setup require_fortran

universal_variant no

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

configure.args --with-included-ltdl

# note: BLAS/LAPACK is an optional dependency
configure.args-append --with-blas='-framework Accelerate'

Expand Down
12 changes: 12 additions & 0 deletions science/jags/files/implicit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Fix:
error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
--- configure.orig 2023-03-04 11:06:39.000000000 -0600
+++ configure 2025-02-14 15:40:24.000000000 -0600
@@ -23371,6 +23371,7 @@
/* end confdefs.h. */

#include <math.h>
+#include <stdlib.h>
#include "confdefs.h"
int main () {
#ifdef HAVE_DECL_ISFINITE

0 comments on commit aded4a4

Please sign in to comment.