mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
Fix build when older versions are installed.
Submitted by: ports/151337
This commit is contained in:
parent
51f6a67e06
commit
bac710ec1e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=262761
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= clang
|
PORTNAME= clang
|
||||||
PORTVERSION= 2.8
|
PORTVERSION= 2.8
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= devel lang
|
CATEGORIES= devel lang
|
||||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||||
EXTRACT_SUFX= .tgz
|
EXTRACT_SUFX= .tgz
|
||||||
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
|||||||
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
|
|
||||||
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||||
.endif
|
.endif
|
||||||
@ -88,9 +89,8 @@ post-patch:
|
|||||||
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
||||||
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
||||||
|
|
||||||
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
|
pre-build:
|
||||||
#do-build:
|
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
|
||||||
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
|
|
||||||
|
|
||||||
.if defined(NOPORTDOCS)
|
.if defined(NOPORTDOCS)
|
||||||
post-build:
|
post-build:
|
||||||
|
@ -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)
|
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= clang
|
PORTNAME= clang
|
||||||
PORTVERSION= 2.8
|
PORTVERSION= 2.8
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= devel lang
|
CATEGORIES= devel lang
|
||||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||||
EXTRACT_SUFX= .tgz
|
EXTRACT_SUFX= .tgz
|
||||||
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
|||||||
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
|
|
||||||
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||||
.endif
|
.endif
|
||||||
@ -88,9 +89,8 @@ post-patch:
|
|||||||
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
||||||
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
||||||
|
|
||||||
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
|
pre-build:
|
||||||
#do-build:
|
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
|
||||||
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
|
|
||||||
|
|
||||||
.if defined(NOPORTDOCS)
|
.if defined(NOPORTDOCS)
|
||||||
post-build:
|
post-build:
|
||||||
|
@ -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)
|
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= clang
|
PORTNAME= clang
|
||||||
PORTVERSION= 2.8
|
PORTVERSION= 2.8
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= devel lang
|
CATEGORIES= devel lang
|
||||||
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
|
||||||
EXTRACT_SUFX= .tgz
|
EXTRACT_SUFX= .tgz
|
||||||
@ -28,8 +29,8 @@ WRKSRC= ${WRKDIR}/${LLVM_NAME}
|
|||||||
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
BUILD_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
INSTALL_WRKSRC= ${WRKSRC}/tools/clang
|
||||||
|
|
||||||
BUILD_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
BUILD_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
RUN_DEPENDS+= llvm-as:${PORTSDIR}/devel/llvm
|
RUN_DEPENDS+= llvm>=${PORTVERSION}:${PORTSDIR}/devel/llvm
|
||||||
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
.if defined(PACKAGE_BUILDING) || defined(MAINTAINER_MODE)
|
||||||
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
BUILD_DEPENDS+= runtest:${PORTSDIR}/misc/dejagnu
|
||||||
.endif
|
.endif
|
||||||
@ -88,9 +89,8 @@ post-patch:
|
|||||||
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
|
||||||
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
${WRKSRC}/tools/clang/tools/scan-view/scan-view
|
||||||
|
|
||||||
#@cd ${WRKSRC}/tools/clang && ${GMAKE} TBLGEN=/usr/local/bin/tblgen LLVM_OBJ_ROOT=/usr/local
|
pre-build:
|
||||||
#do-build:
|
${LN} -s ${LOCALBASE}/include/llvm/Intrinsics.gen ${WRKSRC}/include/llvm/
|
||||||
# @cd ${WRKSRC}/tools/clang && ${GMAKE} LLVMIncDir=/usr/local/include LLVMToolDir=/usr/local/bin LLVMLibDir=/usr/local/lib
|
|
||||||
|
|
||||||
.if defined(NOPORTDOCS)
|
.if defined(NOPORTDOCS)
|
||||||
post-build:
|
post-build:
|
||||||
|
@ -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)
|
|
Loading…
Reference in New Issue
Block a user