From 12cd71fa5d5b71511f85b6d6f871089289e43b4d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Jun 2022 16:02:48 +0200 Subject: [PATCH] Adding all you need for gtk mingw. --- app-arch/bzip2/bzip2-1.0.8-r1.ebuild | 135 ++++++ .../bzip2/files/bzip2-1.0.3-no-test.patch | 9 + .../files/bzip2-1.0.4-makefile-CFLAGS.patch | 25 + .../bzip2/files/bzip2-1.0.4-man-links.patch | 12 + .../bzip2/files/bzip2-1.0.6-progress.patch | 163 +++++++ app-arch/bzip2/files/bzip2-1.0.8-mingw.patch | 16 + .../files/bzip2-1.0.8-out-of-tree-build.patch | 76 +++ app-arch/bzip2/files/bzip2-1.0.8-saneso.patch | 13 + app-arch/gzip/Manifest | 2 + .../files/gzip-1.3.8-install-symlinks.patch | 11 + app-arch/gzip/gzip-1.12.ebuild | 50 ++ app-arch/zstd/zstd-1.5.2-r1.ebuild | 70 +++ .../ca-certificates-20211016.3.79.ebuild | 197 ++++++++ .../files/ca-certificates-20150426-root.patch | 49 ++ ...icates-20211016.3.72-no-cryptography.patch | 27 ++ app-misc/recuento/recuento-0.0.1.ebuild | 40 ++ dev-db/sqlite/sqlite-3.38.5.ebuild | 444 ++++++++++++++++++ dev-lang/rust-bin/metadata.xml | 14 + dev-lang/rust-bin/rust-bin-1.61.0.ebuild | 225 +++++++++ eclass/xdg.eclass | 127 +++++ gnome-base/librsvg/librsvg-2.54.4.ebuild | 109 +++++ gui-libs/gtk/gtk-4.6.5.ebuild | 211 +++++++++ gui-libs/libadwaita/libadwaita-1.1.2.ebuild | 65 +++ .../files/fontconfig-2.10.2-docbook.patch | 16 + .../fontconfig-2.12.3-latin-update.patch | 68 +++ .../fontconfig-2.13.1-proper_homedir.patch | 313 ++++++++++++ ...ert_delete_.uuid_for_empty_directory.patch | 43 ++ .../fontconfig-2.13.1-static_build.patch | 91 ++++ .../fontconfig-2.13.93-latin-update.patch | 62 +++ .../files/fontconfig-2.14.0-docbook.patch | 29 ++ .../fontconfig-2.14.0-latin-update.patch | 66 +++ ...tconfig-2.14.0-skip-bubblewrap-tests.patch | 14 + .../fontconfig/fontconfig-2.14.0-r1.ebuild | 220 +++++++++ media-libs/harfbuzz/harfbuzz-4.3.0.ebuild | 100 ++++ .../gentoo-functions-0.15.ebuild | 16 + .../dlfcn-windows/dlfcn-windows-1.3.1.ebuild | 37 ++ sys-libs/mman-windows/mman-windows-0.1.ebuild | 38 ++ virtual/os-headers/os-headers-0-r2.ebuild | 18 + .../gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch | 34 ++ x11-libs/gdk-pixbuf/gdk-pixbuf-2.42.8.ebuild | 116 +++++ x11-libs/libdrm/libdrm-2.4.111.ebuild | 66 +++ .../pango/files/1.42.4-CVE-2019-1010238.patch | 34 ++ x11-libs/pango/files/1.42.4-pango-view.1.in | 113 +++++ x11-libs/pango/files/1.50.7-harfbuzz-4.patch | 78 +++ x11-libs/pango/pango-1.50.7.ebuild | 90 ++++ 45 files changed, 3752 insertions(+) create mode 100644 app-arch/bzip2/bzip2-1.0.8-r1.ebuild create mode 100644 app-arch/bzip2/files/bzip2-1.0.3-no-test.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.4-man-links.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.6-progress.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.8-mingw.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch create mode 100644 app-arch/bzip2/files/bzip2-1.0.8-saneso.patch create mode 100644 app-arch/gzip/Manifest create mode 100644 app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch create mode 100644 app-arch/gzip/gzip-1.12.ebuild create mode 100644 app-arch/zstd/zstd-1.5.2-r1.ebuild create mode 100644 app-misc/ca-certificates/ca-certificates-20211016.3.79.ebuild create mode 100644 app-misc/ca-certificates/files/ca-certificates-20150426-root.patch create mode 100644 app-misc/ca-certificates/files/ca-certificates-20211016.3.72-no-cryptography.patch create mode 100644 app-misc/recuento/recuento-0.0.1.ebuild create mode 100644 dev-db/sqlite/sqlite-3.38.5.ebuild create mode 100644 dev-lang/rust-bin/metadata.xml create mode 100644 dev-lang/rust-bin/rust-bin-1.61.0.ebuild create mode 100644 eclass/xdg.eclass create mode 100644 gnome-base/librsvg/librsvg-2.54.4.ebuild create mode 100644 gui-libs/gtk/gtk-4.6.5.ebuild create mode 100644 gui-libs/libadwaita/libadwaita-1.1.2.ebuild create mode 100644 media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.13.93-latin-update.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.14.0-docbook.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.14.0-latin-update.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.14.0-skip-bubblewrap-tests.patch create mode 100644 media-libs/fontconfig/fontconfig-2.14.0-r1.ebuild create mode 100644 media-libs/harfbuzz/harfbuzz-4.3.0.ebuild create mode 100644 sys-apps/gentoo-functions/gentoo-functions-0.15.ebuild create mode 100644 sys-libs/dlfcn-windows/dlfcn-windows-1.3.1.ebuild create mode 100644 sys-libs/mman-windows/mman-windows-0.1.ebuild create mode 100644 virtual/os-headers/os-headers-0-r2.ebuild create mode 100644 x11-libs/gdk-pixbuf/files/gdk-pixbuf-2.32.3-fix-lowmem-uclibc.patch create mode 100644 x11-libs/gdk-pixbuf/gdk-pixbuf-2.42.8.ebuild create mode 100644 x11-libs/libdrm/libdrm-2.4.111.ebuild create mode 100644 x11-libs/pango/files/1.42.4-CVE-2019-1010238.patch create mode 100644 x11-libs/pango/files/1.42.4-pango-view.1.in create mode 100644 x11-libs/pango/files/1.50.7-harfbuzz-4.patch create mode 100644 x11-libs/pango/pango-1.50.7.ebuild diff --git a/app-arch/bzip2/bzip2-1.0.8-r1.ebuild b/app-arch/bzip2/bzip2-1.0.8-r1.ebuild new file mode 100644 index 0000000..49810b4 --- /dev/null +++ b/app-arch/bzip2/bzip2-1.0.8-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly +# (since we're building shared libs) ... + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bzip2.gpg +inherit toolchain-funcs multilib-minimal usr-ldscript verify-sig + +if [[ ${PVR} != 1.0.8-r1 ]]; then + die "Please remove libbz2.so.1.0 logic from multilib_src_install" +fi + +DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" +HOMEPAGE="https://sourceware.org/bzip2/" +SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz" +SRC_URI+=" verify-sig? ( https://sourceware.org/pub/${PN}/${P}.tar.gz.sig )" + +LICENSE="BZIP2" +SLOT="0/1" # subslot = SONAME +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="static static-libs" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch + "${FILESDIR}"/${PN}-1.0.8-saneso.patch + "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986 + "${FILESDIR}"/${PN}-1.0.6-progress.patch + "${FILESDIR}"/${PN}-1.0.3-no-test.patch + "${FILESDIR}"/${PN}-1.0.8-mingw.patch #393573 + "${FILESDIR}"/${PN}-1.0.8-out-of-tree-build.patch +) + +DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf ) +HTML_DOCS=( manual.html ) + +src_prepare() { + default + + # - Use right man path + # - Generate symlinks instead of hardlinks + # - pass custom variables to control libdir + sed -i \ + -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \ + -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \ + -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ + Makefile || die +} + +bemake() { + emake \ + VPATH="${S}" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + "$@" +} + +multilib_src_compile() { + bemake -f "${S}"/Makefile-libbz2_so all + # Make sure we link against the shared lib #504648 + ln -s libbz2.so.${PV} libbz2.so || die + bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')" +} + +multilib_src_test() { + cp "${S}"/sample* "${BUILD_DIR}" || die + bemake -f "${S}"/Makefile check +} + +multilib_src_install() { + into /usr + + # Install the shared lib manually. We install: + # .x.x.x - standard shared lib behavior + # .x.x - SONAME some distros use #338321 + # .x - SONAME Gentoo uses + dolib.so libbz2.so.${PV} + local v + for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do + dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} + done + + # Install libbz2.so.1.0 due to accidental soname change in 1.0.7. + # Reference: 98da0ad82192d21ad74ae52366ea8466e2acea24. + # OK to remove one year after 2020-04-11. + if [[ ! -L "${ED}/usr/$(get_libdir)/libbz2.so.1.0" ]]; then + dosym libbz2.so.${PV} "/usr/$(get_libdir)/libbz2.so.1.0" + fi + + use static-libs && dolib.a libbz2.a + + if multilib_is_native_abi ; then + gen_usr_ldscript -a bz2 + + dobin bzip2recover.exe + into / + dobin bzip2.exe + fi +} + +multilib_src_install_all() { + # `make install` doesn't cope with out-of-tree builds, nor with + # installing just non-binaries, so handle things ourselves. + insinto /usr/include + doins bzlib.h + into /usr + dobin bz{diff,grep,more} + doman *.1 + + dosym bzdiff /usr/bin/bzcmp + dosym bzdiff.1 /usr/share/man/man1/bzcmp.1 + + dosym bzmore /usr/bin/bzless + dosym bzmore.1 /usr/share/man/man1/bzless.1 + + local x + for x in bunzip2 bzcat bzip2recover ; do + dosym bzip2.1 /usr/share/man/man1/${x}.1 + done + for x in bz{e,f}grep ; do + dosym bzgrep /usr/bin/${x} + dosym bzgrep.1 /usr/share/man/man1/${x}.1 + done + + einstalldocs + + # move "important" bzip2 binaries to /bin and use the shared libbz2.so + dosym bzip2 /bin/bzcat + dosym bzip2 /bin/bunzip2 +} diff --git a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch new file mode 100644 index 0000000..9e554f7 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch @@ -0,0 +1,9 @@ +--- a/Makefile ++++ b/Makefile +@@ -23,5 +23,5 @@ + bzlib.o + +-all: libbz2.a bzip2 bzip2recover test ++all: libbz2.a bzip2 bzip2recover + + bzip2: libbz2.a bzip2.o diff --git a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch new file mode 100644 index 0000000..04bd0d9 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch @@ -0,0 +1,25 @@ +--- a/Makefile ++++ b/Makefile +@@ -18,10 +18,9 @@ + CC=gcc + AR=ar + RANLIB=ranlib +-LDFLAGS= + + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS) + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -24,7 +24,7 @@ + SHELL=/bin/sh + CC=gcc + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS) + + OBJS= blocksort.o \ + huffman.o \ diff --git a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch new file mode 100644 index 0000000..deaa981 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch @@ -0,0 +1,12 @@ +http://bugs.gentoo.org/172986 + +--- a/Makefile ++++ b/Makefile +@@ -85,4 +85,7 @@ + cp -f bzip2.1 $(PREFIX)/share/man/man1 + chmod a+r $(PREFIX)/share/man/man1/bzip2.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzcat.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1 + cp -f bzlib.h $(PREFIX)/include + chmod a+r $(PREFIX)/include/bzlib.h diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch new file mode 100644 index 0000000..8369597 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch @@ -0,0 +1,163 @@ +Ripped from Mandrake + +http://bugs.gentoo.org/82192 + +--- a/bzip2.1 ++++ b/bzip2.1 +@@ -235,6 +235,10 @@ + Suppress non-essential warning messages. Messages pertaining to + I/O errors and other critical events will not be suppressed. + .TP ++.B \-p \-\-show\-progress ++Show percentage of input\-file done and while compressing show the percentage ++of the original file the new file is. ++.TP + .B \-v --verbose + Verbose mode -- show the compression ratio for each file processed. + Further \-v's increase the verbosity level, spewing out lots of +--- a/bzip2.c ++++ b/bzip2.c +@@ -145,6 +145,7 @@ + #include + #include + #include ++#include + #include + #include "bzlib.h" + +@@ -301,6 +302,7 @@ + Char progNameReally[FILE_NAME_LEN]; + FILE *outputHandleJustInCase; + Int32 workFactor; ++Char showProgress; + + static void panic ( Char* ) NORETURN; + static void ioError ( void ) NORETURN; +@@ -425,6 +427,12 @@ + UInt32 nbytes_in_lo32, nbytes_in_hi32; + UInt32 nbytes_out_lo32, nbytes_out_hi32; + Int32 bzerr, bzerr_dummy, ret; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ /* double because big files might otherwhise give ++ * overflows. not long long since not all compilers ++ * support that one ++ */ ++ time_t startTime, currentTime; + + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); +@@ -432,12 +440,21 @@ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ (void)fseek(stream, 0, SEEK_END); ++ fileSize = ftello(stream); ++ rewind(stream); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + bzf = BZ2_bzWriteOpen ( &bzerr, zStream, + blockSize100k, verbosity, workFactor ); + if (bzerr != BZ_OK) goto errhandler; + + if (verbosity >= 2) fprintf ( stderr, "\n" ); + ++ time(&startTime); + while (True) { + + if (myfeof(stream)) break; +@@ -446,6 +463,22 @@ + if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf ); + if (bzerr != BZ_OK) goto errhandler; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ ++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */ ++ double curInPos = ftello(stream); ++ double curOutPos = ftello(zStream); ++ ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize); ++ if (srcMode == SM_F2F) ++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos); ++ ++ fprintf(stderr, " \r"); ++ } ++ } + } + + BZ2_bzWriteClose64 ( &bzerr, bzf, 0, +@@ -526,6 +559,8 @@ + UChar unused[BZ_MAX_UNUSED]; + Int32 nUnused; + UChar* unusedTmp; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ time_t startTime, currentTime; + + nUnused = 0; + streamNo = 0; +@@ -533,9 +568,19 @@ + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ off_t dummy = ftello(zStream); ++ (void)fseeko(zStream, 0, SEEK_END); ++ fileSize = ftello(zStream); ++ (void)fseeko(zStream, dummy, SEEK_SET); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ time(&startTime); + while (True) { + + bzf = BZ2_bzReadOpen ( +@@ -551,6 +596,16 @@ + if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0) + fwrite ( obuf, sizeof(UChar), nread, stream ); + if (ferror(stream)) goto errhandler_io; ++ ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ if ((currentTime - startTime) >= 2) { ++ double curInPos = ftello(zStream); ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize); ++ } ++ } + } + if (bzerr != BZ_STREAM_END) goto errhandler; + +@@ -1872,6 +1927,7 @@ + deleteOutputOnInterrupt = False; + exitValue = 0; + i = j = 0; /* avoid bogus warning from egcs-1.1.X */ ++ showProgress = False; + + /*-- Set up signal handlers for mem access errors --*/ + signal (SIGSEGV, mySIGSEGVorSIGBUScatcher); +@@ -1949,6 +2005,7 @@ + case 'k': keepInputFiles = True; break; + case 's': smallMode = True; break; + case 'q': noisy = False; break; ++ case 'p': showProgress = True; break; + case '1': blockSize100k = 1; break; + case '2': blockSize100k = 2; break; + case '3': blockSize100k = 3; break; +@@ -1985,6 +2042,7 @@ + if (ISFLAG("--keep")) keepInputFiles = True; else + if (ISFLAG("--small")) smallMode = True; else + if (ISFLAG("--quiet")) noisy = False; else ++ if (ISFLAG("--show-progress")) showProgress = True; else + if (ISFLAG("--version")) license(); else + if (ISFLAG("--license")) license(); else + if (ISFLAG("--exponential")) workFactor = 1; else diff --git a/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch b/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch new file mode 100644 index 0000000..b512a8f --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch @@ -0,0 +1,16 @@ +make it build for mingw targets + +https://bugs.gentoo.org/393573 + +--- a/bzlib.h ++++ b/bzlib.h +@@ -81,6 +81,9 @@ typedef + /* windows.h define small to char */ + # undef small + # endif ++# ifndef WINAPI ++# define WINAPI ++# endif + # ifdef BZ_EXPORT + # define BZ_API(func) WINAPI func + # define BZ_EXTERN extern diff --git a/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch b/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch new file mode 100644 index 0000000..0481826 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch @@ -0,0 +1,76 @@ +--- bzip2-1.0.8/Makefile ++++ bzip2-1.0.8/Makefile +@@ -54,7 +54,6 @@ + + check: test + test: bzip2 +- @cat words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 +@@ -67,7 +66,6 @@ + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref +- @cat words3 + + install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi +@@ -113,25 +111,8 @@ + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +-blocksort.o: blocksort.c +- @cat words0 +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c +-bzip2.o: bzip2.c +- $(CC) $(CFLAGS) -c bzip2.c +-bzip2recover.o: bzip2recover.c +- $(CC) $(CFLAGS) -c bzip2recover.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< + + + distclean: clean +--- bzip2-1.0.8/Makefile-libbz2_so ++++ bzip2-1.0.8/Makefile-libbz2_so +@@ -36,24 +36,10 @@ + + all: $(OBJS) + $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS) +- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.8 libbz2.so.1.0 ++ ln -sf libbz2.so.1.0.8 libbz2.so.1.0 + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared + +-blocksort.o: blocksort.c +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< diff --git a/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch new file mode 100644 index 0000000..63409f5 --- /dev/null +++ b/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch @@ -0,0 +1,13 @@ +--- bzip2-1.0.8/Makefile-libbz2_so ++++ bzip2-1.0.8/Makefile-libbz2_so +@@ -35,8 +35,8 @@ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS) +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 ++ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.8 libbz2.so.1.0 + diff --git a/app-arch/gzip/Manifest b/app-arch/gzip/Manifest new file mode 100644 index 0000000..bf24f30 --- /dev/null +++ b/app-arch/gzip/Manifest @@ -0,0 +1,2 @@ +DIST gzip-1.12.tar.xz 825548 BLAKE2B 7e2d482c08555f5fb0ff5408c0afe48c61034e9779eed6e3dd8046c847234c0a8a6bc34d49a934a54db0d73033e12c71a228d373551384a4cd663315071637e0 SHA512 116326fe991828227de150336a0c016f4fe932dfbb728a16b4a84965256d9929574a4f5cfaf3cf6bb4154972ef0d110f26ab472c93e62ec9a5fd7a5d65abea24 +DIST gzip-1.12.tar.xz.sig 833 BLAKE2B ab7b4a759ef163d67f20773607ba0408ea9f1f7c7c224f43635fc3752acc521b74dbea4ec9ebb58a2f4fa13ecae19e00779b4b56c2cb95976301445beff817aa SHA512 1f4702797f7c5f1873c2f9c2f6210ba23824455d17ee82f50f0bf24240ed5bdf0090cf85338ccf76ba82422f8b4ad3a329d8bbf1350cb094d7bd61aa45550397 diff --git a/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch new file mode 100644 index 0000000..6f04b42 --- /dev/null +++ b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -926,7 +926,7 @@ + rm -f "$$dest" && \ + case $@ in \ + install-exec-hook) \ +- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \ ++ $(LN_S) "$$source" "$$dest";; \ + esac \ + ) || exit; \ + done; \ diff --git a/app-arch/gzip/gzip-1.12.ebuild b/app-arch/gzip/gzip-1.12.ebuild new file mode 100644 index 0000000..1a671b1 --- /dev/null +++ b/app-arch/gzip/gzip-1.12.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gzip.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Standard GNU compressor" +HOMEPAGE="https://www.gnu.org/software/gzip/" +SRC_URI="mirror://gnu/gzip/${P}.tar.xz + https://alpha.gnu.org/gnu/gzip/${P}.tar.xz" +SRC_URI+=" verify-sig? ( + mirror://gnu/gzip/${P}.tar.xz.sig + https://alpha.gnu.org/gnu/gzip/${P}.tar.xz.sig + )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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="pic static" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )" + +PATCHES=( + "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" +) + +src_configure() { + use static && append-flags -static + + # Avoid text relocation in gzip + use pic && export DEFS="NO_ASM" + + # bug #663928 + econf --disable-gcc-warnings +} + +src_install() { + default + + docinto txt + dodoc algorithm.doc gzip.doc + + # keep most things in /usr, just the fun stuff in / + dodir /bin + mv "${ED}"/usr/bin/gzip.exe "${ED}"/bin/ || die + mv "${ED}"/usr/bin/{gunzip,uncompress,zcat} "${ED}"/bin/ || die + sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die +} diff --git a/app-arch/zstd/zstd-1.5.2-r1.ebuild b/app-arch/zstd/zstd-1.5.2-r1.ebuild new file mode 100644 index 0000000..ec9c913 --- /dev/null +++ b/app-arch/zstd/zstd-1.5.2-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal toolchain-funcs usr-ldscript + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="lz4 static-libs +threads" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +src_prepare() { + default + multilib_copy_sources +} + +mymake() { + sed -i 's@^.*cp.*$@cp -f $(BUILD_DIR)/zstd.exe zstd.exe; \\@' programs/Makefile + sed -i 's@^\(\s*\).*INSTALL_PROGRAM) zstd.*$@\1$(INSTALL_PROGRAM) zstd.exe $(DESTDIR)$(BINDIR)/zstd.exe@' programs/Makefile + sed -i '/install -m 755/ s/\$(EXT)/.exe/g' contrib/pzstd/Makefile + + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + V=1 \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake HAVE_LZ4="$(usex lz4 1 0)" zstd + + mymake -C contrib/pzstd + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + gen_usr_ldscript -a zstd + + mymake -C contrib/pzstd DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/app-misc/ca-certificates/ca-certificates-20211016.3.79.ebuild b/app-misc/ca-certificates/ca-certificates-20211016.3.79.ebuild new file mode 100644 index 0000000..5f931e3 --- /dev/null +++ b/app-misc/ca-certificates/ca-certificates-20211016.3.79.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# The Debian ca-certificates package merely takes the CA database as it exists +# in the nss package and repackages it for use by openssl. +# +# The issue with using the compiled debs directly is two fold: +# - they do not update frequently enough for us to rely on them +# - they pull the CA database from nss tip of tree rather than the release +# +# So we take the Debian source tools and combine them with the latest nss +# release to produce (largely) the same end result. The difference is that +# now we know our cert database is kept in sync with nss and, if need be, +# can be sync with nss tip of tree more frequently to respond to bugs. + +# When triaging user reports, refer to our wiki for tips: +# https://wiki.gentoo.org/wiki/Certificates#Debugging_certificate_issues + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit python-any-r1 + +if [[ ${PV} == *.* ]] ; then + # Compile from source ourselves. + PRECOMPILED=false + + DEB_VER=$(ver_cut 1) + NSS_VER=$(ver_cut 2-) + RTM_NAME="NSS_${NSS_VER//./_}_RTM" +else + # Debian precompiled version. + PRECOMPILED=true + inherit unpacker +fi + +DESCRIPTION="Common CA Certificates PEM files" +HOMEPAGE="https://packages.debian.org/sid/ca-certificates" +NMU_PR="" +if ${PRECOMPILED} ; then + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" +else + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz + https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz + cacert? ( + https://dev.gentoo.org/~whissi/dist/ca-certificates/nss-cacert-class1-class3-r2.patch + )" +fi + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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="" +${PRECOMPILED} || IUSE+=" cacert" + +# c_rehash: we run `c_rehash` +# debianutils: we run `run-parts` +CDEPEND="app-misc/c_rehash" + +BDEPEND="${CDEPEND}" +if ! ${PRECOMPILED} ; then + BDEPEND+=" ${PYTHON_DEPS}" +fi + +DEPEND="" +if ${PRECOMPILED} ; then + DEPEND+=" !/dev/null || die + eapply "${DISTDIR}"/nss-cacert-class1-class3-r2.patch + popd >/dev/null || die + fi + fi + + default + eapply -p2 "${FILESDIR}"/${PN}-20150426-root.patch + + pushd "${S}/${PN}-${DEB_VER}" >/dev/null || die + eapply "${FILESDIR}"/${PN}-20211016.3.72-no-cryptography.patch + popd >/dev/null || die + + local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') + sed -i \ + -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \ + -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ + -e 's/openssl rehash/c_rehash/' \ + usr/sbin/update-ca-certificates || die +} + +src_compile() { + cd "image/${EPREFIX}" || die + if ! ${PRECOMPILED} ; then + local d="${S}/${PN}-${DEB_VER}/mozilla" c="usr/share/${PN}" + + # Grab the database from the nss sources. + cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die + emake -C "${d}" + + # Now move the files to the same places that the precompiled would. + mkdir -p etc/ssl/certs \ + etc/ca-certificates/update.d \ + "${c}"/mozilla \ + || die + if use cacert ; then + mkdir -p "${c}"/cacert.org || die + mv "${d}"/CA_Cert_Signing_Authority.crt \ + "${c}"/cacert.org/cacert.org_class1.crt || die + mv "${d}"/CAcert_Class_3_Root.crt \ + "${c}"/cacert.org/cacert.org_class3.crt || die + fi + mv "${d}"/*.crt "${c}"/mozilla/ || die + else + mv usr/share/doc/{ca-certificates,${PF}} || die + fi + + ( + echo "# Automatically generated by ${CATEGORY}/${PF}" + echo "# $(date -u)" + echo "# Do not edit." + cd "${c}" || die + find * -name '*.crt' | LC_ALL=C sort + ) > etc/ca-certificates.conf + + sh usr/sbin/update-ca-certificates --root "${S}/image" || die +} + +src_install() { + cp -pPR image/* "${D}"/ || die + if ! ${PRECOMPILED} ; then + cd ${PN}-${DEB_VER} || die + doman sbin/*.8 + dodoc debian/README.* examples/ca-certificates-local/README + fi + + echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates + doenvd 98ca-certificates +} + +pkg_postinst() { + if [[ -d "${EROOT}/usr/local/share/ca-certificates" ]] ; then + # if the user has local certs, we need to rebuild again + # to include their stuff in the db. + # However it's too overzealous when the user has custom certs in place. + # --fresh is to clean up dangling symlinks + "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" + fi + + if [[ -n "$(find -L "${EROOT}"/etc/ssl/certs/ -type l)" ]] ; then + ewarn "Removing the following broken symlinks:" + ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" + fi +} diff --git a/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch new file mode 100644 index 0000000..6e41ac3 --- /dev/null +++ b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch @@ -0,0 +1,49 @@ +add a --root option so we can generate with DESTDIR installs + +--- a/image/usr/sbin/update-ca-certificates ++++ b/image/usr/sbin/update-ca-certificates +@@ -30,6 +30,8 @@ LOCALCERTSDIR=/usr/local/share/ca-certificates + CERTBUNDLE=ca-certificates.crt + ETCCERTSDIR=/etc/ssl/certs + HOOKSDIR=/etc/ca-certificates/update.d ++ROOT="" ++RELPATH="" + + while [ $# -gt 0 ]; + do +@@ -59,13 +61,25 @@ do + --hooksdir) + shift + HOOKSDIR="$1";; ++ --root|-r) ++ shift ++ # Needed as c_rehash wants to read the files directly. ++ # This gets us from $CERTSCONF to $CERTSDIR. ++ RELPATH="../../.." ++ ROOT=$(readlink -f "$1");; + --help|-h|*) +- echo "$0: [--verbose] [--fresh]" ++ echo "$0: [--verbose] [--fresh] [--root ]" + exit;; + esac + shift + done + ++CERTSCONF="$ROOT$CERTSCONF" ++CERTSDIR="$ROOT$CERTSDIR" ++LOCALCERTSDIR="$ROOT$LOCALCERTSDIR" ++ETCCERTSDIR="$ROOT$ETCCERTSDIR" ++HOOKSDIR="$ROOT$HOOKSDIR" ++ + if [ ! -s "$CERTSCONF" ] + then + fresh=1 +@@ -94,7 +107,7 @@ add() { + -e 's/,/_/g').pem" + if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] + then +- ln -sf "$CERT" "$PEM" ++ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" + echo "+$PEM" >> "$ADDED" + fi + # Add trailing newline to certificate, if it is missing (#635570) diff --git a/app-misc/ca-certificates/files/ca-certificates-20211016.3.72-no-cryptography.patch b/app-misc/ca-certificates/files/ca-certificates-20211016.3.72-no-cryptography.patch new file mode 100644 index 0000000..fb98eb2 --- /dev/null +++ b/app-misc/ca-certificates/files/ca-certificates-20211016.3.72-no-cryptography.patch @@ -0,0 +1,27 @@ +Remove the dependency on non-portable dev-python/cryptography. +https://bugs.gentoo.org/821706#c4 by Alex Xu + +--- a/mozilla/certdata2pem.py ++++ b/mozilla/certdata2pem.py +@@ -28,8 +28,6 @@ + import textwrap + import io + +-from cryptography import x509 +- + + objects = [] + +@@ -122,12 +120,6 @@ + if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]: + continue + +- cert = x509.load_der_x509_certificate(obj['CKA_VALUE']) +- if cert.not_valid_after < datetime.datetime.now(): +- print('!'*74) +- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL']) +- print('!'*74) +- + bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\ + .replace(' ', '_')\ + .replace('(', '=')\ diff --git a/app-misc/recuento/recuento-0.0.1.ebuild b/app-misc/recuento/recuento-0.0.1.ebuild new file mode 100644 index 0000000..a7734da --- /dev/null +++ b/app-misc/recuento/recuento-0.0.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit meson xdg + +DESCRIPTION="A free software manga reader." +HOMEPAGE="https://gitea.sergiotarxz.freemyip.com" +SRC_URI="https://gitea.sergiotarxz.freemyip.com/sergiotarxz/recuento/archive/main.tar.gz -> recuento-$PV.tar.gz" +S="${WORKDIR}/recuento" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" +>=gui-libs/libadwaita-1.1.0 +>=dev-db/sqlite-3.38.0 +" + +RDEPEND="${DEPEND}" +BDEPEND=" +virtual/pkgconfig +>=dev-util/meson-0.60.3 +" + +src_configure() { + VALAC=/usr/bin/valac-0.56 meson_src_configure +} + +src_install() { + meson_src_install +} + +pkg_postinst() { + xdg_icon_cache_update +} +pkg_postrm () { + xdg_icon_cache_update +} diff --git a/dev-db/sqlite/sqlite-3.38.5.ebuild b/dev-db/sqlite/sqlite-3.38.5.ebuild new file mode 100644 index 0000000..eb935fc --- /dev/null +++ b/dev-db/sqlite/sqlite-3.38.5.ebuild @@ -0,0 +1,444 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" != "9999" ]]; then + SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))" + DOC_PV="${SRC_PV}" + # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))" +fi + +DESCRIPTION="SQL database engine" +HOMEPAGE="https://sqlite.org/" + +# On version updates, make sure to read the forum (https://sqlite.org/forum/forum) +# for hints regarding test failures, backports, etc. +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://sqlite.org/2022/${PN}-src-${SRC_PV}.zip + doc? ( https://sqlite.org/2022/${PN}-doc-${DOC_PV}.zip )" +fi + +LICENSE="public-domain" +SLOT="3" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~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 doc icu +readline secure-delete static-libs tcl test tools" +if [[ "${PV}" == "9999" ]]; then + PROPERTIES="live" +fi +RESTRICT="!test? ( test )" + +if [[ "${PV}" == "9999" ]]; then + BDEPEND=">=dev-lang/tcl-8.6:0 + dev-vcs/fossil" +else + BDEPEND="app-arch/unzip + >=dev-lang/tcl-8.6:0" +fi +RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}] + icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] ) + readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] ) + tools? ( dev-lang/tcl:0= )" +DEPEND="${RDEPEND} + test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )" + +if [[ "${PV}" == "9999" ]]; then + S="${WORKDIR}/${PN}" +else + S="${WORKDIR}/${PN}-src-${SRC_PV}" +fi + +_fossil_fetch() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local repo_uri="${2}" + + local -x FOSSIL_HOME="${HOME}" + + mkdir -p "${T}/fossil/${repo_id}" || die + pushd "${T}/fossil/${repo_id}" > /dev/null || die + + if [[ -n "${EVCS_OFFLINE}" ]]; then + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + else + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" + fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die + echo + else + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die + einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" + fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die + echo + fi + + ( + addwrite "${distdir}" + mkdir -p "${distdir}/fossil-src/${repo_id}" || die + cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die + ) + fi + + popd > /dev/null || die +} + +_fossil_checkout() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local branch_or_commit="${2}" + local target_directory="${3}" + + local -x FOSSIL_HOME="${HOME}" + + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + + if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then + mkdir -p "${T}/fossil/${repo_id}" || die + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die + fi + + mkdir "${target_directory}" || die + pushd "${target_directory}" > /dev/null || die + + einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" + fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die + echo + + popd > /dev/null || die +} + +fossil_fetch() { + local repo_id="${1}" + local repo_uri="${2}" + local target_directory="${3}" + + local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}" + + _fossil_fetch "${repo_id}" "${repo_uri}" + _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}" +} + +src_unpack() { + if [[ "${PV}" == "9999" ]]; then + fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}" + if use doc; then + fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc" + fi + else + default + fi +} + +src_prepare() { + eapply_user + + eautoreconf + + multilib_copy_sources +} + +multilib_src_configure() { + local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" + local options=() + + options+=( + --enable-load-extension + --enable-threadsafe + ) + + # Support detection of misuse of SQLite API. + # https://sqlite.org/compile.html#enable_api_armor + append-cppflags -DSQLITE_ENABLE_API_ARMOR + + # Support bytecode and tables_used virtual tables. + # https://sqlite.org/compile.html#enable_bytecode_vtab + # https://sqlite.org/bytecodevtab.html + append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB + + # Support column metadata functions. + # https://sqlite.org/compile.html#enable_column_metadata + # https://sqlite.org/c3ref/column_database_name.html + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA + + # Support sqlite_dbpage virtual table. + # https://sqlite.org/compile.html#enable_dbpage_vtab + # https://sqlite.org/dbpage.html + append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB + + # Support dbstat virtual table. + # https://sqlite.org/compile.html#enable_dbstat_vtab + # https://sqlite.org/dbstat.html + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB + + # Support sqlite3_serialize() and sqlite3_deserialize() functions. + # https://sqlite.org/compile.html#enable_deserialize + # https://sqlite.org/c3ref/serialize.html + # https://sqlite.org/c3ref/deserialize.html + append-cppflags -DSQLITE_ENABLE_DESERIALIZE + + # Support comments in output of EXPLAIN. + # https://sqlite.org/compile.html#enable_explain_comments + append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS + + # Support Full-Text Search versions 3, 4 and 5. + # https://sqlite.org/compile.html#enable_fts3 + # https://sqlite.org/compile.html#enable_fts3_parenthesis + # https://sqlite.org/compile.html#enable_fts4 + # https://sqlite.org/compile.html#enable_fts5 + # https://sqlite.org/fts3.html + # https://sqlite.org/fts5.html + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 + options+=(--enable-fts5) + + # Support hidden columns. + append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS + + # Support memsys5 memory allocator. + # https://sqlite.org/compile.html#enable_memsys5 + # https://sqlite.org/malloc.html#memsys5 + append-cppflags -DSQLITE_ENABLE_MEMSYS5 + + # Support sqlite3_normalized_sql() function. + # https://sqlite.org/c3ref/expanded_sql.html + append-cppflags -DSQLITE_ENABLE_NORMALIZE + + # Support sqlite_offset() function. + # https://sqlite.org/compile.html#enable_offset_sql_func + # https://sqlite.org/lang_corefunc.html#sqlite_offset + append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC + + # Support pre-update hook functions. + # https://sqlite.org/compile.html#enable_preupdate_hook + # https://sqlite.org/c3ref/preupdate_count.html + append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK + + # Support Resumable Bulk Update extension. + # https://sqlite.org/compile.html#enable_rbu + # https://sqlite.org/rbu.html + append-cppflags -DSQLITE_ENABLE_RBU + + # Support R*Trees. + # https://sqlite.org/compile.html#enable_rtree + # https://sqlite.org/compile.html#enable_geopoly + # https://sqlite.org/rtree.html + # https://sqlite.org/geopoly.html + append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY + + # Support Session extension. + # https://sqlite.org/compile.html#enable_session + # https://sqlite.org/sessionintro.html + append-cppflags -DSQLITE_ENABLE_SESSION + + # Support scan status functions. + # https://sqlite.org/compile.html#enable_stmt_scanstatus + # https://sqlite.org/c3ref/stmt_scanstatus.html + # https://sqlite.org/c3ref/stmt_scanstatus_reset.html + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS + + # Support sqlite_stmt virtual table. + # https://sqlite.org/compile.html#enable_stmtvtab + # https://sqlite.org/stmt.html + append-cppflags -DSQLITE_ENABLE_STMTVTAB + + # Support unknown() function. + # https://sqlite.org/compile.html#enable_unknown_sql_function + append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + + # Support unlock notification. + # https://sqlite.org/compile.html#enable_unlock_notify + # https://sqlite.org/c3ref/unlock_notify.html + # https://sqlite.org/unlock_notify.html + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY + + # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements. + # https://sqlite.org/compile.html#enable_update_delete_limit + # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses + # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses + append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT + + # Support soundex() function. + # https://sqlite.org/compile.html#soundex + # https://sqlite.org/lang_corefunc.html#soundex + append-cppflags -DSQLITE_SOUNDEX + + # Support URI filenames. + # https://sqlite.org/compile.html#use_uri + # https://sqlite.org/uri.html + append-cppflags -DSQLITE_USE_URI + + # debug USE flag. + options+=($(use_enable debug)) + + # icu USE flag. + if use icu; then + # Support ICU extension. + # https://sqlite.org/compile.html#enable_icu + append-cppflags -DSQLITE_ENABLE_ICU + sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + fi + + # readline USE flag. + options+=( + --disable-editline + $(use_enable readline) + ) + if use readline; then + options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline") + fi + + # secure-delete USE flag. + if use secure-delete; then + # Enable secure_delete pragma by default. + # https://sqlite.org/compile.html#secure_delete + # https://sqlite.org/pragma.html#pragma_secure_delete + append-cppflags -DSQLITE_SECURE_DELETE + fi + + # static-libs USE flag. + options+=($(use_enable static-libs static)) + + # tcl, test, tools USE flags. + if use tcl || use test || { use tools && multilib_is_native_abi; }; then + options+=( + --enable-tcl + --with-tcl="${ESYSROOT}/usr/$(get_libdir)" + ) + else + options+=(--disable-tcl) + fi + + if [[ "${ABI}" == "x86" ]]; then + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then + append-cflags -mfpmath=sse + else + append-cflags -ffloat-store + fi + + # Skip known-broken test for now + # https://sqlite.org/forum/forumpost/d97caf168f + # https://sqlite.org/forum/forumpost/50f136d91d + if use test ; then + rm test/atof1.test || die + fi + fi + + sed -i 's/-DSQLITE_OS_UNIX/-DSQLITE_OS_WIN/' configure + econf "${options[@]}" +# sed -i 's/\(mksourceid\)\$(BEXE)/\1/g' Makefile + sed -i 's/^TEXE =.*$/TEXE = .exe/' Makefile + sed -i 's/^BEXE =.*$/BEXE =/' Makefile + sed -i 's/^.*BUILD_EXEEXT.*$/S["BUILD_EXEEXT"]=""/' config.status + sed -i 's/^.*TARGET_EXEEXT.*$/S["TARGET_EXEEXT"]=".exe"/' config.status + sed -i 's/SQLITE_OS_UNIX/SQLITE_OS_WIN/g' config.status + sed -i 's/^SQLITE_OS_WIN.*0.*$/S["SQLITE_OS_UNIX"]="0"/' config.status +} + +multilib_src_compile() { + emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" + + if use tools && multilib_is_native_abi; then + emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh + fi + + if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then + emake tclsqlite3.c + + local build_directory="$(pwd)" + build_directory="${build_directory##*/}" + + mkdir "${WORKDIR}/${PN}-doc-build" || die + pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die + + emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc + rmdir doc/matrix{/*,} || die + + popd > /dev/null || die + fi +} + +multilib_src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions" + return + fi + + local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}" + + # e_uri.test tries to open files in /. + # https://bugs.gentoo.org/839798 + local SANDBOX_PREDICT=${SANDBOX_PREDICT} + addpredict "/test.db:/ÿ.db" + + emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test) +} + +multilib_src_install() { + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + + if use tools && multilib_is_native_abi; then + install_tool() { + if [[ -f ".libs/${1}" ]]; then + newbin ".libs/${1}" "${2}" + else + newbin "${1}" "${2}" + fi + } + + install_tool changeset sqlite3-changeset + install_tool dbdump sqlite3-db-dump + install_tool dbhash sqlite3-db-hash + install_tool dbtotxt sqlite3-db-to-txt + install_tool index_usage sqlite3-index-usage + install_tool rbu sqlite3-rbu + install_tool scrub sqlite3-scrub + install_tool showdb sqlite3-show-db + install_tool showjournal sqlite3-show-journal + install_tool showshm sqlite3-show-shm + install_tool showstat4 sqlite3-show-stat4 + install_tool showwal sqlite3-show-wal + install_tool sqldiff sqlite3-diff + install_tool sqlite3_analyzer sqlite3-analyzer + install_tool sqlite3_checker sqlite3-checker + install_tool sqlite3_expert sqlite3-expert + install_tool sqltclsh sqlite3-tclsh + + unset -f install_tool + fi +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + doman sqlite3.1 + + if use doc; then + if [[ "${PV}" == "9999" ]]; then + pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die + else + pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die + fi + + find "(" -name "*.db" -o -name "*.txt" ")" -delete || die + if [[ "${PV}" != "9999" ]]; then + rm search search.d/admin || die + rmdir search.d || die + find -name "*~" -delete || die + fi + + ( + docinto html + dodoc -r * + ) + + popd > /dev/null || die + fi +} diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml new file mode 100644 index 0000000..ba87525 --- /dev/null +++ b/dev-lang/rust-bin/metadata.xml @@ -0,0 +1,14 @@ + + + + + rust@gentoo.org + Rust Project + + + Install clippy, Rust code linter + Install rls, Rust Language Server (used with IDEs supporting RLS protocol) + Install rustfmt, Rust code formatter + Install rust-src, needed by developer tools and for build-std (cross) + + diff --git a/dev-lang/rust-bin/rust-bin-1.61.0.ebuild b/dev-lang/rust-bin/rust-bin-1.61.0.ebuild new file mode 100644 index 0000000..9e2117e --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.61.0.ebuild @@ -0,0 +1,225 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal + +MY_P="rust-${PV}" +# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src" +MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2022-05-19/rust-src-${PV}.tar.xz" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" +SRC_URI="$(rust_all_arch_uris ${MY_P}) + rust-src? ( ${MY_SRC_URI} ) +" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rust-src rustfmt" + +DEPEND="" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + sys-apps/lsb-release +" + +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +QA_PREBUILT=" + opt/${P}/bin/.* + opt/${P}/lib/.*.so + opt/${P}/libexec/.* + opt/${P}/lib/rustlib/.*/bin/.* + opt/${P}/lib/rustlib/.*/lib/.* +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/rust.asc" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then + die "${CHOST} is not supported by upstream Rust. You must use a hard float version." + fi +} + +src_unpack() { + # sadly rust-src tarball does not have corresponding .asc file + # so do partial verification + if use verify-sig; then + for f in ${A}; do + if [[ -f ${DISTDIR}/${f}.asc ]]; then + verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" + fi + done + fi + + default_src_unpack + + echo "${S}" + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die +} + +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + + # start native abi install + pushd "${S}" >/dev/null || die + local analysis std + analysis="$(grep 'analysis' ./components)" + std="$(grep 'std' ./components)" + local components="rustc,cargo,${std}" + use doc && components="${components},rust-docs" + use clippy && components="${components},clippy-preview" + use rls && components="${components},rls-preview,${analysis}" + use rustfmt && components="${components},rustfmt-preview" + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + echo rust-src >> ./components || die + components="${components},rust-src" + fi + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${ED}/opt/${P}" \ + --mandir="${ED}/opt/${P}/man" \ + --disable-ldconfig \ + || die + rust_target="x86_64-pc-windows-gnu" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rls && symlinks+=( rls ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + + einfo "installing eselect-rust symlinks and paths" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- + local ver_i="${i}-bin-${PV}" + ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" + dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" + dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" + dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" + dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" + + # musl logic can be improved a bit, but fine as is for now + cat <<-_EOF_ > "${T}/50${P}" + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" + $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') + $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') + _EOF_ + doenvd "${T}/50${P}" + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + popd >/dev/null || die + #end native abi install + + else + local rust_targets + rust_targets="$(rust_abi $(get_abi_CHOST ${v##*.})) x86_64-pc-windows-gnu" + dodir "/opt/${P}/lib/rustlib" + for rust_target in $rust_targets; do + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + done + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + elog "Rust installs a helper script for calling GDB now," + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass new file mode 100644 index 0000000..c9fa0f4 --- /dev/null +++ b/eclass/xdg.eclass @@ -0,0 +1,127 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: xdg.eclass +# @MAINTAINER: +# freedesktop-bugs@gentoo.org +# @AUTHOR: +# Original author: Gilles Dartiguelongue +# @SUPPORTED_EAPIS: 5 6 7 8 +# @PROVIDES: xdg-utils +# @BLURB: Provides phases for XDG compliant packages. +# @DESCRIPTION: +# Utility eclass to update the desktop, icon and shared mime info as laid +# out in the freedesktop specs & implementations + +inherit xdg-utils + +_DEFINE_XDG_SRC_PREPARE=false +case "${EAPI}" in + 5|6|7) + # src_prepare is only exported in EAPI < 8. + EXPORT_FUNCTIONS src_prepare + _DEFINE_XDG_SRC_PREPARE=true + ;; + 8) + ;; + *) die "${ECLASS}: EAPI=${EAPI} is not supported" ;; +esac +EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm + +# Avoid dependency loop as both depend on glib-2 +if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then +_XDG_DEPEND=" +" + +case "${EAPI}" in + 5|6|7) + DEPEND="${_XDG_DEPEND}" + ;; + *) + IDEPEND="${_XDG_DEPEND}" + ;; +esac +fi + +if ${_DEFINE_XDG_SRC_PREPARE}; then +# @FUNCTION: xdg_src_prepare +# @DESCRIPTION: +# Prepare sources to work with XDG standards. +# Note that this function is only defined and exported in EAPIs < 8. +xdg_src_prepare() { + xdg_environment_reset + + [[ ${EAPI} != 5 ]] && default +} +fi + +# @FUNCTION: xdg_pkg_preinst +# @DESCRIPTION: +# Finds .desktop, icon and mime info files for later handling in pkg_postinst. +# Locations are stored in XDG_ECLASS_DESKTOPFILES, XDG_ECLASS_ICONFILES +# and XDG_ECLASS_MIMEINFOFILES respectively. +xdg_pkg_preinst() { + local f + + XDG_ECLASS_DESKTOPFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_DESKTOPFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/applications' -type f -print0 2>/dev/null) + + XDG_ECLASS_ICONFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_ICONFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/icons' -type f -print0 2>/dev/null) + + XDG_ECLASS_MIMEINFOFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_MIMEINFOFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/mime' -type f -print0 2>/dev/null) +} + +# @FUNCTION: xdg_pkg_postinst +# @DESCRIPTION: +# Handle desktop, icon and mime info database updates. +xdg_pkg_postinst() { + if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No .desktop files to add to database" + fi + + if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No icon files to add to cache" + fi + + if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No mime info files to add to database" + fi +} + +# @FUNCTION: xdg_pkg_postrm +# @DESCRIPTION: +# Handle desktop, icon and mime info database updates. +xdg_pkg_postrm() { + if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No .desktop files to add to database" + fi + + if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No icon files to add to cache" + fi + + if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then + einfo "Doing nothing" + else + debug-print "No mime info files to add to database" + fi +} + diff --git a/gnome-base/librsvg/librsvg-2.54.4.ebuild b/gnome-base/librsvg/librsvg-2.54.4.ebuild new file mode 100644 index 0000000..4100b71 --- /dev/null +++ b/gnome-base/librsvg/librsvg-2.54.4.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{8..11} ) + +inherit gnome2 multilib-minimal python-any-r1 rust-toolchain vala + +DESCRIPTION="Scalable Vector Graphics (SVG) rendering library" +HOMEPAGE="https://wiki.gnome.org/Projects/LibRsvg https://gitlab.gnome.org/GNOME/librsvg" + +LICENSE="LGPL-2+" +SLOT="2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + +IUSE="gtk-doc +introspection +vala" +REQUIRED_USE=" + gtk-doc? ( introspection ) + vala? ( introspection ) +" +RESTRICT="test" # Lots of issues on 32bit builds, 64bit build seems to get into an infinite compilation sometimes, etc. + +RDEPEND=" + >=x11-libs/cairo-1.16.0[glib,svg,${MULTILIB_USEDEP}] + >=media-libs/freetype-2.9:2[${MULTILIB_USEDEP}] + >=x11-libs/gdk-pixbuf-2.20:2[introspection?,${MULTILIB_USEDEP}] + >=dev-libs/glib-2.50.0:2[${MULTILIB_USEDEP}] + >=media-libs/harfbuzz-2.0.0:=[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}] + >=x11-libs/pango-1.48.11[${MULTILIB_USEDEP}] + + introspection? ( >=dev-libs/gobject-introspection-0.10.8:= ) +" +DEPEND="${RDEPEND} + >=virtual/rust-1.56[${MULTILIB_USEDEP}] + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]') + gtk-doc? ( dev-util/gi-docgen ) + virtual/pkgconfig + vala? ( $(vala_depend) ) + + dev-libs/gobject-introspection-common + dev-libs/vala-common +" +# dev-libs/gobject-introspection-common, dev-libs/vala-common needed by eautoreconf + +QA_FLAGS_IGNORED=" + usr/bin/rsvg-convert + usr/lib.*/librsvg.* +" + +src_prepare() { + use vala && vala_src_prepare + gnome2_src_prepare +} + +multilib_src_configure() { + local myconf=( + --disable-static + --disable-debug + $(multilib_native_use_enable gtk-doc) + $(multilib_native_use_enable introspection) + $(multilib_native_use_enable vala) + --enable-pixbuf-loader + ) + + if ! multilib_is_native_abi; then + myconf+=( + # Set the rust target, which can differ from CHOST + RUST_TARGET="$(rust_abi)" + # RUST_TARGET is only honored if cross_compiling, but non-native ABIs aren't cross as + # far as C parts and configure auto-detection are concerned as CHOST equals CBUILD + cross_compiling=yes + ) + fi + + export RUST_TARGET=x86_64-pc-windows-gnu + ECONF_SOURCE=${S} \ + gnome2_src_configure "${myconf[@]}" + + if multilib_is_native_abi; then + ln -s "${S}"/doc/html doc/html || die + fi +} + +multilib_src_compile() { + gnome2_src_compile +} + +multilib_src_install() { + gnome2_src_install +} + +multilib_src_install_all() { + find "${ED}" -name '*.la' -delete || die + + if use gtk-doc; then + mkdir -p "${ED}"/usr/share/gtk-doc/html/ || die + mv "${ED}"/usr/share/doc/Rsvg-2.0 "${ED}"/usr/share/gtk-doc/html/ || die + fi +} + +pkg_postinst() { + multilib_foreach_abi gnome2_pkg_postinst +} + +pkg_postrm() { + multilib_foreach_abi gnome2_pkg_postrm +} diff --git a/gui-libs/gtk/gtk-4.6.5.ebuild b/gui-libs/gtk/gtk-4.6.5.ebuild new file mode 100644 index 0000000..e2f7cba --- /dev/null +++ b/gui-libs/gtk/gtk-4.6.5.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +inherit gnome.org gnome2-utils meson optfeature python-any-r1 virtualx xdg + +DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user interfaces" +HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/" + +LICENSE="LGPL-2+" +SLOT="4" +IUSE="aqua broadway colord cups examples ffmpeg gstreamer +introspection sysprof test vulkan wayland +X cpu_flags_x86_f16c" +REQUIRED_USE=" + test? ( introspection ) +" + +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +COMMON_DEPEND=" + >=dev-libs/fribidi-0.19.7 + >=dev-libs/glib-2.66.0:2 + >=media-libs/graphene-1.9.1[introspection?] + >=x11-libs/cairo-1.14[aqua?,glib,svg,X?] + >=x11-libs/gdk-pixbuf-2.30:2[introspection?] + >=x11-libs/pango-1.50.0[introspection?] + media-libs/libpng:0= + media-libs/tiff:0= + >=media-libs/libepoxy-1.4[X(+)?] + media-libs/libjpeg-turbo:0= + >=media-libs/harfbuzz-2.1.0:= + x11-misc/shared-mime-info + + colord? ( >=x11-misc/colord-0.1.9:0= ) + cups? ( >=net-print/cups-2.0 ) + ffmpeg? ( media-video/ffmpeg ) + gstreamer? ( + >=media-libs/gst-plugins-bad-1.12.3 + >=media-libs/gst-plugins-base-1.12.3[opengl] + ) + introspection? ( >=dev-libs/gobject-introspection-1.39:= ) + vulkan? ( media-libs/vulkan-loader:= ) + wayland? ( + >=dev-libs/wayland-1.20.0 + >=dev-libs/wayland-protocols-1.23 + media-libs/mesa[wayland] + >=x11-libs/libxkbcommon-0.2 + ) + X? ( + >=app-accessibility/at-spi2-atk-2.5.3 + media-libs/fontconfig + media-libs/mesa[X(+)] + x11-libs/libX11 + >=x11-libs/libXi-1.8 + x11-libs/libXext + >=x11-libs/libXrandr-1.5 + x11-libs/libXcursor + x11-libs/libXfixes + x11-libs/libXdamage + x11-libs/libXinerama + ) +" +DEPEND="${COMMON_DEPEND} + sysprof? ( >=dev-util/sysprof-capture-3.40.1:4 ) + X? ( x11-base/xorg-proto ) +" +RDEPEND="${COMMON_DEPEND} + >=dev-util/gtk-update-icon-cache-3 +" +# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710 +PDEPEND=" + gnome-base/librsvg + >=x11-themes/adwaita-icon-theme-3.14 +" +BDEPEND=" + dev-libs/gobject-introspection-common + introspection? ( + ${PYTHON_DEPS} + $(python_gen_any_dep ' + dev-python/pygobject:3[${PYTHON_USEDEP}] + ') + ) + dev-python/docutils + >=dev-util/gdbus-codegen-2.48 + dev-util/glib-utils + >=sys-devel/gettext-0.19.7 + virtual/pkgconfig + test? ( + dev-libs/glib:2 + wayland? ( dev-libs/weston[headless] ) + ) +" + +python_check_deps() { + python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return +} + +pkg_setup() { + use introspection && python-any-r1_pkg_setup +} + +src_prepare() { + default + xdg_environment_reset + + # dev-python/docutils installs rst2man.py, not rst2man + sed -i -e "s/'rst2man'/'rst2man.py'/" docs/reference/gtk/meson.build || die + # Nothing should use gtk4-update-icon-cache and an unversioned one is shipped by dev-util/gtk-update-icon-cache + sed -i -e '/gtk4-update-icon-cache/d' tools/meson.build || die + # Workaround RWX ELF sections, https://gitlab.gnome.org/GNOME/gtk/-/issues/4598 + sed -i -e 's/^ld =.*/ld = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die + sed -i -e 's/^objcopy =.*/objcopy = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die +} + +src_configure() { + local emesonargs=( + # GDK backends + $(meson_use X x11-backend) + $(meson_use wayland wayland-backend) + $(meson_use broadway broadway-backend) + -Dwin32-backend=true + $(meson_use aqua macos-backend) + + # Media backends + $(meson_feature ffmpeg media-ffmpeg) + $(meson_feature gstreamer media-gstreamer) + + # Print backends + $(meson_feature cups print-cups) + + # Optional dependencies + $(meson_feature vulkan) + -Dcloudproviders=disabled # cloudprovider is not packaged in Gentoo yet + $(meson_feature sysprof) + -Dtracker=disabled # tracker3 is not packaged in Gentoo yet + $(meson_feature colord) + # Expected to fail with GCC < 11 + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71993 + $(meson_feature cpu_flags_x86_f16c f16c) + + # Documentation and introspection + -Dgtk_doc=false # we ship pregenerated API docs from tarball + -Dman-pages=true + $(meson_feature introspection) + + # Demos and binaries + $(meson_use examples build-examples) + $(meson_use examples demos) + $(meson_use test build-tests) + -Dinstall-tests=false + ) + meson_src_configure +} + +src_test() { + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die + + if use X; then + einfo "Running tests under X" + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx meson_src_test --setup=x11 + fi + + if use wayland; then + einfo "Running tests under Weston" + + export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)" + + weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 & + compositor=$! + export WAYLAND_DISPLAY=wayland-5 + + GSETTINGS_SCHEMA_DIR="${S}/gtk" meson_src_test --setup=wayland + + exit_code=$? + kill ${compositor} + fi +} + +src_install() { + meson_src_install + + insinto /usr/share/gtk-doc/html + # This will install API docs specific to X11 and wayland regardless of USE flags, but this is intentional + doins -r "${S}"/docs/reference/{gtk/gtk4,gsk/gsk4,gdk/gdk4{,-wayland,-x11}} +} + +pkg_preinst() { + xdg_pkg_preinst + gnome2_schemas_savelist +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update + + if ! has_version "app-text/evince"; then + elog "Please install app-text/evince for print preview functionality." + elog "Alternatively, check \"gtk-print-preview-command\" documentation and" + elog "add it to your settings.ini file." + fi + + if use examples ; then + optfeature "syntax highlighting in gtk4-demo" app-text/highlight + fi +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +} diff --git a/gui-libs/libadwaita/libadwaita-1.1.2.ebuild b/gui-libs/libadwaita/libadwaita-1.1.2.ebuild new file mode 100644 index 0000000..21b5348 --- /dev/null +++ b/gui-libs/libadwaita/libadwaita-1.1.2.ebuild @@ -0,0 +1,65 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{8..11} ) +VALA_MIN_API_VERSION="0.52" +inherit gnome.org meson python-any-r1 vala virtualx + +DESCRIPTION="Building blocks for modern adaptive GNOME applications" +HOMEPAGE="https://gnome.pages.gitlab.gnome.org/libadwaita/ https://gitlab.gnome.org/GNOME/libadwaita" + +LICENSE="LGPL-2.1+" +SLOT="1" +IUSE="+introspection test +vala" +REQUIRED_USE="vala? ( introspection )" + +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +DEPEND=" + >=dev-libs/glib-2.66:2 + >=gui-libs/gtk-4.5.0:4[introspection?] + dev-libs/fribidi + introspection? ( >=dev-libs/gobject-introspection-1.54:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + vala? ( $(vala_depend) ) + >=dev-util/meson-0.59.0 + dev-util/glib-utils + sys-devel/gettext + virtual/pkgconfig +" + +src_prepare() { + default + use vala && vala_setup +} + +src_configure() { + local emesonargs=( + # Never use gi-docgen subproject + --wrap-mode nofallback + + -Dprofiling=false + $(meson_feature introspection) + $(meson_use vala vapi) + -Dgtk_doc=false # we ship pregenerated docs + $(meson_use test tests) + -Dexamples=false + ) + meson_src_configure +} + +src_test() { + virtx meson_src_test --timeout-multiplier 2 +} + +src_install() { + meson_src_install + + insinto /usr/share/gtk-doc/html + # This will install libadwaita API docs unconditionally, but this is intentional + doins -r "${S}"/doc/libadwaita-1 +} diff --git a/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch new file mode 100644 index 0000000..94bea63 --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/310157 +--- fontconfig-2.10.2-orig/configure.ac ++++ fontconfig-2.10.2/configure.ac +@@ -570,7 +570,11 @@ AC_SUBST(XMLDIR) + # Let people not build/install docs if they don't have docbook + # + +-AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no) ++AC_ARG_ENABLE(docbook, [ --disable-docbook Don't build documentation],,) ++ ++if test x$enable_docbook != xno; then ++ AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no) ++fi + + AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes) + diff --git a/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch new file mode 100644 index 0000000..397781e --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch @@ -0,0 +1,68 @@ +--- fontconfig-2.12.3/conf.d/60-latin.conf ++++ fontconfig-2.12.3/conf.d/60-latin.conf +@@ -4,47 +4,50 @@ + + serif + +- Bitstream Vera Serif ++ Liberation Serif + DejaVu Serif + Times New Roman +- Thorndale AMT + Luxi Serif + Nimbus Roman No9 L + Nimbus Roman + Times ++ Thorndale AMT ++ Bitstream Vera Serif + + + + sans-serif + +- Bitstream Vera Sans ++ Liberation Sans + DejaVu Sans +- Verdana + Arial +- Albany AMT + Luxi Sans + Nimbus Sans L + Nimbus Sans + Helvetica + Lucida Sans Unicode + BPG Glaho International ++ Verdana + Tahoma ++ Albany AMT ++ Bitstream Vera Sans + + + + monospace + +- Bitstream Vera Sans Mono ++ Liberation Mono + DejaVu Sans Mono + Inconsolata + Andale Mono + Courier New +- Cumberland AMT + Luxi Mono + Nimbus Mono L + Nimbus Mono + Nimbus Mono PS + Courier ++ Cumberland AMT ++ Bitstream Vera Sans Mono + + + ++ Verdana + Tahoma ++ Albany AMT + + + + monospace + ++ Liberation Mono + DejaVu Sans Mono + Inconsolata + Andale Mono + Courier New +- Cumberland AMT + Luxi Mono + Nimbus Mono L + Nimbus Mono + Nimbus Mono PS + Courier ++ Cumberland AMT + + + ++ Verdana + Tahoma ++ Albany AMT + + + + monospace + ++ Liberation Mono + Noto Sans Mono + DejaVu Sans Mono + Inconsolata + Andale Mono + Courier New +- Cumberland AMT + Luxi Mono + Nimbus Mono L + Nimbus Mono + Nimbus Mono PS + Courier ++ Cumberland AMT + + +