summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/libfetch/Manifest1
-rw-r--r--dev-libs/libfetch/libfetch-2.33.ebuild24
-rw-r--r--dev-libs/libfetch/metadata.xml17
-rw-r--r--eclass/eutils.eclass543
-rw-r--r--metadata/layout.conf19
-rw-r--r--profiles/adelie/1.0/alpha/parent3
-rw-r--r--profiles/adelie/1.0/alpha/s6/parent2
-rw-r--r--profiles/adelie/1.0/alpha/systemd/parent2
-rw-r--r--profiles/adelie/1.0/arm/parent3
-rw-r--r--profiles/adelie/1.0/arm/s6/parent2
-rw-r--r--profiles/adelie/1.0/arm/systemd/parent2
-rw-r--r--profiles/adelie/1.0/arm64/parent3
-rw-r--r--profiles/adelie/1.0/arm64/s6/parent2
-rw-r--r--profiles/adelie/1.0/arm64/systemd/parent2
-rw-r--r--profiles/adelie/1.0/hppa/parent3
-rw-r--r--profiles/adelie/1.0/hppa/s6/parent2
-rw-r--r--profiles/adelie/1.0/hppa/systemd/parent2
-rw-r--r--profiles/adelie/1.0/mips/parent3
-rw-r--r--profiles/adelie/1.0/mips/s6/parent2
-rw-r--r--profiles/adelie/1.0/mips/systemd/parent2
-rw-r--r--profiles/adelie/1.0/ppc/cell/parent1
-rw-r--r--profiles/adelie/1.0/ppc/parent3
-rw-r--r--profiles/adelie/1.0/ppc/s6/parent2
-rw-r--r--profiles/adelie/1.0/ppc/systemd/parent2
-rw-r--r--profiles/adelie/1.0/ppc64/parent3
-rw-r--r--profiles/adelie/1.0/ppc64/s6/parent2
-rw-r--r--profiles/adelie/1.0/ppc64/systemd/parent2
-rw-r--r--profiles/adelie/1.0/sparc64/parent3
-rw-r--r--profiles/adelie/1.0/sparc64/s6/parent2
-rw-r--r--profiles/adelie/1.0/sparc64/systemd/parent2
-rw-r--r--profiles/adelie/1.0/x86/parent3
-rw-r--r--profiles/adelie/1.0/x86/s6/parent2
-rw-r--r--profiles/adelie/1.0/x86/systemd/parent2
-rw-r--r--profiles/adelie/1.0/x86_64/parent3
-rw-r--r--profiles/adelie/1.0/x86_64/s6/parent2
-rw-r--r--profiles/adelie/1.0/x86_64/systemd/parent2
-rw-r--r--profiles/arch.list13
-rw-r--r--profiles/arch/alpha/parent1
-rw-r--r--profiles/arch/arm/parent1
-rw-r--r--profiles/arch/arm64/parent1
-rw-r--r--profiles/arch/hppa/parent1
-rw-r--r--profiles/arch/mips/parent1
-rw-r--r--profiles/arch/ppc/parent1
-rw-r--r--profiles/arch/ppc64/parent1
-rw-r--r--profiles/arch/sparc64/parent1
-rw-r--r--profiles/arch/x86/parent1
-rw-r--r--profiles/arch/x86_64/parent1
-rw-r--r--profiles/base/eapi1
-rw-r--r--profiles/base/make.defaults42
-rw-r--r--profiles/base/packages19
-rw-r--r--profiles/categories3
-rw-r--r--profiles/eapi1
-rw-r--r--profiles/package.provided1
-rw-r--r--profiles/profiles.desc46
-rw-r--r--profiles/repo_name1
-rw-r--r--profiles/use.desc5
-rw-r--r--sys-apps/apk-tools/Manifest4
-rw-r--r--sys-apps/apk-tools/apk-tools-2.6.4.ebuild51
-rw-r--r--sys-apps/apk-tools/files/apk-tools-2.6.4-glibc-add-missing-headers.patch12
-rw-r--r--sys-apps/apk-tools/metadata.xml7
-rw-r--r--virtual/package-manager/metadata.xml4
-rw-r--r--virtual/package-manager/package-manager-0.ebuild15
62 files changed, 910 insertions, 0 deletions
diff --git a/dev-libs/libfetch/Manifest b/dev-libs/libfetch/Manifest
new file mode 100644
index 000000000..578da15fa
--- /dev/null
+++ b/dev-libs/libfetch/Manifest
@@ -0,0 +1 @@
+DIST libfetch-2.33.tar.bz2 37587 SHA256 18be85b6d9aed3d9e8406c60e5b8a304bcaf0ad3799b894fcd121464ba2659f6 SHA512 571e686cf51d6d89e981bd05168a5f76e90778662af5e7da1fd1cc244941beb1657b48d6ef482d08a6b69d30b81bb4505bdb8083bff178f7a4e8ac05e4c63630 WHIRLPOOL 952e113a6c5b3f6a586a13dada7a39b7fc4a313a102060f44dcab1f23155ae685e2b54661974608605862fd0547bbbafe63a8d8489c85b84e3c692713809e05f
diff --git a/dev-libs/libfetch/libfetch-2.33.ebuild b/dev-libs/libfetch/libfetch-2.33.ebuild
new file mode 100644
index 000000000..4ca3a76b1
--- /dev/null
+++ b/dev-libs/libfetch/libfetch-2.33.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="High-level retrieval and download library for FTP and HTTP(S)"
+HOMEPAGE="http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/"
+SRC_URI="http://distfiles.foxkit.us/source/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="arm mips ppc x86 x86_64 ~alpha ~arm64 ~hppa ~ppc64 ~sparc64"
+IUSE="+ipv6 +ssl"
+
+DEPEND="ssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ use ssl || export FETCH_WITH_OPENSSL=false
+ use ipv6 || export FETCH_WITH_INET6=false
+
+ emake
+}
diff --git a/dev-libs/libfetch/metadata.xml b/dev-libs/libfetch/metadata.xml
new file mode 100644
index 000000000..eed2eb07e
--- /dev/null
+++ b/dev-libs/libfetch/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ libfetch provides a high-level interface for retreiving and uploading
+ files using Uniform Resource Locators (URLs).
+
+ The library implements:
+
+ * local file access (file://)
+ * FTP
+ * HTTP
+ * HTTPS (optional, using OpenSSL)
+
+ FTP and HTTP proxies can be used.
+ </longdescription>
+</pkgmetadata>
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
new file mode 100644
index 000000000..c47e69df6
--- /dev/null
+++ b/eclass/eutils.eclass
@@ -0,0 +1,543 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: eutils.eclass
+# @MAINTAINER:
+# base-system@gentoo.org
+# @BLURB: many extra (but common) functions that are used in ebuilds
+# @DESCRIPTION:
+# The eutils eclass contains a suite of functions that complement
+# the ones that ebuild.sh already contain. The idea is that the functions
+# are not required in all ebuilds but enough utilize them to have a common
+# home rather than having multiple ebuilds implementing the same thing.
+#
+# Due to the nature of this eclass, some functions may have maintainers
+# different from the overall eclass!
+
+
+
+
+
+
+
+
+
+
+
+
+
+# !!!!NOTE!!!!
+#
+# This file has been heavily stripped as part of the Adélie system.
+# It only contains the epatch and epatch_user routines.
+# It is expected that we will, at some point, write our own; when that happens,
+# this file will be removed from this repository.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# @VARIABLE: EPATCH_SOURCE
+# @DESCRIPTION:
+# Default directory to search for patches.
+EPATCH_SOURCE="${WORKDIR}/patch"
+# @VARIABLE: EPATCH_SUFFIX
+# @DESCRIPTION:
+# Default extension for patches (do not prefix the period yourself).
+EPATCH_SUFFIX="patch.bz2"
+# @VARIABLE: EPATCH_OPTS
+# @DESCRIPTION:
+# Options to pass to patch. Meant for ebuild/package-specific tweaking
+# such as forcing the patch level (-p#) or fuzz (-F#) factor. Note that
+# for single patch tweaking, you can also pass flags directly to epatch.
+EPATCH_OPTS=""
+# @VARIABLE: EPATCH_COMMON_OPTS
+# @DESCRIPTION:
+# Common options to pass to `patch`. You probably should never need to
+# change these. If you do, please discuss it with base-system first to
+# be sure.
+# @CODE
+# -g0 - keep RCS, ClearCase, Perforce and SCCS happy #24571
+# --no-backup-if-mismatch - do not leave .orig files behind
+# -E - automatically remove empty files
+# @CODE
+EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch"
+# @VARIABLE: EPATCH_EXCLUDE
+# @DESCRIPTION:
+# List of patches not to apply. Note this is only file names,
+# and not the full path. Globs accepted.
+EPATCH_EXCLUDE=""
+# @VARIABLE: EPATCH_SINGLE_MSG
+# @DESCRIPTION:
+# Change the printed message for a single patch.
+EPATCH_SINGLE_MSG=""
+# @VARIABLE: EPATCH_MULTI_MSG
+# @DESCRIPTION:
+# Change the printed message for multiple patches.
+EPATCH_MULTI_MSG="Applying various patches (bugfixes/updates) ..."
+# @VARIABLE: EPATCH_FORCE
+# @DESCRIPTION:
+# Only require patches to match EPATCH_SUFFIX rather than the extended
+# arch naming style.
+EPATCH_FORCE="no"
+# @VARIABLE: EPATCH_USER_EXCLUDE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of patches not to apply. Note this is only file names,
+# and not the full path. Globs accepted.
+
+# @FUNCTION: epatch
+# @USAGE: [options] [patches] [dirs of patches]
+# @DESCRIPTION:
+# epatch is designed to greatly simplify the application of patches. It can
+# process patch files directly, or directories of patches. The patches may be
+# compressed (bzip/gzip/etc...) or plain text. You generally need not specify
+# the -p option as epatch will automatically attempt -p0 to -p4 until things
+# apply successfully.
+#
+# If you do not specify any patches/dirs, then epatch will default to the
+# directory specified by EPATCH_SOURCE.
+#
+# Any options specified that start with a dash will be passed down to patch
+# for this specific invocation. As soon as an arg w/out a dash is found, then
+# arg processing stops.
+#
+# When processing directories, epatch will apply all patches that match:
+# @CODE
+# if ${EPATCH_FORCE} != "yes"
+# ??_${ARCH}_foo.${EPATCH_SUFFIX}
+# else
+# *.${EPATCH_SUFFIX}
+# @CODE
+# The leading ?? are typically numbers used to force consistent patch ordering.
+# The arch field is used to apply patches only for the host architecture with
+# the special value of "all" means apply for everyone. Note that using values
+# other than "all" is highly discouraged -- you should apply patches all the
+# time and let architecture details be detected at configure/compile time.
+#
+# If EPATCH_SUFFIX is empty, then no period before it is implied when searching
+# for patches to apply.
+#
+# Refer to the other EPATCH_xxx variables for more customization of behavior.
+epatch() {
+ _epatch_draw_line() {
+ # create a line of same length as input string
+ [[ -z $1 ]] && set "$(printf "%65s" '')"
+ echo "${1//?/=}"
+ }
+
+ unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402
+
+ # First process options. We localize the EPATCH_OPTS setting
+ # from above so that we can pass it on in the loop below with
+ # any additional values the user has specified.
+ local EPATCH_OPTS=( ${EPATCH_OPTS[*]} )
+ while [[ $# -gt 0 ]] ; do
+ case $1 in
+ -*) EPATCH_OPTS+=( "$1" ) ;;
+ *) break ;;
+ esac
+ shift
+ done
+
+ # Let the rest of the code process one user arg at a time --
+ # each arg may expand into multiple patches, and each arg may
+ # need to start off with the default global EPATCH_xxx values
+ if [[ $# -gt 1 ]] ; then
+ local m
+ for m in "$@" ; do
+ epatch "${m}"
+ done
+ return 0
+ fi
+
+ local SINGLE_PATCH="no"
+ # no args means process ${EPATCH_SOURCE}
+ [[ $# -eq 0 ]] && set -- "${EPATCH_SOURCE}"
+
+ if [[ -f $1 ]] ; then
+ SINGLE_PATCH="yes"
+ set -- "$1"
+ # Use the suffix from the single patch (localize it); the code
+ # below will find the suffix for us
+ local EPATCH_SUFFIX=$1
+
+ elif [[ -d $1 ]] ; then
+ # We have to force sorting to C so that the wildcard expansion is consistent #471666.
+ evar_push_set LC_COLLATE C
+ # Some people like to make dirs of patches w/out suffixes (vim).
+ set -- "$1"/*${EPATCH_SUFFIX:+."${EPATCH_SUFFIX}"}
+ evar_pop
+
+ elif [[ -f ${EPATCH_SOURCE}/$1 ]] ; then
+ # Re-use EPATCH_SOURCE as a search dir
+ epatch "${EPATCH_SOURCE}/$1"
+ return $?
+
+ else
+ # sanity check ... if it isn't a dir or file, wtf man ?
+ [[ $# -ne 0 ]] && EPATCH_SOURCE=$1
+ echo
+ eerror "Cannot find \$EPATCH_SOURCE! Value for \$EPATCH_SOURCE is:"
+ eerror
+ eerror " ${EPATCH_SOURCE}"
+ eerror " ( ${EPATCH_SOURCE##*/} )"
+ echo
+ die "Cannot find \$EPATCH_SOURCE!"
+ fi
+
+ # Now that we know we're actually going to apply something, merge
+ # all of the patch options back in to a single variable for below.
+ EPATCH_OPTS="${EPATCH_COMMON_OPTS} ${EPATCH_OPTS[*]}"
+
+ local PIPE_CMD
+ case ${EPATCH_SUFFIX##*\.} in
+ xz) PIPE_CMD="xz -dc" ;;
+ lzma) PIPE_CMD="lzma -dc" ;;
+ bz2) PIPE_CMD="bzip2 -dc" ;;
+ gz|Z|z) PIPE_CMD="gzip -dc" ;;
+ ZIP|zip) PIPE_CMD="unzip -p" ;;
+ *) ;;
+ esac
+
+ [[ ${SINGLE_PATCH} == "no" ]] && einfo "${EPATCH_MULTI_MSG}"
+
+ local x
+ for x in "$@" ; do
+ # If the patch dir given contains subdirs, or our EPATCH_SUFFIX
+ # didn't match anything, ignore continue on
+ [[ ! -f ${x} ]] && continue
+
+ local patchname=${x##*/}
+
+ # Apply single patches, or forced sets of patches, or
+ # patches with ARCH dependant names.
+ # ???_arch_foo.patch
+ # Else, skip this input altogether
+ local a=${patchname#*_} # strip the ???_
+ a=${a%%_*} # strip the _foo.patch
+ if ! [[ ${SINGLE_PATCH} == "yes" || \
+ ${EPATCH_FORCE} == "yes" || \
+ ${a} == all || \
+ ${a} == ${ARCH} ]]
+ then
+ continue
+ fi
+
+ # Let people filter things dynamically
+ if [[ -n ${EPATCH_EXCLUDE}${EPATCH_USER_EXCLUDE} ]] ; then
+ # let people use globs in the exclude
+ eshopts_push -o noglob
+
+ local ex
+ for ex in ${EPATCH_EXCLUDE} ; do
+ if [[ ${patchname} == ${ex} ]] ; then
+ einfo " Skipping ${patchname} due to EPATCH_EXCLUDE ..."
+ eshopts_pop
+ continue 2
+ fi
+ done
+
+ for ex in ${EPATCH_USER_EXCLUDE} ; do
+ if [[ ${patchname} == ${ex} ]] ; then
+ einfo " Skipping ${patchname} due to EPATCH_USER_EXCLUDE ..."
+ eshopts_pop
+ continue 2
+ fi
+ done
+
+ eshopts_pop
+ fi
+
+ if [[ ${SINGLE_PATCH} == "yes" ]] ; then
+ if [[ -n ${EPATCH_SINGLE_MSG} ]] ; then
+ einfo "${EPATCH_SINGLE_MSG}"
+ else
+ einfo "Applying ${patchname} ..."
+ fi
+ else
+ einfo " ${patchname} ..."
+ fi
+
+ # Handle aliased patch command #404447 #461568
+ local patch="patch"
+ eval $(alias patch 2>/dev/null | sed 's:^alias ::')
+
+ # most of the time, there will only be one run per unique name,
+ # but if there are more, make sure we get unique log filenames
+ local STDERR_TARGET="${T}/${patchname}.out"
+ if [[ -e ${STDERR_TARGET} ]] ; then
+ STDERR_TARGET="${T}/${patchname}-$$.out"
+ fi
+
+ printf "***** %s *****\nPWD: %s\nPATCH TOOL: %s -> %s\nVERSION INFO:\n%s\n\n" \
+ "${patchname}" \
+ "${PWD}" \
+ "${patch}" \
+ "$(type -P "${patch}")" \
+ "$(${patch} --version)" \
+ > "${STDERR_TARGET}"
+
+ # Decompress the patch if need be
+ local count=0
+ local PATCH_TARGET
+ if [[ -n ${PIPE_CMD} ]] ; then
+ PATCH_TARGET="${T}/$$.patch"
+ echo "PIPE_COMMAND: ${PIPE_CMD} ${x} > ${PATCH_TARGET}" >> "${STDERR_TARGET}"
+
+ if ! (${PIPE_CMD} "${x}" > "${PATCH_TARGET}") >> "${STDERR_TARGET}" 2>&1 ; then
+ echo
+ eerror "Could not extract patch!"
+ #die "Could not extract patch!"
+ count=5
+ break
+ fi
+ else
+ PATCH_TARGET=${x}
+ fi
+
+ # Check for absolute paths in patches. If sandbox is disabled,
+ # people could (accidently) patch files in the root filesystem.
+ # Or trigger other unpleasantries #237667. So disallow -p0 on
+ # such patches.
+ local abs_paths=$(egrep -n '^[-+]{3} /' "${PATCH_TARGET}" | awk '$2 != "/dev/null" { print }')
+ if [[ -n ${abs_paths} ]] ; then
+ count=1
+ printf "NOTE: skipping -p0 due to absolute paths in patch:\n%s\n" "${abs_paths}" >> "${STDERR_TARGET}"
+ fi
+ # Similar reason, but with relative paths.
+ local rel_paths=$(egrep -n '^[-+]{3} [^ ]*[.][.]/' "${PATCH_TARGET}")
+ if [[ -n ${rel_paths} ]] ; then
+ echo
+ eerror "Rejected Patch: ${patchname} !"
+ eerror " ( ${PATCH_TARGET} )"
+ eerror
+ eerror "Your patch uses relative paths '../':"
+ eerror "${rel_paths}"
+ echo
+ die "you need to fix the relative paths in patch"
+ fi
+
+ # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
+ local patch_cmd
+ while [[ ${count} -lt 5 ]] ; do
+ patch_cmd="${patch} -p${count} ${EPATCH_OPTS}"
+
+ # Generate some useful debug info ...
+ (
+ _epatch_draw_line "***** ${patchname} *****"
+ echo
+ echo "PATCH COMMAND: ${patch_cmd} --dry-run -f < '${PATCH_TARGET}'"
+ echo
+ _epatch_draw_line "***** ${patchname} *****"
+ ${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1
+ ret=$?
+ echo
+ echo "patch program exited with status ${ret}"
+ exit ${ret}
+ ) >> "${STDERR_TARGET}"
+
+ if [ $? -eq 0 ] ; then
+ (
+ _epatch_draw_line "***** ${patchname} *****"
+ echo
+ echo "ACTUALLY APPLYING ${patchname} ..."
+ echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'"
+ echo
+ _epatch_draw_line "***** ${patchname} *****"
+ ${patch_cmd} < "${PATCH_TARGET}" 2>&1
+ ret=$?
+ echo
+ echo "patch program exited with status ${ret}"
+ exit ${ret}
+ ) >> "${STDERR_TARGET}"
+
+ if [ $? -ne 0 ] ; then
+ echo
+ eerror "A dry-run of patch command succeeded, but actually"
+ eerror "applying the patch failed!"
+ #die "Real world sux compared to the dreamworld!"
+ count=5
+ fi
+ break
+ fi
+
+ : $(( count++ ))
+ done
+
+ # if we had to decompress the patch, delete the temp one
+ if [[ -n ${PIPE_CMD} ]] ; then
+ rm -f "${PATCH_TARGET}"
+ fi
+
+ if [[ ${count} -ge 5 ]] ; then
+ echo
+ eerror "Failed Patch: ${patchname} !"
+ eerror " ( ${PATCH_TARGET} )"
+ eerror
+ eerror "Include in your bugreport the contents of:"
+ eerror
+ eerror " ${STDERR_TARGET}"
+ echo
+ die "Failed Patch: ${patchname}!"
+ fi
+
+ # if everything worked, delete the full debug patch log
+ rm -f "${STDERR_TARGET}"
+
+ # then log away the exact stuff for people to review later
+ cat <<-EOF >> "${T}/epatch.log"
+ PATCH: ${x}
+ CMD: ${patch_cmd}
+ PWD: ${PWD}
+
+ EOF
+ eend 0
+ done
+
+ [[ ${SINGLE_PATCH} == "no" ]] && einfo "Done with patching"
+ : # everything worked
+}
+
+# @VARIABLE: EPATCH_USER_SOURCE
+# @DESCRIPTION:
+# Location for user patches, see the epatch_user function.
+# Should be set by the user. Don't set this in ebuilds.
+: ${EPATCH_USER_SOURCE:=${PORTAGE_CONFIGROOT%/}/etc/portage/patches}
+
+# @FUNCTION: epatch_user
+# @USAGE:
+# @DESCRIPTION:
+# Applies user-provided patches to the source tree. The patches are
+# taken from /etc/portage/patches/<CATEGORY>/<P-PR|P|PN>[:SLOT]/, where the first
+# of these three directories to exist will be the one to use, ignoring
+# any more general directories which might exist as well. They must end
+# in ".patch" to be applied.
+#
+# User patches are intended for quick testing of patches without ebuild
+# modifications, as well as for permanent customizations a user might
+# desire. Obviously, there can be no official support for arbitrarily
+# patched ebuilds. So whenever a build log in a bug report mentions that
+# user patches were applied, the user should be asked to reproduce the
+# problem without these.
+#
+# Not all ebuilds do call this function, so placing patches in the
+# stated directory might or might not work, depending on the package and
+# the eclasses it inherits and uses. It is safe to call the function
+# repeatedly, so it is always possible to add a call at the ebuild
+# level. The first call is the time when the patches will be
+# applied.
+#
+# Ideally, this function should be called after gentoo-specific patches
+# have been applied, so that their code can be modified as well, but
+# before calls to e.g. eautoreconf, as the user patches might affect
+# autotool input files as well.
+epatch_user() {
+ [[ $# -ne 0 ]] && die "epatch_user takes no options"
+
+ # Allow multiple calls to this function; ignore all but the first
+ local applied="${T}/epatch_user.log"
+ [[ -e ${applied} ]] && return 2
+
+ # don't clobber any EPATCH vars that the parent might want
+ local EPATCH_SOURCE check
+ for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do
+ EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check}
+ if [[ -d ${EPATCH_SOURCE} ]] ; then
+ EPATCH_SOURCE=${EPATCH_SOURCE} \
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \
+ epatch
+ echo "${EPATCH_SOURCE}" > "${applied}"
+ has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" epatch_user_death_notice"
+ return 0
+ fi
+ done
+ echo "none" > "${applied}"
+ return 1
+}
+
+# @FUNCTION: epatch_user_death_notice
+# @INTERNAL
+# @DESCRIPTION:
+# Include an explicit notice in the die message itself that user patches were
+# applied to this build.
+epatch_user_death_notice() {
+ ewarn "!!! User patches were applied to this build!"
+}
+
+# @FUNCTION: einstalldocs
+# @DESCRIPTION:
+# Install documentation using DOCS and HTML_DOCS.
+#
+# If DOCS is declared and non-empty, all files listed in it are
+# installed. The files must exist, otherwise the function will fail.
+# In EAPI 4 and subsequent EAPIs DOCS may specify directories as well,
+# in other EAPIs using directories is unsupported.
+#
+# If DOCS is not declared, the files matching patterns given
+# in the default EAPI implementation of src_install will be installed.
+# If this is undesired, DOCS can be set to empty value to prevent any
+# documentation from being installed.
+#
+# If HTML_DOCS is declared and non-empty, all files and/or directories
+# listed in it are installed as HTML docs (using dohtml).
+#
+# Both DOCS and HTML_DOCS can either be an array or a whitespace-
+# separated list. Whenever directories are allowed, '<directory>/.' may
+# be specified in order to install all files within the directory
+# without creating a sub-directory in docdir.
+#
+# Passing additional options to dodoc and dohtml is not supported.
+# If you needed such a thing, you need to call those helpers explicitly.
+einstalldocs() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local dodoc_opts=-r
+ has ${EAPI} 0 1 2 3 && dodoc_opts=
+
+ if ! declare -p DOCS &>/dev/null ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
+ THANKS BUGS FAQ CREDITS CHANGELOG ; do
+ if [[ -s ${d} ]] ; then
+ dodoc "${d}" || die
+ fi
+ done
+ elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then
+ if [[ ${DOCS[@]} ]] ; then
+ dodoc ${dodoc_opts} "${DOCS[@]}" || die
+ fi
+ else
+ if [[ ${DOCS} ]] ; then
+ dodoc ${dodoc_opts} ${DOCS} || die
+ fi
+ fi
+
+ if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then
+ if [[ ${HTML_DOCS[@]} ]] ; then
+ dohtml -r "${HTML_DOCS[@]}" || die
+ fi
+ else
+ if [[ ${HTML_DOCS} ]] ; then
+ dohtml -r ${HTML_DOCS} || die
+ fi
+ fi
+
+ return 0
+}
+
diff --git a/metadata/layout.conf b/metadata/layout.conf
new file mode 100644
index 000000000..8122f314e
--- /dev/null
+++ b/metadata/layout.conf
@@ -0,0 +1,19 @@
+# Welcome to Adélie Linux.
+# This file describes this repository's configuration to Portage.
+
+# We don't need the deprecated SHA256 (GLEP 59), but leave it
+# because Gentoo-based Portage builds still require it.
+manifest-hashes = SHA256 SHA512 WHIRLPOOL
+
+# Ban ALL deprecated EAPIs. We only support 5 here.
+eapis-banned = 0 1 2 3 4
+
+# MD5 cache for egencache
+cache-formats = md5-dict
+
+# inherit stuff from gentoo repo (for now)
+masters =
+
+thin-manifests = true
+sign-commits = true
+sign-manifests = false
diff --git a/profiles/adelie/1.0/alpha/parent b/profiles/adelie/1.0/alpha/parent
new file mode 100644
index 000000000..6daae139e
--- /dev/null
+++ b/profiles/adelie/1.0/alpha/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/alpha
+..
diff --git a/profiles/adelie/1.0/alpha/s6/parent b/profiles/adelie/1.0/alpha/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/alpha/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/alpha/systemd/parent b/profiles/adelie/1.0/alpha/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/alpha/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/arm/parent b/profiles/adelie/1.0/arm/parent
new file mode 100644
index 000000000..4e4b3f92c
--- /dev/null
+++ b/profiles/adelie/1.0/arm/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/arm
+..
diff --git a/profiles/adelie/1.0/arm/s6/parent b/profiles/adelie/1.0/arm/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/arm/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/arm/systemd/parent b/profiles/adelie/1.0/arm/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/arm/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/arm64/parent b/profiles/adelie/1.0/arm64/parent
new file mode 100644
index 000000000..c416a90f0
--- /dev/null
+++ b/profiles/adelie/1.0/arm64/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/arm64
+..
diff --git a/profiles/adelie/1.0/arm64/s6/parent b/profiles/adelie/1.0/arm64/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/arm64/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/arm64/systemd/parent b/profiles/adelie/1.0/arm64/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/arm64/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/hppa/parent b/profiles/adelie/1.0/hppa/parent
new file mode 100644
index 000000000..93f0c7c3e
--- /dev/null
+++ b/profiles/adelie/1.0/hppa/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/hppa
+..
diff --git a/profiles/adelie/1.0/hppa/s6/parent b/profiles/adelie/1.0/hppa/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/hppa/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/hppa/systemd/parent b/profiles/adelie/1.0/hppa/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/hppa/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/mips/parent b/profiles/adelie/1.0/mips/parent
new file mode 100644
index 000000000..d7f50319a
--- /dev/null
+++ b/profiles/adelie/1.0/mips/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/mips
+..
diff --git a/profiles/adelie/1.0/mips/s6/parent b/profiles/adelie/1.0/mips/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/mips/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/mips/systemd/parent b/profiles/adelie/1.0/mips/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/mips/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/ppc/cell/parent b/profiles/adelie/1.0/ppc/cell/parent
new file mode 100644
index 000000000..f3229c5b9
--- /dev/null
+++ b/profiles/adelie/1.0/ppc/cell/parent
@@ -0,0 +1 @@
+..
diff --git a/profiles/adelie/1.0/ppc/parent b/profiles/adelie/1.0/ppc/parent
new file mode 100644
index 000000000..15dfb07d8
--- /dev/null
+++ b/profiles/adelie/1.0/ppc/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/ppc
+..
diff --git a/profiles/adelie/1.0/ppc/s6/parent b/profiles/adelie/1.0/ppc/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/ppc/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/ppc/systemd/parent b/profiles/adelie/1.0/ppc/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/ppc/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/ppc64/parent b/profiles/adelie/1.0/ppc64/parent
new file mode 100644
index 000000000..d2779419d
--- /dev/null
+++ b/profiles/adelie/1.0/ppc64/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/ppc64
+..
diff --git a/profiles/adelie/1.0/ppc64/s6/parent b/profiles/adelie/1.0/ppc64/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/ppc64/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/ppc64/systemd/parent b/profiles/adelie/1.0/ppc64/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/ppc64/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/sparc64/parent b/profiles/adelie/1.0/sparc64/parent
new file mode 100644
index 000000000..55950ad9e
--- /dev/null
+++ b/profiles/adelie/1.0/sparc64/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/sparc64
+..
diff --git a/profiles/adelie/1.0/sparc64/s6/parent b/profiles/adelie/1.0/sparc64/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/sparc64/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/sparc64/systemd/parent b/profiles/adelie/1.0/sparc64/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/sparc64/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/x86/parent b/profiles/adelie/1.0/x86/parent
new file mode 100644
index 000000000..06f9e8221
--- /dev/null
+++ b/profiles/adelie/1.0/x86/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/x86
+..
diff --git a/profiles/adelie/1.0/x86/s6/parent b/profiles/adelie/1.0/x86/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/x86/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/x86/systemd/parent b/profiles/adelie/1.0/x86/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/x86/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/adelie/1.0/x86_64/parent b/profiles/adelie/1.0/x86_64/parent
new file mode 100644
index 000000000..dee1098c8
--- /dev/null
+++ b/profiles/adelie/1.0/x86_64/parent
@@ -0,0 +1,3 @@
+../../../base
+../../../arch/x86_64
+..
diff --git a/profiles/adelie/1.0/x86_64/s6/parent b/profiles/adelie/1.0/x86_64/s6/parent
new file mode 100644
index 000000000..320ce53c3
--- /dev/null
+++ b/profiles/adelie/1.0/x86_64/s6/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/s6
diff --git a/profiles/adelie/1.0/x86_64/systemd/parent b/profiles/adelie/1.0/x86_64/systemd/parent
new file mode 100644
index 000000000..115c740d2
--- /dev/null
+++ b/profiles/adelie/1.0/x86_64/systemd/parent
@@ -0,0 +1,2 @@
+..
+../../../../inits/systemd
diff --git a/profiles/arch.list b/profiles/arch.list
new file mode 100644
index 000000000..45e629cbf
--- /dev/null
+++ b/profiles/arch.list
@@ -0,0 +1,13 @@
+# Tier 1 architectures
+arm
+ppc
+ppc64
+x86
+x86_64
+
+# Tier 2 architectures
+alpha
+arm64
+hppa
+mips
+sparc64
diff --git a/profiles/arch/alpha/parent b/profiles/arch/alpha/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/alpha/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/arm/parent b/profiles/arch/arm/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/arm/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/arm64/parent b/profiles/arch/arm64/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/arm64/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/hppa/parent b/profiles/arch/hppa/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/hppa/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/mips/parent b/profiles/arch/mips/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/mips/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/ppc/parent b/profiles/arch/ppc/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/ppc/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/ppc64/parent b/profiles/arch/ppc64/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/ppc64/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/sparc64/parent b/profiles/arch/sparc64/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/sparc64/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/x86/parent b/profiles/arch/x86/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/x86/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/arch/x86_64/parent b/profiles/arch/x86_64/parent
new file mode 100644
index 000000000..985c694a0
--- /dev/null
+++ b/profiles/arch/x86_64/parent
@@ -0,0 +1 @@
+../../base
diff --git a/profiles/base/eapi b/profiles/base/eapi
new file mode 100644
index 000000000..7ed6ff82d
--- /dev/null
+++ b/profiles/base/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
new file mode 100644
index 000000000..f42645e2d
--- /dev/null
+++ b/profiles/base/make.defaults
@@ -0,0 +1,42 @@
+# Welcome to Adélie Linux.
+# This file contains the default settings for Portage(++) under Adélie Linux.
+
+IUSE_IMPLICIT="prefix prefix-guest"
+USE_EXPAND_UNPREFIXED="ARCH"
+USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
+
+# Tier 1 and Tier 2 only, for now. Consult Platform Group before *ever* changing this.
+TIER1_ARCH="x86 x86_64 ppc ppc64 mips arm"
+TIER2_ARCH="alpha arm64 hppa ia64 sparc64"
+USE_EXPAND_VALUES_ARCH="${TIER1_ARCH} ${TIER2_ARCH}"
+
+# We only support these libcs right now.
+USE_EXPAND_VALUES_ELIBC="glibc musl"
+
+# XXX Someday fix it to know that busybox != GNU
+USE_EXPAND_VALUES_KERNEL="linux"
+USE_EXPAND_VALUES_USERLAND="GNU"
+
+# and set the defaults (can be overridden in other profiles)
+ELIBC="musl"
+KERNEL="linux"
+USERLAND="GNU"
+
+# lightly copied from gentoo/profiles/base/make.defaults, edited to fit
+USE_EXPAND="ABI_MIPS ABI_PPC ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_X86 CROSSCOMPILE_OPTS CURL_SSL DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS ROS_MESSAGES"
+
+# we do not hide CROSSCOMPILE_OPTS or ELIBC from the user.
+USE_EXPAND_HIDDEN="USERLAND KERNEL ABI_MIPS ABI_PPC ABI_X86 CPU_FLAGS_X86"
+
+CONFIG_PROTECT="/etc"
+CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
+
+# again, useful from gentoo/profiles/base/make.defaults
+PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
+
+# we attempt to be python3-clean in the base system profile.
+PYTHON_TARGETS="python3_5"
+PYTHON_SINGLE_TARGET="python3_5"
+
+# These USE will be forced onto every system running Adélie. DO NOT MODIFY THIS LIGHTLY!
+USE="cxx modules xattr"
diff --git a/profiles/base/packages b/profiles/base/packages
new file mode 100644
index 000000000..3babb6af9
--- /dev/null
+++ b/profiles/base/packages
@@ -0,0 +1,19 @@
+# Welcome to Adélie Linux.
+#
+# This is the base system profile package list. It is used by Portage to
+# determine @system for *every* architecture.
+#
+# Therefore, it must be very lightweight and compatible with every arch.
+
+# Also note that Portage requires * before each package name used for the
+# system set.
+
+
+
+# This is satisfied by apk-tools *or* Portage++ on Adélie.
+*virtual/package-manager
+
+# This is required to use a Unix computer at all ;)
+*app-shells/zsh
+*virtual/libc
+*virtual/shadow
diff --git a/profiles/categories b/profiles/categories
new file mode 100644
index 000000000..87d68ddeb
--- /dev/null
+++ b/profiles/categories
@@ -0,0 +1,3 @@
+dev-libs
+sys-apps
+virtual
diff --git a/profiles/eapi b/profiles/eapi
new file mode 100644
index 000000000..7ed6ff82d
--- /dev/null
+++ b/profiles/eapi
@@ -0,0 +1 @@
+5
diff --git a/profiles/package.provided b/profiles/package.provided
new file mode 100644
index 000000000..24aead45b
--- /dev/null
+++ b/profiles/package.provided
@@ -0,0 +1 @@
+dev-libs/openssl-1.0.2e:0
diff --git a/profiles/profiles.desc b/profiles/profiles.desc
new file mode 100644
index 000000000..118bcfce5
--- /dev/null
+++ b/profiles/profiles.desc
@@ -0,0 +1,46 @@
+# Welcome to Adélie Linux.
+# This file is a mapping of each profile available for each architecture and
+# its current stability.
+
+# All Tier 2 architectures are experimental, and have base profiles only.
+alpha adelie/1.0/alpha exp
+arm64 adelie/1.0/arm64 exp
+hppa adelie/1.0/hppa exp
+ppc adelie/1.0/ppc/cell exp
+sparc64 adelie/1.0/sparc64 exp
+
+# Supported profiles for ARM
+arm adelie/1.0/arm stable
+arm adelie/1.0/arm/s6 exp
+arm adelie/1.0/arm/systemd exp
+
+# Supported profiles for MIPS
+mips adelie/1.0/mips stable
+mips adelie/1.0/mips/s6 exp
+mips adelie/1.0/mips/systemd exp
+
+# Supported profiles for PowerPC (32-bit)
+ppc adelie/1.0/ppc stable
+#ppc adelie/1.0/ppc/g3 stable
+#ppc adelie/1.0/ppc/g4 stable
+ppc adelie/1.0/ppc/s6 exp
+#ppc adelie/1.0/ppc/g3/s6 exp
+#ppc adelie/1.0/ppc/g4/s6 exp
+ppc adelie/1.0/ppc/systemd exp
+#ppc adelie/1.0/ppc/g3/systemd exp
+#ppc adelie/1.0/ppc/g4/systemd exp
+
+# Supported profiles for PowerPC (64-bit)
+ppc64 adelie/1.0/ppc64 stable
+ppc64 adelie/1.0/ppc64/s6 exp
+ppc64 adelie/1.0/ppc64/systemd exp
+
+# Supported profiles for x86 (32-bit)
+x86 adelie/1.0/x86 stable
+x86 adelie/1.0/x86/s6 exp
+x86 adelie/1.0/x86/systemd exp
+
+# Supported profiles for x86 (64-bit)
+x86_64 adelie/1.0/x86_64 stable
+x86_64 adelie/1.0/x86_64/s6 exp
+x86_64 adelie/1.0/x86_64/systemd exp
diff --git a/profiles/repo_name b/profiles/repo_name
new file mode 100644
index 000000000..81f396d7e
--- /dev/null
+++ b/profiles/repo_name
@@ -0,0 +1 @@
+adelie
diff --git a/profiles/use.desc b/profiles/use.desc
new file mode 100644
index 000000000..f52f29f49
--- /dev/null
+++ b/profiles/use.desc
@@ -0,0 +1,5 @@
+ipv6 - Enable IPv6 support
+lua - Enable bindings to the Lua programming langauge
+ssl - Enable TLS support
+static - Link statically instead of dynamically when possible
+static-libs - Build static libraries in addition to dynamic ones
diff --git a/sys-apps/apk-tools/Manifest b/sys-apps/apk-tools/Manifest
new file mode 100644
index 000000000..2bcfdda7c
--- /dev/null
+++ b/sys-apps/apk-tools/Manifest
@@ -0,0 +1,4 @@
+AUX apk-tools-2.6.4-glibc-add-missing-headers.patch 250 SHA256 568eecdf3d4e7fb7e7dff6e0ca6c4c56b7ed1939fc159228805e964b268e55ca SHA512 b0172ece44815a4b89075f95b2b83ce47200536592d7a863732388de8b73b151d15d99a9875a9c74a3ea975e2bfde020e0bcf15c6103586d40569d9b7525c042 WHIRLPOOL a24ee803522aedd5bbab7ef696740a1d4f9bf9d3b7ddd3130cbc128ba688a30f4e5251044c3806af7fdba229ea75bba3dfd918597a518db576720927c085ab7f
+DIST apk-tools-2.6.4.tar.bz2 81902 SHA256 0f52b96c5b8b5ad6f710610d8f21dcfb275795e1f282418a6f9953c02f41312e SHA512 efff745ae625aae7bec0c4f45c877e9f1e12860324a492d950358ba0ecb07ca13c8c963a078118692e7edc3a19053fee307bcfd0a730f7ed6e497c2dc7df16d6 WHIRLPOOL 5a879dd63f7da34c5ed687d20fba7e3873d7bed51a5c27f4144becc5b6ba8c7f15edc189b55ddec7449f075203043ef6b10e5293573918e9bc938d4fd4b0fa1c
+EBUILD apk-tools-2.6.4.ebuild 1101 SHA256 864ec9eaaafb135ad9696a772cbd6d797094434be2679d9a813b370f5a5b78f2 SHA512 332f8754006a90602e0bf4b9b176c063b0729c56fb2873e9ab1ec5cc83cd32ebc7819745758d1ff9d67ea2a9985b1f94618bb8c62801e8c334b0008be76beba8 WHIRLPOOL bb5fb68a50da6ca651bc5b44b7e42ed0e4c3d1ba95461287fb2a17203f768df54ae99490c9e09eeffade609c66e663bcdd22628ed14fb4cdf4f6c94608e8f03b
+MISC metadata.xml 279 SHA256 39f4ad67c5455abfea7aa3bd906e40b688d5203f9dacd375c1a146d0a1fece2d SHA512 790fd7853b501b8076829d15b88ef130416252732db389109c1497266699f3224d394b1c91d90cd76481e36ee79d8444571878cc76ccef4c82328d54b5dd0c26 WHIRLPOOL 9474d591fde0aeba07b3011fe6241bc13b5c5d67a2f142ffdf9823dc12d47e7144e1e3b297e4d0baa2710a33a7ccddfa666f563c8f35c9053db83ae84140847a
diff --git a/sys-apps/apk-tools/apk-tools-2.6.4.ebuild b/sys-apps/apk-tools/apk-tools-2.6.4.ebuild
new file mode 100644
index 000000000..4c9249c76
--- /dev/null
+++ b/sys-apps/apk-tools/apk-tools-2.6.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2015-2016 Adélie Linux Team
+# Distributed under the terms of the NCSA License
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="The Alpine Linux Package Keeper (APK)"
+HOMEPAGE="http://alpinelinux.org/"
+SRC_URI="http://git.alpinelinux.org/cgit/apk-tools/snapshot/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="arm mips ppc x86 x86_64 ~alpha ~arm64 ~hppa ~ppc64 ~sparc64"
+IUSE="static" # lua
+
+DEPEND="dev-libs/libfetch[ssl]"
+RDEPEND="${DEPEND}
+ >=dev-libs/openssl-1.0.1p
+ static? ( >=dev-libs/openssl-1.0.1p[static-libs] )
+ sys-libs/zlib
+ static? ( sys-libs/zlib[static-libs] )
+"
+# lua? ( dev-lang/lua:5.2 )
+
+EPATCH_SOURCE=( "${FILESDIR}"/${P}-glibc-add-missing-headers.patch )
+
+src_prepare() {
+ epatch
+ epatch_user
+}
+
+src_configure() {
+ if ! use lua; then
+ echo 'LUAAPK=' >> "${S}"/config.mk
+ echo 'export LUAAPK' >> "${S}"/config.mk
+ fi
+}
+
+src_compile () {
+ export CFLAGS=-Wno-error=unused-result
+ emake
+ use static && emake static
+}
+
+pkg_preinst () {
+ mkdir -p "${D}"/usr/sbin
+ mv "${D}"/sbin/apk "${D}"/usr/sbin/apk
+ use static && "${D}"/sbin/apk.static "${D}"/usr/sbin/apk.static
+ rmdir "${D}"/sbin
+}
diff --git a/sys-apps/apk-tools/files/apk-tools-2.6.4-glibc-add-missing-headers.patch b/sys-apps/apk-tools/files/apk-tools-2.6.4-glibc-add-missing-headers.patch
new file mode 100644
index 000000000..f299e9ac9
--- /dev/null
+++ b/sys-apps/apk-tools/files/apk-tools-2.6.4-glibc-add-missing-headers.patch
@@ -0,0 +1,12 @@
+diff --git a/src/blob.c b/src/blob.c
+index 07ea6f3..9147afa 100644
+--- a/src/blob.c
++++ b/src/blob.c
+@@ -12,6 +12,7 @@
+ #include <malloc.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <stdint.h>
+
+ #include "apk_blob.h"
+ #include "apk_hash.h"
diff --git a/sys-apps/apk-tools/metadata.xml b/sys-apps/apk-tools/metadata.xml
new file mode 100644
index 000000000..9b51b7056
--- /dev/null
+++ b/sys-apps/apk-tools/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ APK is the Alpine Package Keeper, the package manager for AlpineLinux and Adélie Linux.
+ </longdescription>
+</pkgmetadata>
diff --git a/virtual/package-manager/metadata.xml b/virtual/package-manager/metadata.xml
new file mode 100644
index 000000000..097975e3a
--- /dev/null
+++ b/virtual/package-manager/metadata.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+</pkgmetadata>
diff --git a/virtual/package-manager/package-manager-0.ebuild b/virtual/package-manager/package-manager-0.ebuild
new file mode 100644
index 000000000..48a060cb6
--- /dev/null
+++ b/virtual/package-manager/package-manager-0.ebuild
@@ -0,0 +1,15 @@
+# Copyright 2015-2016 Adélie Linux Team
+# Distributed under the terms of the NCSA license
+
+EAPI=5
+
+DESCRIPTION="Ensures a package manager is installed on the computer"
+
+SLOT="0"
+KEYWORDS="alpha arm arm64 hppa mips ppc ppc64 sparc64 x86 x86_64"
+
+RDEPEND="|| (
+ sys-apps/apk-tools
+ sys-apps/portage
+ sys-apps/portage++
+)"