---- dmd2/src/phobos/posix.mak.orig 2014-02-24 05:23:10.000000000 +0100
-+++ dmd2/src/phobos/posix.mak 2014-03-21 19:46:59.187698023 +0100
-@@ -147,7 +147,7 @@
+--- dmd2/src/phobos/posix.mak.orig 2015-04-25 05:20:30.000000000 +0200
++++ dmd2/src/phobos/posix.mak 2015-07-22 15:28:25.126243307 +0200
+@@ -160,7 +160,7 @@
PATHSEP:=$(shell echo "\\")
endif
# Set VERSION, where the file is that contains the version string
VERSION=../dmd/VERSION
-@@ -236,8 +236,6 @@
+@@ -262,7 +262,7 @@
# Aggregate all C files over all OSs (this is for the zip file)
ALL_C_FILES = $(C_FILES) $(C_EXTRAS)
-OBJS = $(addsuffix $(DOTOBJ),$(addprefix $(ROOT)/,$(C_MODULES)))
--
- MAKEFILE = $(firstword $(MAKEFILE_LIST))
-
- SUBMAKE = $(MAKE) --no-print-directory OS=$(OS) -f $(MAKEFILE)
-@@ -274,8 +272,8 @@
- @[ -d $(dir $@) ] || mkdir -p $(dir $@) || [ -d $(dir $@) ]
- $(CC) -c $(CFLAGS) $< -o$@
++OBJS =
--$(LIB) : $(OBJS) $(ALL_D_FILES) druntime_libs
-- $(DMD) $(DFLAGS) -lib -of$@ $(DRUNTIME) $(D_FILES) $(OBJS)
-+$(LIB) : $(ALL_D_FILES) druntime_libs
-+ $(DMD) $(DFLAGS) -lib -of$@ $(DRUNTIME) $(D_FILES)
-
- dll : $(ROOT)/libphobos2.so
+ MAKEFILE = $(firstword $(MAKEFILE_LIST))
---- dmd2/tools/posix.mak.orig 2014-02-13 16:09:46.000000000 +0100
-+++ dmd2/tools/posix.mak 2014-03-22 10:01:55.092212006 +0100
-@@ -102,7 +102,7 @@
- #dreadful custom step because of libcurl dmd linking problem (Bugzilla 7044)
- $(CURL_TOOLS): $(ROOT)/%: %.d
- $(DMD) -c -of$(@).o $(<)
-- ($(DMD) -v -of$(@) $(@).o 2>/dev/null | grep '\-Xlinker' | cut -f2- -d' ' ; echo -lcurl ) | xargs $(CC)
-+ ($(DMD) -v -of$(@) $(@).o 2>/dev/null | grep '\-Xlinker' | cut -f2- -d' ' ; echo -lcurl -lz) | xargs $(CC)
+--- dmd2/tools/posix.mak.orig 2015-07-21 22:13:45.308848546 +0200
++++ dmd2/tools/posix.mak 2015-07-22 15:29:39.346240185 +0200
+@@ -103,7 +103,7 @@
+ $(DMD) $(MODEL_FLAG) $(DFLAGS) -c -of$(@).o $(<)
+ # grep for the linker invocation and append -lcurl
+ LINKCMD=$$($(DMD) $(MODEL_FLAG) $(DFLAGS) -v -of$(@) $(@).o 2>/dev/null | grep $(@).o); \
+- $${LINKCMD} -lcurl
++ $${LINKCMD} -lcurl -lz
$(TOOLS) $(DOC_TOOLS): $(ROOT)/%: %.d
$(DMD) $(MODEL_FLAG) $(DFLAGS) -of$(@) $(<)
#
# Conditional build:
-%bcond_with dynamic # dynamic linking with libphobos (doesn't work properly as of 2.065.0)
+%bcond_with bootstrap # bootstrap using upstream binaries
+%bcond_with dynamic # dynamic linking with libphobos (doesn't work properly as of 2.065.0)
#
Summary: Digital Mars D compiler
Summary(pl.UTF-8): Digital Mars D - kompilator języka D
Name: dmd
-Version: 2.065.0
+Version: 2.070.2
Release: 1
# Digital Mars is proprietary license (not redistributable)
-License: Boost v1.0 (D runtime, Phobos, tools), GPL v1+ or Artistic (compiler frontend), Digital Mars (the rest)
+License: Boost v1.0 (D runtime, Phobos, tools), GPL v1+ or Artistic (frontend), Digital Mars (backend)
Group: Development/Languages
-Source0: http://downloads.dlang.org/releases/2014/%{name}.%{version}.zip
-# NoSource0-md5: a17a699a7e4715658393819e9dc1814a
+Source0: http://downloads.dlang.org/releases/2.x/%{version}/%{name}.%{version}.linux.tar.xz
+# NoSource0-md5: 309e6968abb813a654d24ba43aba832f
Source1: https://github.com/D-Programming-Language/tools/archive/v%{version}/d-tools-%{version}.tar.gz
-# Source1-md5: d6b0b7a2a6b90a1374202c7582fc38e7
+# Source1-md5: 8e664bb5b8849b373a210b6ebff27633
Patch0: %{name}-system-zlib.patch
-Patch1: %{name}-shared.patch
+Patch1: %{name}-opt.patch
+Patch2: %{name}-shared.patch
NoSource: 0
URL: http://dlang.org/dmd-linux.html
BuildRequires: curl-devel
+%{!?with_bootstrap:BuildRequires: dmd >= 2.068.2}
BuildRequires: libstdc++-devel
BuildRequires: zlib-devel
%if %{with dynamic}
%{__mv} tools-%{version} tools
%patch0 -p1
-%{?with_dynamic:%patch1 -p1}
+%patch1 -p1
+%{?with_dynamic:%patch2 -p1}
echo "%{version}" > src/dmd/VERSION
TARGET_CPU=X86 \
MODEL=%{model} \
HOST_CC="%{__cxx}" \
- GFLAGS='%{rpmcxxflags} $(WARNINGS) -D__pascal= -fno-exceptions'
+ %{?with_bootstrap:HOST_DMD=$(pwd)/linux/bin%{model}/dmd} \
+ CXXOPTFLAGS="%{rpmcxxflags}"
DMD=$(pwd)/src/dmd/dmd
-for t in target lib/libdruntime-linux%{model}.so ; do
-%{__make} -C src/druntime -f posix.mak $t \
+
+%{__make} -C src/druntime -f posix.mak \
OS=linux \
MODEL=%{model} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -m%{model} -fPIC" \
+ CFLAGS="%{rpmcflags} -m%{model} -fPIC -DHAVE_UNISTD_H" \
DMD="$DMD" \
PIC="-fPIC"
-done
%{__make} -C src/phobos -f posix.mak \
OS=linux \
MODEL=%{model} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -m%{model} -fPIC" \
+ CFLAGS="%{rpmcflags} -m%{model} -fPIC -DHAVE_UNISTD_H" \
DMD="$DMD" \
LIBCURL_STUB= \
PIC="-fPIC"
OS=linux \
MODEL=%{model} \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -m%{model} -fPIC" \
- DMD="$DMD -I$(pwd)/src/phobos -I$(pwd)/src/druntime -L-L$(pwd)/src/phobos/generated/linux/release/%{model}"
+ DMD="$DMD -I$(pwd)/src/phobos -I$(pwd)/src/druntime/import -L-L$(pwd)/src/phobos/generated/linux/release/%{model}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_includedir}/d/dmd/phobos/etc/c,%{_libdir},%{_sysconfdir},%{_docdir}/dmd}
install -Dp src/dmd/dmd $RPM_BUILD_ROOT%{_bindir}/dmd
-cp -p src/druntime/lib/libdruntime-linux%{model}* $RPM_BUILD_ROOT%{_libdir}
+cp -p src/druntime/generated/linux/release/%{model}/libdruntime* $RPM_BUILD_ROOT%{_libdir}
cp -a src/phobos/generated/linux/release/%{model}/libphobos2.so* $RPM_BUILD_ROOT%{_libdir}
cp -p src/phobos/generated/linux/release/%{model}/libphobos2.a $RPM_BUILD_ROOT%{_libdir}
cp -pr src/druntime/import $RPM_BUILD_ROOT%{_includedir}/d/dmd/druntime
cp -pr src/phobos/{std,*.d} $RPM_BUILD_ROOT%{_includedir}/d/dmd/phobos
cp -p src/phobos/etc/c/*.d $RPM_BUILD_ROOT%{_includedir}/d/dmd/phobos/etc/c
-cp -pr src/druntime/doc $RPM_BUILD_ROOT%{_docdir}/dmd/druntime
install tools/generated/linux/%{model}/{ddemangle,rdmd} $RPM_BUILD_ROOT%{_bindir}
install -Dp man/man1/dmd.1 $RPM_BUILD_ROOT%{_mandir}/man1/dmd.1
install -Dp man/man5/dmd.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/dmd.conf.5
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libphobos2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libphobos2.so.0.65
+%attr(755,root,root) %{_libdir}/libphobos2.so.0.70.2
+%attr(755,root,root) %ghost %{_libdir}/libphobos2.so.0.70
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ddemangle
%attr(755,root,root) %{_bindir}/dmd
%attr(755,root,root) %{_bindir}/rdmd
-%if %{with dynamic}
%attr(755,root,root) %{_libdir}/libphobos2.so
-%attr(755,root,root) %{_libdir}/libdruntime-linux%{model}.so
-%endif
-%{_libdir}/libdruntime-linux%{model}so.a
-%{_libdir}/libdruntime-linux%{model}so.o
+%{_libdir}/libdruntime.so.a
+%{_libdir}/libdruntime.so.o
+%{_libdir}/libphobos2.so.0.70.o
%{_sysconfdir}/dmd.conf
%dir %{_includedir}/d
%{_includedir}/d/dmd
%files static
%defattr(644,root,root,755)
%endif
-%{_libdir}/libdruntime-linux%{model}.a
-%{_libdir}/libdruntime-linux%{model}.o
+%{_libdir}/libdruntime.a
%{_libdir}/libphobos2.a