diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-31 04:10:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-31 04:10:05 +0100 |
commit | 025c71a90f259ca9319b4caa92495e43acf489b0 (patch) | |
tree | 63ba67fc666bfe4fdc21e49e319562fa7d545590 /dev-util/netsurf-buildsystem | |
parent | 5685192438444645b599ae1b567d1b73103fba7f (diff) |
gentoo auto-resync : 31:08:2023 - 04:10:05
Diffstat (limited to 'dev-util/netsurf-buildsystem')
3 files changed, 102 insertions, 0 deletions
diff --git a/dev-util/netsurf-buildsystem/Manifest b/dev-util/netsurf-buildsystem/Manifest index dc303fe046af..09d4995059e8 100644 --- a/dev-util/netsurf-buildsystem/Manifest +++ b/dev-util/netsurf-buildsystem/Manifest @@ -1,4 +1,6 @@ AUX gentoo-helpers-r2.sh 388 BLAKE2B 2e7f1fd1eb7d9366514ccad5cb356689005f7028a423b60600ab8297b053ce37b154de37258ef4bfe759bf2b2b4007c3e416eeb3dd9937f75c9c41ef93c1bfc5 SHA512 8aad232d938e4aaac424389833012eb0c29409b8d558cf4cc6e894b7e3baa23ba29364aa1b7a2872bab6b507d52436cd5ecf3d5b42ccc52bcbed2d2c78034b36 +AUX netsurf-buildsystem-1.9-parallel-pre-post-targets.patch 2615 BLAKE2B d13b45dd8e13bc71a3da5dcda5ad149b76cba6753837e699598e3758232183ac4a67ebfc45d5fb5e3efec98abb29b889fe4d21105b0e4644280e14e881e89f7a SHA512 81e6dd7a0d925eb3e2b8254a63f27547f0c8136bec97c14b1f74c18be69145539710c32f02e6422749dde4bcd439c3babef5439a6b285dfe42ee166cacdd4f89 DIST buildsystem-1.9.tar.gz 38723 BLAKE2B 0fc4aae4f9a21058c7e437170e74147f6b6dc20220d53986a212e717846d5738df2771081f000705cd69335fbe61653b24a3e86d454a53b24f9cadd5e7aaac97 SHA512 52d7181af56946b95f22d5cc8fb2c58287fe43c940d4104e4a05744cfe332d0e0ea6da76cb8d635eb34cac4d66f53dc01ac5f440b82a207265d39744f112a80d +EBUILD netsurf-buildsystem-1.9-r1.ebuild 782 BLAKE2B 931ac8c948b00f8e4ba39ec21d94fcd04e3dc6b69a6d3f1c2a7af0e2eae3088e7e48452d740864ca93cecea6ffb7e4c836ef593c747c8ee6302d6b1b60238fcc SHA512 cbc81e0c1109ef6217cd02983b69222ed18c41de08747e29f75f87b1f14ea46aba6446a1c6eae46987ada9591981d29aed054e1b8dab9d0a9be3049e033175a5 EBUILD netsurf-buildsystem-1.9.ebuild 711 BLAKE2B 2c0ce11ad6c6453b3b71518e5e7b2b0cada0a4e2ce6d4f85896948b241f75af6e265e9e0821578f069bdbe64bc2aeeb74af9191bfa0454b128696d2c14af2f58 SHA512 3a135a769aecab443acd81b2b15aa811b85e8c074ad8ecb9f23ff2e9ba34a0e14140f6e8f3c19664222570880312c3ac4ddff0d15f51d2d7651309d56bb02ea8 MISC metadata.xml 168 BLAKE2B 2e0e000b4c3b6ca04c12903fdbe278415c05a822623c52e9aa95cbbf3d50bcb1246b7edbda7d2f6b559af8950c6374e6e0a69b76319964cfe686bf50b0604a57 SHA512 4dcf45d1809e8390a2d8155c8ebfe0dd610203e392aeab0ccd8a10f42cc8532a4925eff32b35e7a6c35598a4efd288229034ec0732299dbd8cfa0acff705fed3 diff --git a/dev-util/netsurf-buildsystem/files/netsurf-buildsystem-1.9-parallel-pre-post-targets.patch b/dev-util/netsurf-buildsystem/files/netsurf-buildsystem-1.9-parallel-pre-post-targets.patch new file mode 100644 index 000000000000..8ae044887356 --- /dev/null +++ b/dev-util/netsurf-buildsystem/files/netsurf-buildsystem-1.9-parallel-pre-post-targets.patch @@ -0,0 +1,72 @@ +https://listmaster.pepperfish.net/hyperkitty/list/netsurf-dev@netsurf-browser.org/thread/NUOLUXAZS2GYBJ3Q5GCTGSYLKOX3MCME/ + +From 1a6171aa8fd69b20f5c7d2be31ab00539adae959 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 14 Aug 2023 12:43:54 -0400 +Subject: [PATCH] makefiles/Makefile.top: dependencies for PRE_ and + POST_TARGETS + +The PRE_TARGETS and POST_TARGETS are supposed to be built before and +after $(OBJECTS), respectively -- at least according to the comments +in Makefile.top: + + # List of targets to run before building $(OBJECT) + PRE_TARGETS := + # List of targets to run after building $(OBJECT) + POST_TARGETS := + +The default target however builds them at the same time as $(OUTPUT), + + # Default target + all: $(PRE_TARGETS) $(OUTPUT) $(POST_TARGETS) + +where $(OUTPUT) basically just builds $(OBJECTS): + + $(OUTPUT): $(BUILDDIR)/stamp $(OBJECTS) + ... + +As a result, there is a race condition when $(OBJECTS) truly requires +$(PRE_TARGETS), because they may be built at the same time. The same +problem arises the other way around with $(POST_TARGETS). As a +demonstration, one can try to build the libsvgtiny shared library +directly (note: the details are platform-dependent), + + $ BD=build-x86_64-pc-linux-gnu-x86_64-pc-linux-gnu-release-lib-shared + $ make COMPONENT_TYPE=lib-shared "${BD}/libsvgtiny.so.0.1.7" + COMPILE: src/svgtiny.c + ... + src/svgtiny.c:24:10: fatal error: autogenerated_colors.c: No such file or directory + 24 | #include "autogenerated_colors.c" + | ^~~~~~~~~~~~~~~~~~~~~~~~ + compilation terminated. + +This is because $(PRE_TARGETS) is not satisfied. In practice, this +condition seems hard to hit unintentionally, but it can happen if you +are building in parallel and extemely unlucky. A user discovered it in +Gentoo bug 711200. + +The fix simply adds the stated dependencies on $(OBJECTS) and +$(POST_TARGETS) to guarantee the correct order. +--- + makefiles/Makefile.top | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top +index caac166..dafdfaa 100644 +--- a/makefiles/Makefile.top ++++ b/makefiles/Makefile.top +@@ -176,6 +176,11 @@ OBJECTS := $(addprefix $(BUILDDIR)/,$(filter %.o, \ + $(subst /,_,$(subst .cmhg,.o,$(SOURCES))) \ + $(subst /,_,$(subst .s,.o,$(SOURCES))))) + ++# Ensure that PRE_TARGETS are built before OBJECTS, and POST_TARGETS ++# after them. ++$(OBJECTS): $(PRE_TARGETS) ++$(POST_TARGETS): $(OBJECTS) ++ + bin_for_test = $(addprefix $(BUILDDIR)/,$(firstword $(subst :, ,$(ITEM)))) + TEST_BINARIES := $(foreach ITEM,$(TEST_ITEMS),$(bin_for_test)) + +-- +2.41.0 + diff --git a/dev-util/netsurf-buildsystem/netsurf-buildsystem-1.9-r1.ebuild b/dev-util/netsurf-buildsystem/netsurf-buildsystem-1.9-r1.ebuild new file mode 100644 index 000000000000..635607a0256b --- /dev/null +++ b/dev-util/netsurf-buildsystem/netsurf-buildsystem-1.9-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="buildsystem-${PV}" +DESCRIPTION="Build system used for netsurf and its libs" +HOMEPAGE="https://www.netsurf-browser.org" +SRC_URI="https://download.netsurf-browser.org/libs/releases/${MY_P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}/${P}-parallel-pre-post-targets.patch" ) + +src_prepare() { + default + sed -e 's:/bin/which:which:' -i "makefiles/Makefile.tools" || die +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + insinto /usr/share/netsurf-buildsystem + newins "${FILESDIR}/gentoo-helpers-r2.sh" gentoo-helpers.sh +} |