1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00

Fix build when older versions are installed.

Submitted by:	ports/151337
This commit is contained in:
Brooks Davis 2010-10-10 12:54:12 +00:00
parent 51f6a67e06
commit bac710ec1e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262761
6 changed files with 15 additions and 93 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= clang
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
EXTRACT_SUFX= .tgz
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
BUILD_WRKSRC= ${WRKSRC}/tools/clang
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
.endif
@ -88,9 +89,8 @@ post-patch:
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
${WRKSRC}/tools/clang/tools/scan-view/scan-view
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
#do-build:
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
pre-build:
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
.if defined(NOPORTDOCS)
post-build:

View File

@ -1,26 +0,0 @@
$FreeBSD$
--- Makefile.rules.orig
+++ Makefile.rules
@@ -406,6 +406,7 @@
LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
+LLVMIncDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/include
LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
@@ -628,10 +629,10 @@
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
-CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
+CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) -I$(LLVMIncDir) \
$(patsubst %,-I%/include,\
$(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \
- $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \
+ $(LLVM_SRC_ROOT))) \
$(CPP.BaseFlags)
ifeq ($(BUILD_COMPONENT), 1)

View File

@ -7,6 +7,7 @@
PORTNAME= clang
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
EXTRACT_SUFX= .tgz
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
BUILD_WRKSRC= ${WRKSRC}/tools/clang
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
.endif
@ -88,9 +89,8 @@ post-patch:
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
${WRKSRC}/tools/clang/tools/scan-view/scan-view
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
#do-build:
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
pre-build:
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
.if defined(NOPORTDOCS)
post-build:

View File

@ -1,26 +0,0 @@
$FreeBSD$
--- Makefile.rules.orig
+++ Makefile.rules
@@ -406,6 +406,7 @@
LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
+LLVMIncDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/include
LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
@@ -628,10 +629,10 @@
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
-CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
+CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) -I$(LLVMIncDir) \
$(patsubst %,-I%/include,\
$(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \
- $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \
+ $(LLVM_SRC_ROOT))) \
$(CPP.BaseFlags)
ifeq ($(BUILD_COMPONENT), 1)

View File

@ -7,6 +7,7 @@
PORTNAME= clang
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
EXTRACT_SUFX= .tgz
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
BUILD_WRKSRC= ${WRKSRC}/tools/clang
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
.endif
@ -88,9 +89,8 @@ post-patch:
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
${WRKSRC}/tools/clang/tools/scan-view/scan-view
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
#do-build:
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
pre-build:
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
.if defined(NOPORTDOCS)
post-build:

View File

@ -1,26 +0,0 @@
$FreeBSD$
--- Makefile.rules.orig
+++ Makefile.rules
@@ -406,6 +406,7 @@
LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin
ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples
+LLVMIncDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/include
LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
@@ -628,10 +629,10 @@
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
-CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
+CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) -I$(LLVMIncDir) \
$(patsubst %,-I%/include,\
$(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \
- $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \
+ $(LLVM_SRC_ROOT))) \
$(CPP.BaseFlags)
ifeq ($(BUILD_COMPONENT), 1)