From 5dd923250cfae34ed9b49826ee8a17a37dc62cfb Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 16:32:35 +0100 Subject: [PATCH 01/40] dev-cpp/gflags: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- dev-cpp/gflags/Manifest | 2 +- ...gflags-2.2.0.ebuild => gflags-2.2.1-r1.ebuild} | 15 ++++++++------- .../{gflags-2.2.1.ebuild => gflags-2.2.2.ebuild} | 13 +++++++------ dev-cpp/gflags/gflags-9999.ebuild | 13 +++++++------ dev-cpp/gflags/metadata.xml | 2 +- 5 files changed, 24 insertions(+), 21 deletions(-) rename dev-cpp/gflags/{gflags-2.2.0.ebuild => gflags-2.2.1-r1.ebuild} (68%) rename dev-cpp/gflags/{gflags-2.2.1.ebuild => gflags-2.2.2.ebuild} (79%) diff --git a/dev-cpp/gflags/Manifest b/dev-cpp/gflags/Manifest index 8613f55b43..fe205d2550 100644 --- a/dev-cpp/gflags/Manifest +++ b/dev-cpp/gflags/Manifest @@ -1,2 +1,2 @@ -DIST gflags-2.2.0.tar.gz 96408 BLAKE2B 571f07dd0972cec201eae8ce66d5e0592abb6ddb81bcf3c539f38861f0cd379de2db20ba99eab885ba030235938816d7a61e589b74a61743de7cdb2710646854 SHA512 e2106ca70ff539024f888bca12487b3bf7f4f51928acf5ae3e1022f6bbd5e3b7882196ec50b609fd52f739e1f7b13eec7d4b3535d8216ec019a3577de6b4228d DIST gflags-2.2.1.tar.gz 96985 BLAKE2B 065dac9cf5d878e4179cb6d56ddf240052a552b72036fd06cb83197d9772a9b97fa544f809c6e1efd6f9ad8cd0222872fc6292c44bc013c5f70e235bcc5b290c SHA512 e919cbdcff1f993ddbfa9c06d8e595566a4717c27ff62f388a64c0e6b4683a93211c24ce78485eae84c2c76053341574064e6c56af185fc2782e2816b26e1fc9 +DIST gflags-2.2.2.tar.gz 98704 BLAKE2B 54cbf3b0a422d662e89c1921614ae9f20a4a383524d374d1e7ce1473eff0a6e121c1a2255df0b9d27ae9866c8e63094b908534c5fd2173737033cc0f184a5e4f SHA512 98c4703aab24e81fe551f7831ab797fb73d0f7dfc516addb34b9ff6d0914e5fd398207889b1ae555bac039537b1d4677067dae403b64903577078d99c1bdb447 diff --git a/dev-cpp/gflags/gflags-2.2.0.ebuild b/dev-cpp/gflags/gflags-2.2.1-r1.ebuild similarity index 68% rename from dev-cpp/gflags/gflags-2.2.0.ebuild rename to dev-cpp/gflags/gflags-2.2.1-r1.ebuild index 7ec523ddfe..bed6548a3d 100644 --- a/dev-cpp/gflags/gflags-2.2.0.ebuild +++ b/dev-cpp/gflags/gflags-2.2.1-r1.ebuild @@ -1,36 +1,37 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 +CMAKE_ECLASS=cmake inherit cmake-multilib if [[ ${PV} == 9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/gflags/gflags.git" + EGIT_REPO_URI="https://github.com/gflags/gflags" else SRC_URI="https://github.com/gflags/gflags/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" fi DESCRIPTION="Google's C++ argument parsing library" -HOMEPAGE="http://gflags.github.io/gflags/" +HOMEPAGE="https://gflags.github.io/gflags/" LICENSE="BSD" SLOT="0/2.2" IUSE="static-libs test" +RESTRICT="!test? ( test )" # AUTHORS.txt only links the google group DOCS=( ChangeLog.txt README.md ) multilib_src_configure() { local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=$(usex static-libs) -DBUILD_TESTING=$(usex test) # avoid installing .cmake/packages, e.g.: # >>> /tmp/portage/dev-cpp/gflags-9999/homedir/.cmake/packages/gflags/a7fca4708532331c2d656af0fdc8b8b9 -DREGISTER_INSTALL_PREFIX=OFF ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-cpp/gflags/gflags-2.2.1.ebuild b/dev-cpp/gflags/gflags-2.2.2.ebuild similarity index 79% rename from dev-cpp/gflags/gflags-2.2.1.ebuild rename to dev-cpp/gflags/gflags-2.2.2.ebuild index 91f405e1e9..6f3c37e496 100644 --- a/dev-cpp/gflags/gflags-2.2.1.ebuild +++ b/dev-cpp/gflags/gflags-2.2.2.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 +CMAKE_ECLASS=cmake inherit cmake-multilib if [[ ${PV} == 9999 ]]; then @@ -10,27 +11,27 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/gflags/gflags" else SRC_URI="https://github.com/gflags/gflags/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi DESCRIPTION="Google's C++ argument parsing library" -HOMEPAGE="http://gflags.github.io/gflags/" +HOMEPAGE="https://gflags.github.io/gflags/" LICENSE="BSD" SLOT="0/2.2" IUSE="static-libs test" +RESTRICT="!test? ( test )" # AUTHORS.txt only links the google group DOCS=( ChangeLog.txt README.md ) multilib_src_configure() { local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=$(usex static-libs) -DBUILD_TESTING=$(usex test) # avoid installing .cmake/packages, e.g.: # >>> /tmp/portage/dev-cpp/gflags-9999/homedir/.cmake/packages/gflags/a7fca4708532331c2d656af0fdc8b8b9 -DREGISTER_INSTALL_PREFIX=OFF ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-cpp/gflags/gflags-9999.ebuild b/dev-cpp/gflags/gflags-9999.ebuild index 91f405e1e9..6aa92ecf5e 100644 --- a/dev-cpp/gflags/gflags-9999.ebuild +++ b/dev-cpp/gflags/gflags-9999.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 +CMAKE_ECLASS=cmake inherit cmake-multilib if [[ ${PV} == 9999 ]]; then @@ -10,27 +11,27 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/gflags/gflags" else SRC_URI="https://github.com/gflags/gflags/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi DESCRIPTION="Google's C++ argument parsing library" -HOMEPAGE="http://gflags.github.io/gflags/" +HOMEPAGE="https://gflags.github.io/gflags/" LICENSE="BSD" SLOT="0/2.2" IUSE="static-libs test" +RESTRICT="!test? ( test )" # AUTHORS.txt only links the google group DOCS=( ChangeLog.txt README.md ) multilib_src_configure() { local mycmakeargs=( - -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=$(usex static-libs) -DBUILD_TESTING=$(usex test) # avoid installing .cmake/packages, e.g.: # >>> /tmp/portage/dev-cpp/gflags-9999/homedir/.cmake/packages/gflags/a7fca4708532331c2d656af0fdc8b8b9 -DREGISTER_INSTALL_PREFIX=OFF ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-cpp/gflags/metadata.xml b/dev-cpp/gflags/metadata.xml index 5b9d6abf02..1dc3a95963 100644 --- a/dev-cpp/gflags/metadata.xml +++ b/dev-cpp/gflags/metadata.xml @@ -1,5 +1,5 @@ - + amynka@gentoo.org From d7d70aeaae06be10f0088bb4997a69dcd766bc9a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 16:35:45 +0100 Subject: [PATCH 02/40] app-crypt/pinentry: Sync with gentoo It's from gentoo commit 8055bc7d0e16aec4cf0ce6c6e5e5342339b45daa. --- app-crypt/pinentry/Manifest | 4 +- .../pinentry/files/pinentry-1.0.0-AR.patch | 11 + ...e-tooltips-in-keyboard-grabbing-mode.patch | 47 ---- .../pinentry/files/pinentry-1.0.0-build.patch | 218 ------------------ ...y-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch | 47 ---- app-crypt/pinentry/metadata.xml | 13 +- app-crypt/pinentry/pinentry-1.0.0-r2.ebuild | 102 -------- app-crypt/pinentry/pinentry-1.0.0-r3.ebuild | 103 --------- app-crypt/pinentry/pinentry-1.1.0-r1.ebuild | 100 -------- app-crypt/pinentry/pinentry-1.1.0-r2.ebuild | 102 -------- app-crypt/pinentry/pinentry-1.1.1-r1.ebuild | 90 ++++++++ app-crypt/pinentry/pinentry-1.2.0.ebuild | 90 ++++++++ 12 files changed, 201 insertions(+), 726 deletions(-) create mode 100644 app-crypt/pinentry/files/pinentry-1.0.0-AR.patch delete mode 100644 app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch delete mode 100644 app-crypt/pinentry/files/pinentry-1.0.0-build.patch delete mode 100644 app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch delete mode 100644 app-crypt/pinentry/pinentry-1.0.0-r2.ebuild delete mode 100644 app-crypt/pinentry/pinentry-1.0.0-r3.ebuild delete mode 100644 app-crypt/pinentry/pinentry-1.1.0-r1.ebuild delete mode 100644 app-crypt/pinentry/pinentry-1.1.0-r2.ebuild create mode 100644 app-crypt/pinentry/pinentry-1.1.1-r1.ebuild create mode 100644 app-crypt/pinentry/pinentry-1.2.0.ebuild diff --git a/app-crypt/pinentry/Manifest b/app-crypt/pinentry/Manifest index e8e43f0ce1..c80daad0ad 100644 --- a/app-crypt/pinentry/Manifest +++ b/app-crypt/pinentry/Manifest @@ -1,2 +1,2 @@ -DIST pinentry-1.0.0.tar.bz2 436930 BLAKE2B 949be8de8504a42cd5bd6ffebe331a825db7ff3c2ccc5fc554155b7621fddf9df957aa92063eb1a06c6964826a296bf60a4cc46cf2886552e37703a62042f35a SHA512 f109236707c51871b5020ef807a551366461fafcfbe09bf8cda19d4b163a42cf622562b905ceb41429f1d648b3f3d27807538709da6a135b67f9888709eccd62 -DIST pinentry-1.1.0.tar.bz2 467702 BLAKE2B cf43555848ab0dc60756fca123aba7599ebb1bfe0458b973ed9d84479f8de9ee69ef309b518b40aa340434d64d37793cf97c94f78f99820bc5c71ecd2aac7a49 SHA512 5012672925bcb5f683358c259e55e4b87c67cf063ad52c759308933733025c33f7ce08e5b8019ffc101cbf7ef30499040ef2fd34a7611698e65e1593f80948cd +DIST pinentry-1.1.1.tar.bz2 515723 BLAKE2B f257fe552852e6d1ff2c23aeb0c1127b43e3a60e44c78dfa764d569e659ccb78528ce3ee863114af273a4b6f6c24686cda2cb14bb04995eb8c41ccd4541a9fbd SHA512 d6ab5af8ac2f3c9c05e09703e95d8e2676f9b2b7ceb97f6a31d101d0e9da7a1e106a6d3eabe86cab1bb35a4b119a7cba1380ac64bf13c61af0b3c48803116c12 +DIST pinentry-1.2.0.tar.bz2 498390 BLAKE2B 6e97b55fe39e9c17f8a87fa669d23fca56c1095c2533a9eebe459fafc95a3fcb0a5ea502077aae5480b5259a3096c5f85e05d4872c0b19ad33f3d9084a220cc7 SHA512 19cea79aa3982d1f0d75220c8e24ca38d6c49475c6f4c5aa7101151b4690db23ed316096a4a411136e716ba4eb471f48f9b09556e5c9837533c2356b9b384b63 diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch b/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch new file mode 100644 index 0000000000..82af67f694 --- /dev/null +++ b/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/718028 +--- a/configure.ac ++++ b/configure.ac +@@ -80,6 +80,7 @@ AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) + AC_PROG_CC + AC_PROG_CPP + AC_PROG_INSTALL ++AM_PROG_AR + AC_PROG_RANLIB + # We need to check for cplusplus here because we may not do the test + # for Qt and autoconf does does not allow that. diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch b/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch deleted file mode 100644 index 7724d1beae..0000000000 --- a/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 1590b664d88be8386a4664c2994b685187d1eb25 Mon Sep 17 00:00:00 2001 -From: Damien Goutte-Gattat -Date: Thu, 3 Aug 2017 22:56:49 +0200 -Subject: [PATCH 1/6] gtk: Disable tooltips in keyboard-grabbing mode. - -* gtk+-2:/pinentry-gtk-2.c (show_hide_button): Do not show the -tooltip if we attempt to grab the keyboard. -(create_window): Likewise. --- - -For unclear reasons, those tooltips may interfere with grabbing -under some tiling window managers. - -GnuPG-bug-id: 3297 -Signed-off-by: Damien Goutte-Gattat ---- - gtk+-2/pinentry-gtk-2.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c -index d467ec5..f17a702 100644 ---- a/gtk+-2/pinentry-gtk-2.c -+++ b/gtk+-2/pinentry-gtk-2.c -@@ -516,7 +516,10 @@ show_hide_button_toggled (GtkWidget *widget, gpointer data) - } - - gtk_label_set_markup (GTK_LABEL(label), text); -- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); -+ if (!pinentry->grab) -+ { -+ gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); -+ } - g_free (tooltip); - } - -@@ -736,7 +739,7 @@ create_window (pinentry_t ctx) - gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar), - QUALITYBAR_EMPTY_TEXT); - gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 0.0); -- if (pinentry->quality_bar_tt) -+ if (pinentry->quality_bar_tt && !pinentry->grab) - { - #if !GTK_CHECK_VERSION (2, 12, 0) - gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar, --- -2.13.6 - diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-build.patch b/app-crypt/pinentry/files/pinentry-1.0.0-build.patch deleted file mode 100644 index e367b85664..0000000000 --- a/app-crypt/pinentry/files/pinentry-1.0.0-build.patch +++ /dev/null @@ -1,218 +0,0 @@ -From c5c7bee68730c9f66a27f9bb0d023480623a2bfb Mon Sep 17 00:00:00 2001 -From: Werner Koch -Date: Thu, 1 Dec 2016 09:10:08 +0100 -Subject: [PATCH] Fix linkage problem in tty and emacs pinentries. - -* emacs/pinentry-emacs.c (curses_cmd_handler): Remove var. -* tty/pinentry-tty.c (curses_cmd_handler): Remove var. -* pinentry/pinentry.c (flavor_flag): New local var. -(pinentry_set_flavor_flag): New function. -(cmd_getinfo): Use FLAVOR_FLAG for the "flavor" sub-command. -* gnome3/pinentry-gnome3.c (main): Call pinentry_set_flavor_flag. -* gtk+-2/pinentry-gtk-2.c (main): Ditto. -* pinentry/pinentry-emacs.c (initial_emacs_cmd_handler): Ditto. -* qt/main.cpp (main): Ditto. --- - -Fixes-commit: e4e3a9cc88704dcffac660d0b92fd1ed8abecc11 -Fixes-commit: d126036671e7dd631babc118cb4113f723f15748 -Signed-off-by: Werner Koch ---- - emacs/pinentry-emacs.c | 4 ---- - gnome3/pinentry-gnome3.c | 3 +++ - gtk+-2/pinentry-gtk-2.c | 10 ++++++++-- - pinentry/pinentry-emacs.c | 5 ++++- - pinentry/pinentry.c | 34 ++++++++++++++++++---------------- - pinentry/pinentry.h | 4 ++++ - qt/main.cpp | 1 + - tty/pinentry-tty.c | 3 --- - 8 files changed, 38 insertions(+), 26 deletions(-) - -diff --git a/emacs/pinentry-emacs.c b/emacs/pinentry-emacs.c -index b6b3eb8..3c39a96 100644 ---- a/emacs/pinentry-emacs.c -+++ b/emacs/pinentry-emacs.c -@@ -29,10 +29,6 @@ - - pinentry_cmd_handler_t pinentry_cmd_handler = emacs_cmd_handler; - --/* needed to link cleanly; should never be used except for comparison -- * in pinentry/pinentry.c's cmd_getinfo(): */ --pinentry_cmd_handler_t curses_cmd_handler = NULL; -- - - - int -diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c -index a040f9b..d5a49d6 100644 ---- a/gnome3/pinentry-gnome3.c -+++ b/gnome3/pinentry-gnome3.c -@@ -517,18 +517,21 @@ main (int argc, char *argv[]) - fprintf (stderr, "No $DBUS_SESSION_BUS_ADDRESS found," - " falling back to curses\n"); - pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); - } - else if (!pe_gcr_system_prompt_available ()) - { - fprintf (stderr, "No Gcr System Prompter available," - " falling back to curses\n"); - pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); - } - else if (pe_gnome_screen_locked ()) - { - fprintf (stderr, "GNOME screensaver is locked," - " falling back to curses\n"); - pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); - } - #endif - -diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c -index 6037533..473c4aa 100644 ---- a/gtk+-2/pinentry-gtk-2.c -+++ b/gtk+-2/pinentry-gtk-2.c -@@ -938,10 +938,16 @@ main (int argc, char *argv[]) - if (pinentry_have_display (argc, argv)) - { - if (! gtk_init_check (&argc, &argv)) -- pinentry_cmd_handler = curses_cmd_handler; -+ { -+ pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); -+ } - } - else -- pinentry_cmd_handler = curses_cmd_handler; -+ { -+ pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); -+ } - #else - gtk_init (&argc, &argv); - #endif -diff --git a/pinentry/pinentry-emacs.c b/pinentry/pinentry-emacs.c -index df12f1b..50ba406 100644 ---- a/pinentry/pinentry-emacs.c -+++ b/pinentry/pinentry-emacs.c -@@ -644,7 +644,10 @@ initial_emacs_cmd_handler (pinentry_t pe) - if (emacs_socket < 0) - pinentry_cmd_handler = fallback_cmd_handler; - else -- pinentry_cmd_handler = emacs_cmd_handler; -+ { -+ pinentry_cmd_handler = emacs_cmd_handler; -+ pinentry_set_flavor_flag ("emacs"); -+ } - - return (* pinentry_cmd_handler) (pe); - } -diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c -index 322a651..a198fb3 100644 ---- a/pinentry/pinentry.c -+++ b/pinentry/pinentry.c -@@ -67,6 +67,10 @@ static char this_pgmname[50]; - - struct pinentry pinentry; - -+ -+static const char *flavor_flag; -+ -+ - static void - pinentry_reset (int use_defaults) - { -@@ -793,6 +797,16 @@ pinentry_parse_opts (int argc, char *argv[]) - } - } - -+ -+/* Set the optional flag used with getinfo. */ -+void -+pinentry_set_flavor_flag (const char *string) -+{ -+ flavor_flag = string; -+} -+ -+ -+ - - static gpg_error_t - option_handler (assuan_context_t ctx, const char *key, const char *value) -@@ -1444,27 +1458,15 @@ cmd_getinfo (assuan_context_t ctx, char *line) - } - else if (!strcmp (line, "flavor")) - { -- const char *flags; -- - if (!strncmp (this_pgmname, "pinentry-", 9) && this_pgmname[9]) - s = this_pgmname + 9; - else - s = this_pgmname; - -- if (0) -- ; --#ifdef INSIDE_EMACS -- else if (pinentry_cmd_handler == emacs_cmd_handler) -- flags = ":emacs"; --#endif --#ifdef FALLBACK_CURSES -- else if (pinentry_cmd_handler == curses_cmd_handler) -- flags = ":curses"; --#endif -- else -- flags = ""; -- -- snprintf (buffer, sizeof buffer, "%s%s", s, flags); -+ snprintf (buffer, sizeof buffer, "%s%s%s", -+ s, -+ flavor_flag? ":":"", -+ flavor_flag? flavor_flag : ""); - buffer[sizeof buffer -1] = 0; - rc = assuan_send_data (ctx, buffer, strlen (buffer)); - } -diff --git a/pinentry/pinentry.h b/pinentry/pinentry.h -index 01fb373..45d35ad 100644 ---- a/pinentry/pinentry.h -+++ b/pinentry/pinentry.h -@@ -275,6 +275,10 @@ int pinentry_have_display (int argc, char **argv); - or version output is requested. */ - void pinentry_parse_opts (int argc, char *argv[]); - -+/* Set the optional flag used with getinfo. */ -+void pinentry_set_flavor_flag (const char *string); -+ -+ - - /* The caller must define this variable to process assuan commands. */ - extern pinentry_cmd_handler_t pinentry_cmd_handler; -diff --git a/qt/main.cpp b/qt/main.cpp -index 8284960..225c06b 100644 ---- a/qt/main.cpp -+++ b/qt/main.cpp -@@ -308,6 +308,7 @@ main(int argc, char *argv[]) - #ifdef FALLBACK_CURSES - if (!pinentry_have_display(argc, argv)) { - pinentry_cmd_handler = curses_cmd_handler; -+ pinentry_set_flavor_flag ("curses"); - } else - #endif - { -diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c -index 3d6cd5a..a509d79 100644 ---- a/tty/pinentry-tty.c -+++ b/tty/pinentry-tty.c -@@ -556,9 +556,6 @@ tty_cmd_handler(pinentry_t pinentry) - - pinentry_cmd_handler_t pinentry_cmd_handler = tty_cmd_handler; - --/* needed to link cleanly; should never be used except for comparison -- * in pinentry/pinentry.c's cmd_getinfo(): */ --pinentry_cmd_handler_t curses_cmd_handler = NULL; - - - int --- -2.8.0.rc3 - diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch b/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch deleted file mode 100644 index f7476de1ff..0000000000 --- a/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b0e0bdeac5d40ca645afc9017778b39a26303523 Mon Sep 17 00:00:00 2001 -From: Werner Koch -Date: Wed, 11 Jan 2017 18:40:17 +0100 -Subject: [PATCH 01/25] gtk2: Fix a problem with fvwm - -* gtk+-2/pinentry-gtk-2.c (grab_pointer): Take care of -GDK_GRAB_ALREADY_GRABBED. --- - -Debian-bug-id: 850708 -Co-authored-by: Vincent Lefevre -Signed-off-by: Werner Koch ---- - gtk+-2/pinentry-gtk-2.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c -index 473c4aa..e37601f 100644 ---- a/gtk+-2/pinentry-gtk-2.c -+++ b/gtk+-2/pinentry-gtk-2.c -@@ -203,7 +203,12 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data) - (void)data; - - /* Change the cursor for the duration of the grab to indicate that -- something is going on. */ -+ * something is going on. The fvwm window manager grabs the pointer -+ * for a short time and thus we may end up with the already grabbed -+ * error code. Actually this error code should be used to detect a -+ * malicious grabbing application but with fvwm this renders -+ * Pinentry only unusable. Thus we try again several times also for -+ * that error code. See Debian bug 850708 for details. */ - /* XXX: It would be nice to have a key cursor, unfortunately there - is none readily available. */ - cursor = gdk_cursor_new_for_display (gtk_widget_get_display (win), -@@ -215,7 +220,8 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data) - NULL /* confine to */, - cursor, - gdk_event_get_time (event)); -- while (tries++ < max_tries && err == GDK_GRAB_NOT_VIEWABLE); -+ while (tries++ < max_tries && (err == GDK_GRAB_NOT_VIEWABLE -+ || err == GDK_GRAB_ALREADY_GRABBED)); - - if (err) - { --- -2.13.6 - diff --git a/app-crypt/pinentry/metadata.xml b/app-crypt/pinentry/metadata.xml index 46f4637bdd..6d11bc523c 100644 --- a/app-crypt/pinentry/metadata.xml +++ b/app-crypt/pinentry/metadata.xml @@ -1,12 +1,15 @@ - + - k_f@gentoo.org - Kristian Fiskerstrand + zlogene@gentoo.org + Mikle Kolyada - crypto@gentoo.org - Crypto + base-system@gentoo.org + Gentoo Base System + + Build dev-libs/efl based pinentry + diff --git a/app-crypt/pinentry/pinentry-1.0.0-r2.ebuild b/app-crypt/pinentry/pinentry-1.0.0-r2.ebuild deleted file mode 100644 index f1444b26ed..0000000000 --- a/app-crypt/pinentry/pinentry-1.0.0-r2.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic qmake-utils toolchain-funcs - -DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" -HOMEPAGE="https://gnupg.org/aegypten2/index.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="caps emacs gnome-keyring gtk ncurses qt5 static" - -CDEPEND=" - app-eselect/eselect-pinentry - >=dev-libs/libassuan-2.1 - >=dev-libs/libgcrypt-1.6.3 - >=dev-libs/libgpg-error-1.17 - caps? ( sys-libs/libcap ) - gnome-keyring? ( app-crypt/libsecret ) - gtk? ( x11-libs/gtk+:2 ) - ncurses? ( sys-libs/ncurses:0= ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - ) - static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) -" -DEPEND="${CDEPEND} - sys-devel/gettext - virtual/pkgconfig -" -RDEPEND="${CDEPEND} - gnome-keyring? ( app-crypt/gcr ) -" - -REQUIRED_USE=" - gtk? ( !static ) - qt5? ( !static ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -PATCHES=( - "${FILESDIR}/${PN}-0.8.2-ncurses.patch" - "${FILESDIR}/${P}-build.patch" - "${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch" - "${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch" -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - use static && append-ldflags -static - [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 - - export QTLIB="$(qt5_get_libdir)" - - econf \ - --enable-pinentry-tty \ - $(use_with caps libcap) \ - $(use_enable emacs pinentry-emacs) \ - $(use_enable gnome-keyring libsecret) \ - $(use_enable gnome-keyring pinentry-gnome3) \ - $(use_enable gtk pinentry-gtk2) \ - $(use_enable ncurses pinentry-curses) \ - $(use_enable ncurses fallback-curses) \ - $(use_enable qt5 pinentry-qt) \ - MOC="$(qt5_get_bindir)"/moc -} - -src_install() { - default - rm -f "${ED}"/usr/bin/pinentry || die - - use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4 -} - -pkg_postinst() { - if ! has_version 'app-crypt/pinentry' || has_version '=2.6.9 support memory locking for unprivileged processes." - elog "The soft resource limit for memory locking specifies the limit an" - elog "unprivileged process may lock into memory. You can also use POSIX" - elog "capabilities to allow pinentry to lock memory. To do so activate the caps" - elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" - elog "your users." - fi - - eselect pinentry update ifunset -} - -pkg_postrm() { - eselect pinentry update ifunset -} diff --git a/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild b/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild deleted file mode 100644 index 86f29751d3..0000000000 --- a/app-crypt/pinentry/pinentry-1.0.0-r3.ebuild +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic qmake-utils toolchain-funcs - -DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" -HOMEPAGE="https://gnupg.org/aegypten2/index.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="caps emacs gnome-keyring gtk ncurses qt5 static" - -CDEPEND=" - app-eselect/eselect-pinentry - >=dev-libs/libassuan-2.1 - >=dev-libs/libgcrypt-1.6.3 - >=dev-libs/libgpg-error-1.17 - caps? ( sys-libs/libcap ) - gnome-keyring? ( app-crypt/libsecret ) - gtk? ( x11-libs/gtk+:2 ) - ncurses? ( sys-libs/ncurses:0= ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - ) - static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) -" -DEPEND="${CDEPEND} - sys-devel/gettext - virtual/pkgconfig -" -RDEPEND="${CDEPEND} - gnome-keyring? ( app-crypt/gcr ) -" - -REQUIRED_USE=" - gtk? ( !static ) - qt5? ( !static ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -PATCHES=( - "${FILESDIR}/${PN}-0.8.2-ncurses.patch" - "${FILESDIR}/${P}-build.patch" - "${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch" - "${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch" - "${FILESDIR}/${P}-make-icon-work-under-Plasma-Wayland.patch" -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - use static && append-ldflags -static - [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 - - export QTLIB="$(qt5_get_libdir)" - - econf \ - --enable-pinentry-tty \ - $(use_with caps libcap) \ - $(use_enable emacs pinentry-emacs) \ - $(use_enable gnome-keyring libsecret) \ - $(use_enable gnome-keyring pinentry-gnome3) \ - $(use_enable gtk pinentry-gtk2) \ - $(use_enable ncurses pinentry-curses) \ - $(use_enable ncurses fallback-curses) \ - $(use_enable qt5 pinentry-qt) \ - MOC="$(qt5_get_bindir)"/moc -} - -src_install() { - default - rm -f "${ED}"/usr/bin/pinentry || die - - use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4 -} - -pkg_postinst() { - if ! has_version 'app-crypt/pinentry' || has_version '=2.6.9 support memory locking for unprivileged processes." - elog "The soft resource limit for memory locking specifies the limit an" - elog "unprivileged process may lock into memory. You can also use POSIX" - elog "capabilities to allow pinentry to lock memory. To do so activate the caps" - elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" - elog "your users." - fi - - eselect pinentry update ifunset -} - -pkg_postrm() { - eselect pinentry update ifunset -} diff --git a/app-crypt/pinentry/pinentry-1.1.0-r1.ebuild b/app-crypt/pinentry/pinentry-1.1.0-r1.ebuild deleted file mode 100644 index cf2bbd6858..0000000000 --- a/app-crypt/pinentry/pinentry-1.1.0-r1.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic qmake-utils toolchain-funcs - -DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" -HOMEPAGE="https://gnupg.org/aegypten2/index.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="caps emacs gnome-keyring gtk ncurses qt5 static" - -CDEPEND=" - app-eselect/eselect-pinentry - >=dev-libs/libassuan-2.1 - >=dev-libs/libgcrypt-1.6.3 - >=dev-libs/libgpg-error-1.17 - caps? ( sys-libs/libcap ) - gnome-keyring? ( app-crypt/libsecret ) - gtk? ( x11-libs/gtk+:2 ) - ncurses? ( sys-libs/ncurses:0= ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - ) - static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) -" -DEPEND="${CDEPEND} - sys-devel/gettext - virtual/pkgconfig -" -RDEPEND="${CDEPEND} - gnome-keyring? ( app-crypt/gcr ) -" - -REQUIRED_USE=" - gtk? ( !static ) - qt5? ( !static ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -PATCHES=( - "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" - "${FILESDIR}/${PN}-0.8.2-ncurses.patch" -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - use static && append-ldflags -static - [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 - - export QTLIB="$(qt5_get_libdir)" - - econf \ - --enable-pinentry-tty \ - $(use_with caps libcap) \ - $(use_enable emacs pinentry-emacs) \ - $(use_enable gnome-keyring libsecret) \ - $(use_enable gnome-keyring pinentry-gnome3) \ - $(use_enable gtk pinentry-gtk2) \ - $(use_enable ncurses pinentry-curses) \ - $(use_enable ncurses fallback-curses) \ - $(use_enable qt5 pinentry-qt) \ - MOC="$(qt5_get_bindir)"/moc -} - -src_install() { - default - rm -f "${ED}"/usr/bin/pinentry || die - - use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4 -} - -pkg_postinst() { - if ! has_version 'app-crypt/pinentry' || has_version '=2.6.9 support memory locking for unprivileged processes." - elog "The soft resource limit for memory locking specifies the limit an" - elog "unprivileged process may lock into memory. You can also use POSIX" - elog "capabilities to allow pinentry to lock memory. To do so activate the caps" - elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" - elog "your users." - fi - - eselect pinentry update ifunset -} - -pkg_postrm() { - eselect pinentry update ifunset -} diff --git a/app-crypt/pinentry/pinentry-1.1.0-r2.ebuild b/app-crypt/pinentry/pinentry-1.1.0-r2.ebuild deleted file mode 100644 index 5b9da6b3a4..0000000000 --- a/app-crypt/pinentry/pinentry-1.1.0-r2.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic qmake-utils toolchain-funcs - -DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" -HOMEPAGE="https://gnupg.org/aegypten2/index.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="caps emacs gnome-keyring fltk gtk ncurses qt5 static" - -CDEPEND=" - app-eselect/eselect-pinentry - >=dev-libs/libassuan-2.1 - >=dev-libs/libgcrypt-1.6.3 - >=dev-libs/libgpg-error-1.17 - caps? ( sys-libs/libcap ) - fltk? ( x11-libs/fltk ) - gnome-keyring? ( app-crypt/libsecret ) - gtk? ( x11-libs/gtk+:2 ) - ncurses? ( sys-libs/ncurses:0= ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - ) - static? ( >=sys-libs/ncurses-5.7-r5:0=[static-libs,-gpm] ) -" -DEPEND="${CDEPEND} - sys-devel/gettext - virtual/pkgconfig -" -RDEPEND="${CDEPEND} - gnome-keyring? ( app-crypt/gcr ) -" - -REQUIRED_USE=" - gtk? ( !static ) - qt5? ( !static ) -" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -PATCHES=( - "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" - "${FILESDIR}/${PN}-0.8.2-ncurses.patch" -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - use static && append-ldflags -static - [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 - - export QTLIB="$(qt5_get_libdir)" - - econf \ - --enable-pinentry-tty \ - $(use_with caps libcap) \ - $(use_enable emacs pinentry-emacs) \ - $(use_enable fltk pinentry-fltk) \ - $(use_enable gnome-keyring libsecret) \ - $(use_enable gnome-keyring pinentry-gnome3) \ - $(use_enable gtk pinentry-gtk2) \ - $(use_enable ncurses pinentry-curses) \ - $(use_enable ncurses fallback-curses) \ - $(use_enable qt5 pinentry-qt) \ - MOC="$(qt5_get_bindir)"/moc -} - -src_install() { - default - rm -f "${ED}"/usr/bin/pinentry || die - - use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt4 -} - -pkg_postinst() { - if ! has_version 'app-crypt/pinentry' || has_version '=2.6.9 support memory locking for unprivileged processes." - elog "The soft resource limit for memory locking specifies the limit an" - elog "unprivileged process may lock into memory. You can also use POSIX" - elog "capabilities to allow pinentry to lock memory. To do so activate the caps" - elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of" - elog "your users." - fi - - eselect pinentry update ifunset -} - -pkg_postrm() { - eselect pinentry update ifunset -} diff --git a/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild b/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild new file mode 100644 index 0000000000..90e78ab842 --- /dev/null +++ b/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic qmake-utils toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="https://gnupg.org/aegypten2" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps efl emacs gnome-keyring gtk ncurses qt5" + +DEPEND=" + >=app-eselect/eselect-pinentry-0.7.2 + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + >=dev-libs/libgpg-error-1.17 + caps? ( sys-libs/libcap ) + efl? ( dev-libs/efl[X] ) + gnome-keyring? ( app-crypt/libsecret ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +RDEPEND="${DEPEND} + gtk? ( app-crypt/gcr[gtk] ) +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" + "${FILESDIR}/${PN}-0.8.2-ncurses.patch" + "${FILESDIR}/${PN}-1.0.0-AR.patch" +) + +src_prepare() { + default + unset FLTK_CONFIG + eautoreconf +} + +src_configure() { + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + export QTLIB="$(qt5_get_libdir)" + + econf \ + $(use_enable efl pinentry-efl) \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gtk pinentry-gnome3) \ + $(use_enable ncurses fallback-curses) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable qt5 pinentry-qt) \ + $(use_with caps libcap) \ + --enable-pinentry-tty \ + --disable-pinentry-fltk \ + --disable-pinentry-gtk2 \ + MOC="$(qt5_get_bindir)"/moc \ + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" \ + LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" \ + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g') +} + +src_install() { + default + rm "${ED}"/usr/bin/pinentry || die + + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt5 +} + +pkg_postinst() { + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} diff --git a/app-crypt/pinentry/pinentry-1.2.0.ebuild b/app-crypt/pinentry/pinentry-1.2.0.ebuild new file mode 100644 index 0000000000..90e78ab842 --- /dev/null +++ b/app-crypt/pinentry/pinentry-1.2.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic qmake-utils toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="https://gnupg.org/aegypten2" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps efl emacs gnome-keyring gtk ncurses qt5" + +DEPEND=" + >=app-eselect/eselect-pinentry-0.7.2 + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + >=dev-libs/libgpg-error-1.17 + caps? ( sys-libs/libcap ) + efl? ( dev-libs/efl[X] ) + gnome-keyring? ( app-crypt/libsecret ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +RDEPEND="${DEPEND} + gtk? ( app-crypt/gcr[gtk] ) +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" + "${FILESDIR}/${PN}-0.8.2-ncurses.patch" + "${FILESDIR}/${PN}-1.0.0-AR.patch" +) + +src_prepare() { + default + unset FLTK_CONFIG + eautoreconf +} + +src_configure() { + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + export QTLIB="$(qt5_get_libdir)" + + econf \ + $(use_enable efl pinentry-efl) \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gtk pinentry-gnome3) \ + $(use_enable ncurses fallback-curses) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable qt5 pinentry-qt) \ + $(use_with caps libcap) \ + --enable-pinentry-tty \ + --disable-pinentry-fltk \ + --disable-pinentry-gtk2 \ + MOC="$(qt5_get_bindir)"/moc \ + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" \ + LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" \ + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g') +} + +src_install() { + default + rm "${ED}"/usr/bin/pinentry || die + + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt5 +} + +pkg_postinst() { + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} From 1b5b219e6e6322f37f6e67ebba4dd415e1ec1b3c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 16:42:24 +0100 Subject: [PATCH 03/40] eclass/qmake-utils: Sync with gentoo It's from gentoo commit 06e1209cececb64cd30fd48ae3c87c39c47783bb. --- eclass/qmake-utils.eclass | 237 ++------------------------------------ 1 file changed, 9 insertions(+), 228 deletions(-) diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass index 67e13d7006..1f09cbd9ca 100644 --- a/eclass/qmake-utils.eclass +++ b/eclass/qmake-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: qmake-utils.eclass @@ -6,74 +6,29 @@ # qt@gentoo.org # @AUTHOR: # Davide Pesavento +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Common functions for qmake-based packages. # @DESCRIPTION: -# Utility eclass providing wrapper functions for Qt4 and Qt5 qmake. +# Utility eclass providing wrapper functions for Qt5 qmake. # # This eclass does not set any metadata variables nor export any phase # functions. It can be inherited safely. +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_QMAKE_UTILS_ECLASS} ]]; then _QMAKE_UTILS_ECLASS=1 -[[ ${EAPI:-0} == [012345] ]] && inherit eutils multilib -inherit estack toolchain-funcs - -# @FUNCTION: qt4_get_bindir -# @DESCRIPTION: -# Echoes the directory where Qt4 binaries are installed. -# EPREFIX is already prepended to the returned path. -qt4_get_bindir() { - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX= - - local qtbindir=${EPREFIX}$(qt4_get_libdir)/bin - if [[ -d ${qtbindir} ]]; then - echo ${qtbindir} - else - echo ${EPREFIX}/usr/bin - fi -} - -# @FUNCTION: qt4_get_headerdir -# @DESCRIPTION: -# Echoes the directory where Qt4 headers are installed. -qt4_get_headerdir() { - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - echo /usr/include/qt4 -} - -# @FUNCTION: qt4_get_libdir -# @DESCRIPTION: -# Echoes the directory where Qt4 libraries are installed. -qt4_get_libdir() { - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - echo /usr/$(get_libdir)/qt4 -} - -# @FUNCTION: qt4_get_mkspecsdir -# @DESCRIPTION: -# Echoes the directory where Qt4 mkspecs are installed. -qt4_get_mkspecsdir() { - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - echo /usr/share/qt4/mkspecs -} - -# @FUNCTION: qt4_get_plugindir -# @DESCRIPTION: -# Echoes the directory where Qt4 plugins are installed. -qt4_get_plugindir() { - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - echo $(qt4_get_libdir)/plugins -} +inherit toolchain-funcs # @FUNCTION: qt5_get_bindir # @DESCRIPTION: # Echoes the directory where Qt5 binaries are installed. # EPREFIX is already prepended to the returned path. qt5_get_bindir() { - has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX= - echo ${EPREFIX}$(qt5_get_libdir)/qt5/bin } @@ -105,180 +60,6 @@ qt5_get_plugindir() { echo $(qt5_get_libdir)/qt5/plugins } -# @FUNCTION: qmake-utils_find_pro_file -# @RETURN: zero or one qmake .pro file names -# @INTERNAL -# @DESCRIPTION: -# Outputs a project file name that can be passed to eqmake. -# 0 *.pro files found --> outputs null string; -# 1 *.pro file found --> outputs its name; -# 2 or more *.pro files found --> if "${PN}.pro" or -# "$(basename ${S}).pro" are there, outputs one of them. -qmake-utils_find_pro_file() { - local dir_name=$(basename "${S}") - - # set nullglob to avoid expanding *.pro to the literal - # string "*.pro" when there are no matching files - eshopts_push -s nullglob - local pro_files=(*.pro) - eshopts_pop - - case ${#pro_files[@]} in - 0) - : ;; - 1) - echo "${pro_files}" - ;; - *) - for pro_file in "${pro_files[@]}"; do - if [[ ${pro_file%.pro} == ${dir_name} || ${pro_file%.pro} == ${PN} ]]; then - echo "${pro_file}" - break - fi - done - ;; - esac -} - -# @VARIABLE: EQMAKE4_EXCLUDE -# @DEFAULT_UNSET -# @DESCRIPTION: -# List of files to be excluded from eqmake4 CONFIG processing. -# Paths are relative to the current working directory (usually ${S}). -# -# Example: EQMAKE4_EXCLUDE="ignore/me.pro foo/*" - -# @FUNCTION: eqmake4 -# @USAGE: [project_file] [parameters to qmake] -# @DESCRIPTION: -# Wrapper for Qt4's qmake. If project_file is not specified, eqmake4 looks -# for one in the current directory (non-recursively). If multiple project -# files are found, then ${PN}.pro is used, if it exists, otherwise eqmake4 -# will not be able to continue. -# -# All other arguments are appended unmodified to qmake command line. -# -# For recursive build systems, i.e. those based on the subdirs template, -# you should run eqmake4 on the top-level project file only, unless you -# have a valid reason to do otherwise. During the building, qmake will -# be automatically re-invoked with the right arguments on every directory -# specified inside the top-level project file. -eqmake4() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${EAPI:-0} == [0123456] ]] || die "${FUNCNAME[1]} is banned in EAPI 7 and later" - has "${EAPI:-0}" 0 1 2 && use !prefix && EPREFIX= - - ebegin "Running qmake" - - local qmake_args=("$@") - - # Check if the project file name was passed as first argument. If not, look for candidates. - local regexp='.*\.pro' - if ! [[ ${1} =~ ${regexp} ]]; then - local project_file=$(qmake-utils_find_pro_file) - if [[ -z ${project_file} ]]; then - echo - eerror "No project files found in '${PWD}'" - eerror "This shouldn't happen - please send a bug report to https://bugs.gentoo.org/" - echo - die "eqmake4 failed" - fi - qmake_args+=("${project_file}") - fi - - # Make sure the CONFIG variable is correctly set for both release and debug builds. - local config_add=release - local config_remove=debug - if in_iuse debug && use debug; then - config_add=debug - config_remove=release - fi - - local awkscript='BEGIN { - printf "### eqmake4 was here ###\n" > file; - printf "CONFIG -= debug_and_release %s\n", remove >> file; - printf "CONFIG += %s\n\n", add >> file; - fixed=0; - } - /^[[:blank:]]*CONFIG[[:blank:]]*[\+\*]?=/ { - if (gsub("\\<((" remove ")|(debug_and_release))\\>", "") > 0) { - fixed=1; - } - } - /^[[:blank:]]*CONFIG[[:blank:]]*-=/ { - if (gsub("\\<" add "\\>", "") > 0) { - fixed=1; - } - } - { - print >> file; - } - END { - print fixed; - }' - - [[ -n ${EQMAKE4_EXCLUDE} ]] && eshopts_push -o noglob - - local file - while read file; do - local excl - for excl in ${EQMAKE4_EXCLUDE}; do - [[ ${file} == ${excl} ]] && continue 2 - done - grep -q '^### eqmake4 was here ###$' "${file}" && continue - - local retval=$({ - rm -f "${file}" || echo FAIL - awk -v file="${file}" \ - -v add=${config_add} \ - -v remove=${config_remove} \ - -- "${awkscript}" || echo FAIL - } < "${file}") - - if [[ ${retval} == 1 ]]; then - einfo " - fixed CONFIG in ${file}" - elif [[ ${retval} != 0 ]]; then - eerror " - error while processing ${file}" - die "eqmake4 failed to process ${file}" - fi - done < <(find . -type f -name '*.pr[io]' -printf '%P\n' 2>/dev/null) - - [[ -n ${EQMAKE4_EXCLUDE} ]] && eshopts_pop - - "$(qt4_get_bindir)"/qmake \ - -makefile \ - QMAKE_AR="$(tc-getAR) cqs" \ - QMAKE_CC="$(tc-getCC)" \ - QMAKE_CXX="$(tc-getCXX)" \ - QMAKE_LINK="$(tc-getCXX)" \ - QMAKE_LINK_C="$(tc-getCC)" \ - QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \ - QMAKE_RANLIB= \ - QMAKE_STRIP= \ - QMAKE_CFLAGS="${CFLAGS}" \ - QMAKE_CFLAGS_RELEASE= \ - QMAKE_CFLAGS_DEBUG= \ - QMAKE_CXXFLAGS="${CXXFLAGS}" \ - QMAKE_CXXFLAGS_RELEASE= \ - QMAKE_CXXFLAGS_DEBUG= \ - QMAKE_LFLAGS="${LDFLAGS}" \ - QMAKE_LFLAGS_RELEASE= \ - QMAKE_LFLAGS_DEBUG= \ - QMAKE_LIBDIR_QT="${EPREFIX}$(qt4_get_libdir)" \ - QMAKE_LIBDIR_X11="${EPREFIX}/usr/$(get_libdir)" \ - QMAKE_LIBDIR_OPENGL="${EPREFIX}/usr/$(get_libdir)" \ - "${qmake_args[@]}" - - if ! eend $? ; then - echo - eerror "Running qmake has failed! (see above for details)" - eerror "This shouldn't happen - please send a bug report to https://bugs.gentoo.org/" - echo - die "eqmake4 failed" - fi -} - # @FUNCTION: eqmake5 # @USAGE: [arguments for qmake] # @DESCRIPTION: From a1251cd8cc18dd6339c3714a514bb154078431f3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 16:43:14 +0100 Subject: [PATCH 04/40] app-portage/elt-patches: Sync with gentoo It's from gentoo commit 0e10776af4fb7aaed1080b1404a1da98976f6edd. --- app-portage/elt-patches/Manifest | 7 +++--- .../elt-patches/elt-patches-20170317.ebuild | 20 --------------- .../elt-patches/elt-patches-20170422.ebuild | 24 ------------------ .../elt-patches/elt-patches-20170815.ebuild | 24 ------------------ .../elt-patches/elt-patches-20170826.1.ebuild | 24 ------------------ .../elt-patches/elt-patches-20201205.ebuild | 23 +++++++++++++++++ .../elt-patches/elt-patches-20210924.ebuild | 24 ++++++++++++++++++ .../elt-patches/elt-patches-20211104.ebuild | 25 +++++++++++++++++++ app-portage/elt-patches/metadata.xml | 2 +- 9 files changed, 76 insertions(+), 97 deletions(-) delete mode 100644 app-portage/elt-patches/elt-patches-20170317.ebuild delete mode 100644 app-portage/elt-patches/elt-patches-20170422.ebuild delete mode 100644 app-portage/elt-patches/elt-patches-20170815.ebuild delete mode 100644 app-portage/elt-patches/elt-patches-20170826.1.ebuild create mode 100644 app-portage/elt-patches/elt-patches-20201205.ebuild create mode 100644 app-portage/elt-patches/elt-patches-20210924.ebuild create mode 100644 app-portage/elt-patches/elt-patches-20211104.ebuild diff --git a/app-portage/elt-patches/Manifest b/app-portage/elt-patches/Manifest index a0bca80eff..4cd226b41e 100644 --- a/app-portage/elt-patches/Manifest +++ b/app-portage/elt-patches/Manifest @@ -1,4 +1,3 @@ -DIST elt-patches-20170317.tar.xz 23356 BLAKE2B 8e402496e4c064a56a6bafbf369bf97710fa28fa0744356ce5c1b52f1866c0683b80d7d5971288bbaaf88cce0ec717956904f2f5969f22a3f1d11a8444b3866a SHA512 28da9a214cd2bccebad45f464a414fedf80fc6b497d1f6b8f30a0a67570a614065ef67ce43316872d94a144de1a154ecd164a47009ebcd7d39128ccc2dd39618 -DIST elt-patches-20170422.tar.xz 27864 BLAKE2B 0b6a764a7030d78618139f2c2a51f33b224f38e9f117ce45d119375e20566df55266f9684b53d3d311f91570803f937922f93801ad5a3664dae70828ebbedd12 SHA512 90867925f797ec815cfd8f45655cbc0bdc5f46e1a84792988ca76aaed97489907a926acf8f50c0499c56f6e70ea7081732f71c74a8d49bf24a6d265a0a4202dc -DIST elt-patches-20170815.tar.xz 27864 BLAKE2B ca699e3fc3f5903f660fba70aa424603d42ef3b3aaa5e8768cfad0561d423972b21e75e578faeaaa89d8b0932f5161079a57e5d0d4ab7b56d5a09b91fb0e8d46 SHA512 deba10767b6a8cb5e8139e6f47a30e6f8a4a9312adb1d3e0199df24321d89601915fc91003da2d14fda679e7cbd30a4d4cf39d94ba57bce06432eefc168650dd -DIST elt-patches-20170826.1.tar.xz 27912 BLAKE2B 886644713651448784e040fbcde6ef11f98f12abffb347f2213b990c1f0ec2df3af6c729c18781235a393e6de907b4da6ec5d140f7fb856466de6e7cefd54b00 SHA512 30a1e8b77d2963b7c56eef3a7a0a576ea6d30f1133c7bf6ad3b5b57cbe3e2de5e8cfbc50a929fea589b42ca02802a7ed16ccf7adb868290a2cc3add5b4fc77d3 +DIST elt-patches-20201205.tar.xz 39240 BLAKE2B aa2e2377f0d0cba14f38c59664174d066eff04c9d2a71346c998c4324987fbce25cfd91b79e8e40bde0d81bf7d3c43126bffd0a6b0b219aaad11f4f9f22abde4 SHA512 67e199f060e2c93e01b7a7809f52c0a18d82e86f1b1eb34b965c2acd24e5538a874b820028e363d3002cf58b43c2fe3376ae28d2bef0ca81feabb90c83ae47c2 +DIST elt-patches-20210924.tar.xz 40140 BLAKE2B 81970936e9a362cb9ee51a381e4fd2f888c62df2fdcf7af419c3574d37857988c92daa3b1b90530f453aa532161dd0bdd3697d4c3b0a0a47a05a7546e7fd5052 SHA512 3a55d053e488590a78bbfe0a4eb3153ea51ca70784708e0131016771a1c1dab591a42442b2d97d1a335c9a209fc03410df3cd56741d6f7cffb92d0737c5944c2 +DIST elt-patches-20211104.tar.xz 41608 BLAKE2B 971ec0f6753267d49a64ab65645ac547322fa4cfe64b3102bbaa4419c0ed0973c0ee44e40c15b2d34e94979cbe9c64b027f4bb7c5adf3d3acee07f3f98bd7704 SHA512 c583bfa45eb16835f83a881eb587c81f0fb2cfd3eff5239e794efb83c046f5cecceeee3f5387585b9d7f68efe5f439344d2cdfc83c9fad5b207e82dff3d8cc67 diff --git a/app-portage/elt-patches/elt-patches-20170317.ebuild b/app-portage/elt-patches/elt-patches-20170317.ebuild deleted file mode 100644 index caa6aeec92..0000000000 --- a/app-portage/elt-patches/elt-patches-20170317.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~x86-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="" - -DEPEND="app-arch/xz-utils" - -src_install() { - insinto /usr/share/elt-patches - doins -r . -} diff --git a/app-portage/elt-patches/elt-patches-20170422.ebuild b/app-portage/elt-patches/elt-patches-20170422.ebuild deleted file mode 100644 index 0b584e06a8..0000000000 --- a/app-portage/elt-patches/elt-patches-20170422.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~x86-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="" - -RDEPEND="sys-apps/gentoo-functions" -DEPEND="app-arch/xz-utils" - -src_compile() { - emake prefix="${EPREFIX}/usr" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install -} diff --git a/app-portage/elt-patches/elt-patches-20170815.ebuild b/app-portage/elt-patches/elt-patches-20170815.ebuild deleted file mode 100644 index cb84f664c0..0000000000 --- a/app-portage/elt-patches/elt-patches-20170815.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~x86-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="" - -RDEPEND="sys-apps/gentoo-functions" -DEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX%/}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX%/}" install -} diff --git a/app-portage/elt-patches/elt-patches-20170826.1.ebuild b/app-portage/elt-patches/elt-patches-20170826.1.ebuild deleted file mode 100644 index 3439c84d86..0000000000 --- a/app-portage/elt-patches/elt-patches-20170826.1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~x86-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="" - -RDEPEND="sys-apps/gentoo-functions" -DEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX%/}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX%/}" install -} diff --git a/app-portage/elt-patches/elt-patches-20201205.ebuild b/app-portage/elt-patches/elt-patches-20201205.ebuild new file mode 100644 index 0000000000..2723789299 --- /dev/null +++ b/app-portage/elt-patches/elt-patches-20201205.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Collection of patches for libtool.eclass" +HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" +SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +BDEPEND="app-arch/xz-utils" + +src_compile() { + emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" rootprefix="${EPREFIX}" install +} diff --git a/app-portage/elt-patches/elt-patches-20210924.ebuild b/app-portage/elt-patches/elt-patches-20210924.ebuild new file mode 100644 index 0000000000..b228aabe08 --- /dev/null +++ b/app-portage/elt-patches/elt-patches-20210924.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="Collection of patches for libtool.eclass" +HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" +SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +BDEPEND="app-arch/xz-utils" + +src_compile() { + emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" rootprefix="${EPREFIX}" install +} diff --git a/app-portage/elt-patches/elt-patches-20211104.ebuild b/app-portage/elt-patches/elt-patches-20211104.ebuild new file mode 100644 index 0000000000..9cf32e76ec --- /dev/null +++ b/app-portage/elt-patches/elt-patches-20211104.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="Collection of patches for libtool.eclass" +HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" +SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +BDEPEND="app-arch/xz-utils" + +src_compile() { + emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" rootprefix="${EPREFIX}" install +} diff --git a/app-portage/elt-patches/metadata.xml b/app-portage/elt-patches/metadata.xml index f540000d5a..65e1fc82d8 100644 --- a/app-portage/elt-patches/metadata.xml +++ b/app-portage/elt-patches/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org From 073f33dcf220879b01b3bc85d6ef5987dc6a1e08 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 16:43:38 +0100 Subject: [PATCH 05/40] sys-devel/flex: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- sys-devel/flex/Manifest | 2 - .../flex/files/flex-2.6.3-reentrant.patch | 82 ------------------ sys-devel/flex/flex-2.6.1.ebuild | 77 ----------------- sys-devel/flex/flex-2.6.3-r1.ebuild | 84 ------------------- sys-devel/flex/flex-2.6.3.ebuild | 78 ----------------- sys-devel/flex/flex-2.6.4-r1.ebuild | 26 +++--- sys-devel/flex/flex-2.6.4.ebuild | 81 ------------------ sys-devel/flex/metadata.xml | 5 +- 8 files changed, 15 insertions(+), 420 deletions(-) delete mode 100644 sys-devel/flex/files/flex-2.6.3-reentrant.patch delete mode 100644 sys-devel/flex/flex-2.6.1.ebuild delete mode 100644 sys-devel/flex/flex-2.6.3-r1.ebuild delete mode 100644 sys-devel/flex/flex-2.6.3.ebuild delete mode 100644 sys-devel/flex/flex-2.6.4.ebuild diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest index 14e6b2bca9..327f0405ed 100644 --- a/sys-devel/flex/Manifest +++ b/sys-devel/flex/Manifest @@ -1,3 +1 @@ -DIST flex-2.6.1.tar.xz 835048 BLAKE2B 5b0b67774d1ba2d4b2ad8a8cba1f0b8fed9aecdae387e54e6cb8fd1c0c9ef78559bc1a6fe6b97f984f16b438d350de4dccda7e3427d71fead9073ab6616b0ecc SHA512 1e35d0447f59139b98ede085d1a603d4f61cf8bc11cf2e291a3f492a05c60ee61535481b878585cd6843cd9b3c7952c834adfa78a6a71c64802e7b3069dec9d1 -DIST flex-2.6.3.tar.gz 1405560 BLAKE2B 2aa9ca18f2ab124db9567e2d2ee512881a71755342bdcbd05ef536653396d1e4ed47dafc1227531bf9e9a610d9c5aa2d924bf864b18c5a618b2ccb61db7fef4e SHA512 f14b1af7ddd148660737991787fcf13d86cc0bef3859ed6c2135963373e76524d70382795c845cb6491b0435f8c40ba81e17f15267592b8d1656cfd4c3430b00 DIST flex-2.6.4.tar.gz 1419096 BLAKE2B c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62 SHA512 e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e diff --git a/sys-devel/flex/files/flex-2.6.3-reentrant.patch b/sys-devel/flex/files/flex-2.6.3-reentrant.patch deleted file mode 100644 index f2f5eb8374..0000000000 --- a/sys-devel/flex/files/flex-2.6.3-reentrant.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 078b46c69d063aef1715b11348a2871d6036f253 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Sun, 22 Jan 2017 18:34:30 +0100 -Subject: [PATCH] Add more defines in the non-reentrant part. - -Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks -code that does #ifndef yywrap .. ---- - src/flex.skl | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/src/flex.skl b/src/flex.skl -index 190700f..6a7cde4 100644 ---- a/src/flex.skl -+++ b/src/flex.skl -@@ -61,11 +61,17 @@ m4_changequote([[, ]]) - m4_ifelse(M4_YY_PREFIX,yy,, - #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]] - #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]] --#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] -+#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]] -+#define yy_scan_string M4_YY_PREFIX[[_scan_string]] -+#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]] - #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]] - #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]] - #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]] - #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]] -+#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]] -+#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]] -+#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]] -+#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] - #define yyin M4_YY_PREFIX[[in]] - #define yyleng M4_YY_PREFIX[[leng]] - #define yylex M4_YY_PREFIX[[lex]] -@@ -107,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]]) - - m4preproc_define(`M4_GEN_PREFIX', - ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]] --m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') -+%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - - %if-c++-only - /* The c++ scanner is a mess. The FlexLexer.h header file relies on the -@@ -120,6 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - %endif - - %if-c-only -+m4_ifelse(M4_YY_PREFIX,yy,, - M4_GEN_PREFIX(`_create_buffer') - M4_GEN_PREFIX(`_delete_buffer') - M4_GEN_PREFIX(`_scan_buffer') -@@ -155,6 +162,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') - M4_GEN_PREFIX(`set_column') - ]]) - M4_GEN_PREFIX(`wrap') -+) - %endif - - m4_ifdef( [[M4_YY_BISON_LVAL]], -@@ -170,11 +178,14 @@ m4_ifdef( [[]], - ]]) - - -+m4_ifelse(M4_YY_PREFIX,yy,, - M4_GEN_PREFIX(`alloc') - M4_GEN_PREFIX(`realloc') - M4_GEN_PREFIX(`free') -+) - - %if-c-only -+m4_ifelse(M4_YY_PREFIX,yy,, - m4_ifdef( [[M4_YY_NOT_REENTRANT]], - [[ - M4_GEN_PREFIX(`text') -@@ -184,6 +195,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]], - M4_GEN_PREFIX(`_flex_debug') - M4_GEN_PREFIX(`lineno') - ]]) -+) - %endif - - diff --git a/sys-devel/flex/flex-2.6.1.ebuild b/sys-devel/flex/flex-2.6.1.ebuild deleted file mode 100644 index 2e215d2cec..0000000000 --- a/sys-devel/flex/flex-2.6.1.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" -SRC_URI="https://github.com/westes/flex/releases/download/v${PV}/${P}.tar.xz" - -LICENSE="FLEX" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls static test" - -# We want bison explicitly and not yacc in general #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.3-r1.ebuild b/sys-devel/flex/flex-2.6.3-r1.ebuild deleted file mode 100644 index 0388ee0732..0000000000 --- a/sys-devel/flex/flex-2.6.3-r1.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" -SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="FLEX" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls static test" - -# We want bison explicitly and not yacc in general #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -PATCHES=( - "${FILESDIR}/${P}-reentrant.patch" -) - -src_prepare() { - epatch "${PATCHES[@]}" - - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.3.ebuild b/sys-devel/flex/flex-2.6.3.ebuild deleted file mode 100644 index ac7909b9ac..0000000000 --- a/sys-devel/flex/flex-2.6.3.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" -SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="FLEX" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls static test" - -# We want bison explicitly and not yacc in general #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/flex-2.6.4-r1.ebuild b/sys-devel/flex/flex-2.6.4-r1.ebuild index aabb6529af..592b017eec 100644 --- a/sys-devel/flex/flex-2.6.4-r1.ebuild +++ b/sys-devel/flex/flex-2.6.4-r1.ebuild @@ -1,23 +1,23 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -inherit eutils flag-o-matic libtool multilib-minimal +inherit flag-o-matic libtool multilib-minimal toolchain-funcs DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" +HOMEPAGE="https://github.com/westes/flex" SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" LICENSE="FLEX" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="nls static test" +RESTRICT="!test? ( test )" # We want bison explicitly and not yacc in general #381273 RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils +BDEPEND="${RDEPEND} nls? ( sys-devel/gettext ) test? ( sys-devel/bison )" @@ -49,17 +49,16 @@ multilib_src_configure() { # Do not install shared libs #503522 ECONF_SOURCE=${S} \ econf \ + CC_FOR_BUILD="$(tc-getBUILD_CC)" \ --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} + $(use_enable nls) } multilib_src_compile() { if multilib_is_native_abi; then default else - cd src || die - emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' + emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' fi } @@ -71,15 +70,14 @@ multilib_src_install() { if multilib_is_native_abi; then default else - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS + emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS fi } multilib_src_install_all() { einstalldocs dodoc ONEWS - prune_libtool_files --all + find "${ED}" -name '*.la' -type f -delete || die rm "${ED}"/usr/share/doc/${PF}/COPYING || die dosym flex /usr/bin/lex } diff --git a/sys-devel/flex/flex-2.6.4.ebuild b/sys-devel/flex/flex-2.6.4.ebuild deleted file mode 100644 index 10a615880b..0000000000 --- a/sys-devel/flex/flex-2.6.4.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils flag-o-matic libtool multilib-minimal - -DESCRIPTION="The Fast Lexical Analyzer" -HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" -SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="FLEX" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls static test" - -# We want bison explicitly and not yacc in general #381273 -RDEPEND="sys-devel/m4" -DEPEND="${RDEPEND} - app-arch/xz-utils - nls? ( sys-devel/gettext ) - test? ( sys-devel/bison )" - -src_prepare() { - #epatch "${PATCHES[@]}" - epatch_user - - # Disable running in the tests/ subdir as it has a bunch of built sources - # that cannot be made conditional (automake limitation). #568842 - if ! use test ; then - sed -i \ - -e '/^SUBDIRS =/,/^$/{/tests/d}' \ - Makefile.in || die - fi - elibtoolize # Prefix always needs this -} - -src_configure() { - use static && append-ldflags -static - - multilib-minimal_src_configure -} - -multilib_src_configure() { - # Do not install shared libs #503522 - ECONF_SOURCE=${S} \ - econf \ - --disable-shared \ - $(use_enable nls) \ - --docdir='$(datarootdir)/doc/'${PF} -} - -multilib_src_compile() { - if multilib_is_native_abi; then - default - else - cd src || die - emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' - fi -} - -multilib_src_test() { - multilib_is_native_abi && emake check -} - -multilib_src_install() { - if multilib_is_native_abi; then - default - else - cd src || die - emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS - fi -} - -multilib_src_install_all() { - einstalldocs - dodoc ONEWS - prune_libtool_files --all - rm "${ED}"/usr/share/doc/${PF}/COPYING || die - dosym flex /usr/bin/lex -} diff --git a/sys-devel/flex/metadata.xml b/sys-devel/flex/metadata.xml index 6f7c81d076..b08413e6cf 100644 --- a/sys-devel/flex/metadata.xml +++ b/sys-devel/flex/metadata.xml @@ -1,5 +1,5 @@ - - + + base-system@gentoo.org @@ -8,5 +8,6 @@ flex westes/flex + cpe:/a:flex_project:flex From 7b08c2f66616865b566eb1d9266c8bdc25df535b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:19:17 +0100 Subject: [PATCH 06/40] sys-apps/sandbox: Sync with gentoo It's from gentoo commit 36d4dacd971f39bd0ecde7d93216de68c8efe31a. --- sys-apps/sandbox/Manifest | 21 ++- .../files/sandbox-2.10-disable-same.patch | 77 ----------- .../files/sandbox-2.10-fix-opendir.patch | 79 ----------- .../sandbox-2.10-memory-corruption.patch | 42 ------ .../sandbox-2.11-symlinkat-renameat.patch | 124 ------------------ .../files/sandbox-3.1-label-decl.patch | 41 ++++++ sys-apps/sandbox/metadata.xml | 5 +- sys-apps/sandbox/sandbox-2.10-r3.ebuild | 84 ------------ sys-apps/sandbox/sandbox-2.10-r4.ebuild | 85 ------------ sys-apps/sandbox/sandbox-2.12.ebuild | 76 ----------- sys-apps/sandbox/sandbox-2.13.ebuild | 76 ----------- sys-apps/sandbox/sandbox-2.24.ebuild | 63 +++++++++ sys-apps/sandbox/sandbox-2.25.ebuild | 63 +++++++++ sys-apps/sandbox/sandbox-2.26.ebuild | 58 ++++++++ sys-apps/sandbox/sandbox-2.27.ebuild | 62 +++++++++ sys-apps/sandbox/sandbox-2.28.ebuild | 62 +++++++++ sys-apps/sandbox/sandbox-2.29.ebuild | 62 +++++++++ sys-apps/sandbox/sandbox-3.0.ebuild | 62 +++++++++ sys-apps/sandbox/sandbox-3.1.ebuild | 66 ++++++++++ 19 files changed, 551 insertions(+), 657 deletions(-) delete mode 100644 sys-apps/sandbox/files/sandbox-2.10-disable-same.patch delete mode 100644 sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch delete mode 100644 sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch delete mode 100644 sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch create mode 100644 sys-apps/sandbox/files/sandbox-3.1-label-decl.patch delete mode 100644 sys-apps/sandbox/sandbox-2.10-r3.ebuild delete mode 100644 sys-apps/sandbox/sandbox-2.10-r4.ebuild delete mode 100644 sys-apps/sandbox/sandbox-2.12.ebuild delete mode 100644 sys-apps/sandbox/sandbox-2.13.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.24.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.25.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.26.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.27.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.28.ebuild create mode 100644 sys-apps/sandbox/sandbox-2.29.ebuild create mode 100644 sys-apps/sandbox/sandbox-3.0.ebuild create mode 100644 sys-apps/sandbox/sandbox-3.1.ebuild diff --git a/sys-apps/sandbox/Manifest b/sys-apps/sandbox/Manifest index db59a075f6..b3f61f637d 100644 --- a/sys-apps/sandbox/Manifest +++ b/sys-apps/sandbox/Manifest @@ -1,13 +1,8 @@ -AUX 09sandbox 37 BLAKE2B 181213e2cc0bcfa328310cced40bfaba4530d8d2f80e892cb5649d5277c5d59d345ce96ca802a5529a22892c929bafac04c616458fa147a3bee5c89d31b0baf1 SHA512 4e8a9c58debde6480224a45559c5f2db4765213d151e47937f9142f110cac3681bf6402acaf21249a37bb17398e7bc00ae7feee68ecdb5b9363c432eac1b052a -AUX sandbox-2.10-disable-same.patch 2547 BLAKE2B 72976e698d1e95cc9153745744e3e9790ade9923ade2459b66969fdd04b0532fad70f08babaf5bbf2240deba9fb92a4a1090cfaec7b2d9a85d6d98adb23926f9 SHA512 bf005fbde7b6ba88df36bb75064658764e488dd2f3c96a6f92c69ad3f2e8d2db12ba2c7bafa9656326b7fde73301c330f68bd064efa0fce2a7eb28fff6ce0a1e -AUX sandbox-2.10-fix-opendir.patch 3311 BLAKE2B d8a604720da1c623e7299215298d6ce3502b58641006e2667047a2477a85e4c071426ae30e5f0a436dfe3d74cc4f34de7fab6729dafec6acddb44974edffe619 SHA512 5c0650d6838b8171a87409ebd8565a90a42603874893708c2cdee5b50535e637f145fa2e51142db857c35a9bc11713b45b7e50c31f96f9ecd6ba342ce8d87928 -AUX sandbox-2.10-memory-corruption.patch 1515 BLAKE2B 2c0ef4ca1899efd2d525aafb26dcb7ecaf40c3b107e38e3c5d1a39455dd2cd36f8ac8fff43bb1dec22b910e479f328fa139a02f5a8f584ecefcf0ed86e60ad6a SHA512 1eb650824cc7a876fabef382cafb451a507326a8422fb7bb5014699046b64ea8f4cf2bba9efcb75d7a2eac4eff493d06153422f85c119f49635ac0840071660c -AUX sandbox-2.11-symlinkat-renameat.patch 3418 BLAKE2B 4864dd5794abbf70d70f30949ee39921f9dafea4445f4cd49d88a5bef9b19769ed0c2c37a7a30fd6e241c159b21aad4f6465ef159ec1652cbb0d4a65e6531869 SHA512 cbefae8aa9c289db0bfe7b2429f64aa4c437be0e269eaa657eb3b22a3086db1fca45a624cb181978b4157f0cb9b475b4ece2eb9337285bf8bede709ad4431c52 -DIST sandbox-2.10.tar.xz 417068 BLAKE2B 78bb5b29b520d41c582e7f7cb444ce580f9f8f05ce80795986ff8e1f84f9320e21fda0c5ae092cce8e5a3dc1c0efa48e1ce69c21107e541d2c569e6369ccb5b0 SHA512 178b3b8fcb54e6ff67df1c8101866739b49e4d31a66717c21ef502dd2ab609fca70f1a0c662b913e207bfc1ba6994cefdcf5c92ff32add9dd98bd9707f301305 -DIST sandbox-2.12.tar.xz 424252 BLAKE2B 55eb06cbc15ad9ff8b0c272b8d071591ce3533a6ff807719df79131e6c966d60c3b37d9d8e4e1d466df0992836c4594bf6927b496ecb343a71d7b0656219a6d7 SHA512 98bd2ee8807d81e65ee0c9f11cfaf2b37da2ee4d8763c68d18c0ff6b14f3cc847ae2d3a0aa30cbe86063a2108ed4d4dcf7cc3fc4f37cb7549d266d4c1989c2a9 -DIST sandbox-2.13.tar.xz 424968 BLAKE2B efcbf527853e8cfe8b3fec026041f55f51cba78029f92195ec76a45e84cb2b6cc129267c6e50608584607de72a86b2e7836e77f20677de9b94bb5c40999e4712 SHA512 46ad79335e51a1ec0aaa34ab5eeabe9d007818c518682409c5aaf97d49ec23021ece8fa53264ce5332cdd04ef6b3fd9beff0dc0a3cb5dfe2f9b6a6e359f8c1cf -EBUILD sandbox-2.10-r3.ebuild 2156 BLAKE2B fecdef4a769d481e6479c82c341626de5d935f031b33df13eaae51b2041e0793a9854f3726ae90586586dc7d0008230f7ba6ae948c48d145d5c05bd4fd0aa027 SHA512 a08a00c80dcd282c929078c7c3afed16a7c30d710294e1621cf2ca1841f01f95872dd92a0bea1f3d7bb8850c05cffcefb68c58a36c9b1eac1960d1d4b04e3224 -EBUILD sandbox-2.10-r4.ebuild 2222 BLAKE2B 5f0e178bafb0f28dcf320452c64317d9883afee0a68c09190e3293bd857b5ee816e4656b01b5e1dbb7664802d0e13a05540ab4ba61a04c93788dc1d21cee7c95 SHA512 dca8808e22888f5542a1233604a84b0a5e9952bf6e8792b24a716e477b254fc90ac1efc0cff0eccf832f10026cf56341011e227001c70f0d5eaab36c89b5a23c -EBUILD sandbox-2.12.ebuild 1931 BLAKE2B cd545ca0c7b3b1ca9672e7a0562da03b9eae5dbef36cec7d1eb59d452785ee8f11c03b9a25a9cfe0862a923d5b0f9349c15c6076f9735062cb43505607520b73 SHA512 2a5ec9b1aacfb63d3c4d8f64d067091ab28c7f54ca295a857d14d11d1f4e410c5475cf32d0801cfa1362ce57045da0ef5e1f413a1b56dc541c5efe56d4410d7c -EBUILD sandbox-2.13.ebuild 1938 BLAKE2B 26db9bc8c8334a4a20bcb09765861f6ed6b6a3da6edd02cc9438943fc18271a9ffa90a26d37e2f648cdd5073a22de71decc21417db1ea331833f11d146f5ce4d SHA512 11cd256384d562de308cd579a04c3742dc436a8e3f4e30cc66d837373c2352b99b23bd4fbfee6fa61b74b7e1eaae95b7ffec1f0fb9785979b783c17f420cdbe7 -MISC metadata.xml 252 BLAKE2B d709f9b334b2810c5ffe7d73ef430f0f347f26f7649bca4bb8803c8e0be106534bcee6efae4f80b6fb1781b09284bb3dbc32d8dff4a3aa01a924fd3437b9da7c SHA512 de8b6a78dcc379d1d34960caecdab8da9fdb9a9f010ec8611cab79487b5f28f6ae80c8b0884731fa91c4ae98482a195faa8d1ec911b1d95fafdfe9cd622cc5d9 +DIST sandbox-2.24.tar.xz 438408 BLAKE2B 5e725d17da0abc06d56216f4df2f4034076f50163db1c3bbddbf4fd07dbd5b7d92ef2f1b2c01eb77ff6cf531c5cc6a05e60b028f585310ac56eef96240882843 SHA512 8df5414e334a15f367acfd218ba1b74ba618b93d7bdeca8a039b69cbd81ab048ec5a6cecb24df09fa9a5f4fe214d647acf5138004defd45e6396eec5ae7c93d0 +DIST sandbox-2.25.tar.xz 436004 BLAKE2B c9c7d351cdefbb2b1a585904c38742a5a3bde50d3d690c57cff9cdc71ffb822e78a2b56c47afd03fbc70834de5dda13c5a300d9d6b35e09ec400a050d4f8e82c SHA512 4e998c4d9ba6eb69369cc49849060a2e90535eae91fbb64c4d46371fe0ed5182413b14674f10c773fd997b6895bc870ccb23586351f5bb06b69dc11a0cddbe1d +DIST sandbox-2.26.tar.xz 444412 BLAKE2B 3bc88d86ba4e2522895c4448dff6da2cffceb912e5ff9610fe4c3aea255ffd9b9ca9bbe8e45d94508f45e9c141aa6945a9a8d82cba0f3ca102ff6a1624c84161 SHA512 f20766daf2ce43753772a184c86a7b6847f96ab7b60b202616e15d791bc1f770162035a9b1ffe38765dff8d2567ad971a9a2bdeba9a8769845a758fcd95206fa +DIST sandbox-2.27.tar.xz 448948 BLAKE2B 03a311c8c7c8719bac398e39ce49e7149bdaa1d5b2811f395eb2251a32aabba995f97c3d5d27461aadb64bf43adf2b0cbaa7c2f141dd86f64f8dd326422ac104 SHA512 2a53e6fc87cec975962737b1fadc447d86985d27b18ad2caed711116da2ba435f54db0f7dadb02664b2638b9dc77752831cd4820390f5c3e61a42429e13462a7 +DIST sandbox-2.28.tar.xz 450840 BLAKE2B 1a144db1dcd140ce393f47b224c4389693bd3db6d056749968a9e78730b1075192148aa63fdfd5ab93893dfb96a87bcc36bee8b4540abefca0590a8def8365f2 SHA512 eaac54fbc35f51da3c94bfa10e0556f0fd39c20660fea2aa7d3cbf76dd3e4c9fb4a16cc198425988b79313f9331af030e1dca431c3f057ee4a04927c96897895 +DIST sandbox-2.29.tar.xz 452784 BLAKE2B 388f5d9c49134696bafbc6b882581396a9fa2e7caa6ccfb4376706d653f836ce18e0d77527c4c4f2ff753c0b920ab5ab60e151dd8a4e399e13dbc3fe7c0533d6 SHA512 15c0e6b71e8b8547b8188f857568c99b1925d5a837a289b21c4f842341361bf7119b96083697dc83546caf530daab700fb8c2704974e7cfb804d64bb5257a4b4 +DIST sandbox-3.0.tar.xz 454384 BLAKE2B b4f38b7c5ed2dc52e558f1b7e36d2308e6017c9d14861c60eace0f240a909f11184e259b2359ea96cad81d21234cc9a6bcd9f313ce56bd2f3bb1ce836f006a50 SHA512 3a35ee0b19a356b1986468ef5d2ecd553b88cbdaf287ce31a211b4072097a9844fca413ffa0f2858b9a4e75ead822fe9d9834f17c241ba32c2f14e02619a70b3 +DIST sandbox-3.1.tar.xz 454404 BLAKE2B f8cc2960f1c7b3367d375952f0a7ca978c1a2cc27b63137046152d1080a1a7b6b99d356af0776d3b57a5c260b2d89f0b7bfb127967407b537642be04e92b8603 SHA512 e57c0fc1ddb5a63012abd02080770d49deaa1d0168508a794df2eaa25b2b7a4fa6c505e8b93572a3745912819202c264cdf980f10dc7101c487a9b03e7f65815 diff --git a/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch b/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch deleted file mode 100644 index 296b322b0c..0000000000 --- a/sys-apps/sandbox/files/sandbox-2.10-disable-same.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 7a923f646ce10b7dec3c7ae5fe2079c10aa21752 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Sun, 20 Dec 2015 16:08:16 -0500 -Subject: [PATCH] libsbutil: gnulib: hand disable same_name usage - -We don't provide same_name because the one caller we don't use, but it -relies on gc-sections to avoid link errors. That flag doesn't work on -ia64 though, so we need to hand delete the one caller. Ugh. - -Signed-off-by: Mike Frysinger ---- - libsbutil/gnulib/hash-triple.c | 9 --------- - libsbutil/gnulib/same.h | 25 ------------------------- - 2 files changed, 34 deletions(-) - delete mode 100644 libsbutil/gnulib/same.h - -diff --git a/libsbutil/gnulib/hash-triple.c b/libsbutil/gnulib/hash-triple.c -index c3b6d9f..06cfbdf 100644 ---- a/libsbutil/gnulib/hash-triple.c -+++ b/libsbutil/gnulib/hash-triple.c -@@ -24,7 +24,6 @@ - #include - - #include "hash-pjw.h" --#include "same.h" - #include "same-inode.h" - - #define STREQ(a, b) (strcmp (a, b) == 0) -@@ -52,14 +51,6 @@ triple_hash_no_name (void const *x, size_t table_size) - - /* Compare two F_triple structs. */ - bool --triple_compare (void const *x, void const *y) --{ -- struct F_triple const *a = x; -- struct F_triple const *b = y; -- return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false; --} -- --bool - triple_compare_ino_str (void const *x, void const *y) - { - struct F_triple const *a = x; -diff --git a/libsbutil/gnulib/same.h b/libsbutil/gnulib/same.h -deleted file mode 100644 -index ee313c5..0000000 ---- a/libsbutil/gnulib/same.h -+++ /dev/null -@@ -1,25 +0,0 @@ --/* Determine whether two file names refer to the same file. -- -- Copyright (C) 1997-2000, 2003-2004, 2009-2015 Free Software Foundation, Inc. -- -- This program 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 program 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 program. If not, see . */ -- --#ifndef SAME_H_ --# define SAME_H_ 1 -- --# include -- --bool same_name (const char *source, const char *dest); -- --#endif /* SAME_H_ */ --- -2.6.2 - diff --git a/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch b/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch deleted file mode 100644 index 2ff89bcdfc..0000000000 --- a/sys-apps/sandbox/files/sandbox-2.10-fix-opendir.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 3f668dc6ba1910085e61b3a24167ab1352c60d92 Mon Sep 17 00:00:00 2001 -From: Mart Raudsepp -Date: Fri, 11 Nov 2016 12:34:48 +0200 -Subject: [PATCH] libsandbox: do not abort with a long name to opendir - -Add a pre-check for opendir that catches too long name arguments -given to opendir, as it would get messed up and abort before it -even gets to the open*() syscall (which would handle it correctly), -due to opendir going through before_syscall/check_syscall, even -though it isn't a true syscall and it getting cut to SB_PATH_MAX -inbetween and getting confused somewhere. - -URL: https://bugs.gentoo.org/553092 -Signed-off-by: Mart Raudsepp ---- - libsandbox/wrapper-funcs/opendir.c | 2 ++ - libsandbox/wrapper-funcs/opendir_pre_check.c | 26 ++++++++++++++++++++++++++ - libsandbox/wrappers.h | 1 + - 3 files changed, 29 insertions(+) - create mode 100644 libsandbox/wrapper-funcs/opendir_pre_check.c - -diff --git a/libsandbox/wrapper-funcs/opendir.c b/libsandbox/wrapper-funcs/opendir.c -index 7670775..70c2692 100644 ---- a/libsandbox/wrapper-funcs/opendir.c -+++ b/libsandbox/wrapper-funcs/opendir.c -@@ -10,4 +10,6 @@ - #define WRAPPER_SAFE() SB_SAFE(name) - #define WRAPPER_RET_TYPE DIR * - #define WRAPPER_RET_DEFAULT NULL -+#define WRAPPER_PRE_CHECKS() sb_opendir_pre_check(STRING_NAME, name) -+ - #include "__wrapper_simple.c" -diff --git a/libsandbox/wrapper-funcs/opendir_pre_check.c b/libsandbox/wrapper-funcs/opendir_pre_check.c -new file mode 100644 -index 0000000..60c869f ---- /dev/null -+++ b/libsandbox/wrapper-funcs/opendir_pre_check.c -@@ -0,0 +1,26 @@ -+/* -+ * opendir() pre-check. -+ * -+ * Copyright 1999-2016 Gentoo Foundation -+ * Licensed under the GPL-2 -+ */ -+ -+bool sb_opendir_pre_check(const char *func, const char *name) -+{ -+ /* If length of name is larger than PATH_MAX, we would mess it up -+ * before it reaches the open syscall, which would cleanly error out -+ * via sandbox as well (actually with much smaller lengths than even -+ * PATH_MAX). -+ * So error out early in this case, in order to avoid an abort in -+ * check_syscall later on, which gets ran for opendir, despite it not -+ * being a syscall. -+ */ -+ if (strnlen(name, PATH_MAX) == PATH_MAX) { -+ errno = ENAMETOOLONG; -+ sb_debug_dyn("EARLY FAIL: %s(%s): %s\n", -+ func, name, strerror(errno)); -+ return false; -+ } -+ -+ return true; -+} -diff --git a/libsandbox/wrappers.h b/libsandbox/wrappers.h -index 0aa58bb..bf5bf64 100644 ---- a/libsandbox/wrappers.h -+++ b/libsandbox/wrappers.h -@@ -27,6 +27,7 @@ attribute_hidden bool sb_fopen64_pre_check (const char *func, const char *pathn - attribute_hidden bool sb_mkdirat_pre_check (const char *func, const char *pathname, int dirfd); - attribute_hidden bool sb_openat_pre_check (const char *func, const char *pathname, int dirfd, int flags); - attribute_hidden bool sb_openat64_pre_check (const char *func, const char *pathname, int dirfd, int flags); -+attribute_hidden bool sb_opendir_pre_check (const char *func, const char *name); - attribute_hidden bool sb_unlinkat_pre_check (const char *func, const char *pathname, int dirfd); - attribute_hidden bool sb_common_at_pre_check(const char *func, const char **pathname, int dirfd, - char *dirfd_path, size_t dirfd_path_len); --- -2.9.0 - diff --git a/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch b/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch deleted file mode 100644 index 7dd27c9d22..0000000000 --- a/sys-apps/sandbox/files/sandbox-2.10-memory-corruption.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 529a388ebb1b4e9d6ad8a1bb61dd8211833a5976 Mon Sep 17 00:00:00 2001 -From: Denis Lisov -Date: Sat, 19 Dec 2015 19:13:58 +0300 -Subject: [PATCH] libsandbox: fix old_malloc_size check on realloc - -Realloc uses SB_MALLOC_TO_SIZE assuming it returns the usable size, -while it is really the mmap size, which is greater. Thus it may fail -to reallocate even if required. - -URL: https://bugs.gentoo.org/568714 -Signed-off-by: Denis Lisov -Signed-off-by: Mike Frysinger ---- - libsandbox/memory.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libsandbox/memory.c b/libsandbox/memory.c -index 8581128..a2d69a2 100644 ---- a/libsandbox/memory.c -+++ b/libsandbox/memory.c -@@ -40,7 +40,8 @@ static int sb_munmap(void *addr, size_t length) - - #define SB_MALLOC_TO_MMAP(ptr) ((void*)((uintptr_t)(ptr) - MIN_ALIGN)) - #define SB_MMAP_TO_MALLOC(ptr) ((void*)((uintptr_t)(ptr) + MIN_ALIGN)) --#define SB_MALLOC_TO_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr))) -+#define SB_MALLOC_TO_MMAP_SIZE(ptr) (*((size_t*)SB_MALLOC_TO_MMAP(ptr))) -+#define SB_MALLOC_TO_SIZE(ptr) (SB_MALLOC_TO_MMAP_SIZE(ptr) - MIN_ALIGN) - - void *malloc(size_t size) - { -@@ -57,7 +58,7 @@ void free(void *ptr) - { - if (ptr == NULL) - return; -- if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_SIZE(ptr))) -+ if (munmap(SB_MALLOC_TO_MMAP(ptr), SB_MALLOC_TO_MMAP_SIZE(ptr))) - sb_ebort("sandbox memory corruption with free(%p): %s\n", - ptr, strerror(errno)); - } --- -2.6.2 - diff --git a/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch b/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch deleted file mode 100644 index e33011f749..0000000000 --- a/sys-apps/sandbox/files/sandbox-2.11-symlinkat-renameat.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 4c47cfa22802fd8201586bef233d8161df4ff61b Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Fri, 10 Mar 2017 10:15:50 -0800 -Subject: [PATCH] libsandbox: whitelist renameat/symlinkat as symlink funcs - -These funcs don't deref their path args, so flag them as such. - -URL: https://bugs.gentoo.org/612202 -Signed-off-by: Mike Frysinger ---- - libsandbox/libsandbox.c | 4 +++- - tests/renameat-2.sh | 12 ++++++++++++ - tests/renameat-3.sh | 11 +++++++++++ - tests/renameat.at | 2 ++ - tests/symlinkat-2.sh | 10 ++++++++++ - tests/symlinkat-3.sh | 9 +++++++++ - tests/symlinkat.at | 2 ++ - 7 files changed, 49 insertions(+), 1 deletion(-) - create mode 100755 tests/renameat-2.sh - create mode 100755 tests/renameat-3.sh - create mode 100755 tests/symlinkat-2.sh - create mode 100755 tests/symlinkat-3.sh - -diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c -index e809308d717d..de48bd79ba53 100644 ---- a/libsandbox/libsandbox.c -+++ b/libsandbox/libsandbox.c -@@ -650,8 +650,10 @@ static bool symlink_func(int sb_nr, int flags, const char *abs_path) - sb_nr == SB_NR_LCHOWN || - sb_nr == SB_NR_REMOVE || - sb_nr == SB_NR_RENAME || -+ sb_nr == SB_NR_RENAMEAT || - sb_nr == SB_NR_RMDIR || -- sb_nr == SB_NR_SYMLINK)) -+ sb_nr == SB_NR_SYMLINK || -+ sb_nr == SB_NR_SYMLINKAT)) - { - /* These funcs sometimes operate on symlinks */ - if (!((sb_nr == SB_NR_FCHOWNAT || -diff --git a/tests/renameat-2.sh b/tests/renameat-2.sh -new file mode 100755 -index 000000000000..d0fbe8ae4574 ---- /dev/null -+++ b/tests/renameat-2.sh -@@ -0,0 +1,12 @@ -+#!/bin/sh -+# make sure we can clobber symlinks #612202 -+ -+addwrite $PWD -+ -+ln -s /asdf sym || exit 1 -+touch file -+renameat-0 0 AT_FDCWD file AT_FDCWD sym || exit 1 -+[ ! -e file ] -+[ ! -L sym ] -+[ -e sym ] -+test ! -s "${SANDBOX_LOG}" -diff --git a/tests/renameat-3.sh b/tests/renameat-3.sh -new file mode 100755 -index 000000000000..9ae5c9a6511a ---- /dev/null -+++ b/tests/renameat-3.sh -@@ -0,0 +1,11 @@ -+#!/bin/sh -+# make sure we reject bad renames #612202 -+ -+addwrite $PWD -+mkdir deny -+adddeny $PWD/deny -+ -+touch file -+renameat-0 -1,EACCES AT_FDCWD file AT_FDCWD deny/file || exit 1 -+[ -e file ] -+test -s "${SANDBOX_LOG}" -diff --git a/tests/renameat.at b/tests/renameat.at -index 081d7d20277e..eec4638deeaa 100644 ---- a/tests/renameat.at -+++ b/tests/renameat.at -@@ -1 +1,3 @@ - SB_CHECK(1) -+SB_CHECK(2) -+SB_CHECK(3) -diff --git a/tests/symlinkat-2.sh b/tests/symlinkat-2.sh -new file mode 100755 -index 000000000000..168362e8806f ---- /dev/null -+++ b/tests/symlinkat-2.sh -@@ -0,0 +1,10 @@ -+#!/bin/sh -+# make sure we can clobber symlinks #612202 -+ -+addwrite $PWD -+ -+symlinkat-0 0 /asdf AT_FDCWD ./sym || exit 1 -+[ -L sym ] -+symlinkat-0 -1,EEXIST /asdf AT_FDCWD ./sym || exit 1 -+[ -L sym ] -+test ! -s "${SANDBOX_LOG}" -diff --git a/tests/symlinkat-3.sh b/tests/symlinkat-3.sh -new file mode 100755 -index 000000000000..a01c750dd2b6 ---- /dev/null -+++ b/tests/symlinkat-3.sh -@@ -0,0 +1,9 @@ -+#!/bin/sh -+# make sure we reject bad symlinks #612202 -+ -+addwrite $PWD -+mkdir deny -+adddeny $PWD/deny -+ -+symlinkat-0 -1,EACCES ./ AT_FDCWD deny/sym || exit 1 -+test -s "${SANDBOX_LOG}" -diff --git a/tests/symlinkat.at b/tests/symlinkat.at -index 081d7d20277e..eec4638deeaa 100644 ---- a/tests/symlinkat.at -+++ b/tests/symlinkat.at -@@ -1 +1,3 @@ - SB_CHECK(1) -+SB_CHECK(2) -+SB_CHECK(3) --- -2.12.0 - diff --git a/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch b/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch new file mode 100644 index 0000000000..b17f4b866f --- /dev/null +++ b/sys-apps/sandbox/files/sandbox-3.1-label-decl.patch @@ -0,0 +1,41 @@ +From 82f6d876660ba1132d75ccfef5c4301d123ea505 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 3 Nov 2021 12:25:10 -0400 +Subject: [PATCH] libsandbox: tweak label/decl code for some compiler settings + +Looks like gcc is inconsistent in when it chokes on this code: +> a label can only be part of a statement and a declaration is not a statement + +Hoist the decl up to the top of scope to avoid the issue. + +Bug: https://bugs.gentoo.org/821433 +Signed-off-by: Mike Frysinger +--- + libsandbox/trace.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libsandbox/trace.c b/libsandbox/trace.c +index f3390d99822e..d2899b743048 100644 +--- a/libsandbox/trace.c ++++ b/libsandbox/trace.c +@@ -704,6 +704,8 @@ static char *flatten_args(char *const argv[]) + + bool trace_possible(const char *filename, char *const argv[], const void *data) + { ++ char *args; ++ + /* If YAMA ptrace_scope is very high, then we can't trace at all. #771360 */ + int yama = trace_yama_level(); + if (yama >= 2) { +@@ -721,7 +723,7 @@ bool trace_possible(const char *filename, char *const argv[], const void *data) + } + + fail: +- char *args = flatten_args(argv); ++ args = flatten_args(argv); + sb_eqawarn("Unable to trace static ELF: %s: %s\n", filename, args); + free(args); + return false; +-- +2.33.0 + diff --git a/sys-apps/sandbox/metadata.xml b/sys-apps/sandbox/metadata.xml index 1cdc968e40..11e084f7c9 100644 --- a/sys-apps/sandbox/metadata.xml +++ b/sys-apps/sandbox/metadata.xml @@ -1,8 +1,11 @@ - + sandbox@gentoo.org Sandbox Maintainers + + Enable NO_NEW_PRIVS which blocks set*id programs from gaining privileges (e.g. sudo) + diff --git a/sys-apps/sandbox/sandbox-2.10-r3.ebuild b/sys-apps/sandbox/sandbox-2.10-r3.ebuild deleted file mode 100644 index 49e172c3c5..0000000000 --- a/sys-apps/sandbox/sandbox-2.10-r3.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# -# don't monkey with this ebuild unless contacting portage devs. -# period. -# - -EAPI="5" - -inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils - -DESCRIPTION="sandbox'd LD_PRELOAD hack" -HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/" -SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" -IUSE="" - -DEPEND="app-arch/xz-utils - >=app-misc/pax-utils-0.1.19" #265376 -RDEPEND="" - -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" - -sandbox_death_notice() { - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" - ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" -} - -src_prepare() { - epatch "${FILESDIR}"/${P}-memory-corruption.patch #568714 - epatch "${FILESDIR}"/${P}-disable-same.patch - epatch "${FILESDIR}"/${P}-fix-opendir.patch #553092 - epatch_user -} - -multilib_src_configure() { - filter-lfs-flags #90228 - - local myconf=() - host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092 - - ECONF_SOURCE="${S}" \ - econf "${myconf[@]}" -} - -multilib_src_test() { - # Default sandbox build will run with --jobs set to # cpus. - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" -} - -multilib_src_install_all() { - doenvd "${FILESDIR}"/09sandbox - - keepdir /var/log/sandbox - fowners root:portage /var/log/sandbox - fperms 0770 /var/log/sandbox - - cd "${S}" - dodoc AUTHORS ChangeLog* NEWS README -} - -pkg_preinst() { - chown root:portage "${ED}"/var/log/sandbox - chmod 0770 "${ED}"/var/log/sandbox - - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') - if [[ -n ${old} ]] ; then - elog "Removing old sandbox libraries for you:" - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete - fi - fi -} - -pkg_postinst() { - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - chmod 0755 "${EROOT}"/etc/sandbox.d #265376 - fi -} diff --git a/sys-apps/sandbox/sandbox-2.10-r4.ebuild b/sys-apps/sandbox/sandbox-2.10-r4.ebuild deleted file mode 100644 index 29827378c0..0000000000 --- a/sys-apps/sandbox/sandbox-2.10-r4.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# -# don't monkey with this ebuild unless contacting portage devs. -# period. -# - -EAPI="5" - -inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils - -DESCRIPTION="sandbox'd LD_PRELOAD hack" -HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/" -SRC_URI="mirror://gentoo/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" -IUSE="" - -DEPEND="app-arch/xz-utils - >=app-misc/pax-utils-0.1.19" #265376 -RDEPEND="" - -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" - -sandbox_death_notice() { - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" - ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" -} - -src_prepare() { - epatch "${FILESDIR}"/${P}-memory-corruption.patch #568714 - epatch "${FILESDIR}"/${P}-disable-same.patch - epatch "${FILESDIR}"/${P}-fix-opendir.patch #553092 - epatch "${FILESDIR}"/${PN}-2.11-symlinkat-renameat.patch #612202 - epatch_user -} - -multilib_src_configure() { - filter-lfs-flags #90228 - - local myconf=() - host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092 - - ECONF_SOURCE="${S}" \ - econf "${myconf[@]}" -} - -multilib_src_test() { - # Default sandbox build will run with --jobs set to # cpus. - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" -} - -multilib_src_install_all() { - doenvd "${FILESDIR}"/09sandbox - - keepdir /var/log/sandbox - fowners root:portage /var/log/sandbox - fperms 0770 /var/log/sandbox - - cd "${S}" - dodoc AUTHORS ChangeLog* NEWS README -} - -pkg_preinst() { - chown root:portage "${ED}"/var/log/sandbox - chmod 0770 "${ED}"/var/log/sandbox - - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') - if [[ -n ${old} ]] ; then - elog "Removing old sandbox libraries for you:" - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete - fi - fi -} - -pkg_postinst() { - if [[ ${REPLACING_VERSIONS} == 1.* ]] ; then - chmod 0755 "${EROOT}"/etc/sandbox.d #265376 - fi -} diff --git a/sys-apps/sandbox/sandbox-2.12.ebuild b/sys-apps/sandbox/sandbox-2.12.ebuild deleted file mode 100644 index 2a7f3ce6be..0000000000 --- a/sys-apps/sandbox/sandbox-2.12.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils - -DESCRIPTION="sandbox'd LD_PRELOAD hack" -HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd" -IUSE="" - -DEPEND="app-arch/xz-utils - >=app-misc/pax-utils-0.1.19" #265376 -RDEPEND="" - -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" - -sandbox_death_notice() { - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" - ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" -} - -multilib_src_configure() { - filter-lfs-flags #90228 - - local myconf=() - host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092 - - ECONF_SOURCE="${S}" \ - econf "${myconf[@]}" -} - -multilib_src_test() { - # Default sandbox build will run with --jobs set to # cpus. - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" -} - -multilib_src_install_all() { - doenvd "${FILESDIR}"/09sandbox - - keepdir /var/log/sandbox - fowners root:portage /var/log/sandbox - fperms 0770 /var/log/sandbox - - dodoc AUTHORS ChangeLog* NEWS README -} - -pkg_preinst() { - chown root:portage "${ED}"/var/log/sandbox - chmod 0770 "${ED}"/var/log/sandbox - - local v - for v in ${REPLACING_VERSIONS}; do - if [[ ${v} == 1.* ]] ; then - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') - if [[ -n ${old} ]] ; then - elog "Removing old sandbox libraries for you:" - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete - fi - fi - done -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if [[ ${v} == 1.* ]] ; then - chmod 0755 "${EROOT}"/etc/sandbox.d #265376 - fi - done -} diff --git a/sys-apps/sandbox/sandbox-2.13.ebuild b/sys-apps/sandbox/sandbox-2.13.ebuild deleted file mode 100644 index 37b52a70e2..0000000000 --- a/sys-apps/sandbox/sandbox-2.13.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils - -DESCRIPTION="sandbox'd LD_PRELOAD hack" -HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/" -SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="" - -DEPEND="app-arch/xz-utils - >=app-misc/pax-utils-0.1.19" #265376 -RDEPEND="" - -has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" - -sandbox_death_notice() { - ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" - ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" -} - -multilib_src_configure() { - filter-lfs-flags #90228 - - local myconf=() - host-is-pax && myconf+=( --disable-pch ) #301299 #425524 #572092 - - ECONF_SOURCE="${S}" \ - econf "${myconf[@]}" -} - -multilib_src_test() { - # Default sandbox build will run with --jobs set to # cpus. - emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" -} - -multilib_src_install_all() { - doenvd "${FILESDIR}"/09sandbox - - keepdir /var/log/sandbox - fowners root:portage /var/log/sandbox - fperms 0770 /var/log/sandbox - - dodoc AUTHORS ChangeLog* NEWS README -} - -pkg_preinst() { - chown root:portage "${ED}"/var/log/sandbox - chmod 0770 "${ED}"/var/log/sandbox - - local v - for v in ${REPLACING_VERSIONS}; do - if [[ ${v} == 1.* ]] ; then - local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*') - if [[ -n ${old} ]] ; then - elog "Removing old sandbox libraries for you:" - find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete - fi - fi - done -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if [[ ${v} == 1.* ]] ; then - chmod 0755 "${EROOT}"/etc/sandbox.d #265376 - fi - done -} diff --git a/sys-apps/sandbox/sandbox-2.24.ebuild b/sys-apps/sandbox/sandbox-2.24.ebuild new file mode 100644 index 0000000000..e95d6bc812 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.24.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + # -j1 to prevent test faiures caused by file descriptor + # injection GNU make does. + emake -j1 check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + keepdir /var/log/sandbox + fowners root:portage /var/log/sandbox + fperms 0770 /var/log/sandbox + + dodoc AUTHORS ChangeLog* NEWS README +} + +pkg_postinst() { + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-2.25.ebuild b/sys-apps/sandbox/sandbox-2.25.ebuild new file mode 100644 index 0000000000..70179abd1b --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.25.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + # -j1 to prevent test faiures caused by file descriptor + # injection GNU make does. + emake -j1 check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + keepdir /var/log/sandbox + fowners root:portage /var/log/sandbox + fperms 0770 /var/log/sandbox + + dodoc AUTHORS ChangeLog* NEWS README +} + +pkg_postinst() { + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-2.26.ebuild b/sys-apps/sandbox/sandbox-2.26.ebuild new file mode 100644 index 0000000000..414c257602 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.26.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-2.27.ebuild b/sys-apps/sandbox/sandbox-2.27.ebuild new file mode 100644 index 0000000000..83e9089888 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.27.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + if ! use nnp ; then + sed -i 's:PR_SET_NO_NEW_PRIVS:___disable_nnp_hack:' src/sandbox.c || die + fi + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-2.28.ebuild b/sys-apps/sandbox/sandbox-2.28.ebuild new file mode 100644 index 0000000000..83e9089888 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.28.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + if ! use nnp ; then + sed -i 's:PR_SET_NO_NEW_PRIVS:___disable_nnp_hack:' src/sandbox.c || die + fi + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-2.29.ebuild b/sys-apps/sandbox/sandbox-2.29.ebuild new file mode 100644 index 0000000000..83e9089888 --- /dev/null +++ b/sys-apps/sandbox/sandbox-2.29.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + if ! use nnp ; then + sed -i 's:PR_SET_NO_NEW_PRIVS:___disable_nnp_hack:' src/sandbox.c || die + fi + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-3.0.ebuild b/sys-apps/sandbox/sandbox-3.0.ebuild new file mode 100644 index 0000000000..83e9089888 --- /dev/null +++ b/sys-apps/sandbox/sandbox-3.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + if ! use nnp ; then + sed -i 's:PR_SET_NO_NEW_PRIVS:___disable_nnp_hack:' src/sandbox.c || die + fi + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} diff --git a/sys-apps/sandbox/sandbox-3.1.ebuild b/sys-apps/sandbox/sandbox-3.1.ebuild new file mode 100644 index 0000000000..1c11a7faf1 --- /dev/null +++ b/sys-apps/sandbox/sandbox-3.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib-minimal multiprocessing + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+nnp" + +DEPEND="app-arch/xz-utils + >=app-misc/pax-utils-0.1.19" #265376 +RDEPEND="" + +PATCHES=( + "${FILESDIR}"/${P}-label-decl.patch #821433 +) + +has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" sandbox_death_notice" + +sandbox_death_notice() { + ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:" + ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox" +} + +src_prepare() { + default + + if ! use nnp ; then + sed -i 's:PR_SET_NO_NEW_PRIVS:___disable_nnp_hack:' src/sandbox.c || die + fi + + # sandbox uses `__asm__ (".symver "...` which does + # not play well with gcc's LTO: https://gcc.gnu.org/PR48200 + append-flags -fno-lto + append-ldflags -fno-lto +} + +multilib_src_configure() { + filter-lfs-flags #90228 + + ECONF_SOURCE="${S}" econf +} + +multilib_src_test() { + # Default sandbox build will run with --jobs set to # cpus. + emake check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)" +} + +multilib_src_install_all() { + doenvd "${FILESDIR}"/09sandbox + + dodoc AUTHORS ChangeLog* README.md +} + +pkg_postinst() { + mkdir -p "${EROOT}"/var/log/sandbox + chown root:portage "${EROOT}"/var/log/sandbox + chmod 0770 "${EROOT}"/var/log/sandbox +} From da9a01747022f877f167e98218c394dd47e9af12 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:22:16 +0100 Subject: [PATCH 07/40] sys-devel/make: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- sys-devel/make/Manifest | 2 +- .../files/make-4.2.1-glob-internals.patch | 67 ---- sys-devel/make/files/make-4.2.1-glob-v2.patch | 30 -- .../make/files/make-4.2.1-guile-2.2.patch | 320 ------------------ sys-devel/make/files/make-4.2.1-perl526.patch | 26 -- .../make-4.2.1-pselect-non-blocking.patch | 172 ---------- .../{make-4.2.1-r4.ebuild => make-4.3.ebuild} | 30 +- sys-devel/make/metadata.xml | 5 +- 8 files changed, 18 insertions(+), 634 deletions(-) delete mode 100644 sys-devel/make/files/make-4.2.1-glob-internals.patch delete mode 100644 sys-devel/make/files/make-4.2.1-glob-v2.patch delete mode 100644 sys-devel/make/files/make-4.2.1-guile-2.2.patch delete mode 100644 sys-devel/make/files/make-4.2.1-perl526.patch delete mode 100644 sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch rename sys-devel/make/{make-4.2.1-r4.ebuild => make-4.3.ebuild} (50%) diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest index 7ce526e76c..34d9f6842b 100644 --- a/sys-devel/make/Manifest +++ b/sys-devel/make/Manifest @@ -1 +1 @@ -DIST make-4.2.1.tar.bz2 1407126 BLAKE2B fa6d43f5fd46182182a296c58dcd138a1a4568104eda760bbb3c241c023dee216789cf3128e5ac2b416cec76e1ba82d5b5e7852da12e86138a7d0865c85a42b4 SHA512 9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8 +DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b diff --git a/sys-devel/make/files/make-4.2.1-glob-internals.patch b/sys-devel/make/files/make-4.2.1-glob-internals.patch deleted file mode 100644 index 9f70ae2084..0000000000 --- a/sys-devel/make/files/make-4.2.1-glob-internals.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Sun, 24 Sep 2017 09:12:58 -0400 -Subject: [PATCH] glob: Do not assume glibc glob internals. - -It has been proposed that glibc glob start using gl_lstat, -which the API allows it to do. GNU 'make' should not get in -the way of this. See: -https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html - -* dir.c (local_lstat): New function, like local_stat. -(dir_setup_glob): Use it to initialize gl_lstat too, as the API -requires. ---- - dir.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/dir.c b/dir.c -index adbb8a9..c343e4c 100644 ---- a/dir.c -+++ b/dir.c -@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) - } - #endif - -+/* Similarly for lstat. */ -+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) -+# ifndef VMS -+# ifndef HAVE_SYS_STAT_H -+int lstat (const char *path, struct stat *sbuf); -+# endif -+# else -+ /* We are done with the fake lstat. Go back to the real lstat */ -+# ifdef lstat -+# undef lstat -+# endif -+# endif -+# define local_lstat lstat -+#elif defined(WINDOWS32) -+/* Windows doesn't support lstat(). */ -+# define local_lstat local_stat -+#else -+static int -+local_lstat (const char *path, struct stat *buf) -+{ -+ int e; -+ EINTRLOOP (e, lstat (path, buf)); -+ return e; -+} -+#endif -+ - void - dir_setup_glob (glob_t *gl) - { - gl->gl_opendir = open_dirstream; - gl->gl_readdir = read_dirstream; - gl->gl_closedir = free; -+ gl->gl_lstat = local_lstat; - gl->gl_stat = local_stat; -- /* We don't bother setting gl_lstat, since glob never calls it. -- The slot is only there for compatibility with 4.4 BSD. */ - } - - void --- -2.16.1 - diff --git a/sys-devel/make/files/make-4.2.1-glob-v2.patch b/sys-devel/make/files/make-4.2.1-glob-v2.patch deleted file mode 100644 index e55a7790a3..0000000000 --- a/sys-devel/make/files/make-4.2.1-glob-v2.patch +++ /dev/null @@ -1,30 +0,0 @@ -http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 - ---- make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -+++ make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -@@ -11481,10 +11481,9 @@ - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif ---- make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -+++ make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -@@ -399,10 +399,9 @@ - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif], diff --git a/sys-devel/make/files/make-4.2.1-guile-2.2.patch b/sys-devel/make/files/make-4.2.1-guile-2.2.patch deleted file mode 100644 index b7f9eb50b7..0000000000 --- a/sys-devel/make/files/make-4.2.1-guile-2.2.patch +++ /dev/null @@ -1,320 +0,0 @@ -https://git.savannah.gnu.org/cgit/make.git/commit/?id=fbf71ec25a5986d9003ac16ee9e23675feac9053 -https://bugs.gentoo.org/650608 - ---- make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -+++ make-4.2.1/configure 2016-06-11 01:03:21.000000000 +0200 -@@ -9694,6 +9694,15 @@ - - # See if the user wants to add (or not) GNU Guile support - -+# Check whether --with-guile was given. -+if test "${with_guile+set}" = set; then : -+ withval=$with_guile; -+fi -+ -+ -+# Annoyingly, each version of Guile comes with it's own PC file so we have to -+# specify them as individual packages. Ugh. -+ - - - -@@ -9814,75 +9823,25 @@ - fi - fi - --# Check whether --with-guile was given. --if test "${with_guile+set}" = set; then : -- withval=$with_guile; --fi -- -- --# For some strange reason, at least on Ubuntu, each version of Guile --# comes with it's own PC file so we have to specify them as individual --# packages. Ugh. - if test "x$with_guile" != xno; then : -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 --$as_echo_n "checking for GUILE... " >&6; } -- --if test -n "$GUILE_CFLAGS"; then -- pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-2.0") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$GUILE_LIBS"; then -- pkg_cv_GUILE_LIBS="$GUILE_LIBS" -- elif test -n "$PKG_CONFIG"; then -+ guile_versions="2.2 2.0 1.8" -+ guile_version=no -+ have_guile=no -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Guile" >&5 -+$as_echo_n "checking for GNU Guile... " >&6; } -+ for v in $guile_versions; do - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-2.0\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-2.0") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$v\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$v") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-2.0" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes -+ guile_version=$v; have_guile=yes; break - fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-2.0" 2>&1` -- else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-2.0" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$GUILE_PKG_ERRORS" >&5 -- -+ done -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guile_version" >&5 -+$as_echo "$guile_version" >&6; } -+ if test "$have_guile" = yes; then - - pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 -@@ -9892,12 +9851,12 @@ - pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$guile_version\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$guile_version") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-1.8" 2>/dev/null` -+ pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-$guile_version" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -9909,12 +9868,12 @@ - pkg_cv_GUILE_LIBS="$GUILE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-\$guile_version\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "guile-$guile_version") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-1.8" 2>/dev/null` -+ pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-$guile_version" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes - else - pkg_failed=yes -@@ -9935,113 +9894,50 @@ - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-1.8" 2>&1` -+ GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-$guile_version" 2>&1` - else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-1.8" 2>&1` -+ GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-$guile_version" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GUILE_PKG_ERRORS" >&5 - -- have_guile=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- have_guile=no --else -- GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS -- GUILE_LIBS=$pkg_cv_GUILE_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- have_guile=yes --fi --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -+ as_fn_error $? "Package requirements (guile-$guile_version) were not met: - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUILE" >&5 --$as_echo_n "checking for GUILE... " >&6; } -+$GUILE_PKG_ERRORS - --if test -n "$GUILE_CFLAGS"; then -- pkg_cv_GUILE_CFLAGS="$GUILE_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_CFLAGS=`$PKG_CONFIG --cflags "guile-1.8" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$GUILE_LIBS"; then -- pkg_cv_GUILE_LIBS="$GUILE_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"guile-1.8\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "guile-1.8") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_GUILE_LIBS=`$PKG_CONFIG --libs "guile-1.8" 2>/dev/null` -- test "x$?" != "x0" && pkg_failed=yes --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- GUILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "guile-1.8" 2>&1` -- else -- GUILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "guile-1.8" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$GUILE_PKG_ERRORS" >&5 -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. - -- have_guile=no -+Alternatively, you may set the environment variables GUILE_CFLAGS -+and GUILE_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details." "$LINENO" 5 - elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- have_guile=no --else -- GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS -- GUILE_LIBS=$pkg_cv_GUILE_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- have_guile=yes --fi -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. -+ -+Alternatively, you may set the environment variables GUILE_CFLAGS -+and GUILE_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details. -+ -+To get pkg-config, see . -+See \`config.log' for more details" "$LINENO" 5; } - else - GUILE_CFLAGS=$pkg_cv_GUILE_CFLAGS - GUILE_LIBS=$pkg_cv_GUILE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } -- have_guile=yes --fi - - fi - --if test "$have_guile" = yes; then : -- - $as_echo "#define HAVE_GUILE 1" >>confdefs.h - -+ fi -+ - fi - - if test "$have_guile" = yes; then ---- make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -+++ make-4.2.1/configure.ac 2016-06-06 14:27:31.000000000 +0200 -@@ -160,22 +160,28 @@ - AC_FUNC_CLOSEDIR_VOID - - # See if the user wants to add (or not) GNU Guile support --PKG_PROG_PKG_CONFIG - AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile], - [Support GNU Guile for embedded scripting])]) - --# For some strange reason, at least on Ubuntu, each version of Guile --# comes with it's own PC file so we have to specify them as individual --# packages. Ugh. -+# Annoyingly, each version of Guile comes with it's own PC file so we have to -+# specify them as individual packages. Ugh. -+PKG_PROG_PKG_CONFIG -+ - AS_IF([test "x$with_guile" != xno], --[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes], -- [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes], -- [have_guile=no])]) -+[ guile_versions="2.2 2.0 1.8" -+ guile_version=no -+ have_guile=no -+ AC_MSG_CHECKING([for GNU Guile]) -+ for v in $guile_versions; do -+ PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], []) -+ done -+ AC_MSG_RESULT([$guile_version]) -+ if test "$have_guile" = yes; then -+ PKG_CHECK_MODULES(GUILE, [guile-$guile_version]) -+ AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support]) -+ fi - ]) - --AS_IF([test "$have_guile" = yes], -- [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])]) -- - AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes]) - - AC_FUNC_GETLOADAVG diff --git a/sys-devel/make/files/make-4.2.1-perl526.patch b/sys-devel/make/files/make-4.2.1-perl526.patch deleted file mode 100644 index a935d1314e..0000000000 --- a/sys-devel/make/files/make-4.2.1-perl526.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d9d4e06084a4c7da480bd49a3487aadf6ba77b54 Mon Sep 17 00:00:00 2001 -From: Enrique Olaizola -Date: Sat, 27 May 2017 14:24:33 -0400 -Subject: [PATCH] * tests/run_make_tests.pl: [SV 50902] Find Perl modules - ---- - tests/run_make_tests.pl | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl -index a74417a..a844094 100644 ---- a/tests/run_make_tests.pl -+++ b/tests/run_make_tests.pl -@@ -64,6 +64,9 @@ if ($^O eq 'VMS') - $CMD_rmfile = 'delete_file -no_ask'; - } - -+use FindBin; -+use lib "$FindBin::Bin"; -+ - require "test_driver.pl"; - require "config-flags.pm"; - --- -2.16.1 - diff --git a/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch b/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch deleted file mode 100644 index 61e19516f3..0000000000 --- a/sys-devel/make/files/make-4.2.1-pselect-non-blocking.patch +++ /dev/null @@ -1,172 +0,0 @@ -https://bugs.gentoo.org/664632 - -From b552b05251980f693c729e251f93f5225b400714 Mon Sep 17 00:00:00 2001 -From: Paul Smith -Date: Sat, 3 Jun 2017 16:20:51 -0400 -Subject: [SV 51159] Use a non-blocking read with pselect to avoid hangs. - -* posixos.c (set_blocking): Set blocking on a file descriptor. -(jobserver_setup): Set non-blocking on the jobserver read side. -(jobserver_parse_auth): Ditto. -(jobserver_acquire_all): Set blocking to avoid a busy-wait loop. -(jobserver_acquire): If the non-blocking read() returns without -taking a token then try again. ---- - posixos.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 71 insertions(+), 26 deletions(-) - -diff --git a/posixos.c b/posixos.c -index e642d7f..dbafa51 100644 ---- a/posixos.c -+++ b/posixos.c -@@ -62,6 +62,24 @@ make_job_rfd (void) - #endif - } - -+static void -+set_blocking (int fd, int blocking) -+{ -+ // If we're not using pselect() don't change the blocking -+#ifdef HAVE_PSELECT -+ int flags; -+ EINTRLOOP (flags, fcntl (fd, F_GETFL)); -+ if (flags >= 0) -+ { -+ int r; -+ flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK); -+ EINTRLOOP (r, fcntl (fd, F_SETFL, flags)); -+ if (r < 0) -+ pfatal_with_name ("fcntl(O_NONBLOCK)"); -+ } -+#endif -+} -+ - unsigned int - jobserver_setup (int slots) - { -@@ -86,6 +104,9 @@ jobserver_setup (int slots) - pfatal_with_name (_("init jobserver pipe")); - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -121,6 +142,9 @@ jobserver_parse_auth (const char *auth) - return 0; - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -169,7 +193,10 @@ jobserver_acquire_all (void) - { - unsigned int tokens = 0; - -- /* Close the write side, so the read() won't hang. */ -+ /* Use blocking reads to wait for all outstanding jobs. */ -+ set_blocking (job_fds[0], 1); -+ -+ /* Close the write side, so the read() won't hang forever. */ - close (job_fds[1]); - job_fds[1] = -1; - -@@ -236,18 +263,12 @@ jobserver_pre_acquire (void) - unsigned int - jobserver_acquire (int timeout) - { -- sigset_t empty; -- fd_set readfds; - struct timespec spec; - struct timespec *specp = NULL; -- int r; -- char intake; -+ sigset_t empty; - - sigemptyset (&empty); - -- FD_ZERO (&readfds); -- FD_SET (job_fds[0], &readfds); -- - if (timeout) - { - /* Alarm after one second (is this too granular?) */ -@@ -256,28 +277,52 @@ jobserver_acquire (int timeout) - specp = &spec; - } - -- r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -- -- if (r == -1) -+ while (1) - { -- /* Better be SIGCHLD. */ -- if (errno != EINTR) -- pfatal_with_name (_("pselect jobs pipe")); -- return 0; -- } -+ fd_set readfds; -+ int r; -+ char intake; - -- if (r == 0) -- /* Timeout. */ -- return 0; -+ FD_ZERO (&readfds); -+ FD_SET (job_fds[0], &readfds); - -- /* The read FD is ready: read it! */ -- EINTRLOOP (r, read (job_fds[0], &intake, 1)); -- if (r < 0) -- pfatal_with_name (_("read jobs pipe")); -+ r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -+ if (r < 0) -+ switch (errno) -+ { -+ case EINTR: -+ /* SIGCHLD will show up as an EINTR. */ -+ return 0; -+ -+ case EBADF: -+ /* Someone closed the jobs pipe. -+ That shouldn't happen but if it does we're done. */ -+ O (fatal, NILF, _("job server shut down")); - -- /* What does it mean if read() returns 0? It shouldn't happen because only -- the master make can reap all the tokens and close the write side...?? */ -- return r > 0; -+ default: -+ pfatal_with_name (_("pselect jobs pipe")); -+ } -+ -+ if (r == 0) -+ /* Timeout. */ -+ return 0; -+ -+ /* The read FD is ready: read it! This is non-blocking. */ -+ EINTRLOOP (r, read (job_fds[0], &intake, 1)); -+ -+ if (r < 0) -+ { -+ /* Someone sniped our token! Try again. */ -+ if (errno == EAGAIN) -+ continue; -+ -+ pfatal_with_name (_("read jobs pipe")); -+ } -+ -+ /* read() should never return 0: only the master make can reap all the -+ tokens and close the write side...?? */ -+ return r > 0; -+ } - } - - #else --- -cgit v1.0-41-gc330 - diff --git a/sys-devel/make/make-4.2.1-r4.ebuild b/sys-devel/make/make-4.3.ebuild similarity index 50% rename from sys-devel/make/make-4.2.1-r4.ebuild rename to sys-devel/make/make-4.3.ebuild index 54f3b14943..bd0a3434e1 100644 --- a/sys-devel/make/make-4.2.1-r4.ebuild +++ b/sys-devel/make/make-4.3.ebuild @@ -1,40 +1,36 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 inherit flag-o-matic DESCRIPTION="Standard tool to compile source trees" HOMEPAGE="https://www.gnu.org/software/make/make.html" -SRC_URI="mirror://gnu//make/${P}.tar.bz2" - +if [[ "$(ver_cut 3)" -ge 90 ]] ; then + SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz" +else + SRC_URI="mirror://gnu//make/${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi LICENSE="GPL-3+" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="guile nls static" -CDEPEND="guile? ( >=dev-scheme/guile-1.8:= )" -DEPEND="${CDEPEND} - nls? ( sys-devel/gettext )" -RDEPEND="${CDEPEND} +DEPEND="guile? ( >=dev-scheme/guile-1.8:= )" +BDEPEND="nls? ( sys-devel/gettext )" +RDEPEND="${DEPEND} nls? ( virtual/libintl )" PATCHES=( "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch "${FILESDIR}"/${PN}-4.2-default-cxx.patch - "${FILESDIR}"/${PN}-4.2.1-perl526.patch - "${FILESDIR}"/${PN}-4.2.1-glob-internals.patch - "${FILESDIR}"/${PN}-4.2.1-pselect-non-blocking.patch ) src_prepare() { + # sources were moved into src directory + cd src || die default - # These patches require special handling as they modify configure.ac - # which in turn triggers maintainer-mode when being applied the - # usual way. - eapply -Z "${FILESDIR}"/${PN}-4.2.1-glob-v2.patch \ - "${FILESDIR}"/${P}-guile-2.2.patch } src_configure() { diff --git a/sys-devel/make/metadata.xml b/sys-devel/make/metadata.xml index 56c1244130..1e62dd9102 100644 --- a/sys-devel/make/metadata.xml +++ b/sys-devel/make/metadata.xml @@ -1,8 +1,11 @@ - + base-system@gentoo.org Gentoo Base System + + cpe:/a:gnu:make + From 6ad03389adc0d9aff32fd5e93918887ef302bf1d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:23:09 +0100 Subject: [PATCH 08/40] dev-util/intltool: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- dev-util/intltool/intltool-0.51.0-r2.ebuild | 4 ++-- dev-util/intltool/metadata.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-util/intltool/intltool-0.51.0-r2.ebuild b/dev-util/intltool/intltool-0.51.0-r2.ebuild index 95ce37120b..57610db9bc 100644 --- a/dev-util/intltool/intltool-0.51.0-r2.ebuild +++ b/dev-util/intltool/intltool-0.51.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -9,7 +9,7 @@ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="" DEPEND=" diff --git a/dev-util/intltool/metadata.xml b/dev-util/intltool/metadata.xml index 525c1a60b1..36fe2a1103 100644 --- a/dev-util/intltool/metadata.xml +++ b/dev-util/intltool/metadata.xml @@ -1,5 +1,5 @@ - + freedesktop-bugs@gentoo.org From efc8f8b0453c7cd205a6daf47f0459647448ae0a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:23:30 +0100 Subject: [PATCH 09/40] app-shells/bash-completion: Sync with gentoo It's from gentoo commit d1e3fc61c5e5a261172877f36589b0a7bd84ce00. --- app-shells/bash-completion/Manifest | 5 +- .../bash-completion-2.11.ebuild | 137 +++++++++++++++++ .../bash-completion-2.4-r1.ebuild | 98 ------------ .../bash-completion-2.7-r3.ebuild | 133 ----------------- .../bash-completion-9999.ebuild | 141 ++++++++++-------- ...-completion-2.1-escape-characters-r1.patch | 27 ---- app-shells/bash-completion/metadata.xml | 9 +- 7 files changed, 221 insertions(+), 329 deletions(-) create mode 100644 app-shells/bash-completion/bash-completion-2.11.ebuild delete mode 100644 app-shells/bash-completion/bash-completion-2.4-r1.ebuild delete mode 100644 app-shells/bash-completion/bash-completion-2.7-r3.ebuild delete mode 100644 app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch diff --git a/app-shells/bash-completion/Manifest b/app-shells/bash-completion/Manifest index 47fa687144..886d43bc83 100644 --- a/app-shells/bash-completion/Manifest +++ b/app-shells/bash-completion/Manifest @@ -1,3 +1,2 @@ -DIST bash-completion-2.4.tar.xz 276148 BLAKE2B 1ca38db1d1ad9f0bf7d1aa4e49cba1c82a6a575b05118099b609da12bf2e369637be907cba1d46e1e33fface482ebd7c63d70d56c948e45ef71725780ffb2171 SHA512 b852e0a38417dfc3754a91dae2d107f99a3c2970d835a4bbaa80f2a4db8d670bc3820ddc6ada26f68070f22fb4c1db7abe50ad489b1c0f8497b1e6e91be27627 -DIST bash-completion-2.7.tar.xz 280048 BLAKE2B 88b09f451fd4e14daf8e139951a4b65aaa9d9b1d86dceade388a726ac7f3caff2546597695c3f0cbd5dd64e20472d0cf3e98e0f367898b81d696d4ccb8f2fb73 SHA512 514709ad2e5f6bd4e20027c7049a1144c1854a37b653d5c11fad1cdf7a46d0e1afca725d6ce75d49691149e0de57be85747f704ac1c429ef4cea114bfbff8fcd -DIST bashcomp-2.0.2.tar.gz 3625 BLAKE2B ebd835e23634e8a7491467ad66c53941763cea43bad75fe24982d3885be2d2ba132e5273a655fec34705224315d7a3f0248c030fb7685fc613ac4f489cde5bf5 SHA512 46bc1bcc32263135f44be68569459a409250dd2c81c18190735f11e13a26508e9d3cb91d24a8fe7b21bdea678347873b7ac1b67d5e8c78c8444011f85dfdcdce +DIST bash-completion-2.11.tar.xz 311004 BLAKE2B 98e3ab6669bd70b49b238a597f1bc1309dc7ddd51c5b17c5e054f9161115d75d26e85d547471bc087e070d10554448b790a6dfb557abc413b70079ecc94acce3 SHA512 41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06 +DIST bashcomp-2.0.3.tar.gz 3539 BLAKE2B 75304d144792cc7f6ad5455a05a65c33c646d6f7384d020a06a1fcf012cd51625a3dd0750ad539253453b1eede196c340286a1e81737f0835b5091609ba01295 SHA512 b2bd185ccbd4456939ccc731cc1983fcec2b9564a9920642a753fadd5d897fdb96b925ac1524657629d621d45b37d99076c8ae72511a827e96ff6c388d720008 diff --git a/app-shells/bash-completion/bash-completion-2.11.ebuild b/app-shells/bash-completion/bash-completion-2.11.ebuild new file mode 100644 index 0000000000..36c924cea3 --- /dev/null +++ b/app-shells/bash-completion/bash-completion-2.11.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +BASHCOMP_P=bashcomp-2.0.3 +PYTHON_COMPAT=( python3_{7..9} ) +inherit bash-completion-r1 python-any-r1 user-info + +DESCRIPTION="Programmable Completion for bash" +HOMEPAGE="https://github.com/scop/bash-completion" +SRC_URI=" + https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz + eselect? ( https://github.com/mgorny/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz )" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris" +IUSE="+eselect test" +RESTRICT="!test? ( test )" + +# completion collision with net-fs/mc +RDEPEND=">=app-shells/bash-4.3_p30-r1:0 + sys-apps/miscfiles + !!net-fs/mc" +DEPEND=" + test? ( + ${RDEPEND} + $(python_gen_any_dep ' + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') + )" +PDEPEND=">=app-shells/gentoo-bashcomp-20140911" + +strip_completions() { + # Remove unwanted completions. + local strip_completions=( + # Slackware package stuff, quite generic names cause collisions + # (e.g. with sys-apps/pacman) + explodepkg installpkg makepkg pkgtool removepkg upgradepkg + + # Debian/Red Hat network stuff + ifdown ifup ifquery ifstatus + + # Installed in app-editors/vim-core + xxd + + # Now-dead symlinks to deprecated completions + hd ncal + ) + if [[ ${ARCH} != *-fbsd && ${ARCH} != *-freebsd ]]; then + strip_completions+=( + freebsd-update kldload kldunload portinstall portsnap + pkg_deinstall pkg_delete pkg_info + ) + fi + + local file + for file in "${strip_completions[@]}"; do + rm "${ED}"/usr/share/bash-completion/completions/${file} || + die "stripping ${file} failed" + done + + # remove deprecated completions (moved to other packages) + rm "${ED}"/usr/share/bash-completion/completions/_* || die +} + +python_check_deps() { + has_version "dev-python/pexpect[${PYTHON_USEDEP}]" && + has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + use eselect && + eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch" + + # redhat-specific, we strip these completions + rm test/t/test_if{down,up}.py || die + # not available for icedtea + rm test/t/test_javaws.py || die + + eapply_user +} + +src_test() { + # portage's HOME override breaks tests + emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none +} + +src_install() { + # work-around race conditions, bug #526996 + mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die + + emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install + + strip_completions + + dodoc AUTHORS CHANGES CONTRIBUTING.md README.md + + # install the eselect module + if use eselect; then + insinto /usr/share/eselect/modules + doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect" + doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5" + fi +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 2.1-r90; then + ewarn "For bash-completion autoloader to work, all completions need to" + ewarn "be installed in /usr/share/bash-completion/completions. You may" + ewarn "need to rebuild packages that installed completions in the old" + ewarn "location. You can do this using:" + ewarn + ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +" + ewarn + ewarn "After the rebuild, you should remove the old setup symlinks:" + ewarn + ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete" + fi + done + + if has_version 'app-shells/zsh'; then + elog + elog "If you are interested in using the provided bash completion functions with" + elog "zsh, valuable tips on the effective use of bashcompinit are available:" + elog " http://www.zsh.org/mla/workers/2003/msg00046.html" + elog + fi +} diff --git a/app-shells/bash-completion/bash-completion-2.4-r1.ebuild b/app-shells/bash-completion/bash-completion-2.4-r1.ebuild deleted file mode 100644 index 5b1db28a22..0000000000 --- a/app-shells/bash-completion/bash-completion-2.4-r1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -BASHCOMP_P=bashcomp-2.0.2 -inherit versionator - -DESCRIPTION="Programmable Completion for bash" -HOMEPAGE="https://github.com/scop/bash-completion" -SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz - https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris" -IUSE="" - -RDEPEND=">=app-shells/bash-4.3_p30-r1 - sys-apps/miscfiles - !app-eselect/eselect-bashcomp" -DEPEND="app-arch/xz-utils" -PDEPEND=">=app-shells/gentoo-bashcomp-20140911" - -# Remove unwanted completions. -STRIP_COMPLETIONS=( - # Slackware package stuff, quite generic names cause collisions - # (e.g. with sys-apps/pacman) - explodepkg installpkg makepkg pkgtool removepkg upgradepkg - - # Debian/Red Hat network stuff - ifdown ifup ifstatus - - # Installed in app-editors/vim-core - xxd - - # Now-dead symlinks to deprecated completions - hd ncal - - # Installed by sys-apps/util-linux-2.28 - mount umount mount.linux umount.linux -) - -src_prepare() { - eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch - # Bug 543100, update bug 601194 - eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch" - eapply_user -} - -src_test() { :; } # Skip testsuite because of interactive shell wrt #477066 - -src_install() { - # work-around race conditions, bug #526996 - mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die - - emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install - - local file - for file in "${STRIP_COMPLETIONS[@]}"; do - rm "${ED}"/usr/share/bash-completion/completions/${file} || die - done - # remove deprecated completions (moved to other packages) - rm "${ED}"/usr/share/bash-completion/completions/_* || die - - dodoc AUTHORS CHANGES CONTRIBUTING.md README.md - - # install the eselect module - insinto /usr/share/eselect/modules - doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect" - doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5" -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.1-r90 ${v}; then - ewarn "For bash-completion autoloader to work, all completions need to" - ewarn "be installed in /usr/share/bash-completion/completions. You may" - ewarn "need to rebuild packages that installed completions in the old" - ewarn "location. You can do this using:" - ewarn - ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +" - ewarn - ewarn "After the rebuild, you should remove the old setup symlinks:" - ewarn - ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete" - fi - done - - if has_version 'app-shells/zsh'; then - elog - elog "If you are interested in using the provided bash completion functions with" - elog "zsh, valuable tips on the effective use of bashcompinit are available:" - elog " http://www.zsh.org/mla/workers/2003/msg00046.html" - elog - fi -} diff --git a/app-shells/bash-completion/bash-completion-2.7-r3.ebuild b/app-shells/bash-completion/bash-completion-2.7-r3.ebuild deleted file mode 100644 index 94afac9d52..0000000000 --- a/app-shells/bash-completion/bash-completion-2.7-r3.ebuild +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -BASHCOMP_P=bashcomp-2.0.2 -inherit versionator - -DESCRIPTION="Programmable Completion for bash" -HOMEPAGE="https://github.com/scop/bash-completion" -SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz - https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris" -IUSE="test" -# Multiple test failures, need to investigate the exact problem -RESTRICT="test" - -# completion collision with net-fs/mc -RDEPEND=">=app-shells/bash-4.3_p30-r1 - sys-apps/miscfiles - !app-eselect/eselect-bashcomp - !!net-fs/mc" -DEPEND="app-arch/xz-utils - test? ( - ${RDEPEND} - app-misc/dtach - dev-util/dejagnu - dev-tcltk/tcllib - )" -PDEPEND=">=app-shells/gentoo-bashcomp-20140911" - -# Remove unwanted completions. -STRIP_COMPLETIONS=( - # Slackware package stuff, quite generic names cause collisions - # (e.g. with sys-apps/pacman) - explodepkg installpkg makepkg pkgtool removepkg upgradepkg - - # Debian/Red Hat network stuff - ifdown ifup ifstatus - - # Installed in app-editors/vim-core - xxd - - # Now-dead symlinks to deprecated completions - hd ncal - - # Installed by sys-apps/util-linux-2.28 - mount umount mount.linux umount.linux - - # Installed by sys-apps/util-linux-2.31 - rfkill -) - -src_prepare() { - eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch - # Bug 543100, update bug 601194 - eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch" - eapply_user - - # Remove implicit completions for vim. - # https://bugs.gentoo.org/649986 - sed -i -e 's/vi vim gvim rvim view rview rgvim rgview gview//' \ - bash_completion || die - rm test/completion/vi.exp || die -} - -src_test() { - # Tests need an interactive shell, #477066 - # idea stolen from: - # http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec - - # real-time output of the log ;-) - touch "${T}/dtach-test.log" || die - tail -f "${T}/dtach-test.log" & - local tail_pid=${!} - - nonfatal dtach -N "${T}/dtach.sock" \ - bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out' - - kill "${tail_pid}" - [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests" - [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed" -} - -src_install() { - # work-around race conditions, bug #526996 - mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die - - emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install - - local file - for file in "${STRIP_COMPLETIONS[@]}"; do - rm "${ED}"/usr/share/bash-completion/completions/${file} || die - done - # remove deprecated completions (moved to other packages) - rm "${ED}"/usr/share/bash-completion/completions/_* || die - - dodoc AUTHORS CHANGES CONTRIBUTING.md README.md - - # install the eselect module - insinto /usr/share/eselect/modules - doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect" - doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5" -} - -pkg_postinst() { - local v - for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.1-r90 ${v}; then - ewarn "For bash-completion autoloader to work, all completions need to" - ewarn "be installed in /usr/share/bash-completion/completions. You may" - ewarn "need to rebuild packages that installed completions in the old" - ewarn "location. You can do this using:" - ewarn - ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +" - ewarn - ewarn "After the rebuild, you should remove the old setup symlinks:" - ewarn - ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete" - fi - done - - if has_version 'app-shells/zsh'; then - elog - elog "If you are interested in using the provided bash completion functions with" - elog "zsh, valuable tips on the effective use of bashcompinit are available:" - elog " http://www.zsh.org/mla/workers/2003/msg00046.html" - elog - fi -} diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild b/app-shells/bash-completion/bash-completion-9999.ebuild index 1ef70643b1..70ce84b4ed 100644 --- a/app-shells/bash-completion/bash-completion-9999.ebuild +++ b/app-shells/bash-completion/bash-completion-9999.ebuild @@ -1,90 +1,105 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -BASHCOMP_P=bashcomp-2.0.2 -EGIT_REPO_URI="https://github.com/scop/bash-completion" -inherit autotools git-r3 versionator +PYTHON_COMPAT=( python3_{7..9} ) +inherit autotools git-r3 python-any-r1 user-info DESCRIPTION="Programmable Completion for bash" HOMEPAGE="https://github.com/scop/bash-completion" -SRC_URI="https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz" +EGIT_REPO_URI="https://github.com/scop/bash-completion" -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" KEYWORDS="" -IUSE="test" +IUSE="+eselect test" +RESTRICT="!test? ( test )" # completion collision with net-fs/mc -RDEPEND=">=app-shells/bash-4.3_p30-r1 +RDEPEND=">=app-shells/bash-4.3_p30-r1:0 sys-apps/miscfiles - !app-eselect/eselect-bashcomp !!net-fs/mc" -DEPEND="app-arch/xz-utils +DEPEND=" test? ( ${RDEPEND} - app-misc/dtach - dev-util/dejagnu - dev-tcltk/tcllib + $(python_gen_any_dep ' + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') )" PDEPEND=">=app-shells/gentoo-bashcomp-20140911" -# Remove unwanted completions. -STRIP_COMPLETIONS=( - # Slackware package stuff, quite generic names cause collisions - # (e.g. with sys-apps/pacman) - explodepkg installpkg makepkg pkgtool removepkg upgradepkg - - # Debian/Red Hat network stuff - ifdown ifup ifstatus +strip_completions() { + # Remove unwanted completions. + local strip_completions=( + # Slackware package stuff, quite generic names cause collisions + # (e.g. with sys-apps/pacman) + explodepkg installpkg makepkg pkgtool removepkg upgradepkg + + # Debian/Red Hat network stuff + ifdown ifup ifquery ifstatus + + # Installed in app-editors/vim-core + xxd + + # Now-dead symlinks to deprecated completions + hd ncal + ) + if [[ ${ARCH} != *-fbsd && ${ARCH} != *-freebsd ]]; then + strip_completions+=( + freebsd-update kldload kldunload portinstall portsnap + pkg_deinstall pkg_delete pkg_info + ) + fi - # Installed in app-editors/vim-core - xxd + local file + for file in "${strip_completions[@]}"; do + rm "${ED}"/usr/share/bash-completion/completions/${file} || + die "stripping ${file} failed" + done - # Now-dead symlinks to deprecated completions - hd ncal + # remove deprecated completions (moved to other packages) + rm "${ED}"/usr/share/bash-completion/completions/_* || die +} - # Installed by sys-apps/util-linux-2.28 (and now deprecated) - _mount _umount _mount.linux _umount.linux +python_check_deps() { + has_version "dev-python/pexpect[${PYTHON_USEDEP}]" && + has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} - # Deprecated in favor of sys-apps/util-linux-2.31 - _rfkill -) +pkg_setup() { + use test && python-any-r1_pkg_setup +} src_unpack() { - git-r3_src_unpack - default + use eselect && git-r3_fetch https://github.com/mgorny/bashcomp2 + git-r3_fetch + + use eselect && git-r3_checkout https://github.com/mgorny/bashcomp2 \ + "${WORKDIR}"/bashcomp2 + git-r3_checkout } src_prepare() { - eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch - eapply_user + if use eselect; then + # generate and apply patch + emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch + eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch + fi + + # redhat-specific, we strip these completions + rm test/t/test_if{down,up}.py || die + # not available for icedtea + rm test/t/test_javaws.py || die + eapply_user eautoreconf } src_test() { - # Tests need an interactive shell, #477066 - # idea stolen from: - # http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec - - # real-time output of the log ;-) - touch "${T}/dtach-test.log" || die - tail -f "${T}/dtach-test.log" & - local tail_pid=${!} - - # override the default expect timeout and buffer size to avoid tests - # failing randomly due to cold cache, busy system or just more output - # than upstream anticipated (they run tests on pristine docker - # installs of binary distros) - nonfatal dtach -N "${T}/dtach.sock" \ - bash -c 'emake check RUNTESTFLAGS="OPT_TIMEOUT=300 OPT_BUFFER_SIZE=1000000" \ - &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out' - - kill "${tail_pid}" - [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests" - [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed" + # portage's HOME override breaks tests + emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none } src_install() { @@ -93,26 +108,20 @@ src_install() { emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install - local file - for file in "${STRIP_COMPLETIONS[@]}"; do - rm "${ED}"/usr/share/bash-completion/completions/${file} || - die "stripping ${file} failed" - done - # remove deprecated completions (moved to other packages) - rm "${ED}"/usr/share/bash-completion/completions/_* || die + strip_completions dodoc AUTHORS CHANGES CONTRIBUTING.md README.md # install the eselect module - insinto /usr/share/eselect/modules - doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect" - doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5" + use eselect && + emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" install } pkg_postinst() { local v for v in ${REPLACING_VERSIONS}; do - if ! version_is_at_least 2.1-r90 ${v}; then + if ver_test "${v}" -lt 2.1-r90; then ewarn "For bash-completion autoloader to work, all completions need to" ewarn "be installed in /usr/share/bash-completion/completions. You may" ewarn "need to rebuild packages that installed completions in the old" diff --git a/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch b/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch deleted file mode 100644 index 27a85504be..0000000000 --- a/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- bash-completion-2.1/bash_completion.orig 2014-03-09 17:38:14 +0000 -+++ bash-completion-2.1/bash_completion 2014-03-13 23:26:44 +0000 -@@ -536,13 +536,23 @@ - # @param $2 Name of variable to return result to - _quote_readline_by_ref() - { -- if [[ $1 == \'* ]]; then -+ if [ -z "$1" ]; then -+ # avoid quoting if empty -+ printf -v $2 %s "$1" -+ elif [[ $1 == \'* ]]; then - # Leave out first character - printf -v $2 %s "${1:1}" -+ elif [[ $1 == \~* ]]; then -+ # avoid escaping first ~ -+ printf -v $2 \~%q "${1:1}" - else - printf -v $2 %q "$1" - fi - -+ # Replace double escaping ( \\ ) by single ( \ ) -+ # This happens always when argument is already escaped at cmdline, -+ # and passed to this function as e.g.: file\ with\ spaces -+ [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}" - # If result becomes quoted like this: $'string', re-evaluate in order to - # drop the additional quoting. See also: http://www.mail-archive.com/ - # bash-completion-devel@lists.alioth.debian.org/msg01942.html diff --git a/app-shells/bash-completion/metadata.xml b/app-shells/bash-completion/metadata.xml index 2bb3ef2362..b8af55c298 100644 --- a/app-shells/bash-completion/metadata.xml +++ b/app-shells/bash-completion/metadata.xml @@ -1,5 +1,5 @@ - + mgorny@gentoo.org @@ -9,6 +9,12 @@ shell-tools@gentoo.org Gentoo Shell Tools Project + + + Support blacklisting of completions via 'eselect bash-completion'. + This enables custom Gentoo patching of upstream completion loader. + + Since v2.04, bash has allowed you to intelligently program and extend its standard completion behavior to achieve complex command lines with just a @@ -23,7 +29,6 @@ - mgorny/bashcomp2 scop/bash-completion From 98cc991c8a1d163153111f05c51c2496bc411535 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:27:15 +0100 Subject: [PATCH 10/40] x11-base/xorg-proto: Sync with gentoo It's from gentoo commit fe355755ac76b2675458ead53210933cfc11adf5. --- x11-base/xorg-proto/Manifest | 2 +- x11-base/xorg-proto/metadata.xml | 2 +- x11-base/xorg-proto/xorg-proto-2018.4.ebuild | 68 ------------------- x11-base/xorg-proto/xorg-proto-2021.5.ebuild | 54 +++++++++++++++ x11-base/xorg-proto/xorg-proto-9999.ebuild | 70 ++++++++------------ 5 files changed, 84 insertions(+), 112 deletions(-) delete mode 100644 x11-base/xorg-proto/xorg-proto-2018.4.ebuild create mode 100644 x11-base/xorg-proto/xorg-proto-2021.5.ebuild diff --git a/x11-base/xorg-proto/Manifest b/x11-base/xorg-proto/Manifest index 0b690c721a..1ee1022273 100644 --- a/x11-base/xorg-proto/Manifest +++ b/x11-base/xorg-proto/Manifest @@ -1 +1 @@ -DIST xorgproto-2018.4.tar.gz 493597 BLAKE2B f25a637317ff2d7ba34d416368261b5afb617e42a1fb642cc78ab3e877752a81291fe0523d1af6cd0fe27399676b14a70ceea7178d521187423bb503c9b1c63b SHA512 f79a47fc3de04d7258769869c11e99eff7fa4a4b5925cf60f9f7579f946d7d0e737224e9a54d18e439a3586126e66e0764c0f09ed50987c781955b9b9a1e0362 +DIST xorgproto-2021.5.tar.gz 1132811 BLAKE2B 3fe288cf8a848436dacc0ebf437b6a1d2c81878abaf8c542ff45e70389643cb2bc25bdab5ab6ff9d44a4f9bbdbd24757d21617c2c6a0754870afcd9f60ccbb05 SHA512 9c9ec62f0af68fd0dff24010986326a2b201be2b56b8b94abfe7258bf66b3c4c37088596c43a234aae63b1d781f7797caf408e434c98e8805803bc890b8aacb0 diff --git a/x11-base/xorg-proto/metadata.xml b/x11-base/xorg-proto/metadata.xml index e943b72b8a..e17a5bccb7 100644 --- a/x11-base/xorg-proto/metadata.xml +++ b/x11-base/xorg-proto/metadata.xml @@ -1,5 +1,5 @@ - + x11@gentoo.org diff --git a/x11-base/xorg-proto/xorg-proto-2018.4.ebuild b/x11-base/xorg-proto/xorg-proto-2018.4.ebuild deleted file mode 100644 index b841b04a2b..0000000000 --- a/x11-base/xorg-proto/xorg-proto-2018.4.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -MY_PN="${PN/xorg-/xorg}" -MY_P="${MY_PN}-${PV}" - -EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/proto/${MY_PN}" - -if [[ ${PV} = 9999* ]]; then - GIT_ECLASS="git-r3" -fi - -inherit ${GIT_ECLASS} meson - -DESCRIPTION="X.Org combined protocol headers" -HOMEPAGE="https://cgit.freedesktop.org/xorg/proto/xorgproto/" -if [[ ${PV} = 9999* ]]; then - SRC_URI="" -else - KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-fbsd ~x64-macos ~x64-solaris" - SRC_URI="https://xorg.freedesktop.org/archive/individual/proto/${MY_P}.tar.gz" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="MIT" -SLOT="0" -IUSE="" - -DEPEND="" -RDEPEND=" - ! Date: Wed, 2 Mar 2022 17:28:15 +0100 Subject: [PATCH 11/40] dev-perl/libintl-perl: Sync with gentoo It's from gentoo commit 71ce13d896cf0ffa2391c5226b73e0907635262e. --- dev-perl/libintl-perl/Manifest | 3 +- .../files/libintl-perl-1.240.0-sanity-2.patch | 51 ------------------- .../libintl-perl-1.240.0-r2.ebuild | 35 ------------- .../libintl-perl/libintl-perl-1.280.0.ebuild | 23 --------- .../libintl-perl/libintl-perl-1.320.0.ebuild | 33 ++++++++++++ dev-perl/libintl-perl/metadata.xml | 2 +- 6 files changed, 35 insertions(+), 112 deletions(-) delete mode 100644 dev-perl/libintl-perl/files/libintl-perl-1.240.0-sanity-2.patch delete mode 100644 dev-perl/libintl-perl/libintl-perl-1.240.0-r2.ebuild delete mode 100644 dev-perl/libintl-perl/libintl-perl-1.280.0.ebuild create mode 100644 dev-perl/libintl-perl/libintl-perl-1.320.0.ebuild diff --git a/dev-perl/libintl-perl/Manifest b/dev-perl/libintl-perl/Manifest index f301751a51..c4dff6d9c8 100644 --- a/dev-perl/libintl-perl/Manifest +++ b/dev-perl/libintl-perl/Manifest @@ -1,2 +1 @@ -DIST libintl-perl-1.24.tar.gz 605626 BLAKE2B 6949f895ba54853704d5470e8a736e799d74ddbd569378254ac19ada9cc43c644f78bea1949b7a4c0072d4fe54f0744b7ad011539c6a1dd1191c6792c9347f1a SHA512 1c2c5d6d7ab21c45897195952a9f0f6ba26a9bbb7bfef0b5f3e9da282fcf94ab4ee80721164e5e3293d8abda0158e77ffbc331b8bed66aa56dd7fc7a6a91323d -DIST libintl-perl-1.28.tar.gz 470898 BLAKE2B 6217a37f2176869dc945bd64a87a82710645153e3777fb5e4ddc674f179040d2268f326411a578314efafaa0edbd0e67aed99c4da86e20e811e1116d5cf2a86a SHA512 50f0836c1a84a22fcc8fca0fff2faeaae66774ec67b96c09a911c4969e8a610bbf20ba38167c13339b9ad9617e1fca07cb0cb1f12732f973b1cf618d502f59aa +DIST libintl-perl-1.32.tar.gz 598209 BLAKE2B 1aa9ef3e2d4c1c15eb5301880e2141864d53e3e8620656276ceb07f0946612d56801021bc78bb132fee910f3ce3e55e3a092cd0305831680a9adcd731249c680 SHA512 fca6c8863dfd36c7604bc80a401e825eb707bc75016521c09006c34c170a41b009d30ec93d7e2a7f61caa1dbdf0333511c3d515d4fdc0fea32242eca68a7e35d diff --git a/dev-perl/libintl-perl/files/libintl-perl-1.240.0-sanity-2.patch b/dev-perl/libintl-perl/files/libintl-perl-1.240.0-sanity-2.patch deleted file mode 100644 index e6adbf1419..0000000000 --- a/dev-perl/libintl-perl/files/libintl-perl-1.240.0-sanity-2.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -ruN libintl-perl-1.24.orig/Makefile.PL libintl-perl-1.24/Makefile.PL ---- libintl-perl-1.24.orig/Makefile.PL 2015-04-03 15:28:12.000000000 +0200 -+++ libintl-perl-1.24/Makefile.PL 2016-06-01 00:06:12.000000000 +0200 -@@ -163,47 +163,6 @@ - - package MY; - --# FIXME: This is really a hack! Problem: Depending on the build system, --# we may or may not build and install the XS version. If the XS version --# is being built, the directory blib/arch will be populated, if it is --# not being built, blib/arch will be empty. Unfortunately, if blib/arch --# is not empty, *all* library files will be installed in the architecture --# dependent locations, if it is empty, they will be installed in the --# architecture independent tree. --# --# Unfortunately, ExtUtils::MakeMaker does not take care of uninstalling --# files from previous installations. Consequently, we cannot determine --# which version of the library will be loaded, since this depends on the --# current value of @INC. --# --# The solution does not really make me happy. The Makefile will be patched, --# so that instead of ExtUtils::Install a custom module MyInstall.pm will --# be used. This custom module overwrites the subroutine that detects --# whether a directory is empty in ExtUtils::Install, and will lie if that --# directory happens to be "blib/arch". This little hack effectively disables --# the annoying behavior of ExtUtils::Install (and I sincerely hope that --# this is portable). --sub libscan --{ -- my ($self, $file) = @_; -- -- return if 'MyInstall.pm' eq $file; -- -- $self->SUPER::libscan ($file); --} -- --sub tools_other --{ -- my $self = shift; -- -- my $fragment = $self->SUPER::tools_other (@_); -- -- $fragment =~ s/^MOD_INSTALL\s*=\s*(.*?)-MExtUtils::Install -- /MOD_INSTALL =$1-MMyInstall/msx; -- -- return $fragment; --} -- - package main; - - my $name = $0; diff --git a/dev-perl/libintl-perl/libintl-perl-1.240.0-r2.ebuild b/dev-perl/libintl-perl/libintl-perl-1.240.0-r2.ebuild deleted file mode 100644 index bc6c3805b3..0000000000 --- a/dev-perl/libintl-perl/libintl-perl-1.240.0-r2.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DIST_AUTHOR=GUIDO -DIST_VERSION=1.24 -inherit perl-module - -DESCRIPTION="High-Level Interface to Uniforum Message Translation" -HOMEPAGE="http://guido-flohr.net/projects/libintl-perl ${HOMEPAGE}" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -RDEPEND="virtual/libintl" -DEPEND="${RDEPEND} - virtual/perl-ExtUtils-MakeMaker -" - -PATCHES=( "${FILESDIR}/${P}-sanity-2.patch" ) - -src_test() { - if grep -q '^de_' <( locale -a ) ; then - if grep -q '^de_AT$' <( locale -a ) ; then - perl-module_src_test - else - ewarn "Skipping tests, known broken with de_ and without de_AT" - fi - else - perl-module_src_test - fi -} diff --git a/dev-perl/libintl-perl/libintl-perl-1.280.0.ebuild b/dev-perl/libintl-perl/libintl-perl-1.280.0.ebuild deleted file mode 100644 index 195fadf544..0000000000 --- a/dev-perl/libintl-perl/libintl-perl-1.280.0.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DIST_AUTHOR=GUIDO -DIST_VERSION=1.28 -inherit perl-module - -DESCRIPTION="High-Level Interface to Uniforum Message Translation" -HOMEPAGE="http://guido-flohr.net/projects/libintl-perl ${HOMEPAGE}" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -RDEPEND="virtual/libintl" -DEPEND="${RDEPEND} - virtual/perl-ExtUtils-MakeMaker -" - -PATCHES=( "${FILESDIR}/${P}-sanity-2.patch" ) diff --git a/dev-perl/libintl-perl/libintl-perl-1.320.0.ebuild b/dev-perl/libintl-perl/libintl-perl-1.320.0.ebuild new file mode 100644 index 0000000000..443f4ddd4a --- /dev/null +++ b/dev-perl/libintl-perl/libintl-perl-1.320.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=GUIDO +DIST_VERSION=1.32 +DIST_EXAMPLES=("sample/*") +inherit perl-module + +DESCRIPTION="High-Level Interface to Uniforum Message Translation" +HOMEPAGE="http://guido-flohr.net/projects/libintl-perl https://metacpan.org/release/libintl-perl" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="minimal" + +RDEPEND=" + virtual/libintl + !minimal? ( + dev-perl/File-ShareDir + ) + virtual/perl-File-Spec + >=virtual/perl-version-0.770.0 +" +DEPEND="${RDEPEND} +" +BDEPEND="${RDEPEND} + virtual/perl-ExtUtils-MakeMaker +" + +PATCHES=( "${FILESDIR}/${PN}-1.280.0-sanity-2.patch" ) diff --git a/dev-perl/libintl-perl/metadata.xml b/dev-perl/libintl-perl/metadata.xml index 642af8f580..b01590886c 100644 --- a/dev-perl/libintl-perl/metadata.xml +++ b/dev-perl/libintl-perl/metadata.xml @@ -1,5 +1,5 @@ - + perl@gentoo.org From 8e34060b24ae312abc0859c7bf4417fc63f30c61 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:28:51 +0100 Subject: [PATCH 12/40] app-crypt/efitools: Sync with gentoo It's from gentoo commit 915705ee5db3fff848c1af34db5aa4a68320619b. --- app-crypt/efitools/Manifest | 2 +- app-crypt/efitools/efitools-1.7.0.ebuild | 33 ----------- app-crypt/efitools/efitools-1.8.1.ebuild | 9 ++- app-crypt/efitools/efitools-1.9.2.ebuild | 56 +++++++++++++++++++ .../efitools/files/1.8.1-respect-ar.patch | 25 +++++++++ ...fitools-1.8.1-libressl-compatibility.patch | 11 ---- app-crypt/efitools/metadata.xml | 2 +- 7 files changed, 87 insertions(+), 51 deletions(-) delete mode 100644 app-crypt/efitools/efitools-1.7.0.ebuild create mode 100644 app-crypt/efitools/efitools-1.9.2.ebuild create mode 100644 app-crypt/efitools/files/1.8.1-respect-ar.patch delete mode 100644 app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch diff --git a/app-crypt/efitools/Manifest b/app-crypt/efitools/Manifest index 5ec4d217cb..f6d9e82586 100644 --- a/app-crypt/efitools/Manifest +++ b/app-crypt/efitools/Manifest @@ -1,2 +1,2 @@ -DIST efitools-1.7.0.tar.bz2 96042 BLAKE2B b0042df906282d878b1400c359c1eece24588f5df7ab753b62f5f0b95e97467cfaa17e04a2ef40a7ec85155c4d13bd438dd94471e0ec98ab23030dd54e7d4214 SHA512 1e839c5565b0a113569cf47bf98d656875f9a127b481287a553e8b1276969021e1a39a730b9ede3852e15d1ac045db7ec64767f5ac71a24567236c0938697ccb DIST efitools-1.8.1.tar.gz 115319 BLAKE2B 3aad65defc203055122027cc3a48f50912d2f08b592841780fdc1bf337d75774116e698c4270865275ce7fe64988cd84105138ca979d81818f0065d7ae90f1d0 SHA512 114ef8e52160f5a5239ec306dbd587610849bce771ba8145ed092afd79e44f3ecee93cc1d97e2d5fdb880cc825bbbe928b3ef6701fd3b1fa444053894be1098a +DIST efitools-1.9.2.tar.gz 116037 BLAKE2B b3540932eb112e362fd0eed47090360603807dcaec8c6a10058618f8252eeb5dcbbd703d313cb6fadae62c1312815080cf2c77fc86f9dfc9f9afca24ad97f584 SHA512 77e0ad7e865814ed388ff6daabe0f4b49ba51672bf2cbb98b7905e209cbd28f9ede2f73213ce45af8a978c1e67dba24ec88a1188661317cc22317b47e575cde8 diff --git a/app-crypt/efitools/efitools-1.7.0.ebuild b/app-crypt/efitools/efitools-1.7.0.ebuild deleted file mode 100644 index c47c9b03a9..0000000000 --- a/app-crypt/efitools/efitools-1.7.0.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit eutils - -DESCRIPTION="Tools for manipulating UEFI secure boot platforms" -HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git" -SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git/snapshot/v${PV}.tar.bz2 -> ${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="libressl" - -RDEPEND=" - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - sys-apps/util-linux" -DEPEND="${RDEPEND} - sys-apps/help2man - >=sys-boot/gnu-efi-3.0u - app-crypt/sbsigntools - virtual/pkgconfig - dev-perl/File-Slurp" - -S=${WORKDIR}/v${PV} - -src_prepare() { - epatch "${FILESDIR}/1.7.0-Make.rules.patch" - epatch_user -} diff --git a/app-crypt/efitools/efitools-1.8.1.ebuild b/app-crypt/efitools/efitools-1.8.1.ebuild index 94d636eec2..ebac350dbc 100644 --- a/app-crypt/efitools/efitools-1.8.1.ebuild +++ b/app-crypt/efitools/efitools-1.8.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -12,10 +12,9 @@ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snaps LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="libressl static" +IUSE="static" -LIB_DEPEND="!libressl? ( dev-libs/openssl:0=[static-libs(+)] ) - libressl? ( dev-libs/libressl:0=[static-libs(+)] )" +LIB_DEPEND="dev-libs/openssl:0=[static-libs(+)]" RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) sys-apps/util-linux" @@ -30,7 +29,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/1.7.0-Make.rules.patch" - "${FILESDIR}/${P}-libressl-compatibility.patch" + "${FILESDIR}/1.8.1-respect-ar.patch" ) src_prepare() { diff --git a/app-crypt/efitools/efitools-1.9.2.ebuild b/app-crypt/efitools/efitools-1.9.2.ebuild new file mode 100644 index 0000000000..ac731ef3bd --- /dev/null +++ b/app-crypt/efitools/efitools-1.9.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Tools for manipulating UEFI secure boot platforms" +HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="static" + +LIB_DEPEND="dev-libs/openssl:0=[static-libs(+)]" + +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + sys-apps/util-linux" + +DEPEND="${RDEPEND} + app-crypt/sbsigntools + dev-perl/File-Slurp + static? ( ${LIB_DEPEND} ) + sys-apps/help2man + sys-boot/gnu-efi + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/1.7.0-Make.rules.patch" + "${FILESDIR}/1.8.1-respect-ar.patch" +) + +src_prepare() { + if use static; then + append-ldflags -static + sed -i "s/-lcrypto\b/$($(tc-getPKG_CONFIG) --static --libs libcrypto)/g" \ + Makefile || die + fi + + # Let it build with clang. + if tc-is-clang; then + sed -i -e 's/-fno-toplevel-reorder//g' Make.rules || die + fi + + # Respect users CFLAGS + sed -i -e 's/CFLAGS.*= -O2 -g/CFLAGS += /' Make.rules || die + + # Respect users LDFLAGS + sed -i -e 's/LDFLAGS/LIBS/g' Make.rules || die + sed -i -e 's/\$(CC)/& $(LDFLAGS)/g' Makefile || die + + # Run 'default', to apply user patches + default +} diff --git a/app-crypt/efitools/files/1.8.1-respect-ar.patch b/app-crypt/efitools/files/1.8.1-respect-ar.patch new file mode 100644 index 0000000000..36e6620119 --- /dev/null +++ b/app-crypt/efitools/files/1.8.1-respect-ar.patch @@ -0,0 +1,25 @@ +From 81503d7a43b99c036758d05c1794502c09189fa4 Mon Sep 17 00:00:00 2001 +From: Matthias Maier +Date: Tue, 5 Oct 2021 22:27:52 -0500 +Subject: [PATCH] Do not use ar directly + +--- + Make.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Make.rules b/Make.rules +index e46d407..767070d 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -129,7 +129,7 @@ getvar = $(shell if [ "$(1)" = "PK" -o "$(1)" = "KEK" ]; then echo $(1); else ec + # sbsign --key KEK.key --cert KEK.crt --output $@ $< + + %.a: +- ar rcv $@ $^ ++ $(AR) rcv $@ $^ + + doc/%.1: doc/%.1.in % + $(HELP2MAN) --no-info -i $< -o $@ ./$* +-- +2.32.0 + diff --git a/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch b/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch deleted file mode 100644 index 876baae16f..0000000000 --- a/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cert-to-efi-hash-list.c 2018-04-21 20:59:24.814748503 +0200 -+++ b/cert-to-efi-hash-list.c 2018-04-21 20:59:51.868581307 +0200 -@@ -135,7 +135,7 @@ - X509 *cert = PEM_read_bio_X509(cert_bio, NULL, NULL, NULL); - unsigned char *cert_buf = NULL; - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - int cert_len = i2d_X509_CINF(cert->cert_info, &cert_buf); - #else - int cert_len = i2d_re_X509_tbs(cert, &cert_buf); diff --git a/app-crypt/efitools/metadata.xml b/app-crypt/efitools/metadata.xml index c1f7c0b4ef..ba25ee6d9d 100644 --- a/app-crypt/efitools/metadata.xml +++ b/app-crypt/efitools/metadata.xml @@ -1,5 +1,5 @@ - + tamiko@gentoo.org From a15aac4f040181c749e14e8e056014dc4fa8c616 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:51:55 +0100 Subject: [PATCH 13/40] sys-fs/quota: Sync with gentoo It's from gentoo commit f4cae72bff7ab14e21f3f73f97308e0b035db769. --- sys-fs/quota/Manifest | 3 +- .../files/ldap-scripts/applySystemQuotas.pl | 0 .../quota/files/ldap-scripts/edquota_editor | 0 .../files/ldap-scripts/setSystemQuotas.pl | 0 .../files/quota-4.03-default_fpic_fpie.patch | 32 ------- .../quota-4.03-distribute_ldap-scripts.patch | 23 ----- .../quota-4.03-dont_override_cflags.patch | 22 ----- ...3-explicitely_print_disabled_options.patch | 69 --------------- .../quota-4.03-fix_build_without_ldap.patch | 85 ------------------- sys-fs/quota/files/quota-4.03-no_rpc.patch | 57 ------------- .../files/quota-4.03-noldap_linking.patch | 75 ---------------- .../quota-4.03-repqouta_F_option_arg.patch | 27 ------ .../files/quota-4.03-respect_docdir.patch | 21 ----- sys-fs/quota/files/quota-4.04-glibc226.patch | 43 ---------- .../quota/files/quota-4.06-musl-cdefs.patch | 20 +++++ sys-fs/quota/metadata.xml | 2 +- sys-fs/quota/quota-4.03.ebuild | 83 ------------------ ...quota-4.04-r1.ebuild => quota-4.06.ebuild} | 23 ++--- 18 files changed, 34 insertions(+), 551 deletions(-) mode change 100755 => 100644 sys-fs/quota/files/ldap-scripts/applySystemQuotas.pl mode change 100755 => 100644 sys-fs/quota/files/ldap-scripts/edquota_editor mode change 100755 => 100644 sys-fs/quota/files/ldap-scripts/setSystemQuotas.pl delete mode 100644 sys-fs/quota/files/quota-4.03-default_fpic_fpie.patch delete mode 100644 sys-fs/quota/files/quota-4.03-distribute_ldap-scripts.patch delete mode 100644 sys-fs/quota/files/quota-4.03-dont_override_cflags.patch delete mode 100644 sys-fs/quota/files/quota-4.03-explicitely_print_disabled_options.patch delete mode 100644 sys-fs/quota/files/quota-4.03-fix_build_without_ldap.patch delete mode 100644 sys-fs/quota/files/quota-4.03-no_rpc.patch delete mode 100644 sys-fs/quota/files/quota-4.03-noldap_linking.patch delete mode 100644 sys-fs/quota/files/quota-4.03-repqouta_F_option_arg.patch delete mode 100644 sys-fs/quota/files/quota-4.03-respect_docdir.patch delete mode 100644 sys-fs/quota/files/quota-4.04-glibc226.patch create mode 100644 sys-fs/quota/files/quota-4.06-musl-cdefs.patch delete mode 100644 sys-fs/quota/quota-4.03.ebuild rename sys-fs/quota/{quota-4.04-r1.ebuild => quota-4.06.ebuild} (80%) diff --git a/sys-fs/quota/Manifest b/sys-fs/quota/Manifest index 7e49bf9984..ebd4c38e43 100644 --- a/sys-fs/quota/Manifest +++ b/sys-fs/quota/Manifest @@ -1,2 +1 @@ -DIST quota-4.03.tar.gz 564352 BLAKE2B b474be79576fd2db7ad5f7c4e93d665fca19004727f4ff12e960da3251091b026c1458adecc0ed3a803da3bfcef6c857f612c44c7800ecc53c9ae53450d10338 SHA512 9603940048dcc0c4db6d6e14173769c815641ebc78a0cc457a0622dbfc597319bae1eaad4ef3281c52757995d47424b96dc66426ce540a8b538b996eea2dc5f8 -DIST quota-4.04.tar.gz 577303 BLAKE2B 8ee1e8f99b70f626ec051e4e9afe53c788b625a29f26afbe075039cf88dde9f6641c39e0ccfdbfcc6981fabe35e8fd15e7203989e9bbbdd1f1772949566531f6 SHA512 adc33863d2a966b4c46983fa3926e6b6ba75e260ed21bdff646584237840e6beb0dcfbfd2f655969aa5675c3c398ac2e483afb933f03f983756ebb3352d0eaad +DIST quota-4.06.tar.gz 520448 BLAKE2B 2cbadeade228d0154f3a8d455cc1aa6e85c9ad7854007e3188c9035abe4d5fdbdf97985fd2fa6308f486ffbe60461e0fe1139f1ec0ca415ce08292d74e0ddde1 SHA512 cece46b8e3a82e8afcf8bfc9f6b310ec91afe034102cebc031bc7d7e04287fdbffb21ab1d3e6e1825175cffa4bad0a4ecbefec0efee028d961b14ac626d5c871 diff --git a/sys-fs/quota/files/ldap-scripts/applySystemQuotas.pl b/sys-fs/quota/files/ldap-scripts/applySystemQuotas.pl old mode 100755 new mode 100644 diff --git a/sys-fs/quota/files/ldap-scripts/edquota_editor b/sys-fs/quota/files/ldap-scripts/edquota_editor old mode 100755 new mode 100644 diff --git a/sys-fs/quota/files/ldap-scripts/setSystemQuotas.pl b/sys-fs/quota/files/ldap-scripts/setSystemQuotas.pl old mode 100755 new mode 100644 diff --git a/sys-fs/quota/files/quota-4.03-default_fpic_fpie.patch b/sys-fs/quota/files/quota-4.03-default_fpic_fpie.patch deleted file mode 100644 index 2ff519f2b8..0000000000 --- a/sys-fs/quota/files/quota-4.03-default_fpic_fpie.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit cd9dff0b5b53279442458360003831b6c14adc22 -Author: Tomáš Chvátal -Date: Tue Jan 5 11:20:52 2016 +0100 - - Set -fPIC and -pie as default params when building - - Signed-off-by: Tomáš Chvátal - Signed-off-by: Jan Kara - -diff --git a/Makefile.am b/Makefile.am -index 7c7a866..77f8400 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,5 @@ - ACLOCAL_AMFLAGS = -I m4 -+AM_LDFLAGS = -pie - - BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c - -diff --git a/configure.ac b/configure.ac -index 1552c15..68d5924 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [ - # ================ - # Check for cflags - # ================ --CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC" - AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])], - [enable_werror="$enableval"], diff --git a/sys-fs/quota/files/quota-4.03-distribute_ldap-scripts.patch b/sys-fs/quota/files/quota-4.03-distribute_ldap-scripts.patch deleted file mode 100644 index 83339159e0..0000000000 --- a/sys-fs/quota/files/quota-4.03-distribute_ldap-scripts.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 861154efb90ed049e0473cc36935b8d03c78a869 -Author: Tomáš Chvátal -Date: Mon Jan 4 13:01:36 2016 +0100 - - Distribute ldap-scripts directory too - - Signed-off-by: Tomáš Chvátal - Signed-off-by: Jan Kara - -diff --git a/Makefile.am b/Makefile.am -index eb62617..a880ebe 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -52,7 +52,8 @@ EXTRA_DIST = \ - $(man_MANS) \ - $(rpcsvc_DATA) \ - autogen.sh \ -- Changelog -+ Changelog \ -+ ldap-scripts - - noinst_LIBRARIES = \ - libquota.a \ diff --git a/sys-fs/quota/files/quota-4.03-dont_override_cflags.patch b/sys-fs/quota/files/quota-4.03-dont_override_cflags.patch deleted file mode 100644 index e59341a702..0000000000 --- a/sys-fs/quota/files/quota-4.03-dont_override_cflags.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 776757a23e9930588950c7fcbc7827ec7a3e51c4 -Author: Tomáš Chvátal -Date: Mon Jan 4 15:48:19 2016 +0100 - - Do not accidentaly override commandline passed CFLAGS. - - Signed-off-by: Tomáš Chvátal - Signed-off-by: Jan Kara - -diff --git a/configure.ac b/configure.ac -index 3ba1386..1552c15 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [ - # ================ - # Check for cflags - # ================ --CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -+CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])], - [enable_werror="$enableval"], diff --git a/sys-fs/quota/files/quota-4.03-explicitely_print_disabled_options.patch b/sys-fs/quota/files/quota-4.03-explicitely_print_disabled_options.patch deleted file mode 100644 index 29627c03ab..0000000000 --- a/sys-fs/quota/files/quota-4.03-explicitely_print_disabled_options.patch +++ /dev/null @@ -1,69 +0,0 @@ -commit 6ccb66159a9eee6ca114b11b70eb06f4ac6900d7 -Author: Jan Kara -Date: Mon Jan 4 15:36:27 2016 +0100 - - Print explicitely disabled options properly - - Currently we printed only an empty string when some build option was - disabled explicitely via --disable-foo. Print 'no' in that case as well. - - Signed-off-by: Jan Kara - -diff --git a/configure.ac b/configure.ac -index 39631c4..3ba1386 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -74,7 +74,7 @@ AC_ARG_ENABLE([ldapmail], - AS_IF([test "x$enable_ldapmail" != "xno"], [ - build_ldap="yes" - AC_CHECK_LIB([ldap], [ldap_initialize], [], [ -- build_ldap=no -+ build_ldap="no" - AS_IF([test "x$enable_ldapmail" = "xyes"], [ - AC_MSG_ERROR([LDAP support required but library not found.]); - ]) -@@ -84,6 +84,8 @@ AS_IF([test "x$enable_ldapmail" != "xno"], [ - AC_DEFINE([USE_LDAP_MAIL_LOOKUP], 1, [Lookup email address using LDAP]) - COMPILE_OPTS="$COMPILE_OPTS USE_LDAP_MAIL_LOOKUP" - ]) -+], [ -+ build_ldap="no" - ]) - AC_SUBST(LDAP_LIBS) - -@@ -113,6 +115,8 @@ AS_IF([test "x$enable_ext2direct" != "xno"], [ - AC_DEFINE([EXT2_DIRECT], 1, [Scanning of ext? filesystems using e2fslib]) - COMPILE_OPTS="$COMPILE_OPTS EXT2_DIRECT" - ]) -+], [ -+ build_ext2direct="no" - ]) - AC_SUBST(EXT2FS_CFLAGS) - AC_SUBST(EXT2FS_LIBS) -@@ -141,6 +145,8 @@ AS_IF([test "x$enable_netlink" != "xno"], [ - AC_MSG_ERROR([Required libnl3 libraries for quota netlink daemon not found.]) - ]) - ]) -+], [ -+ build_netlink="no" - ]) - AM_CONDITIONAL([WITH_NETLINK], [test "x$build_netlink" != "xno"]) - AC_SUBST(DBUS_CFLAGS) -@@ -171,6 +177,8 @@ AS_IF([test "x$enable_libwrap" != "xno"], [ - AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) - COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" - ]) -+], [ -+ build_libwrap="no" - ]) - AC_SUBST(WRAP_LIBS) - -@@ -199,6 +207,8 @@ AS_IF([test x"$enable_rpc" != "xno"], [ - AC_DEFINE([RPC], 1, [Support for RPC]) - COMPILE_OPTS="$COMPILE_OPTS RPC" - ]) -+], [ -+ build_rpc="no" - ]) - AM_CONDITIONAL([WITH_RPC], [test x"$build_rpc" != "xno"]) - diff --git a/sys-fs/quota/files/quota-4.03-fix_build_without_ldap.patch b/sys-fs/quota/files/quota-4.03-fix_build_without_ldap.patch deleted file mode 100644 index ba838bfe28..0000000000 --- a/sys-fs/quota/files/quota-4.03-fix_build_without_ldap.patch +++ /dev/null @@ -1,85 +0,0 @@ -commit 39fd30ce57e3c34c3649866bf9345a71f0b78667 -Author: Jan Kara -Date: Mon Jan 4 15:10:53 2016 +0100 - - Fix build with disabled ldap - - Reported-by: Tomas Chvatal - Signed-off-by: Jan Kara - -diff --git a/warnquota.c b/warnquota.c -index 3734f0e..e9868c1 100644 ---- a/warnquota.c -+++ b/warnquota.c -@@ -109,13 +109,13 @@ struct configparams { - char *user_signature; - char *group_message; - char *group_signature; -+ time_t cc_before; -+#ifdef USE_LDAP_MAIL_LOOKUP - int use_ldap_mail; /* 0 */ -+ int ldap_is_setup; /* 0 */ - int ldap_starttls; /* 0 */ - int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */ - int ldap_vers; /* LDAP_VERSION3 */ -- time_t cc_before; --#ifdef USE_LDAP_MAIL_LOOKUP -- int ldap_is_setup; /* 0 */ - char ldap_host[CNF_BUFFER]; - int ldap_port; - char ldap_uri[CNF_BUFFER]; -@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config) - } - maildev[0] = 0; - config->user_signature = config->user_message = config->group_signature = config->group_message = NULL; -+ config->cc_before = -1; -+ -+#ifdef USE_LDAP_MAIL_LOOKUP - config->use_ldap_mail = 0; - config->ldap_starttls = 0; - config->ldap_tls = LDAP_OPT_X_TLS_NEVER; - config->ldap_vers = LDAP_VERSION3; -- config->cc_before = -1; -- --#ifdef USE_LDAP_MAIL_LOOKUP - config->ldap_port = config->ldap_is_setup = 0; - config->ldap_host[0] = 0; - config->ldap_uri[0] = 0; -@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config) - create_eoln(config->group_signature); - verify_format(config->group_signature, "GROUP_SIGNATURE"); - } -+ else if (!strcmp(var, "CC_BEFORE")) { -+ int num; -+ char unit[10]; -+ -+ if (sscanf(value, "%d%s", &num, unit) != 2) -+ goto cc_parse_err; -+ if (str2timeunits(num, unit, &config->cc_before) < 0) { -+cc_parse_err: -+ die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line); -+ } -+ } -+#ifdef USE_LDAP_MAIL_LOOKUP - else if (!strcmp(var, "LDAP_MAIL")) { - if(strcasecmp(value, "true") == 0) - config->use_ldap_mail = 1; -@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config) - else - config->ldap_starttls = 0; - } -- else if (!strcmp(var, "CC_BEFORE")) { -- int num; -- char unit[10]; -- -- if (sscanf(value, "%d%s", &num, unit) != 2) -- goto cc_parse_err; -- if (str2timeunits(num, unit, &config->cc_before) < 0) { --cc_parse_err: -- die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line); -- } -- } --#ifdef USE_LDAP_MAIL_LOOKUP - else if (!strcmp(var, "LDAP_HOST")) - sstrncpy(config->ldap_host, value, CNF_BUFFER); - else if (!strcmp(var, "LDAP_PORT")) diff --git a/sys-fs/quota/files/quota-4.03-no_rpc.patch b/sys-fs/quota/files/quota-4.03-no_rpc.patch deleted file mode 100644 index c4f5007fca..0000000000 --- a/sys-fs/quota/files/quota-4.03-no_rpc.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 07ec5c783ac16ed20735d6cb8ab167833f5877ee Mon Sep 17 00:00:00 2001 -From: Lars Wendler -Date: Mon, 15 Feb 2016 14:36:28 +0100 -Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested. - -This fixes a buch of undefined references: - -x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa -ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st -yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_ -svc.o svc_socket.o libquota.a -rquota_svc.o: In function `rquotaprog_2': -rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt' -rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args' -rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt' -rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args' -rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt' -rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args' -rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt' -rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args' -rquota_svc.o: In function `rquotaprog_1': -rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt' -rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args' -rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt' -rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args' -rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt' -rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args' -rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt' -rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args' -collect2: error: ld returned 1 exit status -Makefile:901: recipe for target 'rpc.rquotad' failed - -Signed-off-by: Lars Wendler ---- - Makefile.am | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 77f8400..6d7ea0e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -116,8 +116,11 @@ sbin_PROGRAMS = \ - xqmstats \ - edquota \ - setquota \ -- convertquota \ -+ convertquota -+if WITH_RPC -+sbin_PROGRAMS += \ - rpc.rquotad -+endif - if WITH_NETLINK - sbin_PROGRAMS += \ - quota_nld --- -2.7.1 - diff --git a/sys-fs/quota/files/quota-4.03-noldap_linking.patch b/sys-fs/quota/files/quota-4.03-noldap_linking.patch deleted file mode 100644 index dbaca69bb7..0000000000 --- a/sys-fs/quota/files/quota-4.03-noldap_linking.patch +++ /dev/null @@ -1,75 +0,0 @@ -commit 1d9542df5d2ae5c21a1e96d100f899b3d7b2f27c -Author: Jan Kara -Date: Tue Jan 19 11:40:15 2016 +0100 - - Don't link all binaries with ldap library - - The default action-if-found of AC_CHECK_LIB() is to append checked - library to LIBS. Thus check for ldap library resulted in unwanted - addition of -lldap to LIBS as [] is an empty string in M4 and the - default action is used. - - Fix the problem by providing proper action-if-found which was currently - just hidden behind the check. Also do similar cleanup for - AC_CHECK_HEADER check although there it didn't have any undesired - side-effect. - - Reported-by: Petr Písař - Signed-off-by: Jan Kara - -diff --git a/configure.ac b/configure.ac -index 68d5924..d17b18c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -72,18 +72,17 @@ AC_ARG_ENABLE([ldapmail], - [enable_ldapmail=auto] - ) - AS_IF([test "x$enable_ldapmail" != "xno"], [ -- build_ldap="yes" -- AC_CHECK_LIB([ldap], [ldap_initialize], [], [ -+ AC_CHECK_LIB([ldap], [ldap_initialize], [ -+ build_ldap="yes" -+ LDAP_LIBS="-lldap -llber" -+ AC_DEFINE([USE_LDAP_MAIL_LOOKUP], 1, [Lookup email address using LDAP]) -+ COMPILE_OPTS="$COMPILE_OPTS USE_LDAP_MAIL_LOOKUP" -+ ], [ - build_ldap="no" - AS_IF([test "x$enable_ldapmail" = "xyes"], [ - AC_MSG_ERROR([LDAP support required but library not found.]); - ]) - ]) -- AS_IF([test "x$build_ldap" = "xyes"], [ -- LDAP_LIBS="-lldap -llber" -- AC_DEFINE([USE_LDAP_MAIL_LOOKUP], 1, [Lookup email address using LDAP]) -- COMPILE_OPTS="$COMPILE_OPTS USE_LDAP_MAIL_LOOKUP" -- ]) - ], [ - build_ldap="no" - ]) -@@ -163,8 +162,12 @@ AC_ARG_ENABLE([libwrap], - [enable_libwrap=auto] - ) - AS_IF([test "x$enable_libwrap" != "xno"], [ -- build_libwrap="yes" -- AC_CHECK_HEADER([tcpd.h],[], [ -+ AC_CHECK_HEADER([tcpd.h], [ -+ build_libwrap="yes" -+ WRAP_LIBS="-lwrap" -+ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) -+ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" -+ ], [ - build_libwrap="no" - AS_IF([test "x$enable_libwrap" = "xyes"] , [ - AC_MSG_ERROR([tcpd.h not found and requested]) -@@ -172,11 +175,6 @@ AS_IF([test "x$enable_libwrap" != "xno"], [ - AC_MSG_WARN([tcpd.h not found]) - ]) - ]) -- AS_IF([test "x$build_libwrap" != "xno"], [ -- WRAP_LIBS="-lwrap" -- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) -- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" -- ]) - ], [ - build_libwrap="no" - ]) diff --git a/sys-fs/quota/files/quota-4.03-repqouta_F_option_arg.patch b/sys-fs/quota/files/quota-4.03-repqouta_F_option_arg.patch deleted file mode 100644 index d4fffd4f03..0000000000 --- a/sys-fs/quota/files/quota-4.03-repqouta_F_option_arg.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit ab2bf5b51a1ca14cef63e8a7a88b039f173a210a -Author: Eric Sandeen -Date: Mon Jan 18 20:11:01 2016 -0600 - - repquota: -F option takes an arg - - Commit a5876145 added a new -O option which takes an - argument, but in the process lost the argument specifier - for "F". As a result, the use of "-F" segfaults when NULL - is sent to name2fmt() instead of the provided argument. - - Signed-off-by: Eric Sandeen - Signed-off-by: Jan Kara - -diff --git a/repquota.c b/repquota.c -index 744af70..6fe9f0c 100644 ---- a/repquota.c -+++ b/repquota.c -@@ -90,7 +90,7 @@ static void parse_options(int argcnt, char **argstr) - { NULL, 0, NULL, 0 } - }; - -- while ((ret = getopt_long(argcnt, argstr, "VavughtspncCiFO:", long_opts, NULL)) != -1) { -+ while ((ret = getopt_long(argcnt, argstr, "VavughtspncCiF:O:", long_opts, NULL)) != -1) { - switch (ret) { - case '?': - case 'h': diff --git a/sys-fs/quota/files/quota-4.03-respect_docdir.patch b/sys-fs/quota/files/quota-4.03-respect_docdir.patch deleted file mode 100644 index 214b3ad1f1..0000000000 --- a/sys-fs/quota/files/quota-4.03-respect_docdir.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit cac9a60c29106763cc6abd6f372f25f97d4122a3 -Author: Tomáš Chvátal -Date: Mon Jan 4 15:26:36 2016 +0100 - - Respect the docdir declaration and do not override. - - Signed-off-by: Tomáš Chvátal - Signed-off-by: Jan Kara - -diff --git a/Makefile.am b/Makefile.am -index a880ebe..7c7a866 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2,7 +2,6 @@ ACLOCAL_AMFLAGS = -I m4 - - BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c - --docdir = $(datadir)/doc/@PACKAGE@ - doc_DATA = \ - README.mailserver \ - README.ldap-support \ diff --git a/sys-fs/quota/files/quota-4.04-glibc226.patch b/sys-fs/quota/files/quota-4.04-glibc226.patch deleted file mode 100644 index 5f63cde7d4..0000000000 --- a/sys-fs/quota/files/quota-4.04-glibc226.patch +++ /dev/null @@ -1,43 +0,0 @@ -From bbb8819fc0f6ed379a05d635a61bcf9c8986079f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= -Date: Sat, 16 Sep 2017 13:09:43 +0200 -Subject: [PATCH] Add $(TIRPC_CFLAGS) globally to CFLAGS for RPC support, - needed for libc 2.26 - ---- - Makefile.am | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 8d80bee..278290a 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -51,6 +51,8 @@ EXTRA_DIST = \ - noinst_LIBRARIES = libquota.a - - if WITH_RPC -+CFLAGS += $(TIRPC_CFLAGS) -+ - rpcsvcdir = $(includedir)/rpcsvc - rpcsvc_DATA = \ - rquota.h \ -@@ -100,8 +102,6 @@ libquota_a_SOURCES = \ - mntopt.h \ - pot.c \ - pot.h --libquota_a_CFLAGS = \ -- $(TIRPC_CFLAGS) - libquota_a_LIBADD = \ - $(RPCLIBS) - -@@ -235,7 +235,6 @@ rpc_rquotad_SOURCES = \ - rquota_server.c \ - rquota_svc.c \ - svc_socket.c --rpc_rquotad_CFLAGS = $(TIRPC_CFLAGS) - rpc_rquotad_LDADD = \ - libquota.a \ - $(WRAP_LIBS) \ --- -2.14.1 - diff --git a/sys-fs/quota/files/quota-4.06-musl-cdefs.patch b/sys-fs/quota/files/quota-4.06-musl-cdefs.patch new file mode 100644 index 0000000000..286fc481b6 --- /dev/null +++ b/sys-fs/quota/files/quota-4.06-musl-cdefs.patch @@ -0,0 +1,20 @@ +https://sourceforge.net/p/linuxquota/code/ci/1959f3768a284315250acd4d17a9f5ef0b8ea189/tree/quota.h?diff=43b6e31f39edbe7de4f4feeef4d0cf6be093e021 +https://bugs.gentoo.org/713390 +--- a/quota.h ++++ b/quota.h +@@ -1,7 +1,6 @@ + #ifndef GUARD_QUOTA_H + #define GUARD_QUOTA_H + +-#include + #include + #include + +@@ -182,6 +181,6 @@ + #endif + #endif + +-long quotactl __P((int, const char *, qid_t, caddr_t)); ++long quotactl(int, const char *, qid_t, caddr_t); + + #endif /* _QUOTA_ */ diff --git a/sys-fs/quota/metadata.xml b/sys-fs/quota/metadata.xml index 3787c4c41e..0ba12bb30b 100644 --- a/sys-fs/quota/metadata.xml +++ b/sys-fs/quota/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org diff --git a/sys-fs/quota/quota-4.03.ebuild b/sys-fs/quota/quota-4.03.ebuild deleted file mode 100644 index 2bab377c69..0000000000 --- a/sys-fs/quota/quota-4.03.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit autotools eutils - -DESCRIPTION="Linux quota tools" -HOMEPAGE="https://sourceforge.net/projects/linuxquota/" -SRC_URI="mirror://sourceforge/linuxquota/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 sparc x86" -IUSE="ldap netlink nls rpc tcpd" - -RDEPEND="ldap? ( >=net-nds/openldap-2.3.35 ) - netlink? ( - sys-apps/dbus - dev-libs/libnl:3 - ) - rpc? ( net-nds/rpcbind ) - tcpd? ( sys-apps/tcp-wrappers )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -PATCHES=( - # Patches from upstream - "${FILESDIR}/${P}-fix_build_without_ldap.patch" - "${FILESDIR}/${P}-distribute_ldap-scripts.patch" - "${FILESDIR}/${P}-explicitely_print_disabled_options.patch" - "${FILESDIR}/${P}-respect_docdir.patch" - "${FILESDIR}/${P}-dont_override_cflags.patch" - "${FILESDIR}/${P}-default_fpic_fpie.patch" - "${FILESDIR}/${P}-repqouta_F_option_arg.patch" - "${FILESDIR}/${P}-noldap_linking.patch" - - # Patches not (yet) upstreamed - "${FILESDIR}/${P}-no_rpc.patch" -) - -src_prepare() { - epatch "${PATCHES[@]}" - - eautoreconf -} - -src_configure() { - econf \ - --docdir="${EPREFIX}/usr/share/doc/${PF}" \ - $(use_enable nls) \ - $(use_enable ldap ldapmail) \ - $(use_enable netlink) \ - $(use_enable rpc) \ - $(use_enable rpc rpcsetquota) -} - -src_install() { - emake DESTDIR="${D}" install - dodoc doc/* README.* Changelog - rm -r "${ED}"/usr/include || die #70938 - - insinto /etc - insopts -m0644 - doins warnquota.conf quotatab - - newinitd "${FILESDIR}"/quota.rc7 quota - newconfd "${FILESDIR}"/quota.confd quota - - if use rpc ; then - newinitd "${FILESDIR}"/rpc.rquotad.initd rpc.rquotad - fi - - if use ldap ; then - insinto /etc/openldap/schema - insopts -m0644 - doins "${FILESDIR}"/ldap-scripts/quota.schema - - exeinto /usr/share/quota/ldap-scripts - doexe "${FILESDIR}"/ldap-scripts/*.pl - doexe "${FILESDIR}"/ldap-scripts/edquota_editor - fi -} diff --git a/sys-fs/quota/quota-4.04-r1.ebuild b/sys-fs/quota/quota-4.06.ebuild similarity index 80% rename from sys-fs/quota/quota-4.04-r1.ebuild rename to sys-fs/quota/quota-4.06.ebuild index 9b5fdbca44..1c4cd2de92 100644 --- a/sys-fs/quota/quota-4.04-r1.ebuild +++ b/sys-fs/quota/quota-4.06.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit autotools @@ -11,46 +11,47 @@ SRC_URI="mirror://sourceforge/linuxquota/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86" IUSE="ldap netlink nls rpc tcpd" RDEPEND=" + sys-fs/e2fsprogs ldap? ( >=net-nds/openldap-2.3.35 ) netlink? ( sys-apps/dbus dev-libs/libnl:3 ) rpc? ( - net-nds/rpcbind elibc_glibc? ( sys-libs/glibc[-rpc(-)] ) - net-libs/libtirpc + net-libs/libtirpc:= net-libs/rpcsvc-proto ) tcpd? ( sys-apps/tcp-wrappers ) " -DEPEND=" - ${RDEPEND} - nls? ( sys-devel/gettext ) -" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" +PDEPEND="rpc? ( net-nds/rpcbind )" PATCHES=( - "${FILESDIR}/${P}-glibc226.patch" + "${FILESDIR}"/${P}-musl-cdefs.patch ) src_prepare() { default + eautoreconf } src_configure() { local myeconfargs=( - --docdir="${EPREFIX%/}/usr/share/doc/${PF}" + --enable-ext2direct $(use_enable nls) $(use_enable ldap ldapmail) $(use_enable netlink) $(use_enable rpc) $(use_enable rpc rpcsetquota) ) + econf "${myeconfargs[@]}" } From d3a171827a0612141733fb36b95719cdbfb328cb Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:53:56 +0100 Subject: [PATCH 14/40] dev-libs/libassuan: Sync with gentoo It's from gentoo commit 238670c39c8515d50d3f935b61cb03c977fa41e6. --- dev-libs/libassuan/Manifest | 5 +- dev-libs/libassuan/libassuan-2.4.3-r1.ebuild | 44 ------------------ dev-libs/libassuan/libassuan-2.5.1.ebuild | 44 ------------------ dev-libs/libassuan/libassuan-2.5.3.ebuild | 48 ++++++++++++++++++++ dev-libs/libassuan/libassuan-2.5.4.ebuild | 48 ++++++++++++++++++++ dev-libs/libassuan/libassuan-2.5.5.ebuild | 48 ++++++++++++++++++++ dev-libs/libassuan/metadata.xml | 8 ++-- 7 files changed, 151 insertions(+), 94 deletions(-) delete mode 100644 dev-libs/libassuan/libassuan-2.4.3-r1.ebuild delete mode 100644 dev-libs/libassuan/libassuan-2.5.1.ebuild create mode 100644 dev-libs/libassuan/libassuan-2.5.3.ebuild create mode 100644 dev-libs/libassuan/libassuan-2.5.4.ebuild create mode 100644 dev-libs/libassuan/libassuan-2.5.5.ebuild diff --git a/dev-libs/libassuan/Manifest b/dev-libs/libassuan/Manifest index 84660959bf..29c8687e0d 100644 --- a/dev-libs/libassuan/Manifest +++ b/dev-libs/libassuan/Manifest @@ -1,2 +1,3 @@ -DIST libassuan-2.4.3.tar.bz2 559867 BLAKE2B b80f73573449aa1705ac3b4f12f89cac6a19bf4b2ed8f46d5576164196300baeaeb782c997078ac252a564b9f6067df87a340b46c68058d4a28c8291bbecf96b SHA512 2b0f58682b408fc58fa0ec2980b36e54ba66701bf504cf6c98ec652af43501bc7c18573bc78c5b83260f5a3bdb0ec8f4e0662bafd9bba3fe7287e77598e8e4c1 -DIST libassuan-2.5.1.tar.bz2 564857 BLAKE2B dc046b9551183ec543d2a186c3c593471c80445b48aec1366d0b997386c57187f9b7a848973d0930ca8d2be3f138e83c22ef9292e4c8bf5614a99ea3065c7827 SHA512 c8829925221780f175cee8c4084060b0d661229f583a50d400a1903ab7303b2724b99ff9c0fa242881d4c5d779036756e1da54d9143acc0fcd92f302ecb5882d +DIST libassuan-2.5.3.tar.bz2 572348 BLAKE2B ae3a5a9a03e85d62cf87271cd4a0718a2b89a4f90ea814837913e4b2bb6e5af9746e766d99685cc0cc3a801efaee597e491a2bc03d42ac26059580ea4680fd7a SHA512 e7ccb651ea75b07b2e687d48d86d0ab83cba8e2af7f30da2aec794808e13e6ec93f21d607db50d3431f1c23cb3a07a2793b71170e69fa2f5a82cffb81961f617 +DIST libassuan-2.5.4.tar.bz2 574039 BLAKE2B 2eec42c47840741a4726fc35c3ed04300e5fbcd37f808b121534aeaa04d0d0f609a30ad48cfbe33a81ee4b2ebbb822b9a48a5c602268f1b802bf5d7d19d72e9c SHA512 764993d5311c24f0c0f970016e903e1a16783a2050c42072dbc1bc4f350f119e53b0be17ed6df25a0086bc9f8c25ee4f3134330577968480997263f95e05594f +DIST libassuan-2.5.5.tar.bz2 572263 BLAKE2B 24952e97c757b97c387ab4c2c4bf7b040f2874e9326c129805c7f5326fa14d80e083b0842e336a635531a2c8d4a66d428c816bae6b175f1c4518add1ffa3554d SHA512 70117f77aa43bbbe0ed28da5ef23834c026780a74076a92ec775e30f851badb423e9a2cb9e8d142c94e4f6f8a794988c1b788fd4bd2271e562071adf0ab16403 diff --git a/dev-libs/libassuan/libassuan-2.4.3-r1.ebuild b/dev-libs/libassuan/libassuan-2.4.3-r1.ebuild deleted file mode 100644 index 158bc92f11..0000000000 --- a/dev-libs/libassuan/libassuan-2.4.3-r1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit libtool ltprune - -DESCRIPTION="IPC library used by GnuPG and GPGME" -HOMEPAGE="http://www.gnupg.org/related_software/libassuan/index.en.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-3 LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/libgpg-error-1.8" -DEPEND="${RDEPEND}" - -src_prepare() { - default - - if [[ ${CHOST} == *-solaris* ]] ; then - elibtoolize - - # fix standards conflict - sed -i \ - -e '/_XOPEN_SOURCE/s/500/600/' \ - -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ - -e 's/__EXTENSIONS__/_NO&/' \ - configure || die - fi -} - -src_configure() { - econf \ - $(use_enable static-libs static) -} - -src_install() { - default - # ppl need to use libassuan-config for --cflags and --libs - prune_libtool_files -} diff --git a/dev-libs/libassuan/libassuan-2.5.1.ebuild b/dev-libs/libassuan/libassuan-2.5.1.ebuild deleted file mode 100644 index 7956da4c56..0000000000 --- a/dev-libs/libassuan/libassuan-2.5.1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit libtool ltprune - -DESCRIPTION="IPC library used by GnuPG and GPGME" -HOMEPAGE="http://www.gnupg.org/related_software/libassuan/index.en.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="GPL-3 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/libgpg-error-1.8" -DEPEND="${RDEPEND}" - -src_prepare() { - default - - if [[ ${CHOST} == *-solaris* ]] ; then - elibtoolize - - # fix standards conflict - sed -i \ - -e '/_XOPEN_SOURCE/s/500/600/' \ - -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ - -e 's/__EXTENSIONS__/_NO&/' \ - configure || die - fi -} - -src_configure() { - econf \ - $(use_enable static-libs static) -} - -src_install() { - default - # ppl need to use libassuan-config for --cflags and --libs - prune_libtool_files -} diff --git a/dev-libs/libassuan/libassuan-2.5.3.ebuild b/dev-libs/libassuan/libassuan-2.5.3.ebuild new file mode 100644 index 0000000000..345ce33518 --- /dev/null +++ b/dev-libs/libassuan/libassuan-2.5.3.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool + +DESCRIPTION="IPC library used by GnuPG and GPGME" +HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# Note: On each bump, update dep bounds on each version from configure.ac! +RDEPEND=">=dev-libs/libgpg-error-1.8" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + if [[ ${CHOST} == *-solaris* ]] ; then + elibtoolize + + # fix standards conflict + sed -i \ + -e '/_XOPEN_SOURCE/s/500/600/' \ + -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ + -e 's/__EXTENSIONS__/_NO&/' \ + configure || die + fi +} + +src_configure() { + local myeconfargs=( + --disable-static + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + # ppl need to use libassuan-config for --cflags and --libs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libassuan/libassuan-2.5.4.ebuild b/dev-libs/libassuan/libassuan-2.5.4.ebuild new file mode 100644 index 0000000000..bdc2724f1d --- /dev/null +++ b/dev-libs/libassuan/libassuan-2.5.4.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool + +DESCRIPTION="IPC library used by GnuPG and GPGME" +HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# Note: On each bump, update dep bounds on each version from configure.ac! +RDEPEND=">=dev-libs/libgpg-error-1.17" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + if [[ ${CHOST} == *-solaris* ]] ; then + elibtoolize + + # fix standards conflict + sed -i \ + -e '/_XOPEN_SOURCE/s/500/600/' \ + -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ + -e 's/__EXTENSIONS__/_NO&/' \ + configure || die + fi +} + +src_configure() { + local myeconfargs=( + --disable-static + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + # ppl need to use libassuan-config for --cflags and --libs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libassuan/libassuan-2.5.5.ebuild b/dev-libs/libassuan/libassuan-2.5.5.ebuild new file mode 100644 index 0000000000..684fa24b72 --- /dev/null +++ b/dev-libs/libassuan/libassuan-2.5.5.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool + +DESCRIPTION="IPC library used by GnuPG and GPGME" +HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# Note: On each bump, update dep bounds on each version from configure.ac! +RDEPEND=">=dev-libs/libgpg-error-1.17" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + if [[ ${CHOST} == *-solaris* ]] ; then + elibtoolize + + # fix standards conflict + sed -i \ + -e '/_XOPEN_SOURCE/s/500/600/' \ + -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ + -e 's/__EXTENSIONS__/_NO&/' \ + configure || die + fi +} + +src_configure() { + local myeconfargs=( + --disable-static + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + # ppl need to use libassuan-config for --cflags and --libs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libassuan/metadata.xml b/dev-libs/libassuan/metadata.xml index fe07892590..7f2a3782fd 100644 --- a/dev-libs/libassuan/metadata.xml +++ b/dev-libs/libassuan/metadata.xml @@ -1,9 +1,9 @@ - + - - crypto@gentoo.org - Crypto + + Lars Wendler + polynomial-c@gentoo.org In an ideal world, Assuan is irrelevant. Assuan's primary use is to From 0e5594e4d39af3fed4f5b9441890f33d8d7a2778 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:55:45 +0100 Subject: [PATCH 15/40] sys-fs/xfsprogs: Sync with gentoo It's from gentoo commit 05882aa51e23a103b322527fb16e9e962ff94034. --- sys-fs/xfsprogs/Manifest | 6 +- .../files/xfsprogs-4.15.0-sharedlibs.patch | 114 ------------------ .../files/xfsprogs-4.9.0-underlinking.patch | 30 ----- .../files/xfsprogs-5.3.0-libdir.patch | 28 +++++ sys-fs/xfsprogs/metadata.xml | 5 +- sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild | 81 ------------- sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild | 81 ------------- sys-fs/xfsprogs/xfsprogs-4.19.0.ebuild | 85 ------------- sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild | 95 +++++++++++++++ sys-fs/xfsprogs/xfsprogs-5.14.1.ebuild | 96 +++++++++++++++ sys-fs/xfsprogs/xfsprogs-5.14.2.ebuild | 96 +++++++++++++++ 11 files changed, 322 insertions(+), 395 deletions(-) delete mode 100644 sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch delete mode 100644 sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch create mode 100644 sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch delete mode 100644 sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild delete mode 100644 sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild delete mode 100644 sys-fs/xfsprogs/xfsprogs-4.19.0.ebuild create mode 100644 sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild create mode 100644 sys-fs/xfsprogs/xfsprogs-5.14.1.ebuild create mode 100644 sys-fs/xfsprogs/xfsprogs-5.14.2.ebuild diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest index a244970c92..ab614e1fc1 100644 --- a/sys-fs/xfsprogs/Manifest +++ b/sys-fs/xfsprogs/Manifest @@ -1,3 +1,3 @@ -DIST xfsprogs-4.17.0.tar.xz 1205508 BLAKE2B 46168792c1e4c335b7ed9e7489afc20d7df4b4e554eb86043b2c19303879491cc4746b18d23fdff3e2f92ca3887ac27957ae57e85ba784476d8891ea6909d67e SHA512 996de920c76de596b6175e4ae4ba9de208c16fbcf9362bbb44d25ee1c12b249d0178fc5cc93dc5a434ab20e6d515d64a3f51b8e89905b5b033b28a3638f4d400 -DIST xfsprogs-4.18.0.tar.xz 1214480 BLAKE2B 78db41319e53be1f03b66f85ecc7c50e0c6658fa3fd8ddd8539bac04e656614a5cb54dc930a324d9df6afe4024c2be10259b903e1ca0ccd0ffb340e7410692c2 SHA512 0629400f8824620138928a7d72908b7a852408814238a55e11d6eb3b2da42cd56273960430d3ea729a9bce95f605d225607940d4728b68c468c39eb5a9a590be -DIST xfsprogs-4.19.0.tar.xz 1212852 BLAKE2B 2d04390765c5e0dd7d51366f0310c9e680651d49bdd1ecd220b4eec50540a66c97bf6e54f976414351bc77381ffd463803836b27ca25b53960a278a34bc09775 SHA512 a96d0ce406534e70b0a531dfab296de420ec710cd0682dffaf5211602adf82dd59f84b9eb7793c54eabb782a9e0229acf7b247ab644d531ee9e5b51fe9dc0f58 +DIST xfsprogs-5.10.0.tar.xz 1273332 BLAKE2B 8caaa0ca8a94480f131d36b383afcf732b3a5a7a3c7927b4b4da4855fc5a0fb97a56fcebb98391a4dd0f02465868a4bd857e57eeba053a419df47d42f74bc958 SHA512 da09e687c87c4b133888dba7b4458017ec028020637ea5066be0232bf5c7da18239cc33eadd02d9b99d1c835aab38cab1ec9d45ae8b83897f9157cfcb0271fbd +DIST xfsprogs-5.14.1.tar.xz 1308968 BLAKE2B fda20f824a030113717cc46de1920696dc8f9eed13b54809e6b21275cf4f8673385e8bbb1c1c668ba2592ab43fb230c9d46edf4c0e5abe59a9572cc9a90ae5da SHA512 5bb79fff45048bebee2fde85ec788658dd8dc8d5ddac222b1f74c6cd525e1239d920814e8e713f045e38398a785321bf0a7421ff1c690cd0be5dbb224f8dafea +DIST xfsprogs-5.14.2.tar.xz 1308912 BLAKE2B 04083bf7952015d64f16e1aec0fa74be1957543e2264914f69defe45a3dc9f2524d941abc064a25a2fd760ebd6dcdcdc2404fd305e08fff7f6be6c5fc11d4d2f SHA512 cb9794247a2eed8bd9f10ff811d38f97e4adbed97bad334b0fa8a26503ec224237eddd92fd78892584a153967417ab2009fb2fc8bab6ef12cd53fd20bdba1b4e diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch b/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch deleted file mode 100644 index 1080e44009..0000000000 --- a/sys-fs/xfsprogs/files/xfsprogs-4.15.0-sharedlibs.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- xfsprogs-4.15.0/include/buildmacros -+++ xfsprogs-4.15.0/include/buildmacros -@@ -70,18 +70,9 @@ - # /usr/lib. - ifeq ($(ENABLE_SHARED),yes) - INSTALL_LTLIB_DEV = \ -- cd $(TOPDIR)/$(LIBNAME)/.libs; \ -- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ -- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_LIB_DIR); \ -- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \ -- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \ -- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \ -- if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \ -- "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))" ]; then \ -- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \ -- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \ -- ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \ -- fi -+ set -e; cd $(TOPDIR)/$(LIBNAME); \ -+ $(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ -+ env -uDIST_ROOT $(LTINSTALL) $(TOPDIR)/$(LIBNAME)/$(LIBNAME).la $(DIST_ROOT)$(PKG_LIB_DIR)/$(LIBNAME).la - else - INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) - endif ---- xfsprogs-4.15.0/libfrog/Makefile -+++ xfsprogs-4.15.0/libfrog/Makefile -@@ -5,6 +5,8 @@ - TOPDIR = .. - include $(TOPDIR)/include/builddefs - -+LTLIBS = $(LIBXFS) $(LIBBLKID) -+ - LTLIBRARY = libfrog.la - LT_CURRENT = 0 - LT_REVISION = 0 -@@ -34,6 +36,9 @@ - - include $(BUILDRULES) - --install install-dev: default -+install: default -+ -+install-dev: default -+ $(INSTALL_LTLIB_DEV) - - -include .ltdep ---- xfsprogs-4.15.0/libhandle/Makefile -+++ xfsprogs-4.15.0/libhandle/Makefile -@@ -24,7 +24,6 @@ - include $(BUILDRULES) - - install: default -- $(INSTALL_LTLIB) - - install-dev: default - $(INSTALL_LTLIB_DEV) ---- xfsprogs-4.15.0/libxcmd/Makefile -+++ xfsprogs-4.15.0/libxcmd/Makefile -@@ -12,6 +12,8 @@ - - CFILES = command.c input.c help.c quit.c - -+LTLIBS = $(LIBXFS) $(LIBBLKID) -+ - ifeq ($(ENABLE_READLINE),yes) - LCFLAGS += -DENABLE_READLINE - LTLIBS += $(LIBREADLINE) $(LIBTERMCAP) -@@ -26,6 +28,9 @@ - - include $(BUILDRULES) - --install install-dev: default -+install: default -+ -+install-dev: default -+ $(INSTALL_LTLIB_DEV) - - -include .ltdep ---- xfsprogs-4.15.0/libxfs/Makefile -+++ xfsprogs-4.15.0/libxfs/Makefile -@@ -151,6 +151,7 @@ - - install-dev: install - $(INSTALL) -m 644 $(PKGHFILES) $(PKG_INC_DIR) -+ $(INSTALL_LTLIB_DEV) - - # We need to install the headers before building the dependencies. If we - # include the .ltdep file, the makefile decides that it needs to build the ---- xfsprogs-4.15.0/libxlog/Makefile -+++ xfsprogs-4.15.0/libxlog/Makefile -@@ -19,6 +19,9 @@ - - include $(BUILDRULES) - --install install-dev: default -+install: default -+ -+install-dev: default -+ $(INSTALL_LTLIB_DEV) - - -include .ltdep ---- xfsprogs-4.15.0/Makefile -+++ xfsprogs-4.15.0/Makefile -@@ -92,6 +92,10 @@ - mkfs: libxcmd - spaceman: libxcmd - scrub: libhandle libxcmd -+libfrog: libxfs -+libfrog-install-dev: libxfs-install-dev -+libxlog: libxfs -+libxlog-install-dev: libxfs-install-dev - - ifeq ($(HAVE_BUILDDEFS), yes) - include $(BUILDRULES) diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch deleted file mode 100644 index e6904a53bc..0000000000 --- a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-underlinking.patch +++ /dev/null @@ -1,30 +0,0 @@ - libxfs/Makefile | 2 +- - libxlog/Makefile | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libxfs/Makefile b/libxfs/Makefile -index 6499731..00447c4 100644 ---- a/libxfs/Makefile -+++ b/libxfs/Makefile -@@ -113,7 +113,7 @@ LSRCFILES += gen_crc32table.c - - FCFLAGS = -I. - --LTLIBS = $(LIBPTHREAD) $(LIBRT) -+LTLIBS = $(LIBPTHREAD) $(LIBRT) $(LIBUUID) - - # don't try linking xfs_repair with a debug libxfs. - DEBUG = -DNDEBUG -diff --git a/libxlog/Makefile b/libxlog/Makefile -index 3417eed..fda1343 100644 ---- a/libxlog/Makefile -+++ b/libxlog/Makefile -@@ -12,6 +12,8 @@ LT_AGE = 0 - - CFILES = xfs_log_recover.c util.c - -+LTLIBS = $(LIBUUID) -+ - # don't want to link xfs_repair with a debug libxlog. - DEBUG = -DNDEBUG - diff --git a/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch b/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch new file mode 100644 index 0000000000..f943817df4 --- /dev/null +++ b/sys-fs/xfsprogs/files/xfsprogs-5.3.0-libdir.patch @@ -0,0 +1,28 @@ +In Gentoo we install libs to /usr/lib* and let gen_usr_ldscript +handle /lib*. + +--- a/include/buildmacros ++++ b/include/buildmacros +@@ -57,9 +57,10 @@ endif + ifeq ($(ENABLE_SHARED),yes) + INSTALL_LTLIB = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \ +- ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \ +- ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_ROOT_LIB_DIR) ++ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -m 755 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR) + endif + + # Libtool thinks the static and shared libs should be in the same dir, so +@@ -68,7 +69,7 @@ endif + # Other things want the shared libs to appear in /usr/lib, else they'll + # link with the static libs there. So, another symlink to get the .so into + # /usr/lib. +-ifeq ($(ENABLE_SHARED),yes) ++ifeq ($(ENABLE_SHARED_HANDLED_BY_gen_usr_ldscript),yes) + INSTALL_LTLIB_DEV = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ + ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ diff --git a/sys-fs/xfsprogs/metadata.xml b/sys-fs/xfsprogs/metadata.xml index 4eb20a048d..d3180f3a06 100644 --- a/sys-fs/xfsprogs/metadata.xml +++ b/sys-fs/xfsprogs/metadata.xml @@ -1,8 +1,11 @@ - + base-system@gentoo.org Gentoo Base System + + cpe:/a:sgi:xfsprogs + diff --git a/sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild b/sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild deleted file mode 100644 index 8e1861b25c..0000000000 --- a/sys-fs/xfsprogs/xfsprogs-4.17.0-r1.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs multilib systemd - -DESCRIPTION="xfs filesystem utilities" -HOMEPAGE="https://xfs.wiki.kernel.org/" -SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" -IUSE="icu libedit nls readline static-libs" - -LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)] - icu? ( dev-libs/icu:=[static-libs(+)] ) - readline? ( sys-libs/readline:0=[static-libs(+)] ) - !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )" -RDEPEND="${LIB_DEPEND//\[static-libs(+)]} - !=xfsprogs-3.2.0 - emake -j1 DIST_ROOT="${ED}" install-dev - - # handle is for xfsdump, the rest for xfsprogs - gen_usr_ldscript -a handle xcmd xfs xlog frog - # removing unnecessary .la files if not needed - use static-libs || find "${ED}" -name '*.la' -delete -} diff --git a/sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild deleted file mode 100644 index ac490a41e2..0000000000 --- a/sys-fs/xfsprogs/xfsprogs-4.18.0.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs multilib systemd - -DESCRIPTION="xfs filesystem utilities" -HOMEPAGE="https://xfs.wiki.kernel.org/" -SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="icu libedit nls readline static-libs" - -LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)] - icu? ( dev-libs/icu:=[static-libs(+)] ) - readline? ( sys-libs/readline:0=[static-libs(+)] ) - !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )" -RDEPEND="${LIB_DEPEND//\[static-libs(+)]} - !=xfsprogs-3.2.0 - emake -j1 DIST_ROOT="${ED}" install-dev - - # handle is for xfsdump, the rest for xfsprogs - gen_usr_ldscript -a handle xcmd xfs xlog frog - # removing unnecessary .la files if not needed - use static-libs || find "${ED}" -name '*.la' -delete -} diff --git a/sys-fs/xfsprogs/xfsprogs-4.19.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.19.0.ebuild deleted file mode 100644 index 6e3d050f54..0000000000 --- a/sys-fs/xfsprogs/xfsprogs-4.19.0.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs multilib systemd - -DESCRIPTION="xfs filesystem utilities" -HOMEPAGE="https://xfs.wiki.kernel.org/" -SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="icu libedit nls readline static-libs" - -LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)] - icu? ( dev-libs/icu:=[static-libs(+)] ) - readline? ( sys-libs/readline:0=[static-libs(+)] ) - !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )" -RDEPEND="${LIB_DEPEND//\[static-libs(+)]} - !=xfsprogs-3.2.0 - emake -j1 DIST_ROOT="${ED}" install-dev - - # handle is for xfsdump, the rest for xfsprogs - gen_usr_ldscript -a handle xcmd xfs xlog frog - # removing unnecessary .la files if not needed - if ! use static-libs ; then - find "${ED}" -name '*.la' -delete || die - fi -} diff --git a/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild b/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild new file mode 100644 index 0000000000..09adcd1200 --- /dev/null +++ b/sys-fs/xfsprogs/xfsprogs-5.10.0-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs systemd usr-ldscript + +DESCRIPTION="xfs filesystem utilities" +HOMEPAGE="https://xfs.wiki.kernel.org/" +SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="icu libedit nls selinux" + +RDEPEND=">=sys-apps/util-linux-2.17.2 + dev-libs/inih + icu? ( dev-libs/icu:= ) + libedit? ( dev-libs/libedit ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( sys-devel/gettext ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-xfs )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.15.0-docdir.patch + "${FILESDIR}"/${PN}-5.3.0-libdir.patch +) + +src_prepare() { + default + + # Fix doc dir + sed -i \ + -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \ + include/builddefs.in || die + + # Don't install compressed docs + sed 's@\(CHANGES\)\.gz[[:space:]]@\1 @' -i doc/Makefile || die +} + +src_configure() { + # include/builddefs.in will add FCFLAGS to CFLAGS which will + # unnecessarily clutter CFLAGS (and fortran isn't used) + unset FCFLAGS + + export DEBUG=-DNDEBUG + + # Package is honoring CFLAGS; No need to use OPTIMIZER anymore. + # However, we have to provide an empty value to avoid default + # flags. + export OPTIMIZER=" " + + unset PLATFORM # if set in user env, this breaks configure + + # Avoid automagic on libdevmapper, #709694 + export ac_cv_search_dm_task_create=no + + # Build fails with -O3 (bug #712698) + replace-flags -O3 -O2 + + # Upstream does NOT support --disable-static anymore, + # https://www.spinics.net/lists/linux-xfs/msg30185.html + # https://www.spinics.net/lists/linux-xfs/msg30272.html + local myconf=( + --enable-blkid + --with-crond-dir="${EPREFIX}/etc/cron.d" + --with-systemd-unit-dir="$(systemd_get_systemunitdir)" + $(use_enable icu libicu) + $(use_enable nls gettext) + $(use_enable libedit editline) + ) + + if is-flagq -flto ; then + myconf+=( --enable-lto ) + else + myconf+=( --disable-lto ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install-dev + + gen_usr_ldscript -a handle +} diff --git a/sys-fs/xfsprogs/xfsprogs-5.14.1.ebuild b/sys-fs/xfsprogs/xfsprogs-5.14.1.ebuild new file mode 100644 index 0000000000..f1ec2e50d0 --- /dev/null +++ b/sys-fs/xfsprogs/xfsprogs-5.14.1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic systemd usr-ldscript + +DESCRIPTION="xfs filesystem utilities" +HOMEPAGE="https://xfs.wiki.kernel.org/" +SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="icu libedit nls selinux" + +RDEPEND=">=sys-apps/util-linux-2.17.2 + dev-libs/inih + dev-libs/userspace-rcu + icu? ( dev-libs/icu:= ) + libedit? ( dev-libs/libedit ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( sys-devel/gettext ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-xfs )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.15.0-docdir.patch + "${FILESDIR}"/${PN}-5.3.0-libdir.patch +) + +src_prepare() { + default + + # Fix doc dir + sed -i \ + -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \ + include/builddefs.in || die + + # Don't install compressed docs + sed 's@\(CHANGES\)\.gz[[:space:]]@\1 @' -i doc/Makefile || die +} + +src_configure() { + # include/builddefs.in will add FCFLAGS to CFLAGS which will + # unnecessarily clutter CFLAGS (and fortran isn't used) + unset FCFLAGS + + export DEBUG=-DNDEBUG + + # Package is honoring CFLAGS; No need to use OPTIMIZER anymore. + # However, we have to provide an empty value to avoid default + # flags. + export OPTIMIZER=" " + + unset PLATFORM # if set in user env, this breaks configure + + # Avoid automagic on libdevmapper, #709694 + export ac_cv_search_dm_task_create=no + + # Build fails with -O3 (bug #712698) + replace-flags -O3 -O2 + + # Upstream does NOT support --disable-static anymore, + # https://www.spinics.net/lists/linux-xfs/msg30185.html + # https://www.spinics.net/lists/linux-xfs/msg30272.html + local myconf=( + --enable-blkid + --with-crond-dir="${EPREFIX}/etc/cron.d" + --with-systemd-unit-dir="$(systemd_get_systemunitdir)" + $(use_enable icu libicu) + $(use_enable nls gettext) + $(use_enable libedit editline) + ) + + if is-flagq -flto ; then + myconf+=( --enable-lto ) + else + myconf+=( --disable-lto ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install-dev + + gen_usr_ldscript -a handle +} diff --git a/sys-fs/xfsprogs/xfsprogs-5.14.2.ebuild b/sys-fs/xfsprogs/xfsprogs-5.14.2.ebuild new file mode 100644 index 0000000000..0a131b8080 --- /dev/null +++ b/sys-fs/xfsprogs/xfsprogs-5.14.2.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic systemd usr-ldscript + +DESCRIPTION="xfs filesystem utilities" +HOMEPAGE="https://xfs.wiki.kernel.org/" +SRC_URI="https://www.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="icu libedit nls selinux" + +RDEPEND=">=sys-apps/util-linux-2.17.2 + dev-libs/inih + dev-libs/userspace-rcu + icu? ( dev-libs/icu:= ) + libedit? ( dev-libs/libedit ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( sys-devel/gettext ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-xfs )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.15.0-docdir.patch + "${FILESDIR}"/${PN}-5.3.0-libdir.patch +) + +src_prepare() { + default + + # Fix doc dir + sed -i \ + -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \ + include/builddefs.in || die + + # Don't install compressed docs + sed 's@\(CHANGES\)\.gz[[:space:]]@\1 @' -i doc/Makefile || die +} + +src_configure() { + # include/builddefs.in will add FCFLAGS to CFLAGS which will + # unnecessarily clutter CFLAGS (and fortran isn't used) + unset FCFLAGS + + export DEBUG=-DNDEBUG + + # Package is honoring CFLAGS; No need to use OPTIMIZER anymore. + # However, we have to provide an empty value to avoid default + # flags. + export OPTIMIZER=" " + + unset PLATFORM # if set in user env, this breaks configure + + # Avoid automagic on libdevmapper, #709694 + export ac_cv_search_dm_task_create=no + + # Build fails with -O3 (bug #712698) + replace-flags -O3 -O2 + + # Upstream does NOT support --disable-static anymore, + # https://www.spinics.net/lists/linux-xfs/msg30185.html + # https://www.spinics.net/lists/linux-xfs/msg30272.html + local myconf=( + --enable-blkid + --with-crond-dir="${EPREFIX}/etc/cron.d" + --with-systemd-unit-dir="$(systemd_get_systemunitdir)" + $(use_enable icu libicu) + $(use_enable nls gettext) + $(use_enable libedit editline) + ) + + if is-flagq -flto ; then + myconf+=( --enable-lto ) + else + myconf+=( --disable-lto ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install + emake DIST_ROOT="${ED}" HAVE_ZIPPED_MANPAGES=false install-dev + + gen_usr_ldscript -a handle +} From 1d9912c68101274b15fce2f8fdcc6a4ce305233d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:57:47 +0100 Subject: [PATCH 16/40] virtual/libelf: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- virtual/libelf/libelf-2.ebuild | 4 ++-- virtual/libelf/libelf-3.ebuild | 13 +++++-------- virtual/libelf/metadata.xml | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/virtual/libelf/libelf-2.ebuild b/virtual/libelf/libelf-2.ebuild index dcd9caf6d3..165ad0fa2b 100644 --- a/virtual/libelf/libelf-2.ebuild +++ b/virtual/libelf/libelf-2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -7,6 +7,6 @@ inherit multilib-build DESCRIPTION="Virtual for libelf.so.0 provider dev-libs/libelf" SLOT="0/0" -KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 sparc x86 -amd64-fbsd -x86-fbsd ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 sparc x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" RDEPEND=">=dev-libs/libelf-0.8.13-r2:0/0[${MULTILIB_USEDEP}]" diff --git a/virtual/libelf/libelf-3.ebuild b/virtual/libelf/libelf-3.ebuild index f328d41728..72771ac216 100644 --- a/virtual/libelf/libelf-3.ebuild +++ b/virtual/libelf/libelf-3.ebuild @@ -1,16 +1,13 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit multilib-build DESCRIPTION="Virtual for libelf.so.1 provider dev-libs/elfutils" + SLOT="0/1" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -RDEPEND=" - || ( - >=dev-libs/elfutils-0.155-r1:0/0[${MULTILIB_USEDEP}] - >=sys-freebsd/freebsd-lib-9.2_rc1[${MULTILIB_USEDEP}] - )" +RDEPEND=">=dev-libs/elfutils-0.155-r1:0/0[${MULTILIB_USEDEP}]" diff --git a/virtual/libelf/metadata.xml b/virtual/libelf/metadata.xml index d920e3ba3e..8a95717b1d 100644 --- a/virtual/libelf/metadata.xml +++ b/virtual/libelf/metadata.xml @@ -1,8 +1,9 @@ - + blueness@gentoo.org Anthony G. Basile + From f71e438f5040a043bb3ae9352c5c61d58b4c8fb9 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 17:59:17 +0100 Subject: [PATCH 17/40] sys-devel/autoconf-archive: Sync with gentoo It's from gentoo commit b3e7f249b72bcd4e0da367c5aa4fc81dde114e8e. --- sys-devel/autoconf-archive/Manifest | 5 +- .../autoconf-archive-2017.03.21.ebuild | 23 ------ .../autoconf-archive-2017.09.28.ebuild | 23 ------ .../autoconf-archive-2018.03.13.ebuild | 23 ------ .../autoconf-archive-2021.02.19-r1.ebuild | 21 ++++++ .../autoconf-archive-2021.02.19.ebuild | 18 +++++ .../autoconf-archive-2022.02.11.ebuild | 20 ++++++ ...utoconf-archive-2021.02.19-python310.patch | 36 ++++++++++ ...rchive-2021.02.19-revert-ax_pthreads.patch | 70 +++++++++++++++++++ sys-devel/autoconf-archive/metadata.xml | 11 +-- 10 files changed, 173 insertions(+), 77 deletions(-) delete mode 100644 sys-devel/autoconf-archive/autoconf-archive-2017.03.21.ebuild delete mode 100644 sys-devel/autoconf-archive/autoconf-archive-2017.09.28.ebuild delete mode 100644 sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild create mode 100644 sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild create mode 100644 sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild create mode 100644 sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild create mode 100644 sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch create mode 100644 sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch diff --git a/sys-devel/autoconf-archive/Manifest b/sys-devel/autoconf-archive/Manifest index e2ca65636e..0b98e12891 100644 --- a/sys-devel/autoconf-archive/Manifest +++ b/sys-devel/autoconf-archive/Manifest @@ -1,3 +1,2 @@ -DIST autoconf-archive-2017.03.21.tar.xz 633132 BLAKE2B d2dd681a3b8c30fe50ae70e8c938e6c235e2747475abc7bba62dc1836f9ca49733935ec5372d2497d6dcef43dbf306a5b53604cb300e24915d43c9fbb5a62b05 SHA512 826233fcdd0cb5a1fe18bd52477e3a8afcaf8719ea376b3be0864df6b481f0fef8fd8083485b1565a14c13ad64dbc0ae93149a62e16da9a4d24db8063120cc3a -DIST autoconf-archive-2017.09.28.tar.xz 645388 BLAKE2B b7b62d30ddde199d0f1a61bb78c50f932ff4e66a57bc318f8dc096f506ab81c3308d389690fdf495c4b9cf405b0139126aea8f4cb3219ed8e94c9c0d707ad065 SHA512 2aa271fdd67fa3caf20e07eb8332d88f7008eefe1df447980d42cb2104313d99947b94ffdb0f6f4b4c8156cfc73d9e0b6c27a5f133c6b73787ef641d9951be90 -DIST autoconf-archive-2018.03.13.tar.xz 649496 BLAKE2B a69c381d734aa41337b8af783196f13e7aa49d936289df237c56a9be7662cd2b766ac42fa10f4cd46feac3998a12c49745d994c5df95b5dd449646dae300a8f8 SHA512 301832a02b1913dd46cc34f6479264b37032d78457b2df526f0aafc752996972ca9c74fdae68fbe0f490268019c45329d564f263cbaff30203bbb4b4a8d5ad5f +DIST autoconf-archive-2021.02.19.tar.xz 667304 BLAKE2B bc99cfd2b507a0c7fc37a001cc9e090fa037cc3626f5f5201c9a62ef06ee8ca4532ca8f21e1422f9dff9f67f64409ae560117c3161809f2d3bc3a39469910485 SHA512 a968c355c3cf66d74dc5b452141afbdf763e84a6c43b12c25da9a08482910d6d57ba3952aaf270d8cd5fd8b9d2dadf2d7d943ae2e1b067d68b71d2738d881aa0 +DIST autoconf-archive-2022.02.11.tar.xz 675264 BLAKE2B b9ff928186312969ffd09fd0523367857e7072e867f6b43689a4a5130db9f5fe19a8337875f5186409e7b0bd200491e3d1f612739499c89547a47862c59ba07f SHA512 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff diff --git a/sys-devel/autoconf-archive/autoconf-archive-2017.03.21.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2017.03.21.ebuild deleted file mode 100644 index 3d7b45ab32..0000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2017.03.21.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="GNU Autoconf Macro Archive" -HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -IUSE="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" - -src_install() { - default - rm -r "${ED}/usr/share/${PN}" || die -} diff --git a/sys-devel/autoconf-archive/autoconf-archive-2017.09.28.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2017.09.28.ebuild deleted file mode 100644 index f07985ef63..0000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2017.09.28.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="GNU Autoconf Macro Archive" -HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -IUSE="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" - -src_install() { - default - rm -r "${ED}/usr/share/${PN}" || die -} diff --git a/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild deleted file mode 100644 index f07985ef63..0000000000 --- a/sys-devel/autoconf-archive/autoconf-archive-2018.03.13.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="GNU Autoconf Macro Archive" -HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" -IUSE="" - -# File collisions. #540246 -RDEPEND="!=gnome-base/gnome-common-3.14.0 - !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" -DEPEND="" - -src_install() { - default - rm -r "${ED}/usr/share/${PN}" || die -} diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild new file mode 100644 index 0000000000..d9ba9d3bed --- /dev/null +++ b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19-r1.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="GNU Autoconf Macro Archive" +HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# File collisions. #540246 +RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 + !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" + +PATCHES=( + "${FILESDIR}"/${PN}-2021.02.19-python310.patch + "${FILESDIR}"/${PN}-2021.02.19-revert-ax_pthreads.patch +) diff --git a/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild new file mode 100644 index 0000000000..87b98f88cd --- /dev/null +++ b/sys-devel/autoconf-archive/autoconf-archive-2021.02.19.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="GNU Autoconf Macro Archive" +HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +# File collisions. #540246 +RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 + !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" +DEPEND="" diff --git a/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild b/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild new file mode 100644 index 0000000000..da94ac0d18 --- /dev/null +++ b/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="GNU Autoconf Macro Archive" +HOMEPAGE="https://www.gnu.org/software/autoconf-archive/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +# File collisions. #540246 +RDEPEND="!=gnome-base/gnome-common-3.14.0-r0 + !>=gnome-base/gnome-common-3.14.0-r1[-autoconf-archive(+)]" + +PATCHES=( + "${FILESDIR}"/${PN}-2021.02.19-python310.patch +) diff --git a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch new file mode 100644 index 0000000000..d76605eb5c --- /dev/null +++ b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-python310.patch @@ -0,0 +1,36 @@ +Ensure configure tests don't fail with Python 3.10, 3.11. + +https://github.com/autoconf-archive/autoconf-archive/pull/235 + +From: Yaakov Selkowitz +Date: Thu, 5 Aug 2021 11:12:47 -0400 +Subject: [PATCH 1/2] AX_PYTHON_DEVEL: fix for Python 3.10+ + +--- a/m4/ax_python_devel.m4 ++++ b/m4/ax_python_devel.m4 +@@ -208,7 +208,7 @@ EOD` + ac_python_version=$PYTHON_VERSION + else + ac_python_version=`$PYTHON -c "import sys; \ +- print (sys.version[[:3]])"` ++ print ("%d.%d" % sys.version_info[[:2]])"` + fi + fi + + +From: Yaakov Selkowitz +Date: Thu, 5 Aug 2021 11:27:24 -0400 +Subject: [PATCH 2/2] AX_PYTHON: Add 3.10 and 3.11 + +--- a/m4/ax_python.m4 ++++ b/m4/ax_python.m4 +@@ -55,7 +55,7 @@ + AC_DEFUN([AX_PYTHON], + [AC_MSG_CHECKING(for python build information) + AC_MSG_RESULT([]) +-for python in python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do ++for python in python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do + AC_CHECK_PROGS(PYTHON_BIN, [$python]) + ax_python_bin=$PYTHON_BIN + if test x$ax_python_bin != x; then + diff --git a/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch new file mode 100644 index 0000000000..3800fd292a --- /dev/null +++ b/sys-devel/autoconf-archive/files/autoconf-archive-2021.02.19-revert-ax_pthreads.patch @@ -0,0 +1,70 @@ +This is an upstream revert which hasn't yet landed in a release. + +https://github.com/autoconf-archive/autoconf-archive/commit/59008cc7f85e1982eb298e1c424c2e6ad5942c4a +https://github.com/autoconf-archive/autoconf-archive/pull/233 +https://github.com/autoconf-archive/autoconf-archive/commit/2567e0ce0f3a11b535c6b527386197fb49ff172b + +From: David Seifert +Date: Sat, 12 Jun 2021 22:29:03 +0200 +Subject: [PATCH] Revert "AX_PTHREAD: target > host" + +This reverts commit 2567e0ce0f3a11b535c6b527386197fb49ff172b. + +* `AC_CANONICAL_HOST` is the system on which the actual binary will run, + `AC_CANONICAL_TARGET` is the system for which code is generated. The + Autoconf manual even mentions that + + --target=target-type + the type of system for which any compiler tools in the package produce code (**rarely needed**). +--- a/m4/ax_pthread.m4 ++++ b/m4/ax_pthread.m4 +@@ -87,11 +87,11 @@ + # modified version of the Autoconf Macro, you may extend this special + # exception to the GPL to apply to your modified version as well. + +-#serial 30 ++#serial 31 + + AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) + AC_DEFUN([AX_PTHREAD], [ +-AC_REQUIRE([AC_CANONICAL_TARGET]) ++AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_PROG_SED]) + AC_LANG_PUSH([C]) +@@ -158,7 +158,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread -- + # --thread-safe: KAI C++ + # pthread-config: use pthread-config program (for GNU Pth library) + +-case $target_os in ++case $host_os in + + freebsd*) + +@@ -248,7 +248,7 @@ AS_IF([test "x$ax_pthread_clang" = "xyes"], + # definitions is, on some systems, a strong hint that pthreads support is + # correctly enabled + +-case $target_os in ++case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; +@@ -450,7 +450,7 @@ if test "x$ax_pthread_ok" = "xyes"; then + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no +- case $target_os in ++ case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; +@@ -480,7 +480,7 @@ if test "x$ax_pthread_ok" = "xyes"; then + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then +- case $target_os in ++ case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], diff --git a/sys-devel/autoconf-archive/metadata.xml b/sys-devel/autoconf-archive/metadata.xml index 56c1244130..de9d784241 100644 --- a/sys-devel/autoconf-archive/metadata.xml +++ b/sys-devel/autoconf-archive/metadata.xml @@ -1,8 +1,9 @@ - + - - base-system@gentoo.org - Gentoo Base System - + + base-system@gentoo.org + Gentoo Base System + + From ed9695ce22aa5b193d6252a09b7ce670edfa9937 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:00:35 +0100 Subject: [PATCH 18/40] x11-misc/makedepend: Sync with gentoo It's from gentoo commit 5debc86934084fb525d98031c4e20571bbe861b4. --- x11-misc/makedepend/Manifest | 2 +- x11-misc/makedepend/makedepend-1.0.5.ebuild | 14 -------------- x11-misc/makedepend/makedepend-1.0.6.ebuild | 13 +++++++++++++ x11-misc/makedepend/metadata.xml | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 x11-misc/makedepend/makedepend-1.0.5.ebuild create mode 100644 x11-misc/makedepend/makedepend-1.0.6.ebuild diff --git a/x11-misc/makedepend/Manifest b/x11-misc/makedepend/Manifest index ab626c0b9a..2e4f1d9077 100644 --- a/x11-misc/makedepend/Manifest +++ b/x11-misc/makedepend/Manifest @@ -1 +1 @@ -DIST makedepend-1.0.5.tar.bz2 143498 BLAKE2B 78a7911e1a433bd2839c2d1372883928dc018a2576781cc8e01ffea3d06ecaab494c11a9eb36045b36091f51c6363d4a903562431256abbab26dfbe7b3fb8289 SHA512 e28d71c3ce4f74ca6479771fcdd123c19ab18e3f2aa690a7798237f21f13fca4c4d66d7b7b1d708c2c214b8e17f8fe37e6cf5b75a4d2b88514c50addea2600cb +DIST makedepend-1.0.6.tar.bz2 147616 BLAKE2B 6e9538e435d602ab3bcfb35a5398d6f11a23e4c9fa19bb2e3f651967d3fb1945557af2a5d84fae3e46112aae9ec411894cf8605e4856a46b120b660ff4b95ea4 SHA512 eb0e8ee8ab7515806d7d98a060cdcd392ec38e4225e5e05db26daa6651f185d0b764aab403edeea904d4d23211b1f7db20daeee6eafce8abe65225784ed0aa42 diff --git a/x11-misc/makedepend/makedepend-1.0.5.ebuild b/x11-misc/makedepend/makedepend-1.0.5.ebuild deleted file mode 100644 index de8260303e..0000000000 --- a/x11-misc/makedepend/makedepend-1.0.5.ebuild +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -XORG_STATIC=no -inherit xorg-2 - -DESCRIPTION="create dependencies in makefiles" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="" - -RDEPEND="" -DEPEND="${RDEPEND} - x11-base/xorg-proto" diff --git a/x11-misc/makedepend/makedepend-1.0.6.ebuild b/x11-misc/makedepend/makedepend-1.0.6.ebuild new file mode 100644 index 0000000000..6b6e9c2882 --- /dev/null +++ b/x11-misc/makedepend/makedepend-1.0.6.ebuild @@ -0,0 +1,13 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit xorg-3 + +DESCRIPTION="create dependencies in makefiles" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND} + x11-base/xorg-proto" diff --git a/x11-misc/makedepend/metadata.xml b/x11-misc/makedepend/metadata.xml index e943b72b8a..e17a5bccb7 100644 --- a/x11-misc/makedepend/metadata.xml +++ b/x11-misc/makedepend/metadata.xml @@ -1,5 +1,5 @@ - + x11@gentoo.org From ce140967ec20ae482810dc08bc57cb12d200178e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:01:14 +0100 Subject: [PATCH 19/40] sys-libs/zlib: Sync with gentoo It's from gentoo commit adb9a35721e67faab0c5a75f31e38e8791e2f43b. --- sys-libs/zlib/Manifest | 2 + sys-libs/zlib/metadata.xml | 23 ++-- sys-libs/zlib/zlib-1.2.11-r2.ebuild | 123 ------------------ ...1.2.11-r1.ebuild => zlib-1.2.11-r4.ebuild} | 87 ++++++++++--- sys-libs/zlib/zlib-1.2.11.ebuild | 120 ----------------- 5 files changed, 80 insertions(+), 275 deletions(-) delete mode 100644 sys-libs/zlib/zlib-1.2.11-r2.ebuild rename sys-libs/zlib/{zlib-1.2.11-r1.ebuild => zlib-1.2.11-r4.ebuild} (50%) delete mode 100644 sys-libs/zlib/zlib-1.2.11.ebuild diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest index 1db6ff6315..9a8e50982b 100644 --- a/sys-libs/zlib/Manifest +++ b/sys-libs/zlib/Manifest @@ -1 +1,3 @@ +DIST zlib-1.2.11-cygwin-gzopen_w.patch 1170 BLAKE2B fe351436716634bd823da8c2811d332327d335d450d89bee85d7713b09dd454fe6aee264b044a41bf3be603aa36d67943ba6c7d8b46470e180e9b639728b5274 SHA512 14cc63a17fbf6afb6c8a8dd0b92df9807b48e0faf09c88f952083f10716ae62be8de2a0e1424b77fb538605b88898b381160521f2872afdda59e12bd27535c5a DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae +DIST zlib-1.2.7-cygwin-minizip.patch 2626 BLAKE2B 885f1fda877c0b783618b163702fb46126b7db572767cd4edb86bd92db1f432c887ef1724e70c8319c26886368dba3a962af5284ec0875c20ec8ad2245fd100a SHA512 e372f1e06311e843eca2092e182c41abb009b5e9880b60292d708e4bc0de5a9e4c43d49b25b0c09df4784bc46a1254472bc5cdbdd8d6c762a9f6a145a555bfe7 diff --git a/sys-libs/zlib/metadata.xml b/sys-libs/zlib/metadata.xml index 105b205e9e..4d41ee8a0c 100644 --- a/sys-libs/zlib/metadata.xml +++ b/sys-libs/zlib/metadata.xml @@ -1,14 +1,15 @@ - + - - base-system@gentoo.org - Gentoo Base System - - - include the minizip library for quick and dirty zip extraction - - - cpe:/a:gnu:zlib - + + base-system@gentoo.org + Gentoo Base System + + + include the minizip library for quick and dirty zip extraction + + + madler/zlib + cpe:/a:gnu:zlib + diff --git a/sys-libs/zlib/zlib-1.2.11-r2.ebuild b/sys-libs/zlib/zlib-1.2.11-r2.ebuild deleted file mode 100644 index 4b7ac2eecf..0000000000 --- a/sys-libs/zlib/zlib-1.2.11-r2.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -AUTOTOOLS_AUTO_DEPEND="no" - -inherit autotools toolchain-funcs multilib multilib-minimal - -DESCRIPTION="Standard (de)compression library" -HOMEPAGE="https://zlib.net/" -SRC_URI="https://zlib.net/${P}.tar.gz - http://www.gzip.org/zlib/${P}.tar.gz - http://www.zlib.net/current/beta/${P}.tar.gz" - -LICENSE="ZLIB" -SLOT="0/1" # subslot = SONAME -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="minizip static-libs" - -DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )" -RDEPEND="! zlib.pc || die - ;; - *) - emake - ;; - esac - use minizip && emake -C contrib/minizip -} - -sed_macros() { - # clean up namespace a little #383179 - # we do it here so we only have to tweak 2 files - sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die -} - -multilib_src_install() { - case ${CHOST} in - *-mingw*|mingw*) - emake -f win32/Makefile.gcc install \ - BINARY_PATH="${ED}/usr/bin" \ - LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ - INCLUDE_PATH="${ED}/usr/include" \ - SHARED_MODE=1 - # overwrites zlib.pc created from win32/Makefile.gcc #620136 - insinto /usr/$(get_libdir)/pkgconfig - doins zlib.pc - ;; - - *) - emake install DESTDIR="${D}" LDCONFIG=: - gen_usr_ldscript -a z - ;; - esac - sed_macros "${ED}"/usr/include/*.h - - if use minizip ; then - emake -C contrib/minizip install DESTDIR="${D}" - sed_macros "${ED}"/usr/include/minizip/*.h - fi - - use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645 -} - -multilib_src_install_all() { - dodoc FAQ README ChangeLog doc/*.txt - use minizip && dodoc contrib/minizip/*.txt -} diff --git a/sys-libs/zlib/zlib-1.2.11-r1.ebuild b/sys-libs/zlib/zlib-1.2.11-r4.ebuild similarity index 50% rename from sys-libs/zlib/zlib-1.2.11-r1.ebuild rename to sys-libs/zlib/zlib-1.2.11-r4.ebuild index aeddd1a694..bc2fe9834e 100644 --- a/sys-libs/zlib/zlib-1.2.11-r1.ebuild +++ b/sys-libs/zlib/zlib-1.2.11-r4.ebuild @@ -1,27 +1,51 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 + AUTOTOOLS_AUTO_DEPEND="no" +inherit autotools multilib-minimal usr-ldscript -inherit autotools toolchain-funcs multilib multilib-minimal +CYGWINPATCHES=( + "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch" + "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch -> ${PN}-1.2.7-cygwin-minizip.patch" +) DESCRIPTION="Standard (de)compression library" HOMEPAGE="https://zlib.net/" SRC_URI="https://zlib.net/${P}.tar.gz http://www.gzip.org/zlib/${P}.tar.gz - http://www.zlib.net/current/beta/${P}.tar.gz" + http://www.zlib.net/current/beta/${P}.tar.gz + elibc_Cygwin? ( ${CYGWINPATCHES[*]} )" LICENSE="ZLIB" SLOT="0/1" # subslot = SONAME -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" IUSE="minizip static-libs" -DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )" -RDEPEND="! " from the array + eapply -p2 "${DISTDIR}/${p#*> }" + done + fi if use minizip ; then cd contrib/minizip || die @@ -29,7 +53,17 @@ src_prepare() { fi case ${CHOST} in - *-mingw*|mingw*) + *-cygwin*) + # do not use _wopen, is a mingw symbol only + sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h || die + # zlib1.dll is the mingw name, need cygz.dll + # cygz.dll is loaded by toolchain, put into subdir + sed -i -e 's|zlib1.dll|win32/cygz.dll|' win32/Makefile.gcc || die + ;; + esac + + case ${CHOST} in + *-mingw*|mingw*|*-cygwin*) # uses preconfigured Makefile rather than configure script multilib_copy_sources ;; @@ -40,16 +74,18 @@ echoit() { echo "$@"; "$@"; } multilib_src_configure() { case ${CHOST} in - *-mingw*|mingw*) + *-mingw*|mingw*|*-cygwin*) ;; - *) # not an autoconf script, so can't use econf + *) local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167 - echoit "${S}"/configure \ - --shared \ - --prefix="${EPREFIX}/usr" \ - --libdir="${EPREFIX}/usr/$(get_libdir)" \ - ${uname:+--uname=${uname}} \ - || die + local myconf=( + --shared + --prefix="${EPREFIX}/usr" + --libdir="${EPREFIX}/usr/$(get_libdir)" + ${uname:+--uname=${uname}} + ) + # not an autoconf script, so can't use econf + echoit "${S}"/configure "${myconf[@]}" || die ;; esac @@ -64,10 +100,10 @@ multilib_src_configure() { multilib_src_compile() { case ${CHOST} in - *-mingw*|mingw*) + *-mingw*|mingw*|*-cygwin*) emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- sed \ - -e 's|@prefix@|/usr|g' \ + -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \ -e 's|@exec_prefix@|${prefix}|g' \ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \ @@ -90,7 +126,7 @@ sed_macros() { multilib_src_install() { case ${CHOST} in - *-mingw*|mingw*) + *-mingw*|mingw*|*-cygwin*) emake -f win32/Makefile.gcc install \ BINARY_PATH="${ED}/usr/bin" \ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ @@ -113,7 +149,16 @@ multilib_src_install() { sed_macros "${ED}"/usr/include/minizip/*.h fi - use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645 + if use minizip; then + # This might not exist if slibtool is used. + # https://bugs.gentoo.org/816756 + rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die + fi + + if ! use static-libs ; then + # https://bugs.gentoo.org/419645 + rm "${ED}"/usr/$(get_libdir)/libz.a || die + fi } multilib_src_install_all() { diff --git a/sys-libs/zlib/zlib-1.2.11.ebuild b/sys-libs/zlib/zlib-1.2.11.ebuild deleted file mode 100644 index a7d2cb8d2a..0000000000 --- a/sys-libs/zlib/zlib-1.2.11.ebuild +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -AUTOTOOLS_AUTO_DEPEND="no" - -inherit autotools toolchain-funcs multilib multilib-minimal - -DESCRIPTION="Standard (de)compression library" -HOMEPAGE="https://zlib.net/" -SRC_URI="https://zlib.net/${P}.tar.gz - http://www.gzip.org/zlib/${P}.tar.gz - http://www.zlib.net/current/beta/${P}.tar.gz" - -LICENSE="ZLIB" -SLOT="0/1" # subslot = SONAME -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="minizip static-libs" - -DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )" -RDEPEND="! zlib.pc || die - ;; - *) - emake - ;; - esac - use minizip && emake -C contrib/minizip -} - -sed_macros() { - # clean up namespace a little #383179 - # we do it here so we only have to tweak 2 files - sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die -} - -multilib_src_install() { - case ${CHOST} in - *-mingw*|mingw*) - emake -f win32/Makefile.gcc install \ - BINARY_PATH="${ED}/usr/bin" \ - LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ - INCLUDE_PATH="${ED}/usr/include" \ - SHARED_MODE=1 - # overwrites zlib.pc created from win32/Makefile.gcc #620136 - insinto /usr/$(get_libdir)/pkgconfig - doins zlib.pc - ;; - - *) - emake install DESTDIR="${D}" LDCONFIG=: - gen_usr_ldscript -a z - ;; - esac - sed_macros "${ED}"/usr/include/*.h - - if use minizip ; then - emake -C contrib/minizip install DESTDIR="${D}" - sed_macros "${ED}"/usr/include/minizip/*.h - fi - - use static-libs || rm -f "${ED}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645 -} - -multilib_src_install_all() { - dodoc FAQ README ChangeLog doc/*.txt - use minizip && dodoc contrib/minizip/*.txt -} From eb3d74f9ffe14a434ab53f26897c6cedb63749fb Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:03:31 +0100 Subject: [PATCH 20/40] dev-libs/libusb: Sync with gentoo It's from gentoo commit 057e21919e19feb2fd4d51e2bf18d3c0b4512a61. --- dev-libs/libusb/Manifest | 5 +- ...b-1.0.24-multi_device_config_parsing.patch | 65 ++++++++++++++++ .../files/libusb-1.0.25-fix-O3-warning.patch | 32 ++++++++ dev-libs/libusb/libusb-1.0.19-r1.ebuild | 70 ----------------- dev-libs/libusb/libusb-1.0.20.ebuild | 71 ----------------- dev-libs/libusb/libusb-1.0.21.ebuild | 66 ---------------- dev-libs/libusb/libusb-1.0.24-r2.ebuild | 76 ++++++++++++++++++ dev-libs/libusb/libusb-1.0.25.ebuild | 78 +++++++++++++++++++ dev-libs/libusb/metadata.xml | 8 +- 9 files changed, 255 insertions(+), 216 deletions(-) create mode 100644 dev-libs/libusb/files/libusb-1.0.24-multi_device_config_parsing.patch create mode 100644 dev-libs/libusb/files/libusb-1.0.25-fix-O3-warning.patch delete mode 100644 dev-libs/libusb/libusb-1.0.19-r1.ebuild delete mode 100644 dev-libs/libusb/libusb-1.0.20.ebuild delete mode 100644 dev-libs/libusb/libusb-1.0.21.ebuild create mode 100644 dev-libs/libusb/libusb-1.0.24-r2.ebuild create mode 100644 dev-libs/libusb/libusb-1.0.25.ebuild diff --git a/dev-libs/libusb/Manifest b/dev-libs/libusb/Manifest index e5d7306711..f7d51a1058 100644 --- a/dev-libs/libusb/Manifest +++ b/dev-libs/libusb/Manifest @@ -1,3 +1,2 @@ -DIST libusb-1.0.19.tar.bz2 521496 BLAKE2B 9f38dcb8f053019511dc2eed93772183c5487917794abd2839e981924bf05e39aba5cee4fb9a366b78e4d265fb16a921fb64c9a083323993ce21543d37073720 SHA512 f42f0187bfec16ebabad64efef7a7651ee85dcf2af1b7cbe543b7de615f9c6432f7eea5fcc6b23335591dcad287c905eb9bd56199cc5d3b47435027ad678f2c1 -DIST libusb-1.0.20.tar.bz2 795247 BLAKE2B 9b3b4b9e372487ca355611917eb00a41d439df391796edf0b4fea28fcd88ca92214d05c4beb8eaf918028d833544e385e59ca38426880c293e070c5f1fc64647 SHA512 4230047dbc18db402f399a6b228f70da37ce4f9da9d57203e5c31cf0edec5ddd664865b4f16038a2ae72c26097e713b709b9e882a11b65a274e84993d617c765 -DIST libusb-1.0.21.tar.bz2 607417 BLAKE2B c76352a19f416ad27b8940e99f38878e248cdbc04ef97752f8c8468ab0391869ab611197e3e143d69e0e23563da59f1691c14fce72958fdf28ebf10dd8c1521b SHA512 015ca07bdb559aa40af5db1302ab0b1c8a30d593699fe2f3c9f45162673dc7b608cecc58d60fde8f3bde2a68370794a045e8efa48fc55402eece11261e525762 +DIST libusb-1.0.24.tar.bz2 606593 BLAKE2B f6188b5af1225cf8b6d1486b6efcf48e837ee4f2e3592adab3ae6aae0a74a67aa54f40f0dd547f951a194d40954f2ee33acf741d2eee0b8449ce64f2edcf1018 SHA512 5aea36a530aaa15c6dd656d0ed3ce204522c9946d8d39ffbb290dab4a98cda388a2598da4995123d1032324056090bd429e702459626d3e8d7daeebc4e7ff3dc +DIST libusb-1.0.25.tar.bz2 609127 BLAKE2B 3aecfbf9fc068fdfb8e612918bb895988f8400dc2c3ffd96a81792ab844d632f0c098947200512ddc37cfa9003956f8454c1d0362973a5d646a225f81cc2923b SHA512 f1e6e5577d4bd1ff136927dc66c615014a06ac332ddd797b1d1ad5f7b68e2405e66068dcb210e2f0ae3e31681603ef72efbd88bf7fbe0eb41ce700fdc3f92f9d diff --git a/dev-libs/libusb/files/libusb-1.0.24-multi_device_config_parsing.patch b/dev-libs/libusb/files/libusb-1.0.24-multi_device_config_parsing.patch new file mode 100644 index 0000000000..739d41c404 --- /dev/null +++ b/dev-libs/libusb/files/libusb-1.0.24-multi_device_config_parsing.patch @@ -0,0 +1,65 @@ +From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001 +From: Chris Dickens +Date: Sun, 13 Dec 2020 15:49:19 -0800 +Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for + multi-configuration devices + +Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device +initialization") introduced a regression for devices with multiple +configurations. The logic that verifies the reported length of the +configuration descriptors failed to count the length of the +configuration descriptor itself and would truncate the actual length by +9 bytes, leading to a parsing error for subsequent descriptors. + +Closes #825 + +Signed-off-by: Chris Dickens +--- + libusb/os/linux_usbfs.c | 12 ++++++++---- + libusb/version_nano.h | 2 +- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c +index fb2ed53a..4d2dc8d6 100644 +--- a/libusb/os/linux_usbfs.c ++++ b/libusb/os/linux_usbfs.c +@@ -641,7 +641,12 @@ static int seek_to_next_config(struct libusb_context *ctx, + uint8_t *buffer, size_t len) + { + struct usbi_descriptor_header *header; +- int offset = 0; ++ int offset; ++ ++ /* Start seeking past the config descriptor */ ++ offset = LIBUSB_DT_CONFIG_SIZE; ++ buffer += LIBUSB_DT_CONFIG_SIZE; ++ len -= LIBUSB_DT_CONFIG_SIZE; + + while (len > 0) { + if (len < 2) { +@@ -718,7 +723,7 @@ static int parse_config_descriptors(struct libusb_device *dev) + } + + if (priv->sysfs_dir) { +- /* ++ /* + * In sysfs wTotalLength is ignored, instead the kernel returns a + * config descriptor with verified bLength fields, with descriptors + * with an invalid bLength removed. +@@ -727,8 +732,7 @@ static int parse_config_descriptors(struct libusb_device *dev) + int offset; + + if (num_configs > 1 && idx < num_configs - 1) { +- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE, +- remaining - LIBUSB_DT_CONFIG_SIZE); ++ offset = seek_to_next_config(ctx, buffer, remaining); + if (offset < 0) + return offset; + sysfs_config_len = (uint16_t)offset; +diff --git a/libusb/version_nano.h b/libusb/version_nano.h +index 61a0a700..578b0979 100644 +--- a/libusb/version_nano.h ++++ b/libusb/version_nano.h +@@ -1 +1 @@ +-#define LIBUSB_NANO 11584 ++#define LIBUSB_NANO 11586 diff --git a/dev-libs/libusb/files/libusb-1.0.25-fix-O3-warning.patch b/dev-libs/libusb/files/libusb-1.0.25-fix-O3-warning.patch new file mode 100644 index 0000000000..7270b057d1 --- /dev/null +++ b/dev-libs/libusb/files/libusb-1.0.25-fix-O3-warning.patch @@ -0,0 +1,32 @@ +https://github.com/libusb/libusb/pull/1062 +https://github.com/libusb/libusb/issues/1063 +https://bugs.gentoo.org/832732 + +From 8bb81fe72286cdcb782c7af4f0d7ef715b2e137c Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Sun, 6 Feb 2022 07:12:14 +0100 +Subject: [PATCH] linux_usbfs: fix maybe-uninitialized error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Initialize active_config to an invalid value to avoid the following +compilation error: + +os/linux_usbfs.c: In function ‘op_get_configuration’: +os/linux_usbfs.c:1452:12: error: ‘active_config’ may be used uninitialized in this function [-Werror=maybe-uninitialized] + 1452 | *config = (uint8_t)active_config; + +Signed-off-by: Yegor Yefremov +--- a/libusb/os/linux_usbfs.c ++++ b/libusb/os/linux_usbfs.c +@@ -1429,7 +1429,7 @@ static int op_get_configuration(struct libusb_device_handle *handle, + uint8_t *config) + { + struct linux_device_priv *priv = usbi_get_device_priv(handle->dev); +- int active_config; ++ int active_config = -1; /* to please compiler */ + int r; + + if (priv->sysfs_dir) { + diff --git a/dev-libs/libusb/libusb-1.0.19-r1.ebuild b/dev-libs/libusb/libusb-1.0.19-r1.ebuild deleted file mode 100644 index e6a4ae67ce..0000000000 --- a/dev-libs/libusb/libusb-1.0.19-r1.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils toolchain-funcs multilib-minimal - -DESCRIPTION="Userspace access to USB devices" -HOMEPAGE="http://libusb.info/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="LGPL-2.1" -SLOT="1" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="debug doc examples static-libs test udev" - -RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP},static-libs?] ) - abi_x86_32? ( - !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] - )" -DEPEND="${RDEPEND} - doc? ( app-doc/doxygen ) - !udev? ( virtual/os-headers )" - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - $(use_enable static-libs static) \ - $(use_enable udev) \ - $(use_enable debug debug-log) \ - $(use_enable test tests-build) -} - -multilib_src_compile() { - emake - - if multilib_is_native_abi; then - use doc && emake -C doc docs - fi -} - -multilib_src_test() { - emake check - - # noinst_PROGRAMS from tests/Makefile.am - tests/stress || die -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi; then - gen_usr_ldscript -a usb-1.0 - - use doc && dohtml doc/html/* - fi -} - -multilib_src_install_all() { - prune_libtool_files - - dodoc AUTHORS ChangeLog NEWS PORTING README TODO - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins examples/*.{c,h} - insinto /usr/share/doc/${PF}/examples/getopt - doins examples/getopt/*.{c,h} - fi -} diff --git a/dev-libs/libusb/libusb-1.0.20.ebuild b/dev-libs/libusb/libusb-1.0.20.ebuild deleted file mode 100644 index 5ac36c1e04..0000000000 --- a/dev-libs/libusb/libusb-1.0.20.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils toolchain-funcs multilib-minimal - -DESCRIPTION="Userspace access to USB devices" -HOMEPAGE="http://libusb.info/ https://github.com/libusb/libusb" -SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2" - -LICENSE="LGPL-2.1" -SLOT="1" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="debug doc examples static-libs test udev" - -RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP},static-libs?] ) - abi_x86_32? ( - !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] - )" -DEPEND="${RDEPEND} - doc? ( app-doc/doxygen ) - !udev? ( virtual/os-headers )" - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - $(use_enable static-libs static) \ - $(use_enable udev) \ - $(use_enable debug debug-log) \ - $(use_enable test tests-build) -} - -multilib_src_compile() { - # Bug 573802 - emake -j1 - - if multilib_is_native_abi; then - use doc && emake -C doc docs - fi -} - -multilib_src_test() { - emake check - - # noinst_PROGRAMS from tests/Makefile.am - tests/stress || die -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi; then - gen_usr_ldscript -a usb-1.0 - - use doc && dohtml doc/html/* - fi -} - -multilib_src_install_all() { - prune_libtool_files - - dodoc AUTHORS ChangeLog NEWS PORTING README TODO - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins examples/*.{c,h} - insinto /usr/share/doc/${PF}/examples/getopt - doins examples/getopt/*.{c,h} - fi -} diff --git a/dev-libs/libusb/libusb-1.0.21.ebuild b/dev-libs/libusb/libusb-1.0.21.ebuild deleted file mode 100644 index 18cbced9c9..0000000000 --- a/dev-libs/libusb/libusb-1.0.21.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils toolchain-funcs multilib-minimal - -DESCRIPTION="Userspace access to USB devices" -HOMEPAGE="http://libusb.info/ https://github.com/libusb/libusb" -SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2" - -LICENSE="LGPL-2.1" -SLOT="1" -KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="debug doc examples static-libs test udev" - -RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP},static-libs?] )" -DEPEND="${RDEPEND} - doc? ( app-doc/doxygen ) - !udev? ( virtual/os-headers )" - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - $(use_enable static-libs static) \ - $(use_enable udev) \ - $(use_enable debug debug-log) \ - $(use_enable test tests-build) -} - -multilib_src_compile() { - emake - - if multilib_is_native_abi; then - use doc && emake -C doc docs - fi -} - -multilib_src_test() { - emake check - - # noinst_PROGRAMS from tests/Makefile.am - tests/stress || die -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi; then - gen_usr_ldscript -a usb-1.0 - - use doc && dohtml doc/html/* - fi -} - -multilib_src_install_all() { - prune_libtool_files - - dodoc AUTHORS ChangeLog NEWS PORTING README TODO - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins examples/*.{c,h} - insinto /usr/share/doc/${PF}/examples/getopt - doins examples/getopt/*.{c,h} - fi -} diff --git a/dev-libs/libusb/libusb-1.0.24-r2.ebuild b/dev-libs/libusb/libusb-1.0.24-r2.ebuild new file mode 100644 index 0000000000..c13d355add --- /dev/null +++ b/dev-libs/libusb/libusb-1.0.24-r2.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit multilib-minimal usr-ldscript + +DESCRIPTION="Userspace access to USB devices" +HOMEPAGE="https://libusb.info/ https://github.com/libusb/libusb" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="1" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="debug doc examples static-libs test udev" +RESTRICT="!test? ( test )" +REQUIRED_USE="static-libs? ( !udev )" + +RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + !udev? ( virtual/os-headers )" +BDEPEND="doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${P}-multi_device_config_parsing.patch" #759814 +) + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable udev) + $(use_enable debug debug-log) + $(use_enable test tests-build) + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + if multilib_is_native_abi; then + use doc && emake -C doc + fi +} + +multilib_src_test() { + emake check + + # noinst_PROGRAMS from tests/Makefile.am + if [[ -e /dev/bus/usb ]]; then + tests/stress || die + else + # https://bugs.gentoo.org/824266 + ewarn "/dev/bus/usb does not exist, skipping stress test" + fi +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi; then + gen_usr_ldscript -a usb-1.0 + + use doc && dodoc -r doc/api-1.0 + fi +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + dodoc AUTHORS ChangeLog NEWS PORTING README TODO + + if use examples; then + docinto examples + dodoc examples/*.{c,h} + fi +} diff --git a/dev-libs/libusb/libusb-1.0.25.ebuild b/dev-libs/libusb/libusb-1.0.25.ebuild new file mode 100644 index 0000000000..71c8364d0b --- /dev/null +++ b/dev-libs/libusb/libusb-1.0.25.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal usr-ldscript + +DESCRIPTION="Userspace access to USB devices" +HOMEPAGE="https://libusb.info/ https://github.com/libusb/libusb" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="debug doc examples static-libs test udev" +RESTRICT="!test? ( test )" +REQUIRED_USE="static-libs? ( !udev )" + +RDEPEND="udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + !udev? ( virtual/os-headers )" +BDEPEND="doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}"/${P}-fix-O3-warning.patch +) + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable udev) + $(use_enable debug debug-log) + $(use_enable test tests-build) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + if multilib_is_native_abi; then + use doc && emake -C doc + fi +} + +multilib_src_test() { + emake check + + # noinst_PROGRAMS from tests/Makefile.am + if [[ -e /dev/bus/usb ]]; then + tests/stress || die + else + # bug #824266 + ewarn "/dev/bus/usb does not exist, skipping stress test" + fi +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi; then + gen_usr_ldscript -a usb-1.0 + + use doc && dodoc -r doc/api-1.0 + fi +} + +multilib_src_install_all() { + find "${ED}" -type f -name "*.la" -delete || die + + dodoc AUTHORS ChangeLog NEWS PORTING README TODO + + if use examples; then + docinto examples + dodoc examples/*.{c,h} + fi +} diff --git a/dev-libs/libusb/metadata.xml b/dev-libs/libusb/metadata.xml index d66b26b86d..7875c78824 100644 --- a/dev-libs/libusb/metadata.xml +++ b/dev-libs/libusb/metadata.xml @@ -1,14 +1,10 @@ - - + + base-system@gentoo.org Gentoo Base System - - peter@stuge.se - Peter Stuge - libusb/libusb From dbd818d9ee3cb9b9db2ac36973052c48669cfbda Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:06:02 +0100 Subject: [PATCH 21/40] sys-apps/grep: Sync with gentoo It's from gentoo commit 2f3ae8922190ebd677d2abf91dac174b42e24ad8. --- sys-apps/grep/Manifest | 4 +- sys-apps/grep/files/grep-2.27-splice.patch | 60 -------------------- sys-apps/grep/files/ppc-musl.patch | 18 ++++++ sys-apps/grep/grep-2.27-r1.ebuild | 46 ---------------- sys-apps/grep/grep-3.0.ebuild | 45 --------------- sys-apps/grep/grep-3.1.ebuild | 45 --------------- sys-apps/grep/grep-3.7.ebuild | 64 ++++++++++++++++++++++ sys-apps/grep/metadata.xml | 16 +++--- 8 files changed, 91 insertions(+), 207 deletions(-) delete mode 100644 sys-apps/grep/files/grep-2.27-splice.patch create mode 100644 sys-apps/grep/files/ppc-musl.patch delete mode 100644 sys-apps/grep/grep-2.27-r1.ebuild delete mode 100644 sys-apps/grep/grep-3.0.ebuild delete mode 100644 sys-apps/grep/grep-3.1.ebuild create mode 100644 sys-apps/grep/grep-3.7.ebuild diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest index a90650adb7..acad192ff2 100644 --- a/sys-apps/grep/Manifest +++ b/sys-apps/grep/Manifest @@ -1,3 +1 @@ -DIST grep-2.27.tar.xz 1360388 BLAKE2B ed750fa7a6aea389c8f096acc9ac9cdebc9561c4b0cedfd5415ef033dd90076d5b9a42fa97c97207474b250ac0c4e4ed3c2ff216fe4462ac80baa6e47a2b90eb SHA512 d67f16cc5f931a455d5287badbaf080967da573d290430f440e578a563cff4f4c0c2668f60dbb8bc71eaed289f075957006c10c6827f0da1a49df49efd3f0781 -DIST grep-3.0.tar.xz 1375156 BLAKE2B 19f5441ed3fe5bb16d9d8327e76f0beb7eb837b727f6da99844dc9c74eb4def9eab857059c527e651758fa224a6f4079ec5939806645806f2db341ed0cb727e4 SHA512 0e9a00df9d492f399230bae0264942edaf64bb926f93edb7922f27b075a86ba0a78698f54996cc522b6261aa01a8ecbeadeb68523d4470a9941f242c3ae24c58 -DIST grep-3.1.tar.xz 1370880 BLAKE2B d71a09d8bfd2c15b6d393d3ca4e22a2b2724632034a6d35d6e269a3c639d76ecaa5ae989a3d8466ee4bcf45e5d08862b0ef19194d6ec7ac6c250e6f60fc61031 SHA512 05494381c7dd8aad7e2ee4c17450de8d7b969a99dcfe17747db60df3475bf02d5323d091e896e8343e4f3251c29dc7f0b7a9f93c575c9d58ee2a57014c2c9d26 +DIST grep-3.7.tar.xz 1641196 BLAKE2B acf03b1fe8065dac48d686de070bab9ecddae65c97f3b0e2be484e8abdd06d1fbdbb396f3d73dadadf9618aad2f02cf6416094bad64d5f2f15eab6b6b3adfeda SHA512 e9e45dcd40af8367f819f2b93c5e1b4e98a251a9aa251841fa67a875380fae52cfa27c68c6dbdd6a4dde1b1017ee0f6b9833ef6dd6e419d32d71b6df5e972b82 diff --git a/sys-apps/grep/files/grep-2.27-splice.patch b/sys-apps/grep/files/grep-2.27-splice.patch deleted file mode 100644 index 6c36fe07fd..0000000000 --- a/sys-apps/grep/files/grep-2.27-splice.patch +++ /dev/null @@ -1,60 +0,0 @@ -http://lists.gnu.org/archive/html/bug-grep/2016-12/msg00036.html - -From 7ad47abbcb070946000771a829b51224720b8cef Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Tue, 27 Dec 2016 11:16:32 -0800 -Subject: [PATCH] grep: fix bug with '... | grep pat >> /dev/null' -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Benno Fünfstück (Bug#25283). -* NEWS: Document this. -* src/grep.c (drain_input) [SPLICE_F_MOVE]: -Don't assume /dev/null is always acceptable output to splice. -* tests/grep-dev-null-out: Test for the bug. ---- - NEWS | 7 ++++--- - src/grep.c | 14 +++++++++----- - tests/grep-dev-null-out | 2 ++ - 3 files changed, 15 insertions(+), 8 deletions(-) - -diff --git a/src/grep.c b/src/grep.c -index f28f3c287609..aebab2060308 100644 ---- a/src/grep.c -+++ b/src/grep.c -@@ -1728,11 +1728,15 @@ drain_input (int fd, struct stat const *st) - { - #ifdef SPLICE_F_MOVE - /* Should be faster, since it need not copy data to user space. */ -- while ((nbytes = splice (fd, NULL, STDOUT_FILENO, NULL, -- INITIAL_BUFSIZE, SPLICE_F_MOVE))) -- if (nbytes < 0) -- return false; -- return true; -+ nbytes = splice (fd, NULL, STDOUT_FILENO, NULL, -+ INITIAL_BUFSIZE, SPLICE_F_MOVE); -+ if (0 <= nbytes || errno != EINVAL) -+ { -+ while (0 < nbytes) -+ nbytes = splice (fd, NULL, STDOUT_FILENO, NULL, -+ INITIAL_BUFSIZE, SPLICE_F_MOVE); -+ return nbytes == 0; -+ } - #endif - } - while ((nbytes = safe_read (fd, buffer, bufalloc))) -diff --git a/tests/grep-dev-null-out b/tests/grep-dev-null-out -index 13a4843957a6..c8128d5cc6a4 100755 ---- a/tests/grep-dev-null-out -+++ b/tests/grep-dev-null-out -@@ -8,4 +8,6 @@ require_timeout_ - ${AWK-awk} 'BEGIN {while (1) print "x"}' /dev/null || fail=1 - -+echo abc | grep b >>/dev/null || fail=1 -+ - Exit $fail --- -2.11.0 - diff --git a/sys-apps/grep/files/ppc-musl.patch b/sys-apps/grep/files/ppc-musl.patch new file mode 100644 index 0000000000..d7d8255a44 --- /dev/null +++ b/sys-apps/grep/files/ppc-musl.patch @@ -0,0 +1,18 @@ +Needed to fix build on ppc + musl. Doesn't seem to yet be in upstream gnulib. + +https://www.openwall.com/lists/musl/2017/11/05/2 +https://github.com/void-linux/void-packages/blob/master/srcpkgs/grep/patches/ppc-musl.patch +--- a/lib/sigsegv.c ++++ b/lib/sigsegv.c +@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; + /* both should be equivalent */ + # if 0 + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] +-# else ++# elif defined(__GLIBC__) + # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] ++# else ++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1] + # endif + # endif + diff --git a/sys-apps/grep/grep-2.27-r1.ebuild b/sys-apps/grep/grep-2.27-r1.ebuild deleted file mode 100644 index b2e9b38583..0000000000 --- a/sys-apps/grep/grep-2.27-r1.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="https://www.gnu.org/software/grep/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - mirror://gentoo/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls pcre static" - -LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )" -RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) - nls? ( virtual/libintl ) - virtual/libiconv" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - static? ( ${LIB_DEPEND} )" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -src_prepare() { - epatch "${FILESDIR}"/${P}-splice.patch - sed -i \ - -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ - src/egrep.sh || die #523898 -} - -src_configure() { - use static && append-ldflags -static - # Always use pkg-config to get lib info for pcre. - export ac_cv_search_pcre_compile=$( - usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" '' - ) - econf \ - --bindir="${EPREFIX}"/bin \ - $(use_enable nls) \ - $(use_enable pcre perl-regexp) -} diff --git a/sys-apps/grep/grep-3.0.ebuild b/sys-apps/grep/grep-3.0.ebuild deleted file mode 100644 index 69114f07cf..0000000000 --- a/sys-apps/grep/grep-3.0.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="https://www.gnu.org/software/grep/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - mirror://gentoo/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls pcre static" - -LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )" -RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) - nls? ( virtual/libintl ) - virtual/libiconv" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - static? ( ${LIB_DEPEND} )" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -src_prepare() { - sed -i \ - -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ - src/egrep.sh || die #523898 -} - -src_configure() { - use static && append-ldflags -static - # Always use pkg-config to get lib info for pcre. - export ac_cv_search_pcre_compile=$( - usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" '' - ) - econf \ - --bindir="${EPREFIX}"/bin \ - $(use_enable nls) \ - $(use_enable pcre perl-regexp) -} diff --git a/sys-apps/grep/grep-3.1.ebuild b/sys-apps/grep/grep-3.1.ebuild deleted file mode 100644 index 6424c8ba94..0000000000 --- a/sys-apps/grep/grep-3.1.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="GNU regular expression matcher" -HOMEPAGE="https://www.gnu.org/software/grep/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.xz - mirror://gentoo/${P}.tar.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="nls pcre static" - -LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )" -RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) - nls? ( virtual/libintl ) - virtual/libiconv" -DEPEND="${RDEPEND} - virtual/pkgconfig - nls? ( sys-devel/gettext ) - static? ( ${LIB_DEPEND} )" - -DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) - -src_prepare() { - sed -i \ - -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ - src/egrep.sh || die #523898 -} - -src_configure() { - use static && append-ldflags -static - # Always use pkg-config to get lib info for pcre. - export ac_cv_search_pcre_compile=$( - usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" '' - ) - econf \ - --bindir="${EPREFIX}"/bin \ - $(use_enable nls) \ - $(use_enable pcre perl-regexp) -} diff --git a/sys-apps/grep/grep-3.7.ebuild b/sys-apps/grep/grep-3.7.ebuild new file mode 100644 index 0000000000..2a4b293b29 --- /dev/null +++ b/sys-apps/grep/grep-3.7.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="GNU regular expression matcher" +HOMEPAGE="https://www.gnu.org/software/grep/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls pcre static" + +# We lack dev-libs/libsigsegv[static-libs] for now +REQUIRED_USE="static? ( !sparc )" + +LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] ) + sparc? ( dev-libs/libsigsegv )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + nls? ( virtual/libintl ) + virtual/libiconv" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" + +PATCHES=( "${FILESDIR}/ppc-musl.patch" ) + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +src_prepare() { + sed -i \ + -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ + -e "s:@grep@:${EPREFIX}/bin/grep:" \ + src/egrep.sh || die #523898 + + default +} + +src_configure() { + use static && append-ldflags -static + + # We used to turn this off unconditionally (bug #673524) but we now + # allow it for cases where libsigsegv is better for userspace handling + # of stack overflows. + # In particular, it's necessary for sparc: bug #768135 + export ac_cv_libsigsegv=$(usex sparc) + + # Always use pkg-config to get lib info for pcre. + export ac_cv_search_pcre_compile=$( + usex pcre "$($(tc-getPKG_CONFIG) --libs $(usex static --static '') libpcre)" '' + ) + local myeconfargs=( + --bindir="${EPREFIX}"/bin + $(use_enable nls) + $(use_enable pcre perl-regexp) + ) + econf "${myeconfargs[@]}" +} diff --git a/sys-apps/grep/metadata.xml b/sys-apps/grep/metadata.xml index f4a75bc8b9..3c76c29888 100644 --- a/sys-apps/grep/metadata.xml +++ b/sys-apps/grep/metadata.xml @@ -1,11 +1,11 @@ - + - - base-system@gentoo.org - Gentoo Base System - - - cpe:/a:gnu:grep - + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:grep + From b8a6ba93ecfbd589e452f6421965ecbde4c839c4 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:07:20 +0100 Subject: [PATCH 22/40] dev-libs/protobuf: Sync with gentoo It's from gentoo commit cc1aca7d866bf7e31e53ef9f3ed08788176f0ded. --- dev-libs/protobuf/Manifest | 10 +- ...uf-3.16.0-protoc_input_output_files.patch} | 157 +++++++++--------- ...obuf-3.17.0-disable_no-warning-test.patch} | 10 +- ...=> protobuf-3.17.0-system_libraries.patch} | 94 ++++++----- ...tobuf-3.18.0-disable_no-warning-test.patch | 36 ++++ .../protobuf-3.18.0-system_libraries.patch | 146 ++++++++++++++++ ...tobuf-3.19.0-disable_no-warning-test.patch | 36 ++++ .../protobuf-3.19.0-system_libraries.patch | 146 ++++++++++++++++ .../protobuf-3.5.0-atomic_operations.patch | 21 --- dev-libs/protobuf/metadata.xml | 11 +- dev-libs/protobuf/protobuf-3.17.0.ebuild | 143 ++++++++++++++++ dev-libs/protobuf/protobuf-3.17.1.ebuild | 143 ++++++++++++++++ dev-libs/protobuf/protobuf-3.17.2.ebuild | 143 ++++++++++++++++ dev-libs/protobuf/protobuf-3.17.3.ebuild | 143 ++++++++++++++++ dev-libs/protobuf/protobuf-3.18.2.ebuild | 147 ++++++++++++++++ dev-libs/protobuf/protobuf-3.19.1.ebuild | 141 ++++++++++++++++ dev-libs/protobuf/protobuf-3.19.3.ebuild | 146 ++++++++++++++++ dev-libs/protobuf/protobuf-3.4.1.ebuild | 101 ----------- dev-libs/protobuf/protobuf-3.5.1.1.ebuild | 106 ------------ ...obuf-3.5.2.ebuild => protobuf-9999.ebuild} | 40 +++-- 20 files changed, 1546 insertions(+), 374 deletions(-) rename dev-libs/protobuf/files/{protobuf-3.4.0-protoc_input_output_files.patch => protobuf-3.16.0-protoc_input_output_files.patch} (52%) rename dev-libs/protobuf/files/{protobuf-3.4.0-disable_no-warning-test.patch => protobuf-3.17.0-disable_no-warning-test.patch} (75%) rename dev-libs/protobuf/files/{protobuf-3.4.0-system_libraries.patch => protobuf-3.17.0-system_libraries.patch} (58%) create mode 100644 dev-libs/protobuf/files/protobuf-3.18.0-disable_no-warning-test.patch create mode 100644 dev-libs/protobuf/files/protobuf-3.18.0-system_libraries.patch create mode 100644 dev-libs/protobuf/files/protobuf-3.19.0-disable_no-warning-test.patch create mode 100644 dev-libs/protobuf/files/protobuf-3.19.0-system_libraries.patch delete mode 100644 dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch create mode 100644 dev-libs/protobuf/protobuf-3.17.0.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.17.1.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.17.2.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.17.3.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.18.2.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.19.1.ebuild create mode 100644 dev-libs/protobuf/protobuf-3.19.3.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.4.1.ebuild delete mode 100644 dev-libs/protobuf/protobuf-3.5.1.1.ebuild rename dev-libs/protobuf/{protobuf-3.5.2.ebuild => protobuf-9999.ebuild} (69%) diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index aa6d99043c..018b2ea1f9 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -1,3 +1,7 @@ -DIST protobuf-3.4.1.tar.gz 4490100 BLAKE2B e2bc1ef2ee1a0af44830b3c65a6c9e73883fe6ec0d07f6a6136f5564f0e85306005440ca6f8c4eb834c7c70f909792c9e2457a761f10f95431981263a9acd7a3 SHA512 471e52198fa878a79183dc8fbc39d9c65239be4d9dff799e12281ee9b1af61a427584534b1baae1773bc6e4c86467f89ca2e7911a21effd86bc5f40cc7d94c34 -DIST protobuf-3.5.1.1.tar.gz 4584489 BLAKE2B 995ee2f06a6358e9935b488269ee50f0dccede417c1757828b0108fbe8c67034301f3a9cb87517430acd9838ae71bb677f4edd8b59b2418f99c15d8ea3d33591 SHA512 f25ecf772facc8efd196b7c06012ce9ec24152b2c0cde38ed2e29ecded8f534221b008e649f4cbd991436ad3436130cd2e31d51e75019d08240d518111fb4496 -DIST protobuf-3.5.2.tar.gz 4584659 BLAKE2B f582212169d802a5844574eb900c9f8cbb343b7e73f2074e5ff0bfc544ebd13f4bc2b78271fb70f4465d78fdc39972ed68339f453c0d3ffe98d8564fbf520544 SHA512 09d10cf0c07a0ba249428bbf20f5dbed840965fa06b3c09682f286a4dee9d84bb96f3b5b50e993d48ef1f20440531255ce7d0e60a648bf3fe536a5f2b0b74181 +DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101bf73e7c1c842c020e6ee08a853db8674a86ca999b7706da3dd21d4d3d2159241c93232efc693701962f3a54a382e9 SHA512 36ed2de641849ce01531ff1207f62a0748f811519c40622a119a17a1e709864382de81481fb58f374a025948971c48416e7e6de9c00512a78633c7a8a3aa3a36 +DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8 +DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98 +DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12 +DIST protobuf-3.18.2.tar.gz 5272935 BLAKE2B f65caa4483d3ff4186f9ea388e2a9ef232ab758cfda846cfb5993df1f991e4574e63a33b175dd00c72f61c0a23ed12d3c62eb658cd397bf43b805c41fb34c47e SHA512 8ca613fdeefcbd93e866fab65effc38aa8508060aa3de0109dbead68f2e27eb22ad0a8aea10c8b4c3e9de181d62185c93b369fb5abf96de02a170f2e5c27e0cd +DIST protobuf-3.19.1.tar.gz 5291573 BLAKE2B a34f1a7cf99ecb6cb8a26bc858de6273bfd26aa9be1e89e48c16cb5df0f1e9576479344c8250017238dbac0d0c4ac33001125b5fc622cb64ed6b91023198b03a SHA512 f1271f5159a7be363a5f60ce4921dfea68a8468d66808330bacaeaa1cb7f652d045ab080b5d82816a6fd4e6d7d7fe79aaa6c8d66d81692721d36ce3bbf619f31 +DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6 diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch similarity index 52% rename from dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch rename to dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch index a7d338e992..7295e805a1 100644 --- a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch +++ b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch @@ -1,8 +1,8 @@ -https://github.com/google/protobuf/pull/235 +https://github.com/protocolbuffers/protobuf/pull/235 --- /src/google/protobuf/compiler/command_line_interface.cc +++ /src/google/protobuf/compiler/command_line_interface.cc -@@ -942,6 +942,28 @@ +@@ -1110,6 +1110,28 @@ } if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) { @@ -31,7 +31,7 @@ https://github.com/google/protobuf/pull/235 if (codec_type_.empty()) { // HACK: Define an EmptyMessage type to use for decoding. DescriptorPool pool; -@@ -950,13 +972,20 @@ +@@ -1118,13 +1140,20 @@ file.add_message_type()->set_name("EmptyMessage"); GOOGLE_CHECK(pool.BuildFile(file) != NULL); codec_type_ = "EmptyMessage"; @@ -58,7 +58,7 @@ https://github.com/google/protobuf/pull/235 } } -@@ -994,6 +1023,11 @@ +@@ -1163,6 +1192,11 @@ for (int i = 0; i < proto_path_.size(); i++) { source_tree->MapPath(proto_path_[i].first, proto_path_[i].second); } @@ -69,10 +69,10 @@ https://github.com/google/protobuf/pull/235 + } // Map input files to virtual paths if possible. - if (!MakeInputsBeProtoPathRelative(source_tree)) { -@@ -1561,6 +1595,12 @@ - - codec_type_ = value; + if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) { +@@ -1885,6 +1919,12 @@ + } else if (name == "--deterministic_output") { + deterministic_output_ = true; + } else if (name == "--protobuf_in") { + protobuf_in_path_ = value; @@ -83,47 +83,53 @@ https://github.com/google/protobuf/pull/235 } else if (name == "--error_format") { if (value == "gcc") { error_format_ = ERROR_FORMAT_GCC; -@@ -1684,18 +1724,29 @@ - " --version Show version info and exit.\n" - " -h, --help Show this text and exit.\n" - " --encode=MESSAGE_TYPE Read a text-format message of the given type\n" --" from standard input and write it in binary\n" --" to standard output. The message type must\n" --" be defined in PROTO_FILES or their imports.\n" --" --decode=MESSAGE_TYPE Read a binary message of the given type from\n" --" standard input and write it in text format\n" --" to standard output. The message type must\n" -+" an write it in binary. The message type must\n" - " be defined in PROTO_FILES or their imports.\n" --" --decode_raw Read an arbitrary protocol message from\n" --" standard input and write the raw tag/value\n" --" pairs in text format to standard output. No\n" -+" The input/output protobuf files are specified\n" -+" using the --protobuf_in and --protobuf_out\n" -+" command line flags.\n" -+" --decode=MESSAGE_TYPE Read a binary message of the given type and\n" -+" write it in text format. The message type\n" -+" must be defined in PROTO_FILES or their\n" -+" imports. The input/output protobuf files are\n" -+" specified using the --protobuf_in and \n" -+" --protobuf_out command line flags.\n" -+" --decode_raw Read an arbitrary protocol message and write\n" -+" the raw tag/value pairs in text format. No\n" - " PROTO_FILES should be given when using this\n" --" flag.\n" -+" flag. The input/output protobuf files are\n" -+" specified using the --protobuf_in and \n" -+" --protobuf_out command line flags.\n" -+" --protobuf_in Absolute path to the protobuf file to read to\n" -+" encode/decode. If omitted, file will be read\n" -+" from STDIN.\n" -+" --protobuf_out Absolute path to the protobuf file to write to\n" -+" after encode/decode operation. If omitted,\n" -+" output is written to STDOUT.\n" - " --descriptor_set_in=FILES Specifies a delimited list of FILES\n" - " each containing a FileDescriptorSet (a\n" - " protocol buffer defined in descriptor.proto).\n" -@@ -1957,7 +2008,9 @@ +@@ -2018,22 +2058,38 @@ + --version Show version info and exit. + -h, --help Show this text and exit. + --encode=MESSAGE_TYPE Read a text-format message of the given type +- from standard input and write it in binary +- to standard output. The message type must ++ from input protobuf file and write it in binary ++ to output protobuf file. The message type must + be defined in PROTO_FILES or their imports. ++ The input/output protobuf files are specified ++ using the --protobuf_in and --protobuf_out ++ command line flags. + --deterministic_output When using --encode, ensure map fields are + deterministically ordered. Note that this order + is not canonical, and changes across builds or + releases of protoc. + --decode=MESSAGE_TYPE Read a binary message of the given type from +- standard input and write it in text format +- to standard output. The message type must ++ input protobuf file and write it in text format ++ to output protobuf file. The message type must + be defined in PROTO_FILES or their imports. ++ The input/output protobuf files are specified ++ using the --protobuf_in and --protobuf_out ++ command line flags. + --decode_raw Read an arbitrary protocol message from +- standard input and write the raw tag/value +- pairs in text format to standard output. No ++ input protobuf file and write the raw tag/value ++ pairs in text format to output protobuf file. No + PROTO_FILES should be given when using this +- flag. ++ flag. The input/output protobuf files are ++ specified using the --protobuf_in and ++ --protobuf_out command line flags. ++ --protobuf_in=FILE Absolute path to the protobuf file from which ++ input of encoding/decoding operation will be ++ read. If omitted, input will be read from ++ standard input. ++ --protobuf_out=FILE Absolute path to the protobuf file to which ++ output of encoding/decoding operation will be ++ written. If omitted, output will be written to ++ standard output. + --descriptor_set_in=FILES Specifies a delimited list of FILES + each containing a FileDescriptorSet (a + protocol buffer defined in descriptor.proto). +@@ -2344,7 +2400,9 @@ return true; } @@ -134,8 +140,8 @@ https://github.com/google/protobuf/pull/235 // Look up the type. const Descriptor* type = pool->FindMessageTypeByName(codec_type_); if (type == NULL) { -@@ -1969,15 +2022,15 @@ - google::protobuf::scoped_ptr message(dynamic_factory.GetPrototype(type)->New()); +@@ -2356,15 +2414,15 @@ + std::unique_ptr message(dynamic_factory.GetPrototype(type)->New()); if (mode_ == MODE_ENCODE) { - SetFdToTextMode(STDIN_FILENO); @@ -158,8 +164,8 @@ https://github.com/google/protobuf/pull/235 // Input is text. --- /src/google/protobuf/compiler/command_line_interface.h +++ /src/google/protobuf/compiler/command_line_interface.h -@@ -269,7 +269,9 @@ - GeneratorContext* generator_context, string* error); +@@ -292,7 +292,9 @@ + GeneratorContext* generator_context, std::string* error); // Implements --encode and --decode. - bool EncodeOrDecode(const DescriptorPool* pool); @@ -169,23 +175,23 @@ https://github.com/google/protobuf/pull/235 // Implements the --descriptor_set_out option. bool WriteDescriptorSet( -@@ -402,6 +404,13 @@ +@@ -427,6 +429,13 @@ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty. - std::vector descriptor_set_in_names_; + std::vector descriptor_set_in_names_; + // When using --encode / --decode / --decode_raw absolute path to the output + // file. (Empty string indicates write to STDOUT). -+ string protobuf_out_path_; ++ std::string protobuf_out_path_; + // When using --encode / --decode / --decode_raw, absolute path to the input + // file. (Empty string indicates read from STDIN). -+ string protobuf_in_path_; ++ std::string protobuf_in_path_; + // If --descriptor_set_out was given, this is the filename to which the // FileDescriptorSet should be written. Otherwise, empty. - string descriptor_set_out_name_; + std::string descriptor_set_out_name_; --- /src/google/protobuf/compiler/command_line_interface_unittest.cc +++ /src/google/protobuf/compiler/command_line_interface_unittest.cc -@@ -95,7 +95,7 @@ +@@ -99,7 +99,7 @@ virtual void SetUp(); virtual void TearDown(); @@ -193,9 +199,9 @@ https://github.com/google/protobuf/pull/235 + // Run the CommandLineInterface with the given command line. The // command is automatically split on spaces, and the string "$tmpdir" // is replaced with TestTempDir(). - void Run(const string& command); -@@ -2308,6 +2308,17 @@ - EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_)); + void Run(const std::string& command); +@@ -2626,6 +2626,17 @@ + std::string::npos); } + void ExpectBinaryFilesMatch(const string &expected_file, @@ -212,22 +218,23 @@ https://github.com/google/protobuf/pull/235 private: void WriteUnittestProtoDescriptorSet() { unittest_proto_descriptor_set_filename_ = -@@ -2398,6 +2409,18 @@ - "google/protobuf/no_such_file.proto: No such file or directory\n"); +@@ -2749,6 +2760,19 @@ + "Can only use --deterministic_output with --encode.\n"); } +TEST_P(EncodeDecodeTest, RedirectInputOutput) { + string out_file = TestTempDir() + "/golden_message_out.pbf"; -+ string cmd = ""; -+ cmd += "google/protobuf/unittest.proto "; -+ cmd += "--encode=protobuf_unittest.TestAllTypes "; -+ cmd += "--protobuf_in=" + TestSourceDir() + -+ "/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt "; -+ cmd += "--protobuf_out=" + out_file; -+ EXPECT_TRUE(Run(cmd)); -+ ExpectBinaryFilesMatch(out_file, TestSourceDir() + "/google/protobuf/testdata/golden_message_oneof_implemented"); ++ EXPECT_TRUE( ++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") + ++ " --encode=protobuf_unittest.TestAllTypes" + ++ " --protobuf_in=" + TestUtil::GetTestDataPath( ++ "net/proto2/internal/" ++ "testdata/text_format_unittest_data_oneof_implemented.txt") + ++ " --protobuf_out=" + out_file)); ++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath( ++ "net/proto2/internal/testdata/golden_message_oneof_implemented")); +} + - INSTANTIATE_TEST_CASE_P(FileDescriptorSetSource, - EncodeDecodeTest, - testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN)); + INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest, + testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN)); + } // anonymous namespace diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch similarity index 75% rename from dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch rename to dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch index 373dc7935a..eb1598c945 100644 --- a/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch +++ b/dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch @@ -2,16 +2,16 @@ Disable no-warning-test which is compiled with -Werror option and whose only pur --- /src/Makefile.am +++ /src/Makefile.am -@@ -750,7 +750,7 @@ - +@@ -713,7 +713,7 @@ + GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ protobuf-lite-test test_plugin protobuf-lite-arena-test \ - no-warning-test $(GZCHECKPROGRAMS) + $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - ../gmock/gtest/lib/libgtest.la \ - ../gmock/lib/libgmock.la \ -@@ -931,4 +931,4 @@ + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +@@ -900,4 +900,4 @@ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \ diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch similarity index 58% rename from dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch rename to dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch index 424ad5ff58..3d5069dd14 100644 --- a/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch +++ b/dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch @@ -1,12 +1,8 @@ --- /Makefile.am +++ /Makefile.am -@@ -8,31 +8,12 @@ - # the right time. - SUBDIRS = . src - --# Always include gmock in distributions. --DIST_SUBDIRS = $(subdirs) src conformance benchmarks -+DIST_SUBDIRS = src conformance benchmarks +@@ -11,28 +11,10 @@ + # Always include third_party directories in distributions. + DIST_SUBDIRS = src conformance benchmarks third_party/googletest -# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS -# because then "make check" would also build and run all of gmock's own tests, @@ -15,8 +11,8 @@ -# the installed version of gmock if there is one. check-local: - @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock" -- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la -- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la +- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la +- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la -# We would like to clean gmock when "make clean" is invoked. But we have to -# be careful because clean-local is also invoked during "make distclean", but @@ -25,9 +21,9 @@ -# cd to the directory again and "make clean" it will fail. So, check that the -# Makefile exists before recursing. clean-local: -- @if test -e gmock/Makefile; then \ -- echo "Making clean in gmock"; \ -- cd gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \ +- @if test -e third_party/googletest/Makefile; then \ +- echo "Making clean in googletest"; \ +- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \ - fi; \ - if test -e conformance/Makefile; then \ + @if test -e conformance/Makefile; then \ @@ -36,81 +32,89 @@ fi; \ --- /configure.ac +++ /configure.ac -@@ -200,12 +200,5 @@ - - AX_CXX_COMPILE_STDCXX([11], [noext], [optional]) +@@ -236,12 +236,5 @@ + fi + AC_SUBST([LIBLOG_LIBS]) -# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, -# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock -# too. -export CFLAGS -export CXXFLAGS --AC_CONFIG_SUBDIRS([gmock]) +-AC_CONFIG_SUBDIRS([third_party/googletest]) - AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) AC_OUTPUT --- /src/Makefile.am +++ /src/Makefile.am -@@ -752,11 +752,7 @@ +@@ -707,19 +707,11 @@ + google/protobuf/testing/file.cc \ + google/protobuf/testing/file.h + +-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest +-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock +-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest +-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock + check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ protobuf-lite-test test_plugin protobuf-lite-arena-test \ - no-warning-test $(GZCHECKPROGRAMS) + $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ -- ../gmock/gtest/lib/libgtest.la \ -- ../gmock/lib/libgmock.la \ -- ../gmock/lib/libgmock_main.la --protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \ -- -I$(srcdir)/../gmock/include +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ +- -I$(GOOGLEMOCK_SRC_DIR)/include + -lgtest -lgmock -lgmock_main # Disable optimization for tests unless the user explicitly asked for it, # since test_util.cc takes forever to compile with optimization (with GCC). # See configure.ac for more info. -@@ -843,12 +839,8 @@ +@@ -811,12 +803,8 @@ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ libprotoc.la \ -- ../gmock/gtest/lib/libgtest.la \ -- ../gmock/lib/libgmock.la \ -- ../gmock/lib/libgmock_main.la --protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \ -- -I$(srcdir)/../gmock/gtest/include \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include \ - -DPROTOBUF_TEST_NO_DESCRIPTORS + -lgtest -lgmock -lgmock_main +protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lazy_descriptor_test_SOURCES = \ google/protobuf/compiler/cpp/cpp_unittest.cc \ -@@ -868,11 +860,7 @@ +@@ -837,11 +825,7 @@ # full runtime and we want to make sure this test builds without full # runtime. - protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ -- ../gmock/gtest/lib/libgtest.la \ -- ../gmock/lib/libgmock.la \ -- ../gmock/lib/libgmock_main.la --protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \ -- -I$(srcdir)/../gmock/gtest/include + protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include + -lgtest -lgmock -lgmock_main protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lite_test_SOURCES = \ google/protobuf/lite_unittest.cc \ -@@ -883,11 +871,7 @@ +@@ -853,11 +837,7 @@ # gtest when building the test internally our memory sanitizer doesn't detect # memory leaks (don't know why). protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ -- ../gmock/gtest/lib/libgtest.la \ -- ../gmock/lib/libgmock.la \ -- ../gmock/lib/libgmock_main.la --protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \ -- -I$(srcdir)/../gmock/gtest/include +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include + -lgtest -lgmock -lgmock_main protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lite_arena_test_SOURCES = \ google/protobuf/lite_arena_unittest.cc \ -@@ -896,8 +880,7 @@ +@@ -867,8 +847,7 @@ # Test plugin binary. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ -- ../gmock/gtest/lib/libgtest.la --test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la +-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include + -lgtest test_plugin_SOURCES = \ google/protobuf/compiler/mock_code_generator.cc \ diff --git a/dev-libs/protobuf/files/protobuf-3.18.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.18.0-disable_no-warning-test.patch new file mode 100644 index 0000000000..9abf5deca2 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.18.0-disable_no-warning-test.patch @@ -0,0 +1,36 @@ +From 290073d7d4ddaa6d39ad12c90245e795c5482432 Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis +Date: Sat, 29 Jan 2022 22:43:50 +0800 +Subject: [PATCH] protobuf-3.18.0: disable no-warning test + +Disable no-warning-test which is compiled with -Werror option +and whose only purpose is checking if compilation results in any warnings. + +Signed-off-by: Arfrever Frehtes Taifersar Arahesis +Signed-off-by: Yixun Lan +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index e6b4d0f..1cfd885 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -726,7 +726,7 @@ GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest + GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock + check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ + protobuf-lite-test test_plugin protobuf-lite-arena-test \ +- no-warning-test $(GZCHECKPROGRAMS) ++ $(GZCHECKPROGRAMS) + protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +@@ -915,4 +915,4 @@ nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) + + TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ + google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \ +- protobuf-lite-arena-test no-warning-test ++ protobuf-lite-arena-test +-- +2.34.1 + diff --git a/dev-libs/protobuf/files/protobuf-3.18.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.18.0-system_libraries.patch new file mode 100644 index 0000000000..0e417c51bd --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.18.0-system_libraries.patch @@ -0,0 +1,146 @@ +From 10b2d5bb5a4d1b7529cb781e5513940ad6db4ada Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis +Date: Sat, 29 Jan 2022 22:46:38 +0800 +Subject: [PATCH] protobuf-3.18.0: system_libraries + +Use system version of GoogleTest, +which will unbundle gtest, gmock libraries + +Signed-off-by: Arfrever Frehtes Taifersar Arahesis +Signed-off-by: Yixun Lan +--- + Makefile.am | 20 +------------------- + configure.ac | 7 ------- + src/Makefile.am | 33 ++++++--------------------------- + 3 files changed, 7 insertions(+), 53 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7ce954e..c1493e0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -11,28 +11,10 @@ SUBDIRS = . src + # Always include third_party directories in distributions. + DIST_SUBDIRS = src conformance benchmarks third_party/googletest + +-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS +-# because then "make check" would also build and run all of gmock's own tests, +-# which takes a lot of time and is generally not useful to us. Also, we don't +-# want "make install" to recurse into gmock since we don't want to overwrite +-# the installed version of gmock if there is one. + check-local: +- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock" +- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la +- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la + +-# We would like to clean gmock when "make clean" is invoked. But we have to +-# be careful because clean-local is also invoked during "make distclean", but +-# "make distclean" already recurses into gmock because it's listed among the +-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to +-# cd to the directory again and "make clean" it will fail. So, check that the +-# Makefile exists before recursing. + clean-local: +- @if test -e third_party/googletest/Makefile; then \ +- echo "Making clean in googletest"; \ +- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \ +- fi; \ +- if test -e conformance/Makefile; then \ ++ @if test -e conformance/Makefile; then \ + echo "Making clean in conformance"; \ + cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \ + fi; \ +diff --git a/configure.ac b/configure.ac +index 4a6d50a..6301bd6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -236,12 +236,5 @@ if test "x$ANDROID_TEST" = xyes; then + fi + AC_SUBST([LIBLOG_LIBS]) + +-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, +-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock +-# too. +-export CFLAGS +-export CXXFLAGS +-AC_CONFIG_SUBDIRS([third_party/googletest]) +- + AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) + AC_OUTPUT +diff --git a/src/Makefile.am b/src/Makefile.am +index 1cfd885..73c2c6d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -720,19 +720,11 @@ COMMON_TEST_SOURCES = \ + google/protobuf/testing/googletest.cc \ + google/protobuf/testing/googletest.h + +-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest +-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock +-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest +-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock + check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ + protobuf-lite-test test_plugin protobuf-lite-arena-test \ + $(GZCHECKPROGRAMS) + protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ +- -I$(GOOGLEMOCK_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + # Disable optimization for tests unless the user explicitly asked for it, + # since test_util.cc takes forever to compile with optimization (with GCC). + # See configure.ac for more info. +@@ -825,12 +817,8 @@ $(am_protobuf_test_OBJECTS): unittest_proto_middleman + # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. + protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ + libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include \ +- -DPROTOBUF_TEST_NO_DESCRIPTORS ++ -lgtest -lgmock -lgmock_main ++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS + protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lazy_descriptor_test_SOURCES = \ + google/protobuf/compiler/cpp/cpp_unittest.cc \ +@@ -851,11 +839,7 @@ COMMON_LITE_TEST_SOURCES = \ + # full runtime and we want to make sure this test builds without full + # runtime. + protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lite_test_SOURCES = \ + google/protobuf/lite_unittest.cc \ +@@ -867,11 +851,7 @@ $(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman + # gtest when building the test internally our memory sanitizer doesn't detect + # memory leaks (don't know why). + protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lite_arena_test_SOURCES = \ + google/protobuf/lite_arena_unittest.cc \ +@@ -881,8 +861,7 @@ $(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman + + # Test plugin binary. + test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la +-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest + test_plugin_SOURCES = \ + google/protobuf/compiler/mock_code_generator.cc \ + google/protobuf/compiler/test_plugin.cc \ +-- +2.34.1 + diff --git a/dev-libs/protobuf/files/protobuf-3.19.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.19.0-disable_no-warning-test.patch new file mode 100644 index 0000000000..eb3dd0c1cb --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.19.0-disable_no-warning-test.patch @@ -0,0 +1,36 @@ +From 12e381222a8cdce50845dfb7d8fdf863f6f8bb8a Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis +Date: Fri, 28 Jan 2022 15:08:40 +0800 +Subject: [PATCH] protobuf-3.19.0: disable no-warning test + +Disable no-warning-test which is compiled with -Werror option +and whose only purpose is checking if compilation results in any warnings. + +Signed-off-by: Arfrever Frehtes Taifersar Arahesis +Signed-off-by: Yixun Lan +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 3312e5d..7e86b62 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -722,7 +722,7 @@ GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest + GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock + check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ + protobuf-lite-test test_plugin protobuf-lite-arena-test \ +- no-warning-test $(GZCHECKPROGRAMS) ++ $(GZCHECKPROGRAMS) + protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ + $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ + $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +@@ -911,4 +911,4 @@ nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs) + + TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ + google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \ +- protobuf-lite-arena-test no-warning-test ++ protobuf-lite-arena-test +-- +2.34.1 + diff --git a/dev-libs/protobuf/files/protobuf-3.19.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.19.0-system_libraries.patch new file mode 100644 index 0000000000..56905c7847 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.19.0-system_libraries.patch @@ -0,0 +1,146 @@ +From c080d329298e841d7d4e1380ff7ec88de5cb3b02 Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis +Date: Fri, 28 Jan 2022 15:14:59 +0800 +Subject: [PATCH] protobuf-3.19.0: system_libraries + +Use system version of GoogleTest, +which will unbundle gtest, gmock libraries + +Signed-off-by: Arfrever Frehtes Taifersar Arahesis +Signed-off-by: Yixun Lan +--- + Makefile.am | 20 +------------------- + configure.ac | 7 ------- + src/Makefile.am | 33 ++++++--------------------------- + 3 files changed, 7 insertions(+), 53 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 41d4061..b24f8f4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -11,28 +11,10 @@ SUBDIRS = . src + # Always include third_party directories in distributions. + DIST_SUBDIRS = src conformance benchmarks third_party/googletest + +-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS +-# because then "make check" would also build and run all of gmock's own tests, +-# which takes a lot of time and is generally not useful to us. Also, we don't +-# want "make install" to recurse into gmock since we don't want to overwrite +-# the installed version of gmock if there is one. + check-local: +- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock" +- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la +- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la + +-# We would like to clean gmock when "make clean" is invoked. But we have to +-# be careful because clean-local is also invoked during "make distclean", but +-# "make distclean" already recurses into gmock because it's listed among the +-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to +-# cd to the directory again and "make clean" it will fail. So, check that the +-# Makefile exists before recursing. + clean-local: +- @if test -e third_party/googletest/Makefile; then \ +- echo "Making clean in googletest"; \ +- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \ +- fi; \ +- if test -e conformance/Makefile; then \ ++ @if test -e conformance/Makefile; then \ + echo "Making clean in conformance"; \ + cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \ + fi; \ +diff --git a/configure.ac b/configure.ac +index 02085ca..449fb3d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -236,12 +236,5 @@ if test "x$ANDROID_TEST" = xyes; then + fi + AC_SUBST([LIBLOG_LIBS]) + +-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS, +-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock +-# too. +-export CFLAGS +-export CXXFLAGS +-AC_CONFIG_SUBDIRS([third_party/googletest]) +- + AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) + AC_OUTPUT +diff --git a/src/Makefile.am b/src/Makefile.am +index 7e86b62..47d759f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -716,19 +716,11 @@ COMMON_TEST_SOURCES = \ + google/protobuf/testing/googletest.cc \ + google/protobuf/testing/googletest.h + +-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest +-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock +-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest +-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock + check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ + protobuf-lite-test test_plugin protobuf-lite-arena-test \ + $(GZCHECKPROGRAMS) + protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ +- -I$(GOOGLEMOCK_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + # Disable optimization for tests unless the user explicitly asked for it, + # since test_util.cc takes forever to compile with optimization (with GCC). + # See configure.ac for more info. +@@ -820,12 +812,8 @@ $(am_protobuf_test_OBJECTS): unittest_proto_middleman + # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. + protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ + libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include \ +- -DPROTOBUF_TEST_NO_DESCRIPTORS ++ -lgtest -lgmock -lgmock_main ++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS + protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lazy_descriptor_test_SOURCES = \ + google/protobuf/compiler/cpp/cpp_unittest.cc \ +@@ -847,11 +835,7 @@ COMMON_LITE_TEST_SOURCES = \ + # full runtime and we want to make sure this test builds without full + # runtime. + protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lite_test_SOURCES = \ + google/protobuf/lite_unittest.cc \ +@@ -863,11 +847,7 @@ $(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman + # gtest when building the test internally our memory sanitizer doesn't detect + # memory leaks (don't know why). + protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \ +- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la +-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ +- -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest -lgmock -lgmock_main + protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) + protobuf_lite_arena_test_SOURCES = \ + google/protobuf/lite_arena_unittest.cc \ +@@ -877,8 +857,7 @@ $(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman + + # Test plugin binary. + test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ +- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la +-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include ++ -lgtest + test_plugin_SOURCES = \ + google/protobuf/compiler/mock_code_generator.cc \ + google/protobuf/compiler/test_plugin.cc \ +-- +2.34.1 + diff --git a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch deleted file mode 100644 index 7a88e83795..0000000000 --- a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch +++ /dev/null @@ -1,21 +0,0 @@ -https://github.com/google/protobuf/issues/3937 -https://github.com/google/protobuf/pull/3955 -https://github.com/google/protobuf/commit/642e1ac635f2563b4a14c255374f02645ae85dac - ---- /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h -+++ /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h -@@ -146,6 +146,14 @@ - return __atomic_load_n(ptr, __ATOMIC_RELAXED); - } - -+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr, -+ Atomic64 old_value, -+ Atomic64 new_value) { -+ __atomic_compare_exchange_n(ptr, &old_value, new_value, false, -+ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE); -+ return old_value; -+} -+ - #endif // defined(__LP64__) - - } // namespace internal diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml index 6aeca89803..4ac93ba8e5 100644 --- a/dev-libs/protobuf/metadata.xml +++ b/dev-libs/protobuf/metadata.xml @@ -1,18 +1,19 @@ - + - + arfrever.fta@gmail.com Arfrever Frehtes Taifersar Arahesis - proxy-maint@gentoo.org - Proxy Maintainers + cjk@gentoo.org + Cjk Soname version number - google/protobuf + cpe:/a:google:protobuf + protocolbuffers/protobuf diff --git a/dev-libs/protobuf/protobuf-3.17.0.ebuild b/dev-libs/protobuf/protobuf-3.17.0.ebuild new file mode 100644 index 0000000000..ab50d51427 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.17.0.ebuild @@ -0,0 +1,143 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/28" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.17.1.ebuild b/dev-libs/protobuf/protobuf-3.17.1.ebuild new file mode 100644 index 0000000000..ab50d51427 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.17.1.ebuild @@ -0,0 +1,143 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/28" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.17.2.ebuild b/dev-libs/protobuf/protobuf-3.17.2.ebuild new file mode 100644 index 0000000000..ab50d51427 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.17.2.ebuild @@ -0,0 +1,143 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/28" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.17.3.ebuild b/dev-libs/protobuf/protobuf-3.17.3.ebuild new file mode 100644 index 0000000000..c021f1f188 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.17.3.ebuild @@ -0,0 +1,143 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/28" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.18.2.ebuild b/dev-libs/protobuf/protobuf-3.18.2.ebuild new file mode 100644 index 0000000000..0aea6a331d --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.18.2.ebuild @@ -0,0 +1,147 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/29" +# -hppa for bug #831728 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 -hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.18.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.18.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/9433 + sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.19.1.ebuild b/dev-libs/protobuf/protobuf-3.19.1.ebuild new file mode 100644 index 0000000000..8cdee69556 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.19.1.ebuild @@ -0,0 +1,141 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" + +LICENSE="BSD" +SLOT="0/30" +# -hppa for bug #831728 +KEYWORDS="~alpha amd64 arm arm64 -hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.19.3.ebuild b/dev-libs/protobuf/protobuf-3.19.3.ebuild new file mode 100644 index 0000000000..9171eaebed --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.19.3.ebuild @@ -0,0 +1,146 @@ +# Copyright 2008-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/30" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.19.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" +) + +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) + +src_prepare() { + default + + # https://github.com/protocolbuffers/protobuf/issues/7413 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/8082 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8459 + sed \ + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \ + -i src/google/protobuf/arena_unittest.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/8460 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die + + # https://github.com/protocolbuffers/protobuf/issues/9392 + sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die + + # https://github.com/protocolbuffers/protobuf/issues/9433 + sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die + + eautoreconf +} + +src_configure() { + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI + + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install ${PN} editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x /usr/share/doc/${PF}/examples + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-3.4.1.ebuild b/dev-libs/protobuf/protobuf-3.4.1.ebuild deleted file mode 100644 index ab347e7227..0000000000 --- a/dev-libs/protobuf/protobuf-3.4.1.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf" -SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0/14" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos" -IUSE="emacs examples static-libs test zlib" - -RDEPEND="emacs? ( virtual/emacs ) - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )" - -PATCHES=( - "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch" - "${FILESDIR}/${PN}-3.4.0-system_libraries.patch" - "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch" -) - -DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) - -src_prepare() { - append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI - default - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable static-libs static) - $(use_with zlib) - ) - - if tc-is-cross-compiler; then - # The build system wants `protoc` when building, so we need a copy that - # runs on the host. This is more hermetic than relying on the version - # installed in the host being the exact same version. - mkdir -p "${WORKDIR}/build" || die - pushd "${WORKDIR}/build" > /dev/null || die - ECONF_SOURCE="${S}" econf_build "${myeconfargs[@]}" - myeconfargs+=(--with-protoc="${PWD}"/src/protoc) - popd > /dev/null || die - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -src_compile() { - multilib-minimal_src_compile - - if use emacs; then - elisp-compile editors/protobuf-mode.el - fi -} - -multilib_src_compile() { - if tc-is-cross-compiler; then - emake -C "${WORKDIR}/build/src" protoc - fi - - default -} - -multilib_src_test() { - emake check -} - -multilib_src_install_all() { - insinto /usr/share/vim/vimfiles/syntax - doins editors/proto.vim - insinto /usr/share/vim/vimfiles/ftdetect - doins "${FILESDIR}/proto.vim" - - if use emacs; then - elisp-install ${PN} editors/protobuf-mode.el* - elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" - fi - - if use examples; then - DOCS+=(examples) - docompress -x /usr/share/doc/${PF}/examples - fi - - einstalldocs -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild deleted file mode 100644 index c0acbfe7b8..0000000000 --- a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs - -DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf" -SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0/15" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos" -IUSE="emacs examples static-libs test zlib" - -RDEPEND="emacs? ( virtual/emacs ) - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )" - -PATCHES=( - "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch" - "${FILESDIR}/${PN}-3.4.0-system_libraries.patch" - "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch" - "${FILESDIR}/${PN}-3.5.0-atomic_operations.patch" -) - -DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable static-libs static) - $(use_with zlib) - ) - - if tc-is-cross-compiler; then - # The build system wants `protoc` when building, so we need a copy that - # runs on the host. This is more hermetic than relying on the version - # installed in the host being the exact same version. - mkdir -p "${WORKDIR}/build" || die - pushd "${WORKDIR}/build" > /dev/null || die - ECONF_SOURCE="${S}" econf_build "${myeconfargs[@]}" - myeconfargs+=(--with-protoc="${PWD}"/src/protoc) - popd > /dev/null || die - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -src_compile() { - multilib-minimal_src_compile - - if use emacs; then - elisp-compile editors/protobuf-mode.el - fi -} - -multilib_src_compile() { - if tc-is-cross-compiler; then - emake -C "${WORKDIR}/build/src" protoc - fi - - default -} - -multilib_src_test() { - emake check -} - -multilib_src_install_all() { - insinto /usr/share/vim/vimfiles/syntax - doins editors/proto.vim - insinto /usr/share/vim/vimfiles/ftdetect - doins "${FILESDIR}/proto.vim" - - if use emacs; then - elisp-install ${PN} editors/protobuf-mode.el* - elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" - fi - - if use examples; then - DOCS+=(examples) - docompress -x /usr/share/doc/${PF}/examples - fi - - einstalldocs -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/dev-libs/protobuf/protobuf-3.5.2.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild similarity index 69% rename from dev-libs/protobuf/protobuf-3.5.2.ebuild rename to dev-libs/protobuf/protobuf-9999.ebuild index 60e3d7bd86..fe2db6a460 100644 --- a/dev-libs/protobuf/protobuf-3.5.2.ebuild +++ b/dev-libs/protobuf/protobuf-9999.ebuild @@ -1,29 +1,41 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 2008-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI="7" inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +fi + DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" -HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf" -SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi LICENSE="BSD" -SLOT="0/15" -KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos" +SLOT="0/30" +KEYWORDS="" IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" -RDEPEND="emacs? ( virtual/emacs ) +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND} - test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )" PATCHES=( - "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch" - "${FILESDIR}/${PN}-3.4.0-system_libraries.patch" - "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch" - "${FILESDIR}/${PN}-3.5.0-atomic_operations.patch" + "${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.19.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) @@ -77,6 +89,8 @@ multilib_src_test() { } multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + insinto /usr/share/vim/vimfiles/syntax doins editors/proto.vim insinto /usr/share/vim/vimfiles/ftdetect From 7ea231504f38790b8f56eafe9b78fd7f22e976dc Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:11:24 +0100 Subject: [PATCH 23/40] sys-apps/less: Sync with gentoo It's from gentoo commit 13917a775eca525fcaa2a22daf2ba2cf4754d94e. --- sys-apps/less/Manifest | 6 ++-- sys-apps/less/files/README.Gentoo | 22 ------------ .../files/{lesspipe.sh => lesspipe-r1.sh} | 36 +++++++++++-------- .../{less-529.ebuild => less-581.2.ebuild} | 16 +++++---- .../less/{less-530.ebuild => less-589.ebuild} | 16 +++++---- .../less/{less-487.ebuild => less-590.ebuild} | 20 +++++------ sys-apps/less/metadata.xml | 14 +++++--- 7 files changed, 60 insertions(+), 70 deletions(-) delete mode 100644 sys-apps/less/files/README.Gentoo rename sys-apps/less/files/{lesspipe.sh => lesspipe-r1.sh} (90%) mode change 100755 => 100644 rename sys-apps/less/{less-529.ebuild => less-581.2.ebuild} (68%) rename sys-apps/less/{less-530.ebuild => less-589.ebuild} (72%) rename sys-apps/less/{less-487.ebuild => less-590.ebuild} (66%) diff --git a/sys-apps/less/Manifest b/sys-apps/less/Manifest index 196d87fdae..32c93d3198 100644 --- a/sys-apps/less/Manifest +++ b/sys-apps/less/Manifest @@ -1,3 +1,3 @@ -DIST less-487.tar.gz 318488 BLAKE2B 294ce992da39488fe5b50edf80d70179a45a449f5bcf8b93d6735be9f57db708734984f3a58654773155148c96037e2c445dac63abed1bc4ce655a4e472eca08 SHA512 d31274fdada570fbc6706d7c52637d1accbd18ce947ec062e10b1624c251a8533c6638bc3a1d89d3c70a0c7b9c6d45740598bec9003f281d64c587b1f829125a -DIST less-529.tar.gz 339651 BLAKE2B 745146fd584c6144b4052d18bae07a2b4c7a719d36c556c69837f2018ef95efeea35acadcb9946bdde0272848d1bd8537c847e89591d980ceb2eda5a4c5963c4 SHA512 902e3ed86161c5a9eb3c08567b6b702371b5c88a85ef0b21beada223eaa47e0abf4d4d166a4a7a195caef67509fa683d07d0b6a40b529d703ee26aa8910c360a -DIST less-530.tar.gz 339723 BLAKE2B 9321548b06330c0b1b5b5a36147f5b9348619ff15d907808744b89581edeb4d8c2118ba455d024a23850902cac4d2c34d1e7b9897e02769584315c0e67ef667e SHA512 8d83a18b5648c4fe85921a563aa2c40bcf495aeb611098c83cd167b1e2f706649846cdf457c8506ae2683ab362ad970a0b261747349673020894bccdb9acbc10 +DIST less-581.2.tar.gz 349230 BLAKE2B 3f9d3c94f3d9eae5ecd033c5f16a575bd3a179ca335b0318e097a916c6713379cafbe6c57459e86866e890a432fb02be9102726b35c46d9bdd07ca1b35f83058 SHA512 b1189396c798d7cb8655175f31b1af6163dcf8e8d7a72531161cc8396e72e0cf5858ce7b39173be603f9f16eda498f2805cf42c2b92ec6970fd9d2b603fb7b92 +DIST less-589.tar.gz 352390 BLAKE2B d91eaf0e4a3c14bb8a1c1b820965922c9e795cc8c6489c04dad79d14bc634db1e8e20aae9578ca5375d4d1f1fb861a510527ee9433437457d653453eabf5dce9 SHA512 c2a610c894e98853e73d83cf2c7e94ff75a868280b2ab7fa01676c35d35fdbba808f3630fa4954eca40f0823e654df4c287885499bb24f4d0b7b4558fb91977e +DIST less-590.tar.gz 352574 BLAKE2B 0f640f1b6b4d4925c4904ee77460e8becd2dae168fe5c1483bf6a9cfabe9eb0abdc4d4811507ba88a2b4cff6c238158bd8b4463b63d3d7863b44ce8538d32adb SHA512 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 diff --git a/sys-apps/less/files/README.Gentoo b/sys-apps/less/files/README.Gentoo deleted file mode 100644 index dca832808f..0000000000 --- a/sys-apps/less/files/README.Gentoo +++ /dev/null @@ -1,22 +0,0 @@ -This version of less comes with some Gentoo enhancements: - - default lesspipe.sh script to "view" files - - colorization support - -To see what file types are supported, just read the /usr/bin/lesspipe.sh -script (it's just a plain text bash script). - -Colorization support is disabled by default. To enable it, export the -LESSCOLOR variable to "yes": - $ export LESSCOLOR=yes - -We also provide a colorization script, 'code2color', that is used by -default. If you wish to use another script, simply export the LESSCOLORIZER -variable to name of the script: - $ export LESSCOLORIZER=some-other-script - -If you want to use the code2color script and the default color schemes are -not acceptable, you can develop your own schemes and save them in one of -the following places: - /etc/code2color - ~/.code2color - CODE2COLOR_CONFIG env var diff --git a/sys-apps/less/files/lesspipe.sh b/sys-apps/less/files/lesspipe-r1.sh old mode 100755 new mode 100644 similarity index 90% rename from sys-apps/less/files/lesspipe.sh rename to sys-apps/less/files/lesspipe-r1.sh index 66078850cb..9dcfea1d63 --- a/sys-apps/less/files/lesspipe.sh +++ b/sys-apps/less/files/lesspipe-r1.sh @@ -1,11 +1,13 @@ #!/bin/bash -# +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + # Preprocessor for 'less'. Used when this environment variable is set: # LESSOPEN="|lesspipe %s" # TODO: handle compressed files better -[[ -n ${LESSDEBUG} ]] && set -x +[[ -n ${LESSDEBUG+set} ]] && set -x trap 'exit 0' PIPE @@ -17,6 +19,7 @@ guesscompress() { *.lzma) echo "unlzma -c" ;; *.lzo) echo "lzop -dc" ;; *.xz) echo "xzdec" ;; + *.zst) echo "zstdcat" ;; *) echo "cat" ;; esac } @@ -64,8 +67,9 @@ lesspipe() { ls -alF -- "$1" return elif [[ ! -f $1 ]] ; then - stat "$1" - return + # Only return if the stat passes. This is needed to handle pseudo + # arguments like URIs. + stat -- "$1" && return fi case "${match}" in @@ -76,6 +80,7 @@ lesspipe() { *.[0-9n].gz|*.man.gz|\ *.[0-9n].lzma|*.man.lzma|\ *.[0-9n].xz|*.man.xz|\ + *.[0-9n].zst|*.man.zst|\ *.[0-9][a-z].gz|*.[0-9][a-z].gz) local out=$(${DECOMPRESSOR} -- "$1" | file -) case ${out} in @@ -104,10 +109,11 @@ lesspipe() { *.doc) antiword "$1" || catdoc "$1" ;; *.rtf) unrtf --nopict --text "$1" ;; *.conf|*.txt|*.log) ;; # force less to work on these directly #150256 + *.json) python -mjson.tool "$1" ;; ### URLs ### - ftp://*|http://*|*.htm|*.html) - for b in links2 links lynx ; do + ftp://*|http://*|https://|*.htm|*.html) + for b in elinks links2 links lynx ; do ${b} -dump "$1" && exit 0 done html2text -style pretty "$1" @@ -115,23 +121,24 @@ lesspipe() { ### Tar files ### *.tar|\ - *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\ + *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|*.tar.zst|\ *.tar.lz|*.tar.tlz|\ *.tar.lzma|*.tar.xz) ${DECOMPRESSOR} -- "$1" | tar tvvf -;; *.tbz2|*.tbz|*.tgz|*.tlz|*.txz) - lesspipe "$1" "$1".tar.${1##*.t} ;; + lesspipe "$1" "$1.tar.${1##*.t}" ;; ### Misc archives ### *.bz2|\ *.gz|*.z|\ + *.zst|\ *.lz|\ *.lzma|*.xz) ${DECOMPRESSOR} -- "$1" ;; *.rpm) rpm -qpivl --changelog -- "$1" || rpm2tar -O "$1" | tar tvvf -;; *.cpi|*.cpio) cpio -itv < "$1" ;; *.ace) unace l "$1" ;; *.arc) arc v "$1" ;; - *.arj) unarj l -- "$1" ;; + *.arj) arj l -- "$1" || unarj l "$1" ;; *.cab) cabextract -l -- "$1" ;; *.lha|*.lzh) lha v "$1" ;; *.zoo) zoo -list "$1" || unzoo -l "$1" ;; @@ -207,7 +214,7 @@ lesspipe() { *) case $(( recur++ )) in # Maybe we didn't match due to case issues ... - 0) lesspipe "$1" "$(echo $1 | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;; + 0) lesspipe "$1" "$(echo "$1" | LC_ALL=C tr '[:upper:]' '[:lower:]')" ;; # Maybe we didn't match because the file is named weird ... 1) lesspipe_file "$1" ;; @@ -241,12 +248,12 @@ lesspipe() { esac } -if [[ -z $1 ]] ; then +if [[ $# -eq 0 ]] ; then echo "Usage: lesspipe " elif [[ $1 == "-V" || $1 == "--version" ]] ; then cat <<-EOF lesspipe (git) - Copyright 2001-2016 Gentoo Foundation + Copyright 1999-2019 Gentoo Authors Mike Frysinger (with plenty of ideas stolen from other projects/distros) @@ -275,7 +282,6 @@ elif [[ $1 == "-h" || $1 == "--help" ]] ; then EOF else recur=0 - [[ -n ${LESSDEBUG} ]] \ - && lesspipe "$1" \ - || lesspipe "$1" 2> /dev/null + [[ -z ${LESSDEBUG+set} ]] && exec 2>/dev/null + lesspipe "$1" fi diff --git a/sys-apps/less/less-529.ebuild b/sys-apps/less/less-581.2.ebuild similarity index 68% rename from sys-apps/less/less-529.ebuild rename to sys-apps/less/less-581.2.ebuild index 647f74ce41..10671e00e6 100644 --- a/sys-apps/less/less-529.ebuild +++ b/sys-apps/less/less-581.2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 DESCRIPTION="Excellent text file viewer" HOMEPAGE="http://www.greenwoodsoftware.com/less/" @@ -9,26 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz" LICENSE="|| ( GPL-3 BSD-2 )" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="pcre unicode" DEPEND=">=app-misc/editor-wrapper-3 >=sys-libs/ncurses-5.2:0= - pcre? ( dev-libs/libpcre )" + pcre? ( dev-libs/libpcre2 )" RDEPEND="${DEPEND}" src_configure() { export ac_cv_lib_ncursesw_initscr=$(usex unicode) export ac_cv_lib_ncurses_initscr=$(usex !unicode) - econf \ - --with-regex=$(usex pcre pcre posix) \ + local myeconfargs=( + --with-regex=$(usex pcre pcre2 posix) --with-editor="${EPREFIX}"/usr/libexec/editor + ) + econf "${myeconfargs[@]}" } src_install() { default - newbin "${FILESDIR}"/lesspipe.sh lesspipe + newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe newenvd "${FILESDIR}"/less.envd 70less } diff --git a/sys-apps/less/less-530.ebuild b/sys-apps/less/less-589.ebuild similarity index 72% rename from sys-apps/less/less-530.ebuild rename to sys-apps/less/less-589.ebuild index 84d4144cc4..c91345dc9f 100644 --- a/sys-apps/less/less-530.ebuild +++ b/sys-apps/less/less-589.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 DESCRIPTION="Excellent text file viewer" HOMEPAGE="http://www.greenwoodsoftware.com/less/" @@ -9,26 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz" LICENSE="|| ( GPL-3 BSD-2 )" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="pcre unicode" DEPEND=">=app-misc/editor-wrapper-3 >=sys-libs/ncurses-5.2:0= - pcre? ( dev-libs/libpcre )" + pcre? ( dev-libs/libpcre2 )" RDEPEND="${DEPEND}" src_configure() { export ac_cv_lib_ncursesw_initscr=$(usex unicode) export ac_cv_lib_ncurses_initscr=$(usex !unicode) - econf \ - --with-regex=$(usex pcre pcre posix) \ + local myeconfargs=( + --with-regex=$(usex pcre pcre2 posix) --with-editor="${EPREFIX}"/usr/libexec/editor + ) + econf "${myeconfargs[@]}" } src_install() { default - newbin "${FILESDIR}"/lesspipe.sh lesspipe + newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe newenvd "${FILESDIR}"/less.envd 70less } diff --git a/sys-apps/less/less-487.ebuild b/sys-apps/less/less-590.ebuild similarity index 66% rename from sys-apps/less/less-487.ebuild rename to sys-apps/less/less-590.ebuild index b1552f3d1c..10671e00e6 100644 --- a/sys-apps/less/less-487.ebuild +++ b/sys-apps/less/less-590.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 DESCRIPTION="Excellent text file viewer" HOMEPAGE="http://www.greenwoodsoftware.com/less/" @@ -9,30 +9,28 @@ SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz" LICENSE="|| ( GPL-3 BSD-2 )" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="pcre unicode" DEPEND=">=app-misc/editor-wrapper-3 >=sys-libs/ncurses-5.2:0= - pcre? ( dev-libs/libpcre )" + pcre? ( dev-libs/libpcre2 )" RDEPEND="${DEPEND}" -src_prepare() { - chmod a+x configure || die -} - src_configure() { export ac_cv_lib_ncursesw_initscr=$(usex unicode) export ac_cv_lib_ncurses_initscr=$(usex !unicode) - econf \ - --with-regex=$(usex pcre pcre posix) \ + local myeconfargs=( + --with-regex=$(usex pcre pcre2 posix) --with-editor="${EPREFIX}"/usr/libexec/editor + ) + econf "${myeconfargs[@]}" } src_install() { default - newbin "${FILESDIR}"/lesspipe.sh lesspipe + newbin "${FILESDIR}"/lesspipe-r1.sh lesspipe newenvd "${FILESDIR}"/less.envd 70less } diff --git a/sys-apps/less/metadata.xml b/sys-apps/less/metadata.xml index 56c1244130..c808bf8b52 100644 --- a/sys-apps/less/metadata.xml +++ b/sys-apps/less/metadata.xml @@ -1,8 +1,12 @@ - + - - base-system@gentoo.org - Gentoo Base System - + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:less + gwsw/less + From 8e8883f12811ec3c750f67f4035d539a03dd488b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:14:06 +0100 Subject: [PATCH 24/40] sys-apps/iucode_tool: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- sys-apps/iucode_tool/Manifest | 4 ---- sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild | 15 --------------- sys-apps/iucode_tool/iucode_tool-2.2.ebuild | 15 --------------- ...l-2.1.1.ebuild => iucode_tool-2.3.1-r1.ebuild} | 4 ++-- sys-apps/iucode_tool/iucode_tool-2.3.1.ebuild | 15 --------------- sys-apps/iucode_tool/iucode_tool-2.3.ebuild | 15 --------------- sys-apps/iucode_tool/metadata.xml | 2 +- 7 files changed, 3 insertions(+), 67 deletions(-) delete mode 100644 sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild delete mode 100644 sys-apps/iucode_tool/iucode_tool-2.2.ebuild rename sys-apps/iucode_tool/{iucode_tool-2.1.1.ebuild => iucode_tool-2.3.1-r1.ebuild} (88%) delete mode 100644 sys-apps/iucode_tool/iucode_tool-2.3.1.ebuild delete mode 100644 sys-apps/iucode_tool/iucode_tool-2.3.ebuild diff --git a/sys-apps/iucode_tool/Manifest b/sys-apps/iucode_tool/Manifest index 5b55db13dc..4ce842e55d 100644 --- a/sys-apps/iucode_tool/Manifest +++ b/sys-apps/iucode_tool/Manifest @@ -1,5 +1 @@ -DIST iucode-tool_2.1.1.tar.xz 143204 BLAKE2B a7f24e76a30d0325c73cc6f6835dc20330e64f409dead85dfe42d676298ebc87b90b21749423a6f90864a5482bb77f0467c229f1c7022513a55fe1ad78676ce5 SHA512 07ebf1919a997e7270d9c53f0287f53975253eb53e678f30bfc55acefc6fba7a51c6a4edbdcdbba88a7643ecbcba6acd0c93847d6d1648659789af37c9c59cd7 -DIST iucode-tool_2.1.2.tar.xz 143352 BLAKE2B 4556403d1a25b1230e8a83532aa33a1d808578a542bc864b814d271b97781cc402684509a72caf165daa99c4964104636fb5f2f68f49dcb1c8d44208f2f8da03 SHA512 f1af71843160500fb9c0b56bffdb1d3db09acf42f6c0a84a5d5311eedfe809f9ac27f89bf1778cab8261d3a540cfe62f3698a45c76be76e7f40179b9c49050e0 -DIST iucode-tool_2.2.tar.xz 149896 BLAKE2B c8289541b5a1550e4eaca2dc347cfd78f04cc723c9e7ca995feb1bd8ef8130db1c595613f66ffa22487fefe20a45e51268d989cc24694e6cc1a07012a564ac68 SHA512 edb5969c1e00480e537cddc49d7cbb190ce70e6f0c44d9c40a481038bfa048fade1b454a7f4eef3048cc204ee303758fe76222f9c9fb9b407ed463ee0ccdd429 DIST iucode-tool_2.3.1.tar.xz 153380 BLAKE2B 30dfc28e1dd4e0241cb7cfeb18bba746bb85c341a1627e21a5db4965271c26fcfe33f036c2008207bc9fa6c2f32bf2b857e78c9bf23739817d5c5c487d6010cb SHA512 2c7f72eaf509f9daa482ec5f8eb86a45ac9fa84fa856678fdf9ad056e19532e3734e04656d9dbebbd3a774d69f4c861c1340bbe67b1c6c60d61135705980e7d6 -DIST iucode-tool_2.3.tar.xz 153220 BLAKE2B 4d4fddd1c479172a2bc13c4f45a9be13caf66c5ea396fe7b91df29f5ab12e8d07df0bf5d994c23fe5e9001e585a018549e210ac4669d3bcbde7913adc8aab54d SHA512 8cdbc2970d964c11e9178ef38897f88aaf770b70ad5bd4d91fa6164665b1a4e8be7aa2a4b3d7781e55c298ed9e46be0f278ffc1010feee0bd4745486edfa87fc diff --git a/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild b/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild deleted file mode 100644 index dcfaa908e4..0000000000 --- a/sys-apps/iucode_tool/iucode_tool-2.1.2.ebuild +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections" -HOMEPAGE="https://gitlab.com/iucode-tool/" -SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="" - -S="${WORKDIR}/${PN/_/-}-${PV}" diff --git a/sys-apps/iucode_tool/iucode_tool-2.2.ebuild b/sys-apps/iucode_tool/iucode_tool-2.2.ebuild deleted file mode 100644 index dcfaa908e4..0000000000 --- a/sys-apps/iucode_tool/iucode_tool-2.2.ebuild +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections" -HOMEPAGE="https://gitlab.com/iucode-tool/" -SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="" - -S="${WORKDIR}/${PN/_/-}-${PV}" diff --git a/sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild b/sys-apps/iucode_tool/iucode_tool-2.3.1-r1.ebuild similarity index 88% rename from sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild rename to sys-apps/iucode_tool/iucode_tool-2.3.1-r1.ebuild index b3d85fc2e5..cdaff636c1 100644 --- a/sys-apps/iucode_tool/iucode_tool-2.1.1.ebuild +++ b/sys-apps/iucode_tool/iucode_tool-2.3.1-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI="7" DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections" HOMEPAGE="https://gitlab.com/iucode-tool/" diff --git a/sys-apps/iucode_tool/iucode_tool-2.3.1.ebuild b/sys-apps/iucode_tool/iucode_tool-2.3.1.ebuild deleted file mode 100644 index 7800c285d1..0000000000 --- a/sys-apps/iucode_tool/iucode_tool-2.3.1.ebuild +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections" -HOMEPAGE="https://gitlab.com/iucode-tool/" -SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* amd64 x86" -IUSE="" - -S="${WORKDIR}/${PN/_/-}-${PV}" diff --git a/sys-apps/iucode_tool/iucode_tool-2.3.ebuild b/sys-apps/iucode_tool/iucode_tool-2.3.ebuild deleted file mode 100644 index c7682ec007..0000000000 --- a/sys-apps/iucode_tool/iucode_tool-2.3.ebuild +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="tool to manipulate Intel X86 and X86-64 processor microcode update collections" -HOMEPAGE="https://gitlab.com/iucode-tool/" -SRC_URI="https://gitlab.com/iucode-tool/releases/raw/master/${PN/_/-}_${PV}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="" - -S="${WORKDIR}/${PN/_/-}-${PV}" diff --git a/sys-apps/iucode_tool/metadata.xml b/sys-apps/iucode_tool/metadata.xml index 56c1244130..73dda144f9 100644 --- a/sys-apps/iucode_tool/metadata.xml +++ b/sys-apps/iucode_tool/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org From 14f0b1202500dbba918e158ba64f031fe2c18894 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:14:38 +0100 Subject: [PATCH 25/40] app-crypt/rhash: Sync with gentoo It's from gentoo commit be3ac74c8316881622238f55bc498d5886bef527. --- app-crypt/rhash/Manifest | 2 +- app-crypt/rhash/files/darwin-triplet.patch | 23 +++++ app-crypt/rhash/files/freebsd-triplet.patch | 23 +++++ app-crypt/rhash/files/rhash-1.4.2-clang.patch | 80 ++++++++++++++++ app-crypt/rhash/metadata.xml | 3 +- app-crypt/rhash/rhash-1.3.5.ebuild | 94 ------------------- app-crypt/rhash/rhash-1.3.6-r1.ebuild | 12 +-- app-crypt/rhash/rhash-1.4.2.ebuild | 86 +++++++++++++++++ 8 files changed, 221 insertions(+), 102 deletions(-) create mode 100644 app-crypt/rhash/files/darwin-triplet.patch create mode 100644 app-crypt/rhash/files/freebsd-triplet.patch create mode 100644 app-crypt/rhash/files/rhash-1.4.2-clang.patch delete mode 100644 app-crypt/rhash/rhash-1.3.5.ebuild create mode 100644 app-crypt/rhash/rhash-1.4.2.ebuild diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest index f3404d7c09..29794e046d 100644 --- a/app-crypt/rhash/Manifest +++ b/app-crypt/rhash/Manifest @@ -1,2 +1,2 @@ -DIST rhash-1.3.5-src.tar.gz 316867 BLAKE2B 3ffbf2ec5aef24ef63455e21c3efcae043a321a78be522a26bd25086111430071a496ab3775ff9b4956da7304df8d8e552a061f3306a7a683be5fc65ea3fd1c4 SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 +DIST rhash-1.4.2-src.tar.gz 416853 BLAKE2B 06322825116cb00aa4987b01610d967eb57c94aa29b43348ec2c31f053fd471a900fcee776714263213e9a79eaf389b2e79d7b34a5afd3e98d68198193b5cbe7 SHA512 41df57e8b3f32c93d8e6f2ac668b32aaa23eb2eaf90a83f109e61e511404a5036ea88bcf2854e19c1ade0f61960e0d9edf01f3d82e1c645fed36579e9d7a6a25 diff --git a/app-crypt/rhash/files/darwin-triplet.patch b/app-crypt/rhash/files/darwin-triplet.patch new file mode 100644 index 0000000000..49b7e121d8 --- /dev/null +++ b/app-crypt/rhash/files/darwin-triplet.patch @@ -0,0 +1,23 @@ +From 35a830d1968465e4ecb079273f032b754bac6c66 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 25 Mar 2018 17:40:49 +0100 +Subject: [PATCH] configure: Add target OS clause for Darwin + +These triplets can also have a version number suffix, for example, +x86_64-apple-darwin16. +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 5b6b710..2d8ac42 100755 +--- a/configure ++++ b/configure +@@ -410,6 +410,7 @@ else + amigaos) TARGET_OS=AmigaOS ;; + mingw32*) TARGET_OS=MINGW32 ;; + wine) TARGET_OS=Wine ;; ++ darwin*) TARGET_OS=Darwin ;; + esac + } + TARGET_OS="UNKNOWN" diff --git a/app-crypt/rhash/files/freebsd-triplet.patch b/app-crypt/rhash/files/freebsd-triplet.patch new file mode 100644 index 0000000000..94b615824b --- /dev/null +++ b/app-crypt/rhash/files/freebsd-triplet.patch @@ -0,0 +1,23 @@ +From 14db7f9ee87e05450853ba0e1d8e83cc34aef3e4 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 24 Mar 2018 13:51:56 +0000 +Subject: [PATCH] configure: Match FreeBSD triplets with versions + +Triplets such as x86_64-unknown-freebsd11.1 are common. +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 8ebb929..5b6b710 100755 +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ else + part=$(echo $BUILD_TARGET | cut -d '-' -f $component) + case "$(echo $part | tr '[A-Z]' '[a-z]')" in + linux) TARGET_OS=Linux ;; +- freebsd) TARGET_OS=FreeBSD ;; ++ freebsd*) TARGET_OS=FreeBSD ;; + gnu/kfreebsd) TARGET_OS=FreeBSD ;; + netbsd) TARGET_OS=NetBSD ;; + bsd/os) TARGET_OS=BSD/OS ;; diff --git a/app-crypt/rhash/files/rhash-1.4.2-clang.patch b/app-crypt/rhash/files/rhash-1.4.2-clang.patch new file mode 100644 index 0000000000..460e73a6ac --- /dev/null +++ b/app-crypt/rhash/files/rhash-1.4.2-clang.patch @@ -0,0 +1,80 @@ +From 4dc506066cf1727b021e6352535a8bb315c3f8dc Mon Sep 17 00:00:00 2001 +From: Aleksey +Date: Sat, 17 Jul 2021 18:39:41 +0300 +Subject: [PATCH] configure: fix clang detection on macOS + +--- + configure | 58 +++++++++++++++++++++++++++---------------------------- + 1 file changed, 28 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index 59d432b..111270a 100755 +--- a/configure ++++ b/configure +@@ -519,38 +519,36 @@ else + elif run_cmd "$CC --version"; then + cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1) + fi +- if test -n "${cc_name_tmp}"; then +- if echo "$cc_name_tmp" | grep -q "gcc"; then +- cc_name=$cc_name_tmp +- start_check "$CC version" +- cc_vendor=gnu +- cc_version=$($CC -dumpversion 2>&1) +- if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) +- if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_version=$cc_v2 +- fi ++ if echo "$cc_name_tmp" | grep -q "gcc"; then ++ cc_name=$cc_name_tmp ++ start_check "$CC version" ++ cc_vendor=gnu ++ cc_version=$($CC -dumpversion 2>&1) ++ if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) ++ if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_version=$cc_v2 + fi +- case $cc_version in +- 2.96*) +- cc_fail=yes +- ;; +- *) +- _cc_major=$(echo $cc_version | cut -d '.' -f 1) +- _cc_minor=$(echo $cc_version | cut -d '.' -f 2) +- _cc_mini=$(echo $cc_version | cut -d '.' -f 3) +- ;; +- esac +- finish_check "$cc_name $cc_version" +- break +- fi +- if echo "$cc_name_tmp" | grep -q "clang"; then +- start_check "$CC version" +- cc_vendor=clang +- cc_version=$($CC -dumpversion 2>&1) +- finish_check "clang $cc_version" +- break + fi ++ case $cc_version in ++ 2.96*) ++ cc_fail=yes ++ ;; ++ *) ++ _cc_major=$(echo $cc_version | cut -d '.' -f 1) ++ _cc_minor=$(echo $cc_version | cut -d '.' -f 2) ++ _cc_mini=$(echo $cc_version | cut -d '.' -f 3) ++ ;; ++ esac ++ finish_check "$cc_name $cc_version" ++ break ++ elif $CC --version 2>&1 | grep -q "clang"; then ++ start_check "$CC version" ++ cc_vendor=clang ++ cc_version=$($CC -dumpversion 2>&1) ++ finish_check "clang $cc_version" ++ break ++ else + cc_name_tmp=$($CC -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3) + if test "$cc_name_tmp" = "Sun C"; then + start_check "$CC version" diff --git a/app-crypt/rhash/metadata.xml b/app-crypt/rhash/metadata.xml index a6651d883c..95929f11fd 100644 --- a/app-crypt/rhash/metadata.xml +++ b/app-crypt/rhash/metadata.xml @@ -1,5 +1,5 @@ - + chewi@gentoo.org @@ -8,6 +8,7 @@ rhash rhash/RHash + cpe:/a:rhash_project:rhash https://github.com/rhash/RHash/issues diff --git a/app-crypt/rhash/rhash-1.3.5.ebuild b/app-crypt/rhash/rhash-1.3.5.ebuild deleted file mode 100644 index 20186f92ba..0000000000 --- a/app-crypt/rhash/rhash-1.3.5.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs multilib-minimal - -DESCRIPTION="Console utility and library for computing and verifying file hash sums" -HOMEPAGE="http://rhash.anz.ru/" -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" -IUSE="debug nls libressl ssl static-libs" - -RDEPEND=" - ssl? ( - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) -)" - -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -S="${WORKDIR}/RHash-${PV}" - -src_prepare() { - default - - # Install /etc stuff inside the Prefix - sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die - - if use elibc_Darwin ; then - local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)' - local install_name='-install_name $(LIBDIR)/$(SONAME)' - sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \ - -e '/^SOLINK/s/\.so/.dylib/' \ - -e "s:${ver_script}:${install_name}:" \ - librhash/Makefile \ - Makefile || die - fi - - if use elibc_SunOS ; then - # https://sourceware.org/bugzilla/show_bug.cgi?id=12548 - # skip the export.sym for now - sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die - fi - - multilib_copy_sources -} - -multilib_src_compile() { - local ADDCFLAGS=( - $(use debug || echo -DNDEBUG) - $(use nls && echo -DUSE_GETTEXT) - $(use ssl && echo -DOPENSSL_RUNTIME -rdynamic) - ) - - local ADDLDFLAGS=( - $(use ssl && echo -ldl) - ) - - use elibc_Darwin || use elibc_DragonFly || - use elibc_NetBSD || use elibc_OpenBSD || use elibc_SunOS && - ADDLDFLAGS+=( $(use nls && echo -lintl) ) - - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \ - ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \ - PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \ - build-shared $(use static-libs && echo lib-static) -} - -myemake() { - emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \ - LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}" -} - -multilib_src_install() { - myemake -C librhash install-lib-shared install-so-link - multilib_is_native_abi && myemake install-shared - use static-libs && myemake install-lib-static -} - -multilib_src_install_all() { - myemake -C librhash install-headers - use nls && myemake install-gmo - einstalldocs -} - -multilib_src_test() { - cd tests || die - LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed" -} diff --git a/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/app-crypt/rhash/rhash-1.3.6-r1.ebuild index 24efa67054..9dfdd81943 100644 --- a/app-crypt/rhash/rhash-1.3.6-r1.ebuild +++ b/app-crypt/rhash/rhash-1.3.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -6,18 +6,17 @@ EAPI=6 inherit toolchain-funcs multilib-minimal DESCRIPTION="Console utility and library for computing and verifying file hash sums" -HOMEPAGE="http://rhash.anz.ru/" +HOMEPAGE="http://rhash.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x64-solaris ~x86-solaris" -IUSE="debug nls libressl ssl static-libs" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" RDEPEND=" ssl? ( - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + dev-libs/openssl:0=[${MULTILIB_USEDEP}] )" DEPEND="${RDEPEND} @@ -28,6 +27,7 @@ S="${WORKDIR}/RHash-${PV}" PATCHES=( "${FILESDIR}"/unquote-cc.patch "${FILESDIR}"/${P}-no_echon.patch + "${FILESDIR}"/{freebsd,darwin}-triplet.patch ) src_prepare() { diff --git a/app-crypt/rhash/rhash-1.4.2.ebuild b/app-crypt/rhash/rhash-1.4.2.ebuild new file mode 100644 index 0000000000..efcfab85db --- /dev/null +++ b/app-crypt/rhash/rhash-1.4.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Console utility and library for computing and verifying file hash sums" +HOMEPAGE="http://rhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" + +RDEPEND=" + ssl? ( + dev-libs/openssl:0=[${MULTILIB_USEDEP}] +)" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/RHash-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-clang.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then + # we lack posix_memalign + sed -i -e '/if _POSIX_VERSION/s/if .*$/if 0/' \ + librhash/util.h || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + set -- \ + ./configure \ + --target="${CHOST}" \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --sysconfdir="${EPREFIX}"/etc \ + --disable-openssl-runtime \ + --disable-static \ + --enable-lib-shared \ + $(use_enable debug) \ + $(use_enable nls gettext) \ + $(use_enable ssl openssl) \ + $(use_enable static-libs lib-static) + + echo "${@}" + "${@}" || die "configure failed" +} + +# We would add compile-gmo to the build targets but install-gmo always +# recompiles unconditionally. :( +# (note from sam: this might be fixed in >1.4.2? +# https://github.com/rhash/RHash/commit/9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261) + +multilib_src_install() { + # -j1 needed due to race condition. + emake DESTDIR="${D}" -j1 \ + install{,-lib-headers,-pkg-config} \ + $(use nls && echo install-gmo) \ + $(use kernel_Winnt || echo install-lib-so-link) +} + +multilib_src_test() { + emake test +} From da21f93af143957090375196cab97417c86a5e3c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:18:59 +0100 Subject: [PATCH 26/40] virtual/libiconv: Sync with gentoo It's from gentoo commit d30bf2dea1e39ce12a82697b57bd39bad5f9e7dc. --- virtual/libiconv/libiconv-0-r1.ebuild | 8 ++++---- virtual/libiconv/libiconv-0-r2.ebuild | 10 +++++----- virtual/libiconv/libiconv-0.ebuild | 8 ++++---- virtual/libiconv/metadata.xml | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/virtual/libiconv/libiconv-0-r1.ebuild b/virtual/libiconv/libiconv-0-r1.ebuild index 5ce327a7c7..d9df8e3c80 100644 --- a/virtual/libiconv/libiconv-0-r1.ebuild +++ b/virtual/libiconv/libiconv-0-r1.ebuild @@ -1,14 +1,14 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 inherit multilib-build DESCRIPTION="Virtual for the GNU conversion library" + SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="elibc_glibc elibc_musl" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" # - Don't put elibc_glibc? ( sys-libs/glibc ) to avoid circular deps between # that and gcc diff --git a/virtual/libiconv/libiconv-0-r2.ebuild b/virtual/libiconv/libiconv-0-r2.ebuild index 7bc49872a5..d9df8e3c80 100644 --- a/virtual/libiconv/libiconv-0-r2.ebuild +++ b/virtual/libiconv/libiconv-0-r2.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 inherit multilib-build DESCRIPTION="Virtual for the GNU conversion library" + SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="elibc_glibc elibc_musl" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" # - Don't put elibc_glibc? ( sys-libs/glibc ) to avoid circular deps between # that and gcc -RDEPEND="!elibc_glibc? ( !elibc_musl? ( || ( >=dev-libs/libiconv-1.14-r1[${MULTILIB_USEDEP}] >=sys-freebsd/freebsd-lib-10.0[${MULTILIB_USEDEP}] ) ) )" +RDEPEND="!elibc_glibc? ( !elibc_musl? ( >=dev-libs/libiconv-1.14-r1[${MULTILIB_USEDEP}] ) )" diff --git a/virtual/libiconv/libiconv-0.ebuild b/virtual/libiconv/libiconv-0.ebuild index c89c687511..450c203396 100644 --- a/virtual/libiconv/libiconv-0.ebuild +++ b/virtual/libiconv/libiconv-0.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 DESCRIPTION="Virtual for the GNU conversion library" + SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="elibc_glibc elibc_musl" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" # - Don't put elibc_glibc? ( sys-libs/glibc ) to avoid circular deps between # that and gcc diff --git a/virtual/libiconv/metadata.xml b/virtual/libiconv/metadata.xml index 885654671f..a799d64051 100644 --- a/virtual/libiconv/metadata.xml +++ b/virtual/libiconv/metadata.xml @@ -1,8 +1,8 @@ - + - - alt@gentoo.org - Gentoo Alt - + + prefix@gentoo.org + + From 9ae1cb7cffad7e22a03c4731a66c7a550e980702 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:19:39 +0100 Subject: [PATCH 27/40] app-text/docbook-xsl-stylesheets: Sync with gentoo It's from gentoo commit bad0bc11d42710957c6d6786a9db381308e55c4b. --- .../docbook-xsl-stylesheets-1.79.1-r2.ebuild | 25 +++++++++++-------- app-text/docbook-xsl-stylesheets/metadata.xml | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild index 25331a2f2d..1e1416abed 100644 --- a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild +++ b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild @@ -1,9 +1,8 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 - -USE_RUBY="ruby22 ruby23 ruby24 ruby25" +USE_RUBY="ruby25 ruby26 ruby27" inherit ruby-single @@ -17,11 +16,13 @@ SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2" LICENSE="BSD" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="ruby" -RDEPEND=">=app-text/build-docbook-catalog-1.1 - ruby? ( ${RUBY_DEPS} )" +RDEPEND=" + >=app-text/build-docbook-catalog-1.1 + ruby? ( ${RUBY_DEPS} ) +" S="${WORKDIR}/${MY_P}" @@ -42,7 +43,7 @@ src_prepare() { -printf "removed %p\n" -delete || die if ! use ruby; then - rm -rv epub/ || die + rm -rv epub/ || die fi } @@ -83,19 +84,21 @@ src_install() { # we can't use a symlink or it'll look for the library in the # wrong path. dodir /usr/bin - cat - > "${D}"/usr/bin/${cmd} < "${ED%/}"/usr/bin/${cmd} < - + From ccc86950d33c4ac65ef8ca6566492e33a93c8c44 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:20:38 +0100 Subject: [PATCH 28/40] virtual/dev-manager: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- ...anager-0-r1.ebuild => dev-manager-0-r2.ebuild} | 12 ++++++------ virtual/dev-manager/metadata.xml | 15 ++++++--------- 2 files changed, 12 insertions(+), 15 deletions(-) rename virtual/dev-manager/{dev-manager-0-r1.ebuild => dev-manager-0-r2.ebuild} (50%) diff --git a/virtual/dev-manager/dev-manager-0-r1.ebuild b/virtual/dev-manager/dev-manager-0-r2.ebuild similarity index 50% rename from virtual/dev-manager/dev-manager-0-r1.ebuild rename to virtual/dev-manager/dev-manager-0-r2.ebuild index 71123a4854..4347b4ffb6 100644 --- a/virtual/dev-manager/dev-manager-0-r1.ebuild +++ b/virtual/dev-manager/dev-manager-0-r2.ebuild @@ -1,16 +1,16 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 DESCRIPTION="Virtual for the device filesystem manager" + SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -RDEPEND="|| ( +RDEPEND=" + || ( virtual/udev sys-apps/busybox[mdev] - sys-fs/devfsd sys-fs/static-dev - sys-freebsd/freebsd-sbin )" diff --git a/virtual/dev-manager/metadata.xml b/virtual/dev-manager/metadata.xml index 7c9f490ca9..de9d784241 100644 --- a/virtual/dev-manager/metadata.xml +++ b/virtual/dev-manager/metadata.xml @@ -1,12 +1,9 @@ - + - - base-system@gentoo.org - Gentoo Base System - - - bsd@gentoo.org - BSD Project - + + base-system@gentoo.org + Gentoo Base System + + From fec41ce1e7756544a6253a8d8cc8cd3e7da4aa2a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:22:00 +0100 Subject: [PATCH 29/40] eclass/ruby-utils: Sync with gentoo It's from gentoo commit f6895087a05c4aea59adf2cfdf8294d4e0cf7b37. --- eclass/ruby-utils.eclass | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass index 4406724f38..2506aee255 100644 --- a/eclass/ruby-utils.eclass +++ b/eclass/ruby-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-utils.eclass @@ -6,6 +6,7 @@ # Ruby team # @AUTHOR: # Author: Hans de Graaff +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages # @DESCRIPTION: # The ruby-utils eclass is designed to allow an easier installation of @@ -14,6 +15,10 @@ # This eclass does not set any metadata variables nor export any phase # functions. It can be inherited safely. +case ${EAPI:-0} in + [5678]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac if [[ ! ${_RUBY_UTILS} ]]; then @@ -28,10 +33,10 @@ if [[ ! ${_RUBY_UTILS} ]]; then # provide for a better first installation experience. # All stable RUBY_TARGETS -RUBY_TARGETS_PREFERENCE="ruby24 ruby23 " +RUBY_TARGETS_PREFERENCE="ruby26 " # All other active ruby targets -RUBY_TARGETS_PREFERENCE+="ruby25 ruby26" +RUBY_TARGETS_PREFERENCE+="ruby27 ruby30" _ruby_implementation_depend() { @@ -75,6 +80,14 @@ _ruby_implementation_depend() { rubypn="dev-lang/ruby" rubyslot=":2.6" ;; + ruby27) + rubypn="dev-lang/ruby" + rubyslot=":2.7" + ;; + ruby30) + rubypn="dev-lang/ruby" + rubyslot=":3.0" + ;; ree18) rubypn="dev-lang/ruby-enterprise" rubyslot=":1.8" From 99d21103f17f0fd29a140bf4ef20c9097ba1f4a8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:22:53 +0100 Subject: [PATCH 30/40] eclass: Drop unused eclasses --- eclass/autotools-multilib.eclass | 91 --- eclass/bazel.eclass | 220 -------- eclass/darcs.eclass | 209 ------- eclass/elisp.eclass | 219 -------- eclass/fortran-2.eclass | 288 ---------- eclass/ghc-package.eclass | 354 ------------ eclass/git-2.eclass | 608 -------------------- eclass/gkrellm-plugin.eclass | 100 ---- eclass/gnustep-2.eclass | 27 - eclass/gnustep-base.eclass | 269 --------- eclass/haskell-cabal.eclass | 745 ------------------------- eclass/java-vm-2.eclass | 320 ----------- eclass/latex-package.eclass | 253 --------- eclass/libretro-core.eclass | 196 ------- eclass/netsurf.eclass | 178 ------ eclass/out-of-source.eclass | 125 ----- eclass/postgres.eclass | 185 ------- eclass/qt5-build.eclass | 920 ------------------------------- eclass/readme.gentoo.eclass | 140 ----- eclass/ruby-fakegem.eclass | 537 ------------------ eclass/ruby-ng-gnome2.eclass | 101 ---- eclass/ruby-ng.eclass | 756 ------------------------- eclass/scons-utils.eclass | 345 ------------ eclass/tests/scons-utils.sh | 62 --- eclass/twisted-r1.eclass | 237 -------- eclass/xorg-2.eclass | 575 ------------------- 26 files changed, 8060 deletions(-) delete mode 100644 eclass/autotools-multilib.eclass delete mode 100644 eclass/bazel.eclass delete mode 100644 eclass/darcs.eclass delete mode 100644 eclass/elisp.eclass delete mode 100644 eclass/fortran-2.eclass delete mode 100644 eclass/ghc-package.eclass delete mode 100644 eclass/git-2.eclass delete mode 100644 eclass/gkrellm-plugin.eclass delete mode 100644 eclass/gnustep-2.eclass delete mode 100644 eclass/gnustep-base.eclass delete mode 100644 eclass/haskell-cabal.eclass delete mode 100644 eclass/java-vm-2.eclass delete mode 100644 eclass/latex-package.eclass delete mode 100644 eclass/libretro-core.eclass delete mode 100644 eclass/netsurf.eclass delete mode 100644 eclass/out-of-source.eclass delete mode 100644 eclass/postgres.eclass delete mode 100644 eclass/qt5-build.eclass delete mode 100644 eclass/readme.gentoo.eclass delete mode 100644 eclass/ruby-fakegem.eclass delete mode 100644 eclass/ruby-ng-gnome2.eclass delete mode 100644 eclass/ruby-ng.eclass delete mode 100644 eclass/scons-utils.eclass delete mode 100755 eclass/tests/scons-utils.sh delete mode 100644 eclass/twisted-r1.eclass delete mode 100644 eclass/xorg-2.eclass diff --git a/eclass/autotools-multilib.eclass b/eclass/autotools-multilib.eclass deleted file mode 100644 index cce308cbfd..0000000000 --- a/eclass/autotools-multilib.eclass +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: autotools-multilib.eclass -# @MAINTAINER: -# gx86-multilib team -# @AUTHOR: -# Author: Michał Górny -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: autotools-utils wrapper for multilib builds -# @DESCRIPTION: -# The autotools-multilib.eclass provides a glue between -# autotools-utils.eclass(5) and multilib-minimal.eclass(5), aiming -# to provide a convenient way to build packages using autotools -# for multiple ABIs. -# -# Inheriting this eclass sets IUSE and exports default multilib_src_*() -# sub-phases that call autotools-utils phase functions for each ABI -# enabled. The multilib_src_*() functions can be defined in ebuild just -# like in multilib-minimal. - -# EAPI=4 is required for meaningful MULTILIB_USEDEP. -case ${EAPI:-0} in - 6) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; - 4|5) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -inherit autotools-utils eutils multilib-build multilib-minimal - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install - -# Note: _at_args[@] passing is a backwards compatibility measure. -# Don't use it in new packages. - -autotools-multilib_src_prepare() { - autotools-utils_src_prepare "${@}" - - [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && multilib_copy_sources -} - -multilib_src_configure() { - [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && local ECONF_SOURCE=${BUILD_DIR} - autotools-utils_src_configure "${_at_args[@]}" -} - -autotools-multilib_src_configure() { - local _at_args=( "${@}" ) - - multilib-minimal_src_configure -} - -multilib_src_compile() { - emake "${_at_args[@]}" -} - -autotools-multilib_src_compile() { - local _at_args=( "${@}" ) - - multilib-minimal_src_compile -} - -multilib_src_test() { - autotools-utils_src_test "${_at_args[@]}" -} - -autotools-multilib_src_test() { - local _at_args=( "${@}" ) - - multilib-minimal_src_test -} - -multilib_src_install() { - emake DESTDIR="${D}" "${_at_args[@]}" install -} - -multilib_src_install_all() { - einstalldocs - - # Remove libtool files and unnecessary static libs - local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES} - if [[ ${prune_ltfiles} != none ]]; then - prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}} - fi -} - -autotools-multilib_src_install() { - local _at_args=( "${@}" ) - - multilib-minimal_src_install -} diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass deleted file mode 100644 index ce80ea185e..0000000000 --- a/eclass/bazel.eclass +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 1999-2018 Jason Zaman -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: bazel.eclass -# @MAINTAINER: -# Jason Zaman -# @AUTHOR: -# Jason Zaman -# @BLURB: Utility functions for packages using Bazel Build -# @DESCRIPTION: -# A utility eclass providing functions to run the Bazel Build system. -# -# This eclass does not export any phase functions. - -case "${EAPI:-0}" in - 0|1|2|3|4|5|6) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 7) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -if [[ ! ${_BAZEL_ECLASS} ]]; then - -inherit multiprocessing toolchain-funcs - -BDEPEND=">=dev-util/bazel-0.20" - -# @FUNCTION: bazel_get_flags -# @DESCRIPTION: -# Obtain and print the bazel flags for target and host *FLAGS. -# -# To add more flags to this, append the flags to the -# appropriate variable before calling this function -bazel_get_flags() { - local i fs=() - for i in ${CFLAGS}; do - fs+=( "--conlyopt=${i}" ) - done - for i in ${BUILD_CFLAGS}; do - fs+=( "--host_conlyopt=${i}" ) - done - for i in ${CXXFLAGS}; do - fs+=( "--cxxopt=${i}" ) - done - for i in ${BUILD_CXXFLAGS}; do - fs+=( "--host_cxxopt=${i}" ) - done - for i in ${CPPFLAGS}; do - fs+=( "--conlyopt=${i}" "--cxxopt=${i}" ) - done - for i in ${BUILD_CPPFLAGS}; do - fs+=( "--host_conlyopt=${i}" "--host_cxxopt=${i}" ) - done - for i in ${LDFLAGS}; do - fs+=( "--linkopt=${i}" ) - done - for i in ${BUILD_LDFLAGS}; do - fs+=( "--host_linkopt=${i}" ) - done - echo "${fs[*]}" -} - -# @FUNCTION: bazel_setup_bazelrc -# @DESCRIPTION: -# Creates the bazelrc with common options that will be passed -# to bazel. This will be called by ebazel automatically so -# does not need to be called from the ebuild. -bazel_setup_bazelrc() { - if [[ -f "${T}/bazelrc" ]]; then - return - fi - - # F: fopen_wr - # P: /proc/self/setgroups - # Even with standalone enabled, the Bazel sandbox binary is run for feature test: - # https://github.com/bazelbuild/bazel/blob/7b091c1397a82258e26ab5336df6c8dae1d97384/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L61 - # https://github.com/bazelbuild/bazel/blob/76555482873ffcf1d32fb40106f89231b37f850a/src/main/tools/linux-sandbox-pid1.cc#L113 - addpredict /proc - - mkdir -p "${T}/bazel-cache" || die - mkdir -p "${T}/bazel-distdir" || die - - cat > "${T}/bazelrc" <<-EOF || die - startup --batch - - # dont strip HOME, portage sets a temp per-package dir - build --action_env HOME - - # make bazel respect MAKEOPTS - build --jobs=$(makeopts_jobs) - build --compilation_mode=opt --host_compilation_mode=opt - - # FLAGS - build $(bazel_get_flags) - - # Use standalone strategy to deactivate the bazel sandbox, since it - # conflicts with FEATURES=sandbox. - build --spawn_strategy=standalone --genrule_strategy=standalone - test --spawn_strategy=standalone --genrule_strategy=standalone - - build --strip=never - build --verbose_failures --noshow_loading_progress - test --verbose_test_summary --verbose_failures --noshow_loading_progress - - # make bazel only fetch distfiles from the cache - fetch --repository_cache="${T}/bazel-cache/" --distdir="${T}/bazel-distdir/" - build --repository_cache="${T}/bazel-cache/" --distdir="${T}/bazel-distdir/" - - build --define=PREFIX=${EPREFIX%/}/usr - build --define=LIBDIR=\$(PREFIX)/$(get_libdir) - EOF - - if tc-is-cross-compiler; then - echo "build --nodistinct_host_configuration" >> "${T}/bazelrc" || die - fi -} - -# @FUNCTION: ebazel -# @USAGE: [...] -# @DESCRIPTION: -# Run bazel with the bazelrc and output_base. -# -# output_base will be specific to $BUILD_DIR (if unset, $S). -# bazel_setup_bazelrc will be called and the created bazelrc -# will be passed to bazel. -# -# Will automatically die if bazel does not exit cleanly. -ebazel() { - bazel_setup_bazelrc - - # Use different build folders for each multibuild variant. - local output_base="${BUILD_DIR:-${S}}" - output_base="${output_base%/}-bazel-base" - mkdir -p "${output_base}" || die - - set -- bazel --bazelrc="${T}/bazelrc" --output_base="${output_base}" ${@} - echo "${*}" >&2 - "${@}" || die "ebazel failed" -} - -# @FUNCTION: bazel_load_distfiles -# @USAGE: ... -# @DESCRIPTION: -# Populate the bazel distdir to fetch from since it cannot use -# the network. Bazel looks in distdir but will only look for the -# original filename, not the possibly renamed one that portage -# downloaded. If the line has -> we to rename it back. This also -# handles use-conditionals that SRC_URI does. -# -# Example: -# @CODE -# bazel_external_uris="http://a/file-2.0.tgz -# python? ( http://b/1.0.tgz -> foo-1.0.tgz )" -# SRC_URI="http://c/${PV}.tgz -# ${bazel_external_uris}" -# -# src_unpack() { -# unpack ${PV}.tgz -# bazel_load_distfiles "${bazel_external_uris}" -# } -# @CODE -bazel_load_distfiles() { - local file="" - local rename=0 - - [[ "${@}" ]] || die "Missing args" - mkdir -p "${T}/bazel-distdir" || die - - for word in ${@} - do - if [[ "${word}" == "->" ]]; then - # next word is a dest filename - rename=1 - elif [[ "${word}" == ")" ]]; then - # close conditional block - continue - elif [[ "${word}" == "(" ]]; then - # open conditional block - continue - elif [[ "${word}" == ?(\!)[A-Za-z0-9]*([A-Za-z0-9+_@-])\? ]]; then - # use-conditional block - # USE-flags can contain [A-Za-z0-9+_@-], and start with alphanum - # https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-200003.1.4 - # ?(\!) matches zero-or-one !'s - # *(...) zero-or-more characters - # ends with a ? - continue - elif [[ ${rename} -eq 1 ]]; then - # Make sure the distfile is used - if [[ "${A}" == *"${word}"* ]]; then - echo "Copying ${file} to bazel distdir as ${word}" - ln -s "${DISTDIR}/${word}" "${T}/bazel-distdir/${file}" || die - fi - rename=0 - file="" - else - # another URL, current one may or may not be a rename - # if there was a previous one, its not renamed so copy it now - if [[ -n "${file}" && "${A}" == *"${file}"* ]]; then - echo "Copying ${file} to bazel distdir" - ln -s "${DISTDIR}/${file}" "${T}/bazel-distdir/${file}" || die - fi - # save the current URL, later we will find out if its a rename or not. - file="${word##*/}" - fi - done - - # handle last file - if [[ -n "${file}" ]]; then - echo "Copying ${file} to bazel distdir" - ln -s "${DISTDIR}/${file}" "${T}/bazel-distdir/${file}" || die - fi -} - -_BAZEL_ECLASS=1 -fi diff --git a/eclass/darcs.eclass b/eclass/darcs.eclass deleted file mode 100644 index 489008a87f..0000000000 --- a/eclass/darcs.eclass +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: darcs.eclass -# @MAINTAINER: -# "Gentoo's Haskell Language team" -# Sergei Trofimovich -# @AUTHOR: -# Original Author: Jeffrey Yasskin -# (tla eclass author) -# Andres Loeh (darcs.eclass author) -# Alexander Vershilov (various contributions) -# @BLURB: This eclass provides functions for fetch and unpack darcs repositories -# @DESCRIPTION: -# This eclass provides the generic darcs fetching functions. -# -# Define the EDARCS_REPOSITORY variable at least. -# The ${S} variable is set to ${WORKDIR}/${P}. - -# TODO: - -# support for tags - -# eshopts_{push,pop} -case "${EAPI:-0}" in - 4|5|6) inherit eutils ;; - 7) inherit estack ;; - *) ;; -esac - -# Don't download anything other than the darcs repository -SRC_URI="" - -# You shouldn't change these settings yourself! The ebuild/eclass inheriting -# this eclass will take care of that. - -# --- begin ebuild-configurable settings - -# darcs command to run -# @ECLASS-VARIABLE: EDARCS_DARCS_CMD -# @DESCRIPTION: -# Path to darcs binary. -: ${EDARCS_DARCS_CMD:=darcs} - -# darcs commands with command-specific options - -# @ECLASS-VARIABLE: EDARCS_GET_CMD -# @DESCRIPTION: -# First fetch darcs command. -: ${EDARCS_GET_CMD:=get --lazy} - -# @ECLASS-VARIABLE: EDARCS_UPDATE_CMD -# @DESCRIPTION: -# Repo update darcs command. -: ${EDARCS_UPDATE_CMD:=pull} - -# @ECLASS-VARIABLE: EDARCS_OPTIONS -# @DESCRIPTION: -# Options to pass to both the "get" and "update" commands -: ${EDARCS_OPTIONS:=--set-scripts-executable} - -# @ECLASS-VARIABLE: EDARCS_TOP_DIR -# @DESCRIPTION: -# Where the darcs repositories are stored/accessed -: ${EDARCS_TOP_DIR:=${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/darcs-src} - -# @ECLASS-VARIABLE: EDARCS_REPOSITORY -# @DESCRIPTION: -# The URI to the repository. -: ${EDARCS_REPOSITORY:=} - -# @ECLASS-VARIABLE: EDARCS_OFFLINE -# @DESCRIPTION: -# Set this variable to a non-empty value to disable the automatic updating of -# a darcs repository. This is intended to be set outside the darcs source -# tree by users. Defaults to EVCS_OFFLINE value. -: ${EDARCS_OFFLINE:=${EVCS_OFFLINE}} - -# @ECLASS-VARIABLE: EDARCS_CLEAN -# @DESCRIPTION: -# Set this to something to get a clean copy when updating -# (removes the working directory, then uses EDARCS_GET_CMD to -# re-download it.) -: ${EDARCS_CLEAN:=} - -# --- end ebuild-configurable settings --- - -DEPEND="dev-vcs/darcs - net-misc/rsync" - -# @FUNCTION: darcs_patchcount -# @DESCRIPTION: -# Internal function to determine amount of patches in repository. -darcs_patchcount() { - set -- $(HOME="${EDARCS_TOP_DIR}" ${EDARCS_DARCS_CMD} show repo --repodir="${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" | grep "Num Patches") - # handle string like: " Num Patches: 3860" - echo ${3} -} - -# @FUNCTION: darcs_fetch -# @DESCRIPTION: -# Internal function is called from darcs_src_unpack -darcs_fetch() { - # The local directory to store the repository (useful to ensure a - # unique local name); relative to EDARCS_TOP_DIR - [[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \ - && EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \ - && EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/} - - debug-print-function ${FUNCNAME} $* - - if [[ -n ${EDARCS_CLEAN} ]]; then - addwrite "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" - rm -rf "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" - fi - - # create the top dir if needed - if [[ ! -d ${EDARCS_TOP_DIR} ]]; then - # note that the addwrite statements in this block are only there to allow creating EDARCS_TOP_DIR; - # we've already allowed writing inside it - # this is because it's simpler than trying to find out the parent path of the directory, which - # would need to be the real path and not a symlink for things to work (so we can't just remove - # the last path element in the string) - debug-print "${FUNCNAME}: checkout mode. creating darcs directory" - addwrite /foobar - addwrite / - mkdir -p "${EDARCS_TOP_DIR}" - export SANDBOX_WRITE="${SANDBOX_WRITE//:\/foobar:\/}" - fi - - # in case EDARCS_DARCS_DIR is a symlink to a dir, get the real - # dir's path, otherwise addwrite() doesn't work. - pushd . || die - cd -P "${EDARCS_TOP_DIR}" > /dev/null - EDARCS_TOP_DIR="`/bin/pwd`" - - # disable the sandbox for this dir - addwrite "${EDARCS_TOP_DIR}" - - # determine checkout or update mode and change to the right directory. - if [[ ! -d "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}/_darcs" ]]; then - mode=get - cd "${EDARCS_TOP_DIR}" - else - mode=update - cd "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}" - fi - - # commands to run - local cmdget="${EDARCS_DARCS_CMD} ${EDARCS_GET_CMD} ${EDARCS_OPTIONS} --repo-name=${EDARCS_LOCALREPO} ${EDARCS_REPOSITORY}" - local cmdupdate="${EDARCS_DARCS_CMD} ${EDARCS_UPDATE_CMD} --all ${EDARCS_OPTIONS} ${EDARCS_REPOSITORY}" - - if [[ ${mode} == "get" ]]; then - einfo "Running ${cmdget}" - HOME="${EDARCS_TOP_DIR}" ${cmdget} || die "darcs get command failed" - elif [[ -n ${EDARCS_OFFLINE} ]] ; then - einfo "Offline update" - elif [[ ${mode} == "update" ]]; then - einfo "Running ${cmdupdate}" - HOME="${EDARCS_TOP_DIR}" ${cmdupdate} || die "darcs update command failed" - fi - - export EDARCS_PATCHCOUNT=$(darcs_patchcount) - einfo " patches in repo: ${EDARCS_PATCHCOUNT}" - - popd || die -} - -# @FUNCTION: darcs_src_unpack -# @DESCRIPTION: -# src_upack function -darcs_src_unpack() { - # The local directory to store the repository (useful to ensure a - # unique local name); relative to EDARCS_TOP_DIR - [[ -z ${EDARCS_LOCALREPO} ]] && [[ -n ${EDARCS_REPOSITORY} ]] \ - && EDARCS_LOCALREPO=${EDARCS_REPOSITORY%/} \ - && EDARCS_LOCALREPO=${EDARCS_LOCALREPO##*/} - - debug-print-function ${FUNCNAME} $* - - debug-print "${FUNCNAME}: init: - EDARCS_DARCS_CMD=${EDARCS_DARCS_CMD} - EDARCS_GET_CMD=${EDARCS_GET_CMD} - EDARCS_UPDATE_CMD=${EDARCS_UPDATE_CMD} - EDARCS_OPTIONS=${EDARCS_OPTIONS} - EDARCS_TOP_DIR=${EDARCS_TOP_DIR} - EDARCS_REPOSITORY=${EDARCS_REPOSITORY} - EDARCS_LOCALREPO=${EDARCS_LOCALREPO} - EDARCS_CLEAN=${EDARCS_CLEAN}" - - einfo "Fetching darcs repository ${EDARCS_REPOSITORY} into ${EDARCS_TOP_DIR}..." - darcs_fetch - - einfo "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..." - debug-print "Copying ${EDARCS_LOCALREPO} from ${EDARCS_TOP_DIR}..." - - # probably redundant, but best to make sure - # Use ${WORKDIR}/${P} rather than ${S} so user can point ${S} to something inside. - mkdir -p "${WORKDIR}/${P}" - - eshopts_push -s dotglob # get any dotfiles too. - rsync -rlpgo "${EDARCS_TOP_DIR}/${EDARCS_LOCALREPO}"/* "${WORKDIR}/${P}" - eshopts_pop - - einfo "Darcs repository contents are now in ${WORKDIR}/${P}" - -} - -EXPORT_FUNCTIONS src_unpack diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass deleted file mode 100644 index 55635398d5..0000000000 --- a/eclass/elisp.eclass +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: elisp.eclass -# @MAINTAINER: -# Gentoo GNU Emacs project -# @AUTHOR: -# Matthew Kennedy -# Jeremy Maitin-Shepard -# Christian Faulhammer -# Ulrich Müller -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: Eclass for Emacs Lisp packages -# @DESCRIPTION: -# -# This eclass is designed to install elisp files of Emacs related -# packages into the site-lisp directory. The majority of elisp packages -# will only need to define the standard ebuild variables (like SRC_URI) -# and optionally SITEFILE for successful installation. -# -# Emacs support for other than pure elisp packages is handled by -# elisp-common.eclass where you won't have a dependency on Emacs itself. -# All elisp-* functions are documented there. -# -# If the package's source is a single (in whatever way) compressed elisp -# file with the file name ${P}.el, then this eclass will move ${P}.el to -# ${PN}.el in src_unpack(). - -# @ECLASS-VARIABLE: NEED_EMACS -# @DEFAULT_UNSET -# @DESCRIPTION: -# If you need anything different from Emacs 23, use the NEED_EMACS -# variable before inheriting elisp.eclass. Set it to the major version -# your package uses and the dependency will be adjusted. - -# @ECLASS-VARIABLE: ELISP_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# Space separated list of patches to apply after unpacking the sources. -# Patch files are searched for in the current working dir, WORKDIR, and -# FILESDIR. - -# @ECLASS-VARIABLE: ELISP_REMOVE -# @DEFAULT_UNSET -# @DESCRIPTION: -# Space separated list of files to remove after unpacking the sources. - -# @ECLASS-VARIABLE: SITEFILE -# @DEFAULT_UNSET -# @DESCRIPTION: -# Name of package's site-init file. The filename must match the shell -# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are -# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice -# in most cases. - -# @ECLASS-VARIABLE: ELISP_TEXINFO -# @DEFAULT_UNSET -# @DESCRIPTION: -# Space separated list of Texinfo sources. Respective GNU Info files -# will be generated in src_compile() and installed in src_install(). - -# @ECLASS-VARIABLE: DOCS -# @DEFAULT_UNSET -# @DESCRIPTION: -# DOCS="blah.txt ChangeLog" is automatically used to install the given -# files by dodoc in src_install(). - -inherit elisp-common -case ${EAPI:-0} in - 0|1|2|3|4|5) inherit epatch ;; - 6|7) ;; - *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; -esac - -case ${EAPI:-0} in - 0|1) EXPORT_FUNCTIONS src_{unpack,compile,install} \ - pkg_{setup,postinst,postrm} ;; - *) EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \ - pkg_{setup,postinst,postrm} ;; -esac - -RDEPEND=">=virtual/emacs-${NEED_EMACS:-23}" -case ${EAPI:-0} in - 0|1|2|3|4|5|6) DEPEND="${RDEPEND}" ;; - *) BDEPEND="${RDEPEND}" ;; -esac - -# @FUNCTION: elisp_pkg_setup -# @DESCRIPTION: -# Test if the eselected Emacs version is sufficient to fulfil the major -# version requirement of the NEED_EMACS variable. - -elisp_pkg_setup() { - elisp-need-emacs "${NEED_EMACS:-23}" - case $? in - 0) ;; - 1) die "Emacs version too low" ;; - *) die "Could not determine Emacs version" ;; - esac -} - -# @FUNCTION: elisp_src_unpack -# @DESCRIPTION: -# Unpack the sources; also handle the case of a single *.el file in -# WORKDIR for packages distributed that way. For EAPIs without -# src_prepare, call elisp_src_prepare. - -elisp_src_unpack() { - [[ -n ${A} ]] && unpack ${A} - if [[ -f ${P}.el ]]; then - # the "simple elisp" case with a single *.el file in WORKDIR - mv ${P}.el ${PN}.el || die - [[ -d ${S} ]] || S=${WORKDIR} - fi - - case ${EAPI:-0} in - 0|1) [[ -d ${S} ]] && cd "${S}" - elisp_src_prepare ;; - esac -} - -# @FUNCTION: elisp_src_prepare -# @DESCRIPTION: -# Apply any patches listed in ELISP_PATCHES. Patch files are searched -# for in the current working dir, WORKDIR, and FILESDIR. - -elisp_src_prepare() { - local patch file - for patch in ${ELISP_PATCHES}; do - if [[ -f ${patch} ]]; then - file="${patch}" - elif [[ -f ${WORKDIR}/${patch} ]]; then - file="${WORKDIR}/${patch}" - elif [[ -f ${FILESDIR}/${patch} ]]; then - file="${FILESDIR}/${patch}" - else - die "Cannot find ${patch}" - fi - case ${EAPI:-0} in - 0|1|2|3|4|5) epatch "${file}" ;; - *) eapply "${file}" ;; - esac - done - - # apply any user patches - case ${EAPI:-0} in - 0|1|2|3|4|5) epatch_user ;; - *) eapply_user ;; - esac - - if [[ -n ${ELISP_REMOVE} ]]; then - rm ${ELISP_REMOVE} || die - fi -} - -# @FUNCTION: elisp_src_configure -# @DESCRIPTION: -# Do nothing, because Emacs packages seldomly bring a full build system. - -elisp_src_configure() { :; } - -# @FUNCTION: elisp_src_compile -# @DESCRIPTION: -# Call elisp-compile to byte-compile all Emacs Lisp (*.el) files. -# If ELISP_TEXINFO lists any Texinfo sources, call makeinfo to generate -# GNU Info files from them. - -elisp_src_compile() { - elisp-compile *.el - if [[ -n ${ELISP_TEXINFO} ]]; then - makeinfo ${ELISP_TEXINFO} || die - fi -} - -# @FUNCTION: elisp_src_install -# @DESCRIPTION: -# Call elisp-install to install all Emacs Lisp (*.el and *.elc) files. -# If the SITEFILE variable specifies a site-init file, install it with -# elisp-site-file-install. Also install any GNU Info files listed in -# ELISP_TEXINFO and documentation listed in the DOCS variable. - -elisp_src_install() { - elisp-install ${PN} *.el *.elc - if [[ -n ${SITEFILE} ]]; then - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi - if [[ -n ${ELISP_TEXINFO} ]]; then - set -- ${ELISP_TEXINFO} - set -- ${@##*/} - doinfo ${@/%.*/.info*} || die - fi - if [[ -n ${DOCS} ]]; then - dodoc ${DOCS} || die - fi - if declare -f readme.gentoo_create_doc >/dev/null; then - readme.gentoo_create_doc - fi -} - -# @FUNCTION: elisp_pkg_postinst -# @DESCRIPTION: -# Call elisp-site-regen, in order to collect the site initialisation for -# all installed Emacs Lisp packages in the site-gentoo.el file. - -elisp_pkg_postinst() { - elisp-site-regen - if declare -f readme.gentoo_print_elog >/dev/null; then - readme.gentoo_print_elog - fi -} - -# @FUNCTION: elisp_pkg_postrm -# @DESCRIPTION: -# Call elisp-site-regen, in order to collect the site initialisation for -# all installed Emacs Lisp packages in the site-gentoo.el file. - -elisp_pkg_postrm() { - elisp-site-regen -} diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass deleted file mode 100644 index b871d16e3e..0000000000 --- a/eclass/fortran-2.eclass +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: fortran-2.eclass -# @MAINTAINER: -# jlec@gentoo.org -# sci@gentoo.org -# @AUTHOR: -# Author Justin Lecher -# Test functions provided by Sebastien Fabbro and Kacper Kowalik -# @SUPPORTED_EAPIS: 4 5 6 7 -# @BLURB: Simplify fortran compiler management -# @DESCRIPTION: -# If you need a fortran compiler, then you should be inheriting this eclass. -# In case you only need optional support, please export FORTRAN_NEEDED before -# inheriting the eclass. -# -# The eclass tests for working fortran compilers -# and exports the variables FC and F77. -# Optionally, it checks for extended capabilities based on -# the variable options selected in the ebuild -# The only phase function exported is fortran-2_pkg_setup. -# @EXAMPLE: -# FORTRAN_NEEDED="lapack fortran" -# -# inherit fortran-2 -# -# FORTRAN_NEED_OPENMP=1 - -inherit toolchain-funcs -case ${EAPI:-0} in - # not used in the eclass, but left for backward compatibility with legacy users - 4|5|6) inherit eutils ;; - 7) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -EXPORT_FUNCTIONS pkg_setup - -if [[ ! ${_FORTRAN_2_CLASS} ]]; then - -# @ECLASS-VARIABLE: FORTRAN_NEED_OPENMP -# @DESCRIPTION: -# Set to "1" in order to automatically have the eclass abort if the fortran -# compiler lacks openmp support. -: ${FORTRAN_NEED_OPENMP:=0} - -# @ECLASS-VARIABLE: FORTRAN_STANDARD -# @DESCRIPTION: -# Set this, if a special dialect needs to be supported. -# Generally not needed as default is sufficient. -# -# Valid settings are any combination of: 77 90 95 2003 -: ${FORTRAN_STANDARD:=77} - -# @ECLASS-VARIABLE: FORTRAN_NEEDED -# @DESCRIPTION: -# If your package has an optional fortran support, set this variable -# to the space separated list of USE triggering the fortran -# dependency. -# -# e.g. FORTRAN_NEEDED=lapack would result in -# -# DEPEND="lapack? ( virtual/fortran )" -# -# If unset, we always depend on virtual/fortran. -: ${FORTRAN_NEEDED:=always} - -for _f_use in ${FORTRAN_NEEDED}; do - case ${_f_use} in - always) - DEPEND+=" virtual/fortran" - RDEPEND+=" virtual/fortran" - break - ;; - no) - break - ;; - test) - DEPEND+=" ${_f_use}? ( virtual/fortran )" - ;; - *) - DEPEND+=" ${_f_use}? ( virtual/fortran )" - RDEPEND+=" ${_f_use}? ( virtual/fortran )" - ;; - esac -done -unset _f_use - -# @FUNCTION: fortran_int64_abi_fflags -# @DESCRIPTION: -# Return the Fortran compiler flag to enable 64 bit integers for -# array indices -# @CODE -fortran_int64_abi_fflags() { - debug-print-function ${FUNCNAME} "${@}" - - local _FC=$(tc-getFC) - if [[ ${_FC} == *gfortran* ]]; then - echo "-fdefault-integer-8" - elif [[ ${_FC} == ifort ]]; then - echo "-integer-size 64" - else - die "Compiler flag for 64bit interger for ${_FC} unknown" - fi -} - -# @FUNCTION: _fortran_write_testsuite -# @INTERNAL -# @DESCRIPTION: -# writes fortran test code -_fortran_write_testsuite() { - debug-print-function ${FUNCNAME} "${@}" - - local filebase=${T}/test-fortran - - # f77 code - cat <<- EOF > "${filebase}.f" || die - end - EOF - - # f90/95 code - cat <<- EOF > "${filebase}.f90" || die - end - EOF - - # f2003 code - cat <<- EOF > "${filebase}.f03" || die - procedure(), pointer :: p - end - EOF -} - -# @FUNCTION: _fortran_compile_test -# @USAGE: [dialect] -# @INTERNAL -# @DESCRIPTION: -# Takes fortran compiler as first argument and dialect as second. -# Checks whether the passed fortran compiler speaks the fortran dialect -_fortran_compile_test() { - debug-print-function ${FUNCNAME} "${@}" - - local filebase=${T}/test-fortran - local fcomp=${1} - local fdia=${2} - local fcode=${filebase}.f${fdia} - local ret - - [[ $# -lt 1 ]] && \ - die "_fortran_compile_test() needs at least one argument" - - [[ -f ${fcode} ]] || _fortran_write_testsuite - - ${fcomp} "${fcode}" -o "${fcode}.x" \ - >> "${T}"/_fortran_compile_test.log 2>&1 - ret=$? - - rm -f "${fcode}.x" - return ${ret} -} - -# @FUNCTION: _fortran-has-openmp -# @RETURN: return code of the compiler -# @INTERNAL -# @DESCRIPTION: -# See if the fortran supports OpenMP. -_fortran-has-openmp() { - debug-print-function ${FUNCNAME} "${@}" - - local flag - local filebase=${T}/test-fc-openmp - local fcode=${filebase}.f - local ret - local _fc=$(tc-getFC) - - cat <<- EOF > "${fcode}" || die - call omp_get_num_threads - end - EOF - - for flag in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do - ${_fc} ${flag} "${fcode}" -o "${fcode}.x" \ - &>> "${T}"/_fortran_compile_test.log - ret=$? - [[ ${ret} == 0 ]] && break - done - - rm -f "${fcode}.x" - return ${ret} -} - -# @FUNCTION: _fortran_die_msg -# @INTERNAL -# @DESCRIPTION: -# Detailed description how to handle fortran support -_fortran_die_msg() { - debug-print-function ${FUNCNAME} "${@}" - - eerror - eerror "Please install currently selected gcc version with USE=fortran." - eerror "If you intend to use a different compiler then gfortran, please" - eerror "set FC variable accordingly and take care that the necessary" - eerror "fortran dialects are supported." - eerror - die "Currently no working fortran compiler is available (see ${T}/_fortran_compile_test.log for information)" -} - -# @FUNCTION: _fortran_test_function -# @INTERNAL -# @DESCRIPTION: -# Internal test function for working fortran compiler. -# It is called in fortran-2_pkg_setup. -_fortran_test_function() { - debug-print-function ${FUNCNAME} "${@}" - - local dialect - - : ${F77:=$(tc-getFC)} - - : ${FORTRAN_STANDARD:=77} - for dialect in ${FORTRAN_STANDARD}; do - case ${dialect} in - 77) _fortran_compile_test $(tc-getF77) || \ - _fortran_die_msg ;; - 90|95) _fortran_compile_test $(tc-getFC) 90 || \ - _fortran_die_msg ;; - 2003) _fortran_compile_test $(tc-getFC) 03 || \ - _fortran_die_msg ;; - 2008) die "Future" ;; - *) die "${dialect} is not a Fortran dialect." ;; - esac - done - - tc-export F77 FC - einfo "Using following Fortran compiler:" - einfo " F77: ${F77}" - einfo " FC: ${FC}" - - if [[ ${FORTRAN_NEED_OPENMP} == 1 ]]; then - if _fortran-has-openmp; then - einfo "${FC} has OPENMP support" - else - die "Please install current gcc with USE=openmp or set the FC variable to a compiler that supports OpenMP" - fi - fi -} - -# @FUNCTION: _fortran-2_pkg_setup -# @INTERNAL -# @DESCRIPTION: -# _The_ fortran-2_pkg_setup() code -_fortran-2_pkg_setup() { - for _f_use in ${FORTRAN_NEEDED}; do - case ${_f_use} in - always) - _fortran_test_function && break 2 - ;; - no) - einfo "Forcing fortran support off" - break - ;; - *) - if use ${_f_use}; then - _fortran_test_function && break 2 - else - unset FC - unset F77 - fi - ;; - esac - done -} - - -# @FUNCTION: fortran-2_pkg_setup -# @DESCRIPTION: -# Setup functionality, -# checks for a valid fortran compiler and optionally for its openmp support. -fortran-2_pkg_setup() { - debug-print-function ${FUNCNAME} "${@}" - - if [[ ${MERGE_TYPE} != binary ]]; then - _fortran-2_pkg_setup - fi -} - -_FORTRAN_2_ECLASS=1 -fi diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass deleted file mode 100644 index 27fafff5a2..0000000000 --- a/eclass/ghc-package.eclass +++ /dev/null @@ -1,354 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: ghc-package.eclass -# @MAINTAINER: -# "Gentoo's Haskell Language team" -# @AUTHOR: -# Original Author: Andres Loeh -# @BLURB: This eclass helps with the Glasgow Haskell Compiler's package configuration utility. -# @DESCRIPTION: -# Helper eclass to handle ghc installation/upgrade/deinstallation process. - -inherit multiprocessing - -# Maintain version-testing compatibility with ebuilds not using EAPI 7. -case "${EAPI:-0}" in - 4|5|6) inherit eapi7-ver ;; - *) ;; -esac - -# @FUNCTION: ghc-getghc -# @DESCRIPTION: -# returns the name of the ghc executable -ghc-getghc() { - type -P ${HC:-ghc} -} - -# @FUNCTION: ghc-getghcpkg -# @DESCRIPTION: -# Internal function determines returns the name of the ghc-pkg executable -ghc-getghcpkg() { - type -P ${HC_PKG:-ghc-pkg} -} - -# @FUNCTION: ghc-getghcpkgbin -# @DESCRIPTION: -# returns the name of the ghc-pkg binary (ghc-pkg -# itself usually is a shell script, and we have to -# bypass the script under certain circumstances); -# for Cabal, we add an empty global package config file, -# because for some reason the global package file -# must be specified -ghc-getghcpkgbin() { - if ver_test "$(ghc-version)" -ge "7.9.20141222"; then - # ghc-7.10 stopped supporting single-file database - local empty_db="${T}/empty.conf.d" ghc_pkg="$(ghc-libdir)/bin/ghc-pkg" - if [[ ! -d ${empty_db} ]]; then - "${ghc_pkg}" init "${empty_db}" || die "Failed to initialize empty global db" - fi - echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${empty_db}" - - elif ver_test "$(ghc-version)" -ge "7.7.20121101"; then - # the ghc-pkg executable changed name in ghc 6.10, as it no longer needs - # the wrapper script with the static flags - # was moved to bin/ subtree by: - # http://www.haskell.org/pipermail/cvs-ghc/2012-September/076546.html - echo '[]' > "${T}/empty.conf" - echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${T}/empty.conf" - - elif ver_test "$(ghc-version)" -ge "7.5.20120516"; then - echo '[]' > "${T}/empty.conf" - echo "$(ghc-libdir)/ghc-pkg" "--global-package-db=${T}/empty.conf" - - else - echo '[]' > "${T}/empty.conf" - echo "$(ghc-libdir)/ghc-pkg" "--global-conf=${T}/empty.conf" - fi -} - -# @FUNCTION: ghc-version -# @DESCRIPTION: -# returns upstream version of ghc -# as reported by '--numeric-version' -# Examples: "7.10.2", "7.9.20141222" -_GHC_VERSION_CACHE="" -ghc-version() { - if [[ -z "${_GHC_VERSION_CACHE}" ]]; then - _GHC_VERSION_CACHE="$($(ghc-getghc) --numeric-version)" - fi - echo "${_GHC_VERSION_CACHE}" -} - -# @FUNCTION: ghc-pm-version -# @DESCRIPTION: -# returns package manager(PM) version of ghc -# as reported by '$(best_version)' -# Examples: "PM:7.10.2", "PM:7.10.2_rc1", "PM:7.8.4-r4" -_GHC_PM_VERSION_CACHE="" -ghc-pm-version() { - local pm_ghc_p - - if [[ -z "${_GHC_PM_VERSION_CACHE}" ]]; then - pm_ghc_p=$(best_version dev-lang/ghc) - _GHC_PM_VERSION_CACHE="PM:${pm_ghc_p#dev-lang/ghc-}" - fi - echo "${_GHC_PM_VERSION_CACHE}" -} - -# @FUNCTION: ghc-cabal-version -# @DESCRIPTION: -# return version of the Cabal library bundled with ghc -ghc-cabal-version() { - if ver_test "$(ghc-version)" -ge "7.9.20141222"; then - # outputs in format: 'version: 1.18.1.5' - set -- `$(ghc-getghcpkg) --package-db=$(ghc-libdir)/package.conf.d.initial field Cabal version` - echo "$2" - else - local cabal_package=`echo "$(ghc-libdir)"/Cabal-*` - # /path/to/ghc/Cabal-${VER} -> ${VER} - echo "${cabal_package/*Cabal-/}" - fi -} - -# @FUNCTION: ghc-is-dynamic -# @DESCRIPTION: -# checks if ghc is built against dynamic libraries -# binaries linked against GHC library (and using plugin loading) -# have to be linked the same way: -# https://ghc.haskell.org/trac/ghc/ticket/10301 -ghc-is-dynamic() { - $(ghc-getghc) --info | grep "GHC Dynamic" | grep -q "YES" -} - -# @FUNCTION: ghc-supports-shared-libraries -# @DESCRIPTION: -# checks if ghc is built with support for building -# shared libraries (aka '-dynamic' option) -ghc-supports-shared-libraries() { - $(ghc-getghc) --info | grep "RTS ways" | grep -q "dyn" -} - -# @FUNCTION: ghc-supports-threaded-runtime -# @DESCRIPTION: -# checks if ghc is built with support for threaded -# runtime (aka '-threaded' option) -ghc-supports-threaded-runtime() { - $(ghc-getghc) --info | grep "RTS ways" | grep -q "thr" -} - -# @FUNCTION: ghc-supports-smp -# @DESCRIPTION: -# checks if ghc is built with support for multiple cores runtime -ghc-supports-smp() { - $(ghc-getghc) --info | grep "Support SMP" | grep -q "YES" -} - -# @FUNCTION: ghc-supports-interpreter -# @DESCRIPTION: -# checks if ghc has interpreter mode (aka GHCi) -# It usually means that ghc supports for template haskell. -ghc-supports-interpreter() { - $(ghc-getghc) --info | grep "Have interpreter" | grep -q "YES" -} - -# @FUNCTION: ghc-supports-parallel-make -# @DESCRIPTION: -# checks if ghc has support for '--make -j' mode -# The option was introduced in ghc-7.8-rc1. -ghc-supports-parallel-make() { - $(ghc-getghc) --info | grep "Support parallel --make" | grep -q "YES" -} - -# @FUNCTION: ghc-extractportageversion -# @DESCRIPTION: -# extract the version of a portage-installed package -ghc-extractportageversion() { - local pkg - local version - pkg="$(best_version $1)" - version="${pkg#$1-}" - version="${version%-r*}" - version="${version%_pre*}" - echo "${version}" -} - -# @FUNCTION: ghc-libdir -# @DESCRIPTION: -# returns the library directory -_GHC_LIBDIR_CACHE="" -ghc-libdir() { - if [[ -z "${_GHC_LIBDIR_CACHE}" ]]; then - _GHC_LIBDIR_CACHE="$($(ghc-getghc) --print-libdir)" - fi - echo "${_GHC_LIBDIR_CACHE}" -} - -# @FUNCTION: ghc-make-args -# @DESCRIPTION: -# Returns default arguments passed along 'ghc --make' -# build mode. Used mainly to enable parallel build mode. -ghc-make-args() { - local ghc_make_args=() - # parallel on all available cores - if ghc-supports-smp && ghc-supports-parallel-make; then - # It should have been just -j$(makeopts_jobs) - # but GHC does not yet have nice defaults: - # https://ghc.haskell.org/trac/ghc/ticket/9221#comment:57 - # SMP is a requirement for parallel GC's gen0 - # 'qb' balancing. - echo "-j$(makeopts_jobs) +RTS -A256M -qb0 -RTS" - ghc_make_args=() - fi - echo "${ghc_make_args[@]}" -} - -# @FUNCTION: ghc-confdir -# @DESCRIPTION: -# returns the (Gentoo) library configuration directory, we -# store here a hint for 'haskell-updater' about packages -# installed for old ghc versions and current ones. -ghc-confdir() { - echo "$(ghc-libdir)/gentoo" -} - -# @FUNCTION: ghc-package-db -# @DESCRIPTION: -# returns the global package database directory -ghc-package-db() { - echo "$(ghc-libdir)/package.conf.d" -} - -# @FUNCTION: ghc-localpkgconfd -# @DESCRIPTION: -# returns the name of the local (package-specific) -# package configuration file -ghc-localpkgconfd() { - echo "${PF}.conf.d" -} - -# @FUNCTION: ghc-package-exists -# @DESCRIPTION: -# tests if a ghc package exists -ghc-package-exists() { - $(ghc-getghcpkg) describe "$1" > /dev/null 2>&1 -} - -# @FUNCTION: check-for-collisions -# @DESCRIPTION: -# makes sure no packages -# have the same version as initial package setup -check-for-collisions() { - local localpkgconf=$1 - local checked_pkg - local initial_pkg_db="$(ghc-libdir)/package.conf.d.initial" - - for checked_pkg in `$(ghc-getghcpkgbin) -f "${localpkgconf}" list --simple-output` - do - # should return empty output - local collided=`$(ghc-getghcpkgbin) -f ${initial_pkg_db} list --simple-output "${checked_pkg}"` - - if [[ -n ${collided} ]]; then - eerror "Cabal package '${checked_pkg}' is shipped with '$(ghc-pm-version)' ('$(ghc-version)')." - eerror "Ebuild author forgot an entry in CABAL_CORE_LIB_GHC_PV='${CABAL_CORE_LIB_GHC_PV}'." - eerror "Found in ${initial_pkg_db}." - die - fi - done -} - -# @FUNCTION: ghc-install-pkg -# @DESCRIPTION: -# moves the local (package-specific) package configuration -# file to its final destination -ghc-install-pkg() { - local localpkgconf="${T}/$(ghc-localpkgconfd)" - local pkg_path pkg pkg_db="${D}/$(ghc-package-db)" hint_db="${D}/$(ghc-confdir)" - - $(ghc-getghcpkgbin) init "${localpkgconf}" || die "Failed to initialize empty local db" - for pkg_config_file in "$@"; do - $(ghc-getghcpkgbin) -f "${localpkgconf}" update - --force \ - < "${pkg_config_file}" || die "failed to register ${pkg}" - done - - check-for-collisions "${localpkgconf}" - - mkdir -p "${pkg_db}" || die - for pkg_path in "${localpkgconf}"/*.conf; do - pkg=$(basename "${pkg_path}") - cp "${pkg_path}" "${pkg_db}/${pkg}" || die - done - - mkdir -p "${hint_db}" || die - for pkg_config_file in "$@"; do - local pkg_name="gentoo-${CATEGORY}-${PF}-"$(basename "${pkg_config_file}") - cp "${pkg_config_file}" "${hint_db}/${pkg_name}" || die - chmod 0644 "${hint_db}/${pkg_name}" || die - done -} - -# @FUNCTION: ghc-recache-db -# @DESCRIPTION: -# updates 'package.cache' binary cacne for registered '*.conf' -# packages -ghc-recache-db() { - einfo "Recaching GHC package DB" - $(ghc-getghcpkg) recache -} - -# @FUNCTION: ghc-register-pkg -# @DESCRIPTION: -# registers all packages in the local (package-specific) -# package configuration file -ghc-register-pkg() { - ghc-recache-db -} - -# @FUNCTION: ghc-reregister -# @DESCRIPTION: -# re-adds all available .conf files to the global -# package conf file, to be used on a ghc reinstallation -ghc-reregister() { - ghc-recache-db -} - -# @FUNCTION: ghc-unregister-pkg -# @DESCRIPTION: -# unregisters a package configuration file -ghc-unregister-pkg() { - ghc-recache-db -} - -# @FUNCTION: ghc-pkgdeps -# @DESCRIPTION: -# exported function: loads a package dependency in a form -# cabal_package version -ghc-pkgdeps() { - echo $($(ghc-getghcpkg) describe "${1}") \ - | sed \ - -e '/depends/,/^.*:/ !d' \ - -e 's/\(.*\)-\(.*\)-\(.*\)/\1 \2/' \ - -e 's/^.*://g' -} - -# @FUNCTION: ghc-package_pkg_postinst -# @DESCRIPTION: -# updates package.cache after package install -ghc-package_pkg_postinst() { - ghc-recache-db -} - -# @FUNCTION: ghc-package_pkg_prerm -# @DESCRIPTION: -# updates package.cache after package deinstall -ghc-package_pkg_prerm() { - ewarn "ghc-package.eclass: 'ghc-package_pkg_prerm()' is a noop" - ewarn "ghc-package.eclass: consider 'haskell-cabal_pkg_postrm()' instead" -} - -# @FUNCTION: ghc-package_pkg_postrm -# @DESCRIPTION: -# updates package.cache after package deinstall -ghc-package_pkg_postrm() { - ghc-recache-db -} diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass deleted file mode 100644 index 5371a612dc..0000000000 --- a/eclass/git-2.eclass +++ /dev/null @@ -1,608 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: git-2.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 -# @BLURB: Eclass for fetching and unpacking git repositories. -# @DESCRIPTION: -# Eclass for easing maintenance of live ebuilds using git as remote repository. -# Eclass support working with git submodules and branching. -# -# This eclass is DEPRECATED. Please use git-r3 instead. - -case ${EAPI:-0} in - 0|1|2|3|4|5) ;; - *) die "${ECLASS}.eclass is banned in EAPI ${EAPI}";; -esac - -# This eclass support all EAPIs. -EXPORT_FUNCTIONS src_unpack - -DEPEND="dev-vcs/git" - -# @ECLASS-VARIABLE: EGIT_SOURCEDIR -# @DESCRIPTION: -# This variable specifies destination where the cloned -# data are copied to. -# -# EGIT_SOURCEDIR="${S}" - -# @ECLASS-VARIABLE: EGIT_STORE_DIR -# @DESCRIPTION: -# Storage directory for git sources. -# -# EGIT_STORE_DIR="${DISTDIR}/egit-src" - -# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable enables support for git submodules in our -# checkout. Also this makes the checkout to be non-bare for now. - -# @ECLASS-VARIABLE: EGIT_OPTIONS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Variable specifying additional options for fetch command. - -# @ECLASS-VARIABLE: EGIT_MASTER -# @DESCRIPTION: -# Variable for specifying master branch. -# Useful when upstream don't have master branch or name it differently. -# -# EGIT_MASTER="master" - -# @ECLASS-VARIABLE: EGIT_PROJECT -# @DESCRIPTION: -# Variable specifying name for the folder where we check out the git -# repository. Value of this variable should be unique in the -# EGIT_STORE_DIR as otherwise you would override another repository. -# -# EGIT_PROJECT="${EGIT_REPO_URI##*/}" - -# @ECLASS-VARIABLE: EGIT_DIR -# @DESCRIPTION: -# Directory where we want to store the git data. -# This variable should not be overridden. -# -# EGIT_DIR="${EGIT_STORE_DIR}/${EGIT_PROJECT}" - -# @ECLASS-VARIABLE: EGIT_REPO_URI -# @REQUIRED -# @DEFAULT_UNSET -# @DESCRIPTION: -# URI for the repository -# e.g. http://foo, git://bar -# -# It can be overridden via env using packagename_LIVE_REPO -# variable. -# -# Support multiple values: -# EGIT_REPO_URI="git://a/b.git http://c/d.git" - -# @ECLASS-VARIABLE: EVCS_OFFLINE -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable prevents performance of any online -# operations. - -# @ECLASS-VARIABLE: EGIT_BRANCH -# @DESCRIPTION: -# Variable containing branch name we want to check out. -# It can be overridden via env using packagename_LIVE_BRANCH -# variable. -# -# EGIT_BRANCH="${EGIT_MASTER}" - -# @ECLASS-VARIABLE: EGIT_COMMIT -# @DESCRIPTION: -# Variable containing commit hash/tag we want to check out. -# It can be overridden via env using packagename_LIVE_COMMIT -# variable. -# -# EGIT_COMMIT="${EGIT_BRANCH}" - -# @ECLASS-VARIABLE: EGIT_REPACK -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable specifies that repository will be repacked to -# save space. However this can take a REALLY LONG time with VERY big -# repositories. - -# @ECLASS-VARIABLE: EGIT_PRUNE -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable enables pruning all loose objects on each fetch. -# This is useful if upstream rewinds and rebases branches often. - -# @ECLASS-VARIABLE: EGIT_NONBARE -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable specifies that all checkouts will be done using -# non bare repositories. This is useful if you can't operate with bare -# checkouts for some reason. - -# @ECLASS-VARIABLE: EGIT_NOUNPACK -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable bans unpacking of ${A} content into the srcdir. -# Default behavior is to unpack ${A} content. - -# @FUNCTION: git-2_init_variables -# @INTERNAL -# @DESCRIPTION: -# Internal function initializing all git variables. -# We define it in function scope so user can define -# all the variables before and after inherit. -git-2_init_variables() { - debug-print-function ${FUNCNAME} "$@" - - local esc_pn liverepo livebranch livecommit - esc_pn=${PN//[-+]/_} - - : ${EGIT_SOURCEDIR="${S}"} - - : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"} - - : ${EGIT_HAS_SUBMODULES:=} - - : ${EGIT_OPTIONS:=} - - : ${EGIT_MASTER:=master} - - liverepo=${esc_pn}_LIVE_REPO - EGIT_REPO_URI=${!liverepo:-${EGIT_REPO_URI}} - [[ ${EGIT_REPO_URI} ]] || die "EGIT_REPO_URI must have some value" - - : ${EVCS_OFFLINE:=} - - livebranch=${esc_pn}_LIVE_BRANCH - [[ ${!livebranch} ]] && ewarn "QA: using \"${esc_pn}_LIVE_BRANCH\" variable, you won't get any support" - EGIT_BRANCH=${!livebranch:-${EGIT_BRANCH:-${EGIT_MASTER}}} - - livecommit=${esc_pn}_LIVE_COMMIT - [[ ${!livecommit} ]] && ewarn "QA: using \"${esc_pn}_LIVE_COMMIT\" variable, you won't get any support" - EGIT_COMMIT=${!livecommit:-${EGIT_COMMIT:-${EGIT_BRANCH}}} - - : ${EGIT_REPACK:=} - - : ${EGIT_PRUNE:=} -} - -# @FUNCTION: git-2_submodules -# @INTERNAL -# @DESCRIPTION: -# Internal function wrapping the submodule initialisation and update. -git-2_submodules() { - debug-print-function ${FUNCNAME} "$@" - if [[ ${EGIT_HAS_SUBMODULES} ]]; then - if [[ ${EVCS_OFFLINE} ]]; then - # for submodules operations we need to be online - debug-print "${FUNCNAME}: not updating submodules in offline mode" - return 1 - fi - - debug-print "${FUNCNAME}: working in \"${1}\"" - pushd "${EGIT_DIR}" > /dev/null || die - - debug-print "${FUNCNAME}: git submodule init" - git submodule init || die - debug-print "${FUNCNAME}: git submodule sync" - git submodule sync || die - debug-print "${FUNCNAME}: git submodule update" - git submodule update || die - - popd > /dev/null || die - fi -} - -# @FUNCTION: git-2_branch -# @INTERNAL -# @DESCRIPTION: -# Internal function that changes branch for the repo based on EGIT_COMMIT and -# EGIT_BRANCH variables. -git-2_branch() { - debug-print-function ${FUNCNAME} "$@" - - local branchname src - - debug-print "${FUNCNAME}: working in \"${EGIT_SOURCEDIR}\"" - pushd "${EGIT_SOURCEDIR}" > /dev/null || die - - local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH} - if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then - branchname=tree-${EGIT_COMMIT} - src=${EGIT_COMMIT} - fi - debug-print "${FUNCNAME}: git checkout -b ${branchname} ${src}" - git checkout -b ${branchname} ${src} \ - || die "${FUNCNAME}: changing the branch failed" - - popd > /dev/null || die -} - -# @FUNCTION: git-2_gc -# @INTERNAL -# @DESCRIPTION: -# Internal function running garbage collector on checked out tree. -git-2_gc() { - debug-print-function ${FUNCNAME} "$@" - - local args - - if [[ ${EGIT_REPACK} || ${EGIT_PRUNE} ]]; then - pushd "${EGIT_DIR}" > /dev/null || die - ebegin "Garbage collecting the repository" - [[ ${EGIT_PRUNE} ]] && args='--prune' - debug-print "${FUNCNAME}: git gc ${args}" - git gc ${args} - eend $? - popd > /dev/null || die - fi -} - -# @FUNCTION: git-2_prepare_storedir -# @INTERNAL -# @DESCRIPTION: -# Internal function preparing directory where we are going to store SCM -# repository. -git-2_prepare_storedir() { - debug-print-function ${FUNCNAME} "$@" - - local clone_dir - - # initial clone, we have to create master git storage directory and play - # nicely with sandbox - if [[ ! -d ${EGIT_STORE_DIR} ]]; then - debug-print "${FUNCNAME}: Creating git main storage directory" - addwrite / - mkdir -m 775 -p "${EGIT_STORE_DIR}" \ - || die "${FUNCNAME}: can't mkdir \"${EGIT_STORE_DIR}\"" - fi - - # allow writing into EGIT_STORE_DIR - addwrite "${EGIT_STORE_DIR}" - - # calculate git.eclass store dir for data - # We will try to clone the old repository, - # and we will remove it if we don't need it anymore. - EGIT_OLD_CLONE= - if [[ ${EGIT_STORE_DIR} == */egit-src ]]; then - local old_store_dir=${EGIT_STORE_DIR/%egit-src/git-src} - local old_location=${old_store_dir}/${EGIT_PROJECT:-${PN}} - - if [[ -d ${old_location} ]]; then - EGIT_OLD_CLONE=${old_location} - # required to remove the old clone - addwrite "${old_store_dir}" - fi - fi - - # calculate the proper store dir for data - # If user didn't specify the EGIT_DIR, we check if he did specify - # the EGIT_PROJECT or get the folder name from EGIT_REPO_URI. - EGIT_REPO_URI=${EGIT_REPO_URI%/} - if [[ ! ${EGIT_DIR} ]]; then - if [[ ${EGIT_PROJECT} ]]; then - clone_dir=${EGIT_PROJECT} - else - local strippeduri=${EGIT_REPO_URI%/.git} - clone_dir=${strippeduri##*/} - fi - EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir} - - if [[ ${EGIT_OLD_CLONE} && ! -d ${EGIT_DIR} ]]; then - elog "${FUNCNAME}: ${CATEGORY}/${PF} will be cloned from old location." - elog "It will be necessary to rebuild the package to fetch updates." - EGIT_REPO_URI="${EGIT_OLD_CLONE} ${EGIT_REPO_URI}" - fi - fi - export EGIT_DIR=${EGIT_DIR} - debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"." -} - -# @FUNCTION: git-2_move_source -# @INTERNAL -# @DESCRIPTION: -# Internal function moving sources from the EGIT_DIR to EGIT_SOURCEDIR dir. -git-2_move_source() { - debug-print-function ${FUNCNAME} "$@" - - debug-print "${FUNCNAME}: ${MOVE_COMMAND} \"${EGIT_DIR}\" \"${EGIT_SOURCEDIR}\"" - pushd "${EGIT_DIR}" > /dev/null || die - mkdir -p "${EGIT_SOURCEDIR}" \ - || die "${FUNCNAME}: failed to create ${EGIT_SOURCEDIR}" - ${MOVE_COMMAND} "${EGIT_SOURCEDIR}" \ - || die "${FUNCNAME}: sync to \"${EGIT_SOURCEDIR}\" failed" - popd > /dev/null || die -} - -# @FUNCTION: git-2_initial_clone -# @INTERNAL -# @DESCRIPTION: -# Internal function running initial clone on specified repo_uri. -git-2_initial_clone() { - debug-print-function ${FUNCNAME} "$@" - - local repo_uri - - EGIT_REPO_URI_SELECTED="" - for repo_uri in ${EGIT_REPO_URI}; do - debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\"" - if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then - # global variable containing the repo_name we will be using - debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" - EGIT_REPO_URI_SELECTED="${repo_uri}" - break - fi - done - - [[ ${EGIT_REPO_URI_SELECTED} ]] \ - || die "${FUNCNAME}: can't fetch from ${EGIT_REPO_URI}" -} - -# @FUNCTION: git-2_update_repo -# @INTERNAL -# @DESCRIPTION: -# Internal function running update command on specified repo_uri. -git-2_update_repo() { - debug-print-function ${FUNCNAME} "$@" - - local repo_uri - - if [[ ${EGIT_LOCAL_NONBARE} ]]; then - # checkout master branch and drop all other local branches - git checkout ${EGIT_MASTER} || die "${FUNCNAME}: can't checkout master branch ${EGIT_MASTER}" - for x in $(git branch | grep -v "* ${EGIT_MASTER}" | tr '\n' ' '); do - debug-print "${FUNCNAME}: git branch -D ${x}" - git branch -D ${x} > /dev/null - done - fi - - EGIT_REPO_URI_SELECTED="" - for repo_uri in ${EGIT_REPO_URI}; do - # git urls might change, so reset it - git config remote.origin.url "${repo_uri}" - - debug-print "${EGIT_UPDATE_CMD}" - if ${EGIT_UPDATE_CMD} > /dev/null; then - # global variable containing the repo_name we will be using - debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" - EGIT_REPO_URI_SELECTED="${repo_uri}" - break - fi - done - - [[ ${EGIT_REPO_URI_SELECTED} ]] \ - || die "${FUNCNAME}: can't update from ${EGIT_REPO_URI}" -} - -# @FUNCTION: git-2_fetch -# @INTERNAL -# @DESCRIPTION: -# Internal function fetching repository from EGIT_REPO_URI and storing it in -# specified EGIT_STORE_DIR. -git-2_fetch() { - debug-print-function ${FUNCNAME} "$@" - - local oldsha cursha repo_type - - [[ ${EGIT_LOCAL_NONBARE} ]] && repo_type="non-bare repository" || repo_type="bare repository" - - if [[ ! -d ${EGIT_DIR} ]]; then - git-2_initial_clone - pushd "${EGIT_DIR}" > /dev/null || die - cursha=$(git rev-parse ${UPSTREAM_BRANCH}) - echo "GIT NEW clone -->" - echo " repository: ${EGIT_REPO_URI_SELECTED}" - echo " at the commit: ${cursha}" - - popd > /dev/null || die - elif [[ ${EVCS_OFFLINE} ]]; then - pushd "${EGIT_DIR}" > /dev/null || die - cursha=$(git rev-parse ${UPSTREAM_BRANCH}) - echo "GIT offline update -->" - echo " repository: $(git config remote.origin.url)" - echo " at the commit: ${cursha}" - popd > /dev/null || die - else - pushd "${EGIT_DIR}" > /dev/null || die - oldsha=$(git rev-parse ${UPSTREAM_BRANCH}) - git-2_update_repo - cursha=$(git rev-parse ${UPSTREAM_BRANCH}) - - # fetch updates - echo "GIT update -->" - echo " repository: ${EGIT_REPO_URI_SELECTED}" - # write out message based on the revisions - if [[ "${oldsha}" != "${cursha}" ]]; then - echo " updating from commit: ${oldsha}" - echo " to commit: ${cursha}" - else - echo " at the commit: ${cursha}" - fi - - # print nice statistic of what was changed - git --no-pager diff --stat ${oldsha}..${UPSTREAM_BRANCH} - popd > /dev/null || die - fi - # export the version the repository is at - export EGIT_VERSION="${cursha}" - # log the repo state - [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] \ - && echo " commit: ${EGIT_COMMIT}" - echo " branch: ${EGIT_BRANCH}" - echo " storage directory: \"${EGIT_DIR}\"" - echo " checkout type: ${repo_type}" - - # Cleanup after git.eclass - if [[ ${EGIT_OLD_CLONE} ]]; then - einfo "${FUNCNAME}: removing old clone in ${EGIT_OLD_CLONE}." - rm -rf "${EGIT_OLD_CLONE}" - fi -} - -# @FUNCTION: git_bootstrap -# @INTERNAL -# @DESCRIPTION: -# Internal function that runs bootstrap command on unpacked source. -git-2_bootstrap() { - debug-print-function ${FUNCNAME} "$@" - - # @ECLASS-VARIABLE: EGIT_BOOTSTRAP - # @DESCRIPTION: - # Command to be executed after checkout and clone of the specified - # repository. - # enviroment the package will fail if there is no update, thus in - # combination with --keep-going it would lead in not-updating - # pakcages that are up-to-date. - if [[ ${EGIT_BOOTSTRAP} ]]; then - pushd "${EGIT_SOURCEDIR}" > /dev/null || die - einfo "Starting bootstrap" - - if [[ -f ${EGIT_BOOTSTRAP} ]]; then - # we have file in the repo which we should execute - debug-print "${FUNCNAME}: bootstraping with file \"${EGIT_BOOTSTRAP}\"" - - if [[ -x ${EGIT_BOOTSTRAP} ]]; then - eval "./${EGIT_BOOTSTRAP}" \ - || die "${FUNCNAME}: bootstrap script failed" - else - eerror "\"${EGIT_BOOTSTRAP}\" is not executable." - eerror "Report upstream, or bug ebuild maintainer to remove bootstrap command." - die "\"${EGIT_BOOTSTRAP}\" is not executable" - fi - else - # we execute some system command - debug-print "${FUNCNAME}: bootstraping with commands \"${EGIT_BOOTSTRAP}\"" - - eval "${EGIT_BOOTSTRAP}" \ - || die "${FUNCNAME}: bootstrap commands failed" - fi - - einfo "Bootstrap finished" - popd > /dev/null || die - fi -} - -# @FUNCTION: git-2_migrate_repository -# @INTERNAL -# @DESCRIPTION: -# Internal function migrating between bare and normal checkout repository. -# This is based on usage of EGIT_SUBMODULES, at least until they -# start to work with bare checkouts sanely. -# This function also set some global variables that differ between -# bare and non-bare checkout. -git-2_migrate_repository() { - debug-print-function ${FUNCNAME} "$@" - - local bare returnstate - - # first find out if we have submodules - # or user explicitly wants us to use non-bare clones - if ! [[ ${EGIT_HAS_SUBMODULES} || ${EGIT_NONBARE} ]]; then - bare=1 - fi - - # test if we already have some repo and if so find out if we have - # to migrate the data - if [[ -d ${EGIT_DIR} ]]; then - if [[ ${bare} && -d ${EGIT_DIR}/.git ]]; then - debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to bare copy" - - ebegin "Converting \"${EGIT_DIR}\" from non-bare to bare copy" - mv "${EGIT_DIR}/.git" "${EGIT_DIR}.bare" - export GIT_DIR="${EGIT_DIR}.bare" - git config core.bare true > /dev/null - returnstate=$? - unset GIT_DIR - rm -rf "${EGIT_DIR}" - mv "${EGIT_DIR}.bare" "${EGIT_DIR}" - eend ${returnstate} - elif [[ ! ${bare} && ! -d ${EGIT_DIR}/.git ]]; then - debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" to non-bare copy" - - ebegin "Converting \"${EGIT_DIR}\" from bare to non-bare copy" - git clone -l "${EGIT_DIR}" "${EGIT_DIR}.nonbare" > /dev/null - returnstate=$? - rm -rf "${EGIT_DIR}" - mv "${EGIT_DIR}.nonbare" "${EGIT_DIR}" - eend ${returnstate} - fi - fi - if [[ ${returnstate} -ne 0 ]]; then - debug-print "${FUNCNAME}: converting \"${EGIT_DIR}\" failed, removing to start from scratch" - - # migration failed, remove the EGIT_DIR to play it safe - einfo "Migration failed, removing \"${EGIT_DIR}\" to start from scratch." - rm -rf "${EGIT_DIR}" - fi - - # set various options to work with both targets - if [[ ${bare} ]]; then - debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\"" - EGIT_LOCAL_OPTIONS+="${EGIT_OPTIONS} --bare" - MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }" - EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}" - UPSTREAM_BRANCH="${EGIT_BRANCH}" - EGIT_LOCAL_NONBARE= - else - debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\"" - MOVE_COMMAND="cp -pPR ." - EGIT_LOCAL_OPTIONS="${EGIT_OPTIONS}" - EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}" - UPSTREAM_BRANCH="origin/${EGIT_BRANCH}" - EGIT_LOCAL_NONBARE="true" - fi -} - -# @FUNCTION: git-2_cleanup -# @INTERNAL -# @DESCRIPTION: -# Internal function cleaning up all the global variables -# that are not required after the unpack has been done. -git-2_cleanup() { - debug-print-function ${FUNCNAME} "$@" - - # Here we can unset only variables that are GLOBAL - # defined by the eclass, BUT NOT subject to change - # by user (like EGIT_PROJECT). - # If ebuild writer polutes his environment it is - # his problem only. - unset EGIT_DIR - unset MOVE_COMMAND - unset EGIT_LOCAL_OPTIONS - unset EGIT_UPDATE_CMD - unset UPSTREAM_BRANCH - unset EGIT_LOCAL_NONBARE -} - -# @FUNCTION: git-2_src_unpack -# @DESCRIPTION: -# Default git src_unpack function. -git-2_src_unpack() { - debug-print-function ${FUNCNAME} "$@" - - git-2_init_variables - git-2_prepare_storedir - git-2_migrate_repository - git-2_fetch "$@" - git-2_gc - git-2_submodules - git-2_move_source - git-2_branch - git-2_bootstrap - git-2_cleanup - echo ">>> Unpacked to ${EGIT_SOURCEDIR}" - - # Users can specify some SRC_URI and we should - # unpack the files too. - if [[ ! ${EGIT_NOUNPACK} ]]; then - if has ${EAPI:-0} 0 1; then - [[ ${A} ]] && unpack ${A} - else - default_src_unpack - fi - fi -} diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass deleted file mode 100644 index d6eb57ad0e..0000000000 --- a/eclass/gkrellm-plugin.eclass +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: gkrellm-plugin.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @AUTHOR: -# Original author: Jim Ramsay -# EAPI 6 author: David Seifert -# @SUPPORTED_EAPIS: 6 -# @BLURB: Provides src_install used by (almost) all gkrellm plugins -# @DESCRIPTION: -# - Sets up default dependencies -# - Provides a common src_install method to avoid code duplication -# -# Changelog: -# 03 January 2018: David Seifert -# - Port to EAPI 6, remove built_with_use, simplify a lot -# 12 March 2007: Jim Ramsay -# - Added server plugin support -# 09 March 2007: Jim Ramsay -# - Initial commit -# - -# @ECLASS-VARIABLE: PLUGIN_SO -# @DESCRIPTION: -# The name of the plugin's .so file which will be installed in -# the plugin dir. Defaults to "${PN}$(get_modname)". Has to be a bash array. - -# @ECLASS-VARIABLE: PLUGIN_SERVER_SO -# @DESCRIPTION: -# The name of the plugin's server plugin $(get_modname) portion. -# Unset by default. Has to be a bash array. - -# @ECLASS-VARIABLE: PLUGIN_DOCS -# @DESCRIPTION: -# An optional list of docs to be installed, in addition to the default -# DOCS variable which is respected too. Has to be a bash array. - -case ${EAPI:-0} in - [0-5]) - die "${ECLASS} is banned in EAPI ${EAPI:-0}" - ;; - 6) - ;; - *) - die "Unknown EAPI ${EAPI:-0}" - ;; -esac - -inherit multilib - -EXPORT_FUNCTIONS src_install - -if [[ ! ${_GKRELLM_PLUGIN_R1} ]]; then - -DEPEND="virtual/pkgconfig" - -# @FUNCTION: gkrellm-plugin_src_install -# @DESCRIPTION: -# Install the plugins and call einstalldocs -gkrellm-plugin_src_install() { - exeinto /usr/$(get_libdir)/gkrellm2/plugins - - if ! declare -p PLUGIN_SO >/dev/null 2>&1 ; then - doexe ${PN}$(get_modname) - elif declare -p PLUGIN_SO | grep -q "^declare -a " ; then - doexe "${PLUGIN_SO[@]}" - else - die "PLUGIN_SO has to be a bash array!" - fi - - - if [[ -n ${PLUGIN_SERVER_SO} ]]; then - exeinto /usr/$(get_libdir)/gkrellm2/plugins-gkrellmd - - if declare -p PLUGIN_SERVER_SO | grep -q "^declare -a " ; then - doexe "${PLUGIN_SERVER_SO[@]}" - else - die "PLUGIN_SERVER_SO has to be a bash array!" - fi - fi - - einstalldocs - local d - for d in Changelog* ChangeLog*; do - [[ -s "${d}" ]] && dodoc "${d}" - done - - if [[ -n ${PLUGIN_DOCS} ]]; then - if declare -p PLUGIN_DOCS | grep -q "^declare -a " ; then - dodoc "${PLUGIN_DOCS[@]}" - else - die "PLUGIN_DOCS has to be a bash array!" - fi - fi -} - -_GKRELLM_PLUGIN_R1=1 -fi diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass deleted file mode 100644 index b1f9525c1b..0000000000 --- a/eclass/gnustep-2.eclass +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: gnustep-2.eclass -# @MAINTAINER: -# GNUstep Herd -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build -# @DESCRIPTION: -# This eclass sets up GNUstep environment to properly install -# GNUstep packages - -inherit gnustep-base - -DEPEND=">=gnustep-base/gnustep-make-2.0 - virtual/gnustep-back" -RDEPEND="${DEPEND} - debug? ( !=2 only) -# * gnustep-base_src_configure (EAPI>=2 only) -# * gnustep-base_src_compile -# * gnustep-base_src_install -# * gnustep-base_pkg_postinst diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass deleted file mode 100644 index 6cd9f532a5..0000000000 --- a/eclass/gnustep-base.eclass +++ /dev/null @@ -1,269 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: gnustep-base.eclass -# @MAINTAINER: -# GNUstep Herd -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: Internal handling of GNUstep pacakges -# @DESCRIPTION: -# Inner gnustep eclass, should only be inherited directly by gnustep-base -# packages - -inherit eutils flag-o-matic - -# IUSE variables across all GNUstep packages -# "debug": enable code for debugging -# "doc": build and install documentation, if available -IUSE="debug doc" - -# packages needed to build any base gnustep package -GNUSTEP_CORE_DEPEND="doc? ( virtual/texi2dvi dev-tex/latex2html app-text/texi2html )" - -# New layout is used when ${EPREFIX}/usr/share/GNUstep/Makefiles exists -# Where to install GNUstep (with old layout) -GNUSTEP_PREFIX="${EPREFIX}/usr/GNUstep" - -# GNUstep environment array -typeset -a GS_ENV - -# Ebuild function overrides -gnustep-base_pkg_setup() { - if test_version_info 3.3 ; then - strip-unsupported-flags - elif test_version_info 3.4 ; then - # strict-aliasing is known to break obj-c stuff in gcc-3.4* - filter-flags -fstrict-aliasing - fi - - # known to break ObjC (bug 86089) - filter-flags -fomit-frame-pointer -} - -gnustep-base_src_unpack() { - unpack ${A} - cd "${S}" - - gnustep-base_src_prepare -} - -gnustep-base_src_prepare() { - if [[ -f ./GNUmakefile ]] ; then - # Kill stupid includes that are simply overdone or useless on normal - # Gentoo, but (may) cause major headaches on Prefixed Gentoo. If this - # only removes a part of a path it's good that it bails out, as we want - # to know when they use some direct include. - ebegin "Cleaning paths from GNUmakefile" - sed -i \ - -e 's|-I/usr/X11R6/include/\?||g' \ - -e 's|-I/usr/include/\?||g' \ - -e 's|-L/usr/X11R6/lib/\?||g' \ - -e 's|-L/usr/lib/\?||g' \ - GNUmakefile - eend $? - fi - - ! has ${EAPI:-0} 0 1 2 3 4 5 && default -} - -gnustep-base_src_configure() { - egnustep_env - if [[ -x ./configure ]] ; then - econf || die "configure failed" - fi -} - -gnustep-base_src_compile() { - egnustep_env - case ${EAPI:-0} in - 0|1) gnustep-base_src_configure ;; - esac - - egnustep_make -} - -gnustep-base_src_install() { - egnustep_env - egnustep_install - if use doc ; then - egnustep_env - egnustep_doc - fi - egnustep_install_config -} - -gnustep-base_pkg_postinst() { - [[ $(type -t gnustep_config_script) != "function" ]] && return 0 - - local SCRIPT_PATH - if [[ -d ${EPREFIX}/usr/share/GNUstep/Makefiles ]]; then - SCRIPT_PATH="/usr/bin" - else - SCRIPT_PATH=${GNUSTEP_SYSTEM_TOOLS}/Gentoo - fi - elog "To use this package, as *user* you should run:" - elog " ${SCRIPT_PATH}/config-${PN}.sh" -} - -# Clean/reset an ebuild to the installed GNUstep environment -egnustep_env() { - # Get additional variables - GNUSTEP_SH_EXPORT_ALL_VARIABLES="true" - - # Makefiles path - local GS_MAKEFILES - if [[ -d ${EPREFIX}/usr/share/GNUstep/Makefiles ]]; then - GS_MAKEFILES=${EPREFIX}/usr/share/GNUstep/Makefiles - else - GS_MAKEFILES=${GNUSTEP_PREFIX}/System/Library/Makefiles - fi - if [[ -f ${GS_MAKEFILES}/GNUstep.sh ]] ; then - # Reset GNUstep variables - source "${GS_MAKEFILES}"/GNUstep-reset.sh - source "${GS_MAKEFILES}"/GNUstep.sh - - # Create compilation GNUstep.conf if it does not exist yet - if [[ ! -f ${WORKDIR}/GNUstep.conf ]]; then - cp "${EPREFIX}"/etc/GNUstep/GNUstep.conf "${WORKDIR}" \ - || die "GNUstep.conf copy failed" - sed -e "s#\(GNUSTEP_USER_.*DIR.*=\)#\1${WORKDIR}/#" \ - -i "${WORKDIR}"/GNUstep.conf || die "GNUstep.conf sed failed" - fi - - - if [[ ! -d ${EPREFIX}/usr/share/GNUstep/Makefiles ]]; then - # Set rpath in ldflags when available - case ${CHOST} in - *-linux-gnu|*-solaris*) - is-ldflagq -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \ - || append-ldflags \ - -Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" - ;; - esac - fi - - # Set up env vars for make operations - GS_ENV=( AUXILIARY_LDFLAGS="${LDFLAGS}" \ - ADDITIONAL_NATIVE_LIB_DIRS="${GNUSTEP_SYSTEM_LIBRARIES}" \ - DESTDIR="${D}" \ - HOME="${T}" \ - GNUSTEP_CONFIG_FILE="${WORKDIR}"/GNUstep.conf \ - GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ - TAR_OPTIONS="${TAR_OPTIONS} --no-same-owner" \ - messages=yes ) - - use doc \ - && GS_ENV=( "${GS_ENV[@]}" VARTEXFONTS="${T}"/fonts ) - - use debug \ - && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \ - || GS_ENV=( "${GS_ENV[@]}" "debug=no" ) - - if has_version "gnustep-base/gnustep-make[libobjc2]"; - then - # Set clang for packages that do not respect gnustep-make - # settings (gnustep-base's configure for example) - export CC=clang CXX=clang CPP="clang -E" LD="clang" - fi - - return 0 - fi - die "gnustep-make not installed!" -} - -# Make utilizing GNUstep Makefiles -egnustep_make() { - if [[ -f ./Makefile || -f ./makefile || -f ./GNUmakefile ]] ; then - emake ${*} "${GS_ENV[@]}" all || die "package make failed" - return 0 - fi - die "no Makefile found" -} - -# Make-install utilizing GNUstep Makefiles -egnustep_install() { - if [[ ! -d ${EPREFIX}/usr/share/GNUstep/Makefiles ]]; then - # avoid problems due to our "weird" prefix, make sure it exists - mkdir -p "${D}"${GNUSTEP_SYSTEM_TOOLS} - fi - if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then - emake ${*} "${GS_ENV[@]}" install || die "package install failed" - return 0 - fi - die "no Makefile found" -} - -# Make and install docs using GNUstep Makefiles -egnustep_doc() { - if [[ -d "${S}"/Documentation ]] ; then - # Check documentation presence - pushd "${S}"/Documentation || die - if [[ -f ./[mM]akefile || -f ./GNUmakefile ]] ; then - emake "${GS_ENV[@]}" all || die "doc make failed" - emake "${GS_ENV[@]}" install || die "doc install failed" - fi - popd || die - fi -} - -egnustep_install_config() { - [[ $(type -t gnustep_config_script) != "function" ]] && return 0 - - local cfile=config-${PN}.sh - - cat << 'EOF' > "${T}"/${cfile} -#!/usr/bin/env bash -gnustep_append_default() { - if [[ -z $1 || -z $2 || -z $3 ]]; then - echo "warning: invalid script invocation" - return - fi - dom=$1 - key=$2 - val=$3 - cur=$(defaults read ${dom} ${key}) 2> /dev/null - if [[ -z $cur ]] ; then - echo " * setting ${dom} ${key}" - defaults write ${dom} ${key} "( ${val} )" - elif [[ ${cur} != *${val}* ]] ; then - echo " * adding ${val} to ${dom} ${key}" - echo "${cur%)\'}, \"${val}\" )'" | defaults write - else - echo " * ${val} already present in ${dom} ${key}" - fi -} - -gnustep_set_default() { - if [[ -z $1 || -z $2 || -z $3 ]]; then - echo "warning: invalid script invocation" - return - fi - dom=$1 - key=$2 - val=$3 - echo " * setting ${dom} ${key}" - defaults write ${dom} ${key} ${val} -} - -EOF - - echo "echo \"Applying ${P} default configuration ...\"" >> "${T}"/${cfile} - - gnustep_config_script | \ - while read line ; do - echo "${line}" >> "${T}"/${cfile} - done - echo 'echo "done"' >> "${T}"/${cfile} - - if [[ -d ${EPREFIX}/usr/share/GNUstep/Makefiles ]]; then - exeinto /usr/bin - else - exeinto ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo - fi - doexe "${T}"/${cfile} -} - -case ${EAPI:-0} in - 0|1) EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst ;; - *) EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_postinst ;; -esac diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass deleted file mode 100644 index edfdfae5cd..0000000000 --- a/eclass/haskell-cabal.eclass +++ /dev/null @@ -1,745 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: haskell-cabal.eclass -# @MAINTAINER: -# Haskell herd -# @AUTHOR: -# Original author: Andres Loeh -# Original author: Duncan Coutts -# @BLURB: for packages that make use of the Haskell Common Architecture for Building Applications and Libraries (cabal) -# @DESCRIPTION: -# Basic instructions: -# -# Before inheriting the eclass, set CABAL_FEATURES to -# reflect the tools and features that the package makes -# use of. -# -# Currently supported features: -# haddock -- for documentation generation -# hscolour -- generation of colourised sources -# hoogle -- generation of documentation search index -# profile -- if package supports to build profiling-enabled libraries -# bootstrap -- only used for the cabal package itself -# lib -- the package installs libraries -# nocabaldep -- don't add dependency on cabal. -# only used for packages that _must_ not pull the dependency -# on cabal, but still use this eclass (e.g. haskell-updater). -# ghcdeps -- constraint dependency on package to ghc onces -# only used for packages that use libghc internally and _must_ -# not pull upper versions -# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8) - -inherit eutils ghc-package multilib toolchain-funcs - -# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS -# @DESCRIPTION: -# User-specified additional parameters passed to 'setup configure'. -# example: /etc/portage/make.conf: -# CABAL_EXTRA_CONFIGURE_FLAGS="--enable-shared --enable-executable-dynamic" -: ${CABAL_EXTRA_CONFIGURE_FLAGS:=} - -# @ECLASS-VARIABLE: CABAL_EXTRA_BUILD_FLAGS -# @DESCRIPTION: -# User-specified additional parameters passed to 'setup build'. -# example: /etc/portage/make.conf: CABAL_EXTRA_BUILD_FLAGS=-v -: ${CABAL_EXTRA_BUILD_FLAGS:=} - -# @ECLASS-VARIABLE: GHC_BOOTSTRAP_FLAGS -# @DESCRIPTION: -# User-specified additional parameters for ghc when building -# _only_ 'setup' binary bootstrap. -# example: /etc/portage/make.conf: GHC_BOOTSTRAP_FLAGS=-dynamic to make -# linking 'setup' faster. -: ${GHC_BOOTSTRAP_FLAGS:=} - -# @ECLASS-VARIABLE: CABAL_EXTRA_TEST_FLAGS -# @DESCRIPTION: -# User-specified additional parameters passed to 'setup test'. -# example: /etc/portage/make.conf: -# CABAL_EXTRA_TEST_FLAGS="-v3 --show-details=streaming" -: ${CABAL_EXTRA_TEST_FLAGS:=} - -# @ECLASS-VARIABLE: CABAL_DEBUG_LOOSENING -# @DESCRIPTION: -# Show debug output for 'cabal_chdeps' function if set. -# Needs working 'diff'. -: ${CABAL_DEBUG_LOOSENING:=} - -HASKELL_CABAL_EXPF="pkg_setup src_compile src_test src_install pkg_postinst pkg_postrm" - -# 'dev-haskell/cabal' passes those options with ./configure-based -# configuration, but most packages don't need/don't accept it: -# #515362, #515362 -QA_CONFIGURE_OPTIONS+=" --with-compiler --with-hc --with-hc-pkg --with-gcc" - -case "${EAPI:-0}" in - 2|3|4|5|6|7) HASKELL_CABAL_EXPF+=" src_configure" ;; - *) ;; -esac - -EXPORT_FUNCTIONS ${HASKELL_CABAL_EXPF} - -for feature in ${CABAL_FEATURES}; do - case ${feature} in - haddock) CABAL_USE_HADDOCK=yes;; - hscolour) CABAL_USE_HSCOLOUR=yes;; - hoogle) CABAL_USE_HOOGLE=yes;; - profile) CABAL_USE_PROFILE=yes;; - bootstrap) CABAL_BOOTSTRAP=yes;; - lib) CABAL_HAS_LIBRARIES=yes;; - nocabaldep) CABAL_FROM_GHC=yes;; - ghcdeps) CABAL_GHC_CONSTRAINT=yes;; - test-suite) CABAL_TEST_SUITE=yes;; - - # does nothing, removed 2016-09-04 - bin) ;; - - *) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";; - esac -done - -if [[ -n "${CABAL_USE_HADDOCK}" ]]; then - IUSE="${IUSE} doc" - # don't require depend on itself to build docs. - # ebuild bootstraps docs from just built binary - # - # starting from ghc-7.10.2 we install haddock bundled with - # ghc to keep links to base and ghc library, otherwise - # newer haddock versions change index format and can't - # read index files for packages coming with ghc. - [[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || \ - DEPEND="${DEPEND} doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) )" -fi - -if [[ -n "${CABAL_USE_HSCOLOUR}" ]]; then - IUSE="${IUSE} hscolour" - DEPEND="${DEPEND} hscolour? ( dev-haskell/hscolour )" -fi - -if [[ -n "${CABAL_USE_HOOGLE}" ]]; then - # enabled only in ::haskell - #IUSE="${IUSE} hoogle" - CABAL_USE_HOOGLE= -fi - -if [[ -n "${CABAL_USE_PROFILE}" ]]; then - IUSE="${IUSE} profile" -fi - -if [[ -n "${CABAL_TEST_SUITE}" ]]; then - IUSE="${IUSE} test" -fi - -# returns the version of cabal currently in use. -# Rarely it's handy to pin cabal version from outside. -: ${_CABAL_VERSION_CACHE:=""} -cabal-version() { - if [[ -z "${_CABAL_VERSION_CACHE}" ]]; then - if [[ "${CABAL_BOOTSTRAP}" ]]; then - # We're bootstrapping cabal, so the cabal version is the version - # of this package itself. - _CABAL_VERSION_CACHE="${PV}" - elif [[ "${CABAL_FROM_GHC}" ]]; then - _CABAL_VERSION_CACHE="$(ghc-cabal-version)" - else - # We ask portage, not ghc, so that we only pick up - # portage-installed cabal versions. - _CABAL_VERSION_CACHE="$(ghc-extractportageversion dev-haskell/cabal)" - fi - fi - echo "${_CABAL_VERSION_CACHE}" -} - -cabal-bootstrap() { - local setupmodule - local cabalpackage - local setup_bootstrap_args=() - - if [[ -f "${S}/Setup.lhs" ]]; then - setupmodule="${S}/Setup.lhs" - elif [[ -f "${S}/Setup.hs" ]]; then - setupmodule="${S}/Setup.hs" - else - eqawarn "No Setup.lhs or Setup.hs found. Either add Setup.hs to package or call cabal-mksetup from ebuild" - cabal-mksetup - setupmodule="${S}/Setup.hs" - fi - - # We build the setup program using the latest version of - # cabal that we have installed - cabalpackage=Cabal-$(cabal-version) - einfo "Using cabal-$(cabal-version)." - - if $(ghc-supports-threaded-runtime); then - # Cabal has a bug that deadlocks non-threaded RTS: - # https://bugs.gentoo.org/537500 - # https://github.com/haskell/cabal/issues/2398 - setup_bootstrap_args+=(-threaded) - fi - - make_setup() { - set -- -package "${cabalpackage}" --make "${setupmodule}" \ - $(ghc-make-args) \ - "${setup_bootstrap_args[@]}" \ - ${HCFLAGS} \ - ${GHC_BOOTSTRAP_FLAGS} \ - "$@" \ - -o setup - echo $(ghc-getghc) "$@" - $(ghc-getghc) "$@" - } - if $(ghc-supports-shared-libraries); then - # # some custom build systems might use external libraries, - # # for which we don't have shared libs, so keep static fallback - # bug #411789, http://hackage.haskell.org/trac/ghc/ticket/5743#comment:3 - # http://hackage.haskell.org/trac/ghc/ticket/7062 - # http://hackage.haskell.org/trac/ghc/ticket/3072 - # ghc does not set RPATH for extralibs, thus we do it ourselves by hands - einfo "Prepending $(ghc-libdir) to LD_LIBRARY_PATH" - if [[ ${CHOST} != *-darwin* ]]; then - LD_LIBRARY_PATH="$(ghc-libdir)${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" - export LD_LIBRARY_PATH - else - DYLD_LIBRARY_PATH="$(ghc-libdir)${DYLD_LIBRARY_PATH:+:}${DYLD_LIBRARY_PATH}" - export DYLD_LIBRARY_PATH - fi - { make_setup -dynamic "$@" && ./setup --help >/dev/null; } || - make_setup "$@" || die "compiling ${setupmodule} failed" - else - make_setup "$@" || die "compiling ${setupmodule} failed" - fi -} - -cabal-mksetup() { - local setupdir=${1:-${S}} - local setup_src=${setupdir}/Setup.hs - - rm -vf "${setupdir}"/Setup.{lhs,hs} - elog "Creating 'Setup.hs' for 'Simple' build type." - - echo 'import Distribution.Simple; main = defaultMain' \ - > "${setup_src}" || die "failed to create default Setup.hs" -} - -cabal-hscolour() { - set -- hscolour "$@" - echo ./setup "$@" - ./setup "$@" || die "setup hscolour failed" -} - -cabal-haddock() { - set -- haddock "$@" - echo ./setup "$@" - ./setup "$@" || die "setup haddock failed" -} - -cabal-hoogle() { - ewarn "hoogle USE flag requires doc USE flag, building without hoogle" -} - -cabal-hscolour-haddock() { - # --hyperlink-source implies calling 'setup hscolour' - set -- haddock --hyperlink-source - echo ./setup "$@" - ./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed" -} - -cabal-hoogle-haddock() { - set -- haddock --hoogle - echo ./setup "$@" - ./setup "$@" || die "setup haddock --hoogle failed" -} - -cabal-hoogle-hscolour-haddock() { - cabal-hscolour-haddock - cabal-hoogle-haddock -} - -cabal-hoogle-hscolour() { - ewarn "hoogle USE flag requires doc USE flag, building without hoogle" - cabal-hscolour -} - -cabal-die-if-nonempty() { - local breakage_type=$1 - shift - - [[ "${#@}" == 0 ]] && return 0 - eerror "Detected ${breakage_type} packages: ${@}" - die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//" -} - -cabal-show-brokens() { - elog "ghc-pkg check: 'checking for other broken packages:'" - # pretty-printer - $(ghc-getghcpkg) check 2>&1 \ - | egrep -v '^Warning: haddock-(html|interfaces): ' \ - | egrep -v '^Warning: include-dirs: ' \ - | head -n 20 - - cabal-die-if-nonempty 'broken' \ - $($(ghc-getghcpkg) check --simple-output) -} - -cabal-show-old() { - cabal-die-if-nonempty 'outdated' \ - $("${EPREFIX}"/usr/sbin/haskell-updater --quiet --upgrade --list-only) -} - -cabal-show-brokens-and-die() { - cabal-show-brokens - cabal-show-old - - die "$@" -} - -cabal-configure() { - local cabalconf=() - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - - if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then - # We use the bundled with GHC version if exists - # Haddock is very picky about index files - # it generates for ghc's base and other packages. - local p=${EPREFIX}/usr/bin/haddock-ghc-$(ghc-version) - if [[ -f $p ]]; then - cabalconf+=(--with-haddock="${p}") - else - cabalconf+=(--with-haddock=${EPREFIX}/usr/bin/haddock) - fi - fi - if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then - cabalconf+=(--enable-library-profiling) - fi - - if [[ -n "${CABAL_TEST_SUITE}" ]]; then - cabalconf+=($(use_enable test tests)) - fi - - if [[ -n "${CABAL_GHC_CONSTRAINT}" ]]; then - cabalconf+=($(cabal-constraint "ghc")) - fi - - cabalconf+=(--ghc-options="$(ghc-make-args)") - - local option - for option in ${HCFLAGS} - do - cabalconf+=(--ghc-option="$option") - done - - # toolchain - cabalconf+=(--with-ar="$(tc-getAR)") - - # Building GHCi libs on ppc64 causes "TOC overflow". - if use ppc64; then - cabalconf+=(--disable-library-for-ghci) - fi - - # currently cabal does not respect CFLAGS and LDFLAGS on it's own (bug #333217) - # so translate LDFLAGS to ghc parameters (without filtering) - local flag - for flag in $CFLAGS; do cabalconf+=(--ghc-option="-optc$flag"); done - for flag in $LDFLAGS; do cabalconf+=(--ghc-option="-optl$flag"); done - - # disable executable stripping for the executables, as portage will - # strip by itself, and pre-stripping gives a QA warning. - # cabal versions previous to 1.4 does not strip executables, and does - # not accept the flag. - # this fixes numerous bugs, amongst them; - # bug #251881, bug #251882, bug #251884, bug #251886, bug #299494 - cabalconf+=(--disable-executable-stripping) - - cabalconf+=(--docdir="${EPREFIX}"/usr/share/doc/${PF}) - # As of Cabal 1.2, configure is quite quiet. For diagnostic purposes - # it's better if the configure chatter is in the build logs: - cabalconf+=(--verbose) - - # We build shared version of our Cabal where ghc ships it's shared - # version of it. We will link ./setup as dynamic binary againt Cabal later. - [[ ${CATEGORY}/${PN} == "dev-haskell/cabal" ]] && \ - $(ghc-supports-shared-libraries) && \ - cabalconf+=(--enable-shared) - - if $(ghc-supports-shared-libraries); then - # Experimental support for dynamically linked binaries. - # We are enabling it since 7.10.1_rc3 - if ver_test "$(ghc-version)" -ge "7.10.0.20150316"; then - # we didn't enable it before as it was not stable on all arches - cabalconf+=(--enable-shared) - # Known to break on ghc-7.8/Cabal-1.18 - # https://ghc.haskell.org/trac/ghc/ticket/9625 - cabalconf+=(--enable-executable-dynamic) - fi - fi - - # --sysconfdir appeared in Cabal-1.18+ - if ./setup configure --help | grep -q -- --sysconfdir; then - cabalconf+=(--sysconfdir="${EPREFIX}"/etc) - fi - - # appeared in Cabal-1.18+ (see '--disable-executable-stripping') - if ./setup configure --help | grep -q -- --disable-library-stripping; then - cabalconf+=(--disable-library-stripping) - fi - - set -- configure \ - --ghc --prefix="${EPREFIX}"/usr \ - --with-compiler="$(ghc-getghc)" \ - --with-hc-pkg="$(ghc-getghcpkg)" \ - --prefix="${EPREFIX}"/usr \ - --libdir="${EPREFIX}"/usr/$(get_libdir) \ - --libsubdir=${P}/ghc-$(ghc-version) \ - --datadir="${EPREFIX}"/usr/share/ \ - --datasubdir=${P}/ghc-$(ghc-version) \ - "${cabalconf[@]}" \ - ${CABAL_CONFIGURE_FLAGS} \ - ${CABAL_EXTRA_CONFIGURE_FLAGS} \ - "$@" - echo ./setup "$@" - ./setup "$@" || cabal-show-brokens-and-die "setup configure failed" -} - -cabal-build() { - set -- build ${CABAL_EXTRA_BUILD_FLAGS} "$@" - echo ./setup "$@" - ./setup "$@" \ - || die "setup build failed" -} - -cabal-copy() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D} - - set -- copy --destdir="${D}" "$@" - echo ./setup "$@" - ./setup "$@" || die "setup copy failed" - - # cabal is a bit eager about creating dirs, - # so remove them if they are empty - rmdir "${ED}/usr/bin" 2> /dev/null -} - -cabal-pkg() { - # This does not actually register since we're using true instead - # of ghc-pkg. So it just leaves the .conf file and we can - # register that ourselves (if it exists). - - if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then - # Newer cabal can generate a package conf for us: - ./setup register --gen-pkg-config="${T}/${P}.conf" - if [[ -d "${T}/${P}.conf" ]]; then - ghc-install-pkg "${T}/${P}.conf"/* - else - ghc-install-pkg "${T}/${P}.conf" - fi - fi -} - -# Some cabal libs are bundled along with some versions of ghc -# eg filepath-1.0 comes with ghc-6.6.1 -# by putting CABAL_CORE_LIB_GHC_PV="6.6.1" in an ebuild we are declaring that -# when building with this version of ghc, the ebuild is a dummy that is it will -# install no files since the package is already included with ghc. -# However portage still records the dependency and we can upgrade the package -# to a later one that's not included with ghc. -# You can also put a space separated list, eg CABAL_CORE_LIB_GHC_PV="6.6 6.6.1". -# Those versions are taken as-is from ghc `--numeric-version`. -# Package manager versions are also supported: -# CABAL_CORE_LIB_GHC_PV="7.10.* PM:7.8.4-r1". -cabal-is-dummy-lib() { - local bin_ghc_version=$(ghc-version) - local pm_ghc_version=$(ghc-pm-version) - - for version in ${CABAL_CORE_LIB_GHC_PV}; do - [[ "${bin_ghc_version}" == ${version} ]] && return 0 - [[ "${pm_ghc_version}" == ${version} ]] && return 0 - done - - return 1 -} - -# exported function: check if cabal is correctly installed for -# the currently active ghc (we cannot guarantee this with portage) -haskell-cabal_pkg_setup() { - if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then - [[ ${RDEPEND} == *dev-lang/ghc* ]] || eqawarn "QA Notice: A library does not have runtime dependency on dev-lang/ghc." - fi - if [[ -n "${CABAL_UNKNOWN}" ]]; then - eqawarn "QA Notice: Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}" - fi - if cabal-is-dummy-lib; then - einfo "${P} is included in ghc-${CABAL_CORE_LIB_GHC_PV}, nothing to install." - fi -} - -haskell-cabal_src_configure() { - cabal-is-dummy-lib && return - - pushd "${S}" > /dev/null || die - - cabal-bootstrap - - cabal-configure "$@" - - popd > /dev/null || die -} - -# exported function: nice alias -cabal_src_configure() { - haskell-cabal_src_configure "$@" -} - -# exported function: cabal-style bootstrap configure and compile -cabal_src_compile() { - # it's a common mistake when one bumps ebuild to EAPI="2" (and upper) - # and forgets to separate src_compile() to src_configure()/src_compile(). - # Such error leads to default src_configure and we lose all passed flags. - if ! has "${EAPI:-0}" 0 1; then - local passed_flag - for passed_flag in "$@"; do - [[ ${passed_flag} == --flags=* ]] && \ - eqawarn "QA Notice: Cabal option '${passed_flag}' has effect only in src_configure()" - done - fi - - cabal-is-dummy-lib && return - - has src_configure ${HASKELL_CABAL_EXPF} || haskell-cabal_src_configure "$@" - cabal-build - - if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then - if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then - if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then - # hoogle, hscolour and haddock - cabal-hoogle-hscolour-haddock - else - # haddock and hscolour - cabal-hscolour-haddock - fi - else - if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then - # hoogle and haddock - cabal-hoogle-haddock - else - # just haddock - cabal-haddock - fi - fi - else - if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then - if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then - # hoogle and hscolour - cabal-hoogle-hscolour - else - # just hscolour - cabal-hscolour - fi - else - if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then - # just hoogle - cabal-hoogle - fi - fi - fi -} - -haskell-cabal_src_compile() { - pushd "${S}" > /dev/null || die - - cabal_src_compile "$@" - - popd > /dev/null || die -} - -haskell-cabal_src_test() { - local cabaltest=() - - pushd "${S}" > /dev/null || die - - if cabal-is-dummy-lib; then - einfo ">>> No tests for dummy library: ${CATEGORY}/${PF}" - else - einfo ">>> Test phase [cabal test]: ${CATEGORY}/${PF}" - - # '--show-details=streaming' appeared in Cabal-1.20 - if ./setup test --help | grep -q -- "'streaming'"; then - cabaltest+=(--show-details=streaming) - fi - - set -- test \ - "${cabaltest[@]}" \ - ${CABAL_TEST_FLAGS} \ - ${CABAL_EXTRA_TEST_FLAGS} \ - "$@" - echo ./setup "$@" - ./setup "$@" || die "cabal test failed" - fi - - popd > /dev/null || die -} - -# exported function: cabal-style copy and register -cabal_src_install() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - - if ! cabal-is-dummy-lib; then - cabal-copy - cabal-pkg - fi - - # create a dummy local package conf file for haskell-updater - # if it does not exist (dummy libraries and binaries w/o libraries) - local ghc_confdir_with_prefix="$(ghc-confdir)" - # remove EPREFIX - dodir ${ghc_confdir_with_prefix#${EPREFIX}} - local hint_db="${D}/$(ghc-confdir)" - local hint_file="${hint_db}/gentoo-empty-${CATEGORY}-${PF}.conf" - mkdir -p "${hint_db}" || die - touch "${hint_file}" || die -} - -haskell-cabal_src_install() { - pushd "${S}" > /dev/null || die - - cabal_src_install - - popd > /dev/null || die -} - -haskell-cabal_pkg_postinst() { - ghc-package_pkg_postinst -} - -haskell-cabal_pkg_postrm() { - ghc-package_pkg_postrm -} - -# @FUNCTION: cabal_flag -# @DESCRIPTION: -# ebuild.sh:use_enable() taken as base -# -# Usage examples: -# -# CABAL_CONFIGURE_FLAGS=$(cabal_flag gui) -# leads to "--flags=gui" or "--flags=-gui" (useflag 'gui') -# -# CABAL_CONFIGURE_FLAGS=$(cabal_flag gtk gui) -# also leads to "--flags=gui" or " --flags=-gui" (useflag 'gtk') -# -cabal_flag() { - if [[ -z "$1" ]]; then - echo "!!! cabal_flag() called without a parameter." >&2 - echo "!!! cabal_flag() []" >&2 - return 1 - fi - - local UWORD=${2:-$1} - - if use "$1"; then - echo "--flags=${UWORD}" - else - echo "--flags=-${UWORD}" - fi - - return 0 -} - -# @FUNCTION: cabal_chdeps -# @DESCRIPTION: -# Allows easier patching of $CABAL_FILE (${S}/${PN}.cabal by default) -# depends -# -# Accepts argument list as pairs of substitutions: ... -# -# Dies on error. -# -# Usage examples: -# -# src_prepare() { -# cabal_chdeps \ -# 'base >= 4.2 && < 4.6' 'base >= 4.2 && < 4.7' \ -# 'containers ==0.4.*' 'containers >= 0.4 && < 0.6' -#} -# or -# src_prepare() { -# CABAL_FILE=${S}/${MY_PN}.cabal cabal_chdeps \ -# 'base >= 4.2 && < 4.6' 'base >= 4.2 && < 4.7' -# CABAL_FILE=${S}/${MY_PN}-tools.cabal cabal_chdeps \ -# 'base == 3.*' 'base >= 4.2 && < 4.7' -#} -# -cabal_chdeps() { - local cabal_fn=${MY_PN:-${PN}}.cabal - local cf=${CABAL_FILE:-${S}/${cabal_fn}} - local from_ss # ss - substring - local to_ss - local orig_c # c - contents - local new_c - - [[ -f $cf ]] || die "cabal file '$cf' does not exist" - - orig_c=$(< "$cf") - - while :; do - from_pat=$1 - to_str=$2 - - [[ -n ${from_pat} ]] || break - [[ -n ${to_str} ]] || die "'${from_str}' does not have 'to' part" - - einfo "CHDEP: '${from_pat}' -> '${to_str}'" - - # escape pattern-like symbols - from_pat=${from_pat//\*/\\*} - from_pat=${from_pat//\[/\\[} - - new_c=${orig_c//${from_pat}/${to_str}} - - if [[ -n $CABAL_DEBUG_LOOSENING ]]; then - echo "${orig_c}" >"${T}/${cf}".pre - echo "${new_c}" >"${T}/${cf}".post - diff -u "${T}/${cf}".{pre,post} - fi - - [[ "${orig_c}" == "${new_c}" ]] && die "no trigger for '${from_pat}'" - orig_c=${new_c} - shift - shift - done - - echo "${new_c}" > "$cf" || - die "failed to update" -} - -# @FUNCTION: cabal-constraint -# @DESCRIPTION: -# Allowes to set contraint to the libraries that are -# used by specified package -cabal-constraint() { - while read p v ; do - echo "--constraint \"$p == $v\"" - done < $(ghc-pkgdeps ${1}) -} - -# @FUNCTION: replace-hcflags -# @USAGE: -# @DESCRIPTION: -# Replace the flag with in HCFLAGS. Accepts shell globs for . -# The implementation is picked from flag-o-matic.eclass:replace-flags() -replace-hcflags() { - [[ $# != 2 ]] && die "Usage: replace-hcflags " - - local f new=() - for f in ${HCFLAGS} ; do - # Note this should work with globs like -O* - if [[ ${f} == ${1} ]]; then - einfo "HCFLAGS: replacing '${f}' to '${2}'" - f=${2} - fi - new+=( "${f}" ) - done - export HCFLAGS="${new[*]}" - - return 0 -} diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass deleted file mode 100644 index d71b728599..0000000000 --- a/eclass/java-vm-2.eclass +++ /dev/null @@ -1,320 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: java-vm-2.eclass -# @MAINTAINER: -# java@gentoo.org -# @SUPPORTED_EAPIS: 5 6 -# @BLURB: Java Virtual Machine eclass -# @DESCRIPTION: -# This eclass provides functionality which assists with installing -# virtual machines, and ensures that they are recognized by java-config. - -case ${EAPI:-0} in - 5|6) ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -inherit multilib pax-utils prefix xdg-utils - -EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm - -RDEPEND=" - >=dev-java/java-config-2.2.0-r3 - >=app-eselect/eselect-java-0.4.0" -DEPEND="${RDEPEND}" - -export WANT_JAVA_CONFIG=2 - - -# @ECLASS-VARIABLE: JAVA_VM_CONFIG_DIR -# @INTERNAL -# @DESCRIPTION: -# Where to place the vm env file. -JAVA_VM_CONFIG_DIR="/usr/share/java-config-2/vm" - -# @ECLASS-VARIABLE: JAVA_VM_DIR -# @INTERNAL -# @DESCRIPTION: -# Base directory for vm links. -JAVA_VM_DIR="/usr/lib/jvm" - -# @ECLASS-VARIABLE: JAVA_VM_SYSTEM -# @INTERNAL -# @DESCRIPTION: -# Link for system-vm -JAVA_VM_SYSTEM="/etc/java-config-2/current-system-vm" - -# @ECLASS-VARIABLE: JAVA_VM_BUILD_ONLY -# @DESCRIPTION: -# Set to YES to mark a vm as build-only. -JAVA_VM_BUILD_ONLY="${JAVA_VM_BUILD_ONLY:-FALSE}" - - -# @FUNCTION: java-vm-2_pkg_setup -# @DESCRIPTION: -# default pkg_setup -# -# Initialize vm handle. - -java-vm-2_pkg_setup() { - if [[ "${SLOT}" != "0" ]]; then - VMHANDLE=${PN}-${SLOT} - else - VMHANDLE=${PN} - fi -} - - -# @FUNCTION: java-vm-2_pkg_postinst -# @DESCRIPTION: -# default pkg_postinst -# -# Set the generation-2 system VM, if it isn't set or the setting is -# invalid. Also update mime database. - -java-vm-2_pkg_postinst() { - if [[ ! -d ${EROOT}${JAVA_VM_SYSTEM} ]]; then - eselect java-vm set system "${VMHANDLE}" - einfo "${P} set as the default system-vm." - fi - - xdg_desktop_database_update -} - - -# @FUNCTION: java-vm-2_pkg_prerm -# @DESCRIPTION: -# default pkg_prerm -# -# Warn user if removing system-vm. - -java-vm-2_pkg_prerm() { - if [[ $(GENTOO_VM= java-config -f 2>/dev/null) == ${VMHANDLE} && -z ${REPLACED_BY_VERSION} ]]; then - ewarn "It appears you are removing your system-vm! Please run" - ewarn "\"eselect java-vm list\" to list available VMs, then use" - ewarn "\"eselect java-vm set system\" to set a new system-vm!" - fi -} - - -# @FUNCTION: java-vm-2_pkg_postrm -# @DESCRIPTION: -# default pkg_postrm -# -# Update mime database. - -java-vm-2_pkg_postrm() { - xdg_desktop_database_update -} - - -# @FUNCTION: get_system_arch -# @DESCRIPTION: -# Get Java specific arch name. -# -# NOTE the mips and sparc values are best guesses. Oracle uses sparcv9 -# but does OpenJDK use sparc64? We don't support OpenJDK on sparc or any -# JVM on mips though so it doesn't matter much. - -get_system_arch() { - local abi=${1-${ABI}} - - case $(get_abi_CHOST ${abi}) in - mips*l*) echo mipsel ;; - mips*) echo mips ;; - powerpc64le*) echo ppc64le ;; - *) - case ${abi} in - *_fbsd) get_system_arch ${abi%_fbsd} ;; - arm64) echo aarch64 ;; - hppa) echo parisc ;; - sparc32) echo sparc ;; - sparc64) echo sparcv9 ;; - x86*) echo i386 ;; - *) echo ${abi} ;; - esac ;; - esac -} - - -# @FUNCTION: set_java_env -# @DESCRIPTION: -# Installs a vm env file. -# DEPRECATED, use java-vm_install-env instead. - -set_java_env() { - debug-print-function ${FUNCNAME} $* - - local platform="$(get_system_arch)" - local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" - - if [[ ${1} ]]; then - local source_env_file="${1}" - else - local source_env_file="${FILESDIR}/${VMHANDLE}.env" - fi - - if [[ ! -f ${source_env_file} ]]; then - die "Unable to find the env file: ${source_env_file}" - fi - - dodir ${JAVA_VM_CONFIG_DIR} - sed \ - -e "s/@P@/${P}/g" \ - -e "s/@PN@/${PN}/g" \ - -e "s/@PV@/${PV}/g" \ - -e "s/@PF@/${PF}/g" \ - -e "s/@SLOT@/${SLOT}/g" \ - -e "s/@PLATFORM@/${platform}/g" \ - -e "s/@LIBDIR@/$(get_libdir)/g" \ - -e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \ - < "${source_env_file}" \ - > "${env_file}" || die "sed failed" - - ( - echo "VMHANDLE=\"${VMHANDLE}\"" - echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\"" - ) >> "${env_file}" - - eprefixify ${env_file} - - [[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file} - - local java_home=$(source "${env_file}"; echo ${JAVA_HOME}) - [[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}" - - # Make the symlink - dodir "${JAVA_VM_DIR}" - dosym ${java_home#${EPREFIX}} ${JAVA_VM_DIR}/${VMHANDLE} -} - - -# @FUNCTION: java-vm_install-env -# @DESCRIPTION: -# -# Installs a Java VM environment file. The source can be specified but -# defaults to ${FILESDIR}/${VMHANDLE}.env.sh. -# -# Environment variables within this file will be resolved. You should -# escape the $ when referring to variables that should be resolved later -# such as ${JAVA_HOME}. Subshells may be used but avoid using double -# quotes. See icedtea-bin.env.sh for a good example. - -java-vm_install-env() { - debug-print-function ${FUNCNAME} "$*" - - local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}" - local source_env_file="${1-${FILESDIR}/${VMHANDLE}.env.sh}" - - if [[ ! -f "${source_env_file}" ]]; then - die "Unable to find the env file: ${source_env_file}" - fi - - dodir "${JAVA_VM_CONFIG_DIR}" - - # Here be dragons! ;) -- Chewi - eval echo "\"$(cat <<< "$(sed 's:":\\":g' "${source_env_file}")")\"" > "${env_file}" || - die "failed to create Java env file" - - ( - echo "VMHANDLE=\"${VMHANDLE}\"" - echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\"" - [[ ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" || true - ) >> "${env_file}" || die "failed to append to Java env file" - - local java_home=$(unset JAVA_HOME; source "${env_file}"; echo ${JAVA_HOME}) - [[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}" - - # Make the symlink - dodir "${JAVA_VM_DIR}" - dosym "${java_home#${EPREFIX}}" "${JAVA_VM_DIR}/${VMHANDLE}" -} - - -# @FUNCTION: java-vm_set-pax-markings -# @DESCRIPTION: -# Set PaX markings on all JDK/JRE executables to allow code-generation on -# the heap by the JIT compiler. -# -# The markings need to be set prior to the first invocation of the the freshly -# built / installed VM. Be it before creating the Class Data Sharing archive or -# generating cacerts. Otherwise a PaX enabled kernel will kill the VM. -# Bug #215225 #389751 -# -# @CODE -# Parameters: -# $1 - JDK/JRE base directory. -# -# Examples: -# java-vm_set-pax-markings "${S}" -# java-vm_set-pax-markings "${ED}"/opt/${P} -# @CODE - -java-vm_set-pax-markings() { - debug-print-function ${FUNCNAME} "$*" - [[ $# -ne 1 ]] && die "${FUNCNAME}: takes exactly one argument" - [[ ! -f "${1}"/bin/java ]] \ - && die "${FUNCNAME}: argument needs to be JDK/JRE base directory" - - local executables=( "${1}"/bin/* ) - [[ -d "${1}"/jre ]] && executables+=( "${1}"/jre/bin/* ) - - # Usually disabling MPROTECT is sufficient. - local pax_markings="m" - # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well. - use x86 && pax_markings+="sp" - - pax-mark ${pax_markings} $(list-paxables "${executables[@]}") -} - - -# @FUNCTION: java-vm_revdep-mask -# @DESCRIPTION: -# Installs a revdep-rebuild control file which SEARCH_DIR_MASK set to the path -# where the VM is installed. Prevents pointless rebuilds - see bug #177925. -# Also gives a notice to the user. -# -# @CODE -# Parameters: -# $1 - Path of the VM (defaults to /opt/${P} if not set) -# -# Examples: -# java-vm_revdep-mask -# java-vm_revdep-mask /path/to/jdk/ -# -# @CODE - -java-vm_revdep-mask() { - debug-print-function ${FUNCNAME} "$*" - - local VMROOT="${1-"${EPREFIX}"/opt/${P}}" - - dodir /etc/revdep-rebuild - echo "SEARCH_DIRS_MASK=\"${VMROOT}\"" >> "${ED}/etc/revdep-rebuild/61-${VMHANDLE}" \ - || die "Failed to write revdep-rebuild mask file" -} - - -# @FUNCTION: java-vm_sandbox-predict -# @DESCRIPTION: -# Install a sandbox control file. Specified paths won't cause a sandbox -# violation if opened read write but no write takes place. See bug 388937#c1 -# -# @CODE -# Examples: -# java-vm_sandbox-predict /dev/random /proc/self/coredump_filter -# @CODE - -java-vm_sandbox-predict() { - debug-print-function ${FUNCNAME} "$*" - [[ -z "${1}" ]] && die "${FUNCNAME} takes at least one argument" - - local path path_arr=("$@") - # subshell this to prevent IFS bleeding out dependant on bash version. - # could use local, which *should* work, but that requires a lot of testing. - path=$(IFS=":"; echo "${path_arr[*]}") - dodir /etc/sandbox.d - echo "SANDBOX_PREDICT=\"${path}\"" > "${ED}/etc/sandbox.d/20${VMHANDLE}" \ - || die "Failed to write sandbox control file" -} diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass deleted file mode 100644 index 1a684ef00a..0000000000 --- a/eclass/latex-package.eclass +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: latex-package.eclass -# @MAINTAINER: -# TeX team -# @AUTHOR: -# Matthew Turk -# Martin Ehmsen -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: An eclass for easy installation of LaTeX packages -# @DESCRIPTION: -# This eClass is designed to be easy to use and implement. The vast majority of -# LaTeX packages will only need to define SRC_URI (and sometimes S) for a -# successful installation. If fonts need to be installed, then the variable -# SUPPLIER must also be defined. -# -# However, those packages that contain subdirectories must process each -# subdirectory individually. For example, a package that contains directories -# DIR1 and DIR2 must call latex-package_src_compile() and -# latex-package_src_install() in each directory, as shown here: -# -# src_compile() { -# cd ${S} -# cd DIR1 -# latex-package_src_compile -# cd .. -# cd DIR2 -# latex-package_src_compile -# } -# -# src_install() { -# cd ${S} -# cd DIR1 -# latex-package_src_install -# cd .. -# cd DIR2 -# latex-package_src_install -# } -# -# The eClass automatically takes care of rehashing TeX's cache (ls-lR) after -# installation and after removal, as well as creating final documentation from -# TeX files that come with the source. Note that we break TeX layout standards -# by placing documentation in /usr/share/doc/${PN} -# -# For examples of basic installations, check out dev-tex/aastex and -# dev-tex/leaflet . -# -# NOTE: The CTAN "directory grab" function creates files with different MD5 -# signatures EVERY TIME. For this reason, if you are grabbing from the CTAN, -# you must either grab each file individually, or find a place to mirror an -# archive of them. (iBiblio) -# -# It inherits base and eutils in EAPI 5 and earlier. - -case ${EAPI:-0} in - 0|1|2|3|4|5) inherit base eutils ;; -esac - -RDEPEND="virtual/latex-base" -DEPEND="${RDEPEND} - >=sys-apps/texinfo-4.2-r5" -case ${EAPI:-0} in - 0|1|2|3|4|5|6) ;; - 7) BDEPEND="${DEPEND}"; DEPEND="" ;; - *) die "${ECLASS}: Unknown EAPI ${EAPI}" ;; -esac -HOMEPAGE="http://www.tug.org/" -TEXMF="/usr/share/texmf-site" - -# @ECLASS-VARIABLE: SUPPLIER -# @DESCRIPTION: -# This refers to the font supplier; it should be overridden (see eclass -# DESCRIPTION above) -SUPPLIER="misc" - -# @ECLASS-VARIABLE: LATEX_DOC_ARGUMENTS -# @DESCRIPTION: -# When compiling documentation (.tex/.dtx), this variable will be passed -# to pdflatex as additional argument (e.g. -shell-escape). This variable -# must be set after inherit, as it gets automatically cleared otherwise. -LATEX_DOC_ARGUMENTS="" - -# Kept for backwards compatibility -latex-package_has_tetex_3() { - case ${EAPI:-0} in - 0|1|2|3|4|5) return 0 ;; - *) die "${FUNCNAME} no longer supported in EAPI ${EAPI}" ;; - esac -} - -# @FUNCTION: latex-package_src_doinstall -# @USAGE: [ module ] -# @DESCRIPTION: -# [module] can be one or more of: sh, sty, cls, fd, clo, def, cfg, dvi, ps, pdf, -# tex, dtx, tfm, vf, afm, pfb, ttf, bst, styles, doc, fonts, bin, or all. -# If [module] is not given, all is assumed. -# It installs the files found in the current directory to the standard locations -# for a TeX installation -latex-package_src_doinstall() { - debug-print function $FUNCNAME $* - - # Avoid generating font cache outside of the sandbox - export VARTEXFONTS="${T}/fonts" - - # This actually follows the directions for a "single-user" system - # at http://www.ctan.org/installationadvice/ modified for gentoo. - [ -z "$1" ] && latex-package_src_install all - - while [ "$1" ]; do - case $1 in - "sh") - for i in `find . -maxdepth 1 -type f -name "*.${1}"` - do - dobin $i || die "dobin $i failed" - done - ;; - "sty" | "cls" | "fd" | "clo" | "def" | "cfg") - for i in `find . -maxdepth 1 -type f -name "*.${1}"` - do - insinto ${TEXMF}/tex/latex/${PN} - doins $i || die "doins $i failed" - done - ;; - "dvi" | "ps" | "pdf") - for i in `find . -maxdepth 1 -type f -name "*.${1}"` - do - insinto /usr/share/doc/${PF} - doins $i || die "doins $i failed" - dosym /usr/share/doc/${PF}/$(basename ${i}) ${TEXMF}/doc/latex/${PN}/${i} - case "${EAPI:-0}" in - 0|1|2|3) ;; - *) - # prevent compression of symlink target - docompress -x /usr/share/doc/${PF}/$(basename ${i}) - ;; - esac - done - ;; - "tex" | "dtx") - if ! in_iuse doc || use doc ; then - for i in `find . -maxdepth 1 -type f -name "*.${1}"` - do - [ -n "${LATEX_PACKAGE_SKIP}" ] && has ${i##*/} ${LATEX_PACKAGE_SKIP} && continue - einfo "Making documentation: $i" - if pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode $i ; then - pdflatex ${LATEX_DOC_ARGUMENTS} --halt-on-error --interaction=nonstopmode $i || die - else - einfo "pdflatex failed, trying texi2dvi" - texi2dvi -q -c --language=latex $i || die - fi - done - fi - ;; - "tfm" | "vf" | "afm") - for i in `find . -maxdepth 1 -type f -name "*.${1}"` - do - insinto ${TEXMF}/fonts/${1}/${SUPPLIER}/${PN} - doins $i || die "doins $i failed" - done - ;; - "pfb") - for i in `find . -maxdepth 1 -type f -name "*.pfb"` - do - insinto ${TEXMF}/fonts/type1/${SUPPLIER}/${PN} - doins $i || die "doins $i failed" - done - ;; - "ttf") - for i in `find . -maxdepth 1 -type f -name "*.ttf"` - do - insinto ${TEXMF}/fonts/truetype/${SUPPLIER}/${PN} - doins $i || die "doins $i failed" - done - ;; - "bst") - for i in `find . -maxdepth 1 -type f -name "*.bst"` - do - insinto ${TEXMF}/bibtex/bst/${PN} - doins $i || die "doins $i failed" - done - ;; - "styles") - latex-package_src_doinstall sty cls fd clo def cfg bst - ;; - "doc") - latex-package_src_doinstall tex dtx dvi ps pdf - ;; - "fonts") - latex-package_src_doinstall tfm vf afm pfb ttf - ;; - "bin") - latex-package_src_doinstall sh - ;; - "all") - latex-package_src_doinstall styles fonts bin doc - ;; - esac - shift - done -} - -# @FUNCTION: latex-package_src_compile -# @DESCRIPTION: -# Calls latex for each *.ins in the current directory in order to generate the -# relevant files that will be installed -latex-package_src_compile() { - debug-print function $FUNCNAME $* - for i in `find \`pwd\` -maxdepth 1 -type f -name "*.ins"` - do - einfo "Extracting from $i" - latex --halt-on-error --interaction=nonstopmode $i || die - done -} - -# @FUNCTION: latex-package_src_install -# @DESCRIPTION: -# Installs the package -latex-package_src_install() { - debug-print function $FUNCNAME $* - latex-package_src_doinstall all - if [ -n "${DOCS}" ] ; then - dodoc ${DOCS} - fi -} - -# @FUNCTION: latex-package_pkg_postinst -# @DESCRIPTION: -# Calls latex-package_rehash to ensure the TeX installation is consistent with -# the kpathsea database -latex-package_pkg_postinst() { - debug-print function $FUNCNAME $* - latex-package_rehash -} - -# @FUNCTION: latex-package_pkg_postrm -# @DESCRIPTION: -# Calls latex-package_rehash to ensure the TeX installation is consistent with -# the kpathsea database -latex-package_pkg_postrm() { - debug-print function $FUNCNAME $* - latex-package_rehash -} - -# @FUNCTION: latex-package_rehash -# @DESCRIPTION: -# Rehashes the kpathsea database, according to the current TeX installation -latex-package_rehash() { - debug-print function $FUNCNAME $* - texmf-update -} - -EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm diff --git a/eclass/libretro-core.eclass b/eclass/libretro-core.eclass deleted file mode 100644 index 6825ef24dd..0000000000 --- a/eclass/libretro-core.eclass +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: libretro-core.eclass -# @MAINTAINER: -# candrews@gentoo.org -# @AUTHOR: -# Cecil Curry -# Craig Andrews -# @SUPPORTED_EAPIS: 6 7 -# @BLURB: Simplify libretro core ebuilds -# @DESCRIPTION: -# The libretro eclass is designed to streamline the construction of -# ebuilds for Libretro core ebuilds. -# -# Libretro cores can be found under https://github.com/libretro/ -# -# They all use the same basic make based build system, are located -# in the same github account, and do not release named or numbered -# versions (so ebuild versions for git commits are keys). -# This eclass covers those commonalities reducing much duplication -# between the ebuilds. -# @EXAMPLE: -# @CODE -# EAPI=7 -# -# LIBRETRO_CORE_NAME="2048" -# LIBRETRO_COMMIT_SHA="45655d3662e4cbcd8afb28e2ee3f5494a75888de" -# KEYWORDS="~amd64 ~x86" -# inherit libretro-core -# -# DESCRIPTION="Port of 2048 puzzle game to the libretro API" -# LICENSE="Unlicense" -# SLOT="0" -# @CODE - -if [[ -z ${_LIBRETRO_CORE_ECLASS} ]]; then -_LIBRETRO_CORE_ECLASS=1 - -IUSE="debug" - -# @ECLASS-VARIABLE: LIBRETRO_CORE_NAME -# @REQUIRED -# @DESCRIPTION: -# Name of this Libretro core. The libretro-core_src_install() phase function -# will install the shared library "${S}/${LIBRETRO_CORE_NAME}_libretro.so" as a -# Libretro core. Defaults to the name of the current package excluding the -# "libretro-" prefix (e.g., "mgba" for the package "libretro-mgba"). -: ${LIBRETRO_CORE_NAME:=${PN#libretro-}} - -# @ECLASS-VARIABLE: LIBRETRO_COMMIT_SHA -# @DESCRIPTION: -# Commit SHA used for SRC_URI will die if not set in <9999 ebuilds. -# Needs to be set before inherit. - -# @ECLASS-VARIABLE: LIBRETRO_REPO_NAME -# @REQUIRED -# @DESCRIPTION: -# Contains the real repo name of the core formatted as "repouser/reponame". -# Needs to be set before inherit. Otherwise defaults to "libretro/${PN}" -: ${LIBRETRO_REPO_NAME:="libretro/libretro-${LIBRETRO_CORE_NAME}"} - -: ${HOMEPAGE:="https://github.com/${LIBRETRO_REPO_NAME}"} - -if [[ ${PV} == *9999 ]]; then - : ${EGIT_REPO_URI:="https://github.com/${LIBRETRO_REPO_NAME}.git"} - inherit git-r3 -else - [[ -z "${LIBRETRO_COMMIT_SHA}" ]] && die "LIBRETRO_COMMIT_SHA must be set before inherit." - S="${WORKDIR}/${LIBRETRO_REPO_NAME##*/}-${LIBRETRO_COMMIT_SHA}" - : ${SRC_URI:="https://github.com/${LIBRETRO_REPO_NAME}/archive/${LIBRETRO_COMMIT_SHA}.tar.gz -> ${P}.tar.gz"} -fi -inherit flag-o-matic - -# @ECLASS-VARIABLE: LIBRETRO_CORE_LIB_FILE -# @REQUIRED -# @DESCRIPTION: -# Absolute path of this Libretro core's shared library. -: ${LIBRETRO_CORE_LIB_FILE:="${S}/${LIBRETRO_CORE_NAME}_libretro.so"} - -case "${EAPI:-0}" in - 6|7) - EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install - ;; - *) - die "EAPI=${EAPI} is not supported" ;; -esac - -# @FUNCTION: libretro-core_src_unpack -# @DESCRIPTION: -# The libretro-core src_unpack function which is exported. -# -# This function retrieves the remote Libretro core info files. -libretro-core_src_unpack() { - # If this is a live ebuild, retrieve this core's remote repository. - if [[ ${PV} == *9999 ]]; then - git-r3_src_unpack - # Add used commit SHA for version information, the above could also work. - LIBRETRO_COMMIT_SHA=$(git -C "${WORKDIR}/${P}" rev-parse HEAD) - # Else, unpack this core's local tarball. - else - default_src_unpack - fi -} - -# @FUNCTION: libretro-core_src_prepare -# @DESCRIPTION: -# The libretro-core src_prepare function which is exported. -# -# This function prepares the source by making custom modifications. -libretro-core_src_prepare() { - default_src_prepare - # Populate COMMIT for GIT_VERSION - local custom_libretro_commit_sha="\" ${LIBRETRO_COMMIT_SHA:0:7}\"" - local makefile - local flags_modified=0 - local shopt_saved=$(shopt -p nullglob) - shopt -s nullglob - for makefile in "${S}"/[Mm]akefile* "${S}"/target-libretro/[Mm]akefile*; do - # * Convert CRLF to LF - # * Expand *FLAGS to prevent potential self-references - # * Where LDFLAGS directly define the link version - # script append LDFLAGS and LIBS - # * Where SHARED is used to provide shared linking - # flags ensure final link command includes LDFLAGS - # and LIBS - # * Always use $(CFLAGS) when calling $(CC) - # * Add short-rev to Makefile - sed \ - -e 's/\r$//g' \ - -e "/flags.*=/s:-O[[:digit:]]:${CFLAGS}:g" \ - -e "/CFLAGS.*=/s:-O[[:digit:]]:${CFLAGS}:g" \ - -e "/.*,--version-script=.*/s:$: ${LDFLAGS} ${LIBS}:g" \ - -e "/\$(CC)/s:\(\$(SHARED)\):\1 ${LDFLAGS} ${LIBS}:" \ - -e 's:\(\$(CC)\):\1 \$(CFLAGS):g' \ - -e "s/GIT_VERSION\s.=.*$/GIT_VERSION=${custom_libretro_commit_sha}/g" \ - -i "${makefile}" || die "Failed to use custom cflags in ${makefile}" - done - ${shopt_saved} - export OPTFLAGS="${CFLAGS}" -} - -# @VARIABLE: myemakeargs -# @DEFAULT_UNSET -# @DESCRIPTION: -# Optional emake arguments as a bash array. Should be defined before calling -# src_compile. -# @CODE -# src_compile() { -# local myemakeargs=( -# $(usex neon "HAVE_NEON=1" "") -# ) -# libretro-core_src_compile -# } -# @CODE - -# @FUNCTION: libretro-core_src_compile -# @DESCRIPTION: -# The libretro-core src_compile function which is exported. -# -# This function compiles the shared library for this Libretro core. -libretro-core_src_compile() { - # most (if not all) libretro makefiles use DEBUG=1 - # to enable additional debug features. - emake CC=$(tc-getCC) CXX=$(tc-getCXX) \ - $(usex debug "DEBUG=1" "") "${myemakeargs[@]}" \ - $([[ -f makefile.libretro ]] && echo '-f makefile.libretro') \ - $([[ -f Makefile.libretro ]] && echo '-f Makefile.libretro') -} - -# @FUNCTION: libretro-core_src_install -# @DESCRIPTION: -# The libretro-core src_install function which is exported. -# -# This function installs the shared library for this Libretro core. -libretro-core_src_install() { - # Absolute path of the directory containing Libretro shared libraries. - local libretro_lib_dir="/usr/$(get_libdir)/libretro" - # If this core's shared library exists, install that. - if [[ -f "${LIBRETRO_CORE_LIB_FILE}" ]]; then - exeinto "${libretro_lib_dir}" - doexe "${LIBRETRO_CORE_LIB_FILE}" - else - # Basename of this library. - local lib_basename="${LIBRETRO_CORE_LIB_FILE##*/}" - - # Absolute path to which this library was installed. - local lib_file_target="${ED}${libretro_lib_dir}/${lib_basename}" - - # If this library was *NOT* installed, fail. - [[ -f "${lib_file_target}" ]] || - die "Libretro core shared library \"${lib_file_target}\" not installed." - fi -} - -fi # end _LIBRETRO_CORE_ECLASS guard diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass deleted file mode 100644 index d2da56ba39..0000000000 --- a/eclass/netsurf.eclass +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: netsurf.eclass -# @MAINTAINER: -# maintainer-needed@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: Handle buildsystem of www.netsurf-browser.org components -# @DESCRIPTION: -# Handle unpacking and usage of separate buildsystem tarball and manage -# multilib build, static-libs generation and debug building. -# -# Supports PATCHES and DOCS as in base.eclass - -case ${EAPI:-0} in - 0|1|2|3|4) die "this eclass doesn't support EAPI<5" ;; - *) ;; -esac - -inherit eutils toolchain-funcs multilib-minimal - -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install - -# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM -# @DESCRIPTION: -# Select version of buildsystem tarball to be used along the component -# defaults to buildsystem-1.0 -NETSURF_BUILDSYSTEM="${NETSURF_BUILDSYSTEM:-buildsystem-1.0}" - -# @ECLASS-VARIABLE: NETSURF_BUILDSYSTEM_SRC_URI -# @DESCRIPTION: -# Download link for NETSURF_BUILDSYSTEM, add to SRC_URI iff set explicitly. -NETSURF_BUILDSYSTEM_SRC_URI="http://download.netsurf-browser.org/libs/releases/${NETSURF_BUILDSYSTEM}.tar.gz -> netsurf-${NETSURF_BUILDSYSTEM}.tar.gz" - -# @ECLASS-VARIABLE: NETSURF_COMPONENT_TYPE -# @DESCRIPTION: -# Passed to buildsystem as COMPONENT_TYPE, valid values are -# lib-shared, lib-static and binary. Defaults to "lib-static lib-shared" -NETSURF_COMPONENT_TYPE="${NETSURF_COMPONENT_TYPE:-lib-static lib-shared}" - -# @ECLASS-VARIABLE: SRC_URI -# @DESCRIPTION: -# Defaults to http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz -# and NETSURF_BUILDSYSTEM_SRC_URI. -if [ -z "${SRC_URI}" ] ; then - SRC_URI="http://download.netsurf-browser.org/libs/releases/${P}-src.tar.gz - ${NETSURF_BUILDSYSTEM_SRC_URI}" -fi - -IUSE="debug" -if has lib-static ${NETSURF_COMPONENT_TYPE} ; then - IUSE+=" static-libs" -fi - -DEPEND="virtual/pkgconfig" - -# @FUNCTION: netsurf_src_prepare -# @DESCRIPTION: -# Apply and PATCHES and multilib_copy_sources for in-source build. -netsurf_src_prepare() { - [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" - debug-print "$FUNCNAME: applying user patches" - epatch_user - - multilib_copy_sources -} - -# @ECLASS-VARIABLE: netsurf_makeconf -# @DESCRIPTION: -# Configuration variable bash array to be passed to emake calls. -# Defined at netsurf_src_configure and can be altered afterwards. - -# @FUNCTION: netsurf_src_configure -# @DESCRIPTION: -# Setup netsurf_makeconf and run multilib-minimal_src_configure. -# A default multilib_src_configure is provided by this eclass. -netsurf_src_configure() { - netsurf_makeconf=( - NSSHARED=${WORKDIR}/${NETSURF_BUILDSYSTEM} - Q= - HOST_CC="\$(CC)" - CCOPT= - CCNOOPT= - CCDBG= - LDDBG= - AR="$(tc-getAR)" - BUILD=$(usex debug debug release) - PREFIX="${EROOT}"usr - ) - - multilib-minimal_src_configure -} - -multilib_src_configure() { - sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ - -i Makefile || die - if [ -f ${PN}.pc.in ] ; then - sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ - -i ${PN}.pc.in || die - fi - sed -e 's:/bin/which:which:' \ - -i ../${NETSURF_BUILDSYSTEM}/makefiles/Makefile.tools || die -} - -# @FUNCTION: netsurf_make -# @DESCRIPTION: -# Calls emake with netsurf_makeconf and toolchain CC/LD -# as arguments for every NETSURF_COMPONENT_TYPE if activated. -netsurf_make() { - for COMPONENT_TYPE in ${NETSURF_COMPONENT_TYPE} ; do - if [ "${COMPONENT_TYPE}" == "lib-static" ] ; then - if ! use static-libs ; then - continue - fi - fi - emake CC="$(tc-getCC)" LD="$(tc-getLD)" "${netsurf_makeconf[@]}" \ - COMPONENT_TYPE=${COMPONENT_TYPE} LIBDIR="$(get_libdir)" "$@" - done -} - -# @FUNCTION: netsurf_src_compile -# @DESCRIPTION: -# Calls multilib-minimal_src_compile and netsurf_make doc if USE=doc. -# A default multilib_src_compile is provided by this eclass. -netsurf_src_compile() { - local problems=$(egrep -Hn -- ' (-O.?|-g)( |$)' \ - $(find . -type f -name 'Makefile*')) - if [ -n "${problems}" ] ; then - elog "found bad flags: -${problems}" - fi - - multilib-minimal_src_compile "$@" - - if has doc ${USE} ; then - netsurf_make "$@" docs - fi -} - -multilib_src_compile() { - netsurf_make "$@" -} - -# @FUNCTION: netsurf_src_test -# @DESCRIPTION: -# Calls multilib-minimal_src_test. -# A default multilib_src_test is provided by this eclass. -netsurf_src_test() { - multilib-minimal_src_test "$@" -} - -multilib_src_test() { - netsurf_make test "$@" -} - -# @FUNCTION: netsurf_src_install -# @DESCRIPTION: -# Calls multilib-minimal_src_install. -# A default multilib_src_test is provided by this eclass. -# A default multilib_src_install is provided by this eclass. -netsurf_src_install() { - multilib-minimal_src_install "$@" -} - -multilib_src_install() { - #DEFAULT_ABI may not be the last. - #install to clean dir, rename binaries, move everything back - if [ "${ABI}" == "${DEFAULT_ABI}" ] ; then - netsurf_make DESTDIR="${D}" install "$@" - else - netsurf_make DESTDIR="${D}"${ABI} install "$@" - if [ "${ABI}" != "${DEFAULT_ABI}" ] ; then - find "${D}"${ABI}/usr/bin -type f -exec mv {} {}.${ABI} \; - fi - mv "${D}"${ABI}/* "${D}" || die - rmdir "${D}"${ABI} || die - fi -} diff --git a/eclass/out-of-source.eclass b/eclass/out-of-source.eclass deleted file mode 100644 index bbac555a7f..0000000000 --- a/eclass/out-of-source.eclass +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: out-of-source.eclass -# @MAINTAINER: -# Michał Górny -# @SUPPORTED_EAPIS: 6 7 -# @BLURB: convenient wrapper to build autotools packages out-of-source -# @DESCRIPTION: -# This eclass provides a minimalistic wrapper interface to easily -# build autotools (and alike) packages out-of-source. It is meant -# to resemble the interface used by multilib-minimal without actually -# requiring the package to be multilib. -# -# For the simplest ebuilds, it is enough to inherit the eclass -# and the new phase functions will automatically build the package -# out-of-source. If you need to redefine one of the default phases -# src_configure() through src_install(), you need to define -# the matching sub-phases: my_src_configure(), my_src_compile(), -# my_src_test() and/or my_src_install(). Those sub-phase functions -# will be run inside the build directory. Additionally, -# my_src_install_all() is provided to perform doc-install and other -# common tasks that are done in source directory. -# -# Example use: -# @CODE -# inherit out-of-source -# -# my_src_configure() { -# econf \ -# --disable-static -# } -# @CODE - -case ${EAPI} in - 6|7);; - *) die "EAPI ${EAPI:-0} unsupported (too old)";; -esac - -EXPORT_FUNCTIONS src_configure src_compile src_test src_install - -if [[ ! ${_OUT_OF_SOURCE_ECLASS} ]]; then - -# @FUNCTION: out-of-source_src_configure -# @DESCRIPTION: -# The default src_configure() implementation establishes a BUILD_DIR, -# sets ECONF_SOURCE to the current directory (usually S), and runs -# my_src_configure() (or the default) inside it. -out-of-source_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - # set some BUILD_DIR if we don't have one yet - : "${BUILD_DIR:=${WORKDIR}/${P}_build}" - local ECONF_SOURCE=${PWD} - - mkdir -p "${BUILD_DIR}" || die - pushd "${BUILD_DIR}" >/dev/null || die - if declare -f my_src_configure >/dev/null ; then - my_src_configure - else - default_src_configure - fi - popd >/dev/null || die -} - -# @FUNCTION: out-of-source_src_compile -# @DESCRIPTION: -# The default src_compile() implementation runs my_src_compile() -# (or the default) inside the build directory. -out-of-source_src_compile() { - debug-print-function ${FUNCNAME} "$@" - - pushd "${BUILD_DIR}" >/dev/null || die - if declare -f my_src_compile >/dev/null ; then - my_src_compile - else - default_src_compile - fi - popd >/dev/null || die -} - -# @FUNCTION: out-of-source_src_test -# @DESCRIPTION: -# The default src_test() implementation runs my_src_test() -# (or the default) inside the build directory. -out-of-source_src_test() { - debug-print-function ${FUNCNAME} "$@" - - pushd "${BUILD_DIR}" >/dev/null || die - if declare -f my_src_test >/dev/null ; then - my_src_test - else - default_src_test - fi - popd >/dev/null || die -} - -# @FUNCTION: out-of-source_src_install -# @DESCRIPTION: -# The default src_install() implementation runs my_src_install() -# (or the 'make install' part of the default) inside the build directory, -# followed by a call to my_src_install_all() (or 'einstalldocs' part -# of the default) in the original working directory. -out-of-source_src_install() { - debug-print-function ${FUNCNAME} "$@" - - pushd "${BUILD_DIR}" >/dev/null || die - if declare -f my_src_install >/dev/null ; then - my_src_install - else - if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then - emake DESTDIR="${D}" install - fi - fi - popd >/dev/null || die - - if declare -f my_src_install_all >/dev/null ; then - my_src_install_all - else - einstalldocs - fi -} - -_OUT_OF_SOURCE_ECLASS=1 -fi diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass deleted file mode 100644 index b76604b1af..0000000000 --- a/eclass/postgres.eclass +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -inherit user -EXPORT_FUNCTIONS pkg_setup - -# @ECLASS: postgres.eclass -# @MAINTAINER: -# PostgreSQL -# @AUTHOR: Aaron W. Swenson -# @SUPPORTED_EAPIS: 5 6 -# @BLURB: An eclass for PostgreSQL-related packages -# @DESCRIPTION: -# This eclass provides common utility functions that many -# PostgreSQL-related packages perform, such as checking that the -# currently selected PostgreSQL slot is within a range, adding a system -# user to the postgres system group, and generating dependencies. - - -case ${EAPI:-0} in - 5|6) ;; - *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; -esac - -# @ECLASS-VARIABLE: _POSTGRES_ALL_VERSIONS -# @INTERNAL -# @DESCRIPTION: -# List of versions to reverse sort POSTGRES_COMPAT slots - -_POSTGRES_ALL_VERSIONS=( 12 11 10 9.6 9.5 9.4 9.3 9.2 ) - - - -# @ECLASS-VARIABLE: POSTGRES_COMPAT -# @DEFAULT_UNSET -# @DESCRIPTION: -# A Bash array containing a list of compatible PostgreSQL slots as -# defined by the developer. If declared, must be declared before -# inheriting this eclass. Example: -#@CODE -#POSTGRES_COMPAT=( 9.2 9.3 9.4 9.5 9.6 10 ) -#POSTGRES_COMPAT=( 9.{2,3} 9.{4..6} 10 ) # Same as previous -#@CODE - -# @ECLASS-VARIABLE: POSTGRES_DEP -# @DESCRIPTION: -# An automatically generated dependency string suitable for use in -# DEPEND and RDEPEND declarations. -POSTGRES_DEP="dev-db/postgresql:=" - -# @ECLASS-VARIABLE: POSTGRES_USEDEP -# @DEFAULT_UNSET -# @DESCRIPTION: -# Add the 2-Style and/or 4-Style use dependencies without brackets to be used -# for POSTGRES_DEP. If declared, must be declared before inheriting this eclass. -declare -p POSTGRES_USEDEP &>/dev/null && POSTGRES_DEP+="[${POSTGRES_USEDEP}]" - -# @ECLASS-VARIABLE: POSTGRES_REQ_USE -# @DEFAULT_UNSET -# @DESCRIPTION: -# An automatically generated REQUIRED_USE-compatible string built upon -# POSTGRES_COMPAT. REQUIRED_USE="... ${POSTGRES_REQ_USE}" is only -# required if the package must build against one of the PostgreSQL slots -# declared in POSTGRES_COMPAT. - -# @ECLASS-VARIABLE: _POSTGRES_COMPAT -# @INTERNAL -# @DESCRIPTION: -# Copy of POSTGRES_COMPAT, reverse sorted -_POSTGRES_COMPAT=() - - -if declare -p POSTGRES_COMPAT &> /dev/null ; then - # Reverse sort the given POSTGRES_COMPAT so that the most recent - # slot is preferred over an older slot. - # -- do we care if dependencies are deterministic by USE flags? - for i in ${_POSTGRES_ALL_VERSIONS[@]} ; do - has ${i} ${POSTGRES_COMPAT[@]} && _POSTGRES_COMPAT+=( ${i} ) - done - - POSTGRES_DEP="" - POSTGRES_REQ_USE=" || (" - for slot in "${_POSTGRES_COMPAT[@]}" ; do - POSTGRES_DEP+=" postgres_targets_postgres${slot/\./_}? ( dev-db/postgresql:${slot}=" - declare -p POSTGRES_USEDEP &>/dev/null && \ - POSTGRES_DEP+="[${POSTGRES_USEDEP}]" - POSTGRES_DEP+=" )" - - IUSE+=" postgres_targets_postgres${slot/\./_}" - POSTGRES_REQ_USE+=" postgres_targets_postgres${slot/\./_}" - done - POSTGRES_REQ_USE+=" )" -fi - - -# @FUNCTION: postgres_check_slot -# @DESCRIPTION: -# Verify that the currently selected PostgreSQL slot is set to one of -# the slots defined in POSTGRES_COMPAT. Automatically dies unless a -# POSTGRES_COMPAT slot is selected. Should be called in pkg_pretend(). -postgres_check_slot() { - if ! declare -p POSTGRES_COMPAT &>/dev/null; then - die 'POSTGRES_COMPAT not declared.' - fi - - # Don't die because we can't run postgresql-config during pretend. - [[ "$EBUILD_PHASE" = "pretend" && -z "$(which postgresql-config 2> /dev/null)" ]] \ - && return 0 - - if has $(postgresql-config show 2> /dev/null) "${POSTGRES_COMPAT[@]}"; then - return 0 - else - eerror "PostgreSQL slot must be set to one of: " - eerror " ${POSTGRES_COMPAT[@]}" - die "Incompatible PostgreSQL slot eselected" - fi -} - -# @FUNCTION: postgres_new_user -# @USAGE: [user [(uid|-1) [(shell|-1) [(homedir|-1) [groups]]]]] -# @DESCRIPTION: -# Creates the "postgres" system group and user -- which is separate from -# the database user -- and, optionally, the developer defined user. There -# are no required parameters. -# -# When given a user to create, it'll be created with the next available -# uid, default shell set to /bin/false, default homedir is /dev/null, -# and added to the "postgres" system group. You can use "-1" to skip any -# parameter except user or groups. -postgres_new_user() { - enewgroup postgres 70 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres - - if [[ $# -gt 0 ]] ; then - if [[ "$1" = "postgres" ]] ; then - ewarn "Username 'postgres' implied, skipping" - else - local groups=$5 - [[ -n "${groups}" ]] && groups+=",postgres" || groups="postgres" - enewuser "$1" "${2:--1}" "${3:--1}" "${4:--1}" "${groups}" - fi - fi -} - -# @FUNCTION: postgres_pkg_setup -# @DESCRIPTION: -# Initialize environment variable(s) according to the best -# installed version of PostgreSQL that is also in POSTGRES_COMPAT. This -# is required if pkg_setup() is declared in the ebuild. -# Exports PG_SLOT, PG_CONFIG, and PKG_CONFIG_PATH. -postgres_pkg_setup() { - debug-print-function ${FUNCNAME} "${@}" - - local compat_slot - local best_slot - for compat_slot in "${_POSTGRES_COMPAT[@]}"; do - if use "postgres_targets_postgres${compat_slot/\./_}"; then - best_slot="${compat_slot}" - break - fi - done - - if [[ -z "${best_slot}" ]]; then - local flags f - for f in "${_POSTGRES_COMPAT[@]}"; do - flags+=" postgres${f/./_}" - done - - eerror "POSTGRES_TARGETS must contain at least one of:" - eerror " ${flags}" - die "No suitable POSTGRES_TARGETS enabled." - fi - - export PG_SLOT=${best_slot} - export PG_CONFIG=$(which pg_config${best_slot//./}) - - local pg_pkg_config_path="$(${PG_CONFIG} --libdir)/pkgconfig" - if [[ -n "${PKG_CONFIG_PATH}" ]]; then - export PKG_CONFIG_PATH="${pg_pkg_config_path}:${PKG_CONFIG_PATH}" - else - export PKG_CONFIG_PATH="${pg_pkg_config_path}" - fi - - elog "PostgreSQL Target: ${best_slot}" -} diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass deleted file mode 100644 index 613af912b9..0000000000 --- a/eclass/qt5-build.eclass +++ /dev/null @@ -1,920 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: qt5-build.eclass -# @MAINTAINER: -# qt@gentoo.org -# @AUTHOR: -# Davide Pesavento -# @SUPPORTED_EAPIS: 6 -# @BLURB: Eclass for Qt5 split ebuilds. -# @DESCRIPTION: -# This eclass contains various functions that are used when building Qt5. -# Requires EAPI 6. - -if [[ ${CATEGORY} != dev-qt ]]; then - die "qt5-build.eclass is only to be used for building Qt 5" -fi - -case ${EAPI} in - 6) : ;; - *) die "qt5-build.eclass: unsupported EAPI=${EAPI:-0}" ;; -esac - -# @ECLASS-VARIABLE: QT5_MODULE -# @PRE_INHERIT -# @DESCRIPTION: -# The upstream name of the module this package belongs to. Used for -# SRC_URI and EGIT_REPO_URI. Must be set before inheriting the eclass. -: ${QT5_MODULE:=${PN}} - -# @ECLASS-VARIABLE: QT5_TARGET_SUBDIRS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array variable containing the source directories that should be built. -# All paths must be relative to ${S}. - -# @ECLASS-VARIABLE: QT5_GENTOO_CONFIG -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array of triplets that are evaluated in src_install -# to generate the per-package list of enabled QT_CONFIG features and macro -# definitions, which are then merged together with all other Qt5 packages -# installed on the system to obtain the global qconfig.{h,pri} files. - -# @ECLASS-VARIABLE: QT5_GENTOO_PRIVATE_CONFIG -# @DEFAULT_UNSET -# @DESCRIPTION: -# Array of pairs that are evaluated in src_install -# to generate the per-package list of enabled QT.global_private features, -# which are then merged together with all other Qt5 packages installed on the -# system to obtain the global qmodule.pri file. - -# @ECLASS-VARIABLE: VIRTUALX_REQUIRED -# @DESCRIPTION: -# For proper description see virtualx.eclass man page. -# Here we redefine default value to be manual, if your package needs virtualx -# for tests you should proceed with setting VIRTUALX_REQUIRED=test. -: ${VIRTUALX_REQUIRED:=manual} - -inherit eapi7-ver estack flag-o-matic toolchain-funcs virtualx - -HOMEPAGE="https://www.qt.io/" -LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3" -SLOT=5/$(ver_cut 1-2) - -QT5_MINOR_VERSION=$(ver_cut 2) -readonly QT5_MINOR_VERSION - -case ${PV} in - 5.9999) - # git dev branch - QT5_BUILD_TYPE="live" - EGIT_BRANCH="dev" - ;; - 5.?.9999|5.??.9999|5.???.9999) - # git stable branch - QT5_BUILD_TYPE="live" - EGIT_BRANCH=${PV%.9999} - ;; - *_alpha*|*_beta*|*_rc*) - # development release - QT5_BUILD_TYPE="release" - MY_P=${QT5_MODULE}-everywhere-src-${PV/_/-} - SRC_URI="https://download.qt.io/development_releases/qt/${PV%.*}/${PV/_/-}/submodules/${MY_P}.tar.xz" - S=${WORKDIR}/${MY_P} - ;; - *) - # official stable release - QT5_BUILD_TYPE="release" - MY_P=${QT5_MODULE}-everywhere-src-${PV} - SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${MY_P}.tar.xz" - S=${WORKDIR}/${MY_P} - ;; -esac -readonly QT5_BUILD_TYPE - -EGIT_REPO_URI=( - "https://code.qt.io/qt/${QT5_MODULE}.git" - "https://github.com/qt/${QT5_MODULE}.git" -) -[[ ${QT5_BUILD_TYPE} == live ]] && inherit git-r3 - -# @ECLASS-VARIABLE: QT5_BUILD_DIR -# @OUTPUT_VARIABLE -# @DESCRIPTION: -# Build directory for out-of-source builds. -case ${QT5_BUILD_TYPE} in - live) : ${QT5_BUILD_DIR:=${S}_build} ;; - release) : ${QT5_BUILD_DIR:=${S}} ;; # workaround for bug 497312 -esac - -IUSE="debug test" - -[[ ${QT5_BUILD_TYPE} == release ]] && RESTRICT+=" test" # bug 457182 - -DEPEND=" - dev-lang/perl - virtual/pkgconfig -" -if [[ ${PN} != qttest ]]; then - DEPEND+=" test? ( ~dev-qt/qttest-${PV} )" -fi -RDEPEND=" - dev-qt/qtchooser -" - - -###### Phase functions ###### - -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm - -# @FUNCTION: qt5-build_src_unpack -# @DESCRIPTION: -# Unpacks the sources. -qt5-build_src_unpack() { - # bug 307861 - if [[ ${PN} == qtwebengine ]]; then - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - ewarn - ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." - ewarn "You may experience really long compilation times and/or increased memory usage." - ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." - ewarn - fi - eshopts_pop - fi - - case ${QT5_BUILD_TYPE} in - live) git-r3_src_unpack ;& - release) default ;; - esac -} - -# @FUNCTION: qt5-build_src_prepare -# @DESCRIPTION: -# Prepares the environment and patches the sources if necessary. -qt5-build_src_prepare() { - qt5_prepare_env - - if [[ ${QT5_MODULE} == qtbase ]]; then - qt5_symlink_tools_to_build_dir - - # Avoid unnecessary qmake recompilations - sed -i -e "/Creating qmake/i if [ '!' -e \"\$outpath/bin/qmake\" ]; then" \ - -e '/echo "Done."/a fi' configure || die "sed failed (skip qmake bootstrap)" - - # Respect CC, CXX, *FLAGS, MAKEOPTS and EXTRA_EMAKE when bootstrapping qmake - sed -i -e "/outpath\/qmake\".*\"\$MAKE\")/ s:): \ - ${MAKEOPTS} ${EXTRA_EMAKE} 'CC=$(tc-getCC)' 'CXX=$(tc-getCXX)' \ - 'QMAKE_CFLAGS=${CFLAGS}' 'QMAKE_CXXFLAGS=${CXXFLAGS}' 'QMAKE_LFLAGS=${LDFLAGS}'&:" \ - -e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \ - configure || die "sed failed (respect env for qmake build)" - sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \ - qmake/Makefile.unix || die "sed failed (CPPFLAGS for qmake build)" - - # Respect CXX in bsymbolic_functions, fvisibility, precomp, and a few other tests - sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \ - configure || die "sed failed (QMAKE_CONF_COMPILER)" - - if [[ ${QT5_MINOR_VERSION} -lt 12 ]]; then - # Don't add -O3 to CXXFLAGS (bug 549140) - sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \ - src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)" - fi - - # Respect build variables in configure tests (bug #639494) - sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die - fi - - default -} - -# @FUNCTION: qt5-build_src_configure -# @DESCRIPTION: -# Runs qmake in the target directories. For packages -# in qtbase, ./configure is also run before qmake. -qt5-build_src_configure() { - if [[ ${QT5_MODULE} == qtbase ]]; then - qt5_base_configure - fi - - qt5_foreach_target_subdir qt5_qmake -} - -# @FUNCTION: qt5-build_src_compile -# @DESCRIPTION: -# Runs emake in the target directories. -qt5-build_src_compile() { - qt5_foreach_target_subdir emake -} - -# @FUNCTION: qt5-build_src_test -# @DESCRIPTION: -# Runs tests in the target directories. -qt5-build_src_test() { - # disable broken cmake tests (bug 474004) - local myqmakeargs=("${myqmakeargs[@]}" -after SUBDIRS-=cmake SUBDIRS-=installed_cmake) - - qt5_foreach_target_subdir qt5_qmake - qt5_foreach_target_subdir emake - - # create a custom testrunner script that correctly sets - # LD_LIBRARY_PATH before executing the given test - local testrunner=${QT5_BUILD_DIR}/gentoo-testrunner - cat > "${testrunner}" <<-_EOF_ || die - #!/bin/sh - export LD_LIBRARY_PATH="${QT5_BUILD_DIR}/lib:${QT5_LIBDIR}" - "\$@" - _EOF_ - chmod +x "${testrunner}" - - set -- qt5_foreach_target_subdir emake TESTRUNNER="'${testrunner}'" check - if [[ ${VIRTUALX_REQUIRED} == test ]]; then - virtx "$@" - else - "$@" - fi -} - -# @FUNCTION: qt5-build_src_install -# @DESCRIPTION: -# Runs emake install in the target directories. -qt5-build_src_install() { - qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install - - if [[ ${PN} == qtcore ]]; then - pushd "${QT5_BUILD_DIR}" >/dev/null || die - - set -- emake INSTALL_ROOT="${D}" \ - sub-qmake-qmake-aux-pro-install_subtargets \ - install_{syncqt,mkspecs} - - einfo "Running $*" - "$@" - - popd >/dev/null || die - - if [[ ${QT5_MINOR_VERSION} -lt 12 ]]; then - docompress -x "${QT5_DOCDIR#${EPREFIX}}"/global - fi - - # install an empty Gentoo/gentoo-qconfig.h in ${D} - # so that it's placed under package manager control - > "${T}"/gentoo-qconfig.h - ( - insinto "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo - doins "${T}"/gentoo-qconfig.h - ) - - # include gentoo-qconfig.h at the beginning of QtCore/qconfig.h - sed -i -e '1i #include \n' \ - "${D}${QT5_HEADERDIR}"/QtCore/qconfig.h \ - || die "sed failed (qconfig.h)" - - # install qtchooser configuration file - cat > "${T}/qt5-${CHOST}.conf" <<-_EOF_ || die - ${QT5_BINDIR} - ${QT5_LIBDIR} - _EOF_ - - ( - insinto /etc/xdg/qtchooser - doins "${T}/qt5-${CHOST}.conf" - ) - - # convenience symlinks - dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/5.conf - dosym qt5-"${CHOST}".conf /etc/xdg/qtchooser/qt5.conf - # TODO bug 522646: write an eselect module to manage default.conf - dosym qt5.conf /etc/xdg/qtchooser/default.conf - fi - - qt5_install_module_config - - # prune libtool files - find "${D}" -name '*.la' -delete || die -} - -# @FUNCTION: qt5-build_pkg_postinst -# @DESCRIPTION: -# Regenerate configuration after installation or upgrade/downgrade. -qt5-build_pkg_postinst() { - qt5_regenerate_global_configs -} - -# @FUNCTION: qt5-build_pkg_postrm -# @DESCRIPTION: -# Regenerate configuration when a module is completely removed. -qt5-build_pkg_postrm() { - if [[ -z ${REPLACED_BY_VERSION} && ${PN} != qtcore ]]; then - qt5_regenerate_global_configs - fi -} - - -###### Public helpers ###### - -# @FUNCTION: qt_use -# @USAGE: [feature] [enableval] -# @DESCRIPTION: -# is the name of a flag in IUSE. -# -# Outputs "-${enableval}-${feature}" if is enabled, "-no-${feature}" -# otherwise. If [feature] is not specified, is used in its place. -# If [enableval] is not specified, the "-${enableval}" prefix is omitted. -qt_use() { - [[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument" - - usex "$1" "${3:+-$3}-${2:-$1}" "-no-${2:-$1}" -} - -# @FUNCTION: qt_use_compile_test -# @USAGE: [config] -# @DESCRIPTION: -# is the name of a flag in IUSE. -# [config] is the argument of qtCompileTest, defaults to . -# -# This function is useful to disable optional dependencies that are checked -# at qmake-time using the qtCompileTest() function. If is disabled, -# the compile test is skipped and the dependency is assumed to be unavailable, -# i.e. the corresponding feature will be disabled. Note that all invocations -# of this function must happen before calling qt5-build_src_configure. -qt_use_compile_test() { - [[ $# -ge 1 ]] || die "${FUNCNAME}() requires at least one argument" - - if ! use "$1"; then - mkdir -p "${QT5_BUILD_DIR}" || die - echo "CONFIG += done_config_${2:-$1}" >> "${QT5_BUILD_DIR}"/.qmake.cache || die - fi -} - -# @FUNCTION: qt_use_disable_config -# @USAGE: -# @DESCRIPTION: -# is the name of a flag in IUSE. -# is the (lowercase) name of a Qt5 config entry. -# is a list of one or more qmake project files. -# -# This function patches to treat as disabled -# when is disabled, otherwise it does nothing. -# This can be useful to avoid an automagic dependency when the config entry -# is enabled on the system but the corresponding USE flag is disabled. -qt_use_disable_config() { - [[ $# -ge 3 ]] || die "${FUNCNAME}() requires at least three arguments" - - local flag=$1 - local config=$2 - shift 2 - - if ! use "${flag}"; then - echo "$@" | xargs sed -i -e "s/qtConfig(${config})/false/g" || die - fi -} - -# @FUNCTION: qt_use_disable_mod -# @USAGE: -# @DESCRIPTION: -# is the name of a flag in IUSE. -# is the (lowercase) name of a Qt5 module. -# is a list of one or more qmake project files. -# -# This function patches to treat as not installed -# when is disabled, otherwise it does nothing. -# This can be useful to avoid an automagic dependency when the module -# is present on the system but the corresponding USE flag is disabled. -qt_use_disable_mod() { - [[ $# -ge 3 ]] || die "${FUNCNAME}() requires at least three arguments" - - local flag=$1 - local module=$2 - shift 2 - - if ! use "${flag}"; then - echo "$@" | xargs sed -i -e "s/qtHaveModule(${module})/false/g" || die - fi -} - - -###### Internal functions ###### - -# @FUNCTION: qt5_prepare_env -# @INTERNAL -# @DESCRIPTION: -# Prepares the environment for building Qt. -qt5_prepare_env() { - # setup installation directories - # note: keep paths in sync with qmake-utils.eclass - QT5_PREFIX=${EPREFIX}/usr - QT5_HEADERDIR=${QT5_PREFIX}/include/qt5 - QT5_LIBDIR=${QT5_PREFIX}/$(get_libdir) - QT5_ARCHDATADIR=${QT5_PREFIX}/$(get_libdir)/qt5 - QT5_BINDIR=${QT5_ARCHDATADIR}/bin - QT5_PLUGINDIR=${QT5_ARCHDATADIR}/plugins - QT5_LIBEXECDIR=${QT5_ARCHDATADIR}/libexec - QT5_IMPORTDIR=${QT5_ARCHDATADIR}/imports - QT5_QMLDIR=${QT5_ARCHDATADIR}/qml - QT5_DATADIR=${QT5_PREFIX}/share/qt5 - if [[ ${QT5_MINOR_VERSION} -lt 12 ]]; then - QT5_DOCDIR=${QT5_PREFIX}/share/doc/qt-${PV} - else - QT5_DOCDIR=${QT5_PREFIX}/share/qt5-doc - fi - QT5_TRANSLATIONDIR=${QT5_DATADIR}/translations - QT5_EXAMPLESDIR=${QT5_DATADIR}/examples - QT5_TESTSDIR=${QT5_DATADIR}/tests - QT5_SYSCONFDIR=${EPREFIX}/etc/xdg - readonly QT5_PREFIX QT5_HEADERDIR QT5_LIBDIR QT5_ARCHDATADIR \ - QT5_BINDIR QT5_PLUGINDIR QT5_LIBEXECDIR QT5_IMPORTDIR \ - QT5_QMLDIR QT5_DATADIR QT5_DOCDIR QT5_TRANSLATIONDIR \ - QT5_EXAMPLESDIR QT5_TESTSDIR QT5_SYSCONFDIR - - if [[ ${QT5_MODULE} == qtbase ]]; then - # see mkspecs/features/qt_config.prf - export QMAKEMODULES="${QT5_BUILD_DIR}/mkspecs/modules:${S}/mkspecs/modules:${QT5_ARCHDATADIR}/mkspecs/modules" - fi -} - -# @FUNCTION: qt5_foreach_target_subdir -# @INTERNAL -# @DESCRIPTION: -# Executes the command given as argument from inside each directory -# listed in QT5_TARGET_SUBDIRS. Handles autotests subdirs automatically. -qt5_foreach_target_subdir() { - [[ -z ${QT5_TARGET_SUBDIRS[@]} ]] && QT5_TARGET_SUBDIRS=("") - - local subdir= - for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do - if [[ ${EBUILD_PHASE} == test ]]; then - subdir=tests/auto${subdir#src} - [[ -d ${S}/${subdir} ]] || continue - fi - - local msg="Running $* ${subdir:+in ${subdir}}" - einfo "${msg}" - - mkdir -p "${QT5_BUILD_DIR}/${subdir}" || die -n || return $? - pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die -n || return $? - - "$@" || die -n "${msg} failed" || return $? - - popd >/dev/null || die -n || return $? - done -} - -# @FUNCTION: qt5_symlink_tools_to_build_dir -# @INTERNAL -# @DESCRIPTION: -# Symlinks qmake and a few other tools to QT5_BUILD_DIR, -# so that they can be used when building other modules. -qt5_symlink_tools_to_build_dir() { - local tool= tools=() - if [[ ${PN} != qtcore ]]; then - tools+=(qmake moc rcc qlalr) - [[ ${PN} != qtdbus ]] && tools+=(qdbuscpp2xml qdbusxml2cpp) - [[ ${PN} != qtwidgets ]] && tools+=(uic) - fi - - mkdir -p "${QT5_BUILD_DIR}"/bin || die - pushd "${QT5_BUILD_DIR}"/bin >/dev/null || die - - for tool in "${tools[@]}"; do - [[ -e ${QT5_BINDIR}/${tool} ]] || continue - ln -s "${QT5_BINDIR}/${tool}" . || die "failed to symlink ${tool}" - done - - popd >/dev/null || die -} - -# @FUNCTION: qt5_base_configure -# @INTERNAL -# @DESCRIPTION: -# Runs ./configure for modules belonging to qtbase. -qt5_base_configure() { - # setup toolchain variables used by configure - tc-export AR CC CXX OBJDUMP RANLIB STRIP - export LD="$(tc-getCXX)" - - # bug 633838 - unset QMAKESPEC XQMAKESPEC QMAKEPATH QMAKEFEATURES - - # configure arguments - local conf=( - # installation paths - -prefix "${QT5_PREFIX}" - -bindir "${QT5_BINDIR}" - -headerdir "${QT5_HEADERDIR}" - -libdir "${QT5_LIBDIR}" - -archdatadir "${QT5_ARCHDATADIR}" - -plugindir "${QT5_PLUGINDIR}" - -libexecdir "${QT5_LIBEXECDIR}" - -importdir "${QT5_IMPORTDIR}" - -qmldir "${QT5_QMLDIR}" - -datadir "${QT5_DATADIR}" - -docdir "${QT5_DOCDIR}" - -translationdir "${QT5_TRANSLATIONDIR}" - -sysconfdir "${QT5_SYSCONFDIR}" - -examplesdir "${QT5_EXAMPLESDIR}" - -testsdir "${QT5_TESTSDIR}" - - # force appropriate compiler - $(if use kernel_FreeBSD; then - if tc-is-gcc; then - echo -platform freebsd-g++ - elif tc-is-clang; then - echo -platform freebsd-clang - fi - fi) - $(if use kernel_linux; then - if tc-is-gcc; then - echo -platform linux-g++ - elif tc-is-clang; then - echo -platform linux-clang - fi - fi) - - # configure in release mode by default, - # override via the CONFIG qmake variable - -release - -no-separate-debug-info - - # no need to forcefully build host tools in optimized mode, - # just follow the overall debug/release build type - -no-optimized-tools - - # licensing stuff - -opensource -confirm-license - - # autodetect the highest supported version of the C++ standard - #-c++std - - # build shared libraries - -shared - - # disabling accessibility is not recommended by upstream, as - # it will break QStyle and may break other internal parts of Qt - -accessibility - - # disable all SQL drivers by default, override in qtsql - -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc - -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds - - # MIPS DSP instruction set extensions - $(is-flagq -mno-dsp && echo -no-mips_dsp) - $(is-flagq -mno-dspr2 && echo -no-mips_dspr2) - - # use pkg-config to detect include and library paths - -pkg-config - - # prefer system libraries (only common hard deps here) - -system-zlib - -system-pcre - -system-doubleconversion - - # disable everything to prevent automagic deps (part 1) - -no-mtdev - -no-journald -no-syslog - -no-libpng -no-libjpeg - -no-freetype -no-harfbuzz - -no-openssl -no-libproxy - -no-xcb-xlib - $([[ ${QT5_MINOR_VERSION} -lt 12 ]] && echo -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev) - $([[ ${QT5_MINOR_VERSION} -ge 12 ]] && echo -no-xcb-xinput -no-xkbcommon) # bug 672340 - - # cannot use -no-gif because there is no way to override it later - #-no-gif - - # always enable glib event loop support - -glib - - # disable everything to prevent automagic deps (part 2) - -no-gtk - - # exclude examples and tests from default build - -nomake examples - -nomake tests - -no-compile-examples - - # disable rpath on non-prefix (bugs 380415 and 417169) - $(usex prefix '' -no-rpath) - - # print verbose information about each configure test - -verbose - - # disable everything to prevent automagic deps (part 3) - -no-cups -no-evdev -no-tslib -no-icu -no-fontconfig -no-dbus - - # let portage handle stripping - -no-strip - - # precompiled headers can cause problems on hardened, so turn them off - -no-pch - - # link-time code generation is not something we want to enable by default - -no-ltcg - - # reduced relocations cause major breakage on at least arm and ppc, so - # don't specify anything and let the configure figure out if they are - # supported; see also https://bugreports.qt.io/browse/QTBUG-36129 - #-reduce-relocations - - # use the system linker (gold will be selected automagically otherwise) - $(tc-ld-is-gold && echo -use-gold-linker || echo -no-use-gold-linker) - - # disable all platform plugins by default, override in qtgui - -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb -no-mirclient - - # disable undocumented X11-related flags, override in qtgui - # (not shown in ./configure -help output) - -no-xkb - - # always enable session management support: it doesn't need extra deps - # at configure time and turning it off is dangerous, see bug 518262 - -sm - - # typedef qreal to double (warning: changing this flag breaks the ABI) - -qreal double - - # disable OpenGL and EGL support by default, override in qtgui, - # qtopengl, qtprintsupport and qtwidgets - -no-opengl -no-egl - - # disable libinput-based generic plugin by default, override in qtgui - -no-libinput - - # respect system proxies by default: it's the most natural - # setting, and it'll become the new upstream default in 5.8 - -system-proxies - - # do not build with -Werror - -no-warnings-are-errors - - # enable in respective modules to avoid poisoning QT.global_private.enabled_features - -no-gui -no-widgets - - # module-specific options - "${myconf[@]}" - ) - - pushd "${QT5_BUILD_DIR}" >/dev/null || die - - einfo "Configuring with: ${conf[@]}" - "${S}"/configure "${conf[@]}" || die "configure failed" - - # a forwarding header is no longer created since 5.8, causing the system - # config to always be used. bug 599636 - cp src/corelib/global/qconfig.h include/QtCore/ || die - - popd >/dev/null || die - -} - -# @FUNCTION: qt5_qmake_args -# @INTERNAL -# @DESCRIPTION: -# Helper function to get the various toolchain-related variables. -qt5_qmake_args() { - echo \ - QMAKE_AR=\"$(tc-getAR)\" \ - QMAKE_CC=\"$(tc-getCC)\" \ - QMAKE_LINK_C=\"$(tc-getCC)\" \ - QMAKE_LINK_C_SHLIB=\"$(tc-getCC)\" \ - QMAKE_CXX=\"$(tc-getCXX)\" \ - QMAKE_LINK=\"$(tc-getCXX)\" \ - QMAKE_LINK_SHLIB=\"$(tc-getCXX)\" \ - QMAKE_OBJCOPY=\"$(tc-getOBJCOPY)\" \ - QMAKE_RANLIB= \ - QMAKE_STRIP=\"$(tc-getSTRIP)\" \ - QMAKE_CFLAGS=\"${CFLAGS}\" \ - QMAKE_CFLAGS_RELEASE= \ - QMAKE_CFLAGS_DEBUG= \ - QMAKE_CXXFLAGS=\"${CXXFLAGS}\" \ - QMAKE_CXXFLAGS_RELEASE= \ - QMAKE_CXXFLAGS_DEBUG= \ - QMAKE_LFLAGS=\"${LDFLAGS}\" \ - QMAKE_LFLAGS_RELEASE= \ - QMAKE_LFLAGS_DEBUG= -} - -# @FUNCTION: qt5_qmake -# @INTERNAL -# @DESCRIPTION: -# Helper function that runs qmake in the current target subdir. -# Intended to be called by qt5_foreach_target_subdir(). -qt5_qmake() { - local projectdir=${PWD/#${QT5_BUILD_DIR}/${S}} - local qmakepath= - if [[ ${QT5_MODULE} == qtbase ]]; then - qmakepath=${QT5_BUILD_DIR}/bin - else - qmakepath=${QT5_BINDIR} - fi - - "${qmakepath}"/qmake \ - "${projectdir}" \ - CONFIG+=$(usex debug debug release) \ - CONFIG-=$(usex debug release debug) \ - QMAKE_AR="$(tc-getAR) cqs" \ - QMAKE_CC="$(tc-getCC)" \ - QMAKE_LINK_C="$(tc-getCC)" \ - QMAKE_LINK_C_SHLIB="$(tc-getCC)" \ - QMAKE_CXX="$(tc-getCXX)" \ - QMAKE_LINK="$(tc-getCXX)" \ - QMAKE_LINK_SHLIB="$(tc-getCXX)" \ - QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \ - QMAKE_RANLIB= \ - QMAKE_STRIP="$(tc-getSTRIP)" \ - QMAKE_CFLAGS="${CFLAGS}" \ - QMAKE_CFLAGS_RELEASE= \ - QMAKE_CFLAGS_DEBUG= \ - QMAKE_CXXFLAGS="${CXXFLAGS}" \ - QMAKE_CXXFLAGS_RELEASE= \ - QMAKE_CXXFLAGS_DEBUG= \ - QMAKE_LFLAGS="${LDFLAGS}" \ - QMAKE_LFLAGS_RELEASE= \ - QMAKE_LFLAGS_DEBUG= \ - "${myqmakeargs[@]}" \ - || die "qmake failed (${projectdir#${S}/})" -} - -# @FUNCTION: qt5_install_module_config -# @INTERNAL -# @DESCRIPTION: -# Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} and -# ${PN}-qmodule.pri files. -qt5_install_module_config() { - local x qconfig_add= qconfig_remove= qprivateconfig_add= qprivateconfig_remove= - - > "${T}"/${PN}-qconfig.h - > "${T}"/${PN}-qconfig.pri - > "${T}"/${PN}-qmodule.pri - - # generate qconfig_{add,remove} and ${PN}-qconfig.h - for x in "${QT5_GENTOO_CONFIG[@]}"; do - local flag=${x%%:*} - x=${x#${flag}:} - local feature=${x%%:*} - x=${x#${feature}:} - local macro=${x} - macro=$(tr 'a-z-' 'A-Z_' <<< "${macro}") - - if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then - [[ -n ${feature} ]] && qconfig_add+=" ${feature}" - [[ -n ${macro} ]] && echo "#define QT_${macro}" >> "${T}"/${PN}-qconfig.h - else - [[ -n ${feature} ]] && qconfig_remove+=" ${feature}" - [[ -n ${macro} ]] && echo "#define QT_NO_${macro}" >> "${T}"/${PN}-qconfig.h - fi - done - - # install ${PN}-qconfig.h - [[ -s ${T}/${PN}-qconfig.h ]] && ( - insinto "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo - doins "${T}"/${PN}-qconfig.h - ) - - # generate and install ${PN}-qconfig.pri - [[ -n ${qconfig_add} ]] && echo "QCONFIG_ADD=${qconfig_add}" >> "${T}"/${PN}-qconfig.pri - [[ -n ${qconfig_remove} ]] && echo "QCONFIG_REMOVE=${qconfig_remove}" >> "${T}"/${PN}-qconfig.pri - [[ -s ${T}/${PN}-qconfig.pri ]] && ( - insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo - doins "${T}"/${PN}-qconfig.pri - ) - - # generate qprivateconfig - for x in "${QT5_GENTOO_PRIVATE_CONFIG[@]}"; do - local flag=${x%%:*} - x=${x#${flag}:} - local feature=${x%%:*} - x=${x#${feature}:} - - if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then - [[ -n ${feature} ]] && qprivateconfig_add+=" ${feature}" - else - [[ -n ${feature} ]] && qprivateconfig_remove+=" ${feature}" - fi - done - - # generate and install ${PN}-qmodule.pri - [[ -n ${qprivateconfig_add} ]] && echo "QT.global_private.enabled_features = ${qprivateconfig_add}" >> "${T}"/${PN}-qmodule.pri - [[ -n ${qprivateconfig_remove} ]] && echo "QT.global_private.disabled_features = ${qprivateconfig_remove}" >> "${T}"/${PN}-qmodule.pri - [[ -s ${T}/${PN}-qmodule.pri ]] && ( - insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo - doins "${T}"/${PN}-qmodule.pri - ) - - # install the original {qconfig,qmodule}.pri from qtcore - [[ ${PN} == qtcore ]] && ( - insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo - newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qconfig.pri qconfig-qtcore.pri - newins "${D}${QT5_ARCHDATADIR}"/mkspecs/qmodule.pri qmodule-qtcore.pri - ) -} - -# @FUNCTION: qt5_regenerate_global_configs -# @INTERNAL -# @DESCRIPTION: -# Generates Gentoo-specific qconfig.{h,pri} and qmodule.pri according to the -# build configuration. -# Don't call die here because dying in pkg_post{inst,rm} only makes things worse. -qt5_regenerate_global_configs() { - einfo "Regenerating gentoo-qconfig.h" - - find "${ROOT%/}${QT5_HEADERDIR}"/Gentoo \ - -name '*-qconfig.h' -a \! -name 'gentoo-qconfig.h' -type f \ - -execdir cat '{}' + | sort -u > "${T}"/gentoo-qconfig.h - - [[ -s ${T}/gentoo-qconfig.h ]] || ewarn "Generated gentoo-qconfig.h is empty" - mv -f "${T}"/gentoo-qconfig.h "${ROOT%/}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \ - || eerror "Failed to install new gentoo-qconfig.h" - - einfo "Updating QT_CONFIG in qconfig.pri" - - local qconfig_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri - local qconfig_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri - if [[ -f ${qconfig_pri} ]]; then - local x qconfig_add= qconfig_remove= - local qt_config new_qt_config= - if [[ -f ${qconfig_pri_orig} ]]; then - qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri_orig}") - else - qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri}") - fi - - # generate list of QT_CONFIG entries from the existing list, - # appending QCONFIG_ADD and excluding QCONFIG_REMOVE - eshopts_push -s nullglob - for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do - qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=\s*//p' "${x}")" - qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=\s*//p' "${x}")" - done - eshopts_pop - for x in ${qt_config} ${qconfig_add}; do - if ! has "${x}" ${new_qt_config} ${qconfig_remove}; then - new_qt_config+=" ${x}" - fi - done - - # now replace the existing QT_CONFIG with the generated list - sed -i -e "s/^QT_CONFIG\s*+=.*/QT_CONFIG +=${new_qt_config}/" \ - "${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in ${qconfig_pri}" - else - ewarn "${qconfig_pri} does not exist or is not a regular file" - fi - - einfo "Updating QT.global_private in qmodule.pri" - - local qmodule_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri - local qmodule_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri - if [[ -f ${qmodule_pri} && -f ${qmodule_pri_orig} ]]; then - local x - local qprivateconfig_enabled= qprivateconfig_disabled= - local qprivateconfig_orig_enabled= qprivateconfig_orig_disabled= - local new_qprivateconfig_enabled= new_qprivateconfig_disabled= - - # generate lists of QT.global_private.{dis,en}abled_features - qprivateconfig_orig_enabled="$(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${qmodule_pri_orig}")" - qprivateconfig_orig_disabled="$(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${qmodule_pri_orig}")" - eshopts_push -s nullglob - for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do - qprivateconfig_enabled+=" $(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${x}")" - qprivateconfig_disabled+=" $(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${x}")" - done - eshopts_pop - - # anything enabled is enabled, but anything disabled is - # only disabled if it isn't enabled somewhere else. - # this is because we need to forcibly disable some stuff - # in qtcore to support split qtbase. - new_qprivateconfig_enabled=${qprivateconfig_enabled} - for x in ${qprivateconfig_disabled}; do - if ! has "${x}" ${qprivateconfig_enabled}; then - new_qprivateconfig_disabled+=" ${x}" - fi - done - - # check all items from the original qtcore qmodule.pri, - # and add them to the appropriate list if not overridden - # elsewhere - for x in ${qprivateconfig_orig_enabled}; do - if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then - new_qprivateconfig_enabled+=" ${x}" - fi - done - for x in ${qprivateconfig_orig_disabled}; do - if ! has "${x}" ${new_qprivateconfig_enabled} ${new_qprivateconfig_disabled}; then - new_qprivateconfig_disabled+=" ${x}" - fi - done - - # now replace the existing QT.global_private.{dis,en}abled_features - # with the generated list - sed \ - -e "s/^QT.global_private.enabled_features\s*=.*/QT.global_private.enabled_features =${new_qprivateconfig_enabled}/" \ - -e "s/^QT.global_private.disabled_features\s*=.*/QT.global_private.disabled_features =${new_qprivateconfig_disabled}/" \ - -i "${qmodule_pri}" || eerror "Failed to sed QT.global_private.enabled_features in ${qmodule_pri}" - else - ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file" - fi -} diff --git a/eclass/readme.gentoo.eclass b/eclass/readme.gentoo.eclass deleted file mode 100644 index cedd0580a3..0000000000 --- a/eclass/readme.gentoo.eclass +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: readme.gentoo.eclass -# @MAINTAINER: -# Pacho Ramos -# @AUTHOR: -# Author: Pacho Ramos -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: install a doc file shown via elog messages -# @DESCRIPTION: -# An eclass for installing a README.gentoo doc file recording tips -# shown via elog messages. With this eclass, those elog messages will only be -# shown at first package installation and a file for later reviewing will be -# installed under /usr/share/doc/${PF} -# -# This eclass is DEPRECATED. Please use readme.gentoo-r1 instead. - -if [[ -z ${_README_GENTOO_ECLASS} ]]; then -_README_GENTOO_ECLASS=1 - -inherit eutils - -case "${EAPI:-0}" in - 0|1|2|3) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 4|5) - # EAPI>=4 is required for REPLACING_VERSIONS preventing us - # from needing to export another pkg_preinst phase to save has_version - # result. Also relies on EAPI >=4 default src_install phase. - EXPORT_FUNCTIONS src_install pkg_postinst - ;; - 6) - die "Unsupported EAPI=${EAPI} for ${ECLASS}" - die "Please migrate to readme.gentoo-r1.eclass and note that" - die "it stops to export any ebuild phases and, then, you will" - die "need to ensure readme.gentoo_create_doc is called in" - die "src_install and readme.gentoo_print_elog in pkg_postinst" - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty, DOC_CONTENTS information will be strictly respected, -# not getting it automatically formatted by fmt. If empty, it will -# rely on fmt for formatting and 'echo -e' options to tweak lines a bit. - -# @ECLASS-VARIABLE: FORCE_PRINT_ELOG -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable forces elog messages to be printed. - -# @ECLASS-VARIABLE: README_GENTOO_SUFFIX -# @DESCRIPTION: -# If you want to specify a suffix for README.gentoo file please export it. -: ${README_GENTOO_SUFFIX:=""} - -# @FUNCTION: readme.gentoo_create_doc -# @DESCRIPTION: -# Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set, -# look for "${FILESDIR}/README.gentoo" contents. You can use -# ${FILESDIR}/README.gentoo-${SLOT} also. -# Usually called at src_install phase. -readme.gentoo_create_doc() { - debug-print-function ${FUNCNAME} "${@}" - - if [[ -n "${DOC_CONTENTS}" ]]; then - eshopts_push - set -f - if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then - echo "${DOC_CONTENTS}" > "${T}"/README.gentoo - else - echo -e ${DOC_CONTENTS} | fold -s -w 70 \ - | sed 's/[[:space:]]*$//' > "${T}"/README.gentoo - fi - eshopts_pop - elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then - cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die - elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then - cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${T}"/README.gentoo || die - else - die "You are not specifying README.gentoo contents!" - fi - - dodoc "${T}"/README.gentoo - README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo") -} - -# @FUNCTION: readme.gentoo_print_elog -# @DESCRIPTION: -# Print elog messages with "${T}"/README.gentoo contents. They will be -# shown only when package is installed at first time. -# Usually called at pkg_postinst phase. -# -# If you want to show them always, please set FORCE_PRINT_ELOG to a non empty -# value in your ebuild before this function is called. -# This can be useful when, for example, DOC_CONTENTS is modified, then, you can -# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages -# when people update from versions still providing old message. -readme.gentoo_print_elog() { - debug-print-function ${FUNCNAME} "${@}" - - eqawarn "${CATEGORY}/${PN} is using the deprecated readme.gentoo.eclass." - eqawarn "Please use readme.gentoo-r1 instead." - - if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then - die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!" - elif ! [[ -n "${REPLACING_VERSIONS}" ]] || [[ -n "${FORCE_PRINT_ELOG}" ]]; then - echo -e "${README_GENTOO_DOC_VALUE}" | while read -r ELINE; do elog "${ELINE}"; done - elog "" - elog "(Note: Above message is only printed the first time package is" - elog "installed. Please look at ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" - elog "for future reference)" - fi -} - - -# @FUNCTION: readme.gentoo_src_install -# @DESCRIPTION: -# Install generated doc file automatically. -readme.gentoo_src_install() { - debug-print-function ${FUNCNAME} "${@}" - default - readme.gentoo_create_doc -} - -# @FUNCTION: readme.gentoo_pkg_postinst -# @DESCRIPTION: -# Show elog messages from from just generated doc file. -readme.gentoo_pkg_postinst() { - debug-print-function ${FUNCNAME} "${@}" - readme.gentoo_print_elog -} - -fi diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass deleted file mode 100644 index e2c333a5e7..0000000000 --- a/eclass/ruby-fakegem.eclass +++ /dev/null @@ -1,537 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: ruby-fakegem.eclass -# @MAINTAINER: -# Ruby herd -# @AUTHOR: -# Author: Diego E. Pettenò -# Author: Alex Legler -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 -# @BLURB: An eclass for installing Ruby packages to behave like RubyGems. -# @DESCRIPTION: -# This eclass allows to install arbitrary Ruby libraries (including Gems), -# providing integration into the RubyGems system even for "regular" packages. - -inherit ruby-ng - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_NAME -# @DESCRIPTION: -# Sets the Gem name for the generated fake gemspec. -# This variable MUST be set before inheriting the eclass. -RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN}}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_VERSION -# @DESCRIPTION: -# Sets the Gem version for the generated fake gemspec. -# This variable MUST be set before inheriting the eclass. -RUBY_FAKEGEM_VERSION="${RUBY_FAKEGEM_VERSION:-${PV/_pre/.pre}}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_DOC -# @DESCRIPTION: -# Specify the rake(1) task to run to generate documentation. -RUBY_FAKEGEM_TASK_DOC="${RUBY_FAKEGEM_TASK_DOC-rdoc}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_TEST -# @DESCRIPTION: -# Specify one of the default testing function for ruby-fakegem: -# - rake (default; see also RUBY_FAKEGEM_TASK_TEST) -# - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies) -# - rspec3 (calls ruby-ng_rspec, adds dev-ruby/rspec:3 to the dependencies) -# - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the -# dependencies; does not work on JRuby). -# - none -RUBY_FAKEGEM_RECIPE_TEST="${RUBY_FAKEGEM_RECIPE_TEST-rake}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_TASK_TEST -# @DESCRIPTION: -# Specify the rake(1) task used for executing tests. Only valid -# if RUBY_FAKEGEM_RECIPE_TEST is set to "rake" (the default). -RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_RECIPE_DOC -# @DESCRIPTION: -# Specify one of the default API doc building function for ruby-fakegem: -# - rake (default; see also RUBY_FAKEGEM_TASK_DOC) -# - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies); -# - yard (calls `yard`, adds dev-ruby/yard to the dependencies); -# - none -RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_DOCDIR -# @DEFAULT_UNSET -# @DESCRIPTION: -# Specify the directory under which the documentation is built; -# if empty no documentation will be installed automatically. -# Note: if RUBY_FAKEGEM_RECIPE_DOC is set to `rdoc`, this variable is -# hardwired to `doc`. - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRADOC -# @DEFAULT_UNSET -# @DESCRIPTION: -# Extra documentation to install (readme, changelogs, …). - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_DOC_SOURCES -# @DESCRIPTION: -# Allow settings defined sources to scan for documentation. -# This only applies if RUBY_FAKEGEM_DOC_TASK is set to `rdoc`. -RUBY_FAKEGEM_DOC_SOURCES="${RUBY_FAKEGEM_DOC_SOURCES-lib}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_BINWRAP -# @DESCRIPTION: -# Binaries to wrap around (relative to the RUBY_FAKEGEM_BINDIR directory) -RUBY_FAKEGEM_BINWRAP="${RUBY_FAKEGEM_BINWRAP-*}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_BINDIR -# @DESCRIPTION: -# Path that contains binaries to be binwrapped. Equivalent to the -# gemspec bindir option. -RUBY_FAKEGEM_BINDIR="${RUBY_FAKEGEM_BINDIR-bin}" - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_REQUIRE_PATHS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Extra require paths (beside lib) to add to the specification - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_GEMSPEC -# @DEFAULT_UNSET -# @DESCRIPTION: -# Filename of .gemspec file to install instead of generating a generic one. - -# @ECLASS-VARIABLE: RUBY_FAKEGEM_EXTRAINSTALL -# @DEFAULT_UNSET -# @DESCRIPTION: -# List of files and directories relative to the top directory that also -# get installed. Some gems provide extra files such as version information, -# Rails generators, or data that needs to be installed as well. - -case "${EAPI:-0}" in - 0|1|2|3|4|5|6) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - - -RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}" - - -[[ ${RUBY_FAKEGEM_TASK_DOC} == "" ]] && RUBY_FAKEGEM_RECIPE_DOC="none" - -case ${RUBY_FAKEGEM_RECIPE_DOC} in - rake) - IUSE+=" doc" - ruby_add_bdepend "doc? ( dev-ruby/rake )" - RUBY_FAKEGEM_DOCDIR="doc" - ;; - rdoc) - IUSE+=" doc" - ruby_add_bdepend "doc? ( dev-ruby/rdoc )" - RUBY_FAKEGEM_DOCDIR="doc" - ;; - yard) - IUSE+="doc" - ruby_add_bdepend "doc? ( dev-ruby/yard )" - RUBY_FAKEGEM_DOCDIR="doc" - ;; - none) - [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && IUSE+=" doc" - ;; -esac - -[[ ${RUBY_FAKEGEM_TASK_TEST} == "" ]] && RUBY_FAKEGEM_RECIPE_TEST="none" - -case ${RUBY_FAKEGEM_RECIPE_TEST} in - rake) - IUSE+=" test" - ruby_add_bdepend "test? ( dev-ruby/rake )" - ;; - rspec) - IUSE+=" test" - # Also require a new enough rspec-core version that installs the - # rspec-2 wrapper. - ruby_add_bdepend "test? ( dev-ruby/rspec:2 >=dev-ruby/rspec-core-2.14.8-r2 )" - ;; - rspec3) - IUSE+=" test" - ruby_add_bdepend "test? ( dev-ruby/rspec:3 )" - ;; - cucumber) - IUSE+=" test" - # Unfortunately as of August 2012, cucumber is not supported on - # JRuby. We work it around here to avoid repeating the same - # code over and over again. - USE_RUBY="${USE_RUBY/jruby/}" ruby_add_bdepend "test? ( dev-util/cucumber )" - ;; - *) - RUBY_FAKEGEM_RECIPE_TEST="none" - ;; -esac - -SRC_URI="mirror://rubygems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${RUBY_FAKEGEM_SUFFIX:+-${RUBY_FAKEGEM_SUFFIX}}.gem" - -ruby_add_bdepend virtual/rubygems -ruby_add_rdepend virtual/rubygems - -# @FUNCTION: ruby_fakegem_gemsdir -# @RETURN: Returns the gem data directory -# @DESCRIPTION: -# This function returns the gems data directory for the ruby -# implementation in question. -ruby_fakegem_gemsdir() { - has "${EAPI}" 2 && ! use prefix && EPREFIX= - - local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir') - _gemsitedir=${_gemsitedir//site_ruby/gems} - _gemsitedir=${_gemsitedir#${EPREFIX}} - - [[ -z ${_gemsitedir} ]] && { - eerror "Unable to find the gems dir" - die "Unable to find the gems dir" - } - - echo "${_gemsitedir}" -} - -# @FUNCTION: ruby_fakegem_doins -# @USAGE: file [file...] -# @DESCRIPTION: -# Installs the specified file(s) into the gems directory. -ruby_fakegem_doins() { - ( - insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION} - doins "$@" - ) || die "failed $0 $@" -} - -# @FUNCTION: ruby_fakegem_newsins -# @USAGE: file filename -# @DESCRIPTION: -# Installs the specified file into the gems directory using the provided filename. -ruby_fakegem_newins() { - ( - # Since newins does not accept full paths but just basenames - # for the target file, we want to extend it here. - local newdirname=/$(dirname "$2") - [[ ${newdirname} == "/." ]] && newdirname= - - local newbasename=$(basename "$2") - - insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${newdirname} - newins "$1" ${newbasename} - ) || die "failed $0 $@" -} - -# @FUNCTION: ruby_fakegem_install_gemspec -# @DESCRIPTION: -# Install a .gemspec file for this package. Either use the file indicated -# by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using -# ruby_fakegem_genspec. -ruby_fakegem_install_gemspec() { - local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation} - - ( - if [[ ${RUBY_FAKEGEM_GEMSPEC} != "" ]]; then - ruby_fakegem_gemspec_gemspec ${RUBY_FAKEGEM_GEMSPEC} ${gemspec} - else - local metadata="${WORKDIR}"/${_ruby_implementation}/metadata - - if [[ -e ${metadata} ]]; then - ruby_fakegem_metadata_gemspec ${metadata} ${gemspec} - else - ruby_fakegem_genspec ${gemspec} - fi - fi - ) || die "Unable to generate gemspec file." - - insinto $(ruby_fakegem_gemsdir)/specifications - newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file." -} - -# @FUNCTION: ruby_fakegem_gemspec_gemspec -# @USAGE: gemspec-input gemspec-output -# @DESCRIPTION: -# Generates an installable version of the specification indicated by -# RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification -# in a way similar to packaging the gemspec file. -ruby_fakegem_gemspec_gemspec() { - ${RUBY} -e "puts eval(File::open('$1').read).to_ruby" > $2 -} - -# @FUNCTION: ruby_fakegem_metadata_gemspec -# @USAGE: gemspec-metadata gemspec-output -# @DESCRIPTION: -# Generates an installable version of the specification indicated by -# the metadata distributed by the gem itself. This is similar to how -# rubygems creates an installation from a .gem file. -ruby_fakegem_metadata_gemspec() { - case ${RUBY} in - *jruby) - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1').read).to_ruby" > $2 - ;; - *) - ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2 - ;; - esac -} - -# @FUNCTION: ruby_fakegem_genspec -# @USAGE: output-gemspec -# @DESCRIPTION: -# Generates a gemspec for the package and places it into the "specifications" -# directory of RubyGems. -# If the metadata normally distributed with a gem is present then that is -# used to generate the gemspec file. -# -# As a fallback we can generate our own version. -# In the gemspec, the following values are set: name, version, summary, -# homepage, and require_paths=["lib"]. -# See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version. -# See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths. -ruby_fakegem_genspec() { - local required_paths="'lib'" - for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do - required_paths="${required_paths}, '${path}'" - done - - # We use the _ruby_implementation variable to avoid having stray - # copies with different implementations; while for now we're using - # the same exact content, we might have differences in the future, - # so better taking this into consideration. - local quoted_description=${DESCRIPTION//\"/\\\"} - cat - > $1 < "${T}"/gembin-wrapper-${gembinary} </dev/null || die - - ebegin "Unpacking data.tar.gz" - tar -mxf "${my_WORKDIR}"/data.tar.gz || die - eend $? - - popd &>/dev/null || die - ;; - *.patch.bz2) - # We apply the patches with RUBY_PATCHES directly from DISTDIR, - # as the WORKDIR variable changes value between the global-scope - # and the time all_ruby_unpack/_prepare are called. Since we can - # simply decompress them when applying, this is much easier to - # deal with for us. - einfo "Keeping ${archive} as-is" - ;; - *) - unpack ${archive} - ;; - esac - done -} - -# @FUNCTION: all_ruby_compile -# @DESCRIPTION: -# Compile the package. -all_ruby_compile() { - all_fakegem_compile -} - -# @FUNCTION: each_fakegem_test -# @DESCRIPTION: -# Run tests for the package for each ruby target if the test task is defined. -each_fakegem_test() { - case ${RUBY_FAKEGEM_RECIPE_TEST} in - rake) - ${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed" - ;; - rspec) - RSPEC_VERSION=2 ruby-ng_rspec - ;; - rspec3) - RSPEC_VERSION=3 ruby-ng_rspec - ;; - cucumber) - ruby-ng_cucumber - ;; - none) - ewarn "each_fakegem_test called, but \${RUBY_FAKEGEM_RECIPE_TEST} is 'none'" - ;; - esac -} - -if [[ ${RUBY_FAKEGEM_RECIPE_TEST} != none ]]; then - # @FUNCTION: each_ruby_test - # @DESCRIPTION: - # Run the tests for this package. - each_ruby_test() { - each_fakegem_test - } -fi - -# @FUNCTION: each_fakegem_install -# @DESCRIPTION: -# Install the package for each ruby target. -each_fakegem_install() { - ruby_fakegem_install_gemspec - - local _gemlibdirs="${RUBY_FAKEGEM_EXTRAINSTALL}" - for directory in "${RUBY_FAKEGEM_BINDIR}" lib; do - [[ -d ${directory} ]] && _gemlibdirs="${_gemlibdirs} ${directory}" - done - - [[ -n ${_gemlibdirs} ]] && \ - ruby_fakegem_doins -r ${_gemlibdirs} -} - -# @FUNCTION: each_ruby_install -# @DESCRIPTION: -# Install the package for each target. -each_ruby_install() { - each_fakegem_install -} - -# @FUNCTION: all_fakegem_install -# @DESCRIPTION: -# Install files common to all ruby targets. -all_fakegem_install() { - if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then - for dir in ${RUBY_FAKEGEM_DOCDIR}; do - [[ -d ${dir} ]] || continue - - pushd ${dir} &>/dev/null || die - dodoc -r * || die "failed to install documentation" - popd &>/dev/null || die - done - fi - - if [[ -n ${RUBY_FAKEGEM_EXTRADOC} ]]; then - dodoc ${RUBY_FAKEGEM_EXTRADOC} || die "failed to install further documentation" - fi - - # binary wrappers; we assume that all the implementations get the - # same binaries, or something is wrong anyway, so... - if [[ -n ${RUBY_FAKEGEM_BINWRAP} ]]; then - local bindir=$(find "${D}" -type d -path "*/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}/${RUBY_FAKEGEM_BINDIR}" -print -quit) - - if [[ -d "${bindir}" ]]; then - pushd "${bindir}" &>/dev/null || die - for binary in ${RUBY_FAKEGEM_BINWRAP}; do - ruby_fakegem_binwrapper "${binary}" - done - popd &>/dev/null || die - fi - fi -} - -# @FUNCTION: all_ruby_install -# @DESCRIPTION: -# Install files common to all ruby targets. -all_ruby_install() { - all_fakegem_install -} diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass deleted file mode 100644 index ce52f27789..0000000000 --- a/eclass/ruby-ng-gnome2.eclass +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: ruby-ng-gnome2.eclass -# @MAINTAINER: -# Ruby herd -# @AUTHOR: -# Author: Hans de Graaff -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 -# @BLURB: An eclass to simplify handling of various ruby-gnome2 parts. -# @DESCRIPTION: -# This eclass simplifies installation of the various pieces of -# ruby-gnome2 since they share a very common installation procedure. - -case "${EAPI:-0}" in - 0|1|2|3|4|5|6) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}" -RUBY_FAKEGEM_TASK_TEST="" -RUBY_FAKEGEM_TASK_DOC="" - -inherit ruby-fakegem multilib versionator - -IUSE="" - -# Define EPREFIX if needed -has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - -subbinding=${PN#ruby-} -if [ $(get_version_component_range "1-2") == "0.19" ]; then - subbinding=${subbinding/%2} -else - subbinding=${subbinding/-/_} - DEPEND="virtual/pkgconfig" - ruby_add_bdepend "dev-ruby/pkg-config" -fi -if has "${EAPI:-0}" 0 1 2 3 ; then - S=${WORKDIR}/ruby-gnome2-all-${PV}/${subbinding} -else - RUBY_S=ruby-gnome2-all-${PV}/${subbinding} -fi -SRC_URI="mirror://sourceforge/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz" -HOMEPAGE="https://ruby-gnome2.osdn.jp/" -LICENSE="Ruby" -SLOT="0" - -# @FUNCTION: each_ruby_configure -# @DESCRIPTION: -# Run the configure script in the subbinding for each specific ruby target. -each_ruby_configure() { - ${RUBY} extconf.rb || die "extconf.rb failed" -} - -# @FUNCTION: each_ruby_compile -# @DESCRIPTION: -# Compile the C bindings in the subbinding for each specific ruby target. -each_ruby_compile() { - # We have injected --no-undefined in Ruby as a safety precaution - # against broken ebuilds, but the Ruby-Gnome bindings - # unfortunately rely on the lazy load of other extensions; see bug - # #320545. - find . -name Makefile -print0 | xargs -0 \ - sed -i -e 's:-Wl,--no-undefined ::' \ - -e "s/^ldflags = /ldflags = $\(LDFLAGS\) /" \ - || die "--no-undefined removal failed" - - emake V=1 || die "emake failed" -} - -# @FUNCTION: each_ruby_install -# @DESCRIPTION: -# Install the files in the subbinding for each specific ruby target. -each_ruby_install() { - # Create the directories, or the package will create them as files. - local archdir=$(ruby_rbconfig_value "sitearchdir") - dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig - - emake DESTDIR="${D}" install || die "make install failed" - - each_fakegem_install -} - -# @FUNCTION: all_ruby_install -# @DESCRIPTION: -# Install the files common to all ruby targets. -all_ruby_install() { - for doc in ../AUTHORS ../NEWS ChangeLog README; do - [ -s "$doc" ] && dodoc $doc - done - if [[ -d sample ]]; then - insinto /usr/share/doc/${PF} - doins -r sample || die "sample install failed" - fi - - all_fakegem_install -} diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass deleted file mode 100644 index 21cbc5d995..0000000000 --- a/eclass/ruby-ng.eclass +++ /dev/null @@ -1,756 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: ruby-ng.eclass -# @MAINTAINER: -# Ruby herd -# @AUTHOR: -# Author: Diego E. Pettenò -# Author: Alex Legler -# Author: Hans de Graaff -# @SUPPORTED_EAPIS: 2 3 4 5 6 -# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots. -# @DESCRIPTION: -# The Ruby eclass is designed to allow an easier installation of Ruby packages -# and their incorporation into the Gentoo Linux system. -# -# Currently available targets are listed in ruby-utils.eclass -# -# This eclass does not define the implementation of the configure, -# compile, test, or install phases. Instead, the default phases are -# used. Specific implementations of these phases can be provided in -# the ebuild either to be run for each Ruby implementation, or for all -# Ruby implementations, as follows: -# -# * each_ruby_configure -# * all_ruby_configure - -# @ECLASS-VARIABLE: USE_RUBY -# @DEFAULT_UNSET -# @REQUIRED -# @DESCRIPTION: -# This variable contains a space separated list of targets (see above) a package -# is compatible to. It must be set before the `inherit' call. There is no -# default. All ebuilds are expected to set this variable. - -# @ECLASS-VARIABLE: RUBY_PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# A String or Array of filenames of patches to apply to all implementations. - -# @ECLASS-VARIABLE: RUBY_OPTIONAL -# @DEFAULT_UNSET -# @DESCRIPTION: -# Set the value to "yes" to make the dependency on a Ruby interpreter -# optional and then ruby_implementations_depend() to help populate -# DEPEND and RDEPEND. - -# @ECLASS-VARIABLE: RUBY_S -# @DEFAULT_UNSET -# @DESCRIPTION: -# If defined this variable determines the source directory name after -# unpacking. This defaults to the name of the package. Note that this -# variable supports a wildcard mechanism to help with github tarballs -# that contain the commit hash as part of the directory name. - -# @ECLASS-VARIABLE: RUBY_QA_ALLOWED_LIBS -# @DEFAULT_UNSET -# @DESCRIPTION: -# If defined this variable contains a whitelist of shared objects that -# are allowed to exist even if they don't link to libruby. This avoids -# the QA check that makes this mandatory. This is most likely not what -# you are looking for if you get the related "Missing links" QA warning, -# since the proper fix is almost always to make sure the shared object -# is linked against libruby. There are cases were this is not the case -# and the shared object is generic code to be used in some other way -# (e.g. selenium's firefox driver extension). When set this argument is -# passed to "grep -E" to remove reporting of these shared objects. - -local inherits="" -case ${EAPI} in - 2|3|4|5) - inherits="eutils" - ;; -esac - -inherit ${inherits} java-utils-2 multilib toolchain-funcs ruby-utils - -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup - -case ${EAPI} in - 0|1) - die "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;; - 2|3) ;; - 4|5|6) - # S is no longer automatically assigned when it doesn't exist. - S="${WORKDIR}" - ;; - *) - die "Unknown EAPI=${EAPI} for ruby-ng.eclass" -esac - -# @FUNCTION: ruby_implementation_depend -# @USAGE: target [comparator [version]] -# @RETURN: Package atom of a Ruby implementation to be used in dependencies. -# @DESCRIPTION: -# This function returns the formal package atom for a Ruby implementation. -# -# `target' has to be one of the valid values for USE_RUBY (see above) -# -# Set `comparator' and `version' to include a comparator (=, >=, etc.) and a -# version string to the returned string -ruby_implementation_depend() { - _ruby_implementation_depend $1 -} - -# @FUNCTION: _ruby_get_all_impls -# @INTERNAL -# @RETURN: list of valid values in USE_RUBY -# Return a list of valid implementations in USE_RUBY, skipping the old -# implementations that are no longer supported. -_ruby_get_all_impls() { - local i - for i in ${USE_RUBY}; do - case ${i} in - # removed implementations - ruby19|ruby20|ruby21|ruby22|ruby23|jruby) - ;; - *) - echo ${i};; - esac - done -} - -# @FUNCTION: ruby_samelib -# @RETURN: use flag string with current ruby implementations -# @DESCRIPTION: -# Convenience function to output the use dependency part of a -# dependency. Used as a building block for ruby_add_rdepend() and -# ruby_add_bdepend(), but may also be useful in an ebuild to specify -# more complex dependencies. -ruby_samelib() { - local res= - for _ruby_implementation in $(_ruby_get_all_impls); do - has -${_ruby_implementation} $@ || \ - res="${res}ruby_targets_${_ruby_implementation}?," - done - - echo "[${res%,}]" -} - -_ruby_atoms_samelib_generic() { - eshopts_push -o noglob - echo "RUBYTARGET? (" - for token in $*; do - case "$token" in - "||" | "(" | ")" | *"?") - echo "${token}" ;; - *]) - echo "${token%[*}[RUBYTARGET,${token/*[}" ;; - *) - echo "${token}[RUBYTARGET]" ;; - esac - done - echo ")" - eshopts_pop -} - -# @FUNCTION: ruby_implementation_command -# @RETURN: the path to the given ruby implementation -# @DESCRIPTION: -# Not all implementations have the same command basename as the -# target; This function translate between the two -ruby_implementation_command() { - local _ruby_name=$1 - - # Add all USE_RUBY values where the flag name diverts from the binary here - - echo $(type -p ${_ruby_name} 2>/dev/null) -} - -_ruby_atoms_samelib() { - local atoms=$(_ruby_atoms_samelib_generic "$*") - - for _ruby_implementation in $(_ruby_get_all_impls); do - echo "${atoms//RUBYTARGET/ruby_targets_${_ruby_implementation}}" - done -} - -_ruby_wrap_conditions() { - local conditions="$1" - local atoms="$2" - - for condition in $conditions; do - atoms="${condition}? ( ${atoms} )" - done - - echo "$atoms" -} - -# @FUNCTION: ruby_add_rdepend -# @USAGE: dependencies -# @DESCRIPTION: -# Adds the specified dependencies, with use condition(s) to RDEPEND, -# taking the current set of ruby targets into account. This makes sure -# that all ruby dependencies of the package are installed for the same -# ruby targets. Use this function for all ruby dependencies instead of -# setting RDEPEND yourself. The list of atoms uses the same syntax as -# normal dependencies. -# -# Note: runtime dependencies are also added as build-time test -# dependencies. -ruby_add_rdepend() { - case $# in - 1) ;; - 2) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF" - ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "bad number of arguments to $0" - ;; - esac - - local dependency=$(_ruby_atoms_samelib "$1") - - RDEPEND="${RDEPEND} $dependency" - - # Add the dependency as a test-dependency since we're going to - # execute the code during test phase. - DEPEND="${DEPEND} test? ( ${dependency} )" - has test "$IUSE" || IUSE="${IUSE} test" -} - -# @FUNCTION: ruby_add_bdepend -# @USAGE: dependencies -# @DESCRIPTION: -# Adds the specified dependencies, with use condition(s) to DEPEND, -# taking the current set of ruby targets into account. This makes sure -# that all ruby dependencies of the package are installed for the same -# ruby targets. Use this function for all ruby dependencies instead of -# setting DEPEND yourself. The list of atoms uses the same syntax as -# normal dependencies. -ruby_add_bdepend() { - case $# in - 1) ;; - 2) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF" - ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "bad number of arguments to $0" - ;; - esac - - local dependency=$(_ruby_atoms_samelib "$1") - - DEPEND="${DEPEND} $dependency" - RDEPEND="${RDEPEND}" -} - -# @FUNCTION: ruby_get_use_implementations -# @DESCRIPTION: -# Gets an array of ruby use targets enabled by the user -ruby_get_use_implementations() { - local i implementation - for implementation in $(_ruby_get_all_impls); do - use ruby_targets_${implementation} && i+=" ${implementation}" - done - echo $i -} - -# @FUNCTION: ruby_get_use_targets -# @DESCRIPTION: -# Gets an array of ruby use targets that the ebuild sets -ruby_get_use_targets() { - local t implementation - for implementation in $(_ruby_get_all_impls); do - t+=" ruby_targets_${implementation}" - done - echo $t -} - -# @FUNCTION: ruby_implementations_depend -# @RETURN: Dependencies suitable for injection into DEPEND and RDEPEND. -# @DESCRIPTION: -# Produces the dependency string for the various implementations of ruby -# which the package is being built against. This should not be used when -# RUBY_OPTIONAL is unset but must be used if RUBY_OPTIONAL=yes. Do not -# confuse this function with ruby_implementation_depend(). -# -# @EXAMPLE: -# EAPI=6 -# RUBY_OPTIONAL=yes -# -# inherit ruby-ng -# ... -# DEPEND="ruby? ( $(ruby_implementations_depend) )" -# RDEPEND="${DEPEND}" -ruby_implementations_depend() { - local depend - for _ruby_implementation in $(_ruby_get_all_impls); do - depend="${depend}${depend+ }ruby_targets_${_ruby_implementation}? ( $(ruby_implementation_depend $_ruby_implementation) )" - done - echo "${depend}" -} - -IUSE+=" $(ruby_get_use_targets)" -# If you specify RUBY_OPTIONAL you also need to take care of -# ruby useflag and dependency. -if [[ ${RUBY_OPTIONAL} != yes ]]; then - DEPEND="${DEPEND} $(ruby_implementations_depend)" - RDEPEND="${RDEPEND} $(ruby_implementations_depend)" - - case ${EAPI:-0} in - 4|5|6) - REQUIRED_USE+=" || ( $(ruby_get_use_targets) )" - ;; - esac -fi - -_ruby_invoke_environment() { - old_S=${S} - case ${EAPI} in - 4|5|6) - if [ -z "${RUBY_S}" ]; then - sub_S=${P} - else - sub_S=${RUBY_S} - fi - ;; - *) - sub_S=${S#${WORKDIR}/} - ;; - esac - - # Special case, for the always-lovely GitHub fetches. With this, - # we allow the star glob to just expand to whatever directory it's - # called. - if [[ "${sub_S}" = *"*"* ]]; then - case ${EAPI} in - 2|3) - #The old method of setting S depends on undefined package - # manager behaviour, so encourage upgrading to EAPI=4. - eqawarn "Using * expansion of S is deprecated. Use EAPI and RUBY_S instead." - ;; - esac - pushd "${WORKDIR}"/all &>/dev/null || die - # use an array to trigger filename expansion - # fun fact: this expansion fails in src_unpack() but the original - # code did not have any checks for failed expansion, so we can't - # really add one now without redesigning stuff hard. - sub_S=( ${sub_S} ) - if [[ ${#sub_S[@]} -gt 1 ]]; then - die "sub_S did expand to multiple paths: ${sub_S[*]}" - fi - popd &>/dev/null || die - fi - - environment=$1; shift - - my_WORKDIR="${WORKDIR}"/${environment} - S="${my_WORKDIR}"/"${sub_S}" - - if [[ -d "${S}" ]]; then - pushd "$S" &>/dev/null || die - elif [[ -d "${my_WORKDIR}" ]]; then - pushd "${my_WORKDIR}" &>/dev/null || die - else - pushd "${WORKDIR}" &>/dev/null || die - fi - - ebegin "Running ${_PHASE:-${EBUILD_PHASE}} phase for $environment" - "$@" - popd &>/dev/null || die - - S=${old_S} -} - -_ruby_each_implementation() { - local invoked=no - for _ruby_implementation in $(_ruby_get_all_impls); do - # only proceed if it's requested - use ruby_targets_${_ruby_implementation} || continue - - RUBY=$(ruby_implementation_command ${_ruby_implementation}) - invoked=yes - - if [[ -n "$1" ]]; then - _ruby_invoke_environment ${_ruby_implementation} "$@" - fi - - unset RUBY - done - - if [[ ${invoked} == "no" ]]; then - eerror "You need to select at least one compatible Ruby installation target via RUBY_TARGETS in make.conf." - eerror "Compatible targets for this package are: $(_ruby_get_all_impls)" - eerror - eerror "See https://www.gentoo.org/proj/en/prog_lang/ruby/index.xml#doc_chap3 for more information." - eerror - die "No compatible Ruby target selected." - fi -} - -# @FUNCTION: ruby-ng_pkg_setup -# @DESCRIPTION: -# Check whether at least one ruby target implementation is present. -ruby-ng_pkg_setup() { - # This only checks that at least one implementation is present - # before doing anything; by leaving the parameters empty we know - # it's a special case. - _ruby_each_implementation - - has ruby_targets_jruby ${IUSE} && use ruby_targets_jruby && java-pkg_setup-vm -} - -# @FUNCTION: ruby-ng_src_unpack -# @DESCRIPTION: -# Unpack the source archive. -ruby-ng_src_unpack() { - mkdir "${WORKDIR}"/all - pushd "${WORKDIR}"/all &>/dev/null || die - - # We don't support an each-unpack, it's either all or nothing! - if type all_ruby_unpack &>/dev/null; then - _ruby_invoke_environment all all_ruby_unpack - else - [[ -n ${A} ]] && unpack ${A} - fi - - popd &>/dev/null || die -} - -_ruby_apply_patches() { - case ${EAPI} in - 2|3|4|5) - for patch in "${RUBY_PATCHES[@]}"; do - if [ -f "${patch}" ]; then - epatch "${patch}" - elif [ -f "${FILESDIR}/${patch}" ]; then - epatch "${FILESDIR}/${patch}" - else - die "Cannot find patch ${patch}" - fi - done - ;; - 6) - if [[ -n ${RUBY_PATCHES[@]} ]]; then - eqawarn "RUBY_PATCHES is no longer supported, use PATCHES instead" - fi - ;; - esac - - # This is a special case: instead of executing just in the special - # "all" environment, this will actually copy the effects on _all_ - # the other environments, and is thus executed before the copy - type all_ruby_prepare &>/dev/null && all_ruby_prepare -} - -_ruby_source_copy() { - # Until we actually find a reason not to, we use hardlinks, this - # should reduce the amount of disk space that is wasted by this. - cp -prlP all ${_ruby_implementation} \ - || die "Unable to copy ${_ruby_implementation} environment" -} - -# @FUNCTION: ruby-ng_src_prepare -# @DESCRIPTION: -# Apply patches and prepare versions for each ruby target -# implementation. Also carry out common clean up tasks. -ruby-ng_src_prepare() { - # Way too many Ruby packages are prepared on OSX without removing - # the extra data forks, we do it here to avoid repeating it for - # almost every other ebuild. - find . -name '._*' -delete - - # Handle PATCHES and user supplied patches via the default phase - case ${EAPI} in - 6) - _ruby_invoke_environment all default - ;; - esac - - _ruby_invoke_environment all _ruby_apply_patches - - _PHASE="source copy" \ - _ruby_each_implementation _ruby_source_copy - - if type each_ruby_prepare &>/dev/null; then - _ruby_each_implementation each_ruby_prepare - fi -} - -# @FUNCTION: ruby-ng_src_configure -# @DESCRIPTION: -# Configure the package. -ruby-ng_src_configure() { - if type each_ruby_configure &>/dev/null; then - _ruby_each_implementation each_ruby_configure - fi - - type all_ruby_configure &>/dev/null && \ - _ruby_invoke_environment all all_ruby_configure -} - -# @FUNCTION: ruby-ng_src_compile -# @DESCRIPTION: -# Compile the package. -ruby-ng_src_compile() { - if type each_ruby_compile &>/dev/null; then - _ruby_each_implementation each_ruby_compile - fi - - type all_ruby_compile &>/dev/null && \ - _ruby_invoke_environment all all_ruby_compile -} - -# @FUNCTION: ruby-ng_src_test -# @DESCRIPTION: -# Run tests for the package. -ruby-ng_src_test() { - if type each_ruby_test &>/dev/null; then - _ruby_each_implementation each_ruby_test - fi - - type all_ruby_test &>/dev/null && \ - _ruby_invoke_environment all all_ruby_test -} - -_each_ruby_check_install() { - local scancmd=scanelf - # we have a Mach-O object here - [[ ${CHOST} == *-darwin ]] && scancmd=scanmacho - - has "${EAPI}" 2 && ! use prefix && EPREFIX= - - local libruby_basename=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["LIBRUBY_SO"]') - local libruby_soname=$(basename $(${scancmd} -F "%S#F" -qS "${EPREFIX}/usr/$(get_libdir)/${libruby_basename}") 2>/dev/null) - local sitedir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]') - local sitelibdir=$(${RUBY} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]') - - # Look for wrong files in sitedir - # if [[ -d "${D}${sitedir}" ]]; then - # local f=$(find "${D}${sitedir}" -mindepth 1 -maxdepth 1 -not -wholename "${D}${sitelibdir}") - # if [[ -n ${f} ]]; then - # eerror "Found files in sitedir, outsite sitelibdir:" - # eerror "${f}" - # die "Misplaced files in sitedir" - # fi - # fi - - # The current implementation lacks libruby (i.e.: jruby) - [[ -z ${libruby_soname} ]] && return 0 - - # Check also the gems directory, since we could be installing compiled - # extensions via ruby-fakegem; make sure to check only in sitelibdir, since - # that's what changes between two implementations (otherwise you'd get false - # positives now that Ruby 1.9.2 installs with the same sitedir as 1.8) - ${scancmd} -qnR "${D}${sitelibdir}" "${D}${sitelibdir/site_ruby/gems}" \ - | fgrep -v "${libruby_soname}" \ - | grep -E -v "${RUBY_QA_ALLOWED_LIBS}" \ - > "${T}"/ruby-ng-${_ruby_implementation}-mislink.log - - if [[ -s "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ]]; then - ewarn "Extensions installed for ${_ruby_implementation} with missing links to ${libruby_soname}" - ewarn $(< "${T}"/ruby-ng-${_ruby_implementation}-mislink.log ) - die "Missing links to ${libruby_soname}" - fi -} - -# @FUNCTION: ruby-ng_src_install -# @DESCRIPTION: -# Install the package for each ruby target implementation. -ruby-ng_src_install() { - if type each_ruby_install &>/dev/null; then - _ruby_each_implementation each_ruby_install - fi - - type all_ruby_install &>/dev/null && \ - _ruby_invoke_environment all all_ruby_install - - _PHASE="check install" \ - _ruby_each_implementation _each_ruby_check_install -} - -# @FUNCTION: ruby_rbconfig_value -# @USAGE: rbconfig item -# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}. -ruby_rbconfig_value() { - echo $(${RUBY} -rrbconfig -e "puts RbConfig::CONFIG['$1']") -} - -# @FUNCTION: doruby -# @USAGE: file [file...] -# @DESCRIPTION: -# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}. -doruby() { - [[ -z ${RUBY} ]] && die "\$RUBY is not set" - has "${EAPI}" 2 && ! use prefix && EPREFIX= - ( # don't want to pollute calling env - sitelibdir=$(ruby_rbconfig_value 'sitelibdir') - insinto ${sitelibdir#${EPREFIX}} - insopts -m 0644 - doins "$@" - ) || die "failed to install $@" -} - -# @FUNCTION: ruby_get_libruby -# @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}. -ruby_get_libruby() { - ${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])' -} - -# @FUNCTION: ruby_get_hdrdir -# @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}. -ruby_get_hdrdir() { - local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir') - - if [[ "${rubyhdrdir}" = "nil" ]] ; then - rubyhdrdir=$(ruby_rbconfig_value 'archdir') - fi - - echo "${rubyhdrdir}" -} - -# @FUNCTION: ruby_get_version -# @RETURN: The version of the Ruby interpreter in ${RUBY}, or what 'ruby' points to. -ruby_get_version() { - local ruby=${RUBY:-$(type -p ruby 2>/dev/null)} - - echo $(${ruby} -e 'puts RUBY_VERSION') -} - -# @FUNCTION: ruby_get_implementation -# @RETURN: The implementation of the Ruby interpreter in ${RUBY}, or what 'ruby' points to. -ruby_get_implementation() { - local ruby=${RUBY:-$(type -p ruby 2>/dev/null)} - - case $(${ruby} --version) in - *jruby*) - echo "jruby" - ;; - *rubinius*) - echo "rbx" - ;; - *) - echo "mri" - ;; - esac -} - -# @FUNCTION: ruby-ng_rspec -# @DESCRIPTION: -# This is simply a wrapper around the rspec command (executed by $RUBY}) -# which also respects TEST_VERBOSE and NOCOLOR environment variables. -# Optionally takes arguments to pass on to the rspec invocation. The -# environment variable RSPEC_VERSION can be used to control the specific -# rspec version that must be executed. It defaults to 2 for historical -# compatibility. -ruby-ng_rspec() { - local version=${RSPEC_VERSION-2} - local files="$@" - - # Explicitly pass the expected spec directory since the versioned - # rspec wrappers don't handle this automatically. - if [ ${#@} -eq 0 ]; then - files="spec" - fi - - if [[ ${DEPEND} != *"dev-ruby/rspec"* ]]; then - ewarn "Missing dev-ruby/rspec in \${DEPEND}" - fi - - local rspec_params= - case ${NOCOLOR} in - 1|yes|true) - rspec_params+=" --no-color" - ;; - *) - rspec_params+=" --color" - ;; - esac - - case ${TEST_VERBOSE} in - 1|yes|true) - rspec_params+=" --format documentation" - ;; - *) - rspec_params+=" --format progress" - ;; - esac - - ${RUBY} -S rspec-${version} ${rspec_params} ${files} || die "rspec failed" -} - -# @FUNCTION: ruby-ng_cucumber -# @DESCRIPTION: -# This is simply a wrapper around the cucumber command (executed by $RUBY}) -# which also respects TEST_VERBOSE and NOCOLOR environment variables. -ruby-ng_cucumber() { - if [[ ${DEPEND} != *"dev-util/cucumber"* ]]; then - ewarn "Missing dev-util/cucumber in \${DEPEND}" - fi - - local cucumber_params= - case ${NOCOLOR} in - 1|yes|true) - cucumber_params+=" --no-color" - ;; - *) - cucumber_params+=" --color" - ;; - esac - - case ${TEST_VERBOSE} in - 1|yes|true) - cucumber_params+=" --format pretty" - ;; - *) - cucumber_params+=" --format progress" - ;; - esac - - if [[ ${RUBY} == *jruby ]]; then - ewarn "Skipping cucumber tests on JRuby (unsupported)." - return 0 - fi - - ${RUBY} -S cucumber ${cucumber_params} "$@" || die "cucumber failed" -} - -# @FUNCTION: ruby-ng_testrb-2 -# @DESCRIPTION: -# This is simply a replacement for the testrb command that load the test -# files and execute them, with test-unit 2.x. This actually requires -# either an old test-unit-2 version or 2.5.1-r1 or later, as they remove -# their script and we installed a broken wrapper for a while. -# This also respects TEST_VERBOSE and NOCOLOR environment variables. -ruby-ng_testrb-2() { - if [[ ${DEPEND} != *"dev-ruby/test-unit"* ]]; then - ewarn "Missing dev-ruby/test-unit in \${DEPEND}" - fi - - local testrb_params= - case ${NOCOLOR} in - 1|yes|true) - testrb_params+=" --no-use-color" - ;; - *) - testrb_params+=" --use-color=auto" - ;; - esac - - case ${TEST_VERBOSE} in - 1|yes|true) - testrb_params+=" --verbose=verbose" - ;; - *) - testrb_params+=" --verbose=normal" - ;; - esac - - ${RUBY} -S testrb-2 ${testrb_params} "$@" || die "testrb-2 failed" -} diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass deleted file mode 100644 index 35cf4e3221..0000000000 --- a/eclass/scons-utils.eclass +++ /dev/null @@ -1,345 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: scons-utils.eclass -# @MAINTAINER: -# mgorny@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: helper functions to deal with SCons buildsystem -# @DESCRIPTION: -# This eclass provides a set of function to help developers sanely call -# dev-util/scons and pass parameters to it. -# -# As of dev-util/scons-3.0.1-r100, SCons supports Python 3. Since -# SCons* files in build systems are written as Python, all packages -# need to explicitly verify which versions of Python are supported -# and use appropriate Python suite eclass to select the implementation. -# The eclass needs to be inherited before scons-utils, and scons-utils -# will automatically take advantage of it. For more details, please see: -# https://wiki.gentoo.org/wiki/Project:Python/scons-utils_integration -# -# Please note that SCons is more like a 'build system creation kit', -# and requires a lot of upstream customization to be used sanely. -# You will often need to request fixes upstream and/or patch the build -# system. In particular: -# -# 1. There are no 'standard' variables. To respect CC, CXX, CFLAGS, -# CXXFLAGS, CPPFLAGS, LDFLAGS, upstream needs to define appropriate -# variables explicitly. In some cases, upstreams respect envvars, -# in others you need to pass them as options. -# -# 2. SCons scrubs out environment by default and replaces it with some -# pre-defined values. To respect environment variables such as PATH, -# Upstreams need to explicitly get them from os.environ and copy them -# to the build environment. -# -# @EXAMPLE: -# @CODE -# PYTHON_COMPAT=( python2_7 ) -# inherit python-any-r1 scons-utils toolchain-funcs -# -# EAPI=5 -# -# src_configure() { -# MYSCONS=( -# CC="$(tc-getCC)" -# ENABLE_NLS=$(usex nls) -# ) -# } -# -# src_compile() { -# escons "${MYSCONS[@]}" -# } -# -# src_install() { -# # note: this can be DESTDIR, INSTALL_ROOT, ... depending on package -# escons "${MYSCONS[@]}" DESTDIR="${D}" install -# } -# @CODE - -# -- public variables -- - -# @ECLASS-VARIABLE: SCONS_MIN_VERSION -# @DEFAULT_UNSET -# @DESCRIPTION: -# The minimal version of SCons required for the build to work. - -# @VARIABLE: myesconsargs -# @DEFAULT_UNSET -# @DESCRIPTION: -# DEPRECATED, EAPI 0..5 ONLY: pass options to escons instead -# -# List of package-specific options to pass to all SCons calls. Supposed to be -# set in src_configure(). - -# @ECLASS-VARIABLE: SCONSOPTS -# @DEFAULT_UNSET -# @DESCRIPTION: -# The default set of options to pass to scons. Similar to MAKEOPTS, -# supposed to be set in make.conf. If unset, escons() will use cleaned -# up MAKEOPTS instead. - -# @ECLASS-VARIABLE: EXTRA_ESCONS -# @DEFAULT_UNSET -# @DESCRIPTION: -# The additional parameters to pass to SCons whenever escons() is used. -# Much like EXTRA_EMAKE, this is not supposed to be used in make.conf -# and not in ebuilds! - -# @ECLASS-VARIABLE: USE_SCONS_TRUE -# @DESCRIPTION: -# DEPRECATED: use usex instead -# -# The default value for truth in scons-use() (1 by default). -: ${USE_SCONS_TRUE:=1} - -# @ECLASS-VARIABLE: USE_SCONS_FALSE -# @DESCRIPTION: -# DEPRECATED: use usex instead -# -# The default value for false in scons-use() (0 by default). -: ${USE_SCONS_FALSE:=0} - -# -- EAPI support check -- - -case ${EAPI:-0} in - 0|1|2|3|4|5|6|7) ;; - *) die "EAPI ${EAPI} unsupported." -esac - -inherit multiprocessing - -# -- ebuild variables setup -- - -if [[ -n ${SCONS_MIN_VERSION} ]]; then - SCONS_DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}" -else - SCONS_DEPEND="dev-util/scons" -fi - -if [[ ${_PYTHON_ANY_R1} ]]; then - # when using python-any-r1, use any-of dep API - BDEPEND="$(python_gen_any_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")" - - scons-utils_python_check_deps() { - has_version "${SCONS_DEPEND}[${PYTHON_USEDEP}]" - } - python_check_deps() { scons-utils_python_check_deps; } -elif [[ ${_PYTHON_SINGLE_R1} ]]; then - # when using python-single-r1, use plain PYTHON_USEDEP API - BDEPEND="${SCONS_DEPEND}[${PYTHON_USEDEP}] - ${PYTHON_DEPS}" -elif [[ ${EAPI:-0} == [0123456] ]]; then - # in older EAPIs, just force Python 2.7 - BDEPEND="${SCONS_DEPEND}[python_targets_python2_7]" -elif [[ ${_PYTHON_R1} ]]; then - # when using python-r1, you need to depend on scons yourself - # (depending on whether you need any-r1 or full -r1 API) - # -- since this is a breaking API change, it applies to EAPI 7+ only - BDEPEND="" -elif [[ ${EAPI:-0} != [0123456] ]]; then - # in EAPI 7+, require appropriate eclass use - eerror "Using scons-utils.eclass without any python-r1 suite eclass is not supported." - eerror "Please make sure to configure and inherit appropriate -r1 eclass." - eerror "For more information and examples, please see:" - eerror " https://wiki.gentoo.org/wiki/Project:Python/scons-utils_integration" - die "Invalid use of scons-utils.eclass" -fi - -if [[ ${EAPI:-0} == [0123456] ]]; then - DEPEND=${BDEPEND} - unset BDEPEND -fi - -# -- public functions -- - -# @FUNCTION: escons -# @USAGE: [...] -# @DESCRIPTION: -# Call scons, passing the supplied arguments. Like emake, this function -# does die on failure in EAPI 4. Respects nonfatal in EAPI 6 and newer. -escons() { - local ret - - debug-print-function ${FUNCNAME} "${@}" - - if [[ ! ${EPYTHON} ]]; then - if [[ ${EAPI:-0} != [0123456] ]]; then - eerror "EPYTHON is unset while calling escons. This most likely means that" - eerror "the ebuild did not call the appropriate eclass function before calling scons." - if [[ ${_PYTHON_ANY_R1} ]]; then - eerror "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()." - elif [[ ${_PYTHON_SINGLE_R1} ]]; then - eerror "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()." - else # python-r1 - eerror "Please ensure that python_setup is called before escons, or that escons" - eerror "is used within python_foreach_impl as appropriate." - fi - die "EPYTHON unset in escons" - else - local -x EPYTHON=python2.7 - fi - fi - - # Use myesconsargs in EAPI 5 and older - if [[ ${EAPI} == [012345] ]]; then - set -- "${myesconsargs[@]}" "${@}" - fi - - # if SCONSOPTS are _unset_, use cleaned MAKEOPTS - if [[ ! ${SCONSOPTS+set} ]]; then - local SCONSOPTS - _scons_clean_makeopts - fi - - # pass ebuild environment variables through! - local -x GENTOO_SCONS_ENV_PASSTHROUGH=1 - - set -- scons ${SCONSOPTS} ${EXTRA_ESCONS} "${@}" - echo "${@}" >&2 - "${@}" - ret=${?} - - if [[ ${ret} -ne 0 ]]; then - case "${EAPI:-0}" in - 0|1|2|3) # nonfatal in EAPIs 0 through 3 - ;; - 4|5) # 100% fatal in 4 & 5 - die "escons failed." - ;; - *) # respect nonfatal in 6 onwards - die -n "escons failed." - ;; - esac - fi - return ${ret} -} - -# @FUNCTION: _scons_clean_makeopts -# @INTERNAL -# @USAGE: [makeflags] [...] -# @DESCRIPTION: -# Strip the supplied makeflags (or ${MAKEOPTS} if called without -# an argument) of options not supported by SCons and make sure --jobs -# gets an argument. Output the resulting flag list (suitable -# for an assignment to SCONSOPTS). -_scons_clean_makeopts() { - local new_makeopts=() - - debug-print-function ${FUNCNAME} "${@}" - - if [[ ${#} -eq 0 ]]; then - debug-print "Using MAKEOPTS: [${MAKEOPTS}]" - set -- ${MAKEOPTS} - else - # unquote if necessary - set -- ${*} - fi - - # empty MAKEOPTS give out empty SCONSOPTS - # thus, we do need to worry about the initial setup - if [[ ${*} = ${_SCONS_CACHE_MAKEOPTS} ]]; then - SCONSOPTS=${_SCONS_CACHE_SCONSOPTS} - debug-print "Cache hit: [${SCONSOPTS}]" - return - fi - _SCONS_CACHE_MAKEOPTS=${*} - - while [[ ${#} -gt 0 ]]; do - case ${1} in - # clean, simple to check -- we like that - --jobs=*|--keep-going) - new_makeopts+=( ${1} ) - ;; - # need to take a look at the next arg and guess - --jobs) - if [[ ${#} -gt 1 && ${2} =~ ^[0-9]+$ ]]; then - new_makeopts+=( ${1} ${2} ) - shift - else - # no value means no limit, let's pass a default instead - new_makeopts+=( ${1}=$(( $(get_nproc) + 1 )) ) - fi - ;; - # strip other long options - --*) - ;; - # short option hell - -*) - local str new_optstr - new_optstr= - str=${1#-} - - while [[ -n ${str} ]]; do - case ${str} in - k*) - new_optstr+=k - ;; - # -j needs to come last - j) - if [[ ${#} -gt 1 && ${2} =~ ^[0-9]+$ ]]; then - new_optstr+="j ${2}" - shift - else - new_optstr+="j $(( $(get_nproc) + 1 ))" - fi - ;; - # otherwise, everything after -j is treated as an arg - j*) - new_optstr+=${str} - break - ;; - esac - str=${str#?} - done - - if [[ -n ${new_optstr} ]]; then - new_makeopts+=( -${new_optstr} ) - fi - ;; - esac - shift - done - - SCONSOPTS=${new_makeopts[*]} - _SCONS_CACHE_SCONSOPTS=${SCONSOPTS} - debug-print "New SCONSOPTS: [${SCONSOPTS}]" -} - -# @FUNCTION: use_scons -# @USAGE: [var-name] [var-opt-true] [var-opt-false] -# @DESCRIPTION: -# DEPRECATED, EAPI 0..5 ONLY: use usex instead -# -# Output a SCons parameter with value depending on the USE flag state. -# If the USE flag is set, output =; otherwise -# =. -# -# If is omitted, will be used instead. However, -# if starts with an exclamation mark (!flag), 'no' will be -# prepended to the name (e.g. noflag). -# -# If and/or are omitted, -# ${USE_SCONS_TRUE} and/or ${USE_SCONS_FALSE} will be used instead. -use_scons() { - [[ ${EAPI} == [012345] ]] \ - || die "${FUNCNAME} is banned in EAPI ${EAPI}, use usex instead" - - local flag=${1} - local varname=${2:-${flag/\!/no}} - local vartrue=${3:-${USE_SCONS_TRUE}} - local varfalse=${4:-${USE_SCONS_FALSE}} - - debug-print-function ${FUNCNAME} "${@}" - - if [[ ${#} -eq 0 ]]; then - eerror "Usage: scons-use [var-name] [var-opt-true] [var-opt-false]" - die 'scons-use(): not enough arguments' - fi - - if use "${flag}"; then - echo "${varname}=${vartrue}" - else - echo "${varname}=${varfalse}" - fi -} diff --git a/eclass/tests/scons-utils.sh b/eclass/tests/scons-utils.sh deleted file mode 100755 index 7a588863c6..0000000000 --- a/eclass/tests/scons-utils.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -source tests-common.sh - -inherit scons-utils - -test-scons_clean_makeopts() { - tbegin "scons_clean_makeopts() for ${1}" - - local SCONSOPTS ret=0 - _scons_clean_makeopts ${1} - - if [[ ${SCONSOPTS} != ${2-${1}} ]]; then - eerror "Self-test failed:" - eindent - eerror "MAKEOPTS: ${1}" - eerror "Expected: ${2-${1}}" - eerror "Actual: ${SCONSOPTS}" - eoutdent - ret=1 - fi - - tend ${ret} - return ${ret} -} - -# jobcount expected for non-specified state -jc=$(_scons_get_default_jobs) -# failed test counter -failed=0 - -# sane MAKEOPTS -test-scons_clean_makeopts '--jobs=14 -k' -test-scons_clean_makeopts '--jobs=14 -k' -test-scons_clean_makeopts '--jobs 15 -k' -test-scons_clean_makeopts '--jobs=16 --keep-going' -test-scons_clean_makeopts '-j17 --keep-going' -test-scons_clean_makeopts '-j 18 --keep-going' - -# needing cleaning -test-scons_clean_makeopts '--jobs -k' "--jobs=${jc} -k" -test-scons_clean_makeopts '--jobs --keep-going' "--jobs=${jc} --keep-going" -test-scons_clean_makeopts '-kj' "-kj ${jc}" - -# broken by definition (but passed as it breaks make as well) -test-scons_clean_makeopts '-jk' -test-scons_clean_makeopts '--jobs=randum' -test-scons_clean_makeopts '-kjrandum' - -# needing stripping -test-scons_clean_makeopts '--load-average=25 -kj16' '-kj16' -test-scons_clean_makeopts '--load-average 25 -k -j17' '-k -j17' -test-scons_clean_makeopts '-j2 HOME=/tmp' '-j2' -test-scons_clean_makeopts '--jobs funnystuff -k' "--jobs=${jc} -k" - -# bug #388961 -test-scons_clean_makeopts '--jobs -l3' "--jobs=${jc}" -test-scons_clean_makeopts '-j -l3' "-j ${jc}" - -texit diff --git a/eclass/twisted-r1.eclass b/eclass/twisted-r1.eclass deleted file mode 100644 index 7f0f796ec9..0000000000 --- a/eclass/twisted-r1.eclass +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: twisted-r1.eclass -# @MAINTAINER: -# Gentoo Python Project -# @AUTHOR: -# Author: Michał Górny -# Author: Jan Matejka -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: Eclass for Twisted packages -# @DESCRIPTION: -# The twisted eclass defines phase functions for Twisted packages. - -case "${EAPI:-0}" in - 0|1|2|3) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 4|5) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -if [[ ! ${_TWISTED_R1} ]]; then - -inherit distutils-r1 versionator - -fi # ! ${_TWISTED_R1} - -EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm - -if [[ ! ${_TWISTED_R1} ]]; then - -# @FUNCTION: _twisted-r1_camelcase -# @USAGE: -# @DESCRIPTION: -# Convert dash-separated to CamelCase name suitable for Twisted. -# In pure bash, therefore safe for global scope execution. -_twisted-r1_camelcase() { - local IFS=- - - # IFS=- splits words by -. - local words=( ${1} ) - - # we can't keep '-' as it collides with [a-z] check - # and '' is used by bash-4 words[*], so let's just set globally - IFS= - - if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then - echo "${words[*]^}" - return - fi - - local w LC_COLLATE=C uc='ABCDEFGHIJKLMNOPQRSTUVWXYZ' - - local out - for w in "${words[@]}"; do - local fl=${w:0:1} - - # Danger: magic starts here. Please close your eyes. - # In base 36, a..z represents digits 10..35. We substract 10 - # and get array subscripts for uc. - - [[ ${fl} == [a-z] ]] && fl=${uc:36#${fl} - 10:1} - - out+=${fl}${w:1} - done - - echo "${out}" -} - -# @ECLASS-VARIABLE: TWISTED_PN -# @DESCRIPTION: -# The real package name. Default to camel-case conversion of ${PN}. -# -# Example: TwistedCore -: ${TWISTED_PN:=$(_twisted-r1_camelcase ${PN})} - -# @ECLASS-VARIABLE: TWISTED_P -# @DESCRIPTION: -# The real package name with version appended. -# -# It is used to build the default SRC_URI and S values. -# -# Example: TwistedCore-1.2.3 -: ${TWISTED_P:=${TWISTED_PN}-${PV}} - -# @ECLASS-VARIABLE: TWISTED_RELEASE -# @DESCRIPTION: -# The 'release' of Twisted. Defaults to the major & minor version -# number from ${PV}. -# -# It is used to build the default SRC_URI. It may be also used -# in dependencies against other Twisted packages. -# -# Example: 1.2 -: ${TWISTED_RELEASE:=$(get_version_component_range 1-2 ${PV})} - -HOMEPAGE="https://www.twistedmatrix.com/trac/" -SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN#Twisted}" -SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2" - -LICENSE="MIT" -SLOT="0" -IUSE="" - -S=${WORKDIR}/${TWISTED_P} - -# @ECLASS-VARIABLE: TWISTED_PLUGINS -# @DESCRIPTION: -# An array of Twisted plugins, whose cache is regenerated -# in pkg_postinst() and pkg_postrm() phases. -# -# If no plugins are installed, set to empty array. -declare -p TWISTED_PLUGINS &>/dev/null || TWISTED_PLUGINS=( twisted.plugins ) - -# @FUNCTION: twisted-r1_python_test -# @DESCRIPTION: -# The common python_test() implementation that suffices for Twisted -# packages. -twisted-r1_python_test() { - local sitedir=$(python_get_sitedir) - - # Copy modules of other Twisted packages from site-packages - # directory to the temporary directory. - local libdir=${BUILD_DIR}/test/lib - mkdir -p "${libdir}" || die - cp -r "${ROOT}${sitedir}"/twisted "${libdir}" || die - # Drop the installed module in case previous version conflicts with - # the new one somehow. - rm -fr "${libdir}/${PN/-//}" || die - - distutils_install_for_testing || die - - if [[ ${TEST_DIR} != ${BUILD_DIR}/test ]]; then - eerror "twisted-r1 integrity check failed." - eerror "TEST_DIR: ${TEST_DIR}" - eerror "expected: ${BUILD_DIR}/test" - die "TEST_DIR integrity check failed" - fi - - cd "${TEST_DIR}"/lib || die - trial ${PN/-/.} || die "Tests fail with ${EPYTHON}" -} - -# @FUNCTION: python_test -# @DESCRIPTION: -# Default python_test() for Twisted packages. If you need to override -# it, you can access the original implementation -# via twisted-r1_python_test. -python_test() { - twisted-r1_python_test -} - -# @FUNCTION: twisted-r1_src_install -# @DESCRIPTION: -# Default src_install() for Twisted packages. Automatically handles HTML -# docs (unless HTML_DOCS is set explicitly) and manpages in Twisted -# packages. -twisted-r1_src_install() { - [[ -d doc ]] && local HTML_DOCS=( "${HTML_DOCS[@]:-doc/.}" ) - [[ -d doc/man ]] && doman doc/man/*.[[:digit:]] - - distutils-r1_src_install -} - -# @FUNCTION: _twisted-r1_create_caches -# @USAGE: ... -# @DESCRIPTION: -# Create dropin.cache for plugins in specified packages. The packages -# are to be listed in standard dotted Python syntax. -_twisted-r1_create_caches() { - # http://twistedmatrix.com/documents/current/core/howto/plugin.html - "${PYTHON}" -c \ -"import sys -sys.path.insert(0, '${ROOT}$(python_get_sitedir)') - -fail = False - -try: - from twisted.plugin import getPlugins, IPlugin -except ImportError as e: - if '${EBUILD_PHASE}' == 'postinst': - raise -else: - for module in sys.argv[1:]: - try: - __import__(module, globals()) - except ImportError as e: - if '${EBUILD_PHASE}' == 'postinst': - raise - else: - list(getPlugins(IPlugin, sys.modules[module])) -" \ - "${@}" || die "twisted plugin cache update failed" -} - -# @FUNCTION: twisted-r1_update_plugin_cache -# @DESCRIPTION: -# Update and clean up plugin caches for packages listed -# in TWISTED_PLUGINS. -twisted-r1_update_plugin_cache() { - [[ ${TWISTED_PLUGINS[@]} ]] || return - - local subdirs=( "${TWISTED_PLUGINS[@]//.//}" ) - local paths=( "${subdirs[@]/#/${ROOT}$(python_get_sitedir)/}" ) - local caches=( "${paths[@]/%//dropin.cache}" ) - - # First, delete existing (possibly stray) caches. - rm -f "${caches[@]}" || die - - # Now, let's see which ones we can regenerate. - _twisted-r1_create_caches "${TWISTED_PLUGINS[@]}" - - # Finally, drop empty parent directories. - rmdir -p "${paths[@]}" 2>/dev/null -} - -# @FUNCTION: twisted-r1_pkg_postinst -# @DESCRIPTION: -# Post-installation hook for twisted-r1. Updates plugin caches. -twisted-r1_pkg_postinst() { - _distutils-r1_run_foreach_impl twisted-r1_update_plugin_cache -} - -# @FUNCTION: twisted-r1_pkg_postrm -# @DESCRIPTION: -# Post-removal hook for twisted-r1. Updates plugin caches. -twisted-r1_pkg_postrm() { - _distutils-r1_run_foreach_impl twisted-r1_update_plugin_cache -} - -_TWISTED_R1=1 - -fi # ! ${_TWISTED_R1} diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass deleted file mode 100644 index f702550849..0000000000 --- a/eclass/xorg-2.eclass +++ /dev/null @@ -1,575 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: xorg-2.eclass -# @MAINTAINER: -# x11@gentoo.org -# @AUTHOR: -# Author: Tomáš Chvátal -# Author: Donnie Berkholz -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: Reduces code duplication in the modularized X11 ebuilds. -# @DESCRIPTION: -# This eclass makes trivial X ebuilds possible for apps, fonts, drivers, -# and more. Many things that would normally be done in various functions -# can be accessed by setting variables instead, such as patching, -# running eautoreconf, passing options to configure and installing docs. -# -# All you need to do in a basic ebuild is inherit this eclass and set -# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted -# with the other X packages, you don't need to set SRC_URI. Pretty much -# everything else should be automatic. - -GIT_ECLASS="" -if [[ ${PV} == *9999* ]]; then - GIT_ECLASS="git-r3" - XORG_EAUTORECONF="yes" -fi - -# If we're a font package, but not the font.alias one -FONT_ECLASS="" -if [[ ${PN} == font* \ - && ${CATEGORY} = media-fonts \ - && ${PN} != font-alias \ - && ${PN} != font-util ]]; then - # Activate font code in the rest of the eclass - FONT="yes" - FONT_ECLASS="font" -fi - -# @ECLASS-VARIABLE: XORG_MULTILIB -# @DESCRIPTION: -# If set to 'yes', the multilib support for package will be enabled. Set -# before inheriting this eclass. -: ${XORG_MULTILIB:="no"} - -# we need to inherit autotools first to get the deps -inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \ - flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS} - -if [[ ${XORG_MULTILIB} == yes ]]; then - inherit autotools-multilib -fi - -EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" -case "${EAPI:-0}" in - 4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -# exports must be ALWAYS after inherit -EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} - -IUSE="" - -# @ECLASS-VARIABLE: XORG_EAUTORECONF -# @DESCRIPTION: -# If set to 'yes' and configure.ac exists, eautoreconf will run. Set -# before inheriting this eclass. -: ${XORG_EAUTORECONF:="no"} - -# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI -# @DESCRIPTION: -# Set up SRC_URI for individual modular releases. If set to an empty -# string, no SRC_URI will be provided by the eclass. -: ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"} - -# @ECLASS-VARIABLE: XORG_MODULE -# @DESCRIPTION: -# The subdirectory to download source from. Possible settings are app, -# doc, data, util, driver, font, lib, proto, xserver. Set above the -# inherit to override the default autoconfigured module. -: ${XORG_MODULE:="auto"} -if [[ ${XORG_MODULE} == auto ]]; then - case ${CATEGORY} in - app-doc) XORG_MODULE=doc/ ;; - media-fonts) XORG_MODULE=font/ ;; - x11-apps|x11-wm) XORG_MODULE=app/ ;; - x11-misc|x11-themes) XORG_MODULE=util/ ;; - x11-base) XORG_MODULE=xserver/ ;; - x11-drivers) XORG_MODULE=driver/ ;; - x11-libs) XORG_MODULE=lib/ ;; - *) XORG_MODULE= ;; - esac -fi - -# @ECLASS-VARIABLE: XORG_PACKAGE_NAME -# @DESCRIPTION: -# For git checkout the git repository might differ from package name. -# This variable can be used for proper directory specification -: ${XORG_PACKAGE_NAME:=${PN}} - -HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}" - -if [[ -n ${GIT_ECLASS} ]]; then - : ${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"} -elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then - SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" -fi - -: ${SLOT:=0} - -# Set the license for the package. This can be overridden by setting -# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages -# are under the MIT license. (This is what Red Hat does in their rpms) -: ${LICENSE:=MIT} - -# Set up autotools shared dependencies -# Remember that all versions here MUST be stable -XORG_EAUTORECONF_ARCHES="x86-winnt" -EAUTORECONF_DEPEND+=" - >=sys-devel/libtool-2.2.6a - sys-devel/m4" -if [[ ${PN} != util-macros ]] ; then - EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18" - # Required even by xorg-server - [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" -fi -WANT_AUTOCONF="latest" -WANT_AUTOMAKE="latest" -for arch in ${XORG_EAUTORECONF_ARCHES}; do - EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )" -done -DEPEND+=" ${EAUTORECONF_DEPENDS}" -[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}" -unset EAUTORECONF_DEPENDS -unset EAUTORECONF_DEPEND - -if [[ ${FONT} == yes ]]; then - RDEPEND+=" media-fonts/encodings - || ( >=x11-apps/mkfontscale-1.2.0 ( x11-apps/mkfontscale x11-apps/mkfontdir ) )" - PDEPEND+=" media-fonts/font-alias" - DEPEND+=" >=media-fonts/font-util-1.2.0 - || ( >=x11-apps/mkfontscale-1.2.0 ( x11-apps/mkfontscale x11-apps/mkfontdir ) )" - - # @ECLASS-VARIABLE: FONT_DIR - # @DESCRIPTION: - # If you're creating a font package and the suffix of PN is not equal to - # the subdirectory of /usr/share/fonts/ it should install into, set - # FONT_DIR to that directory or directories. Set before inheriting this - # eclass. - [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-} - - # Fix case of font directories - FONT_DIR=${FONT_DIR/ttf/TTF} - FONT_DIR=${FONT_DIR/otf/OTF} - FONT_DIR=${FONT_DIR/type1/Type1} - FONT_DIR=${FONT_DIR/speedo/Speedo} - - # Set up configure options, wrapped so ebuilds can override if need be - [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\"" - - [[ ${PN} = font-misc-misc || ${PN} = font-schumacher-misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls" -fi - -# If we're a driver package, then enable DRIVER case -[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes" - -# @ECLASS-VARIABLE: XORG_STATIC -# @DESCRIPTION: -# Enables static-libs useflag. Set to no, if your package gets: -# -# QA: configure: WARNING: unrecognized options: --disable-static -: ${XORG_STATIC:="yes"} - -# Add static-libs useflag where useful. -if [[ ${XORG_STATIC} == yes \ - && ${FONT} != yes \ - && ${CATEGORY} != app-doc \ - && ${CATEGORY} != x11-apps \ - && ${CATEGORY} != x11-drivers \ - && ${CATEGORY} != media-fonts \ - && ${PN} != util-macros \ - && ${PN} != xbitmaps \ - && ${PN} != xorg-cf-files \ - && ${PN/xcursor} = ${PN} ]]; then - IUSE+=" static-libs" -fi - -if [[ ${XORG_MULTILIB} == yes ]]; then - DEPEND+=" virtual/pkgconfig[${MULTILIB_USEDEP}]" -else - DEPEND+=" virtual/pkgconfig" -fi - -# @ECLASS-VARIABLE: XORG_DRI -# @DESCRIPTION: -# Possible values are "always" or the value of the useflag DRI capabilities -# are required for. Default value is "no" -# -# Eg. XORG_DRI="opengl" will pull all dri dependant deps for opengl useflag -: ${XORG_DRI:="no"} - -DRI_COMMON_DEPEND=" - x11-base/xorg-server[-minimal] - x11-libs/libdrm -" -case ${XORG_DRI} in - no) - ;; - always) - COMMON_DEPEND+=" ${DRI_COMMON_DEPEND}" - ;; - *) - COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )" - IUSE+=" ${XORG_DRI}" - ;; -esac -unset DRI_COMMON_DEPEND - -if [[ -n "${DRIVER}" ]]; then - COMMON_DEPEND+=" - x11-base/xorg-server[xorg] - " -fi -if [[ -n "${DRIVER}" && ${PN} == xf86-input-* ]]; then - DEPEND+=" x11-base/xorg-proto" -fi -if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then - COMMON_DEPEND+=" - x11-libs/libpciaccess - " - DEPEND+=" x11-base/xorg-proto" -fi - -# @ECLASS-VARIABLE: XORG_DOC -# @DESCRIPTION: -# Possible values are "always" or the value of the useflag doc packages -# are required for. Default value is "no" -# -# Eg. XORG_DOC="manual" will pull all doc dependant deps for manual useflag -: ${XORG_DOC:="no"} - -DOC_DEPEND=" - doc? ( - || ( app-text/asciidoc dev-ruby/asciidoctor ) - app-text/xmlto - app-doc/doxygen - app-text/docbook-xml-dtd:4.1.2 - app-text/docbook-xml-dtd:4.2 - app-text/docbook-xml-dtd:4.3 - ) -" -case ${XORG_DOC} in - no) - ;; - always) - DEPEND+=" ${DOC_DEPEND}" - ;; - *) - DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )" - IUSE+=" ${XORG_DOC}" - ;; -esac -unset DOC_DEPEND - -if [[ ${DRIVER} == yes ]]; then - case ${EAPI} in - 4) - ;; - *) - RDEPEND+=" x11-base/xorg-server:=" - ;; - esac -fi - -DEPEND+=" ${COMMON_DEPEND}" -RDEPEND+=" ${COMMON_DEPEND}" -unset COMMON_DEPEND - -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}" -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}" -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}" - -# @FUNCTION: xorg-2_pkg_setup -# @DESCRIPTION: -# Setup prefix compat -xorg-2_pkg_setup() { - debug-print-function ${FUNCNAME} "$@" - - [[ ${FONT} == yes ]] && font_pkg_setup "$@" -} - -# @FUNCTION: xorg-2_src_unpack -# @DESCRIPTION: -# Simply unpack source code. -xorg-2_src_unpack() { - debug-print-function ${FUNCNAME} "$@" - - if [[ -n ${GIT_ECLASS} ]]; then - git-r3_src_unpack - else - unpack ${A} - fi - - [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}" -} - -# @FUNCTION: xorg-2_patch_source -# @DESCRIPTION: -# Apply all patches -xorg-2_patch_source() { - debug-print-function ${FUNCNAME} "$@" - - # Use standardized names and locations with bulk patching - # Patch directory is ${WORKDIR}/patch - # See epatch() in eutils.eclass for more documentation - EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} - - [[ -d "${EPATCH_SOURCE}" ]] && epatch -} - -# @FUNCTION: xorg-2_reconf_source -# @DESCRIPTION: -# Run eautoreconf if necessary, and run elibtoolize. -xorg-2_reconf_source() { - debug-print-function ${FUNCNAME} "$@" - - case ${CHOST} in - *-aix* | *-winnt*) - # some hosts need full eautoreconf - [[ -e "./configure.ac" || -e "./configure.in" ]] \ - && AUTOTOOLS_AUTORECONF=1 - ;; - *) - # elibtoolize required for BSD - [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] \ - && AUTOTOOLS_AUTORECONF=1 - ;; - esac -} - -# @FUNCTION: xorg-2_src_prepare -# @DESCRIPTION: -# Prepare a package after unpacking, performing all X-related tasks. -xorg-2_src_prepare() { - debug-print-function ${FUNCNAME} "$@" - - xorg-2_patch_source - xorg-2_reconf_source - autotools-utils_src_prepare "$@" -} - -# @FUNCTION: xorg-2_font_configure -# @DESCRIPTION: -# If a font package, perform any necessary configuration steps -xorg-2_font_configure() { - debug-print-function ${FUNCNAME} "$@" - - if has nls ${IUSE//+} && ! use nls; then - if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then - FONT_OPTIONS+=" - --disable-all-encodings - --enable-iso8859-1" - else - FONT_OPTIONS+=" - --disable-iso8859-2 - --disable-iso8859-3 - --disable-iso8859-4 - --disable-iso8859-5 - --disable-iso8859-6 - --disable-iso8859-7 - --disable-iso8859-8 - --disable-iso8859-9 - --disable-iso8859-10 - --disable-iso8859-11 - --disable-iso8859-12 - --disable-iso8859-13 - --disable-iso8859-14 - --disable-iso8859-15 - --disable-iso8859-16 - --disable-jisx0201 - --disable-koi8-r" - fi - fi -} - -# @FUNCTION: xorg-2_flags_setup -# @DESCRIPTION: -# Set up CFLAGS for a debug build -xorg-2_flags_setup() { - debug-print-function ${FUNCNAME} "$@" - - # Win32 require special define - [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ - # hardened ldflags - [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy - - # Quite few libraries fail on runtime without these: - if has static-libs ${IUSE//+}; then - filter-flags -Wl,-Bdirect - filter-ldflags -Bdirect - filter-ldflags -Wl,-Bdirect - fi -} - -# @FUNCTION: xorg-2_src_configure -# @DESCRIPTION: -# Perform any necessary pre-configuration steps, then run configure -xorg-2_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - xorg-2_flags_setup - - # @VARIABLE: XORG_CONFIGURE_OPTIONS - # @DESCRIPTION: - # Array of an additional options to pass to configure. - # @DEFAULT_UNSET - if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then - # fallback to CONFIGURE_OPTIONS, deprecated. - if [[ -n "${CONFIGURE_OPTIONS}" ]]; then - eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS" - eqawarn "to preserve namespace." - fi - - local xorgconfadd=(${CONFIGURE_OPTIONS} ${XORG_CONFIGURE_OPTIONS}) - else - local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") - fi - - [[ -n "${FONT}" ]] && xorg-2_font_configure - - # Check if package supports disabling of dep tracking - # Fixes warnings like: - # WARNING: unrecognized options: --disable-dependency-tracking - if grep -q -s "disable-depencency-tracking" ${ECONF_SOURCE:-.}/configure; then - local dep_track="--disable-dependency-tracking" - fi - - # Check if package supports disabling of selective -Werror=... - if grep -q -s "disable-selective-werror" ${ECONF_SOURCE:-.}/configure; then - local selective_werror="--disable-selective-werror" - fi - - local myeconfargs=( - ${dep_track} - ${selective_werror} - ${FONT_OPTIONS} - "${xorgconfadd[@]}" - ) - - if [[ ${XORG_MULTILIB} == yes ]]; then - autotools-multilib_src_configure "$@" - else - autotools-utils_src_configure "$@" - fi -} - -# @FUNCTION: xorg-2_src_compile -# @DESCRIPTION: -# Compile a package, performing all X-related tasks. -xorg-2_src_compile() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${XORG_MULTILIB} == yes ]]; then - autotools-multilib_src_compile "$@" - else - autotools-utils_src_compile "$@" - fi -} - -# @FUNCTION: xorg-2_src_install -# @DESCRIPTION: -# Install a built package to ${D}, performing any necessary steps. -# Creates a ChangeLog from git if using live ebuilds. -xorg-2_src_install() { - debug-print-function ${FUNCNAME} "$@" - - local install_args=( docdir="${EPREFIX}/usr/share/doc/${PF}" ) - - if [[ ${XORG_MULTILIB} == yes ]]; then - autotools-multilib_src_install "${install_args[@]}" - else - autotools-utils_src_install "${install_args[@]}" - fi - - if [[ -n ${GIT_ECLASS} ]]; then - pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null || die - git log ${EGIT_COMMIT} > "${S}"/ChangeLog - popd > /dev/null || die - fi - - if [[ -e "${S}"/ChangeLog ]]; then - dodoc "${S}"/ChangeLog || die "dodoc failed" - fi - - # Don't install libtool archives (even for modules) - find "${D}" -type f -name '*.la' -delete || die - - [[ -n ${FONT} ]] && remove_font_metadata -} - -# @FUNCTION: xorg-2_pkg_postinst -# @DESCRIPTION: -# Run X-specific post-installation tasks on the live filesystem. The -# only task right now is some setup for font packages. -xorg-2_pkg_postinst() { - debug-print-function ${FUNCNAME} "$@" - - if [[ -n ${FONT} ]]; then - create_fonts_scale - create_fonts_dir - font_pkg_postinst "$@" - - ewarn "Installed fonts changed. Run 'xset fp rehash' if you are using non-fontconfig applications." - fi -} - -# @FUNCTION: xorg-2_pkg_postrm -# @DESCRIPTION: -# Run X-specific post-removal tasks on the live filesystem. The only -# task right now is some cleanup for font packages. -xorg-2_pkg_postrm() { - debug-print-function ${FUNCNAME} "$@" - - if [[ -n ${FONT} ]]; then - # if we're doing an upgrade, postinst will do - if [[ -z ${REPLACED_BY_VERSION} ]]; then - create_fonts_scale - create_fonts_dir - font_pkg_postrm "$@" - fi - fi -} - -# @FUNCTION: remove_font_metadata -# @DESCRIPTION: -# Don't let the package install generated font files that may overlap -# with other packages. Instead, they're generated in pkg_postinst(). -remove_font_metadata() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then - einfo "Removing font metadata" - rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} - fi -} - -# @FUNCTION: create_fonts_scale -# @DESCRIPTION: -# Create fonts.scale file, used by the old server-side fonts subsystem. -create_fonts_scale() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then - ebegin "Generating fonts.scale" - mkfontscale \ - -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ - -- "${EROOT}/usr/share/fonts/${FONT_DIR}" - eend $? - fi -} - -# @FUNCTION: create_fonts_dir -# @DESCRIPTION: -# Create fonts.dir file, used by the old server-side fonts subsystem. -create_fonts_dir() { - debug-print-function ${FUNCNAME} "$@" - - ebegin "Generating fonts.dir" - mkfontdir \ - -e "${EROOT}"/usr/share/fonts/encodings \ - -e "${EROOT}"/usr/share/fonts/encodings/large \ - -- "${EROOT}/usr/share/fonts/${FONT_DIR}" - eend $? -} From be4664cb27dff18035c546243c5814b4a67fa777 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:27:32 +0100 Subject: [PATCH 31/40] eclass/golang-base: Sync with gentoo It's from gentoo commit 7f8297d319da8a7fe6680217ad8362b46ac1c95a. --- eclass/golang-base.eclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass index cd36a269bf..bcb37d432c 100644 --- a/eclass/golang-base.eclass +++ b/eclass/golang-base.eclass @@ -1,10 +1,11 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-base.eclass # @MAINTAINER: # William Hubbs # @SUPPORTED_EAPIS: 5 6 7 +# @DEPRECATED: go-module.eclass # @BLURB: Eclass that provides base functions for Go packages. # @DESCRIPTION: # This eclass provides base functions for software written in the Go @@ -15,7 +16,7 @@ case "${EAPI:-0}" in 5|6|7) ;; *) - die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})" + die "${ECLASS}: Unsupported EAPI (EAPI=${EAPI})" ;; esac @@ -36,6 +37,9 @@ QA_FLAGS_IGNORED='.*' # Upstream does not support stripping go packages RESTRICT="strip" +# force GO111MODULE to be auto for bug https://bugs.gentoo.org/771129 +export GO111MODULE=auto + # @ECLASS-VARIABLE: EGO_PN # @REQUIRED # @DESCRIPTION: From 93eca219d5a689a63465f5b30030ab039371c80f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:36:09 +0100 Subject: [PATCH 32/40] eclass/check-reqs: Sync with gentoo It's from gentoo commit a1db03163fb4a08d7813e92fa723db7a79566ef0. --- eclass/check-reqs.eclass | 215 ++++++++++++++++++++++++++++++--------- 1 file changed, 165 insertions(+), 50 deletions(-) diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass index 689944c877..2130e2e349 100644 --- a/eclass/check-reqs.eclass +++ b/eclass/check-reqs.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: check-reqs.eclass @@ -7,8 +7,8 @@ # @AUTHOR: # Bo Ørsted Andresen # Original Author: Ciaran McCreesh -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 -# @BLURB: Provides a uniform way of handling ebuild which have very high build requirements +# @SUPPORTED_EAPIS: 6 7 8 +# @BLURB: Provides a uniform way of handling ebuilds with very high build requirements # @DESCRIPTION: # This eclass provides a uniform way of handling ebuilds which have very high # build requirements in terms of memory or disk space. It provides a function @@ -38,14 +38,22 @@ # These checks should probably mostly work on non-Linux, and they should # probably degrade gracefully if they don't. Probably. -if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_pretend pkg_setup + +if [[ ! ${_CHECK_REQS_ECLASS} ]]; then +_CHECK_REQS_ECLASS=1 # @ECLASS-VARIABLE: CHECKREQS_MEMORY # @DEFAULT_UNSET # @DESCRIPTION: # How much RAM is needed? Eg.: CHECKREQS_MEMORY=15M -# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD +# @ECLASS-VARIABLE: CHECKREQS_DISK_BUILD # @DEFAULT_UNSET # @DESCRIPTION: # How much diskspace is needed to build the package? Eg.: CHECKREQS_DISK_BUILD=2T @@ -60,19 +68,13 @@ if [[ ! ${_CHECK_REQS_ECLASS_} ]]; then # @DESCRIPTION: # How much space is needed in /var? Eg.: CHECKREQS_DISK_VAR=3000M -EXPORT_FUNCTIONS pkg_setup -case "${EAPI:-0}" in - 0|1|2|3) ;; - 4|5|6|7) EXPORT_FUNCTIONS pkg_pretend ;; - *) die "EAPI=${EAPI} is not supported" ;; -esac - -# Obsolete function executing all the checks and printing out results -check_reqs() { - eerror "Package calling old ${FUNCNAME} function." - eerror "It should call check-reqs_pkg_pretend and check-reqs_pkg_setup." - die "${FUNCNAME} is banned" -} +# @ECLASS-VARIABLE: CHECKREQS_DONOTHING +# @USER_VARIABLE +# @DEFAULT_UNSET +# @DESCRIPTION: +# Do not error out in _check-reqs_output if requirements are not met. +# This is a user flag and should under _no circumstances_ be set in the ebuild. +[[ -n ${I_KNOW_WHAT_I_AM_DOING} ]] && CHECKREQS_DONOTHING=1 # @FUNCTION: check-reqs_pkg_setup # @DESCRIPTION: @@ -82,9 +84,9 @@ check_reqs() { check-reqs_pkg_setup() { debug-print-function ${FUNCNAME} "$@" - check-reqs_prepare - check-reqs_run - check-reqs_output + _check-reqs_prepare + _check-reqs_run + _check-reqs_output } # @FUNCTION: check-reqs_pkg_pretend @@ -101,6 +103,16 @@ check-reqs_pkg_pretend() { # @DESCRIPTION: # Internal function that checks the variables that should be defined. check-reqs_prepare() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_prepare "$@" +} + +# @FUNCTION: _check-reqs_prepare +# @INTERNAL +# @DESCRIPTION: +# Internal function that checks the variables that should be defined. +_check-reqs_prepare() { debug-print-function ${FUNCNAME} "$@" if [[ -z ${CHECKREQS_MEMORY} && @@ -109,7 +121,7 @@ check-reqs_prepare() { -z ${CHECKREQS_DISK_VAR} ]]; then eerror "Set some check-reqs eclass variables if you want to use it." eerror "If you are user and see this message file a bug against the package." - die "${FUNCNAME}: check-reqs eclass called but not actualy used!" + die "${FUNCNAME}: check-reqs eclass called but not actually used!" fi } @@ -118,34 +130,41 @@ check-reqs_prepare() { # @DESCRIPTION: # Internal function that runs the check based on variable settings. check-reqs_run() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_run "$@" +} + +# @FUNCTION: _check-reqs_run +# @INTERNAL +# @DESCRIPTION: +# Internal function that runs the check based on variable settings. +_check-reqs_run() { debug-print-function ${FUNCNAME} "$@" # some people are *censored* unset CHECKREQS_FAILED - [[ ${EAPI:-0} == [0123] ]] && local MERGE_TYPE="" - - # use != in test, because MERGE_TYPE only exists in EAPI 4 and later if [[ ${MERGE_TYPE} != binary ]]; then [[ -n ${CHECKREQS_MEMORY} ]] && \ - check-reqs_memory \ + _check-reqs_memory \ ${CHECKREQS_MEMORY} [[ -n ${CHECKREQS_DISK_BUILD} ]] && \ - check-reqs_disk \ + _check-reqs_disk \ "${T}" \ "${CHECKREQS_DISK_BUILD}" fi if [[ ${MERGE_TYPE} != buildonly ]]; then [[ -n ${CHECKREQS_DISK_USR} ]] && \ - check-reqs_disk \ - "${EROOT}/usr" \ + _check-reqs_disk \ + "${EROOT%/}/usr" \ "${CHECKREQS_DISK_USR}" [[ -n ${CHECKREQS_DISK_VAR} ]] && \ - check-reqs_disk \ - "${EROOT}/var" \ + _check-reqs_disk \ + "${EROOT%/}/var" \ "${CHECKREQS_DISK_VAR}" fi } @@ -156,6 +175,17 @@ check-reqs_run() { # Internal function that returns number in KiB. # Returns 1024**2 for 1G or 1024**3 for 1T. check-reqs_get_kibibytes() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_get_kibibytes "$@" +} + +# @FUNCTION: _check-reqs_get_kibibytes +# @INTERNAL +# @DESCRIPTION: +# Internal function that returns number in KiB. +# Returns 1024**2 for 1G or 1024**3 for 1T. +_check-reqs_get_kibibytes() { debug-print-function ${FUNCNAME} "$@" [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]" @@ -179,6 +209,17 @@ check-reqs_get_kibibytes() { # Internal function that returns the numerical value without the unit. # Returns "1" for "1G" or "150" for "150T". check-reqs_get_number() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_get_number "$@" +} + +# @FUNCTION: _check-reqs_get_number +# @INTERNAL +# @DESCRIPTION: +# Internal function that returns the numerical value without the unit. +# Returns "1" for "1G" or "150" for "150T". +_check-reqs_get_number() { debug-print-function ${FUNCNAME} "$@" [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]" @@ -195,6 +236,17 @@ check-reqs_get_number() { # Internal function that returns the unit without the numerical value. # Returns "GiB" for "1G" or "TiB" for "150T". check-reqs_get_unit() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_get_unit "$@" +} + +# @FUNCTION: _check-reqs_get_unit +# @INTERNAL +# @DESCRIPTION: +# Internal function that returns the unit without the numerical value. +# Returns "GiB" for "1G" or "TiB" for "150T". +_check-reqs_get_unit() { debug-print-function ${FUNCNAME} "$@" [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]" @@ -217,11 +269,22 @@ check-reqs_get_unit() { # Internal function that prints the warning and dies if required based on # the test results. check-reqs_output() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_get_unit "$@" +} + +# @FUNCTION: _check-reqs_output +# @INTERNAL +# @DESCRIPTION: +# Internal function that prints the warning and dies if required based on +# the test results. +_check-reqs_output() { debug-print-function ${FUNCNAME} "$@" local msg="ewarn" - [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && msg="eerror" + [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && msg="eerror" if [[ -n ${CHECKREQS_FAILED} ]]; then ${msg} ${msg} "Space constraints set in the ebuild were not met!" @@ -229,7 +292,7 @@ check-reqs_output() { ${msg} "as per failed tests." ${msg} - [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && \ + [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && \ die "Build requirements not met!" fi } @@ -239,32 +302,53 @@ check-reqs_output() { # @DESCRIPTION: # Internal function that checks size of RAM. check-reqs_memory() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_memory "$@" +} + +# @FUNCTION: _check-reqs_memory +# @INTERNAL +# @DESCRIPTION: +# Internal function that checks size of RAM. +_check-reqs_memory() { debug-print-function ${FUNCNAME} "$@" [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]" local size=${1} local actual_memory + local actual_swap - check-reqs_start_phase \ + _check-reqs_start_phase \ ${size} \ "RAM" if [[ -r /proc/meminfo ]] ; then actual_memory=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) + actual_swap=$(awk '/SwapTotal/ { print $2 }' /proc/meminfo) else - actual_memory=$(sysctl hw.physmem 2>/dev/null ) - [[ "$?" == "0" ]] && - actual_memory=$(echo $actual_memory | sed -e 's/^[^:=]*[:=]//' ) + actual_memory=$(sysctl hw.physmem 2>/dev/null) + [[ $? -eq 0 ]] && actual_memory=$(echo "${actual_memory}" \ + | sed -e 's/^[^:=]*[:=][[:space:]]*//') + actual_swap=$(sysctl vm.swap_total 2>/dev/null) + [[ $? -eq 0 ]] && actual_swap=$(echo "${actual_swap}" \ + | sed -e 's/^[^:=]*[:=][[:space:]]*//') fi if [[ -n ${actual_memory} ]] ; then - if [[ ${actual_memory} -lt $(check-reqs_get_kibibytes ${size}) ]] ; then + if [[ ${actual_memory} -ge $(_check-reqs_get_kibibytes ${size}) ]] ; then + eend 0 + elif [[ -n ${actual_swap} && $((${actual_memory} + ${actual_swap})) \ + -ge $(_check-reqs_get_kibibytes ${size}) ]] ; then + ewarn "Amount of main memory is insufficient, but amount" + ewarn "of main memory combined with swap is sufficient." + ewarn "Build process may make computer very slow!" + eend 0 + else eend 1 - check-reqs_unsatisfied \ + _check-reqs_unsatisfied \ ${size} \ "RAM" - else - eend 0 fi else eend 1 @@ -277,6 +361,16 @@ check-reqs_memory() { # @DESCRIPTION: # Internal function that checks space on the harddrive. check-reqs_disk() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_disk "$@" +} + +# @FUNCTION: _check-reqs_disk +# @INTERNAL +# @DESCRIPTION: +# Internal function that checks space on the harddrive. +_check-reqs_disk() { debug-print-function ${FUNCNAME} "$@" [[ -z ${2} ]] && die "Usage: ${FUNCNAME} [path] [size]" @@ -285,16 +379,16 @@ check-reqs_disk() { local size=${2} local space_kbi - check-reqs_start_phase \ + _check-reqs_start_phase \ ${size} \ "disk space at \"${path}\"" space_kbi=$(df -Pk "${1}" 2>/dev/null | awk 'FNR == 2 {print $4}') if [[ $? == 0 && -n ${space_kbi} ]] ; then - if [[ ${space_kbi} -lt $(check-reqs_get_kibibytes ${size}) ]] ; then + if [[ ${space_kbi} -lt $(_check-reqs_get_kibibytes ${size}) ]] ; then eend 1 - check-reqs_unsatisfied \ + _check-reqs_unsatisfied \ ${size} \ "disk space at \"${path}\"" else @@ -311,13 +405,23 @@ check-reqs_disk() { # @DESCRIPTION: # Internal function that inform about started check check-reqs_start_phase() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_start_phase "$@" +} + +# @FUNCTION: _check-reqs_start_phase +# @INTERNAL +# @DESCRIPTION: +# Internal function that inform about started check +_check-reqs_start_phase() { debug-print-function ${FUNCNAME} "$@" [[ -z ${2} ]] && die "Usage: ${FUNCNAME} [size] [location]" local size=${1} local location=${2} - local sizeunit="$(check-reqs_get_number ${size}) $(check-reqs_get_unit ${size})" + local sizeunit="$(_check-reqs_get_number ${size}) $(_check-reqs_get_unit ${size})" ebegin "Checking for at least ${sizeunit} ${location}" } @@ -325,10 +429,22 @@ check-reqs_start_phase() { # @FUNCTION: check-reqs_unsatisfied # @INTERNAL # @DESCRIPTION: -# Internal function that inform about check result. +# Internal function that informs about check result. # It has different output between pretend and setup phase, # where in pretend phase it is fatal. check-reqs_unsatisfied() { + [[ ${EAPI} == [67] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _check-reqs_unsatisfied "$@" +} + +# @FUNCTION: _check-reqs_unsatisfied +# @INTERNAL +# @DESCRIPTION: +# Internal function that informs about check result. +# It has different output between pretend and setup phase, +# where in pretend phase it is fatal. +_check-reqs_unsatisfied() { debug-print-function ${FUNCNAME} "$@" [[ -z ${2} ]] && die "Usage: ${FUNCNAME} [size] [location]" @@ -336,18 +452,17 @@ check-reqs_unsatisfied() { local msg="ewarn" local size=${1} local location=${2} - local sizeunit="$(check-reqs_get_number ${size}) $(check-reqs_get_unit ${size})" + local sizeunit="$(_check-reqs_get_number ${size}) $(_check-reqs_get_unit ${size})" - [[ ${EBUILD_PHASE} == "pretend" && -z ${I_KNOW_WHAT_I_AM_DOING} ]] && msg="eerror" + [[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && msg="eerror" ${msg} "There is NOT at least ${sizeunit} ${location}" # @ECLASS-VARIABLE: CHECKREQS_FAILED - # @DESCRIPTION: # @INTERNAL + # @DESCRIPTION: # If set the checks failed and eclass should abort the build. # Internal, do not set yourself. CHECKREQS_FAILED="true" } -_CHECK_REQS_ECLASS_=1 fi From 18bc10eadc3b42b36da1da292862d1bff38ddc27 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:37:55 +0100 Subject: [PATCH 33/40] eclass/db-use: Sync with gentoo It's from gentoo commit 52acf58202ee276674745962306d6cb00223f5e2. --- eclass/db-use.eclass | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass index 83ae94799c..55e72286fd 100644 --- a/eclass/db-use.eclass +++ b/eclass/db-use.eclass @@ -1,13 +1,24 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # This is a common location for functions that aid the use of sys-libs/db # -# Bugs: maintainer-needed@gentoo.org + +# @ECLASS: db-use.eclass +# @MAINTAINER: +# maintainer-needed@gentoo.org +# @AUTHOR: +# Paul de Vrieze +# @SUPPORTED_EAPIS: 5 6 7 8 +# @BLURB: This is a common location for functions that aid the use of sys-libs/db +# @DESCRIPTION: +# This eclass is designed to provide helpful functions for depending on +# sys-libs/db. # multilib is used for get_libname in all EAPI -case "${EAPI:-0}" in - 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;; - *) inherit multilib ;; +case ${EAPI} in + 5|6) inherit eapi7-ver ;& # fallthrough + 7|8) inherit multilib ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac #Convert a version to a db slot @@ -30,7 +41,6 @@ db_ver_to_slot() { #Find the version that correspond to the given atom db_findver() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -ne 1 ]; then eerror "Function db_findver needs one argument" >&2 eerror "args given:" >&2 @@ -58,7 +68,6 @@ db_findver() { # to test for, it will aim to find the library corresponding to it. db_includedir() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -eq 0 ]; then VER="$(db_findver sys-libs/db)" || return 1 VER="$(db_ver_to_slot "$VER")" @@ -92,7 +101,6 @@ db_includedir() { # packages to test for, it will aim to find the library corresponding to it. db_libname() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [ $# -eq 0 ]; then VER="$(db_findver sys-libs/db)" || return 1 if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then From 56219249ad0a1d984280dc862f639f028b457579 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:38:47 +0100 Subject: [PATCH 34/40] eclass/linux-mod: Sync with gentoo It's from gentoo commit b984f1b57fba45cebdbf990eb02d25fda34d44a5. --- eclass/linux-mod.eclass | 73 ++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index de005967a3..e327be7ca1 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: linux-mod.eclass @@ -7,6 +7,8 @@ # @AUTHOR: # John Mylchreest , # Stefan Schweizer +# @SUPPORTED_EAPIS: 6 7 8 +# @PROVIDES: linux-info # @BLURB: It provides the functionality required to install external modules against a kernel source tree. # @DESCRIPTION: # This eclass is used to interface with linux-info.eclass in such a way @@ -18,11 +20,15 @@ # These are as follows: # @ECLASS-VARIABLE: MODULES_OPTIONAL_USE +# @PRE_INHERIT +# @DEFAULT_UNSET # @DESCRIPTION: # A string containing the USE flag to use for making this eclass optional # The recommended non-empty value is 'modules' # @ECLASS-VARIABLE: MODULES_OPTIONAL_USE_IUSE_DEFAULT +# @PRE_INHERIT +# @DEFAULT_UNSET # @DESCRIPTION: # A boolean to control the IUSE default state for the MODULES_OPTIONAL_USE USE # flag. Default value is unset (false). True represented by 1 or 'on', other @@ -32,21 +38,26 @@ # @DESCRIPTION: # A string containing the directory of the target kernel sources. The default value is # "/usr/src/linux" +: ${KERNEL_DIR:=/usr/src/linux} # @ECLASS-VARIABLE: ECONF_PARAMS +# @DEFAULT_UNSET # @DESCRIPTION: # It's a string containing the parameters to pass to econf. # If this is not set, then econf isn't run. # @ECLASS-VARIABLE: BUILD_PARAMS +# @DEFAULT_UNSET # @DESCRIPTION: # It's a string with the parameters to pass to emake. # @ECLASS-VARIABLE: BUILD_TARGETS # @DESCRIPTION: # It's a string with the build targets to pass to make. The default value is "clean module" +: ${BUILD_TARGETS:=clean module} # @ECLASS-VARIABLE: MODULE_NAMES +# @DEFAULT_UNSET # @DESCRIPTION: # It's a string containing the modules to be built automatically using the default # src_compile/src_install. It will only make ${BUILD_TARGETS} once in any directory. @@ -91,12 +102,14 @@ # This can be explicitly enabled by setting any of the following variables. # @ECLASS-VARIABLE: MODULESD__ENABLED +# @DEFAULT_UNSET # @DESCRIPTION: # This is used to disable the modprobe.d file generation otherwise the file will be # always generated (unless no MODULESD__* variable is provided). Set to "no" to disable # the generation of the file and the installation of the documentation. # @ECLASS-VARIABLE: MODULESD__EXAMPLES +# @DEFAULT_UNSET # @DESCRIPTION: # This is a bash array containing a list of examples which should # be used. If you want us to try and take a guess set this to "guess". @@ -108,6 +121,7 @@ # where array_component is " options" (see modprobe.conf(5)) # @ECLASS-VARIABLE: MODULESD__ALIASES +# @DEFAULT_UNSET # @DESCRIPTION: # This is a bash array containing a list of associated aliases. # @@ -118,22 +132,38 @@ # where array_component is "wildcard " (see modprobe.conf(5)) # @ECLASS-VARIABLE: MODULESD__ADDITIONS +# @DEFAULT_UNSET # @DESCRIPTION: # This is a bash array containing a list of additional things to # add to the bottom of the file. This can be absolutely anything. # Each entry is a new line. # @ECLASS-VARIABLE: MODULESD__DOCS +# @DEFAULT_UNSET # @DESCRIPTION: # This is a string list which contains the full path to any associated # documents for . These files are installed in the live tree. # @ECLASS-VARIABLE: KV_OBJ +# @INTERNAL # @DESCRIPTION: # It's a read-only variable. It contains the extension of the kernel modules. -inherit eutils linux-info multilib -EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm +case ${EAPI:-0} in + [67]) + inherit eutils + ;; + 8) + ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_LINUX_MOD_ECLASS} ]] ; then +_LINUX_MOD_ECLASS=1 + +# TODO: When adding support for future EAPIs, please audit this list +# for unused inherits and conditionalise them. +inherit linux-info multilib toolchain-funcs case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;; @@ -144,9 +174,16 @@ esac 0) die "EAPI=${EAPI} is not supported with MODULES_OPTIONAL_USE_IUSE_DEFAULT due to lack of IUSE defaults" ;; esac -IUSE="kernel_linux ${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}" +IUSE="dist-kernel + ${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}" SLOT="0" -RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( virtual/modutils ) ${MODULES_OPTIONAL_USE:+)}" +RDEPEND=" + ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} + kernel_linux? ( + sys-apps/kmod[tools] + dist-kernel? ( virtual/dist-kernel:= ) + ) + ${MODULES_OPTIONAL_USE:+)}" DEPEND="${RDEPEND} ${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} sys-apps/sed @@ -208,13 +245,13 @@ use_m() { # if the kernel version is greater than 2.6.6 then we should use # M= instead of SUBDIRS= - [ ${KV_MAJOR} -eq 3 ] && return 0 + [ ${KV_MAJOR} -ge 3 ] && return 0 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \ return 0 || return 1 } # @FUNCTION: convert_to_m -# @USAGE: /path/to/the/file +# @USAGE: # @DESCRIPTION: # It converts a file (e.g. a makefile) to use M= instead of SUBDIRS= convert_to_m() { @@ -570,11 +607,6 @@ linux-mod_pkg_setup() { local is_bin="${MERGE_TYPE}" # If we are installing a binpkg, take a different path. - # use MERGE_TYPE if available (eapi>=4); else use non-PMS EMERGE_FROM (eapi<4) - if has ${EAPI} 0 1 2 3; then - is_bin=${EMERGE_FROM} - fi - if [[ ${is_bin} == binary ]]; then linux-mod_pkg_setup_binary return @@ -640,6 +672,11 @@ linux-mod_src_compile() { [[ -n ${KERNEL_DIR} ]] && addpredict "${KERNEL_DIR}/null.dwo" + # Set CROSS_COMPILE in the environment. + # This allows it to be overridden in local Makefiles. + # https://bugs.gentoo.org/550428 + local -x CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-} + BUILD_TARGETS=${BUILD_TARGETS:-clean module} strip_modulenames; cd "${S}" @@ -672,12 +709,11 @@ linux-mod_src_compile() { # inside the variables gets used as targets for Make, which then # fails. eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" \ - CROSS_COMPILE=${CHOST}- \ LDFLAGS=\"$(get_abi_LDFLAGS)\" \ ${BUILD_FIXES} \ ${BUILD_PARAMS} \ ${BUILD_TARGETS} " \ - || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" + || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" cd "${OLDPWD}" touch "${srcdir}"/.built fi @@ -689,7 +725,7 @@ linux-mod_src_compile() { # @FUNCTION: linux-mod_src_install # @DESCRIPTION: -# It install the modules specified in MODULES_NAME. The modules should be inside the ${objdir} +# It install the modules specified in MODULE_NAMES. The modules should be inside the ${objdir} # directory and they are installed inside /lib/modules/${KV_FULL}/${libdir}. # # The modprobe.d configuration file is automatically generated if the @@ -720,7 +756,7 @@ linux-mod_src_install() { einfo "Installing ${modulename} module" cd "${objdir}" || die "${objdir} does not exist" - insinto /lib/modules/${KV_FULL}/${libdir} + insinto "${INSTALL_MOD_PATH}"/lib/modules/${KV_FULL}/${libdir} doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" cd "${OLDPWD}" @@ -760,3 +796,8 @@ linux-mod_pkg_postrm() { [ -n "${MODULES_OPTIONAL_USE}" ] && use !${MODULES_OPTIONAL_USE} && return remove_moduledb; } + +fi + +EXPORT_FUNCTIONS pkg_setup src_compile src_install \ + pkg_preinst pkg_postinst pkg_postrm From 54d6f86fd1dcf0f49563639ebf4d6e01c9415f0e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:43:34 +0100 Subject: [PATCH 35/40] eclass/java-utils-2: Sync with gentoo It's from gentoo commit b0969b17ed1e01f9c93a36ffb6cd0fa81747dac3. --- eclass/java-utils-2.eclass | 137 +++++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 50 deletions(-) diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 7a49b4f40c..a79e865e66 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2018 Gentoo Authors +# Copyright 2004-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-utils-2.eclass @@ -6,6 +6,7 @@ # java@gentoo.org # @AUTHOR: # Thomas Matthijs , Karl Trygve Kalleberg +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: Base eclass for Java packages # @DESCRIPTION: # This eclass provides functionality which is used by java-pkg-2.eclass, @@ -16,17 +17,22 @@ # that have optional Java support. In addition you can inherit java-ant-2 for # Ant-based packages. +case ${EAPI:-0} in + [5678]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_JAVA_UTILS_2_ECLASS} ]] ; then +_JAVA_UTILS_2_ECLASS=1 + # EAPI 7 has version functions built-in. Use eapi7-ver for all earlier eclasses. # Keep versionator inheritance in case consumers are using it implicitly. -[[ ${EAPI} == [0123456] ]] && inherit eapi7-ver eutils multilib versionator - -IUSE="" +[[ ${EAPI} == [56] ]] && inherit eapi7-ver eutils multilib versionator # Make sure we use java-config-2 export WANT_JAVA_CONFIG="2" -# Prefix variables are only available for EAPI>=3 -has "${EAPI:-0}" 0 1 2 && ED="${D}" EPREFIX= EROOT="${ROOT}" +has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )" # @VARIABLE: JAVA_PKG_E_DEPEND # @INTERNAL @@ -110,13 +116,29 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"} # Normally this is determined from the jre/jdk version specified in RDEPEND. # See java-pkg_get-target function below. # -# Should generallyonly be used for testing and debugging. +# Should generally only be used for testing and debugging. # # emerge bar to be compatible with 1.3 # @CODE # JAVA_PKG_WANT_TARGET=1.3 emerge bar # @CODE +# @ECLASS-VARIABLE: JAVA_TEST_EXTRA_ARGS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array of extra arguments that should be passed to java command when running tests. +# It is useful when you need to pass a value to a Java program that uses +# System.getProperty(). If it uses System.getenv(), use `export var=value` instead. +# +# It is used only when running tests. +# +# @CODE +# JAVA_TEST_EXTRA_ARGS=( +# -Dsome.var=x +# "-Dother.var=\"y z\"" +# ) +# @CODE + # @ECLASS-VARIABLE: JAVA_PKG_DEBUG # @DEFAULT_UNSET # @DESCRIPTION: @@ -264,7 +286,7 @@ java-pkg_addres() { } # @FUNCTION: java-pkg_rm_files -# @USAGE: java-pkg_rm_files File1.java File2.java ... +# @USAGE: [File2.java] ... # @DESCRIPTION: # Remove unneeded files in ${S}. # @@ -349,7 +371,7 @@ java-pkg_dojar() { insinto "${JAVA_PKG_JARDEST}" doins "${jar}" ) || die "failed to install ${jar}" - java-pkg_append_ JAVA_PKG_CLASSPATH "${EPREFIX}/${JAVA_PKG_JARDEST}/${jar_basename}" + java-pkg_append_ JAVA_PKG_CLASSPATH "${EPREFIX}${JAVA_PKG_JARDEST}/${jar_basename}" debug-print "installed ${jar} to ${ED}${JAVA_PKG_JARDEST}" # make a symlink to the original jar if it's symlink else @@ -973,10 +995,6 @@ java-pkg_jar-from() { [[ -z ${target_pkg} ]] && die "Must specify a package" - if [[ "${EAPI}" == "1" ]]; then - target_pkg="${target_pkg//:/-}" - fi - # default destjar to the target jar [[ -z "${destjar}" ]] && destjar="${target_jar}" @@ -1112,10 +1130,6 @@ java-pkg_getjars() { local pkgs="${1}" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - jars="$(java-config ${deep} --classpath=${pkgs})" [[ $? != 0 ]] && die "java-config --classpath=${pkgs} failed" debug-print "${pkgs}:${jars}" @@ -1181,10 +1195,6 @@ java-pkg_getjar() { local pkg="${1}" target_jar="${2}" jar - if [[ "${EAPI}" == "1" ]]; then - pkg="${pkg//:/-}" - fi - [[ -z ${pkg} ]] && die "Must specify package to get a jar from" [[ -z ${target_jar} ]] && die "Must specify jar to get" @@ -1270,10 +1280,6 @@ java-pkg_register-dependency() { [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - if [[ -z "${jar}" ]]; then for pkg in ${pkgs//,/ }; do java-pkg_ensure-dep runtime "${pkg}" @@ -1327,10 +1333,6 @@ java-pkg_register-optional-dependency() { [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" - if [[ "${EAPI}" == "1" ]]; then - pkgs="${pkgs//:/-}" - fi - if [[ -z "${jar}" ]]; then for pkg in ${pkgs//,/ }; do java-pkg_record-jar_ --optional "${pkg}" @@ -1482,7 +1484,6 @@ java-pkg_ensure-vm-version-sufficient() { # @FUNCTION: java-pkg_is-vm-version-sufficient # @INTERNAL -# @DESCRIPTION: # @RETURN: zero - VM is sufficient; non-zero - VM is not sufficient java-pkg_is-vm-version-sufficient() { debug-print-function ${FUNCNAME} $* @@ -1562,8 +1563,7 @@ java-pkg_ensure-vm-version-ge() { # Parameters: # $@ - VM version to compare current VM to # @CODE -# @RETURN: zero - current VM version is greater than checked version; -# non-zero - current VM version is not greater than checked version +# @RETURN: zero - current VM version is greater than checked version; non-zero - current VM version is not greater than checked version java-pkg_is-vm-version-ge() { debug-print-function ${FUNCNAME} $* @@ -1687,10 +1687,8 @@ java-pkg_javac-args() { java-pkg_get-jni-cflags() { local flags="-I${JAVA_HOME}/include" - local platform="linux" - # TODO do a check that the directories are valid - flags="${flags} -I${JAVA_HOME}/include/${platform}" + flags="${flags} -I${JAVA_HOME}/include/linux" echo ${flags} } @@ -1809,8 +1807,8 @@ ejunit_() { if [[ "${junit}" == "junit-4" ]] ; then runner=org.junit.runner.JUnitCore fi - debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${runner} ${@}" - java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${runner} "${@}" || die "Running junit failed" + debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} ${@}" + java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} "${@}" || die "Running junit failed" } # @FUNCTION: ejunit @@ -1858,13 +1856,51 @@ ejunit4() { ejunit_ "junit-4" "${@}" } +# @FUNCTION: etestng +# @USAGE: etestng_ [-cp $classpath] +# @INTERNAL +# @DESCRIPTION: +# Testng wrapper function. Makes it easier to run the tests. +# Launches the tests using org.testng.TestNG. +# +# @CODE +# $1 - -cp or -classpath +# $2 - the classpath passed to it +# $@ - test classes for testng to run. +# @CODE +etestng() { + debug-print-function ${FUNCNAME} $* + + local runner=org.testng.TestNG + local cp=$(java-pkg_getjars --with-dependencies testng) + local tests + + if [[ ${1} = -cp || ${1} = -classpath ]]; then + cp="${cp}:${2}" + shift 2 + else + cp="${cp}:." + fi + + for test in ${@}; do + tests+="${test}," + done + + debug-print "java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\""\ + "-Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner}"\ + "-usedefaultlisteners false -testclass ${tests}" + java -cp "${cp}" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]}\ + ${runner} -usedefaultlisteners false -testclass ${tests}\ + || die "Running TestNG failed." +} + # @FUNCTION: java-utils-2_src_prepare # @DESCRIPTION: # src_prepare Searches for bundled jars # Don't call directly, but via java-pkg-2_src_prepare! java-utils-2_src_prepare() { case ${EAPI:-0} in - [0-5]) + 5) java-pkg_func-exists java_prepare && java_prepare ;; *) java-pkg_func-exists java_prepare && @@ -2151,9 +2187,6 @@ java-pkg_init() { # Don't set up build environment if installing from binary. #206024 #258423 [[ "${MERGE_TYPE}" == "binary" ]] && return - # Also try Portage's nonstandard EMERGE_FROM for old EAPIs, if it doesn't - # work nothing is lost. - has ${EAPI:-0} 0 1 2 3 && [[ "${EMERGE_FROM}" == "binary" ]] && return unset JAVAC unset JAVA_HOME @@ -2161,8 +2194,7 @@ java-pkg_init() { java-config --help >/dev/null || { eerror "" eerror "Can't run java-config --help" - eerror "Have you upgraded python recently but haven't" - eerror "run python-updater yet?" + eerror "Have you upgraded Python recently but not completed a world upgrade yet?" die "Can't run java-config --help" } @@ -2551,14 +2583,14 @@ java-pkg_needs-vm() { # @FUNCTION: java-pkg_get-current-vm # @INTERNAL -# @RETURN - The current VM being used +# @RETURN: The current VM being used java-pkg_get-current-vm() { java-config -f } # @FUNCTION: java-pkg_get-vm-vendor # @INTERNAL -# @RETURN - The vendor of the current VM +# @RETURN: The vendor of the current VM java-pkg_get-vm-vendor() { debug-print-function ${FUNCNAME} $* @@ -2569,7 +2601,7 @@ java-pkg_get-vm-vendor() { # @FUNCTION: java-pkg_get-vm-version # @INTERNAL -# @RETURN - The version of the current VM +# @RETURN: The version of the current VM java-pkg_get-vm-version() { debug-print-function ${FUNCNAME} $* @@ -2578,12 +2610,12 @@ java-pkg_get-vm-version() { # @FUNCTION: java-pkg_build-vm-from-handle # @INTERNAL +# @RETURN: VM handle of an available JDK # @DESCRIPTION: # Selects a build vm from a list of vm handles. First checks for the system-vm # beeing usable, then steps through the listed handles till a suitable vm is # found. # -# @RETURN - VM handle of an available JDK java-pkg_build-vm-from-handle() { debug-print-function ${FUNCNAME} "$*" @@ -2728,10 +2760,13 @@ java-pkg_jar-list() { java-pkg_verify-classes() { #$(find ${D} -type f -name '*.jar' -o -name '*.class') - local version_verify="/usr/bin/class-version-verify.py" + local version_verify_1="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py" + local version_verify_2="${EPREFIX}/usr/libexec/javatoolkit/class-version-verify.py" - if [[ ! -x "${version_verify}" ]]; then - version_verify="/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py" + if [[ -x "${version_verify_1}" ]]; then + local version_verify=${version_verify_1} + else + local version_verify=${version_verify_2} fi if [[ ! -x "${version_verify}" ]]; then @@ -2913,3 +2948,5 @@ java-pkg_gen-cp() { fi done } + +fi From d1d684938e9695d14caefcbeaa767c7066926d10 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:45:54 +0100 Subject: [PATCH 36/40] eclass/versionator: Sync with gentoo It's from gentoo commit ffb256572995c9894ed5b1239ce5fbe59bed1a72. --- eclass/versionator.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/versionator.eclass b/eclass/versionator.eclass index 0f5d577035..8a1066a0fd 100644 --- a/eclass/versionator.eclass +++ b/eclass/versionator.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: versionator.eclass @@ -7,6 +7,7 @@ # base-system@gentoo.org # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 # @BLURB: functions which simplify manipulation of ${PV} and similar version strings +# @DEPRECATED: ver_* functions from EAPI 7 # @DESCRIPTION: # This eclass provides functions which simplify manipulating $PV and similar # variables. Most functions default to working with $PV, although other From 77f86f02ec720f98920e6ebc6ffbad8b520ba1fe Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 2 Mar 2022 18:50:37 +0100 Subject: [PATCH 37/40] eclass/ruby-single: Sync with gentoo It's from gentoo commit 76843876d228f9f8cd9254016a1e80d9387e364d. --- eclass/ruby-single.eclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass index 4ca5f5ef20..ed230f4a84 100644 --- a/eclass/ruby-single.eclass +++ b/eclass/ruby-single.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-single.eclass @@ -7,7 +7,8 @@ # @AUTHOR: # Author: Hans de Graaff # Based on python-single-r1 by: Michał Górny -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 4 5 6 7 8 +# @PROVIDES: ruby-utils # @BLURB: An eclass for Ruby packages not installed for multiple implementations. # @DESCRIPTION: # An eclass for packages which don't support being installed for @@ -17,7 +18,7 @@ # pull in the dependency on the requested ruby targets. # # @CODE -# USE_RUBY="ruby20 ruby21" +# USE_RUBY="ruby26 ruby27" # inherit ruby-single # RDEPEND="${RUBY_DEPS}" # @CODE @@ -26,7 +27,7 @@ case "${EAPI:-0}" in 0|1|2|3) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; - 4|5|6|7) + 4|5|6|7|8) ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" @@ -39,6 +40,7 @@ inherit ruby-utils # @ECLASS-VARIABLE: USE_RUBY # @DEFAULT_UNSET +# @PRE_INHERIT # @REQUIRED # @DESCRIPTION: # This variable contains a space separated list of targets (see above) a package @@ -65,7 +67,7 @@ inherit ruby-utils # # Example value: # @CODE -# || ( dev-lang/ruby:2.0 dev-lang/ruby:1.9 ) virtual/rubygems +# || ( dev-lang/ruby:2.7 dev-lang/ruby:2.6 ) virtual/rubygems # @CODE # # The order of dependencies will change over time to best match the From 37f707798808419af94bd26a3accf31c706fdc9e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 13:40:55 +0100 Subject: [PATCH 38/40] changelog: Add an entry --- changelog/updates/2022-03-03-update-pkgs-2018.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/updates/2022-03-03-update-pkgs-2018.md diff --git a/changelog/updates/2022-03-03-update-pkgs-2018.md b/changelog/updates/2022-03-03-update-pkgs-2018.md new file mode 100644 index 0000000000..afee60bec7 --- /dev/null +++ b/changelog/updates/2022-03-03-update-pkgs-2018.md @@ -0,0 +1,5 @@ +- pinentry ([1.2.0](https://dev.gnupg.org/T5566)) +- quota ([4.06](https://sourceforge.net/p/linuxquota/code/ci/0acd4cc6275122fd9864cb7b5d349e65a2622920/)) +- xfsprogs ([5.14.2](https://marc.info/?l=linux-xfs&m=163883318025390&w=2)) +- grep ([3.7](https://savannah.gnu.org/forum/forum.php?forum_id=10037)) +- less ([590](https://www.greenwoodsoftware.com/less/news.590.html)) From 8ff21113a2431feb106ca0c2d41348d1a30f53e9 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 15:56:00 +0100 Subject: [PATCH 39/40] virtual/perl-version: Add from gentoo It's from gentoo commit 7616bccb3c84c3b9513a22aea59081e6858602f0. It's a dependency of dev-perl/libintl-perl. --- virtual/perl-version/metadata.xml | 9 +++++++++ .../perl-version/perl-version-0.992.800.ebuild | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 virtual/perl-version/metadata.xml create mode 100644 virtual/perl-version/perl-version-0.992.800.ebuild diff --git a/virtual/perl-version/metadata.xml b/virtual/perl-version/metadata.xml new file mode 100644 index 0000000000..1a0d0fb9a8 --- /dev/null +++ b/virtual/perl-version/metadata.xml @@ -0,0 +1,9 @@ + + + + + perl@gentoo.org + Gentoo Perl Project + + + diff --git a/virtual/perl-version/perl-version-0.992.800.ebuild b/virtual/perl-version/perl-version-0.992.800.ebuild new file mode 100644 index 0000000000..32755beb5f --- /dev/null +++ b/virtual/perl-version/perl-version-0.992.800.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Virtual for ${PN#perl-}" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + || ( =dev-lang/perl-5.34* ~perl-core/${PN#perl-}-${PV} ) + dev-lang/perl:= + !perl-core/${PN#perl-}-${PV}-r999 +" From 0877f4dfdda865dbf91a3cddff2638df5e704034 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 9 Mar 2022 18:22:45 +0100 Subject: [PATCH 40/40] dev-libs/inih: Add from gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. It's a dependency of sys-fs/xfsprogs. --- dev-libs/inih/Manifest | 1 + dev-libs/inih/inih-53.ebuild | 37 ++++++++++++++++++++++++++++++++++++ dev-libs/inih/metadata.xml | 16 ++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 dev-libs/inih/Manifest create mode 100644 dev-libs/inih/inih-53.ebuild create mode 100644 dev-libs/inih/metadata.xml diff --git a/dev-libs/inih/Manifest b/dev-libs/inih/Manifest new file mode 100644 index 0000000000..e19e85d2c8 --- /dev/null +++ b/dev-libs/inih/Manifest @@ -0,0 +1 @@ +DIST inih-53.tar.gz 16984 BLAKE2B 1242e6273c9dd9a11ea026a3495a487b2aa72d8e01f34304d8568c88897ae9c9bb425246f992dc16f4dc2210ec14c597d0ef595cec84ff98a5d6101ee5a643b9 SHA512 99bc40c294b521e9973184bfb30d60c129735991f33b387b3d023827a34672b0489eadf91e38895ea725168dbc7b27bb02c1975debe7573b4b209d0e947b2100 diff --git a/dev-libs/inih/inih-53.ebuild b/dev-libs/inih/inih-53.ebuild new file mode 100644 index 0000000000..0c65d26f16 --- /dev/null +++ b/dev-libs/inih/inih-53.ebuild @@ -0,0 +1,37 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit meson-multilib + +DESCRIPTION="inih (INI not invented here) simple .INI file parser" +HOMEPAGE="https://github.com/benhoyt/inih" + +SRC_URI="https://github.com/benhoyt/inih/archive/r${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +LICENSE="BSD" +SLOT="0" + +IUSE="static-libs" + +S="${WORKDIR}/inih-r${PV}" + +multilib_src_configure() { + local emesonargs=( + -Ddefault_library=$(usex static-libs both shared) + -Ddistro_install=true + -Dwith_INIReader=true + ) + + meson_src_configure +} + +multilib_src_install_all() { + local DOCS=( + LICENSE.txt + README.md + ) + einstalldocs +} diff --git a/dev-libs/inih/metadata.xml b/dev-libs/inih/metadata.xml new file mode 100644 index 0000000000..d07fe526d5 --- /dev/null +++ b/dev-libs/inih/metadata.xml @@ -0,0 +1,16 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + hurikhan77+bgo@gmail.com + Kai Krakow + + + https://github.com/benhoyt/inih/issues + benhoyt/inih + +