Unbreak autoconf checks with clang by not using nested functions
This commit is contained in:
parent
70148a9224
commit
303165eda7
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2017/08/11 14:21:22 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2017/09/28 23:12:48 naddy Exp $
|
||||
|
||||
COMMENT= enhanced clone of Id Software's Doom game; multiplayer#'
|
||||
DISTNAME= prboom-2.5.0
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
CATEGORIES= games x11
|
||||
|
||||
@ -19,9 +19,10 @@ LIB_DEPENDS = devel/sdl-mixer \
|
||||
devel/sdl-net \
|
||||
graphics/png
|
||||
|
||||
CONFIGURE_STYLE=autoconf
|
||||
AUTOCONF_VERSION=2.61
|
||||
CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ARGS+=--disable-cpu-opt \
|
||||
--with-waddir=${TRUEPREFIX}/share/doom
|
||||
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/autotools
|
||||
|
13
games/prboom/patches/patch-autotools_ac_c_compile_flags_m4
Normal file
13
games/prboom/patches/patch-autotools_ac_c_compile_flags_m4
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-autotools_ac_c_compile_flags_m4,v 1.1 2017/09/28 23:12:48 naddy Exp $
|
||||
|
||||
Index: autotools/ac_c_compile_flags.m4
|
||||
--- autotools/ac_c_compile_flags.m4.orig
|
||||
+++ autotools/ac_c_compile_flags.m4
|
||||
@@ -5,7 +5,6 @@ do
|
||||
AC_MSG_CHECKING(whether compiler supports $ac_flag)
|
||||
CFLAGS="$NEW_CFLAGS $ac_flag"
|
||||
AC_TRY_COMPILE(,[
|
||||
- void f() {};
|
||||
],[
|
||||
NEW_CFLAGS="$CFLAGS"
|
||||
AC_MSG_RESULT(yes)
|
@ -1,33 +0,0 @@
|
||||
$OpenBSD: patch-configure,v 1.7 2013/03/31 21:09:32 bentley Exp $
|
||||
--- configure.orig Sun Nov 9 12:22:17 2008
|
||||
+++ configure Wed Mar 27 00:14:46 2013
|
||||
@@ -2422,9 +2422,9 @@ if test "${with_waddir+set}" = set; then
|
||||
withval=$with_waddir; DOOMWADDIR="$withval"
|
||||
else
|
||||
if test "x$prefix" != xNONE; then
|
||||
- DOOMWADDIR="$prefix/share/games/doom"
|
||||
+ DOOMWADDIR="$prefix/share/prboom"
|
||||
else
|
||||
- DOOMWADDIR="$ac_default_prefix/share/games/doom"
|
||||
+ DOOMWADDIR="$ac_default_prefix/share/prboom"
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -6814,7 +6814,7 @@ if test "${ac_cv_lib_png_png_create_info_struct+set}"
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lpng $LIBS"
|
||||
+LIBS="-lpng -lz $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -6874,7 +6874,7 @@ if test $ac_cv_lib_png_png_create_info_struct = yes; t
|
||||
#define HAVE_LIBPNG 1
|
||||
_ACEOF
|
||||
|
||||
- LIBS="-lpng $LIBS"
|
||||
+ LIBS="-lpng -lz $LIBS"
|
||||
|
||||
fi
|
||||
|
17
games/prboom/patches/patch-configure_ac
Normal file
17
games/prboom/patches/patch-configure_ac
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.1 2017/09/28 23:12:48 naddy Exp $
|
||||
|
||||
Index: configure.ac
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -26,9 +26,9 @@ fi
|
||||
AC_ARG_WITH(waddir,AC_HELP_STRING([--with-waddir],[Path to install prboom.wad and look for other WAD files]),
|
||||
DOOMWADDIR="$withval",
|
||||
if test "x$prefix" != xNONE; then
|
||||
- DOOMWADDIR="$prefix/share/games/doom"
|
||||
+ DOOMWADDIR="$prefix/share/prboom"
|
||||
else
|
||||
- DOOMWADDIR="$ac_default_prefix/share/games/doom"
|
||||
+ DOOMWADDIR="$ac_default_prefix/share/prboom"
|
||||
fi
|
||||
)
|
||||
AC_DEFINE_UNQUOTED(DOOMWADDIR,"$DOOMWADDIR",[Define to be the path where Doom WADs are stored])
|
Loading…
x
Reference in New Issue
Block a user