Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 8161194d68665648b93389adb333e741ba230497 authored by Mohammad Akhlaghi on 22 May 2023, 22:44:20 UTC, committed by Mohammad Akhlaghi on 23 May 2023, 06:42:11 UTC
Configuration: portability fixes in Less and WCSLIB
SUMMARY: no change is necessary in your project, unless you use the Fortran
features of WCSLIB in your project.

Until now, there were two compilation failures on recent macOS computers
with an M1 CPU: Less would crash because it couldn't find the relevant PCRE
(perl-compatible regular expression) libraries and WCSLIB would crash
because the LLVM compiler's Fortran features could not be built.

With this commit, both issues have been fixed by disabling the relevant
feature. Extensive comments have been placed in both places in case your
project needs these features, so please see the comments in the relevant
part of 'reproduce/software/make/basic.mk' for Less and
'reproduce/software/make/high-level.mk' for WCSLIB. In fact the previous
solution (where we would not have Fortran features in WCSLIB on macOS
systems was problematic and non-reproducibile (the features of WCSLIB
depended on the operating system!).

Another minor change was that for macOS, we now directly use the
version-string of WCSLIB to fix the internal linking issue there. As a
result, WCSLIB is no longer a "Version-dependent build" software (in
'reproduce/software/config/versions.conf'). Recall that these are software
that when changing the version, it is also necessary to inspect their build
recipe.

These two issues and their fix were discovered and fixed with the help of
James Robinson.
1 parent 644a236
  • Files
  • Changes
  • 8a3a871
  • /
  • tex
  • /
  • src
  • /
  • preamble-biblatex.tex
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:8161194d68665648b93389adb333e741ba230497
directory badge
swh:1:dir:728fa003707ac2adc40d597801c4c666578b3977
content badge
swh:1:cnt:fd4bf9df3eff39fc7c0c91ebfeb90c6b2515e9df

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
preamble-biblatex.tex
%% Biblatex settings.
%%
%% Settings necessary to make the bibliography with Biblatex. Keeping all
%% BibLaTeX settings in a separate preamble was done in the spirit of
%% modularity to 1) easily managable, 2) If a similar BibLaTeX
%% configuration is necessary in another LaTeX compilation, this file can
%% just be copied there and used.
%%
%% USAGE:
%%  - 'tex/src/references.tex': the file containing Bibtex source of each
%%     reference. The file suffix doesn't have to be '.bib'. This naming
%%     helps in clearly identifying the files and avoiding places that
%%     complain about '.bib' files.
%
%% Copyright (C) 2018-2023 Mohammad Akhlaghi <mohammad@akhlaghi.org>
%
%% This file is free software: you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by the
%% Free Software Foundation, either version 3 of the License, or (at your
%% option) any later version.
%
%% This file is distributed in the hope that it will be useful, but WITHOUT
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%% for more details.
%
%% You should have received a copy of the GNU General Public License along
%% with this file.  If not, see <http://www.gnu.org/licenses/>.




%% To break up highlighted text (for example texttt when some it is on the
%% line break) and also to no underline emphasized words (like journal
%% titles in the references).
\usepackage[normalem]{ulem}





%% For quotation signs (sometimes used by BibLaTeX)
\usepackage{csquotes}





%% To define colors
\usepackage{xcolor}





% Basic BibLaTeX settings
\usepackage[
    doi=false,
    url=false,
    dashed=false,
    eprint=false,
    maxbibnames=2,
    minbibnames=1,
    hyperref=true,
    maxcitenames=2,
    mincitenames=1,
    giveninits=true,
    style=authoryear,
    uniquelist=false,
    backend=biber,natbib]{biblatex}
\DeclareFieldFormat[article]{pages}{#1}
\DeclareFieldFormat{pages}{\mkfirstpage[{\mkpageprefix[bookpagination]}]{#1}}
\addbibresource{tex/src/references.tex}
\addbibresource{tex/build/macros/dependencies-bib.tex}
\renewbibmacro{in:}{}
\AtEveryBibitem{\clearfield{month}}
\renewcommand*{\bibfont}{\footnotesize}
\DefineBibliographyStrings{english}{references = {References}}

%% Include the adsurl field key into those that are recognized:
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=adsurl,fieldtarget=iswc]
      \step[fieldsource=gbkurl,fieldtarget=iswc]
    }
  }
}

%% Set the color of the doi link to mymg (magenta) and the ads links
%% to mypurp (or purple):
\definecolor{mypurp}{cmyk}{0.75,1,0,0}
\newcommand{\doihref}[2]{\href{#1}{\color{magenta}{#2}}}
\newcommand{\adshref}[2]{\href{#1}{\color{mypurp}{#2}}}
\newcommand{\blackhref}[2]{\href{#1}{\color{black}{#2}}}

%% Define a format for the printtext commands in
%% DeclareBibliographyDriver to make links for the doi, ads link and
%% arxiv link:
\DeclareFieldFormat{doilink}{
  \iffieldundef{doi}{#1}{\doihref{http://dx.doi.org/\thefield{doi}}{#1}}}
\DeclareFieldFormat{adslink}{
    \iffieldundef{iswc}{#1}{\adshref{\thefield{iswc}}{#1}}}
\DeclareFieldFormat{arxivlink}{
  \iffieldundef{eprint}{#1}{\href{http://arxiv.org/abs/\thefield{eprint}}{#1}}}

\DeclareListFormat{doiforbook}{
  \iffieldundef{doi}{#1}{\doihref{http://dx.doi.org/\thefield{doi}}{#1}}}
\DeclareFieldFormat{googlebookslink}{
    \iffieldundef{iswc}{#1}{\adshref{\thefield{iswc}}{#1}}}

%% Set the formatting to make the last three values into the
%% appropriate link. Note that the % signs are necessary. Without
%% them, the items will be indented.
\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \newunit%
  \ifdefined\makethesis\printtext{\usebibmacro{title}}\fi%
  \newunit%
  \printtext[doilink]{\usebibmacro{journal}}%
  \addcomma%
  \printtext[adslink]{\printfield{volume}}%
  \addcomma%
  \printtext[arxivlink]{\printfield{pages}}%
  \addperiod%
}

\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \newunit%
  \printtext{\usebibmacro{title}}%
  \addperiod%
  \addspace%
  \printlist[doiforbook]{publisher}%
  \addcomma%
  \addspace%
  \printfield[googlebookslink]{edition}%
  \printtext{ ed.}%
  \addperiod%
}

%% In order to have et al. instead of et al.,:
\renewcommand*{\nameyeardelim}{\addspace}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API