[ldc] Newest version for special F17 feature

MERCIER Jonathan bioinfornatics at fedoraproject.org
Wed Dec 7 20:33:38 UTC 2011


commit 7450d879a328ba5d804ca9357afd98ff484fb417
Author: Jonathan MERCIER <bioinfornatics at gmail.com>
Date:   Wed Dec 7 21:33:28 2011 +0100

    Newest version for special F17 feature

 ldc.spec |  131 +++++++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 83 insertions(+), 48 deletions(-)
---
diff --git a/ldc.spec b/ldc.spec
index aa70d4a..ce5ffe1 100644
--- a/ldc.spec
+++ b/ldc.spec
@@ -1,8 +1,9 @@
-#%global debug_package %{nil}
-%global     snapdate        20110915
-%global     ldc_rev         423076d
-%global     phobos_rev      a8106d9
-%global     druntime_rev    fba10fa
+# debug info seem not works with D compiler
+%global     debug_package %{nil}
+%global     snapdate        20111206
+%global     ldc_rev         fa5fb92
+%global     phobos_rev      2bebc8f
+%global     druntime_rev    24e79c6
 %global     alphatag        %{snapdate}git%{ldc_rev}
 %global     phobostag       %{snapdate}git%{phobos_rev}
 %global     druntimetag     %{snapdate}git%{druntime_rev}
@@ -13,19 +14,16 @@
 # cd ldc/phobos; git rev-parse --short HEAD     -> for phobos_rev
 # cd ldc/druntime/;  git rev-parse --short HEAD -> for druntime_rev
 # git clone https://github.com/ldc-developers/ldc.git
-# (cd ldc; git checkout 423076d; git submodule init; git submodule update; \
-#  git archive --prefix=ldc-%%{alphatag}/ HEAD \
-# ) | xz > ldc-%%{alphatag}.xz
-# (cd ldc/druntime; \
-#  git archive --prefix=druntime/ HEAD \
-# ) | xz > ldc-druntime-%%{druntimetag}.xz
-# (cd ldc/phobos; \
-#  git archive --prefix=phobos/ HEAD \
-# ) | xz > ldc-phobos-%%{phobostag}.xz
+# cd ldc; git submodule update -i; git checkout %%ldc_rev  
+# git archive --prefix=ldc-%%{alphatag}/ HEAD | xz > ../ldc-%%{alphatag}.xz
+# cd runtime/druntime
+# git archive --prefix=runtime/druntime/ HEAD | xz > ../../../ldc-druntime-%%{druntimetag}.xz
+# cd ../phobos
+# git archive --prefix=runtime/phobos/ HEAD | xz > ../../../ldc-phobos-%%{phobostag}.xz
 
 Name:           ldc
 Version:        2
-Release:        4.%{alphatag}%{?dist}
+Release:        9.%{alphatag}%{?dist}
 Summary:        A compiler for the D programming language
 
 Group:          Development/Languages
@@ -33,15 +31,13 @@ Group:          Development/Languages
 # The files gen/asmstmt.cpp and gen/asm-*.hG PL version 2+ or artistic license
 License:        BSD    
 URL:            http://www.dsource.org/projects/ldc
-Source0:        %{name}-%{alphatag}.tar.xz
-Source1:        %{name}-phobos-%{phobostag}.tar.xz
-Source2:        %{name}-druntime-%{druntimetag}.tar.xz
+Source0:        %{name}-%{alphatag}.xz
+Source1:        %{name}-phobos-%{phobostag}.xz
+Source2:        %{name}-druntime-%{druntimetag}.xz
 Source3:        macros.%{name}
-# fix current build system report to upstream done
-Patch0:         %{name}_fix_build.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-#BuildRequires:  llvm-devel >= 2.9
+BuildRequires:  llvm-devel >= 3.0
 BuildRequires:  libconfig, libconfig-devel
 BuildRequires:  cmake
 BuildRequires:  gc, gcc-c++, gcc
@@ -96,6 +92,7 @@ démarage/extinction, etc
 Summary:        Support for developing D application
 Group:          Development/Tools
 Requires:       %{name} =  %{version}-%{release}
+Requires:       %{name}-druntime
 
 
 %description druntime-devel
@@ -131,6 +128,8 @@ situations, et les programmeurs doivent implémenter d'une certaines manière.
 Summary:        Support for developing D application
 Group:          Development/Tools
 Requires:       %{name} =  %{version}-%{release}
+Requires:       %{name}-phobos
+Requires:       %{name}-druntime-devel
 
 %description phobos-devel
 The phobos-devel package contains header files for developing D
@@ -140,75 +139,111 @@ applications that use phobos.
 Le paquet phobos-devel contient les fichiers d'entêtes pour développer
 des applications en D utilisant phobos.
 
+%package phobos-geany-tags
+Summary:        Support for enable autocompletion in geany
+Group:          Development/Tools
+Requires:       %{name} =  %{version}-%{release}
+BuildRequires:  geany
+Requires:       geany
+
+%description phobos-geany-tags
+Enable autocompletion for phobos library in geany (IDE)
+
+%description -l fr phobos-geany-tags
+Active l'autocompletion pour pour la bibliothèque phobos dans geany (IDE)
+
 %prep
 %setup -q -n %{name}-%{alphatag}
 %setup -q -T -D -a 1 -n %{name}-%{alphatag}
 %setup -q -T -D -a 2 -n %{name}-%{alphatag}
-%patch0 -p1 -b .fix
 find . -type f -exec sed -i 's/\r//g' {} \;
+# temp geany config directory for allow geany to generate tags
+mkdir geany_config
+# fix install
+# sed -i "81a \ \ \ \ file(COPY \${RUNTIME_DIR}/src/core/bitop.d DESTINATION \${PROJECT_BINARY_DIR}/import/core/ )" runtime/CMakeLists.txt
 
 %build
-%cmake  -DD_VERSION:STRING=2                        \
-        -DCONF_INST_DIR:PATH=%{_sysconfdir}         \
-        -DRUNTIME_DIR=./druntime                    \
-        -DPHOBOS2_DIR=./phobos                      \
-        -DD_FLAGS:STRING="-O2;-g;-w;-d;-release"    \
-        -DLLVM_CONFIG_HEADER=config-%{__isa_bits}.h \
-        -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
-        .
-make  VERBOSE=2 phobos2
+%cmake  -DMULTILIB:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON  -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d .
+make %{?_smp_mflags} VERBOSE=2 phobos2
+
+# generate geany tags
+geany -c geany_config -g phobos.d.tags $(find runtime/phobos/std -name "*.d")
 
 %install
 rm -rf %{buildroot}
 make %{?_smp_mflags} install DESTDIR=%{buildroot}
 mkdir -p %{buildroot}/%{_sysconfdir}/rpm
 mkdir -p %{buildroot}/%{_includedir}/d/ldc
+mkdir -p %{buildroot}/%{_datadir}/geany/tags/
+# macros for D package
 install --mode=0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.ldc
-
-sed -i \
-    -e      "10a \ \ \ \ \ \ \ \"-I%{_includedir}\/d\","        \
-    -e      "11a \ \ \ \ \ \ \ \"-I%{_includedir}\/d\/phobos\","\
-    -e      "12a \ \ \ \ \ \ \ \"-I%{_includedir}\/d\/ldc\","   \
-    -e      "/^.*-I.*%{name}-%{alphatag}.*$/d"                  \
-    -e      "s|-L-L.*lib|-L-L%{_libdir}/druntime.so|"       %{buildroot}/%{_sysconfdir}/ldc2.conf
-
-sed -i "s|DFLAGS.*|DFLAGS=-I%{_includedir}/d -L-L%{_libdir} -d-version=Phobos -defaultlib=phobos2 -debuglib=phobos2|" bin/ldc2.rebuild.conf
-
-ln %{buildroot}%{_bindir}/ldc2	%{buildroot}%{_bindir}/ldc
+# geany tags
+install -m0755 phobos.d.tags %{buildroot}/%{_datadir}/geany/tags/
 
 %clean
 rm -rf %{buildroot}
 
+%post               -p  /sbin/ldconfig
+%postun             -p  /sbin/ldconfig
+%post   druntime    -p  /sbin/ldconfig
+%postun druntime    -p  /sbin/ldconfig
+%post   phobos      -p  /sbin/ldconfig
+%postun phobos      -p  /sbin/ldconfig
+
 %files
 %defattr(-,root,root,-)
 %doc LICENSE readme.txt
 %config(noreplace)  %{_sysconfdir}/ldc2.rebuild.conf
 %config(noreplace)  %{_sysconfdir}/ldc2.conf
 %config             %{_sysconfdir}/rpm/macros.ldc
-%{_bindir}/ldc
+%{_sysconfdir}/bash_completion.d/ldc
 %{_bindir}/ldc2
 %{_bindir}/ldmd2
-%{_includedir}/d/core
 
 %files druntime
 %defattr(-,root,root,-)
-%doc druntime/LICENSE_1_0.txt druntime/README.txt
+%doc runtime/druntime/LICENSE_1_0.txt runtime/druntime/README.txt
 %{_libdir}/libdruntime-ldc.so
 
 %files druntime-devel
 %defattr(-,root,root,-)
 %{_includedir}/d/ldc
+%{_includedir}/d/core
 
 %files phobos
 %defattr(-,root,root,-)
-%doc phobos/LICENSE_1_0.txt
-%{_libdir}/liblphobos2.so
+%doc runtime/phobos/LICENSE_1_0.txt
+%{_libdir}/libphobos2-ldc.so
 
 %files phobos-devel
 %defattr(-,root,root,-)
-%{_includedir}/d/phobos
+%{_includedir}/d/crc32.d
+%{_includedir}/d/std
+%{_includedir}/d/etc
+
+%files phobos-geany-tags
+%defattr(-,root,root,-)
+%{_datadir}/geany/tags/phobos.d.tags
 
 %changelog
+* Wed Dec 6 2011  Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-8.20111206gitfa5fb92
+- Put %%{_d_includedir}/core into druntime-devel package
+
+* Wed Dec 6 2011  Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-8.20111206git641cc85
+- Update compiler to latest revision
+- Update runtime to latest revision
+- Update phobos to latest revision
+
+* Thu Dec 1 2011  Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-7.20111117git4add11b
+- Update to latest revision
+- fix dependencies
+
+* Sat Nov 9 2011 Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-6.20111112gitd9da872
+- Update to latest revision
+
+* Thu Nov 9 2011 Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-5.20110911git3cf958ad
+- Update to latest revision
+
 * Sat Sep 17 2011 Jonathan MERCIER <bioinfornatics at fedoraproject.org> - 2-4.20110915git423076d
 - Update to latest revision
 


More information about the scm-commits mailing list