parent
02726fb021
commit
a01a7a8c32
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST chrpath-0.13.tar.gz 125129 BLAKE2B 004db7e3567ceeb700d018e7e32036843413605466c218bf40252927b169775c5a86f81f8ea355f0d141821313d114ec24654ed62d75443e31739118e31bc497 SHA512 9ec2ab2731fb553497996939b421130ae221d478dab8887c184ae91f7d3ae697688e7a30e3bea30cc0cf765f1dc8c7f47d2a1f4369b36079b4033e8d0303d75e
|
||||
DIST chrpath-0.16.tar.gz 134506 BLAKE2B 7003cc1cb2332ffbe6fe0873c6d30cbc3ea696e041be33b39c3d36ae34a2497b8dd40bb373773c546b8d63cfd8534e796fd7d7cbc99d37fb8751fc960907070f SHA512 aa04d490f78bff20a56fe20539cec10218c0772a668909eda8324ca825f51e8ef92001e95d9c316e79a145a043c9c327ec94d1a82e104ab408ca1021832745aa
|
||||
|
@ -0,0 +1,41 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="Chrpath can modify the rpath and runpath of ELF executables"
|
||||
HOMEPAGE="https://directory.fsf.org/wiki/Chrpath"
|
||||
SRC_URI="https://alioth-archive.debian.org/releases/${PN}/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="static-libs"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-multilib.patch
|
||||
"${FILESDIR}"/${P}-testsuite-1.patch
|
||||
"${FILESDIR}"/${P}-solaris.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# disable installing redundant docs in the wrong dir
|
||||
sed -i -e '/doc_DATA/d' Makefile.am || die
|
||||
# fix for automake-1.13, #467538
|
||||
sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable static-libs static)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
if ! use static-libs; then
|
||||
find "${D}" -name "*.la" -delete || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
--- chrpath-0.16/Makefile.am 2014-01-12 08:52:21.000000000 +0100
|
||||
+++ chrpath-0.16-ng/Makefile.am 2019-05-19 11:23:48.352936406 +0200
|
||||
@@ -12,11 +12,18 @@
|
||||
fakeroot debian/rules binary
|
||||
|
||||
chrpath_SOURCES = \
|
||||
- chrpath.c \
|
||||
- killrpath.c \
|
||||
main.c \
|
||||
- elf.c \
|
||||
protos.h
|
||||
+
|
||||
+chrpath_LDADD = $(LDLIBS)
|
||||
+
|
||||
+lib_LTLIBRARIES = libchrpath32.la libchrpath64.la
|
||||
+libchrpath32_la_SOURCES = chrpath.c killrpath.c elf.c protos.h
|
||||
+libchrpath32_la_CFLAGS = -DSIZEOF_VOID_P=4
|
||||
+libchrpath32_la_LDFLAGS = -avoid-version
|
||||
+libchrpath64_la_SOURCES = chrpath.c killrpath.c elf.c protos.h
|
||||
+libchrpath64_la_CFLAGS = -DSIZEOF_VOID_P=8
|
||||
+libchrpath64_la_LDFLAGS = -avoid-version
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
--- chrpath-0.16/configure.ac 2014-01-12 09:01:52.000000000 +0100
|
||||
+++ chrpath-0.16-ng/configure.ac 2019-05-19 11:25:07.158665075 +0200
|
||||
@@ -16,6 +16,7 @@
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
+AC_PROG_LIBTOOL
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
@@ -26,11 +27,19 @@
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_BIGENDIAN
|
||||
-AC_CHECK_SIZEOF(void *)
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(getopt_long)
|
||||
|
||||
+dnl See if we need -ldl on this platform for dlopen
|
||||
+LDLIBS=
|
||||
+save_LIBS="$LIBS"
|
||||
+LIBS=
|
||||
+AC_SEARCH_LIBS([dlopen], [dl])
|
||||
+LDLIBS=${LIBS}
|
||||
+LIBS="${save_LIBS}"
|
||||
+AC_SUBST([LDLIBS])
|
||||
+
|
||||
if eval "test x$GCC = xyes"; then
|
||||
for flag in \
|
||||
-W \
|
||||
--- chrpath-0.16/main.c 2014-01-14 10:15:59.000000000 +0100
|
||||
+++ chrpath-0.16-ng/main.c 2019-05-19 11:29:34.648390032 +0200
|
||||
@@ -12,13 +12,19 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include <dlfcn.h>
|
||||
+#include <elf.h>
|
||||
+#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
-#include "protos.h"
|
||||
+
|
||||
+typedef int (*killrpath_t)(const char *filename);
|
||||
+typedef int (*chrpath_t)(const char *filename, const char *newpath, int convert);
|
||||
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
# define GETOPT_LONG getopt_long
|
||||
@@ -63,6 +69,30 @@
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
+static unsigned
|
||||
+elf_class(const char *filename)
|
||||
+{
|
||||
+ Elf32_Ehdr ehdr;
|
||||
+ int fd;
|
||||
+
|
||||
+ fd = open(filename, O_RDONLY);
|
||||
+ if (fd == -1)
|
||||
+ return 0;
|
||||
+ if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
|
||||
+ {
|
||||
+ close(fd);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ if ((memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0)
|
||||
+ || (ehdr.e_ident[EI_VERSION] != EV_CURRENT))
|
||||
+ {
|
||||
+ fprintf(stderr, "`%s' probably isn't an ELF file.\n", filename);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return ehdr.e_ident[EI_CLASS];
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char * const argv[])
|
||||
{
|
||||
@@ -75,6 +105,10 @@
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
int option_index = 0;
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
+
|
||||
+ void* dll[2];
|
||||
+ killrpath_t killrpath[2];
|
||||
+ chrpath_t chrpath[2];
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
@@ -118,15 +152,32 @@
|
||||
break;
|
||||
}
|
||||
} while (-1 != opt);
|
||||
+
|
||||
+ dll[0] = dlopen("libchrpath32.so", RTLD_LAZY);
|
||||
+ killrpath[0] = (killrpath_t)dlsym(dll[0], "killrpath");
|
||||
+ chrpath[0] = (chrpath_t)dlsym(dll[0], "chrpath");
|
||||
+
|
||||
+ dll[1] = dlopen("libchrpath64.so", RTLD_LAZY);
|
||||
+ killrpath[1] = (killrpath_t)dlsym(dll[1], "killrpath");
|
||||
+ chrpath[1] = (chrpath_t)dlsym(dll[1], "chrpath");
|
||||
|
||||
while (optind < argc && (!retval || keep_going))
|
||||
{
|
||||
+ const char* program = argv[optind++];
|
||||
+ unsigned eclass = elf_class(program);
|
||||
+ if (!eclass)
|
||||
+ {
|
||||
+ retval = 1;
|
||||
+ continue;
|
||||
+ }
|
||||
if (remove)
|
||||
- retval |= killrpath(argv[optind++]);
|
||||
+ retval |= killrpath[eclass - ELFCLASS32](program);
|
||||
else
|
||||
/* list by default, replace if path is set */
|
||||
- retval |= chrpath(argv[optind++], newpath, convert);
|
||||
+ retval |= chrpath[eclass - ELFCLASS32](program, newpath, convert);
|
||||
}
|
||||
|
||||
+ dlclose(dll[0]);
|
||||
+ dlclose(dll[1]);
|
||||
return retval;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
protos: add bswap macros for Solaris
|
||||
|
||||
--- a/protos.h
|
||||
+++ b/protos.h
|
||||
@@ -1,7 +1,14 @@
|
||||
#ifndef PROTOS_H
|
||||
#define PROTOS_H
|
||||
|
||||
+#if defined(__sun)
|
||||
+#include <sys/byteorder.h>
|
||||
+#define bswap_16(x) BSWAP_16(x)
|
||||
+#define bswap_32(x) BSWAP_32(x)
|
||||
+#define bswap_64(x) BSWAP_64(x)
|
||||
+#else
|
||||
#include <byteswap.h>
|
||||
+#endif
|
||||
#include <elf.h>
|
||||
#include "config.h"
|
||||
|
@ -0,0 +1,19 @@
|
||||
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
|
||||
Date: 2010-04-04
|
||||
Initial Package Version: 0.16
|
||||
Origin: me
|
||||
Upstream Status: unknown
|
||||
Description: make the testsuite run with the new mltilib design
|
||||
|
||||
diff -Naur a/chrpath-0.16/testsuite/runtest.sh b/chrpath-0.16/testsuite/runtest.sh
|
||||
--- a/testsuite/runtest.sh 2010-04-04 09:02:21.859114159 +0000
|
||||
+++ b/testsuite/runtest.sh 2010-04-04 09:42:08.762112560 +0000
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
set -x
|
||||
|
||||
+export LD_LIBRARY_PATH=$PWD/../.libs:$LD_LIBRARY_PATH
|
||||
+
|
||||
CHRPATH=../chrpath
|
||||
|
||||
retval=0
|
@ -0,0 +1,71 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_PV=${PV/_rc/-rc}
|
||||
MY_P=${PN}-r${MY_PV}
|
||||
|
||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
||||
HOMEPAGE="https://www.mongodb.com"
|
||||
SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="sasl ssl"
|
||||
|
||||
DEPEND="dev-lang/go:=
|
||||
net-libs/libpcap
|
||||
sasl? ( dev-libs/cyrus-sasl )
|
||||
ssl? ( dev-libs/openssl:0= )"
|
||||
|
||||
# Do not complain about CFLAGS etc since go projects do not use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
EGO_PN="github.com/mongodb/mongo-tools"
|
||||
S="${WORKDIR}/src/${EGO_PN}"
|
||||
|
||||
src_unpack() {
|
||||
mkdir -p "${S%/*}" || die
|
||||
default
|
||||
mv ${MY_P} "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# allow building with go 1.12 #678924
|
||||
sed -i 's/_Ctype_struct_/C.struct_/' vendor/github.com/google/gopacket/pcap/pcap.go || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myconf=()
|
||||
|
||||
if use sasl; then
|
||||
myconf+=(sasl)
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
myconf+=(ssl)
|
||||
fi
|
||||
|
||||
# build pie to avoid text relocations wrt #582854
|
||||
local buildmode="pie"
|
||||
|
||||
# skip on ppc64 wrt #610984
|
||||
if use ppc64; then
|
||||
buildmode="default"
|
||||
fi
|
||||
|
||||
mkdir -p bin || die
|
||||
for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongoreplay; do
|
||||
echo "Building $i"
|
||||
GOROOT="$(go env GOROOT)" GOPATH="${WORKDIR}" go build -buildmode="${buildmode}" -o "bin/$i" \
|
||||
-ldflags "-X ${EGO_PN}/common/options.VersionStr=${PV}" --tags "${myconf[*]}" "$i/main/$i.go" || die
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/*
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
DIST texworks-0.6.3.tar.gz 12082640 BLAKE2B db5b98f9226e0e7e109dc06d8e0a88b0e8f0dd237676ebec3be55308c720eb6dada25be061d8d5dc27949b9673e93fd65c8ddddfbe03aee4f8170471c52b37fd SHA512 389cf54441e74164fc842f2f293cdee45c6ff9fe202f262d32f3fb076de9a29813a62cd75052969293f2f784e0722215bbbf2206e75bc836a13d495bf5aed653
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>zlogene@gentoo.org</email>
|
||||
<name>Mikle Kolyada</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,61 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_6,3_7} )
|
||||
|
||||
inherit python-single-r1 cmake-utils xdg-utils
|
||||
|
||||
DESCRIPTION="A simple interface for working with TeX documents"
|
||||
HOMEPAGE="http://tug.org/texworks/"
|
||||
SRC_URI="https://github.com/TeXworks/texworks/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="lua python"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="app-text/hunspell:=
|
||||
app-text/poppler[qt5]
|
||||
dev-qt/designer:5
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtdbus:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtscript:5[scripttools]
|
||||
lua? ( dev-lang/lua:0 )
|
||||
python? ( ${PYTHON_DEPS} ) "
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
S=${WORKDIR}/${PN}-release-${PV}
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-Wno-dev
|
||||
-DPREFER_BUNDLED_SYNCTEX=OFF
|
||||
-DWITH_LUA=$(usex lua ON OFF)
|
||||
-DWITH_PYTHON=$(usex python ON OFF)
|
||||
-DTeXworks_PLUGIN_DIR="/usr/$(get_libdir)/texworks"
|
||||
-DTeXworks_DOCS_DIR="/share/doc/${PF}"
|
||||
-DQTPDF_VIEWER=ON
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_PLUGINS=ON
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs eutils
|
||||
|
||||
DESCRIPTION="getopt(1) replacement supporting GNU-style long options"
|
||||
HOMEPAGE="http://frodo.looijaard.name/project/getopt/"
|
||||
SRC_URI="http://frodo.looijaard.name/system/files/software/getopt/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64-fbsd ~m68k-mint ~ppc-aix ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-cygwin ~x64-macos ~x64-solaris ~x86-fbsd ~x86-macos ~x86-solaris"
|
||||
IUSE="nls"
|
||||
|
||||
RDEPEND="nls? ( virtual/libintl )"
|
||||
DEPEND="${RDEPEND}
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.1.5-libintl.patch
|
||||
"${FILESDIR}"/${PN}-1.1.5-setlocale.patch
|
||||
"${FILESDIR}"/${PN}-1.1.6-longrename.patch
|
||||
"${FILESDIR}"/${PN}-1.1.4-irix.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
local nogettext="1"
|
||||
local libintl=""
|
||||
local libcgetopt=1
|
||||
|
||||
if use nls; then
|
||||
nogettext=0
|
||||
has_version sys-libs/glibc || libintl="-lintl"
|
||||
fi
|
||||
|
||||
[[ ${CHOST} == *-aix* ]] && libcgetopt=0
|
||||
[[ ${CHOST} == *-irix* ]] && libcgetopt=0
|
||||
[[ ${CHOST} == *-interix* ]] && libcgetopt=0
|
||||
|
||||
emake CC="$(tc-getCC)" prefix="${EPREFIX}/usr" \
|
||||
LIBCGETOPT=${libcgetopt} \
|
||||
WITHOUT_GETTEXT=${nogettext} LIBINTL=${libintl} \
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use nls && emake prefix="${EPREFIX}/usr" DESTDIR="${D}" install_po
|
||||
|
||||
newbin getopt getopt-long
|
||||
|
||||
# at least on interix, the system getopt is ... broken...
|
||||
# util-linux, which would provide the getopt binary, does not build &
|
||||
# install on interix/prefix, so, this has to provide it.
|
||||
[[ ${CHOST} == *-interix* || ${CHOST} == *-mint* ]] && \
|
||||
dosym getopt-long /usr/bin/getopt
|
||||
|
||||
newman getopt.1 getopt-long.1
|
||||
|
||||
dodoc getopt-*sh
|
||||
}
|
Binary file not shown.
@ -0,0 +1,650 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION="Utilities for users of Gentoo Prefix"
|
||||
HOMEPAGE="https://prefix.gentoo.org/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
|
||||
[[ ${PV} == 9999 ]] ||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
|
||||
DEPEND="
|
||||
!app-portage/prefix-chain-setup
|
||||
!sys-apps/prefix-chain-utils
|
||||
"
|
||||
BDEPEND="${DEPEND}
|
||||
>sys-apps/portage-2.3.62
|
||||
"
|
||||
# In prefix-stack, these dependencies actually are the @system set,
|
||||
# as we rely on the base prefix anyway for package management,
|
||||
# which should have a proper @system set.
|
||||
# See als: pkg_preinst
|
||||
RDEPEND="${DEPEND}
|
||||
prefix-stack? (
|
||||
>=sys-apps/baselayout-prefix-2.6
|
||||
sys-apps/gentoo-functions
|
||||
app-portage/elt-patches
|
||||
sys-devel/gnuconfig
|
||||
sys-devel/gcc-config
|
||||
)
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
my_unpack() {
|
||||
local infile=$1
|
||||
local outfile=${2:-${infile}}
|
||||
ebegin "extracting ${outfile}"
|
||||
sed -ne "/^: ${infile} /,/EOIN/{/EOIN/d;p}" "${EBUILD}" \
|
||||
> "${outfile}" || die "Failed to unpack ${outfile}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if use prefix-stack ; then
|
||||
my_unpack prefix-stack.bash_login
|
||||
my_unpack prefix-stack.bashrc
|
||||
my_unpack prefix-stack.envd.99stack
|
||||
my_unpack prefix-stack-ccwrap
|
||||
local editor pager
|
||||
for editor in "${EDITOR}" {"${EPREFIX}","${BROOT}"}/bin/nano
|
||||
do
|
||||
[[ -x ${editor} ]] || continue
|
||||
done
|
||||
for pager in "${PAGER}" {"${EPREFIX}","${BROOT}"}/usr/bin/less
|
||||
do
|
||||
[[ -x ${pager} ]] || continue
|
||||
done
|
||||
printf '%s\n' "EDITOR=\"${editor}\"" "PAGER=\"${pager}\"" > 000fallback
|
||||
else
|
||||
my_unpack prefix-stack-setup
|
||||
fi
|
||||
my_unpack startprefix
|
||||
}
|
||||
|
||||
my_prefixify() {
|
||||
local ebash eenv
|
||||
if use prefix-stack ; then
|
||||
ebash="${BROOT}/bin/bash"
|
||||
eenv="${BROOT}/usr/bin/env"
|
||||
else
|
||||
ebash="${EPREFIX}/bin/bash"
|
||||
eenv="${EPREFIX}/usr/bin/env"
|
||||
fi
|
||||
|
||||
# the @=@ prevents repoman from believing we set readonly vars
|
||||
sed -e "s,@GENTOO_PORTAGE_BPREFIX@,${BROOT},g" \
|
||||
-e "s,@GENTOO_PORTAGE_EPREFIX@,${EPREFIX},g" \
|
||||
-e "s,@GENTOO_PORTAGE_CHOST@,${CHOST},g" \
|
||||
-e "s,@GENTOO_PORTAGE_EBASH@,${ebash},g" \
|
||||
-e "s,@GENTOO_PORTAGE_EENV@,${eenv},g" \
|
||||
-e "s,@=@,=,g" \
|
||||
-i "$@" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# do not eprefixify during unpack, to allow userpatches to apply
|
||||
my_prefixify *
|
||||
}
|
||||
|
||||
src_install-prefix-stack-ccwrap() {
|
||||
# install toolchain wrapper.
|
||||
local wrapperdir=/usr/${CHOST}/gcc-bin/${CHOST}-${PN}/${PV}
|
||||
local wrappercfg=${CHOST}-${P}
|
||||
|
||||
exeinto $wrapperdir
|
||||
doexe prefix-stack-ccwrap
|
||||
|
||||
local cc
|
||||
for cc in \
|
||||
gcc \
|
||||
g++ \
|
||||
cpp \
|
||||
c++ \
|
||||
windres \
|
||||
; do
|
||||
dosym prefix-stack-ccwrap $wrapperdir/${CHOST}-${cc}
|
||||
dosym ${CHOST}-${cc} $wrapperdir/${cc}
|
||||
done
|
||||
|
||||
# LDPATH is required to keep gcc-config happy :(
|
||||
cat > ./${wrappercfg} <<-EOF
|
||||
GCC_PATH="${EPREFIX}$wrapperdir"
|
||||
LDPATH="${EPREFIX}$wrapperdir"
|
||||
EOF
|
||||
|
||||
insinto /etc/env.d/gcc
|
||||
doins ./${wrappercfg}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use prefix-stack; then
|
||||
src_install-prefix-stack-ccwrap
|
||||
insinto /etc
|
||||
doins prefix-stack.bash_login
|
||||
insinto /etc/bash
|
||||
newins prefix-stack.bashrc bashrc
|
||||
newenvd prefix-stack.envd.99stack 99stack
|
||||
doenvd 000fallback
|
||||
else
|
||||
dobin prefix-stack-setup
|
||||
fi
|
||||
exeinto /
|
||||
doexe startprefix
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
use prefix-stack || return 0
|
||||
ebegin "Purging @system package set for prefix stack"
|
||||
# In prefix stack we empty out the @system set defined via make.profile,
|
||||
# as we may be using some normal profile, but that @system set applies
|
||||
# to the base prefix only.
|
||||
# Instead, we only put ourselve into the @system set, and have additional
|
||||
# @system packages in our RDEPEND.
|
||||
my_lsprofile() {
|
||||
(
|
||||
cd -P "${1:-.}" || exit 1
|
||||
[[ -r ./parent ]] &&
|
||||
for p in $(<parent)
|
||||
do
|
||||
my_lsprofile "${p}" || exit 1
|
||||
done
|
||||
pwd -P
|
||||
)
|
||||
}
|
||||
local systemset="/etc/portage/profile/packages"
|
||||
dodir "${systemset%/*}"
|
||||
[[ -s ${EROOT}${systemset} ]] &&
|
||||
grep -v "# maintained by ${PN}" \
|
||||
"${EROOT}${systemset}" \
|
||||
> "${ED}${systemset}"
|
||||
local p
|
||||
for p in $(my_lsprofile "${EPREFIX}"/etc/portage/make.profile)
|
||||
do
|
||||
[[ -s ${p}/${systemset##*/} ]] || continue
|
||||
awk '/^[ \t]*[^-#]/{print "-" $1 " # maintained by '"${PN}-${PVR}"'"}' \
|
||||
< "${p}"/packages || die
|
||||
done | sort -u >> "${ED}${systemset}"
|
||||
[[ ${PIPESTATUS[@]} == "0 0" ]] || die "failed to collect for ${systemset}"
|
||||
echo "*${CATEGORY}/${PN} # maintained by ${PN}-${PVR}" >> "${ED}${systemset}" || die
|
||||
eend $?
|
||||
}
|
||||
|
||||
return 0
|
||||
|
||||
: startprefix <<'EOIN'
|
||||
#!@GENTOO_PORTAGE_EBASH@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Fabian Groffen <grobian@gentoo.org> -- 2007-03-10
|
||||
# Enters the prefix environment by starting a login shell from the
|
||||
# prefix. The SHELL environment variable is elevated in order to make
|
||||
# applications that start login shells to work, such as `screen`.
|
||||
|
||||
# if you come from a substantially polluted environment (another
|
||||
# Prefix), a cleanup as follows resolves most oddities I've ever seen:
|
||||
# env -i HOME=$HOME TERM=$TERM USER=$USER $SHELL -l
|
||||
# hence this script starts the Prefix shell like this
|
||||
|
||||
if [[ ${SHELL#@GENTOO_PORTAGE_EPREFIX@} != ${SHELL} ]]
|
||||
then
|
||||
echo "You appear to be in prefix already (SHELL=${SHELL})" > /dev/stderr
|
||||
exit -1
|
||||
elif [[ ${SHELL#@GENTOO_PORTAGE_BPREFIX@} != ${SHELL} ]] &&
|
||||
[[ ${EPREFIX-unset} == '@GENTOO_PORTAGE_EPREFIX@' ]]
|
||||
then
|
||||
echo "You appear to be in stacked prefix already (EPREFIX=${EPREFIX})" > /dev/stderr
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# What is our prefix?
|
||||
EPREFIX@=@'@GENTOO_PORTAGE_EPREFIX@'
|
||||
BPREFIX@=@'@GENTOO_PORTAGE_BPREFIX@'
|
||||
|
||||
# not all systems have the same location for shells, however what it
|
||||
# boils down to, is that we need to know what the shell is, and then we
|
||||
# can find it in the bin dir of our prefix
|
||||
for SHELL in \
|
||||
"${EPREFIX}/bin/${SHELL##*/}" \
|
||||
"${BPREFIX}/bin/${SHELL##*/}" \
|
||||
${SHELL##*/}
|
||||
do
|
||||
[[ ${SHELL} == */* && -x ${SHELL} ]] && break
|
||||
done
|
||||
|
||||
# check if the shell exists
|
||||
if [[ ${SHELL} != */* ]]
|
||||
then
|
||||
echo "Failed to find the Prefix shell, this is probably" > /dev/stderr
|
||||
echo "because you didn't emerge the shell ${SHELL}" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set the prefix shell in the environment
|
||||
export SHELL
|
||||
|
||||
# give a small notice
|
||||
echo "Entering Gentoo Prefix ${EPREFIX}"
|
||||
# start the login shell, clean the entire environment but what's needed
|
||||
RETAIN="HOME=$HOME TERM=$TERM USER=$USER SHELL=$SHELL"
|
||||
# PROFILEREAD is necessary on SUSE not to wipe the env on shell start
|
||||
[[ -n ${PROFILEREAD} ]] && RETAIN+=" PROFILEREAD=$PROFILEREAD"
|
||||
# ssh-agent is handy to keep, of if set, inherit it
|
||||
[[ -n ${SSH_AUTH_SOCK} ]] && RETAIN+=" SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
|
||||
# if we're on some X terminal, makes sense to inherit that too
|
||||
[[ -n ${DISPLAY} ]] && RETAIN+=" DISPLAY=$DISPLAY"
|
||||
# do it!
|
||||
if [[ ${SHELL#${EPREFIX}} != ${SHELL} ]] ; then
|
||||
'@GENTOO_PORTAGE_EENV@' -i $RETAIN $SHELL -l
|
||||
elif [[ ' bash ' == *" ${SHELL##*/} "* ]] ; then
|
||||
# shell coming from different prefix would load it's own
|
||||
# etc/profile upon -l, so we have to override
|
||||
'@GENTOO_PORTAGE_EENV@' -i ${RETAIN} "${SHELL}" --rcfile "${EPREFIX}"/etc/prefix-stack.bash_login -i
|
||||
else
|
||||
echo "Only bash is supported with stacked Prefix (you have ${SHELL##*/}), sorry!" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
# and leave a message when we exit... the shell might return non-zero
|
||||
# without having real problems, so don't send alarming messages about
|
||||
# that
|
||||
echo "Leaving Gentoo Prefix with exit status $?"
|
||||
EOIN
|
||||
|
||||
: prefix-stack.bashrc <<'EOIN'
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
#
|
||||
# In stacked Prefix there is no bash installed, yet
|
||||
# etc/bash/bashrc from base Prefix still is useful.
|
||||
#
|
||||
|
||||
if [[ $- != *i* ]] ; then
|
||||
# Shell is non-interactive, bashrc does not apply
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -r @GENTOO_PORTAGE_BPREFIX@/etc/bash/bashrc ]] ; then
|
||||
source '@GENTOO_PORTAGE_BPREFIX@/etc/bash/bashrc'
|
||||
# only if base Prefix does have an etc/bash/bashrc, we also
|
||||
# run bashrc snippets provided by packages in stacked Prefix
|
||||
for sh in '@GENTOO_PORTAGE_EPREFIX@'/etc/bash/bashrc.d/* ; do
|
||||
[[ -r ${sh} ]] && source "${sh}"
|
||||
done
|
||||
unset sh
|
||||
else
|
||||
# etc/profile does expect etc/bash/bashrc to set PS1
|
||||
PS1='\u@\h \w \$ '
|
||||
fi
|
||||
EOIN
|
||||
|
||||
: prefix-stack.bash_login <<'EOIN'
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
#
|
||||
# In stacked Prefix there is no bash installed, so there is
|
||||
# no bash able to load this Prefix' profile as login shell.
|
||||
# Instead, you can specify this one as bash rcfile to mimic
|
||||
# a bash login shell using this stacked Prefix profile.
|
||||
#
|
||||
|
||||
if [[ -s '@GENTOO_PORTAGE_EPREFIX@/etc/profile' ]] ; then
|
||||
. '@GENTOO_PORTAGE_EPREFIX@/etc/profile'
|
||||
fi
|
||||
if [[ -s ~/.bash_profile ]] ; then
|
||||
. ~/.bash_profile
|
||||
elif [[ -s ~/.bash_login ]] ; then
|
||||
. ~/.bash_login
|
||||
elif [[ -s ~/.profile ]] ; then
|
||||
. ~/.profile
|
||||
fi
|
||||
EOIN
|
||||
|
||||
: prefix-stack.envd.99stack <<'EOIN'
|
||||
PKG_CONFIG_PATH@=@"@GENTOO_PORTAGE_EPREFIX@/usr/lib/pkgconfig:@GENTOO_PORTAGE_EPREFIX@/usr/share/pkgconfig"
|
||||
PORTAGE_CONFIGROOT@=@"@GENTOO_PORTAGE_EPREFIX@"
|
||||
EPREFIX@=@"@GENTOO_PORTAGE_EPREFIX@"
|
||||
EOIN
|
||||
|
||||
: prefix-stack-setup <<'EOIN'
|
||||
#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
PARENT_EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
|
||||
PARENT_CHOST="@GENTOO_PORTAGE_CHOST@"
|
||||
CHILD_EPREFIX=
|
||||
CHILD_PROFILE=
|
||||
CHILD_CHOST=
|
||||
|
||||
#
|
||||
# get ourselfs the functions.sh script for ebegin/eend/etc.
|
||||
#
|
||||
for f in \
|
||||
/lib/gentoo/functions.sh \
|
||||
/etc/init.d/functions.sh \
|
||||
/sbin/functions.sh \
|
||||
; do
|
||||
if [[ -r ${PARENT_EPREFIX}${f} ]] ; then
|
||||
. "${PARENT_EPREFIX}${f}"
|
||||
f=found
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${f} != found ]] ; then
|
||||
echo "Cannot find Gentoo functions, aborting." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for arg in "$@"; do
|
||||
case "${arg}" in
|
||||
--eprefix=*) CHILD_EPREFIX="${arg#--eprefix=}" ;;
|
||||
--profile=*) CHILD_PROFILE="${arg#--profile=}" ;;
|
||||
--chost=*) CHILD_CHOST="${arg#--chost=}" ;;
|
||||
|
||||
--help)
|
||||
einfo "$0 usage:"
|
||||
einfo " --eprefix=[PATH] Path to new EPREFIX to create stacked to the prefix"
|
||||
einfo " where this script is installed (${PARENT_EPREFIX})"
|
||||
einfo " --profile=[PATH] The absolute path to the profile to use. This path"
|
||||
einfo " must point to a directory within ${PARENT_EPREFIX}"
|
||||
einfo " --chost=[CHOST] The CHOST to use for the new EPREFIX, required if"
|
||||
einfo " the profile does not set CHOST, or to override."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#
|
||||
# sanity check of given values
|
||||
#
|
||||
|
||||
test -n "${CHILD_EPREFIX}" || { eerror "no eprefix argument given"; exit 1; }
|
||||
test -d "${CHILD_EPREFIX}" && { eerror "${CHILD_EPREFIX} already exists"; exit 1; }
|
||||
test -n "${CHILD_PROFILE}" || { eerror "no profile argument given"; exit 1; }
|
||||
test -d "${CHILD_PROFILE}" || { eerror "${CHILD_PROFILE} does not exist"; exit 1; }
|
||||
|
||||
if [[ -z ${CHILD_CHOST} ]]
|
||||
then
|
||||
my_lsprofile() {
|
||||
(
|
||||
cd -P "${1:-.}" || exit 1
|
||||
[[ -r ./parent ]] &&
|
||||
for p in $(<parent)
|
||||
do
|
||||
my_lsprofile "${p}" || exit 1
|
||||
done
|
||||
pwd -P
|
||||
)
|
||||
}
|
||||
|
||||
for profile in $(my_lsprofile "${CHILD_PROFILE}") missing
|
||||
do
|
||||
if [[ ${profile} == missing ]]
|
||||
then
|
||||
eerror "profile does not set CHOST, need --chost argument"
|
||||
exit 1
|
||||
fi
|
||||
[[ -s "${profile}/make.defaults" ]] || continue
|
||||
grep -q '^[ ]*CHOST@=@' "${profile}/make.defaults" && break
|
||||
done
|
||||
fi
|
||||
|
||||
einfo "creating stacked prefix ${CHILD_EPREFIX}"
|
||||
|
||||
#
|
||||
# functions needed below.
|
||||
#
|
||||
eend_exit() {
|
||||
eend $1
|
||||
[[ $1 != 0 ]] && exit 1
|
||||
}
|
||||
|
||||
#
|
||||
# create the directories required to bootstrap the least.
|
||||
#
|
||||
ebegin "creating directory structure"
|
||||
(
|
||||
set -e
|
||||
mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.mask
|
||||
mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.force
|
||||
mkdir -p "${CHILD_EPREFIX}"/etc/portage/env
|
||||
mkdir -p "${CHILD_EPREFIX}"/etc/portage/package.env
|
||||
ln -s "${PARENT_EPREFIX}"/etc/portage/repos.conf "${CHILD_EPREFIX}"/etc/portage/repos.conf
|
||||
)
|
||||
eend_exit $?
|
||||
|
||||
#
|
||||
# create a make.conf and set PORTDIR and PORTAGE_TMPDIR
|
||||
#
|
||||
ebegin "creating make.conf"
|
||||
(
|
||||
set -e
|
||||
echo "#"
|
||||
echo "# The following values where taken from the parent prefix's"
|
||||
echo "# environment. Feel free to adopt them as you like."
|
||||
echo "#"
|
||||
echo "CFLAGS=\"$(portageq envvar CFLAGS)\""
|
||||
echo "CXXFLAGS=\"$(portageq envvar CXXFLAGS)\""
|
||||
echo "MAKEOPTS=\"$(portageq envvar MAKEOPTS)\""
|
||||
niceness=$(portageq envvar PORTAGE_NICENESS || true)
|
||||
[[ -n ${niceness} ]] &&
|
||||
echo "PORTAGE_NICENESS=\"${niceness}\""
|
||||
echo
|
||||
echo "# Mirrors from parent prefix."
|
||||
echo "GENTOO_MIRRORS=\"$(portageq envvar GENTOO_MIRRORS || true)\""
|
||||
echo
|
||||
echo "# Below comes the prefix-stack setup. Only change things"
|
||||
echo "# if you know exactly what you are doing!"
|
||||
echo "EPREFIX=\"${CHILD_EPREFIX}\""
|
||||
echo "PORTAGE_OVERRIDE_EPREFIX=\"${PARENT_EPREFIX}\""
|
||||
echo "BROOT=\"${PARENT_EPREFIX}\""
|
||||
# Since EAPI 7 there is BDEPEND, which is DEPEND in EAPI up to 6.
|
||||
# We do not want to pull DEPEND from EAPI <= 6, but RDEPEND only.
|
||||
echo "EMERGE_DEFAULT_OPTS=\"--root-deps=rdeps\""
|
||||
if [[ -n ${CHILD_CHOST} ]] ; then
|
||||
echo "CHOST=\"${CHILD_CHOST}\""
|
||||
fi
|
||||
) > "${CHILD_EPREFIX}"/etc/portage/make.conf
|
||||
eend_exit $?
|
||||
|
||||
ebegin "creating use.mask/prefix-stack"
|
||||
printf -- '-%s\n' prefix{,-guest,-stack} > "${CHILD_EPREFIX}"/etc/portage/profile/use.mask/prefix-stack
|
||||
eend_exit $?
|
||||
|
||||
ebegin "creating use.force/prefix-stack"
|
||||
printf -- '%s\n' prefix{,-guest,-stack} > "${CHILD_EPREFIX}"/etc/portage/profile/use.force/prefix-stack
|
||||
eend_exit $?
|
||||
|
||||
ebegin "creating env/host-cc.conf"
|
||||
cat > "${CHILD_EPREFIX}"/etc/portage/env/host-cc.conf <<-EOM
|
||||
CC=${PARENT_CHOST}-gcc
|
||||
CXX=${PARENT_CHOST}-g++
|
||||
EOM
|
||||
eend_exit $?
|
||||
|
||||
ebegin "creating package.env/prefix-stack"
|
||||
cat > "${CHILD_EPREFIX}"/etc/portage/package.env/prefix-stack <<-'EOM'
|
||||
# merge with the parent's chost. this forces the use of the parent
|
||||
# compiler, which generally would be illegal - this is an exception.
|
||||
# This is required for example on winnt, because the wrapper has to
|
||||
# be able to use/resolve symlinks, etc. native winnt binaries miss
|
||||
# that ability, but cygwin binaries don't.
|
||||
sys-devel/gcc-config host-cc.conf
|
||||
sys-apps/gentoo-functions host-cc.conf
|
||||
EOM
|
||||
eend_exit $?
|
||||
|
||||
#
|
||||
# create the make.profile symlinks.
|
||||
#
|
||||
ebegin "creating make.profile"
|
||||
(
|
||||
ln -s "${CHILD_PROFILE}" "${CHILD_EPREFIX}/etc/portage/make.profile"
|
||||
)
|
||||
eend_exit $?
|
||||
|
||||
#
|
||||
# adjust permissions of generated files.
|
||||
#
|
||||
ebegin "adjusting permissions"
|
||||
(
|
||||
set -e
|
||||
chmod 644 "${CHILD_EPREFIX}"/etc/portage/make.conf
|
||||
chmod 644 "${CHILD_EPREFIX}"/etc/portage/env/host-cc.conf
|
||||
chmod 644 "${CHILD_EPREFIX}"/etc/portage/package.env/prefix-stack
|
||||
)
|
||||
eend_exit $?
|
||||
|
||||
#
|
||||
# now merge some basics.
|
||||
#
|
||||
ebegin "installing required basic packages"
|
||||
(
|
||||
set -e
|
||||
export PORTAGE_CONFIGROOT@=@"${CHILD_EPREFIX}"
|
||||
export EPREFIX@=@"${CHILD_EPREFIX}"
|
||||
export PORTAGE_OVERRIDE_EPREFIX@=@"${PARENT_EPREFIX}"
|
||||
|
||||
# let baselayout create the directories
|
||||
USE@=@"${USE} build" \
|
||||
emerge --verbose --nodeps --oneshot \
|
||||
'>=baselayout-prefix-2.6'
|
||||
|
||||
# In prefix-stack, app-portage/prefix-toolkit does
|
||||
# install/update an etc/portage/profile/packages file,
|
||||
# removing all @system packages from current make.profile,
|
||||
# and adding itself to @system set instead.
|
||||
emerge --verbose --nodeps --oneshot \
|
||||
app-portage/prefix-toolkit
|
||||
|
||||
# In prefix-stack, prefix-toolkit does have an RDEPEND on them,
|
||||
# to hold them in the @system set.
|
||||
emerge --verbose --nodeps --oneshot \
|
||||
sys-apps/gentoo-functions \
|
||||
app-portage/elt-patches \
|
||||
sys-devel/gnuconfig \
|
||||
sys-devel/gcc-config
|
||||
|
||||
# select the stack wrapper profile from gcc-config
|
||||
env -i PORTAGE_CONFIGROOT="${CHILD_EPREFIX}" \
|
||||
"$(type -P bash)" "${CHILD_EPREFIX}"/usr/bin/gcc-config 1
|
||||
)
|
||||
eend_exit $?
|
||||
|
||||
#
|
||||
# wow, all ok :)
|
||||
#
|
||||
ewarn
|
||||
ewarn "all done. don't forget to tune ${CHILD_EPREFIX}/etc/portage/make.conf."
|
||||
ewarn "to enter the new prefix, run \"${CHILD_EPREFIX}/startprefix\"."
|
||||
ewarn
|
||||
EOIN
|
||||
|
||||
: prefix-stack-ccwrap <<'EOIN'
|
||||
#!@GENTOO_PORTAGE_BPREFIX@/bin/bash
|
||||
|
||||
if [ -r /cygdrive/. ]; then
|
||||
winpath2unix() { cygpath -u "$1"; }
|
||||
unixpath2win() { cygpath -w "$1"; }
|
||||
fi
|
||||
|
||||
myself=${0##*/} # basename $0
|
||||
link_dirs=()
|
||||
opts=()
|
||||
chost="@GENTOO_PORTAGE_CHOST@"
|
||||
prefix="@GENTOO_PORTAGE_EPREFIX@"
|
||||
absprefix=${prefix}
|
||||
if [[ ${chost} == *"-winnt"* ]]; then
|
||||
# we may get called from windows binary, like pkgdata in dev-libs/icu
|
||||
# in this case, PATH elements get the "/dev/fs/C/WINDOWS/SUA" prefix
|
||||
absprefix=$(winpath2unix "$(unixpath2win "${absprefix}")")
|
||||
fi
|
||||
[[ ${myself} == *windres* ]] && mode=compile || mode=link
|
||||
orig_args=("$@")
|
||||
|
||||
for opt in "$@"
|
||||
do
|
||||
case "$opt" in
|
||||
-L)
|
||||
link_dirs=("${link_dirs[@]}" "-L$1")
|
||||
shift
|
||||
;;
|
||||
-L*)
|
||||
link_dirs=("${link_dirs[@]}" "${opt}")
|
||||
;;
|
||||
*)
|
||||
case "${opt}" in
|
||||
-v)
|
||||
# -v done right: only use mode version if -v is the _only_
|
||||
# argument on the command line.
|
||||
[[ ${#orig_args[@]} -gt 1 ]] || mode=version
|
||||
;;
|
||||
--version) mode=version ;;
|
||||
-c|-E|-S) mode=compile ;;
|
||||
-print-search-dirs) mode=dirs ;;
|
||||
esac
|
||||
opts=("${opts[@]}" "${opt}")
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# remove any path to current prefix, need base prefix only
|
||||
new_path=
|
||||
save_ifs=$IFS
|
||||
IFS=':'
|
||||
for p in $PATH
|
||||
do
|
||||
IFS=$save_ifs
|
||||
[[ ${p#${absprefix}} != "${p}" ]] && continue
|
||||
if [[ -z "${new_path}" ]]; then
|
||||
new_path="${p}"
|
||||
else
|
||||
new_path="${new_path}:${p}"
|
||||
fi
|
||||
done
|
||||
IFS=$save_ifs
|
||||
|
||||
PATH=${new_path}
|
||||
|
||||
pfx_comp=("-I${prefix}/include" "-I${prefix}/usr/include")
|
||||
pfx_link=("-L${prefix}/usr/lib" "-L${prefix}/lib")
|
||||
# binutils-config's ldwrapper understands '-R' for aix and hpux too.
|
||||
pfx_link_r=("-Wl,-R,${prefix}/lib" "-Wl,-R,${prefix}/usr/lib")
|
||||
case "${chost}" in
|
||||
*-winnt*)
|
||||
# parity (winnt) understands -rpath only ...
|
||||
pfx_link_r=("-Wl,-rpath,${prefix}/lib" "-Wl,-rpath,${prefix}/usr/lib")
|
||||
;;
|
||||
*-linux*)
|
||||
# With gcc, -isystem would avoid warning messages in installed headers,
|
||||
# but that breaks with AIX host headers.
|
||||
pfx_comp=("-isystem" "${prefix}/include" "-isystem" "${prefix}/usr/include")
|
||||
;;
|
||||
esac
|
||||
|
||||
# ensure we run the right chost program in base prefix
|
||||
[[ ${myself} == *-*-*-* ]] || myself=${chost}-${myself#${chost}-}
|
||||
|
||||
case "$mode" in
|
||||
link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" ;;
|
||||
compile) exec "${myself}" "${link_dirs[@]}" "${opts[@]}" "${pfx_comp[@]}" ;;
|
||||
version) exec "${myself}" "${orig_args[@]}" ;;
|
||||
dirs)
|
||||
"${myself}" "${orig_args[@]}" | while read line; do
|
||||
if [[ "${line}" == "libraries: ="* ]]; then
|
||||
echo "libraries: =${prefix}/usr/lib:${prefix}/lib:${line#"libraries: ="}"
|
||||
else
|
||||
echo "${line}"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*) echo "cannot infer ${myself}'s mode from comamnd line arguments"; exit 1 ;;
|
||||
esac
|
||||
EOIN
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,164 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
SCONS_MIN_VERSION="2.5.0"
|
||||
CHECKREQS_DISK_BUILD="2400M"
|
||||
CHECKREQS_DISK_USR="512M"
|
||||
CHECKREQS_MEMORY="1024M"
|
||||
|
||||
inherit check-reqs flag-o-matic multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
|
||||
|
||||
MY_P=${PN}-src-r${PV/_rc/-rc}
|
||||
|
||||
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
|
||||
HOMEPAGE="https://www.mongodb.com"
|
||||
SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 SSPL-1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="debug kerberos libressl lto mms-agent ssl test +tools"
|
||||
|
||||
RDEPEND=">=app-arch/snappy-1.1.3
|
||||
>=dev-cpp/yaml-cpp-0.5.3:=
|
||||
>=dev-libs/boost-1.60:=[threads(+)]
|
||||
>=dev-libs/libpcre-8.41[cxx]
|
||||
dev-libs/snowball-stemmer
|
||||
net-libs/libpcap
|
||||
>=sys-libs/zlib-1.2.8:=
|
||||
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
|
||||
mms-agent? ( app-admin/mms-agent )
|
||||
ssl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1g:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
dev-python/cheetah[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
virtual/python-typing[${PYTHON_USEDEP}]
|
||||
sys-libs/ncurses:0=
|
||||
sys-libs/readline:0=
|
||||
debug? ( dev-util/valgrind )
|
||||
test? (
|
||||
dev-python/pymongo[${PYTHON_USEDEP}]
|
||||
)"
|
||||
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
|
||||
"${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
|
||||
"${FILESDIR}/${PN}-3.6.1-no-compass.patch"
|
||||
)
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ -n ${REPLACING_VERSIONS} ]]; then
|
||||
if ver_test "$REPLACING_VERSIONS" -lt 3.4; then
|
||||
ewarn "To upgrade from a version earlier than the 3.4-series, you must"
|
||||
ewarn "successively upgrade major releases until you have upgraded"
|
||||
ewarn "to 3.4-series. Then upgrade to 3.6 series."
|
||||
else
|
||||
ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup mongodb
|
||||
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
|
||||
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# remove bundled libs
|
||||
rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
|
||||
|
||||
# remove compass
|
||||
rm -r src/mongo/installer/compass || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
|
||||
# --use-system-icu fails tests
|
||||
# --use-system-tcmalloc is strongly NOT recommended:
|
||||
scons_opts=(
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
|
||||
--disable-warnings-as-errors
|
||||
--use-system-boost
|
||||
--use-system-pcre
|
||||
--use-system-snappy
|
||||
--use-system-stemmer
|
||||
--use-system-yaml
|
||||
--use-system-zlib
|
||||
)
|
||||
|
||||
use debug && scons_opts+=( --dbg=on )
|
||||
use kerberos && scons_opts+=( --use-sasl-client )
|
||||
use lto && scons_opts+=( --lto=on )
|
||||
use ssl && scons_opts+=( --ssl )
|
||||
|
||||
# respect mongoDB upstream's basic recommendations
|
||||
# see bug #536688 and #526114
|
||||
if ! use debug; then
|
||||
filter-flags '-m*'
|
||||
filter-flags '-O?'
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
escons "${scons_opts[@]}" core tools
|
||||
}
|
||||
|
||||
# FEATURES="test -usersandbox" emerge dev-db/mongodb
|
||||
src_test() {
|
||||
"${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
|
||||
|
||||
doman debian/mongo*.1
|
||||
dodoc README docs/building.md
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
|
||||
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
|
||||
newinitd "${FILESDIR}/mongos.initd-r3" mongos
|
||||
newconfd "${FILESDIR}/mongos.confd-r3" mongos
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
|
||||
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${PN}.logrotate" ${PN}
|
||||
|
||||
# see bug #526114
|
||||
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
|
||||
|
||||
local x
|
||||
for x in /var/{lib,log}/${PN}; do
|
||||
diropts -m0750 -o mongodb -g mongodb
|
||||
keepdir "${x}"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure to read the release notes and follow the upgrade process:"
|
||||
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
|
||||
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST aiorpcX-0.10.2.tar.gz 23312 BLAKE2B 62d04099ae272369f29dea3a34a13b4b5cd6052764f2efee1f4a461b8ab52616e0cf69dde47a6f48c60827b3580d35bc39c87371d581a4a95147f5a5691e5111 SHA512 ebdc312c1c8d27382ca02ba6de5a316332b09bfba19399f9a4c3ef603a5d96becdfbed5c360d73aa64b41ecc5b0c3638822b0a5e49fd54c339b601c20add44ea
|
||||
DIST aiorpcX-0.18.3.tar.gz 27464 BLAKE2B 38a59a6352a4c9bc561f75ecdfb0adc87fe82ad8e05622e67903d6e6e3c225647e75cb7a516005840d008f193288a5dea09042e2091a576be108b735fbbe1446 SHA512 982258fb35c1a4b09def64e2729ac5bab528185963ca0f73571d4a36be2aebadd69e607161462b9c5e07ff3b09fa071949432405a32832d438e07103fa1a8636
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python{3_6,3_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Generic async RPC implementation, including JSON-RPC"
|
||||
HOMEPAGE="https://pypi.org/project/aiorpcX/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
DOCS=( README.rst )
|
@ -1,2 +1,3 @@
|
||||
DIST PyGreSQL-5.0.4.tar.gz 637569 BLAKE2B 3f7bddb8b5e455ca4f181d254d4d125b89a64d7aaa1440b9ab5d916c395b9d93fc9814269992c134b6fd8a81f436752dbe4d7c06125e683a5257361d428c6a6f SHA512 f177ca3b023c007dafe80369b86a1742ff334137e493c3c19ac8bda0181d2543cd2431b8ab8d2d43f30d681121324bc4f236a9ebbddf1e927b071db7c9b34ea6
|
||||
DIST PyGreSQL-5.0.6.tar.gz 648481 BLAKE2B 7e1d96b5c09a3d2f0e412504be27fcfa557804ace8a4c24d657f586a8e647f5001da943543d49f6d2bdec48a34017b7379305fb760436065ba7f36ce981d85c2 SHA512 fb42f462d749f824f52dd424464ecc3591e615e7e0d220a63a217797aeb3f05379fab071480946d09779dbdb9028351a596160989066589dde1be18f7d320ac8
|
||||
DIST PyGreSQL-5.1.tar.gz 642216 BLAKE2B 4f3ff4e59c47d86007884b41355ec5cbc3893ba21e3e5b7a354aab698dde947622ba4b7a1590325ae36f132759e26f37868844c3c21605ead068261129331453 SHA512 d36be0f121c20469193600c551e15b430fdc9e44db00e4ae7adb4985697ddc5653f52fb642b0f3de8316fb916616d07ac1ef03e1e6b20043b7cace131b232a3a
|
||||
|
@ -0,0 +1,35 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
POSTGRES_COMPAT=( 9.{4..6} {10..11} )
|
||||
PYTHON_COMPAT=( python2_7 python3_{5..7} )
|
||||
|
||||
inherit distutils-r1 postgres
|
||||
|
||||
MY_P="PyGreSQL-${PV}"
|
||||
|
||||
DESCRIPTION="A Python interface for the PostgreSQL database"
|
||||
HOMEPAGE="http://www.pygresql.org/"
|
||||
SRC_URI="mirror://pypi/P/PyGreSQL/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
|
||||
|
||||
DEPEND="${POSTGRES_DEP}"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
sed "s/, '-Wall'//" -i setup.py || die
|
||||
default
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local DOCS=( docs/*.rst docs/community/* docs/contents/tutorial.rst )
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
Binary file not shown.
@ -0,0 +1,121 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit bash-completion-r1 java-pkg-2 multiprocessing
|
||||
|
||||
DESCRIPTION="Fast and correct automated build system"
|
||||
HOMEPAGE="https://bazel.build/"
|
||||
|
||||
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="examples test tools"
|
||||
# strip corrupts the bazel binary
|
||||
RESTRICT="strip test? ( network-sandbox ) !test? ( test )"
|
||||
RDEPEND=">=virtual/jdk-1.8:*"
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/unzip
|
||||
app-arch/zip"
|
||||
|
||||
S="${WORKDIR}"
|
||||
QA_FLAGS_IGNORED="usr/bin/bazel"
|
||||
|
||||
bazel-get-flags() {
|
||||
local i fs=()
|
||||
for i in ${CFLAGS}; do
|
||||
fs+=( "--copt=${i}" "--host_copt=${i}" )
|
||||
done
|
||||
for i in ${CXXFLAGS}; do
|
||||
fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
|
||||
done
|
||||
for i in ${CPPFLAGS}; do
|
||||
fs+=( "--copt=${i}" "--host_copt=${i}" )
|
||||
fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
|
||||
done
|
||||
for i in ${LDFLAGS}; do
|
||||
fs+=( "--linkopt=${i}" "--host_linkopt=${i}" )
|
||||
done
|
||||
echo "${fs[*]}"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
echo ${PATH} | grep -q ccache && \
|
||||
ewarn "${PN} usually fails to compile with ccache, you have been warned"
|
||||
java-pkg-2_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Only unpack the main distfile
|
||||
unpack ${P}-dist.zip
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# F: fopen_wr
|
||||
# S: deny
|
||||
# P: /proc/self/setgroups
|
||||
# A: /proc/self/setgroups
|
||||
# R: /proc/24939/setgroups
|
||||
# C: /usr/lib/systemd/systemd
|
||||
addpredict /proc
|
||||
|
||||
# Use standalone strategy to deactivate the bazel sandbox, since it
|
||||
# conflicts with FEATURES=sandbox.
|
||||
cat > "${T}/bazelrc" <<-EOF || die
|
||||
build --verbose_failures
|
||||
build --spawn_strategy=standalone --genrule_strategy=standalone
|
||||
|
||||
build --distdir="${S}/derived/distdir/"
|
||||
build --jobs=$(makeopts_jobs) $(bazel-get-flags)
|
||||
|
||||
test --verbose_failures --verbose_test_summary
|
||||
test --spawn_strategy=standalone --genrule_strategy=standalone
|
||||
EOF
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) --host_javabase=@local_jdk//:jdk"
|
||||
VERBOSE=yes ./compile.sh || die
|
||||
|
||||
./scripts/generate_bash_completion.sh \
|
||||
--bazel=output/bazel \
|
||||
--output=bazel-complete.bash \
|
||||
--prepend=scripts/bazel-complete-header.bash \
|
||||
--prepend=scripts/bazel-complete-template.bash
|
||||
}
|
||||
|
||||
src_test() {
|
||||
output/bazel test \
|
||||
--verbose_failures \
|
||||
--spawn_strategy=standalone \
|
||||
--genrule_strategy=standalone \
|
||||
--verbose_test_summary \
|
||||
examples/cpp:hello-success_test || die
|
||||
output/bazel shutdown
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin output/bazel
|
||||
newbashcomp bazel-complete.bash ${PN}
|
||||
bashcomp_alias ${PN} ibazel
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins scripts/zsh_completion/_bazel
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
dodoc -r examples/*
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
fi
|
||||
# could really build tools but I don't know which ones
|
||||
# are actually used
|
||||
if use tools; then
|
||||
docinto tools
|
||||
dodoc -r tools/*
|
||||
docompress -x /usr/share/doc/${PF}/tools
|
||||
fi
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST comparator-2.10.tar.gz 1463175 BLAKE2B 58d6bddc5f785de3768ed2c4845b75af03c1fd7f646fc15efaeec09878a72355c46c64f67866217994797193aaba6d4214685c7be89be9872620dce5930238e8 SHA512 b880f7a4a0fbfad44c53606c6d97509305d8485f0ab76b62bb0d1d1d6d4be9fb81e7a08326e78cabd1a9314e6efbf3a966eb6393e424f59dc657975a63ce2988
|
||||
DIST comparator-2.12.tar.gz 1463333 BLAKE2B 081251a0a3cb2f99d5b74092a46a868741049d27c367fc9bc3445d35fe01eaaaee75f7afd3674ecdc2569c2ac1ef2d5acd838a546aa307b33c977c4c8a91db12 SHA512 dc5acf3d5900e293e3f0188c0809bc99f2f18edb55df882b2e12e66bc655e7faf030b8daffdd2d175234b398e6a8c125ca6af615933c998651d7f1579734b080
|
||||
|
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
PYTHON_COMPAT=( python{2_7,3_6,3_7} )
|
||||
|
||||
inherit distutils-r1 toolchain-funcs
|
||||
|
||||
DESCRIPTION="ESR's utility for making fast comparisons among large source trees"
|
||||
HOMEPAGE="http://www.catb.org/~esr/comparator/"
|
||||
SRC_URI="http://www.catb.org/~esr/comparator/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="=app-text/docbook-xml-dtd-4.1.2*
|
||||
app-text/xmlto"
|
||||
|
||||
src_prepare() {
|
||||
sed \
|
||||
-e '/python setup.py install/d' \
|
||||
-i Makefile || die "sed failed"
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
emake comparator.html scf-standard.html
|
||||
distutils-r1_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake ROOT="${D}" install
|
||||
distutils-r1_src_install
|
||||
docinto html
|
||||
dodoc *.html
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,288 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
PATCHREV="r0"
|
||||
PATCHSET="gentoo-${PVR}/${PATCHREV}"
|
||||
|
||||
DESCRIPTION="A small but very powerful text-based mail client"
|
||||
HOMEPAGE="http://www.mutt.org/"
|
||||
MUTT_G_PATCHES="mutt-gentoo-${PV}-patches-${PATCHREV}.tar.xz"
|
||||
SRC_URI="ftp://ftp.mutt.org/pub/mutt/${P}.tar.gz
|
||||
https://bitbucket.org/${PN}/${PN}/downloads/${P}.tar.gz
|
||||
https://dev.gentoo.org/~grobian/distfiles/${MUTT_G_PATCHES}"
|
||||
IUSE="berkdb crypt debug doc gdbm gnutls gpg gpgme +hcache idn +imap kerberos libressl +lmdb mbox nls nntp notmuch pgp_classic pop qdbm +sasl selinux slang smime smime_classic +smtp +ssl tokyocabinet vanilla prefix"
|
||||
# hcache: allow multiple, bug #607360
|
||||
REQUIRED_USE="
|
||||
hcache? ( || ( berkdb gdbm lmdb qdbm tokyocabinet ) )
|
||||
imap? ( ssl )
|
||||
pop? ( ssl )
|
||||
nntp? ( ssl )
|
||||
smime? ( ssl !gnutls )
|
||||
smime_classic? ( ssl !gnutls )
|
||||
smtp? ( ssl sasl )
|
||||
sasl? ( || ( imap pop smtp nntp ) )
|
||||
kerberos? ( || ( imap pop smtp nntp ) )"
|
||||
SLOT="0"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
# yes, we overdepend on the backend impls here, hopefully one day we can
|
||||
# have REQUIRED_USE do what it is made for again. bug #607360
|
||||
CDEPEND="
|
||||
app-misc/mime-types
|
||||
virtual/libiconv
|
||||
|
||||
berkdb? ( >=sys-libs/db-4:= )
|
||||
gdbm? ( sys-libs/gdbm )
|
||||
lmdb? ( dev-db/lmdb:= )
|
||||
qdbm? ( dev-db/qdbm )
|
||||
tokyocabinet? ( dev-db/tokyocabinet )
|
||||
|
||||
ssl? (
|
||||
gnutls? ( >=net-libs/gnutls-1.0.17:= )
|
||||
!gnutls? (
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
!libressl? ( >=dev-libs/openssl-0.9.6:0= )
|
||||
)
|
||||
)
|
||||
|
||||
nls? ( virtual/libintl )
|
||||
sasl? ( >=dev-libs/cyrus-sasl-2 )
|
||||
kerberos? ( virtual/krb5 )
|
||||
idn? ( net-dns/libidn2 )
|
||||
gpg? ( >=app-crypt/gpgme-0.9.0:= )
|
||||
gpgme? ( >=app-crypt/gpgme-0.9.0:= )
|
||||
notmuch? ( net-mail/notmuch:= )
|
||||
slang? ( sys-libs/slang )
|
||||
!slang? ( >=sys-libs/ncurses-5.2:0= )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
net-mail/mailbase
|
||||
doc? (
|
||||
dev-libs/libxml2
|
||||
dev-libs/libxslt
|
||||
app-text/docbook-xsl-stylesheets
|
||||
|| ( www-client/lynx www-client/w3m www-client/elinks )
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-mutt )
|
||||
smime? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
|
||||
smime_classic? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
|
||||
crypt? ( app-crypt/gnupg )
|
||||
pgp_classic? ( app-crypt/gnupg )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
local PATCHDIR="${WORKDIR}"/mutt-gentoo-${PV}-patches-${PATCHREV}
|
||||
|
||||
if use !vanilla ; then
|
||||
# apply patches
|
||||
export EPATCH_FORCE="yes"
|
||||
export EPATCH_SUFFIX="patch"
|
||||
# http://hg.code.sf.net/p/gentoomuttpatches/code/file/mutt-1.10
|
||||
local patches=(
|
||||
patches-mutt
|
||||
bugs-gentoo
|
||||
features-common
|
||||
features-extra
|
||||
gentoo
|
||||
)
|
||||
local patchset
|
||||
for patchset in "${patches[@]}" ; do
|
||||
[[ -d "${PATCHDIR}/${patchset}" ]] || continue
|
||||
einfo "Patches for ${PATCHSET} patchset ${patchset}"
|
||||
EPATCH_SOURCE="${PATCHDIR}"/${patchset} epatch \
|
||||
|| die "patchset ${patchset} failed"
|
||||
done
|
||||
# add some explanation as to why not to go upstream
|
||||
sed -i \
|
||||
-e '/ReachingUs = N_(/aThis release of Mutt is heavily enriched with patches.\\nFor this reason, any bugs are better reported at https://bugs.gentoo.org/\\nor re-emerge with USE=vanilla and try to reproduce your problem.\\n\\' \
|
||||
main.c || die "Failed to add bug instructions"
|
||||
fi
|
||||
|
||||
local upatches=
|
||||
# allow user patches
|
||||
eapply_user && upatches=" with user patches"
|
||||
|
||||
# patch version string for bug reports
|
||||
local patchset=
|
||||
use vanilla || patchset=", ${PATCHSET}"
|
||||
sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
|
||||
muttlib.c || die "failed patching in Gentoo version"
|
||||
|
||||
# many patches touch the buildsystem, we always need this
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
|
||||
# the configure script contains some "cleverness" whether or not to setgid
|
||||
# the dotlock program, resulting in bugs like #278332
|
||||
sed -i -e 's/@DOTLOCK_GROUP@//' Makefile.in || die "sed failed"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=(
|
||||
# signing and encryption
|
||||
# clumpsy blocks for transition period of USE-flag renames
|
||||
$(use crypt && use_enable crypt pgp)
|
||||
$(use pgp_classic && use_enable pgp_classic pgp)
|
||||
$(use !crypt && use !pgp_classic && echo "--disable-pgp")
|
||||
|
||||
$(use smime && use_enable smime)
|
||||
$(use smime_classic && use_enable smime_classic smime)
|
||||
$(use !smime && use !smime_classic && echo "--disable-smime")
|
||||
|
||||
$(use gpg && use_enable gpg gpgme)
|
||||
$(use gpgme && use_enable gpgme)
|
||||
$(use !gpg && use !gpgme && echo "--disable-gpgme")
|
||||
|
||||
# features
|
||||
$(use_enable debug)
|
||||
$(use_enable doc)
|
||||
$(use_enable nls)
|
||||
$(use_enable notmuch)
|
||||
|
||||
# protocols
|
||||
$(use_enable imap)
|
||||
$(use_enable pop)
|
||||
$(use_enable nntp)
|
||||
$(use_enable smtp)
|
||||
|
||||
$(use ssl && use gnutls && echo --with-gnutls --without-ssl)
|
||||
$(use ssl && use !gnutls && echo --without-gnutls --with-ssl )
|
||||
$(use !ssl && echo --without-gnutls --without-ssl)
|
||||
|
||||
$(use_with sasl)
|
||||
$(use_with idn idn2) --without-idn # avoid automagic libidn dep
|
||||
$(use_with kerberos gss)
|
||||
"$(use slang && echo --with-slang="${EPREFIX}"/usr || echo a=b)"
|
||||
"$(use_with !slang curses "${EPREFIX}"/usr)"
|
||||
|
||||
"--enable-compressed"
|
||||
"--enable-external-dotlock"
|
||||
"--enable-iconv"
|
||||
"--enable-nfs-fix"
|
||||
"--enable-sidebar"
|
||||
"--sysconfdir=${EPREFIX}/etc/${PN}"
|
||||
"--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
|
||||
"--with-regex"
|
||||
"--with-exec-shell=${EPREFIX}/bin/sh"
|
||||
)
|
||||
|
||||
if [[ ${CHOST} == *-solaris2.* && ${CHOST#*-solaris2.} -le 10 ]] ; then
|
||||
# arrows in index view do not show when using wchar_t
|
||||
# or misalign due to wrong computations
|
||||
myconf+=( "--without-wc-funcs" )
|
||||
fi
|
||||
|
||||
# note: REQUIRED_USE should have selected only one of these, but for
|
||||
# bug #607360 we're forced to allow multiple. For that reason, this
|
||||
# list is ordered to preference, and only the first is taken.
|
||||
local hcaches=(
|
||||
"lmdb"
|
||||
"qdbm"
|
||||
"tokyocabinet"
|
||||
"gdbm"
|
||||
"berkdb:bdb"
|
||||
)
|
||||
local ucache hcache lcache
|
||||
for hcache in "${hcaches[@]}" ; do
|
||||
if use ${hcache%%:*} ; then
|
||||
ucache=${hcache}
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n ${ucache} ]] ; then
|
||||
myconf+=( "--enable-hcache" )
|
||||
else
|
||||
myconf+=( "--disable-hcache" )
|
||||
fi
|
||||
for hcache in "${hcaches[@]}" ; do
|
||||
[[ ${hcache} == ${ucache} ]] \
|
||||
&& myconf+=( "--with-${hcache#*:}" ) \
|
||||
|| myconf+=( "--without-${hcache#*:}" )
|
||||
done
|
||||
|
||||
if use mbox; then
|
||||
myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
|
||||
else
|
||||
myconf+=( "--with-homespool=Maildir" )
|
||||
fi
|
||||
|
||||
econf "${myconf[@]}" || die "configure failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "install failed"
|
||||
if use mbox; then
|
||||
insinto /etc/mutt
|
||||
newins "${FILESDIR}"/Muttrc.mbox Muttrc
|
||||
else
|
||||
insinto /etc/mutt
|
||||
doins "${FILESDIR}"/Muttrc
|
||||
fi
|
||||
|
||||
# A newer file is provided by app-misc/mime-types. So we link it.
|
||||
rm "${ED}"/etc/${PN}/mime.types
|
||||
dosym "${EPREFIX}"/etc/mime.types /etc/${PN}/mime.types
|
||||
|
||||
# A man-page is always handy, so fake one
|
||||
if use !doc; then
|
||||
emake -C doc DESTDIR="${D}" muttrc.man || die
|
||||
# make the fake slightly better, bug #413405
|
||||
sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \
|
||||
-e 's#in @docdir@,#at http://www.mutt.org/,#' \
|
||||
-e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
|
||||
-e "s#@bindir@#${EPREFIX}/usr/bin#" \
|
||||
doc/mutt.man > mutt.1 || die
|
||||
cp doc/muttrc.man muttrc.5 || die
|
||||
doman mutt.1 muttrc.5
|
||||
else
|
||||
# nuke manpages that should be provided by an MTA, bug #177605
|
||||
rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
|
||||
|| ewarn "failed to remove files, please file a bug"
|
||||
fi
|
||||
|
||||
if use !prefix ; then
|
||||
fowners root:mail /usr/bin/mutt_dotlock
|
||||
fperms g+s /usr/bin/mutt_dotlock
|
||||
fi
|
||||
|
||||
dodoc BEWARE COPYRIGHT ChangeLog NEWS OPS* PATCHES README* TODO VERSION
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]] ; then
|
||||
echo
|
||||
elog "If you are new to mutt you may want to take a look at"
|
||||
elog "the Gentoo QuickStart Guide to Mutt E-Mail:"
|
||||
elog " https://wiki.gentoo.org/wiki/Mutt"
|
||||
echo
|
||||
else
|
||||
ewarn "This release removes the conditional date feature in favour"
|
||||
ewarn "of Dynamic \$index_format Content, see:"
|
||||
ewarn " http://www.mutt.org/doc/manual/#index-format-hook"
|
||||
fi
|
||||
if use crypt || use gpg || use smime ; then
|
||||
ewarn "Please note that the crypto related USE-flags of mutt have changed."
|
||||
ewarn "To remove some unclarity, the following USE-flags are renamed:"
|
||||
ewarn "(see https://bugs.gentoo.org/637176)"
|
||||
ewarn " crypt -> pgp_classic"
|
||||
ewarn " gpg -> gpgme"
|
||||
ewarn " smime -> smime_classic"
|
||||
ewarn "The old USE flags still work but their use is deprecated and will"
|
||||
ewarn "be removed in a future release. Please update your package.use"
|
||||
if use gpg && ( use crypt || use smime ) ; then
|
||||
ewarn " Note that gpgme (old gpg) includes both pgp and smime"
|
||||
ewarn " support. You can probably remove pgp_classic (old crypt)"
|
||||
ewarn " and smime_classic (old smime) from your USE-flags and"
|
||||
ewarn " only enable gpgme."
|
||||
fi
|
||||
fi
|
||||
if use gpgme ; then
|
||||
ewarn "Note: in order for Mutt to actually use the gpgme backend"
|
||||
ewarn " you MUST include 'set crypt_use_gpgme=yes' in .muttrc"
|
||||
ewarn " https://dev.mutt.org/doc/manual.html#crypt-use-gpgme"
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST encodings-1.0.4.tar.bz2 665087 BLAKE2B 867da2247836ed829af8e6c465eeeb40e84d98bd114939843be619f2915f61c5ffc56a48adf9414e39c7a3ddd0fc86572fb85d2bc486cf68886d48d78e369761 SHA512 838d1c9489e9880bf1982dc14d34a48b624b7bc2c0fffbf28e2c24e1546b0602357ca31afef100053481d6a18e357085ef74ac7a82261daa1ac1398bc1e05d17
|
||||
DIST encodings-1.0.5.tar.bz2 713817 BLAKE2B 43e466c27fdf485e9704debb89c69a3c3eaecf84453362d86b53aa9c33d10b8f97f348ef35f8b430be101e8281ecce5d5f49a052929fc7cd37d94a7590645193 SHA512 920e49f0b3545f181a1574ca3280ac9adef1e68fe27566c195dd7013f728d355c0d759132789357fcf8fa7391fcbe1e17edf2bd85aa5611df5a4d99740011008
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
# font eclass is inherited directly, since this package is a special case that
|
||||
# would greatly complicate the fonts logic of xorg-2
|
||||
inherit font xorg-2
|
||||
|
||||
DESCRIPTION="X.Org font encodings"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="x11-apps/mkfontscale
|
||||
>=media-fonts/font-util-1.1.1-r1"
|
||||
|
||||
pkg_postinst() {
|
||||
xorg-2_pkg_postinst
|
||||
font_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xorg-2_pkg_postrm
|
||||
font_pkg_postrm
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue