aboutsummaryrefslogtreecommitdiffstats
path: root/lang/dmd2
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2015-11-15 03:54:37 +0800
committercy <cy@FreeBSD.org>2015-11-15 03:54:37 +0800
commitc50288c9ca8682761807842d8cd4b894aa7f10a0 (patch)
tree7052da713647a5a66bdde97d22bb267dd9b95e7d /lang/dmd2
parent914a0d8751a6901ee3081e24c7583d69acc5fe32 (diff)
downloadfreebsd-ports-gnome-c50288c9ca8682761807842d8cd4b894aa7f10a0.tar.gz
freebsd-ports-gnome-c50288c9ca8682761807842d8cd4b894aa7f10a0.tar.zst
freebsd-ports-gnome-c50288c9ca8682761807842d8cd4b894aa7f10a0.zip
Keep temporary build dirs within WRKDIR.
Don't include the results of post-patch in the patch file. Suggested by: bdrewery
Diffstat (limited to 'lang/dmd2')
-rw-r--r--lang/dmd2/Makefile6
-rw-r--r--lang/dmd2/files/patch-src__dmd__posix.mak68
2 files changed, 12 insertions, 62 deletions
diff --git a/lang/dmd2/Makefile b/lang/dmd2/Makefile
index 4ac030f01f12..737a22a971a4 100644
--- a/lang/dmd2/Makefile
+++ b/lang/dmd2/Makefile
@@ -4,6 +4,7 @@
PORTNAME= dmd
PKGNAMESUFFIX= 2
PORTVERSION= 2.069.1
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://ftp.digitalmars.com/
DISTNAME= dmd.${PORTVERSION}
@@ -14,6 +15,7 @@ COMMENT= D 2.0 compiler, not officially validated for FreeBSD
USES= gmake zip
MAKEFILE= posix.mak
MAKE_ARGS= AUTO_BOOTSTRAP=1
+MAKE_ENV+= WRKDIR=${WRKDIR}
EXAMPLESDIR= ${PREFIX}/share/examples/dmd2
DOCSDIR= ${PREFIX}/share/doc/dmd2
PORTDOCS= *.txt html/
@@ -51,7 +53,6 @@ MAKE_ARGS+= DEBUG_FLAGS=-g\ -DDEBUG=1\ -DUNITTEST
MODULEDIR= ${PREFIX}/include/d/phobos2
post-patch:
- @${RM} -r /tmp/.host_dmd-2.067.1
@${REINPLACE_CMD} -e "s|g++|${CXX}|" ${WRKSRC}/posix.mak
@${REINPLACE_CMD} -e "s|cc|${CC}|" ${WRKSRC}/../phobos/posix.mak
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|" \
@@ -88,7 +89,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${DOCSDIR}
cd ${WRKDIR}/dmd2 && ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR}
-post-clean:
- @${RM} -r /tmp/.host_dmd-2.067.1
-
.include <bsd.port.post.mk>
diff --git a/lang/dmd2/files/patch-src__dmd__posix.mak b/lang/dmd2/files/patch-src__dmd__posix.mak
index e51c104231cd..d7a18f927fcf 100644
--- a/lang/dmd2/files/patch-src__dmd__posix.mak
+++ b/lang/dmd2/files/patch-src__dmd__posix.mak
@@ -1,62 +1,14 @@
--- ../../src/dmd/posix.mak.orig 2015-11-11 02:36:12.000000000 -0800
-+++ ../../src/dmd/posix.mak 2015-11-14 08:20:14.138530978 -0800
-@@ -31,9 +31,9 @@
- endif
-
- #ifeq (osx,$(OS))
--# HOST_CC=clang++
-+# HOST_CC=clanc++
- #else
-- HOST_CC=g++
-+ HOST_CC=c++
- #endif
- CC=$(HOST_CC)
- AR=ar
-@@ -92,7 +92,7 @@
- -Wno-unused-value \
- -Wno-unused-variable
- # GCC Specific
--ifeq ($(HOST_CC), g++)
-+ifeq ($(HOST_CC), c++)
- WARNINGS := $(WARNINGS) \
- -Wno-logical-op \
- -Wno-narrowing \
-@@ -100,7 +100,7 @@
- -Wno-uninitialized
- endif
- # Clang Specific
--ifeq ($(HOST_CC), clang++)
-+ifeq ($(HOST_CC), clanc++)
- WARNINGS := $(WARNINGS) \
- -Wno-tautological-constant-out-of-range-compare \
- -Wno-tautological-compare \
-@@ -112,7 +112,7 @@
- # Default Warnings
- WARNINGS := -Wno-deprecated -Wstrict-aliasing
- # Clang Specific
--ifeq ($(HOST_CC), clang++)
-+ifeq ($(HOST_CC), clanc++)
- WARNINGS := $(WARNINGS) \
- -Wno-logical-op-parentheses \
- -Wno-dynamic-class-memaccess \
-@@ -130,7 +130,7 @@
- -D__pascal= -DMARS=1 -DTARGET_$(OS_UPCASE)=1 -DDM_TARGET_CPU_$(TARGET_CPU)=1 \
- $(MODEL_FLAG)
- # GCC Specific
--ifeq ($(HOST_CC), g++)
-+ifeq ($(HOST_CC), c++)
- CFLAGS := $(CFLAGS) \
- -std=gnu++98
- endif
-@@ -312,7 +312,7 @@
-
- ifneq (,$(AUTO_BOOTSTRAP))
- $(HOST_DMD_PATH):
-- mkdir -p ${HOST_DMD_ROOT}
-+ # mkdir -p ${HOST_DMD_ROOT}
- TMPFILE=$$(mktemp deleteme.XXXXXXXX) && curl -fsSL ${HOST_DMD_URL} > $${TMPFILE}.zip && \
- unzip -qd ${HOST_DMD_ROOT} $${TMPFILE}.zip && rm $${TMPFILE}.zip
- endif
++++ ../../src/dmd/posix.mak 2015-11-14 11:37:37.628381337 -0800
+@@ -57,7 +57,7 @@
+ else
+ # Auto-bootstrapping, will download dmd automatically
+ HOST_DMD_VER=2.067.1
+- HOST_DMD_ROOT=/tmp/.host_dmd-$(HOST_DMD_VER)
++ HOST_DMD_ROOT=${WRKDIR}/.host_dmd-$(HOST_DMD_VER)
+ # dmd.2.067.1.osx.zip or dmd.2.067.1.freebsd-64.zip
+ HOST_DMD_ZIP=dmd.$(HOST_DMD_VER).$(OS)$(if $(filter $(OS),freebsd),-$(MODEL),).zip
+ # http://downloads.dlang.org/releases/2.x/2.067.1/dmd.2.067.1.osx.zip
@@ -423,7 +423,7 @@
$(eval bin_dir=$(if $(filter $(OS),osx), bin, bin$(MODEL)))
mkdir -p $(INSTALL_DIR)/$(OS)/$(bin_dir)