From 38870816c08e75e673aa5b3855d2a50db12e1f0ec4a4ffbfbc82ec1e89291375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=BCtz?= Date: Mon, 30 Jul 2018 11:15:55 +0000 Subject: [PATCH] Accepting request 626445 from home:elimat:branches:devel:languages:D - Remove _sysconfdir from phobos-devel filelist and add etc since its a d package name. spec-cleaner was to eager to clean. - Update so_ver to 80 for libdruntime-ldc and libphobos2-ldc to match version in 1.10.0 release of ldc. - Run spec-cleaner OBS-URL: https://build.opensuse.org/request/show/626445 OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=18 --- ldc.changes | 13 +++++++++ ldc.spec | 79 ++++++++++++++++++++++++----------------------------- 2 files changed, 49 insertions(+), 43 deletions(-) diff --git a/ldc.changes b/ldc.changes index 3b96244..9546f1a 100644 --- a/ldc.changes +++ b/ldc.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jul 30 09:55:27 UTC 2018 - matthias.eliasson@gmail.com + +- Remove _sysconfdir from phobos-devel filelist and add etc since its a + d package name. spec-cleaner was to eager to clean. + +------------------------------------------------------------------- +Sat Jul 28 14:03:46 UTC 2018 - matthias.eliasson@gmail.com + +- Update so_ver to 80 for libdruntime-ldc and libphobos2-ldc to + match version in 1.10.0 release of ldc. +- Run spec-cleaner + ------------------------------------------------------------------- Tue Jul 3 06:40:16 UTC 2018 - guillaume.gardet@opensuse.org diff --git a/ldc.spec b/ldc.spec index f73d621..0d56f6b 100644 --- a/ldc.spec +++ b/ldc.spec @@ -15,63 +15,62 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + +%define so_ver 80 +%define lname_runtime libdruntime-%{name} +%define lname_phobos libphobos2-%{name} %bcond_without ldc_bootstrap %bcond_with ldc_tests - Name: ldc Version: 1.10.0 Release: 0 Summary: The LLVM D Compiler License: BSD-3-Clause AND Artistic-1.0 Group: Development/Languages/Other -Url: https://wiki.dlang.org/LDC +URL: https://wiki.dlang.org/LDC Source0: https://github.com/ldc-developers/ldc/releases/download/v%{version}/ldc-%{version}-src.tar.gz Source1: %{name}-rpmlintrc Patch0: ldc-1.9.0-fix_arm_build.patch -%if %{with ldc_bootstrap} -# v0.17.5 is the last version buildable with a C++ compiler, so use it for bootstrapping -Source10: https://github.com/ldc-developers/ldc/releases/download/v0.17.5/ldc-0.17.5-src.tar.gz -Patch10: ldc-0.17.5-backport_pr_2315.patch -Patch11: ldc-0.17.5-add_support_to_LLVM6.patch -Patch12: ldc-0.17.5-add_missing_include.patch -Patch13: ldc-0.17.5-default-to-pic.patch -%endif BuildRequires: cmake -%if %{with ldc_tests} -BuildRequires: gcc-c++ -BuildRequires: gdb -%endif BuildRequires: help2man BuildRequires: libconfig++-devel BuildRequires: libcurl-devel BuildRequires: libstdc++-devel +BuildRequires: llvm-clang +BuildRequires: llvm-devel >= 3.7 +BuildRequires: ncurses-devel +BuildRequires: sqlite3-devel +BuildRequires: zlib-devel +# Should be installed, at least runtime +Recommends: ldc-phobos-devel = %{version} +Recommends: ldc-runtime-devel = %{version} +%if %{with ldc_bootstrap} +# v0.17.5 is the last version buildable with a C++ compiler, so use it for bootstrapping +Source10: https://github.com/ldc-developers/ldc/releases/download/v0.17.5/ldc-0.17.5-src.tar.gz +Patch10: ldc-0.17.5-backport_pr_2315.patch +Patch11: ldc-0.17.5-add_support_to_LLVM6.patch +Patch12: ldc-0.17.5-add_missing_include.patch +Patch13: ldc-0.17.5-default-to-pic.patch +%endif +%if %{with ldc_tests} +BuildRequires: gcc-c++ +BuildRequires: gdb +%endif %if %{without ldc_bootstrap} BuildRequires: ldc BuildRequires: ldc-phobos-devel BuildRequires: ldc-runtime-devel %endif -BuildRequires: llvm-clang -BuildRequires: llvm-devel >= 3.7 -BuildRequires: ncurses-devel %if %{with ldc_tests} BuildRequires: python %endif -BuildRequires: sqlite3-devel %if %{with ldc_tests} BuildRequires: timezone BuildRequires: unzip %endif -BuildRequires: zlib-devel -# Should be installed, at least runtime -Recommends: ldc-phobos-devel = %{version} -Recommends: ldc-runtime-devel = %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define so_ver 68 -%define lname_runtime libdruntime-%{name} -%define lname_phobos libphobos2-%{name} %if %{with ldc_bootstrap} # We cannot build v0.17.5 for aarch64 due to no aarch64 support in phobos, so bootstrap is impossible -ExcludeArch: aarch64 +ExcludeArch: aarch64 %endif %description @@ -91,7 +90,7 @@ The minimal runtime library required to support the D programming language. Summary: Development files for the D runtime library Group: Development/Libraries/Other Requires: %{lname_runtime}%{so_ver} = %{version} -Recommends: ldc-phobos-devel = %{version} +Recommends: ldc-phobos-devel = %{version} %description runtime-devel This package contains the druntime development files necessary for developing @@ -108,7 +107,7 @@ This package includes ldc's phobos library - The D standard library. Summary: Development files for the D standard library Group: Development/Libraries/Other Requires: %{lname_phobos}%{so_ver} = %{version} -Requires: %{name}-runtime-devel = %{version} +Requires: %{name}-runtime-devel = %{version} %description phobos-devel This package contains the Phobos development files necessary for developing @@ -133,13 +132,14 @@ pushd ldc-0.17.5-src #Needs to be compiled with clang, but opensuse_rules.cmake forces gcc so disable rule touch ./no-suse-rules mkdir build && pushd build +# FIXME: you should use %%cmake macros cmake \ -DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \ -DCMAKE_C_COMPILER="%{_bindir}/clang" \ -DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \ -DCMAKE_CXX_FLAGS="-std=c++11" \ - .. + .. make %{?_smp_mflags} popd popd @@ -154,13 +154,13 @@ touch no-suse-rules %if %{with ldc_bootstrap} -DD_COMPILER:PATH=`pwd`/../ldc-0.17.5-src/build/bin/ldmd2 \ %endif - -DCMAKE_CXX_FLAGS="-std=c++11" + -DCMAKE_CXX_FLAGS="-std=c++11" make %{?_smp_mflags} %if %{with ldc_tests} %check pushd build/ -make test +make %{?_smp_mflags} test popd %endif @@ -171,32 +171,27 @@ help2man %{buildroot}%{_bindir}/ldc2 > ldc2.1 && gzip ldc2.1 help2man %{buildroot}%{_bindir}/ldmd2 > ldmd2.1 && gzip ldmd2.1 install -d %{buildroot}%{_mandir}/man1 install -m 644 -t %{buildroot}%{_mandir}/man1/ ldmd2.1.gz ldc2.1.gz -rm -rf %{buildroot}/usr/lib/debug +rm -rf %{buildroot}%{_libexecdir}/debug %post -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig - %post -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig - %postun -n %{lname_runtime}%{so_ver} -p /sbin/ldconfig - %postun -n %{lname_phobos}%{so_ver} -p /sbin/ldconfig %files -%defattr(-,root,root) -%doc LICENSE README.md -%doc %{_mandir}/man1/*.1.gz +%license LICENSE +%doc README.md +%{_mandir}/man1/*.1%{?ext_man} %config %{_sysconfdir}/bash_completion.d/ldc2 %config %{_sysconfdir}/ldc2.conf %{_bindir}/ldc* %{_bindir}/ldmd2 %files -n %{lname_runtime}%{so_ver} -%defattr(-,root,root) %{_libdir}/%{lname_runtime}-shared.so.* %{_libdir}/%{lname_runtime}-debug-shared.so.* %files runtime-devel -%defattr(-,root,root) %{_libdir}/%{lname_runtime}-shared.so %{_libdir}/%{lname_runtime}-debug-shared.so %dir %{_includedir}/d @@ -204,12 +199,10 @@ rm -rf %{buildroot}/usr/lib/debug %{_includedir}/d/core %files -n %{lname_phobos}%{so_ver} -%defattr(-,root,root) %{_libdir}/%{lname_phobos}-shared.so.* %{_libdir}/%{lname_phobos}-debug-shared.so.* %files phobos-devel -%defattr(-,root,root) %{_libdir}/%{lname_phobos}-shared.so %{_libdir}/%{lname_phobos}-debug-shared.so %{_includedir}/d/std