]> git.pld-linux.org Git - packages/ldc.git/commitdiff
New, version 1.27.1 auto/th/ldc-1.27.1-1
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 11 Aug 2021 09:28:52 +0000 (12:28 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 30 Aug 2021 16:20:41 +0000 (19:20 +0300)
Based on fedora pacakge, f4edfec

ldc-include-path.patch [new file with mode: 0644]
ldc-no-default-rpath.patch [new file with mode: 0644]
ldc.spec [new file with mode: 0644]
macros.ldc [new file with mode: 0644]

diff --git a/ldc-include-path.patch b/ldc-include-path.patch
new file mode 100644 (file)
index 0000000..493697a
--- /dev/null
@@ -0,0 +1,19 @@
+Description: Fix ldc.conf to search in right paths
+
+ ldc (1:1.1.0-2) unstable; urgency=medium
+ .
+   * Multiarch enable
+   * Install includes separately to avoid clash with gdc (Closes: #827211)
+Author: Konstantinos Margaritis <markos@debian.org>
+Bug-Debian: https://bugs.debian.org/827211
+
+--- a/ldc2_install.conf.in
++++ b/ldc2_install.conf.in
+@@ -23,6 +23,7 @@
+     // default switches appended after all explicit command-line switches
+     post-switches = [
+         "-I@INCLUDE_INSTALL_DIR@",
++        "-I/usr/include/d",
+     ];
+     // default directories to be searched for libraries when linking
+     lib-dirs = [
diff --git a/ldc-no-default-rpath.patch b/ldc-no-default-rpath.patch
new file mode 100644 (file)
index 0000000..064b35b
--- /dev/null
@@ -0,0 +1,14 @@
+Description:  Don't set a default rpath in global LDC configuration.
+Author: Matthias Klumpp <mak@debian.org>
+
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -247,7 +247,7 @@
+ # Default -rpath linker option when linking against shared libraries.
+ if(SHARED_LIBS_SUPPORTED)
+     set(SHARED_LIBS_RPATH         "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}")
+-    set(SHARED_LIBS_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
++    set(SHARED_LIBS_INSTALL_RPATH "")
+ endif()
+ # Only have either shared or static libs?
diff --git a/ldc.spec b/ldc.spec
new file mode 100644 (file)
index 0000000..f432f30
--- /dev/null
+++ b/ldc.spec
@@ -0,0 +1,204 @@
+#
+# Conditional build:
+%bcond_with    bootstrap               # bootstrap from pre-compiled binaries
+
+%define        bootstrap_version 1.27.1
+Summary:       LLVM D Compiler
+Name:          ldc
+Version:       1.27.1
+Release:       1
+# The DMD frontend in dmd/* GPL version 1 or artistic license
+# The files gen/asmstmt.cpp and gen/asm-*.hG PL version 2+ or artistic license
+License:       BSD
+Source0:       https://github.com/ldc-developers/ldc/releases/download/v%{version}/%{name}-%{version}-src.tar.gz
+# Source0-md5: 8f2f3b606f78350cc9f2ae75bebe1fa7
+Source1:       https://github.com/ldc-developers/ldc/releases/download/v%{bootstrap_version}/%{name}2-%{bootstrap_version}-linux-x86_64.tar.xz
+# Source1-md5: 1bc671b41ba59848e3d0ffe74c83fc7b
+Source3:       macros.%{name}
+Patch0:                %{name}-include-path.patch
+Patch1:                %{name}-no-default-rpath.patch
+URL:           https://github.com/ldc-developers/ldc
+BuildRequires: bash-completion
+BuildRequires: cmake
+BuildRequires: curl-devel
+BuildRequires: gc
+%{!?with_bootstrap:BuildRequires:      ldc}
+BuildRequires: libconfig-devel
+BuildRequires: libedit-devel
+BuildRequires: libstdc++-devel
+BuildRequires: llvm-devel >= 12
+BuildRequires: rpmbuild(macros) >= 2.008
+BuildRequires: zlib-devel
+ExclusiveArch: %{x8664}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define        dmdfe_major 2
+%define        dmdfe_minor 0
+%define        dmdfe_bump  97
+%define        dmdfe       %{dmdfe_major}.%{dmdfe_minor}.%{dmdfe_bump}
+
+# Unresolved symbols found: _D4core9exception6_storeG128v
+%define        skip_post_check_so libphobos2-ldc-debug-shared.so.*
+
+%description
+LDC is a portable compiler for the D programming language with modern
+optimization and code generation capabilities.
+
+It uses the official DMD compiler frontend to support the latest
+version of D, and relies on the LLVM Core libraries for code
+generation.
+
+%package druntime
+Summary:       Runtime library for D
+License:       Boost
+
+%description druntime
+Druntime is the minimum library required to support the D programming
+language. It includes the system code required to support the garbage
+collector, associative arrays, exception handling, array vector
+operations, startup/shutdown, etc.
+
+%description druntime -l fr
+Druntime est la bibliothèque minimal requise pour supporter la
+programmation en D. Est inclut le code système requis pour supporter
+le ramasse miette, tableau associatif, gestion des exceptions,
+opertation sur des vecteurs, démarage/extinction, etc
+
+%package phobos
+Summary:       Standard Runtime Library
+License:       Boost
+Requires:      %{name}-druntime = %{version}-%{release}
+
+%description phobos
+Each module in Phobos conforms as much as possible to the following
+design goals. These are goals rather than requirements because D is
+not a religion, it's a programming language, and it recognizes that
+sometimes the goals are contradictory and counterproductive in certain
+situations, and programmers have jobs that need to get done
+
+%description phobos -l fr
+Chaque module de Phobos est conforme autant que possible à la
+conception suivante objectifs. Ce sont des objectifs plutôt que des
+exigences car D n'est pas une religion, c'est un language de
+programmation, et il reconnaît que, parfois, les objectifs sont
+contradictoires et contre-productif dans certaines situations, et les
+programmeurs ont travail qui doit être effectué.
+
+%package phobos-geany-tags
+Summary:       Support for enable autocompletion in geany
+BuildRequires: geany
+Requires:      %{name} = %{version}-%{release}
+Requires:      geany
+BuildArch:     noarch
+
+%description phobos-geany-tags
+Enable autocompletion for phobos library in geany (IDE)
+
+%description phobos-geany-tags -l fr
+Active l'autocompletion pour pour la bibliothèque phobos dans geany
+(IDE)
+
+%prep
+%setup -q -n %{name}-%{version}-src
+%patch0 -p1
+%patch1 -p1
+
+# temp geany config directory for allow geany to generate tags
+install -d geany_config
+
+%if %{with bootstrap}
+set -- *
+install -d build-bootstrap2
+cp -al "$@" build-bootstrap2
+tar xf %{SOURCE1}
+mv ldc2-%{bootstrap_version}-linux-x86_64 build-bootstrap1
+%endif
+
+%build
+%if %{with bootstrap}
+cd build-bootstrap2
+%cmake \
+       -S .. \
+       -B build \
+       -DD_COMPILER:PATH=$(pwd)/../build-bootstrap1/bin/ldmd2 \
+       %{nil}
+%{__cmake} --build build
+cd ..
+%endif
+
+%cmake \
+       -B build \
+       -DMULTILIB:BOOL=OFF \
+       -DINCLUDE_INSTALL_DIR:PATH=%{_prefix}/lib/ldc/%{_target_platform}/include/d \
+       -DBASH_COMPLETION_COMPLETIONSDIR:PATH=%{_datadir}/bash-completion/completions \
+%if %{with bootstrap}
+       -DD_COMPILER:PATH=$(pwd)/build-bootstrap2/build/bin/ldmd2 \
+%endif
+       %{nil}
+
+%{__cmake} --build build
+
+# generate geany tags
+geany -c geany_config -g phobos.d.tags $(find runtime/phobos/std -name "*.d")
+
+%install
+rm -rf $RPM_BUILD_ROOT
+DESTDIR="$RPM_BUILD_ROOT" %{__cmake} --install build
+
+# macros for D package
+install -d $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/
+install --mode=0644 %{SOURCE3} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.ldc
+
+# geany tags
+install -d $RPM_BUILD_ROOT%{_datadir}/geany/tags/
+cp -p phobos.d.tags $RPM_BUILD_ROOT%{_datadir}/geany/tags/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldc2.conf
+%attr(755,root,root) %{_bindir}/ldc2
+%attr(755,root,root) %{_bindir}/ldmd2
+%attr(755,root,root) %{_bindir}/ldc-build-runtime
+%attr(755,root,root) %{_bindir}/ldc-profdata
+%attr(755,root,root) %{_bindir}/ldc-prune-cache
+%{_rpmconfigdir}/macros.d/macros.ldc
+%dir %{_prefix}/lib/ldc
+%dir %{_prefix}/lib/ldc/%{_target_platform}
+%dir %{_prefix}/lib/ldc/%{_target_platform}/include
+%dir %{_prefix}/lib/ldc/%{_target_platform}/include/d
+%{_prefix}/lib/ldc/%{_target_platform}/include/d/core
+%{_prefix}/lib/ldc/%{_target_platform}/include/d%{_sysconfdir}
+%{_prefix}/lib/ldc/%{_target_platform}/include/d/ldc
+%{_prefix}/lib/ldc/%{_target_platform}/include/d/object.d
+%{_prefix}/lib/ldc/%{_target_platform}/include/d/std
+%{_libdir}/libdruntime-ldc-debug-shared.so
+%{_libdir}/libdruntime-ldc-shared.so
+%{_libdir}/libphobos2-ldc-debug-shared.so
+%{_libdir}/libphobos2-ldc-shared.so
+%dir %{_datadir}/bash-completion
+%dir %{bash_compdir}
+%{bash_compdir}/ldc2
+
+%files druntime
+%defattr(644,root,root,755)
+%doc runtime/druntime/README.md runtime/README runtime/druntime/LICENSE.txt
+%{_libdir}/libdruntime-ldc-debug-shared.so.%{dmdfe}
+%{_libdir}/libdruntime-ldc-debug-shared.so.%{dmdfe_bump}
+%{_libdir}/libdruntime-ldc-shared.so.%{dmdfe}
+%{_libdir}/libdruntime-ldc-shared.so.%{dmdfe_bump}
+
+%files phobos
+%defattr(644,root,root,755)
+%doc runtime/phobos/LICENSE_1_0.txt
+%{_libdir}/libphobos2-ldc-debug-shared.so.%{dmdfe}
+%{_libdir}/libphobos2-ldc-debug-shared.so.%{dmdfe_bump}
+%{_libdir}/libphobos2-ldc-shared.so.%{dmdfe}
+%{_libdir}/libphobos2-ldc-shared.so.%{dmdfe_bump}
+
+%files phobos-geany-tags
+%defattr(644,root,root,755)
+%{_datadir}/geany/tags/phobos.d.tags
diff --git a/macros.ldc b/macros.ldc
new file mode 100644 (file)
index 0000000..ae4b901
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# RPM macros for D applications.
+#
+# Include directory where all .di or .d file are installed.
+%_d_includedir %{_includedir}/d
+# Compile options for ldc and make file
+%_d_optflags -release -w -g -O1
+# Lib directory path
+%_d_libdir %{_libdir}/d/
This page took 0.157083 seconds and 4 git commands to generate.