1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix possible build issues with pkgconf. [1]

- Update Makefile header to the new format.

Pointed by:	bapt [1]
This commit is contained in:
Jung-uk Kim 2012-09-17 17:02:59 +00:00
parent 585bd71a35
commit 1677e26dfe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=304410
2 changed files with 41 additions and 9 deletions

View File

@ -1,7 +1,4 @@
# New ports collection makefile for: jamvm
# Date created: 31 March 2008
# Whom: Bjoern Koenig
#
# Created by: Bjoern Koenig <bkoenig@alpha-tierchen.de>
# $FreeBSD$
PORTNAME= jamvm
@ -31,10 +28,6 @@ ZIP_DESC= turn-on zip support in the bootstrap loader
.if ${PORT_OPTIONS:MFFI}
LIB_DEPENDS+= ffi:${PORTSDIR}/devel/libffi
CONFIGURE_ARGS+= --enable-ffi
FFI_CFLAGS!= pkgconf libffi --cflags
FFI_LDFLAGS!= pkgconf libffi --libs-only-L
CFLAGS+= ${FFI_CFLAGS}
LDFLAGS+= ${FFI_LDFLAGS}
.elif ${ARCH} == "sparc64"
IGNORE= for ${ARCH} requires libffi
.endif

View File

@ -1,5 +1,5 @@
--- configure.orig 2009-12-31 13:41:44.000000000 -0500
+++ configure 2012-09-12 20:07:36.000000000 -0400
+++ configure 2012-09-17 12:29:34.000000000 -0400
@@ -2689,7 +2689,7 @@
hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
mipsel-*-linux*) host_cpu=mips host_os=linux ;;
@ -9,3 +9,42 @@
arm*-*-linux*) host_cpu=arm host_os=linux ;;
arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
@@ -21662,8 +21662,15 @@
if test "${ac_cv_lib_ffi_ffi_call+set}" = set; then
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_CFLAGS=$CFLAGS
+ ac_check_lib_save_LDFLAGS=$LDFLAGS
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lffi $LIBS"
+ LIBFFI_CFLAGS="$($PKG_CONFIG libffi --cflags)"
+ LIBFFI_LDFLAGS="$($PKG_CONFIG libffi --libs-only-L)"
+ LIBFFI_LIBS="$($PKG_CONFIG libffi --libs-only-l)"
+CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
+LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS"
+LIBS="$LIBFFI_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -21718,6 +21725,8 @@
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$ac_check_lib_save_CFLAGS
+LDFLAGS=$ac_check_lib_save_LDFLAGS
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ffi_ffi_call" >&5
@@ -21726,9 +21735,9 @@
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBFFI 1
_ACEOF
-
- LIBS="-lffi $LIBS"
-
+ CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
+ LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS"
+ LIBS="$LIBFFI_LIBS $LIBS"
else
{ { $as_echo "$as_me:$LINENO: error: libffi is missing" >&5
$as_echo "$as_me: error: libffi is missing" >&2;}