aboutsummaryrefslogtreecommitdiffstats
path: root/lang/clang
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2010-10-10 20:54:12 +0800
committerbrooks <brooks@FreeBSD.org>2010-10-10 20:54:12 +0800
commit173e51ff7bf9b0ec384550e128c9bf3589190b89 (patch)
tree81680442dfc69d27a2290d6c821388b7d231e667 /lang/clang
parent8bfe3075263d0bff2e32b1b5cb3f0c364a4e8b95 (diff)
downloadfreebsd-ports-gnome-173e51ff7bf9b0ec384550e128c9bf3589190b89.tar.gz
freebsd-ports-gnome-173e51ff7bf9b0ec384550e128c9bf3589190b89.tar.zst
freebsd-ports-gnome-173e51ff7bf9b0ec384550e128c9bf3589190b89.zip
Fix build when older versions are installed.
Submitted by: ports/151337
Diffstat (limited to 'lang/clang')
-rw-r--r--lang/clang/Makefile10
-rw-r--r--lang/clang/files/patch-Makefile.rules26
2 files changed, 5 insertions, 31 deletions
diff --git a/lang/clang/Makefile b/lang/clang/Makefile
index cbef6f9d0e8f..c6a52b1f4050 100644
--- a/lang/clang/Makefile
+++ b/lang/clang/Makefile
@@ -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:
diff --git a/lang/clang/files/patch-Makefile.rules b/lang/clang/files/patch-Makefile.rules
deleted file mode 100644
index 4c4c1bfcdd44..000000000000
--- a/lang/clang/files/patch-Makefile.rules
+++ /dev/null
@@ -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)