From e1e19012517baf71ad2f4e6f30241e52eddd04496c6513cc0b463f0ed863403b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 23 Feb 2015 10:15:18 +0000 Subject: [PATCH] Accepting request 287234 from home:marc_schuetz:branches:home:dmacvicar Added patch explanation OBS-URL: https://build.opensuse.org/request/show/287234 OBS-URL: https://build.opensuse.org/package/show/devel:languages:D/ldc?expand=0&rev=1 --- .gitattributes | 23 ++++++++ .gitignore | 1 + ldc-0.15.1-src.tar.gz | 3 + ldc.changes | 5 ++ ldc.spec | 94 ++++++++++++++++++++++++++++++ workaround-buggy-llvm-config.patch | 10 ++++ 6 files changed, 136 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ldc-0.15.1-src.tar.gz create mode 100644 ldc.changes create mode 100644 ldc.spec create mode 100644 workaround-buggy-llvm-config.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ldc-0.15.1-src.tar.gz b/ldc-0.15.1-src.tar.gz new file mode 100644 index 0000000..c3819f7 --- /dev/null +++ b/ldc-0.15.1-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff7ea55309d678c20524779091617aa1d4bdbaa39e1a650927020fe1627f4b0f +size 4390290 diff --git a/ldc.changes b/ldc.changes new file mode 100644 index 0000000..a445f4e --- /dev/null +++ b/ldc.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Sun Feb 22 16:15:02 UTC 2015 - schuetzm@gmx.net + +- initial submission based on Duncan Mac-Vicar's work + diff --git a/ldc.spec b/ldc.spec new file mode 100644 index 0000000..a8caa89 --- /dev/null +++ b/ldc.spec @@ -0,0 +1,94 @@ +# +# spec file for package +# +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: ldc +Version: 0.15.1 +Release: 0 +License: BSD-3-Clause and Artistic-1.0 +Summary: The LLVM D Compiler +Url: https://github.com/ldc-developers/ldc +Group: Development/Languages/Other +Source0: ldc-0.15.1-src.tar.gz +# PATCH-FIX-OPENSUSE workaround-buggy-llvm-config.patch bnc#856691 +Patch1: workaround-buggy-llvm-config.patch +BuildRequires: libconfig++-devel +BuildRequires: llvm-devel >= 3.0 +BuildRequires: cmake +BuildRequires: llvm-clang +BuildRequires: zlib-devel +BuildRequires: ncurses-devel +Recommends: ldc-runtime-devel = %{version} +Recommends: ldc-phobos-devel = %{version} +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +LDC is an LLVM based compiler for the D programming language. It uses the +frontend of the reference compiler (DMD), thereby supporting the same language +features, but profits from LLVM's superior optimizing and code generation +capabilities. + +%package runtime-devel +Summary: Development files for the D runtime library + +%description runtime-devel +This package contains the druntime development files necessary for developing +with LDC. + +%package phobos-devel +Summary: Development files for the D standard library + +%description phobos-devel +This package contains the Phobos development files necessary for developing +with LDC. + +%prep +%setup -q -n ldc-0.15.1-src +%patch1 -p1 + +%build +mkdir build +pushd build +cmake -DD_VERSION=2 \ + -DSYSCONF_INSTALL_DIR=%{_sysconfdir} \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} .. +make %{?_smp_mflags} +popd + +%install +pushd build +%make_install +popd + +%files +%defattr(-,root,root) +%doc LICENSE README.md +%config %{_sysconfdir}/bash_completion.d/ldc +%config %{_sysconfdir}/ldc2.conf +%{_bindir}/ldc2 +%{_bindir}/ldmd2 + +%files runtime-devel +%defattr(-,root,root) +%{_prefix}/lib/libdruntime-ldc*.a* +%{_includedir}/d + +%files phobos-devel +%defattr(-,root,root) +%{_prefix}/lib/libphobos2-ldc*.a* + +%changelog + diff --git a/workaround-buggy-llvm-config.patch b/workaround-buggy-llvm-config.patch new file mode 100644 index 0000000..8f2f89f --- /dev/null +++ b/workaround-buggy-llvm-config.patch @@ -0,0 +1,10 @@ +--- ldc.orig/cmake/Modules/FindLLVM.cmake 2014-12-15 12:56:11.388035601 +0100 ++++ ldc/cmake/Modules/FindLLVM.cmake 2014-12-15 12:56:33.906841195 +0100 +@@ -130,6 +130,7 @@ + ${_quiet_arg} + ) + file(TO_CMAKE_PATH "${tmplibs}" tmplibs) ++ string(REGEX REPLACE "\\.a" ".so" tmplibs ${tmplibs}) + string(REGEX REPLACE "([$^.[|*+?()]|])" "\\\\\\1" pattern "${prefix}/") + string(REGEX MATCHALL "${pattern}[^ ]+" LLVM_${var} ${tmplibs}) + endmacro()