parent
4e61e24daa
commit
9adb9cc554
Binary file not shown.
Binary file not shown.
@ -0,0 +1,147 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
USE_RUBY="ruby22 ruby23 ruby24"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC="doc:all"
|
||||
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="locales"
|
||||
|
||||
inherit eutils user ruby-fakegem versionator
|
||||
|
||||
DESCRIPTION="A system automation and configuration management software."
|
||||
HOMEPAGE="http://puppetlabs.com/"
|
||||
SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
|
||||
IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax"
|
||||
RESTRICT="test"
|
||||
|
||||
ruby_add_rdepend "
|
||||
dev-ruby/hiera
|
||||
dev-ruby/json:=
|
||||
>=dev-ruby/facter-3.0.0
|
||||
augeas? ( dev-ruby/ruby-augeas )
|
||||
diff? ( dev-ruby/diff-lcs )
|
||||
doc? ( dev-ruby/rdoc )
|
||||
ldap? ( dev-ruby/ruby-ldap )
|
||||
shadow? ( dev-ruby/ruby-shadow )
|
||||
sqlite? ( dev-ruby/sqlite3 )
|
||||
virtual/ruby-ssl
|
||||
dev-ruby/hocon"
|
||||
|
||||
ruby_add_bdepend "
|
||||
doc? ( dev-ruby/yard )
|
||||
test? (
|
||||
dev-ruby/mocha
|
||||
dev-ruby/rack
|
||||
dev-ruby/rspec-its
|
||||
)"
|
||||
# this should go in the above lists, but isn't because of test deps not being keyworded
|
||||
# dev-ruby/rspec-collection_matchers
|
||||
|
||||
RDEPEND+=" ${RDEPEND}
|
||||
rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
|
||||
selinux? (
|
||||
sys-libs/libselinux[ruby]
|
||||
sec-policy/selinux-puppet
|
||||
)
|
||||
vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
|
||||
>=app-portage/eix-0.18.0"
|
||||
PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup puppet
|
||||
enewuser puppet -1 -1 /var/lib/puppet puppet
|
||||
}
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid spec that require unpackaged json-schema.
|
||||
rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
|
||||
|
||||
# can't be run within portage.
|
||||
epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
|
||||
|
||||
# fix systemd path
|
||||
epatch "${FILESDIR}/puppet-systemd.patch"
|
||||
|
||||
# backport upstream fix for ruby 2.3.6 compatibility
|
||||
epatch "${FILESDIR}/puppet-4-webrick-ruby.patch"
|
||||
|
||||
# Avoid specs that can only run in the puppet.git repository. This
|
||||
# should be narrowed down to the specific specs.
|
||||
rm spec/integration/parser/compiler_spec.rb || die
|
||||
|
||||
# Avoid failing spec that need further investigation.
|
||||
rm spec/unit/module_tool/metadata_spec.rb || die
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
each_fakegem_install
|
||||
# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
all_fakegem_install
|
||||
|
||||
# systemd stuffs
|
||||
insinto /usr/lib/systemd/system
|
||||
doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
|
||||
|
||||
# tmpfiles stuff
|
||||
insinto /usr/lib/tmpfiles.d
|
||||
newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
|
||||
|
||||
# openrc init stuff
|
||||
newinitd "${FILESDIR}"/puppet.init-4.x puppet
|
||||
newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
|
||||
newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
|
||||
|
||||
keepdir /etc/puppetlabs/puppet/ssl
|
||||
|
||||
keepdir /var/lib/puppet/facts
|
||||
keepdir /var/lib/puppet/files
|
||||
fowners -R puppet:puppet /var/lib/puppet
|
||||
|
||||
fperms 0750 /var/lib/puppet
|
||||
|
||||
fperms 0750 /etc/puppetlabs
|
||||
fperms 0750 /etc/puppetlabs/puppet
|
||||
fperms 0750 /etc/puppetlabs/puppet/ssl
|
||||
fowners -R :puppet /etc/puppetlabs
|
||||
fowners -R :puppet /var/lib/puppet
|
||||
|
||||
if use ldap ; then
|
||||
insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
|
||||
fi
|
||||
|
||||
# ext and examples files
|
||||
for f in $(find ext examples -type f) ; do
|
||||
docinto "$(dirname ${f})"; dodoc "${f}"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
|
||||
elog "cause puppet to hang while installing packages."
|
||||
elog
|
||||
elog "Portage Puppet module with Gentoo-specific resources:"
|
||||
elog "http://forge.puppetlabs.com/gentoo/portage"
|
||||
elog
|
||||
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if [ "$(get_major_version $v)" = "4" ]; then
|
||||
elog
|
||||
elog "Please see the following url for the release notes for puppet-5"
|
||||
elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x"
|
||||
elog
|
||||
fi
|
||||
done
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,245 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
#PATCHSET=1
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib versionator
|
||||
|
||||
MY_P="${PN}-$(get_version_component_range 1-3)"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
SLOT=$(get_version_component_range 1-2)
|
||||
MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
|
||||
RUBYVERSION=2.2.0
|
||||
|
||||
if [[ -n ${PATCHSET} ]]; then
|
||||
if [[ ${PVR} == ${PV} ]]; then
|
||||
PATCHSET="${PV}-r0.${PATCHSET}"
|
||||
else
|
||||
PATCHSET="${PVR}.${PATCHSET}"
|
||||
fi
|
||||
else
|
||||
PATCHSET="${PVR}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="An object-oriented scripting language"
|
||||
HOMEPAGE="http://www.ruby-lang.org/"
|
||||
SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
|
||||
|
||||
LICENSE="|| ( Ruby-BSD BSD-2 )"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
|
||||
IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
|
||||
|
||||
RDEPEND="
|
||||
berkdb? ( sys-libs/db:= )
|
||||
gdbm? ( sys-libs/gdbm )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl )
|
||||
)
|
||||
socks5? ( >=net-proxy/dante-1.1.13 )
|
||||
tk? (
|
||||
dev-lang/tcl:0=[threads]
|
||||
dev-lang/tk:0=[threads]
|
||||
)
|
||||
ncurses? ( sys-libs/ncurses:0= )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
dev-libs/libyaml
|
||||
virtual/libffi
|
||||
sys-libs/zlib
|
||||
>=app-eselect/eselect-ruby-20141227
|
||||
!<dev-ruby/rdoc-3.9.4
|
||||
!<dev-ruby/rubygems-1.8.10-r1"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BUNDLED_GEMS="
|
||||
>=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
|
||||
>=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
|
||||
>=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
|
||||
"
|
||||
|
||||
PDEPEND="
|
||||
${BUNDLED_GEMS}
|
||||
virtual/rubygems[ruby_targets_ruby22]
|
||||
>=dev-ruby/json-1.8.1[ruby_targets_ruby22]
|
||||
>=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
|
||||
rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
|
||||
xemacs? ( app-xemacs/ruby-modes )"
|
||||
|
||||
src_prepare() {
|
||||
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
|
||||
epatch "${WORKDIR}/patches"
|
||||
|
||||
# We can no longer unbundle all of rake because rubygems now depends
|
||||
# on this. We leave the actual rake code around to bootstrap
|
||||
# rubygems, but remove the bits that would cause a file collision.
|
||||
einfo "Unbundling gems..."
|
||||
cd "$S"
|
||||
rm -rf \
|
||||
{bin,lib}/rake lib/rake.rb man/rake.1 \
|
||||
bin/gem || die "removal failed"
|
||||
# Remove bundled gems that we will install via PDEPEND, bug
|
||||
# 539700. Use explicit version numbers to ensure rm fails when they
|
||||
# change so we can update dependencies accordingly.
|
||||
rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
|
||||
|
||||
# Fix a hardcoded lib path in configure script
|
||||
sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
|
||||
configure.in || die "sed failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local modules= myconf=
|
||||
|
||||
# -fomit-frame-pointer makes ruby segfault, see bug #150413.
|
||||
filter-flags -fomit-frame-pointer
|
||||
# In many places aliasing rules are broken; play it safe
|
||||
# as it's risky with newer compilers to leave it as it is.
|
||||
append-flags -fno-strict-aliasing
|
||||
# SuperH needs this
|
||||
use sh && append-flags -mieee
|
||||
|
||||
# Socks support via dante
|
||||
if use socks5 ; then
|
||||
# Socks support can't be disabled as long as SOCKS_SERVER is
|
||||
# set and socks library is present, so need to unset
|
||||
# SOCKS_SERVER in that case.
|
||||
unset SOCKS_SERVER
|
||||
fi
|
||||
|
||||
# Increase GC_MALLOC_LIMIT if set (default is 8000000)
|
||||
if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
|
||||
append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
|
||||
fi
|
||||
|
||||
# ipv6 hack, bug 168939. Needs --enable-ipv6.
|
||||
use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
|
||||
|
||||
# Determine which modules *not* to build depending in the USE flags.
|
||||
if ! use readline ; then
|
||||
modules="${modules},readline"
|
||||
fi
|
||||
if ! use berkdb ; then
|
||||
modules="${modules},dbm"
|
||||
fi
|
||||
if ! use gdbm ; then
|
||||
modules="${modules},gdbm"
|
||||
fi
|
||||
if ! use ssl ; then
|
||||
modules="${modules},openssl"
|
||||
fi
|
||||
if ! use ncurses ; then
|
||||
modules="${modules},curses"
|
||||
fi
|
||||
if ! use tk ; then
|
||||
modules="${modules},tk"
|
||||
fi
|
||||
|
||||
# Provide an empty LIBPATHENV because we disable rpath but we do not
|
||||
# need LD_LIBRARY_PATH by default since that breaks USE=multitarget
|
||||
# #564272
|
||||
INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
|
||||
--program-suffix=${MY_SUFFIX} \
|
||||
--with-soname=ruby${MY_SUFFIX} \
|
||||
--docdir=${EPREFIX}/usr/share/doc/${P} \
|
||||
--enable-shared \
|
||||
--enable-pthread \
|
||||
--disable-rpath \
|
||||
--with-out-ext="${modules}" \
|
||||
$(use_with jemalloc jemalloc) \
|
||||
$(use_enable socks5 socks) \
|
||||
$(use_enable doc install-doc) \
|
||||
--enable-ipv6 \
|
||||
$(use_enable debug) \
|
||||
${myconf} \
|
||||
--enable-option-checking=no \
|
||||
|| die "econf failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 V=1 test || die "make test failed"
|
||||
|
||||
elog "Ruby's make test has been run. Ruby also ships with a make check"
|
||||
elog "that cannot be run until after ruby has been installed."
|
||||
elog
|
||||
if use rubytests; then
|
||||
elog "You have enabled rubytests, so they will be installed to"
|
||||
elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
|
||||
elog "than root, and you must place them into a writeable directory."
|
||||
elog "Then call: "
|
||||
elog
|
||||
elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
|
||||
else
|
||||
elog "Enable the rubytests USE flag to install the make check tests"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Remove the remaining bundled gems. We do this late in the process
|
||||
# since they are used during the build to e.g. create the
|
||||
# documentation.
|
||||
rm -rf ext/json || die
|
||||
|
||||
# Ruby is involved in the install process, we don't want interference here.
|
||||
unset RUBYOPT
|
||||
|
||||
local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
|
||||
|
||||
LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
|
||||
for d in $(find "${S}/ext" -type d) ; do
|
||||
RUBYLIB="${RUBYLIB}:$d"
|
||||
done
|
||||
export LD_LIBRARY_PATH RUBYLIB
|
||||
|
||||
emake V=1 DESTDIR="${D}" install || die "make install failed"
|
||||
|
||||
# Remove installed rubygems copy
|
||||
rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
|
||||
rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
|
||||
rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
|
||||
|
||||
if use doc; then
|
||||
make DESTDIR="${D}" install-doc || die "make install-doc failed"
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r sample
|
||||
fi
|
||||
|
||||
dodoc ChangeLog NEWS doc/NEWS* README* || die
|
||||
|
||||
if use rubytests; then
|
||||
pushd test
|
||||
insinto /usr/share/${PN}-${SLOT}/test
|
||||
doins -r .
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
|
||||
eselect ruby set ruby${MY_SUFFIX}
|
||||
fi
|
||||
|
||||
elog
|
||||
elog "To switch between available Ruby profiles, execute as root:"
|
||||
elog "\teselect ruby set ruby(21|22|...)"
|
||||
elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect ruby cleanup
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
--- scala-2.12.4-orig/project/VersionUtil.scala 2017-10-11 09:05:11.000000000 +1100
|
||||
+++ scala-2.12.4/project/VersionUtil.scala 2018-01-29 15:58:57.205758665 +1100
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import sbt.{stringToProcess => _, _}
|
||||
import Keys._
|
||||
-import java.util.{Date, Locale, Properties, TimeZone}
|
||||
+import java.util.{Calendar, Date, Locale, Properties, TimeZone}
|
||||
import java.io.{File, FileInputStream}
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
@@ -65,18 +65,13 @@
|
||||
val log = sLog.value
|
||||
val (dateObj, sha) = {
|
||||
try {
|
||||
- // Use JGit to get the commit date and SHA
|
||||
- import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
||||
- import org.eclipse.jgit.revwalk.RevWalk
|
||||
- val db = new FileRepositoryBuilder().findGitDir.build
|
||||
- val head = db.resolve("HEAD")
|
||||
- if (head eq null) {
|
||||
- log.info("No git HEAD commit found -- Using current date and 'unknown' SHA")
|
||||
- (new Date, "unknown")
|
||||
- } else {
|
||||
- val commit = new RevWalk(db).parseCommit(head)
|
||||
- (new Date(commit.getCommitTime.toLong * 1000L), commit.getName.substring(0, 7))
|
||||
- }
|
||||
+ val commit = "c2a5883891a68180b143eb462c8b0cebc8d3b02"
|
||||
+ val cal = Calendar.getInstance();
|
||||
+ cal.set(Calendar.YEAR, 2017);
|
||||
+ cal.set(Calendar.MONTH, Calendar.OCTOBER);
|
||||
+ cal.set(Calendar.DAY_OF_MONTH, 11);
|
||||
+ val date = cal.getTime();
|
||||
+ (date, commit.substring(0, 7))
|
||||
} catch {
|
||||
case ex: Exception =>
|
||||
log.error("Could not determine commit date + SHA: " + ex)
|
@ -0,0 +1,214 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit eutils check-reqs java-pkg-2 versionator
|
||||
|
||||
SV="$(get_version_component_range 1-2)"
|
||||
|
||||
# Note: to bump scala, some things to try are:
|
||||
# 1. update all the sha1s in JURI
|
||||
# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.gz
|
||||
# and https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.gz from
|
||||
# SRC_URI
|
||||
# 3. try emerge scala. Check if it downloads more stuff in src_compile to
|
||||
# ${WORKDIR}/.ivy2 or ${WORKDIR}/.sbt or /root/.ivy2 or /root/.sbt
|
||||
# 4. tar up all the .ivy2 and .sbt junk into ${P}-ivy2-deps.tar.xz and
|
||||
# ${P}-sbt-deps.tar.xz and add them to SRC_URI:
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
|
||||
|
||||
# creating the binary:
|
||||
# FEATURES="noclean -test" USE="doc source" emerge dev-lang/scala
|
||||
# cd $WORDKIR
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz .ivy2/local \
|
||||
# ${P}/build/pack/bin ${P}/build/quick/classes/scala-dist/man/man1 \
|
||||
# ${P}/src/library ${P}/src/library-aux ${P}/src/reflect ${P}/doc/README \
|
||||
# ${P}/build/scaladoc
|
||||
|
||||
# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
|
||||
# to search for .desired.sha1 files, which contain sha1 hashes that are appended
|
||||
# to ${BURI} along with the subdirectory and filename to form the list of jar files
|
||||
# listed in SRC_URI. The output of this find command can be hacked into the desired format:
|
||||
# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
|
||||
# After editing it into the desired format: sort -t / -k 3 file
|
||||
|
||||
BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
|
||||
|
||||
declare -a JURI=(
|
||||
"${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
|
||||
"${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
|
||||
"${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
|
||||
"${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
|
||||
"${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
|
||||
"${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
|
||||
"${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
|
||||
"${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
|
||||
"${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
|
||||
"${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
|
||||
"${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
|
||||
"${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
|
||||
"${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
|
||||
"${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
|
||||
)
|
||||
|
||||
DESCRIPTION="The Scala Programming Language"
|
||||
HOMEPAGE="http://www.scala-lang.org/"
|
||||
SRC_URI="
|
||||
!binary? (
|
||||
https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
|
||||
https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
|
||||
${JURI[@]} )
|
||||
binary? (
|
||||
https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )"
|
||||
LICENSE="BSD"
|
||||
SLOT="${SV}/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
|
||||
|
||||
IUSE="binary emacs"
|
||||
|
||||
COMMON_DEP="dev-java/ant-core:0
|
||||
dev-java/jline:2"
|
||||
|
||||
DEPEND="${COMMON_DEP}
|
||||
!binary? (
|
||||
=virtual/jdk-1.8*
|
||||
>=dev-java/sbt-0.13.13
|
||||
media-gfx/graphviz
|
||||
)
|
||||
binary? (
|
||||
>=virtual/jdk-1.8
|
||||
)
|
||||
app-arch/xz-utils:0"
|
||||
|
||||
RDEPEND="${COMMON_DEP}
|
||||
>=virtual/jre-1.8
|
||||
app-eselect/eselect-scala
|
||||
!dev-lang/scala-bin:0"
|
||||
|
||||
PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
|
||||
|
||||
CHECKREQS_MEMORY="1536M"
|
||||
|
||||
pkg_setup() {
|
||||
java-pkg-2_pkg_setup
|
||||
|
||||
if ! use binary; then
|
||||
debug-print "Checking for sufficient physical RAM"
|
||||
|
||||
ewarn "This package can fail to build with memory allocation errors in some cases."
|
||||
ewarn "If you are unable to build from sources, please try USE=binary"
|
||||
ewarn "for this package. See bug #181390 for more information."
|
||||
|
||||
check-reqs_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Unpack tar files only.
|
||||
for f in ${A} ; do
|
||||
[[ ${f} == *".tar."* ]] && unpack ${f}
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
java-pkg_getjars ant-core,jline-2
|
||||
|
||||
if ! use binary; then
|
||||
local a
|
||||
for a in "${JURI[@]}"
|
||||
do
|
||||
echo "${a}"
|
||||
local g="${a/* -> /}"
|
||||
echo "${g}"
|
||||
local j="${a/ -> */}"
|
||||
echo "${j}"
|
||||
cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
|
||||
done
|
||||
|
||||
# gentoo patch (by gienah) to stop it calling git log in the build
|
||||
eapply "${FILESDIR}/${P}-no-git.patch"
|
||||
|
||||
local SBT_PVR="$(java-config --query=PVR --package=sbt)"
|
||||
sed -e "s@sbt.version=0.13.11@sbt.version=${SBT_PVR}@" \
|
||||
-i "${S}/project/build.properties" \
|
||||
|| die "Could not set sbt.version=${SBT_PVR} in project/build.properties"
|
||||
|
||||
cat <<- EOF > "${S}/sbt"
|
||||
#!/bin/bash
|
||||
gjl_package=sbt
|
||||
gjl_jar="sbt-launch.jar"
|
||||
gjl_java_args="-Dsbt.version=0.13.13 -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -Duser.home="${WORKDIR}""
|
||||
source /usr/share/java-config-2/launcher/launcher.bash
|
||||
EOF
|
||||
chmod u+x "${S}/sbt" || die
|
||||
|
||||
sed -e 's@-Xmx1024M@-Xmx1536M@' \
|
||||
-i "${S}/build.sbt" \
|
||||
|| die "Could not change increase memory size in ${S}/build.sbt"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
|
||||
export LANG="en_US.UTF-8"
|
||||
einfo "=== scala compile ..."
|
||||
"${S}"/sbt -Dsbt.log.noformat=true compile || die "sbt compile failed"
|
||||
einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
|
||||
"${S}"/sbt -Dsbt.log.noformat=true publishLocal \
|
||||
|| die "sbt publishLocal failed"
|
||||
else
|
||||
einfo "Skipping compilation, USE=binary is set."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! use binary; then
|
||||
"${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed"
|
||||
else
|
||||
einfo "Skipping tests, USE=binary is set."
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
pushd build/pack || die
|
||||
local SCALADIR="/usr/share/${PN}-${SV}"
|
||||
exeinto "${SCALADIR}/bin"
|
||||
doexe $(find bin/ -type f ! -iname '*.bat')
|
||||
dodir /usr/bin
|
||||
for b in $(find bin/ -type f ! -iname '*.bat'); do
|
||||
local _name=$(basename "${b}")
|
||||
dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
|
||||
done
|
||||
popd || die
|
||||
java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print)
|
||||
|
||||
pushd build/quick/classes/scala-dist/man/man1 || die
|
||||
for i in *.1; do
|
||||
newman "${i}" "${i/./-${SV}.}"
|
||||
done
|
||||
popd || die
|
||||
|
||||
#sources are .scala so no use for java-pkg_dosrc
|
||||
pushd src || die
|
||||
if use source; then
|
||||
dodir "${SCALADIR}/src"
|
||||
insinto "${SCALADIR}/src"
|
||||
doins -r library library-aux reflect
|
||||
fi
|
||||
popd || die
|
||||
|
||||
local DOCS=( "doc/README" )
|
||||
local HTML_DOCS=( "build/scaladoc" )
|
||||
einstalldocs
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,622 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @DEAD
|
||||
# Removal on 2018-02-01.
|
||||
#
|
||||
# DEPRECATED
|
||||
# This eclass has been superseded by xorg-2
|
||||
# Please modify your ebuilds to use that instead
|
||||
#
|
||||
# @ECLASS: x-modular.eclass
|
||||
# @MAINTAINER:
|
||||
# x11@gentoo.org
|
||||
# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
|
||||
# @DESCRIPTION:
|
||||
# This eclass makes trivial X ebuilds possible for apps, fonts, drivers,
|
||||
# and more. Many things that would normally be done in various functions
|
||||
# can be accessed by setting variables instead, such as patching,
|
||||
# running eautoreconf, passing options to configure and installing docs.
|
||||
#
|
||||
# All you need to do in a basic ebuild is inherit this eclass and set
|
||||
# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted
|
||||
# with the other X packages, you don't need to set SRC_URI. Pretty much
|
||||
# everything else should be automatic.
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
GIT_ECLASS="git"
|
||||
SNAPSHOT="yes"
|
||||
SRC_URI=""
|
||||
fi
|
||||
|
||||
# If we're a font package, but not the font.alias one
|
||||
FONT_ECLASS=""
|
||||
if [[ "${PN/#font-}" != "${PN}" ]] \
|
||||
&& [[ "${CATEGORY}" = "media-fonts" ]] \
|
||||
&& [[ "${PN}" != "font-alias" ]] \
|
||||
&& [[ "${PN}" != "font-util" ]]; then
|
||||
# Activate font code in the rest of the eclass
|
||||
FONT="yes"
|
||||
|
||||
# Whether to inherit the font eclass
|
||||
FONT_ECLASS="font"
|
||||
fi
|
||||
|
||||
inherit eutils libtool multilib toolchain-funcs flag-o-matic autotools \
|
||||
${FONT_ECLASS} ${GIT_ECLASS}
|
||||
|
||||
EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm"
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
0|1)
|
||||
;;
|
||||
2)
|
||||
EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure"
|
||||
;;
|
||||
*)
|
||||
die "Unknown EAPI ${EAPI}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# exports must be ALWAYS after inherit
|
||||
EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
|
||||
|
||||
# @ECLASS-VARIABLE: XDIR
|
||||
# @DESCRIPTION:
|
||||
# Directory prefix to use for everything. If you want to install to a
|
||||
# non-default prefix (e.g., /opt/xorg), change XDIR. This has not been
|
||||
# recently tested. You may need to uncomment the setting of datadir and
|
||||
# mandir in x-modular_src_install() or add it back in if it's no longer
|
||||
# there. You may also want to change the SLOT.
|
||||
XDIR="/usr"
|
||||
|
||||
IUSE=""
|
||||
HOMEPAGE="https://www.x.org/wiki/"
|
||||
|
||||
# @ECLASS-VARIABLE: SNAPSHOT
|
||||
# @DESCRIPTION:
|
||||
# If set to 'yes' and configure.ac exists, eautoreconf will run. Set
|
||||
# before inheriting this eclass.
|
||||
: ${SNAPSHOT:=no}
|
||||
|
||||
# Set up SRC_URI for individual modular releases
|
||||
BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"
|
||||
# @ECLASS-VARIABLE: MODULE
|
||||
# @DESCRIPTION:
|
||||
# The subdirectory to download source from. Possible settings are app,
|
||||
# doc, data, util, driver, font, lib, proto, xserver. Set above the
|
||||
# inherit to override the default autoconfigured module.
|
||||
if [[ -z ${MODULE} ]]; then
|
||||
case ${CATEGORY} in
|
||||
app-doc) MODULE="doc" ;;
|
||||
media-fonts) MODULE="font" ;;
|
||||
x11-apps|x11-wm) MODULE="app" ;;
|
||||
x11-misc|x11-themes) MODULE="util" ;;
|
||||
x11-drivers) MODULE="driver" ;;
|
||||
x11-base) MODULE="xserver" ;;
|
||||
x11-proto) MODULE="proto" ;;
|
||||
x11-libs) MODULE="lib" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ -n ${GIT_ECLASS} ]]; then
|
||||
EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/${MODULE}/${PN}.git"
|
||||
else
|
||||
SRC_URI="${SRC_URI} ${BASE_INDIVIDUAL_URI}/${MODULE}/${P}.tar.bz2"
|
||||
fi
|
||||
|
||||
SLOT="0"
|
||||
|
||||
# Set the license for the package. This can be overridden by setting
|
||||
# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
|
||||
# are under the MIT license. (This is what Red Hat does in their rpms)
|
||||
LICENSE="MIT"
|
||||
|
||||
# Set up shared dependencies
|
||||
if [[ -n "${SNAPSHOT}" ]]; then
|
||||
# FIXME: What's the minimal libtool version supporting arbitrary versioning?
|
||||
DEPEND="${DEPEND}
|
||||
>=sys-devel/libtool-1.5
|
||||
>=sys-devel/m4-1.4"
|
||||
WANT_AUTOCONF="latest"
|
||||
WANT_AUTOMAKE="latest"
|
||||
fi
|
||||
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
RDEPEND="${RDEPEND}
|
||||
media-fonts/encodings
|
||||
x11-apps/mkfontscale
|
||||
x11-apps/mkfontdir"
|
||||
PDEPEND="${PDEPEND}
|
||||
media-fonts/font-alias"
|
||||
|
||||
# Starting with 7.0RC3, we can specify the font directory
|
||||
# But oddly, we can't do the same for encodings or font-alias
|
||||
|
||||
# @ECLASS-VARIABLE: FONT_DIR
|
||||
# @DESCRIPTION:
|
||||
# If you're creating a font package and the suffix of PN is not equal to
|
||||
# the subdirectory of /usr/share/fonts/ it should install into, set
|
||||
# FONT_DIR to that directory or directories. Set before inheriting this
|
||||
# eclass.
|
||||
: ${FONT_DIR:=${PN##*-}}
|
||||
|
||||
# Fix case of font directories
|
||||
FONT_DIR=${FONT_DIR/ttf/TTF}
|
||||
FONT_DIR=${FONT_DIR/otf/OTF}
|
||||
FONT_DIR=${FONT_DIR/type1/Type1}
|
||||
FONT_DIR=${FONT_DIR/speedo/Speedo}
|
||||
|
||||
# Set up configure options, wrapped so ebuilds can override if need be
|
||||
if [[ -z ${FONT_OPTIONS} ]]; then
|
||||
FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\""
|
||||
fi
|
||||
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then
|
||||
IUSE="${IUSE} nls"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If we're a driver package
|
||||
if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then
|
||||
# Enable driver code in the rest of the eclass
|
||||
DRIVER="yes"
|
||||
fi
|
||||
|
||||
# Debugging -- ignore packages that can't be built with debugging
|
||||
if [[ -z "${FONT}" ]] \
|
||||
&& [[ "${CATEGORY/app-doc}" = "${CATEGORY}" ]] \
|
||||
&& [[ "${CATEGORY/x11-proto}" = "${CATEGORY}" ]] \
|
||||
&& [[ "${PN/util-macros}" = "${PN}" ]] \
|
||||
&& [[ "${PN/xbitmaps}" = "${PN}" ]] \
|
||||
&& [[ "${PN/xkbdata}" = "${PN}" ]] \
|
||||
&& [[ "${PN/xorg-cf-files}" = "${PN}" ]] \
|
||||
&& [[ "${PN/xcursor}" = "${PN}" ]] \
|
||||
; then
|
||||
DEBUGGABLE="yes"
|
||||
IUSE="${IUSE} debug"
|
||||
fi
|
||||
|
||||
DEPEND="${DEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
if [[ "${PN/util-macros}" = "${PN}" ]]; then
|
||||
DEPEND="${DEPEND}
|
||||
>=x11-misc/util-macros-1.3.0"
|
||||
fi
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
!<=x11-base/xorg-x11-6.9"
|
||||
# Provides virtual/x11 for temporary use until packages are ported
|
||||
# x11-base/x11-env"
|
||||
|
||||
# @FUNCTION: x-modular_specs_check
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Make any necessary changes related to gcc specs (generally hardened)
|
||||
x-modular_specs_check() {
|
||||
if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then
|
||||
append-ldflags -Wl,-z,lazy
|
||||
# (#116698) breaks loading
|
||||
filter-ldflags -Wl,-z,now
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_dri_check
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Ensures the server supports DRI if building a driver with DRI support
|
||||
x-modular_dri_check() {
|
||||
# (#120057) Enabling DRI in drivers requires that the server was built with
|
||||
# support for it
|
||||
# Starting with xorg-server 1.5.3, DRI support is always enabled unless
|
||||
# USE=minimal is set (see bug #252084)
|
||||
if [[ -n "${DRIVER}" ]]; then
|
||||
if has dri ${IUSE} && use dri; then
|
||||
einfo "Checking for direct rendering capabilities ..."
|
||||
if has_version '>=x11-base/xorg-server-1.5.3'; then
|
||||
if built_with_use x11-base/xorg-server minimal; then
|
||||
die "You must build x11-base/xorg-server with USE=-minimal."
|
||||
fi
|
||||
else
|
||||
if ! built_with_use x11-base/xorg-server dri; then
|
||||
die "You must build x11-base/xorg-server with USE=dri."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_server_supports_drivers_check
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Ensures the server SDK is installed if a driver is being built
|
||||
x-modular_server_supports_drivers_check() {
|
||||
# (#135873) Only certain servers will actually use or be capable of
|
||||
# building external drivers, including binary drivers.
|
||||
if [[ -n "${DRIVER}" ]]; then
|
||||
if has_version '>=x11-base/xorg-server-1.1'; then
|
||||
if ! built_with_use x11-base/xorg-server xorg; then
|
||||
eerror "x11-base/xorg-server is not built with support for external drivers."
|
||||
die "You must build x11-base/xorg-server with USE=xorg."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_unpack_source
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Simply unpack source code. Nothing else.
|
||||
x-modular_unpack_source() {
|
||||
if [[ -n ${GIT_ECLASS} ]]; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${A}
|
||||
fi
|
||||
cd "${S}"
|
||||
|
||||
if [[ -n ${FONT_OPTIONS} ]]; then
|
||||
einfo "Detected font directory: ${FONT_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_patch_source
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Apply all patches
|
||||
x-modular_patch_source() {
|
||||
# Use standardized names and locations with bulk patching
|
||||
# Patch directory is ${WORKDIR}/patch
|
||||
# See epatch() in eutils.eclass for more documentation
|
||||
if [[ -z "${EPATCH_SUFFIX}" ]] ; then
|
||||
EPATCH_SUFFIX="patch"
|
||||
fi
|
||||
|
||||
# @VARIABLE: PATCHES
|
||||
# @DESCRIPTION:
|
||||
# If you have any patches to apply, set PATCHES to their locations and epatch
|
||||
# will apply them. It also handles epatch-style bulk patches, if you know how to
|
||||
# use them and set the correct variables. If you don't, read eutils.eclass.
|
||||
if [[ ${#PATCHES[@]} -gt 1 ]]; then
|
||||
for x in "${PATCHES[@]}"; do
|
||||
epatch "${x}"
|
||||
done
|
||||
elif [[ -n "${PATCHES}" ]]; then
|
||||
for x in ${PATCHES}; do
|
||||
epatch "${x}"
|
||||
done
|
||||
# For non-default directory bulk patching
|
||||
elif [[ -n "${PATCH_LOC}" ]] ; then
|
||||
epatch ${PATCH_LOC}
|
||||
# For standard bulk patching
|
||||
elif [[ -d "${EPATCH_SOURCE}" ]] ; then
|
||||
epatch
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_reconf_source
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Run eautoreconf if necessary, and run elibtoolize.
|
||||
x-modular_reconf_source() {
|
||||
if [[ "${SNAPSHOT}" = "yes" ]]
|
||||
then
|
||||
# If possible, generate configure if it doesn't exist
|
||||
if [ -f "./configure.ac" ]
|
||||
then
|
||||
eautoreconf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Joshua Baergen - October 23, 2005
|
||||
# Fix shared lib issues on MIPS, FBSD, etc etc
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_prepare
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Prepare a package after unpacking, performing all X-related tasks.
|
||||
x-modular_src_prepare() {
|
||||
[[ -n ${GIT_ECLASS} ]] && has src_prepare ${EXPORTED_FUNCTIONS} \
|
||||
&& git_src_prepare
|
||||
x-modular_patch_source
|
||||
x-modular_reconf_source
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_unpack
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Unpack a package, performing all X-related tasks.
|
||||
x-modular_src_unpack() {
|
||||
x-modular_specs_check
|
||||
x-modular_server_supports_drivers_check
|
||||
x-modular_dri_check
|
||||
x-modular_unpack_source
|
||||
has src_prepare ${EXPORTED_FUNCTIONS} || x-modular_src_prepare
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_font_configure
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# If a font package, perform any necessary configuration steps
|
||||
x-modular_font_configure() {
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
# Might be worth adding an option to configure your desired font
|
||||
# and exclude all others. Also, should this USE be nls or minimal?
|
||||
if has nls ${IUSE//+} && ! use nls; then
|
||||
FONT_OPTIONS="${FONT_OPTIONS}
|
||||
--disable-iso8859-2
|
||||
--disable-iso8859-3
|
||||
--disable-iso8859-4
|
||||
--disable-iso8859-5
|
||||
--disable-iso8859-6
|
||||
--disable-iso8859-7
|
||||
--disable-iso8859-8
|
||||
--disable-iso8859-9
|
||||
--disable-iso8859-10
|
||||
--disable-iso8859-11
|
||||
--disable-iso8859-12
|
||||
--disable-iso8859-13
|
||||
--disable-iso8859-14
|
||||
--disable-iso8859-15
|
||||
--disable-iso8859-16
|
||||
--disable-jisx0201
|
||||
--disable-koi8-r"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_debug_setup
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Set up CFLAGS for a debug build
|
||||
x-modular_debug_setup() {
|
||||
if [[ -n "${DEBUGGABLE}" ]]; then
|
||||
if use debug; then
|
||||
strip-flags
|
||||
append-flags -g
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_configure
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Perform any necessary pre-configuration steps, then run configure
|
||||
x-modular_src_configure() {
|
||||
x-modular_font_configure
|
||||
x-modular_debug_setup
|
||||
|
||||
# @VARIABLE: CONFIGURE_OPTIONS
|
||||
# @DESCRIPTION:
|
||||
# Any extra options to pass to configure
|
||||
|
||||
# If prefix isn't set here, .pc files cause problems
|
||||
if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
|
||||
econf --prefix=${XDIR} \
|
||||
--datadir=${XDIR}/share \
|
||||
${FONT_OPTIONS} \
|
||||
${DRIVER_OPTIONS} \
|
||||
${CONFIGURE_OPTIONS}
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_make
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Run make.
|
||||
x-modular_src_make() {
|
||||
emake || die "emake failed"
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_compile
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Compile a package, performing all X-related tasks.
|
||||
x-modular_src_compile() {
|
||||
has src_configure ${EXPORTED_FUNCTIONS} || x-modular_src_configure
|
||||
x-modular_src_make
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_src_install
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Install a built package to ${D}, performing any necessary steps.
|
||||
# Creates a ChangeLog from git if using live ebuilds.
|
||||
x-modular_src_install() {
|
||||
# Install everything to ${XDIR}
|
||||
if [[ ${CATEGORY} = x11-proto ]]; then
|
||||
make \
|
||||
${PN/proto/}docdir=/usr/share/doc/${PF} \
|
||||
DESTDIR="${D}" \
|
||||
install \
|
||||
|| die
|
||||
else
|
||||
make \
|
||||
docdir=/usr/share/doc/${PF} \
|
||||
DESTDIR="${D}" \
|
||||
install \
|
||||
|| die
|
||||
fi
|
||||
# Shouldn't be necessary in XDIR=/usr
|
||||
# einstall forces datadir, so we need to re-force it
|
||||
# datadir=${XDIR}/share \
|
||||
# mandir=${XDIR}/share/man \
|
||||
|
||||
if [[ -n ${GIT_ECLASS} ]]; then
|
||||
pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
|
||||
git log ${GIT_TREE} > "${S}"/ChangeLog
|
||||
popd
|
||||
fi
|
||||
|
||||
if [[ -e ${S}/ChangeLog ]]; then
|
||||
dodoc "${S}"/ChangeLog
|
||||
fi
|
||||
# @VARIABLE: DOCS
|
||||
# @DESCRIPTION:
|
||||
# Any documentation to install via dodoc
|
||||
[[ -n ${DOCS} ]] && dodoc ${DOCS}
|
||||
|
||||
# Don't install libtool archives for server modules
|
||||
if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
|
||||
find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
|
||||
| xargs rm -f
|
||||
fi
|
||||
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
remove_font_metadata
|
||||
fi
|
||||
|
||||
if [[ -n "${DRIVER}" ]]; then
|
||||
install_driver_hwdata
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_pkg_preinst
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# This function doesn't do anything right now, but it may in the future.
|
||||
x-modular_pkg_preinst() {
|
||||
# We no longer do anything here, but we can't remove it from the API
|
||||
:
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_pkg_postinst
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Run X-specific post-installation tasks on the live filesystem. The
|
||||
# only task right now is some setup for font packages.
|
||||
x-modular_pkg_postinst() {
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
setup_fonts
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: x-modular_pkg_postrm
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Run X-specific post-removal tasks on the live filesystem. The only
|
||||
# task right now is some cleanup for font packages.
|
||||
x-modular_pkg_postrm() {
|
||||
if [[ -n "${FONT}" ]]; then
|
||||
font_pkg_postrm
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: setup_fonts
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Generates needed files for fonts and fixes font permissions
|
||||
setup_fonts() {
|
||||
if [[ ! -n "${FONT_DIR}" ]]; then
|
||||
msg="FONT_DIR is empty. The ebuild should set it to at least one subdir of /usr/share/fonts."
|
||||
eerror "${msg}"
|
||||
die "${msg}"
|
||||
fi
|
||||
|
||||
create_fonts_scale
|
||||
create_fonts_dir
|
||||
create_font_cache
|
||||
}
|
||||
|
||||
# @FUNCTION: remove_font_metadata
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Don't let the package install generated font files that may overlap
|
||||
# with other packages. Instead, they're generated in pkg_postinst().
|
||||
remove_font_metadata() {
|
||||
local DIR
|
||||
for DIR in ${FONT_DIR}; do
|
||||
if [[ "${DIR}" != "Speedo" ]] && \
|
||||
[[ "${DIR}" != "CID" ]] ; then
|
||||
# Delete font metadata files
|
||||
# fonts.scale, fonts.dir, fonts.cache-1
|
||||
rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: install_driver_hwdata
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Installs device-to-driver mappings for system-config-display and
|
||||
# anything else that uses hwdata.
|
||||
install_driver_hwdata() {
|
||||
insinto /usr/share/hwdata/videoaliases
|
||||
for i in "${FILESDIR}"/*.xinf; do
|
||||
# We need this for the case when none exist,
|
||||
# so *.xinf doesn't expand
|
||||
if [[ -e $i ]]; then
|
||||
doins $i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# @FUNCTION: discover_font_dirs
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Deprecated. Sets up the now-unused FONT_DIRS variable.
|
||||
discover_font_dirs() {
|
||||
FONT_DIRS="${FONT_DIR}"
|
||||
}
|
||||
|
||||
# @FUNCTION: create_fonts_scale
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Create fonts.scale file, used by the old server-side fonts subsystem.
|
||||
create_fonts_scale() {
|
||||
ebegin "Creating fonts.scale files"
|
||||
local x
|
||||
for DIR in ${FONT_DIR}; do
|
||||
x=${ROOT}/usr/share/fonts/${DIR}
|
||||
[[ -z "$(ls ${x}/)" ]] && continue
|
||||
[[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
|
||||
|
||||
# Only generate .scale files if truetype, opentype or type1
|
||||
# fonts are present ...
|
||||
|
||||
# NOTE: There is no way to regenerate Speedo/CID fonts.scale
|
||||
# <dberkholz@gentoo.org> 2 August 2004
|
||||
if [[ "${x/encodings}" = "${x}" ]] \
|
||||
&& [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
|
||||
mkfontscale \
|
||||
-a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
|
||||
-- ${x}
|
||||
fi
|
||||
done
|
||||
eend 0
|
||||
}
|
||||
|
||||
# @FUNCTION: create_fonts_dir
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Create fonts.dir file, used by the old server-side fonts subsystem.
|
||||
create_fonts_dir() {
|
||||
ebegin "Generating fonts.dir files"
|
||||
for DIR in ${FONT_DIR}; do
|
||||
x=${ROOT}/usr/share/fonts/${DIR}
|
||||
[[ -z "$(ls ${x}/)" ]] && continue
|
||||
[[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
|
||||
|
||||
if [[ "${x/encodings}" = "${x}" ]]; then
|
||||
mkfontdir \
|
||||
-e "${ROOT}"/usr/share/fonts/encodings \
|
||||
-e "${ROOT}"/usr/share/fonts/encodings/large \
|
||||
-- ${x}
|
||||
fi
|
||||
done
|
||||
eend 0
|
||||
}
|
||||
|
||||
# @FUNCTION: create_font_cache
|
||||
# @USAGE:
|
||||
# @DESCRIPTION:
|
||||
# Create fonts.cache-1 files, used by the new client-side fonts
|
||||
# subsystem.
|
||||
create_font_cache() {
|
||||
font_pkg_postinst
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
Mon, 29 Jan 2018 06:38:13 +0000
|
||||
Mon, 29 Jan 2018 09:38:13 +0000
|
||||
|
@ -1 +1 @@
|
||||
Mon, 29 Jan 2018 06:38:13 +0000
|
||||
Mon, 29 Jan 2018 09:38:13 +0000
|
||||
|
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