stupid build system. unhardcode gcc/g++, get sqlite path in the right location.

force everything in the build system
This commit is contained in:
espie 2017-05-27 16:41:41 +00:00
parent a069190172
commit 45cf7647fd
3 changed files with 82 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.26 2016/10/01 12:58:18 stsp Exp $
# $OpenBSD: Makefile,v 1.27 2017/05/27 16:41:41 espie Exp $
BROKEN-hppa = ICE on dgn-shoals.cc:638
BROKEN-arm= tilegen.elf loops burning cpu
@ -16,9 +16,10 @@ PKGNAME= stone-soup-${VERSION}
WRKDIST = ${WRKDIR}/stone_soup-${VERSION}
WRKSRC = ${WRKDIST}/source
USE_GMAKE = Yes
CFLAGS += "-I${LOCALBASE}/include -I${LOCALBASE}/include/SDL2"
CXXFLAGS += "-I${LOCALBASE}/include -I${LOCALBASE}/include/SDL2"
MAKE_FLAGS = CC="${CC}" CXX="${CXX}" HOSTCXX="${CXX}" \
CFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/SDL2
CXXFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/SDL2
MAKE_FLAGS = CC="${CC}" GCC="${GCC}" GXX="${CXX}" \
CXX="${CXX}" HOSTCXX="${CXX}" \
LUA_INCLUDE_DIR=${MODLUA_INCL_DIR} \
LUA_LIB=${MODLUA_LIB} \
SQLITE_INCLUDE_DIR=${LOCALBASE}/include \
@ -26,14 +27,13 @@ MAKE_FLAGS = CC="${CC}" CXX="${CXX}" HOSTCXX="${CXX}" \
INSTALL_UGRP=root:wheel \
prefix=${PREFIX} \
SAVEDIR="~/.crawl" \
NO_YACC=1
NO_YACC=1 V=1
MAKE_ENV += MODLUA_DEP_VERSION=${MODLUA_DEP_VERSION}
MODGCC4_ARCHS = *
MODGCC4_LANGS = c++
MODULES = gcc4 lang/lua
WANT_CXX = base gcc
MODULES = lang/lua
MODLUA_VERSION = 5.1
WANTLIB = c m ${MODLUA_WANTLIB} sqlite3
WANTLIB = c m ${MODLUA_WANTLIB} sqlite3 ${LIBECXX}
BUILD_DEPENDS = graphics/pngcrush
LIB_DEPENDS = databases/sqlite3

View File

@ -1,7 +1,46 @@
$OpenBSD: patch-source_Makefile,v 1.3 2016/10/01 12:56:54 stsp Exp $
--- source/Makefile.orig Sat Apr 30 00:53:03 2016
+++ source/Makefile Thu Sep 29 00:59:04 2016
@@ -639,9 +639,9 @@ ifndef BUILD_LUA
$OpenBSD: patch-source_Makefile,v 1.4 2017/05/27 16:41:41 espie Exp $
Index: source/Makefile
--- source/Makefile.orig
+++ source/Makefile
@@ -215,9 +215,6 @@ ifdef msys
BUILD_LIBPNG = YesPlease
COPY_FONTS = yes
endif
- ifeq ($(shell gcc -v -static -static-libstdc++ 2>&1 | grep 'unrecognized option'),)
- EXTRA_LIBS += -static -static-libgcc -static-libstdc++
- endif
endif
ifeq ($(uname_S),Darwin)
STRIP := strip -x
@@ -325,11 +322,8 @@ endif
#
ifndef NO_APPLE_GCC
ifeq ($(uname_S),Darwin)
-ifneq ($(shell gcc -v 2>&1 | grep Apple),)
-APPLE_GCC = YesPlease
endif
endif
-endif
ifdef WIN32
@@ -511,15 +505,7 @@ ifneq ($(GCC_VER),)
GCC_VER_SUFFIX:=-$(GCC_VER)
endif
-# Attempt to use a full compiler name, to make
-# distcc builds work nicely.
-LMACH := $(shell gcc -dumpmachine)-
-ifeq ($(LMACH),-)
LMACH :=
-endif
-ifeq ($(shell which $(LMACH)gcc$(GCC_VER_SUFFIX) > /dev/null 2> /dev/null && echo "Yes"),)
-LMACH :=
-endif
ifneq ($(FORCE_CC),)
GCC := $(FORCE_CC)
@@ -639,9 +625,9 @@ ifndef BUILD_LUA
BUILD_LUA = yes
endif
else
@ -14,7 +53,7 @@ $OpenBSD: patch-source_Makefile,v 1.3 2016/10/01 12:56:54 stsp Exp $
BUILD_LUA = yes
else
ifeq ($(shell $(PKGCONFIG) lua --modversion | head -c 3),5.1)
@@ -651,16 +651,16 @@ ifndef BUILD_LUA
@@ -651,16 +637,16 @@ ifndef BUILD_LUA
endif
endif
else
@ -34,7 +73,16 @@ $OpenBSD: patch-source_Makefile,v 1.3 2016/10/01 12:56:54 stsp Exp $
endif
INCLUDES_L += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-I | sed -e 's/-I/-isystem /')
CFLAGS_L += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-other)
@@ -1122,51 +1122,6 @@ ifndef NO_OPTIMIZE
@@ -673,7 +659,7 @@ endif
ifndef BUILD_SQLITE
ifeq ($(shell grep -q sqlite3_prepare $(SQLITE_INCLUDE_DIR)/sqlite3.h 2>/dev/null && echo yes),yes)
- # INCLUDES_L += -isystem $(SQLITE_INCLUDE_DIR)
+ INCLUDES_L += -isystem $(SQLITE_INCLUDE_DIR)
LIBS += $(SQLITE_LIB)
ifneq ($(shell grep -q sqlite3_prepare_v2 $(SQLITE_INCLUDE_DIR)/sqlite3.h 2>/dev/null && echo yes),yes)
DEFINES_L += -DANCIENT_SQLITE
@@ -1122,51 +1108,6 @@ ifndef NO_OPTIMIZE
endif
endif
endif

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-source_rltiles_Makefile,v 1.3 2017/05/27 16:41:41 espie Exp $
Index: source/rltiles/Makefile
--- source/rltiles/Makefile.orig
+++ source/rltiles/Makefile
@@ -50,13 +50,7 @@ endif
# Attempt to use a full compiler name, to make
# distcc builds work nicely.
-LMACH := $(shell gcc -dumpmachine)-
-ifeq ($(LMACH),-)
LMACH :=
-endif
-ifeq ($(shell which $(LMACH)gcc > /dev/null 2> /dev/null && echo "Yes"),)
-LMACH :=
-endif
HOSTCXX ?= $(LMACH)g++
DELETE = rm -f