Skip to content

Commit

Permalink
update restraint 3rd party deps
Browse files Browse the repository at this point in the history
Change-Id: I7c9d422d7a5353b74633f23b23ab28e304134197
Signed-off-by: Martin Styk <[email protected]>
  • Loading branch information
StykMartin committed Feb 5, 2020
1 parent 945a328 commit f1a16ed
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 187 deletions.
14 changes: 7 additions & 7 deletions restraint.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ Source0: https://github.com/beaker-project/%{name}/%{name}-%{version}.tar.gz
Source101: libffi-3.1.tar.gz
Source102: glib-2.56.1.tar.xz
Source103: zlib-1.2.11.tar.gz
Source104: bzip2-1.0.6.tar.gz
Source104: bzip2-1.0.8.tar.gz
Source105: libxml2-2.9.1.tar.gz
Source106: curl-7.29.0.tar.bz2
Source107: libarchive-3.2.1.tar.gz
Source108: xz-5.2.2.tar.gz
Source109: sqlite-autoconf-3080002.tar.gz
Source106: curl-7.68.0.tar.bz2
Source107: libarchive-3.4.0.tar.gz
Source108: xz-5.2.4.tar.gz
Source109: sqlite-autoconf-3310100.tar.gz
Source110: intltool-0.51.0.tar.gz
Source111: libsoup-2.48.1.tar.xz
Source112: json-c-0.13.1.tar.gz
Source113: cmake-3.2.3.tar.gz
Source114: openssl-1.0.1m.tar.gz
Source115: autoconf-2.65.tar.gz
Source115: autoconf-2.69.tar.gz
Source116: m4-1.4.18.tar.xz
%endif

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Expand Down
95 changes: 43 additions & 52 deletions third-party/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

ZLIB = zlib-1.2.11
BZIP2 = bzip2-1.0.6
BZIP2 = bzip2-1.0.8
LIBFFI = libffi-3.1
GLIB = glib-2.56.1
LIBXML2 = libxml2-2.9.1
CURL = curl-7.29.0
LIBARCHIVE = libarchive-3.2.1
XZ = xz-5.2.2
CURL = curl-7.68.0
LIBARCHIVE = libarchive-3.4.0
XZ = xz-5.2.4
LIBSOUP = libsoup-2.48.1
CMAKE = cmake-3.2.3
OPENSSL = openssl-1.0.1m
SQLITE = sqlite-autoconf-3080002
SQLITE = sqlite-autoconf-3310100
INTLTOOL = intltool-0.51.0
LIBJSONC = json-c-0.13.1
AUTOCONF = autoconf-2.65
AUTOCONF = autoconf-2.69
M4 = m4-1.4.18

arch := $(shell uname -m)

Expand Down Expand Up @@ -43,37 +43,36 @@ all: \
tree/lib/pkgconfig/sqlite3.pc \
tree/bin/intltool-update \
tree/lib/pkgconfig/libsoup-2.4.pc \
tree/bin/cmake \
tree/lib/pkgconfig/openssl.pc \
tree/bin/autoheader \
tree/bin/m4 \
tree/lib/pkgconfig/libjson-c.pc

tree/bin/m4: $(M4) $(M4)/.patches-done
( cd $(M4) && ./configure --prefix=$(CURDIR)/tree )
$(MAKE) -C $(M4)
$(MAKE) -C $(M4) install

tree/lib/pkgconfig/zlib.pc: $(ZLIB)
( cd $(ZLIB) && ./configure --prefix=$(CURDIR)/tree --static )
$(MAKE) -C $(ZLIB)
$(MAKE) -C $(ZLIB) install

tree/bin/cmake: $(CMAKE) $(CMAKE)/.patches-done
( cd $(CMAKE) && ./bootstrap --prefix=$(CURDIR)/tree )
$(MAKE) -C $(CMAKE)
$(MAKE) -C $(CMAKE) PREFIX=$(CURDIR)/tree install
touch $@

tree/bin/autoheader: $(AUTOCONF)
( cd $(AUTOCONF) && ./configure --prefix=$(CURDIR)/tree )
tree/bin/autoheader: tree/bin/m4 $(AUTOCONF) $(AUTOCONF)/.patches-done
( cd $(AUTOCONF) && PATH=$(CURDIR)/tree/bin:$(PATH) ./configure --prefix=$(CURDIR)/tree )
$(MAKE) -C $(AUTOCONF)
$(MAKE) -C $(AUTOCONF) install

tree/lib/pkgconfig/libjson-c.pc: $(AUTOCONF) $(LIBJSONC)
tree/lib/pkgconfig/libjson-c.pc: tree/bin/autoheader $(LIBJSONC)
( cd $(LIBJSONC) && ./configure --prefix=$(CURDIR)/tree --enable-shared=no )
( PATH=$(CURDIR)/tree/bin:$(PATH) $(MAKE) -C $(LIBJSONC) )
$(MAKE) -C $(LIBJSONC) install

tree/lib/pkgconfig/openssl.pc: $(OPENSSL)
ifeq ("$(arch)", "ppc64")
( cd $(OPENSSL) && ./Configure --prefix=$(CURDIR)/tree -DPURIFY linux-ppc64)
( cd $(OPENSSL) && PATH=$(CURDIR)/tree/bin:$(PATH) ./Configure --prefix=$(CURDIR)/tree -DPURIFY linux-ppc64)
else
( cd $(OPENSSL) && ./config --prefix=$(CURDIR)/tree -DPURIFY )
( cd $(OPENSSL) && PATH=$(CURDIR)/tree/bin:$(PATH) ./config --prefix=$(CURDIR)/tree -DPURIFY )
endif
$(MAKE) -C $(OPENSSL)
$(MAKE) -C $(OPENSSL) PREFIX=$(CURDIR)/tree install_sw
Expand All @@ -82,7 +81,7 @@ tree/lib/libbz2.a: $(BZIP2)
$(MAKE) -C $(BZIP2)
$(MAKE) -C $(BZIP2) PREFIX=$(CURDIR)/tree install

tree/lib/pkgconfig/liblzma.pc: $(XZ) $(XZ)/.patches-done
tree/lib/pkgconfig/liblzma.pc: $(XZ)
( cd $(XZ) && ./configure --prefix=$(CURDIR)/tree \
--disable-lzma-links --disable-scripts \
--enable-static --disable-shared )
Expand Down Expand Up @@ -114,7 +113,7 @@ tree/lib/pkgconfig/libxml-2.0.pc: $(LIBXML2) $(LIBXML2)/.patches-done tree/lib/p
$(MAKE) -C $(LIBXML2)
$(MAKE) -C $(LIBXML2) install

tree/lib/pkgconfig/sqlite3.pc: $(SQLITE) $(SQLITE)/.patches-done
tree/lib/pkgconfig/sqlite3.pc: $(SQLITE)
( cd $(SQLITE) && ./configure --prefix=$(CURDIR)/tree \
--enable-static --disable-shared )
$(MAKE) -C $(SQLITE)
Expand All @@ -134,10 +133,11 @@ tree/lib/pkgconfig/libsoup-2.4.pc: $(LIBSOUP) $(LIBSOUP)/.patches-done tree/lib/
( PATH=$(CURDIR)/tree/bin:$(PATH) $(MAKE) -C $(LIBSOUP) )
$(MAKE) -C $(LIBSOUP) install

tree/lib/pkgconfig/libcurl.pc: $(CURL) $(CURL)/.patches-done tree/lib/pkgconfig/zlib.pc tree/lib/pkgconfig/openssl.pc
tree/lib/pkgconfig/libcurl.pc: $(CURL) tree/lib/pkgconfig/zlib.pc tree/lib/pkgconfig/openssl.pc
( cd $(CURL) && LIBS="-ldl" PKG_CONFIG_PATH=../tree/lib/pkgconfig ./configure --prefix=$(CURDIR)/tree \
--with-zlib=$(CURDIR)/tree --with-ssl=$(CURDIR)/tree --enable-ipv6 --disable-manual \
--enable-static --disable-shared --disable-ldap --disable-ldaps --without-libidn --without-libssh2)
--enable-static --disable-shared --disable-ldap --disable-ldaps --without-libidn --without-libssh2 \
--without-brotli --without-libpsl)
$(MAKE) -C $(CURL)
$(MAKE) -C $(CURL) install

Expand All @@ -152,6 +152,10 @@ tree/lib/pkgconfig/libarchive.pc: $(LIBARCHIVE) $(LIBARCHIVE)/.patches-done \
$(MAKE) -C $(LIBARCHIVE)
$(MAKE) -C $(LIBARCHIVE) install

$(LIBARCHIVE)/.patches-done: $(LIBARCHIVE)
patch -d$(LIBARCHIVE) -p1 <libarchive-use-pkgconfig.patch
touch $@

TAR_BALLS = $(LIBFFI).tar.gz
$(LIBFFI).tar.gz:
curl -f -L -O http://mirrors.kernel.org/sourceware/libffi/$@
Expand All @@ -166,7 +170,7 @@ $(ZLIB).tar.gz:

TAR_BALLS += $(BZIP2).tar.gz
$(BZIP2).tar.gz:
curl -f -L -O http://downloads.sourceforge.net/project/bzip2/$@
curl -f -L -O https://www.sourceware.org/pub/bzip2/$@

TAR_BALLS += $(LIBXML2).tar.gz
$(LIBXML2).tar.gz:
Expand All @@ -186,7 +190,7 @@ $(XZ).tar.gz:

TAR_BALLS += $(SQLITE).tar.gz
$(SQLITE).tar.gz:
curl -f -L -O http://sqlite.org/2013/$@
curl -f -L -O http://sqlite.org/2020/$@

TAR_BALLS += $(INTLTOOL).tar.gz
$(INTLTOOL).tar.gz:
Expand All @@ -208,9 +212,9 @@ TAR_BALLS += $(OPENSSL).tar.gz
$(OPENSSL).tar.gz:
curl -f -L -O https://www.openssl.org/source/$@

TAR_BALLS += $(CMAKE).tar.gz
$(CMAKE).tar.gz:
curl -f -L -O http://www.cmake.org/files/v3.2/$@
TAR_BALLS += $(M4).tar.xz
$(M4).tar.xz:
curl -f -L -O https://ftp.gnu.org/gnu/m4/$@

tarballs: $(TAR_BALLS)
printf '%s\n' $(TAR_BALLS) >$@
Expand All @@ -224,28 +228,10 @@ tarballs: $(TAR_BALLS)
%: %.tar.xz tree/lib/pkgconfig/liblzma.pc
$(CURDIR)/tree/bin/xzcat $< | tar -xf -

$(CMAKE)/.patches-done: $(CMAKE)
patch -d$(CMAKE) -p1 <cmake-yes-format-security.patch
touch $@

$(CURL)/.patches-done: $(CURL)
patch -d$(CURL) -p1 <curl_add_ppc64le.patch
patch -d$(CURL) -p1 <curl_pkgconfig.patch
touch $@

$(XZ)/.patches-done: $(XZ)
patch -d$(XZ) -p1 <xz-no-pkgconfig-url.patch
patch -d$(XZ) -p1 <xz_add_ppc64le.patch
touch $@

$(LIBFFI)/.patches-done: $(LIBFFI)
patch -d$(LIBFFI) -p1 <libffi-3.1-toolexeclibdir.patch
touch $@

$(SQLITE)/.patches-done: $(SQLITE)
patch -d$(SQLITE) -p1 <sqlite_add_ppc64le.patch
touch $@

$(GLIB)/.patches-done: $(GLIB)
patch -d$(GLIB) -p1 < glib-setpipe.patch
patch -d$(GLIB) -p1 < glib-nullstrings.patch
Expand All @@ -254,11 +240,6 @@ $(GLIB)/.patches-done: $(GLIB)
fi
touch $@

$(LIBARCHIVE)/.patches-done: $(LIBARCHIVE)
patch -d$(LIBARCHIVE) -p1 <libarchive-use-pkgconfig.patch
patch -d$(LIBARCHIVE) -p1 <libarchive_add_ppc64le.patch
touch $@

$(INTLTOOL)/.patches-done: $(INTLTOOL)
patch -d$(INTLTOOL) -p1 <intltool-perl5.26-regex-fixes.patch
touch $@
Expand All @@ -271,8 +252,18 @@ $(LIBSOUP)/.patches-done: $(LIBSOUP)

$(LIBXML2)/.patches-done: $(LIBXML2)
patch -d$(LIBXML2) -p1 <libxml2_add_ppc64le.patch

$(AUTOCONF)/.patches-done: $(AUTOCONF)
patch -d$(AUTOCONF) -p1 <autoconf-ppc64le.patch
touch $@

$(M4)/.patches-done: $(M4)
patch -d$(M4) -p1 < m4-1.4.18-glibc-change-work-around.patch
touch $@

.PHONY: clean
clean:
rm -rf $(XZ) $(ZLIB) $(BZIP2) $(LIBFFI) $(GLIB) $(LIBXML2) $(CURL) $(LIBARCHIVE) $(LIBSOUP) $(SQLITE) $(INTLTOOL) $(CMAKE) $(OPENSSL) $(AUTOCONF) $(LIBJSONC) tree
rm -rf $(XZ) $(ZLIB) $(BZIP2) $(LIBFFI) $(GLIB) $(LIBXML2) $(CURL) $(LIBARCHIVE) $(LIBSOUP) $(SQLITE) $(INTLTOOL) $(CMAKE) $(OPENSSL) $(AUTOCONF) $(LIBJSONC) $(M4) tree

clean-tarballs:
rm -rf $(TAR_BALLS)
17 changes: 17 additions & 0 deletions third-party/autoconf-ppc64le.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git build-aux/config.guess build-aux/config.guess
index d622a44e..67c9c11d 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -975,6 +975,12 @@ EOF
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-gnu
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-gnu
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
17 changes: 0 additions & 17 deletions third-party/cmake-yes-format-security.patch

This file was deleted.

14 changes: 0 additions & 14 deletions third-party/curl_add_ppc64le.patch

This file was deleted.

10 changes: 0 additions & 10 deletions third-party/curl_pkgconfig.patch

This file was deleted.

22 changes: 0 additions & 22 deletions third-party/libarchive-rhel3-headers.patch

This file was deleted.

20 changes: 10 additions & 10 deletions third-party/libarchive-use-pkgconfig.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Index: b/configure
LIBICONV
+ZLIB_LIBS
+ZLIB_CFLAGS
INC_BLAKE2_FALSE
INC_BLAKE2_TRUE
STATIC_BSDCPIO_FALSE
STATIC_BSDCPIO_TRUE
BUILD_BSDCPIO_FALSE
@@ -824,6 +828,10 @@ CPP
PKG_CONFIG
PKG_CONFIG_PATH
Expand All @@ -25,7 +25,7 @@ Index: b/configure
+LZMA_LIBS
LIBXML2_PC_CFLAGS
LIBXML2_PC_LIBS'

@@ -1525,6 +1533,10 @@ Some influential environment variables:
C compiler flags for LIBXML2_PC, overriding pkg-config
LIBXML2_PC_LIBS
Expand All @@ -34,13 +34,13 @@ Index: b/configure
+ ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
+ LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config
+ LZMA_LIBS linker flags for LZMA, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -13255,6 +13267,126 @@ done

# Checks for libraries.

+
+
+
Expand Down Expand Up @@ -165,8 +165,8 @@ Index: b/configure
if test "${with_zlib+set}" = set; then :
withval=$with_zlib;
@@ -13262,6 +13394,100 @@ fi


if test "x$with_zlib" != "xno"; then
+
+pkg_failed=no
Expand Down Expand Up @@ -266,8 +266,8 @@ Index: b/configure
do :
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -14663,6 +14889,100 @@ fi


if test "x$with_lzma" != "xno"; then
+
+pkg_failed=no
Expand Down
14 changes: 0 additions & 14 deletions third-party/libarchive_add_ppc64le.patch

This file was deleted.

Loading

0 comments on commit f1a16ed

Please sign in to comment.