aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/basic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/software/make/basic.mk')
-rw-r--r--reproduce/software/make/basic.mk71
1 files changed, 51 insertions, 20 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index d1fbc3f..0bec163 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -18,18 +18,15 @@
# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org>
# Copyright (C) 2019-2020 Raul Infante-Sainz <infantesainz@gmail.com>
#
-# This Makefile 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 Makefile is part of Maneage. Maneage 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 Makefile 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.
-#
-# A copy of the GNU General Public License is available at
-# <http://www.gnu.org/licenses/>.
+# Maneage 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. See <http://www.gnu.org/licenses/>.
# Top level environment
@@ -159,14 +156,18 @@ tarballs = $(foreach t, bash-$(bash-version).tar.lz \
, $(tdir)/$(t) )
$(tarballs): $(tdir)/%: | $(lockdir)
- n=$$(echo $* | sed -e's/[0-9\-]/ /g' \
- -e's/\./ /g' \
+ # Remove the version numbers and suffix from the tarball name so we
+ # can search more easily only with the program name. This requires
+ # the first character of the version to be a digit: packages such
+ # as `foo' and `foo-3' will not be distinguished, but `foo' and
+ # `foo2' will be distinguished.
+ n=$$(echo $* | sed -e's/-[0-9]/ /' -e's/\./ /g' \
| awk '{print $$1}' ); \
\
mergenames=1; \
if [ $$n = bash ]; then c=$(bash-checksum); w=http://akhlaghi.org/maneage-software; \
elif [ $$n = binutils ]; then c=$(binutils-checksum); w=http://ftp.gnu.org/gnu/binutils; \
- elif [ $$n = bzip ]; then c=$(bzip2-checksum); w=http://akhlaghi.org/maneage-software; \
+ elif [ $$n = bzip2 ]; then c=$(bzip2-checksum); w=http://akhlaghi.org/maneage-software; \
elif [ $$n = cert ]; then c=$(cert-checksum); w=http://akhlaghi.org/maneage-software; \
elif [ $$n = coreutils ]; then c=$(coreutils-checksum); w=http://ftp.gnu.org/gnu/coreutils;\
elif [ $$n = curl ]; then c=$(curl-checksum); w=https://curl.haxx.se/download; \
@@ -184,7 +185,7 @@ $(tarballs): $(tdir)/%: | $(lockdir)
elif [ $$n = libiconv ]; then c=$(libiconv-checksum); w=https://ftp.gnu.org/pub/gnu/libiconv; \
elif [ $$n = libtool ]; then c=$(libtool-checksum); w=http://ftp.gnu.org/gnu/libtool; \
elif [ $$n = lzip ]; then c=$(lzip-checksum); w=http://download.savannah.gnu.org/releases/lzip; \
- elif [ $$n = m ]; then \
+ elif [ $$n = m4 ]; then \
mergenames=0; \
c=$(m4-checksum); \
w=http://akhlaghi.org/maneage-software/m4-1.4.18-patched.tar.gz; \
@@ -199,7 +200,7 @@ $(tarballs): $(tdir)/%: | $(lockdir)
c=$(perl-checksum); \
v=$$(echo $(perl-version) | sed -e's/\./ /g' | awk '{printf("%d.0", $$1)}'); \
w=https://www.cpan.org/src/$$v; \
- elif [ $$n = pkg ]; then c=$(pkgconfig-checksum); w=http://pkg-config.freedesktop.org/releases; \
+ elif [ $$n = pkg-config ]; then c=$(pkgconfig-checksum); w=http://pkg-config.freedesktop.org/releases; \
elif [ $$n = readline ]; then c=$(readline-checksum); w=http://ftp.gnu.org/gnu/readline; \
elif [ $$n = sed ]; then c=$(sed-checksum); w=http://ftp.gnu.org/gnu/sed; \
elif [ $$n = tar ]; then c=$(tar-checksum); w=http://ftp.gnu.org/gnu/tar; \
@@ -804,6 +805,14 @@ $(ibidir)/openssl: $(tdir)/cert.pem \
# environment variable.
#
# https://wiki.openssl.org/index.php/Compilation_and_Installation
+ #
+ # Bug 58263 (https://savannah.nongnu.org/bugs/?58263): In OpenSSL
+ # Version 1.1.1a (also checked in 1.1.1g), `openssl/ec.h' fails to
+ # include `openssl/openconf.h' on some OSs. The SED hack below
+ # inserts a hardwired element of `openssl/openconf.h' that is
+ # needed to include sections of code `f` that are deprecated in
+ # 1.2.0, but not yet in 1.1.1. This problem may be solved in
+ # version 1.2.x, so please check again in that bug.
if [ x$(on_mac_os) = xyes ]; then \
export KERNEL_BITS=64; \
copt="shared no-ssl2 no-ssl3 enable-ec_nistp_64_gcc_128"; \
@@ -816,6 +825,9 @@ $(ibidir)/openssl: $(tdir)/cert.pem \
--with-zlib-lib=$(ildir) \
--with-zlib-include=$(idir)/include, \
-j$(numthreads), , ./config ) \
+ && mv -v $(idir)/include/openssl/ec.h $(idir)/include/openssl/ec.h.orig \
+ && sed -e 's,\(# include .openssl/opensslconf\.h.\),\1\n#ifndef DEPRECATEDIN_1_2_0\n#define DEPRECATEDIN_1_2_0(f) f;\n#endif\n,' \
+ $(idir)/include/openssl/ec.h.orig > $(idir)/include/openssl/ec.h \
&& cp $(tdir)/cert.pem $(idir)/etc/ssl/cert.pem \
&& if [ $$? = 0 ]; then \
if [ x$(on_mac_os) = xyes ]; then \
@@ -1296,8 +1308,8 @@ $(ibidir)/gcc: | $(ibidir)/binutils \
tar xf $(word 1,$(filter $(tdir)/%,$|)); \
if [ $$odir != $(ddir) ]; then \
ln -s $$odir/gcc-$(gcc-version) $(ddir)/gcc-$(gcc-version); \
- fi \
- && cd gcc-$(gcc-version) \
+ fi; \
+ if cd gcc-$(gcc-version) \
&& mkdir build \
&& cd build \
&& ../configure SHELL=$(ibdir)/bash \
@@ -1346,6 +1358,25 @@ $(ibidir)/gcc: | $(ibidir)/binutils \
rm -rf $$odir; \
rm $(ddir)/gcc-$(gcc-version); \
fi \
- && ln -sf $(ibdir)/gcc $(ibdir)/cc \
- && echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
+ && ln -sf $(ibdir)/gcc $(ibdir)/cc; \
+ then \
+ echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
+ else echo; echo; echo; \
+ echo "_________________________________________________"; \
+ echo "!!!!!!!! Warning from Maneage !!!!!!!!"; \
+ echo; \
+ echo "Unfortunately building of GCC failed on this system!"; \
+ echo "Can you please copy the last ~500 lines above and post it"; \
+ echo "as a bug here (as an attached file):"; \
+ echo " https://sv.nongnu.org/support/?func=additem&group=reproduce"; \
+ echo; \
+ echo "In the meantime, please re-configure Maneage with '--host-cc'"; \
+ echo "like below so it uses your own C compiler for building the"; \
+ echo "high-level software ('-e' is to use the existing configuration):"; \
+ echo; \
+ echo " ./project configure -e --host-cc"; \
+ echo; \
+ echo "__________ SEE NOTE FROM MANEAGE ABOVE __________"; \
+ echo; exit 1; \
+ fi; \
fi