sci-biology/structure - 2.3.4 (mva)

Search

Install

Install this version:

emerge -a =sci-biology/structure-2.3.4

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sci-biology/structure-2.3.4

Or alternatively:

emerge --autounmask-write -a =sci-biology/structure-2.3.4

Package Information

Description:
Package for using multi-locus genotype data to investigate population structure
Homepage:
https://web.stanford.edu/group/pritchardlab/structure.html
License:
GPL-2

Ebuild Details

Version EAPI Keywords Slot
2.3.4 8 ~amd64 ~x86 0
View Raw Ebuild
# Copyright 2026 mva
# Distributed under the terms of the Public Domain or CC0 License

EAPI=8

DESCRIPTION="Package for using multi-locus genotype data to investigate population structure"
HOMEPAGE="https://web.stanford.edu/group/pritchardlab/structure.html"
BASE="https://web.stanford.edu/group/pritchardlab/${PN}_software/release_versions/v${PV}/${PN}"
SRC_URI="
	${BASE}_kernel_source.tar.gz -> ${PN}_kernel_source-${PV}.tar.gz
	java? ( ${BASE}_frontend_source.tar.gz -> ${PN}_frontend_source-${PV}.tar.gz )
	doc? (  ${BASE}_doc.pdf -> ${PN}_doc-${PV}.pdf )
"

S="${WORKDIR}/structure_kernel_src"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="java doc"
RESTRICT="mirror"

RDEPEND="java? ( virtual/jre )"

src_unpack() {
	# Ignore PDF file in archive list
	unpack ${A/${PN}_doc-${PV}.pdf/}
}

src_prepare() {
	# Fix Makefile to respect env variables
	sed -i \
		-e 's/$(OPT) //g' \
		-e 's/CC =/CC ?=/' \
		-e 's/= -Wall/+=/' \
		Makefile
	default
}

src_install() {
	# There's no install target, but only one executable, so...
	dobin structure

	# Install default parameter files under /usr/share/
	insinto /usr/share/${P}
	doins mainparams extraparams

	# Install docs
	use doc && dodoc "${DISTDIR}/structure_doc.pdf"

	einfo "Structure expects files mainparams and extraparams to be in the cwd at runtime."
	einfo "Defaults of these files are located under /usr/share/${P} and are a"
	einfo "good place to start."
}

# To do: Write the +java frontend portion (wow, that's alot of files)
#	- The only necessary file is Structure.jar (!) which can be put under /usr/share/structure/*
# See the binary release for a better idea of what files are necessary & how to install them.

# A simple man page might be nice, certainly easier to read than the rather obtuse pdf docs.

USE Flags

Manage flags for this package: euse -i <flag> -p sci-biology/structure | euse -E <flag> -p sci-biology/structure | euse -D <flag> -p sci-biology/structure

Global/Standard Flags

doc

Dependencies

RDEPEND

java? ( virtual/jre )

Manifest for 2.3.4

Type File Size Source URLs
DIST structure_doc-2.3.4.pdf 809401 bytes https://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_doc.pdf
DIST structure_frontend_source-2.3.4.tar.gz 2645914 bytes https://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_frontend_source.tar.gz
DIST structure_kernel_source-2.3.4.tar.gz 66735 bytes https://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_kernel_source.tar.gz