summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-10-20 19:01:45 +0200
committerPacho Ramos <pacho@gentoo.org>2018-10-20 20:50:56 +0200
commitd815a92ebea0a39afa319fe9c53e7e8e2b8fe524 (patch)
tree81e3df2b76a96f4c5de7bdb2107037da693fbc10 /sys-apps/pacman
parentapp-text/uudeview: Disable tk support, bug 661672 (diff)
downloadgentoo-d815a92ebea0a39afa319fe9c53e7e8e2b8fe524.tar.gz
gentoo-d815a92ebea0a39afa319fe9c53e7e8e2b8fe524.tar.bz2
gentoo-d815a92ebea0a39afa319fe9c53e7e8e2b8fe524.zip
sys-apps/pacman: Allow libressl usage (#659754 by Boris Staletic)
Closes: https://bugs.gentoo.org/659754 Signed-off-by: Pacho Ramos <pacho@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'sys-apps/pacman')
-rw-r--r--sys-apps/pacman/pacman-5.0.2-r2.ebuild117
1 files changed, 117 insertions, 0 deletions
diff --git a/sys-apps/pacman/pacman-5.0.2-r2.ebuild b/sys-apps/pacman/pacman-5.0.2-r2.ebuild
new file mode 100644
index 000000000000..aecc9e6e2652
--- /dev/null
+++ b/sys-apps/pacman/pacman-5.0.2-r2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools
+
+DESCRIPTION="Archlinux's binary package manager"
+HOMEPAGE="https://archlinux.org/pacman/"
+
+PATCHES=()
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.archlinux.org/pacman.git"
+else
+ SRC_URI="https://sources.archlinux.org/other/pacman/${P}.tar.gz"
+ # Do *not* re-add ~x86!
+ # https://www.archlinux.org/news/phasing-out-i686-support/
+ KEYWORDS="~amd64"
+
+ PATCHES+=( "${FILESDIR}"/${PN}-5.0.2-CVE-2016-5434.patch )
+fi
+
+LICENSE="GPL-2"
+SLOT="0/10"
+
+IUSE="curl debug doc +gpg libressl test"
+COMMON_DEPEND="
+ app-arch/libarchive:=[lzma]
+ gpg? ( >=app-crypt/gpgme-1.4.0:= )
+ curl? ( net-misc/curl )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ virtual/libiconv
+ virtual/libintl
+"
+RDEPEND="${COMMON_DEPEND}"
+
+DEPEND="${COMMON_DEPEND}
+ app-text/asciidoc
+ doc? ( app-doc/doxygen )
+ test? (
+ sys-apps/fakeroot
+ sys-apps/fakechroot
+ )
+"
+
+# workaround until tests are fixed/sorted out
+RESTRICT="test"
+
+src_prepare() {
+ # Remove a line that adds "-Werror" in ./configure when
+ # "--enable-debug" is passed:
+ sed -i -e '/-Werror/d' configure.ac || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ --localstatedir=/var
+ --disable-git-version
+ --with-openssl
+ # Help protect user from shooting his/her Gentoo installation
+ # in its foot.
+ --with-root-dir="${EPREFIX}/var/chroot/archlinux"
+ $(use_enable debug)
+ # full doc with doxygen
+ $(use_enable doc doxygen)
+ $(use_with curl libcurl)
+ $(use_with gpg gpgme)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+
+ emake -C contrib
+}
+
+src_install() {
+ dodir /etc/pacman.d/
+ # contributed parts, i.e. not pacman itself, but useful helpers and some templates and basic docs
+ dobin "${S}"/contrib/{bacman,checkupdates,pac{cache,diff,list,log-pkglist,scripts,search},rankmirrors,updpkgsums}
+ newdoc "${S}"/contrib/README contrib-README
+ dodoc "${S}"/contrib/PKGBUILD.vim
+ # create /var/chroot/archlinux
+ # see bug #631754
+ dodir /var/chroot/archlinux
+ keepdir /var/chroot/archlinux /var/lib/pacman
+
+ default
+ find "${D}" -name '*.la' -delete || die
+
+ # avoid creating stuff inside /var/cache/
+ # see bug #633742 for more information
+ rm -r "${D}"/var/cache/pacman
+ rmdir "${D}"/var/cache
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "The default root dir was set to ${EPREFIX}/var/chroot/archlinux"
+ einfo "to avoid breaking Gentoo systems due to oscitancy."
+ einfo "If you prefer another directory, take a look at"
+ einfo "pacman’s parameter -r|--root)."
+ einfo ""
+ einfo "You will need to setup at least one mirror in /etc/pacman.d/mirrorlist."
+ einfo "Please generate it manually according to the Archlinux documentation:"
+ einfo "https://wiki.archlinux.org/index.php/Mirror"
+ einfo ""
+}