View previous topic :: View next topic |
Author |
Message |
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 3:20 am Post subject: ebuild per sci-physics/root [risolto] |
|
|
era: ebuild per sci-physics/root :access denied
a quanto pare, quancuno ha letto questo ebuild e ha prodotto un ebuild in portage che utilizza le osservaziono contenute sotto.
dunque il thread è risolto.
---
il thread che segue ha portato a scrivere l'ebuild qui sotto, che comincia ad essere abbastanza funzionale e che cercherò di aggiornare successivamente.
si raccomanda di farne uso con cautela.
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
toolchain-funcs user versionator
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="
https://root.cern.ch/download/${PN}_v${PV}.source.tar.gz
"
SLOT="0/$(get_version_component_range 1-3 ${PV})"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
# options extracted from configure
options="
afdsmgrd \
afs \
alien \
alloc \
+asimage \
+astiff \
bonjour \
-builtin_afterimage \
-builtin_ftgl \
-builtin_freetype \
-builtin_gl2ps \
-builtin_glew \
-builtin_pcre \
-builtin_unuran \
-builtin_zlib \
-builtin_lzma \
-builtin_lz4 \
-builtin_llvm \
+cxx14 \
cxx17 \
cxxmodules \
libcxx \
castor \
chirp \
cocoa \
davix \
dcache \
+explicitlink \
fink \
+fftw3 \
+fitsio \
gviz \
+gdml \
+genvector \
geocad \
gfal \
glite \
globus \
+gsl_shared \
hdfs \
http \
imt \
krb5 \
ldap \
+mathmore \
+memstat \
+minuit2 \
monalisa \
+mysql \
odbc \
+opengl \
oracle \
pgsql \
pythia6 \
+pythia8 \
+python \
+qt \
+qtgsi \
+roofit \
+r \
ruby \
rfio \
+rpath \
search_usrlocal \
sapdb \
+shadowpw \
+shared \
+soversion \
sqlite \
srp \
+ssl \
+table \
tbb \
+tmva \
+unuran \
vc \
-werror \
winrtdebug \
+x11 \
+xft \
+xml \
+xrootd \
"
options="${options} all gminimal minimal +root7"
options+=" $EXTRA_ECONF"
IUSE="${options}"
IUSE="${IUSE} +X doc emacs examples fits
graphviz kerberos +math mpi openmp oracle postgres prefix
R +tiff xinetd zeroconf"
# TODO: patches and useflags tuning and testing are needed
CDEPEND="${CDEPEND}
app-arch/xz-utils:0=
>=dev-lang/cfortran-4.4-r2
dev-libs/libpcre:3=
media-fonts/dejavu
media-libs/freetype:2=
media-libs/libpng:0=
>=sys-devel/clang-3.4:=
sys-libs/ncurses:=
sys-libs/zlib:0=
X? (
media-libs/ftgl:0=
media-libs/glew:0=
x11-libs/libX11:0=
x11-libs/libXext:0=
x11-libs/libXpm:0=
|| (
media-libs/libafterimage[gif,jpeg,png,tiff?]
>=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
)
opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
x11-libs/libXft:0=
)
afs? ( net-fs/openafs )
emacs? ( virtual/emacs )
fits? ( sci-libs/cfitsio:0= )
fftw3? ( sci-libs/fftw:3.0= )
geocad? ( <sci-libs/opencascade-6.8.0:= )
graphviz? ( media-gfx/graphviz:0= )
http? ( dev-libs/fcgi:0= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap:0= )
math? (
sci-libs/gsl:0=
sci-mathematics/unuran:0=
mpi? ( virtual/mpi )
)
mysql? ( virtual/mysql )
odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
oracle? ( dev-db/oracle-instantclient-basic:0= )
postgres? ( dev-db/postgresql:= )
pythia6? ( sci-physics/pythia:6= )
pythia8? ( >=sci-physics/pythia-8.1.80:8= )
python? ( ${PYTHON_DEPS} )
R? ( dev-lang/R )
shadowpw? ( virtual/shadow )
sqlite? ( dev-db/sqlite:3= )
ssl? ( dev-libs/openssl:0= )
xml? ( dev-libs/libxml2:2= )
xrootd? ( >=net-libs/xrootd-3.3.5:0= )
zeroconf? ( net-dns/avahi:0= )
"
DEPEND="
virtual/pkgconfig
"
RDEPEND="${CDEPEND}
xinetd? ( sys-apps/xinetd )"
PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
# install stuff in ${P} and not ${PF} for easier tracking in root-docs
DOC_DIR="/usr/share/doc/${P}"
OC_UNSUPPORTED="6.8.0"
die_compiler() {
eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
die "Need one of the following C++$1 capable compilers:\n"\
" >=sys-devel/gcc[cxx]-$2\n"\
" >=sys-devel/clang-$3\n"\
" >=dev-lang/icc-$4"
}
# check compiler to satisfy minimal versions
# $1 - std version
# $2 - g++
# $3 - clang++
# $4 - icc/icpc
check_compiler() {
local cur ver
case "$(tc-getCXX)" in
*clang++*)
ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
cur="$3"
;;
*g++*)
ver="$(gcc-version)"
cur="$2"
;;
*icc*|*icpc*)
ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
eerror "ROOT-6 is known not to build with ICC."
eerror "Please report any issues upstream."
cur="$4"
;;
*)
ewarn "You are using an unsupported compiler."
ewarn "Please report any issues upstream."
return 0
;;
esac
version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
}
pkg_setup() {
fortran-2_pkg_setup
use python && python-single-r1_pkg_setup
echo
elog "There are extra options on packages not yet in Gentoo:"
elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
elog "You can use the env variable EXTRA_ECONF variable for this."
elog "For example, for SRP, you would set: "
elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
echo
enewgroup rootd
enewuser rootd -1 -1 /var/spool/rootd rootd
if use math; then
if use openmp; then
if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
ewarn "You are using a g++ without OpenMP capabilities"
die "Need an OpenMP capable compiler"
else
export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
fi
elif use mpi; then
export USE_MPI=1 USE_PARALLEL_MINUIT2=1
fi
fi
# c++11 support is mandatory
check_compiler "11" "4.8" "3.4" "13"
# Active version of opencascade may be >= $OC_UNSUPPORTED,
# so we need to eselect proper version (it must exist due to DEPEND requirement)
if use geocad; then
oc_current=$(eselect opencascade show)
# Proceed only if active version is unsupported
if version_is_at_least "${OC_UNSUPPORTED}" "${oc_current}"; then
local -a vlist
vlist=( $(version_sort $(eselect opencascade list | awk '/^ / { print $2 }')) )
local i
# search for higehr version < $OC_UNSUPPORTED
# list is sorted acsending, so loop backwards
for (( i=$(( ${#vlist[@]} -1 )); i>=0; i-- )); do
version_is_at_least "${OC_UNSUPPORTED}" "${vlist[i]}" || break
done
[[ $i == "-1" ]] && die "No suitable opencascade eselect slot is available (<${OC_UNSUPPORTED})"
einfo "Switching opencascade to supported slot: ${oc_current} -> ${vlist[i]}"
eselect opencascade set ${vlist[i]} > /dev/null || die "eselect opencascade set ${vlist[i]} failed!"
else
# forget it, effectively disabling eselect cleanup
unset oc_current
fi
fi
}
PATCHES=(
"${FILESDIR}/${PN}-5.32.00-afs.patch" \
"${FILESDIR}/${PN}-5.32.00-cfitsio.patch" \
"${FILESDIR}/${PN}-5.28.00b-glibc212.patch" \
"${FILESDIR}/${PN}-5.32.00-chklib64.patch" \
"${FILESDIR}/${PN}-6.00.01-dotfont.patch" \
"${FILESDIR}/${PN}-6.04.06-prop-flags.patch" \
)
PROPERTIES="interactive"
export CMAKE_BUILD_TYPE="Release"
src_prepare() {
# make sure we use system libs and headers
rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
xargs -0 rm || die
rm -r core/lzma/src/*.tar.gz || die
sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
graf3d/gl/Module.mk || die
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
configure || die "adjusting configure for Gentoo failed"
default
}
src_configure() {
local mycmakeargs=(
-DWITH_root7=ON \
-DWITH_cxx14=ON \
-DWITH_builtin_afterimage=OFF \
-DWITH_builtin_ftgl=OFF \
-DWITH_builtin_freetype=OFF \
-DWITH_builtin_glew=OFF \
-DWITH_builtin_lzma=OFF \
-DWITH_builtin_pcre=OFF \
-DWITH_builtin_zlib=OFF \
-DWITH_explicitlink=ON \
-DWITH_soversion=ON \
-DWITH_fail-on-missing=ON \
)
for i in ${options}; do {
i=${i/-/}
i=${i/+/}
if use ${i}; then {
echo ON $i
mycmakeargs+="-DWITH_${i}=ON "
}
else {
echo OFF $i
mycmakeargs+="-DWITH_${i}=OFF "
}
fi
} done
CMAKE_C_FLAGS="${CFLAGS}"
CMAKE_CXX_FLAGS="${CXXFLAGS}"
CMAKE_CXX_LINK_FLAGS=${LDFLAGS}
CMAKE_Fortran_FLAGS="${FFLAGS}"
CMAKE_INSTALL_TUTDIR="${EPREFIX%/}/${DOC_DIR}/examples/tutorials"
CMAKE_INSTALL_TESTDIR="${EPREFIX%/}/${DOC_DIR}/examples/tests"
CMAKE_INSTALL_ICONDIR="${EPREFIX%/}/usr/share/pixmaps"
addwrite /dev/random
cmake-utils_src_configure
}
daemon_install() {
local daemons="rootd proofd"
dodir /var/spool/rootd
fowners rootd:rootd /var/spool/rootd
dodir /var/spool/rootd/{pub,tmp}
fperms 1777 /var/spool/rootd/{pub,tmp}
local i
for i in ${daemons}; do
newinitd "${FILESDIR}"/${i}.initd ${i}
newconfd "${FILESDIR}"/${i}.confd ${i}
done
if use xinetd; then
insinto /etc/xinetd
sed -e 's|@bindir@|/usr/bin/|' \
-e 's|@prefix@|/usr|' \
< ./config/rootd.xinetd.in > ${S}"/etc/daemons/rootd.xinetd"
sed -e 's|@bindir@|/usr/bin/|' \
-e 's|@prefix@|/usr|' \
< ./config/proofd.xinetd.in > ${S}"/etc/daemons/proofd.xinetd"
doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
fi
}
desktop_install() {
cd "${S}"
echo "Icon=root-system-bin" >> etc/root.desktop
domenu etc/root.desktop
doicon build/package/debian/root-system-bin.png
insinto /usr/share/icons/hicolor/48x48/mimetypes
doins build/package/debian/application-x-root.png
insinto /usr/share/icons/hicolor/48x48/apps
doicon build/package/debian/root-system-bin.xpm
}
cleanup_install() {
rm "${D}"/usr/LICENSE
rm "${D}"/usr/lib64/libGLEW.so
rm "${D}"/usr/include/GL/glew.h
rm "${D}"/usr/include/GL/glxew.h
}
src_install() {
DOCS=($(find README/* -maxdepth 1 -type f))
insinto "${DOC_DIR}"
doins README.md
# /bin/bash -i
cmake-utils_src_install
daemon_install
desktop_install
cleanup_install
docompress -x "${DOC_DIR}"/{CREDITS,LICENSE,examples/tutorials}
dosym "${ED}"usr/portage/licenses/LGPL-2.1 "${DOC_DIR}/LICENSE"
}
|
sto cercando di produrre un ebuild per sci-physics/root visto che quello attuale è obsoleto.
in linea di principio, non dovrebbe essere una impresa impossibile, perché il software è ottimamente documentato.
in effetti, le istruzioni sono più che sufficienti per concludere felicemente la compilazione manuale in una cartella dedicata, a patto di introdurre le opzioni -Droot7=ON -Dcxx14=ON, necessarie per una installazione con gcc-5 o superiore.
appena provo a lanciare la compilazione in un ebuild, tuttavia, ottengo questo stupido errore:
Code: |
Scanning dependencies of target hsimple
[ 89%] Generating tutorials/hsimple.root
Processing hsimple.C...
* ACCESS DENIED: open_wr: /dev/random
open('/dev/random'): Permission denied
...
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: open_wr
S: deny
P: /dev/random
A: /dev/random
R: /dev/random
C: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08/work/root-6.10.08_build/bin/root.exe -l -q -b -n -x hsimple.C -e return
* --------------------------------------------------------------------------------
|
è colpa di uno stupido demo (hsimple.C) che probabilmente non dovrebbe neppure essere lanciato, ma che non riesco a eliminare.
se commento la riga che lo lancia (con una patch), infatti, nascono altri errori.
che cosa si può fare, in questi casi?
aggiungo anche l'ebuild, del tutto maccheronico, che sto usando.
il fatto che sia maccheronico, tuttavia, non è probabilmente una concausa del problema che sto descrivendo.
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit epatch cmake-utils
#elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
# toolchain-funcs user versionator
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="
https://root.cern.ch/download/root_v6.10.08.source.tar.gz
"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""
SLOT="0/$(get_version_component_range 1-3 ${PV})"
# TODO: ...
CDEPEND=""
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
"
#inherit eutils cmake-utils
export CMAKE_BUILD_TYPE="Release"
pkg_setup() {
fortran-2_pkg_setup
}
src_prepare() {
#epatch "${FILESDIR}"/root-6.10.08_exe.patch
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
#configure || die "adjusting configure for Gentoo failed"
#rm tutorials -rf || die
}
src_configure() {
mkdir ../root-6.10.08_build
cd ../root-6.10.08_build
cmake -Droot7=ON -Dcxx14=ON ../root-6.10.08
}
|
_________________ vu vu vu
gentù
mi piaci tu
Last edited by cloc3 on Sun Dec 24, 2017 8:13 am; edited 4 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Wed Nov 22, 2017 8:43 am Post subject: |
|
|
Non so cosa sia l'errore che hai quindi ho cambiato approccio al problema, infatti ho copiato il vecchio ebuild e l'ho rinominato con la versione 6.10.08 ed ho iniziato a rimuovere le parti nell'ebuild che davano problemi (patch che non si applicano piu', qualche rm che falliva,...) e alla fine ho creato un ebuild che funziona (almeno alla compilazione e installazione)
root-6.10.08.ebuild: | # Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
toolchain-funcs user versionator
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="https://root.cern.ch/download/${PN}_v${PV}.source.tar.gz"
SLOT="0/$(get_version_component_range 1-3 ${PV})"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="+X afs doc emacs examples fits fftw gdml geocad
graphviz http kerberos ldap +math +memstat mpi mysql odbc
+opengl openmp oracle postgres prefix pythia6 pythia8
python qt4 R shadow sqlite ssl table +tiff xinetd xml xrootd
zeroconf"
# TODO: add support for: davix
# TODO: ROOT-6 supports x32 ABI, but half of its dependencies doesn't
# TODO: unbundle: cling
# vdt seems removed in version 6.10.08
REQUIRED_USE="
!X? ( !opengl !qt4 !tiff )
mpi? ( math !openmp )
openmp? ( math !mpi )
python? ( ${PYTHON_REQUIRED_USE} )
"
CDEPEND="
app-arch/xz-utils:0=
>=dev-lang/cfortran-4.4-r2
dev-libs/libpcre:3=
media-fonts/dejavu
media-libs/freetype:2=
media-libs/libpng:0=
>=sys-devel/clang-3.4:=
sys-libs/ncurses:=
sys-libs/zlib:0=
X? (
media-libs/ftgl:0=
media-libs/glew:0=
x11-libs/libX11:0=
x11-libs/libXext:0=
x11-libs/libXpm:0=
|| (
media-libs/libafterimage[gif,jpeg,png,tiff?]
>=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
)
opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
qt4? (
dev-qt/qtgui:4=
dev-qt/qtopengl:4=
dev-qt/qt3support:4=
dev-qt/qtsvg:4=
dev-qt/qtwebkit:4=
dev-qt/qtxmlpatterns:4=
)
x11-libs/libXft:0=
)
afs? ( net-fs/openafs )
emacs? ( virtual/emacs )
fits? ( sci-libs/cfitsio:0= )
fftw? ( sci-libs/fftw:3.0= )
geocad? ( <sci-libs/opencascade-6.8.0:= )
graphviz? ( media-gfx/graphviz:0= )
http? ( dev-libs/fcgi:0= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap:0= )
math? (
sci-libs/gsl:0=
sci-mathematics/unuran:0=
mpi? ( virtual/mpi )
)
mysql? ( virtual/mysql )
odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
oracle? ( dev-db/oracle-instantclient-basic:0= )
postgres? ( dev-db/postgresql:= )
pythia6? ( sci-physics/pythia:6= )
pythia8? ( >=sci-physics/pythia-8.1.80:8= )
python? ( ${PYTHON_DEPS} )
R? ( dev-lang/R )
shadow? ( virtual/shadow )
sqlite? ( dev-db/sqlite:3= )
ssl? ( dev-libs/openssl:0= )
xml? ( dev-libs/libxml2:2= )
xrootd? ( >=net-libs/xrootd-3.3.5:0= )
zeroconf? ( net-dns/avahi:0= )
"
# TODO: ruby is not yet ported to ROOT-6, reenable when (if?) ready
# ruby? (
# dev-lang/ruby:=
# dev-ruby/rubygems:=
# )
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
xinetd? ( sys-apps/xinetd )"
PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
# install stuff in ${P} and not ${PF} for easier tracking in root-docs
DOC_DIR="/usr/share/doc/${P}"
OC_UNSUPPORTED="6.8.0"
die_compiler() {
eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
die "Need one of the following C++$1 capable compilers:\n"\
" >=sys-devel/gcc[cxx]-$2\n"\
" >=sys-devel/clang-$3\n"\
" >=dev-lang/icc-$4"
}
# check compiler to satisfy minimal versions
# $1 - std version
# $2 - g++
# $3 - clang++
# $4 - icc/icpc
check_compiler() {
local cur ver
case "$(tc-getCXX)" in
*clang++*)
ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
cur="$3"
;;
*g++*)
ver="$(gcc-version)"
if version_is_at_least "5" "${ver}"; then
eerror ""
eerror "GCC-5 is not yet supported in ROOT-6."
eerror "The code may build for you, but will have run-time failures."
eerror "See the following bugs:"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7285"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7319"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7654"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7721"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7818"
eerror "https://sft.its.cern.ch/jira/browse/ROOT-7895"
eerror "https://bugs.gentoo.org/show_bug.cgi?id=564306"
eerror ""
eerror "Please use GCC-4.9 for now."
eerror ""
die "gcc-5 is not yet supported"
fi
cur="$2"
;;
*icc*|*icpc*)
ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
eerror "ROOT-6 is known not to build with ICC."
eerror "Please report any isuses upstream."
cur="$4"
;;
*)
ewarn "You are using an unsupported compiler."
ewarn "Please report any issues upstream."
return 0
;;
esac
version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
}
pkg_setup() {
fortran-2_pkg_setup
use python && python-single-r1_pkg_setup
echo
elog "There are extra options on packages not yet in Gentoo:"
elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
elog "You can use the env variable EXTRA_ECONF variable for this."
elog "For example, for SRP, you would set: "
elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
echo
enewgroup rootd
enewuser rootd -1 -1 /var/spool/rootd rootd
if use math; then
if use openmp; then
if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
ewarn "You are using a g++ without OpenMP capabilities"
die "Need an OpenMP capable compiler"
else
export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
fi
elif use mpi; then
export USE_MPI=1 USE_PARALLEL_MINUIT2=1
fi
fi
# c++11 support is mandatory
check_compiler "11" "4.8" "3.4" "13"
# Active version of opencascade may be >= $OC_UNSUPPORTED,
# so we need to eselect proper version (it must exist due to DEPEND requirement)
if use geocad; then
oc_current=$(eselect opencascade show)
# Proceed only if active version is unsupported
if version_is_at_least "${OC_UNSUPPORTED}" "${oc_current}"; then
local -a vlist
vlist=( $(version_sort $(eselect opencascade list | awk '/^ / { print $2 }')) )
local i
# search for higehr version < $OC_UNSUPPORTED
# list is sorted acsending, so loop backwards
for (( i=$(( ${#vlist[@]} -1 )); i>=0; i-- )); do
version_is_at_least "${OC_UNSUPPORTED}" "${vlist[i]}" || break
done
[[ $i == "-1" ]] && die "No suitable opencascade eselect slot is available (<${OC_UNSUPPORTED})"
einfo "Switching opencascade to supported slot: ${oc_current} -> ${vlist[i]}"
eselect opencascade set ${vlist[i]} > /dev/null || die "eselect opencascade set ${vlist[i]} failed!"
else
# forget it, effectively disabling eselect cleanup
unset oc_current
fi
fi
}
src_prepare() {
# Second version of makepch is required in order to generate
# PCH file appropriate for Gentoo include headers layout.
# This can be done only at install stage, when files are placed
# as appropriate. Premature modification of makepch.sh will
# broke build process, however.
#cp "etc/dictpch/makepch.sh" "etc/dictpch/makepch-gentoo.sh" || die
epatch \
"${FILESDIR}"/${PN}-5.28.00b-glibc212.patch \
"${FILESDIR}"/${PN}-5.32.00-afs.patch \
"${FILESDIR}"/${PN}-5.32.00-cfitsio.patch \
"${FILESDIR}"/${PN}-5.32.00-chklib64.patch \
"${FILESDIR}"/${PN}-6.00.01-dotfont.patch \
"${FILESDIR}"/${PN}-6.04.06-prop-flags.patch
# "${FILESDIR}"/${PN}-6.02.05-xrootd4.patch
# "${FILESDIR}"/${PN}-6.02.05-dictpch.patch \
# make sure we use system libs and headers
rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
rm -r graf2d/asimage/src/libAfterImage || die
rm -r graf3d/ftgl/{inc,src} || die
rm -r graf2d/freetype/src || die
rm -r graf3d/glew/{inc,src} || die
rm -r core/pcre/src || die
rm -r math/unuran/src/unuran-*.tar.gz || die
LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
xargs -0 rm || die
rm -r core/lzma/src/*.tar.gz || die
sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
graf3d/gl/Module.mk || die
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
configure || die "adjusting configure for Gentoo failed"
# prefixify the configure script
sed -i \
-e 's:/usr:${EPREFIX}/usr:g' \
configure || die "prefixify configure failed"
# CSS should use local images
sed -i -e 's,http://.*/,,' etc/html/ROOT.css || die "html sed failed"
# QTDIR only used for qt3 in gentoo, and configure looks for it.
unset QTDIR
}
# NB: ROOT uses bundled LLVM, because it is patched and API-incompatible with
# system LLVM.
# NB: As of 6.00.0.1 cmake is not ready as it can't fully replace configure,
# e.g. for afs and geocad.
src_configure() {
local -a myconf
# Some compilers need special care
case "$(tc-getCXX)" in
*clang++*)
myconf=(
--with-clang
--with-f77="$(tc-getFC)"
)
;;
*icc*|*icpc*)
# For icc we need to provide architecture manually
# and not to tamper with tc-get*
use x86 && myconf=( linuxicc )
use amd64 && myconf=( linuxx8664icc )
;;
*) # gcc goes here too
myconf=(
--with-cc="$(tc-getCC)"
--with-cxx="$(tc-getCXX)"
--with-f77="$(tc-getFC)"
--with-ld="$(tc-getCXX)"
)
;;
esac
# the configure script is not the standard autotools
myconf+=(
--prefix="${EPREFIX}/usr"
--etcdir="${EPREFIX}/etc/root"
--libdir="${EPREFIX}/usr/$(get_libdir)/${PN}"
--docdir="${EPREFIX}${DOC_DIR}"
--tutdir="${EPREFIX}${DOC_DIR}/examples/tutorials"
--testdir="${EPREFIX}${DOC_DIR}/examples/tests"
--disable-builtin-afterimage
--disable-builtin-ftgl
--disable-builtin-freetype
--disable-builtin-glew
--disable-builtin-lzma
--disable-builtin-pcre
--disable-builtin-zlib
--disable-werror
--enable-explicitlink
--enable-shared
--enable-soversion
--fail-on-missing
--nohowto
--with-afs-shared=yes
--with-sys-iconpath="${EPREFIX}/usr/share/pixmaps"
# Invalid option '-mtune=native'. Try ./configure --help
# --cflags=\"${CFLAGS}\"
# --cxxflags=\"${CXXFLAGS}\"
$(use_enable X x11)
$(use_enable X asimage)
$(use_enable X xft)
$(use_enable afs)
$(use_enable fits fitsio)
$(use_enable fftw fftw3)
$(use_enable gdml)
$(use_enable geocad)
$(use_enable graphviz gviz)
$(use_enable http)
$(use_enable kerberos krb5)
$(use_enable ldap)
$(use_enable math genvector)
$(use_enable math gsl-shared)
$(use_enable math mathmore)
$(use_enable math minuit2)
$(use_enable math roofit)
$(use_enable math tmva)
$(use_enable math vc)
$(use_enable math unuran)
$(use_enable memstat)
$(use_enable mysql)
$(usex mysql "--with-mysql-incdir=${EPREFIX}/usr/include/mysql" "")
$(use_enable odbc)
$(use_enable opengl)
$(use_enable oracle)
$(use_enable postgres pgsql)
$(use_enable prefix rpath)
$(use_enable pythia6)
$(use_enable pythia8)
$(use_enable python)
$(use_enable qt4 qt)
$(use_enable qt4 qtgsi)
$(use_enable R r)
$(use_enable shadow shadowpw)
$(use_enable sqlite)
$(use_enable ssl)
$(use_enable table)
$(use_enable tiff astiff)
$(use_enable xml)
$(use_enable xrootd)
$(use_enable zeroconf bonjour)
${EXTRA_ECONF}
)
# usex can't be used here, because pg_config may be not
# installed with USE="-postgres"
use postgres && myconf+=( --with-pgsql-incdir=$(pg_config --includedir) )
einfo "Configuring with ${myconf[@]}"
./configure ${myconf[@]} || die "configure failed"
}
src_compile() {
emake \
OPT="${CXXFLAGS}" \
F77OPT="${FFLAGS}" \
ROOTSYS="${S}" \
LD_LIBRARY_PATH="${S}/lib"
use emacs && elisp-compile build/misc/*.el
}
daemon_install() {
local daemons="rootd proofd"
dodir /var/spool/rootd
fowners rootd:rootd /var/spool/rootd
dodir /var/spool/rootd/{pub,tmp}
fperms 1777 /var/spool/rootd/{pub,tmp}
local i
for i in ${daemons}; do
newinitd "${FILESDIR}"/${i}.initd ${i}
newconfd "${FILESDIR}"/${i}.confd ${i}
done
if use xinetd; then
insinto /etc/xinetd
doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
fi
}
desktop_install() {
cd "${S}"
echo "Icon=root-system-bin" >> etc/root.desktop
domenu etc/root.desktop
doicon build/package/debian/root-system-bin.png
insinto /usr/share/icons/hicolor/48x48/mimetypes
doins build/package/debian/application-x-root.png
insinto /usr/share/icons/hicolor/48x48/apps
doicon build/package/debian/root-system-bin.xpm
}
cleanup_install() {
# Cleanup of files either already distributed or unused on Gentoo
pushd "${ED}" > /dev/null
rm usr/share/root/fonts/LICENSE || die
rm etc/root/proof/*.sample || die
rm -r etc/root/daemons || die
# these should be in PATH
mv etc/root/proof/utils/pq2/pq2* usr/bin/ || die
rm ${DOC_DIR#/}/INSTALL || die
use examples || rm -r ${DOC_DIR#/}/examples || die
# clean hardcoded sandbox paths
#rm etc/root/dictpch/allCppflags.txt.tmp || die
#sed -i "s|${S}/||" etc/root/cling/llvm/Config/llvm-config.h || die
# regenerate pch for Gentoo headers layout
#rm "etc/root/allDict.cxx.pch" || die
#sed -i 's|etc/dictpch|etc/root/dictpch|' etc/root/dictpch/allLinkDefs.h || die
#sed -i 's|etc/cling|etc/root/cling|' etc/root/dictpch/allHeaders.h || die
#sed -i "s|ROOTDIR_TEMPLATE|${ED}|" etc/root/dictpch/makepch-gentoo.sh || die
#etc/root/dictpch/makepch-gentoo.sh etc/root/allDict.cxx.pch || die "PCH generation failed"
}
src_install() {
ROOTSYS="${S}" emake DESTDIR="${D}" install
insinto "${DOC_DIR}"
doins README.md
echo "LDPATH=${EPREFIX%/}/usr/$(get_libdir)/root" > 99root
use pythia8 && echo "PYTHIA8=${EPREFIX%/}/usr" >> 99root
if use python; then
echo "PYTHONPATH=${EPREFIX%/}/usr/$(get_libdir)/root" >> 99root
python_optimize "${D}/usr/$(get_libdir)/root"
fi
use emacs && elisp-install ${PN} build/misc/*.{el,elc}
doenvd 99root
# The build system installs Emacs support unconditionally in the wrong
# directory. Remove it and call elisp-install in case of USE=emacs.
rm -r "${ED}"/usr/share/emacs || die
daemon_install
desktop_install
cleanup_install
# do not copress files used by ROOT's CLI (.credit, .demo, .license)
docompress -x "${DOC_DIR}"/{CREDITS,examples/tutorials}
}
pkg_postinst() {
fdo-mime_desktop_database_update
# restort opencascade eselect slot
if use geocad && [[ -n ${oc_current} ]]; then
einfo "Switching to user set slot: $(eselect opencascade show) -> ${oc_current}"
eselect opencascade set ${oc_current} > /dev/null || eerror "eselect opencascade set ${vlist[i]} failed!"
unset oc_current
fi
}
pkg_postrm() {
fdo-mime_desktop_database_update
} |
Ovviamente devi copiare anche la cartella files che si trova nel portage tree ufficiale., inoltre questa version compila con gcc5 o gcc6 senza bisogno di patch. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 1:36 pm Post subject: |
|
|
fedeliallalinea wrote: | inoltre questa version compila con gcc5 o gcc6 senza bisogno di patch. |
Code: |
*
* GCC-5 is not yet supported in ROOT-6.
* The code may build for you, but will have run-time failures.
* See the following bugs:
* https://sft.its.cern.ch/jira/browse/ROOT-7285
* https://sft.its.cern.ch/jira/browse/ROOT-7319
* https://sft.its.cern.ch/jira/browse/ROOT-7654
* https://sft.its.cern.ch/jira/browse/ROOT-7721
* https://sft.its.cern.ch/jira/browse/ROOT-7818
* https://sft.its.cern.ch/jira/browse/ROOT-7895
* https://bugs.gentoo.org/show_bug.cgi?id=564306
*
* Please use GCC-4.9 for now.
*
* ERROR: sci-physics/root-6.10.08-r1::localPortage failed (setup phase):
* gcc-5 is not yet supported
*
* Call stack:
* ebuild.sh, line 115: Called pkg_setup
* root-6.10.08-r1.ebuild, line 201: Called check_compiler '11' '4.8' '3.4' '13'
* root-6.10.08-r1.ebuild, line 153: Called die
* The specific snippet of code:
* die "gcc-5 is not yet supported"
*
* If you need support, post the output of `emerge --info '=sci-physics/root-6.10.08-r1::localPortage'`,
* the complete build log and the output of `emerge -pqv '=sci-physics/root-6.10.08-r1::localPortage'`.
|
a me non risulta.
questo ebuild filtra all'origine la versione di gcc.
se si rimuovesse il filtro, la compilazione fallirebbe ugualmente, perché l'ebuild non seleziona l'opzione root7 e, di conseguenza, non supera i controlli originali del sorgente.
secondo me, ripartire dalla versione precedente è poco raccomandabile, perché la documentazione degli sviluppatori consiglia di usare cmake.
forse bisognerebbe provare un approccio intermedio, scrivendo un ebuild più articolato che permetta di lanciare un comando cmake simile a quello dell'ebuild precedente.
il guaio è che il tempo a disposizione è quello che è, e spesso le compilazioni falliscono al 92%...
il metodo sperimentale puro, di conseguenza, rischia davvero di risolversi in lacrime e sangue.
_________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Wed Nov 22, 2017 2:02 pm Post subject: |
|
|
cloc3 wrote: | a me non risulta.
questo ebuild filtra all'origine la versione di gcc.
se si rimuovesse il filtro, la compilazione fallirebbe ugualmente, perché l'ebuild non seleziona l'opzione root7 e, di conseguenza, non supera i controlli originali del sorgente. |
Vero mi sono dimenticato che in env avevo abilitato clang per compilare questo pacchetto
Code: | $ cat /etc/portage/env/compiler-clang
CC="clang"
CXX="clang++"
$ cat /etc/portage/package.env
sci-physics/root compiler-clang |
E in questo modo compila.
Scusa mi sono dimenticato che ho gia' affrontato il problema con questo pacchetto nel forum internazionale.
Ora sto vedendo di applicare la patch per farlo andare anche con gcc5 _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 6:27 pm Post subject: |
|
|
fedeliallalinea wrote: |
Ora sto vedendo di applicare la patch per farlo andare anche con gcc5 |
ne vale la pena?
tra qualche mese sarà stabilizzata la versione 7 di root, che sigla una cesura di retrocompatibilità con le versioni precedenti.
se un sistema è stato compilato con gcc5, il vecchio codice genera conflitti di ABI con le librerie di sistema che gli sviluppatori non hanno voluto deliberatamente coprire, ma che si possono evitare integralmente abilitando l'opzione root7.
secondo me, la cosa da fare, piuttosto, sarebbe allineare l'ebuild di gentoo alla documentazione ufficiale, che usa cmake, in modo da impostare un modello consistente e stabile nel tempo. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Wed Nov 22, 2017 6:35 pm Post subject: |
|
|
Poi vedo che nel overlay sci esiste un ebuild per la versione live ma vedo che non usa ancora cmake. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 6:38 pm Post subject: |
|
|
e tantomeno root7 .
...
p.s.: quasi quasi decommento quella riga rm tutorials e vediamo come va. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 7:54 pm Post subject: |
|
|
cloc3 wrote: |
p.s.: quasi quasi decommento quella riga rm tutorials e vediamo come va. |
Code: |
Scanning dependencies of target hsimple
[ 85%] Generating tutorials/hsimple.root
/bin/sh: riga 0: cd: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/work/root-6.10.08_build/tutorials: File o directory non esistente
make[2]: *** [CMakeFiles/hsimple.dir/build.make:67: tutorials/hsimple.root] Error 1
make[1]: *** [CMakeFiles/Makefile2:307: CMakeFiles/hsimple.dir/all] Error 2
make[1]: *** Attesa per i processi non terminati....
|
è deprimente.
possibile che tutto fallisca in quel modo per un tutorial di cui si potrebbe benissimo fare a meno? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Wed Nov 22, 2017 8:20 pm Post subject: |
|
|
Allora prima di tutto io userei l'eclass cmake-utils.
Nel primo post hai detto che hai commentato la linea ma hai provato a commentare tutto questo pezzo in CMakeList.txt?
Code: | #---hsimple.root---------(use the executable for clearer dependencies and proper return code)---
add_custom_target(hsimple ALL DEPENDS tutorials/hsimple.root)
add_dependencies(hsimple onepcm)
if(WIN32)
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} &&
set ROOTIGNOREPREFIX=1 &&
$<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
WORKING_DIRECTORY tutorials
DEPENDS $<TARGET_FILE:root.exe> Cling Hist Tree Gpad Graf HistPainter move_artifacts)
else()
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}}
ROOTIGNOREPREFIX=1
$<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
WORKING_DIRECTORY tutorials
DEPENDS $<TARGET_FILE:root.exe> Cling Hist Tree Gpad Graf HistPainter move_artifacts)
endif()
install(FILES ${CMAKE_BINARY_DIR}/tutorials/hsimple.root DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests) |
Ma mi sembra un po' tirata come soluzione, non conosco il programma e, come gia' detto, cmake e' ancora un po' nebuloso per me. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Nov 22, 2017 10:23 pm Post subject: |
|
|
benissimo.
con la patch che hai suggerito tu:
Code: |
diff -ruN root-6.10.08.orig/CMakeLists.txt root-6.10.08/CMakeLists.txt
--- root-6.10.08.orig/CMakeLists.txt 2017-10-16 18:28:58.000000000 +0200
+++ root-6.10.08/CMakeLists.txt 2017-11-22 22:15:58.753409708 +0100
@@ -302,8 +302,8 @@
install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/dictpch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR})
#---hsimple.root---------(use the executable for clearer dependencies and proper return code)---
-add_custom_target(hsimple ALL DEPENDS tutorials/hsimple.root)
-add_dependencies(hsimple onepcm)
+#add_custom_target(hsimple ALL DEPENDS tutorials/hsimple.root)
+#add_dependencies(hsimple onepcm)
if(WIN32)
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} &&
@@ -311,15 +311,15 @@
$<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
WORKING_DIRECTORY tutorials
DEPENDS $<TARGET_FILE:root.exe> Cling Hist Tree Gpad Graf HistPainter move_artifacts)
-else()
- add_custom_command(OUTPUT tutorials/hsimple.root
- COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}}
- ROOTIGNOREPREFIX=1
- $<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
- WORKING_DIRECTORY tutorials
- DEPENDS $<TARGET_FILE:root.exe> Cling Hist Tree Gpad Graf HistPainter move_artifacts)
+#else()
+# add_custom_command(OUTPUT tutorials/hsimple.root
+# COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}}
+# ROOTIGNOREPREFIX=1
+# $<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
+# WORKING_DIRECTORY tutorials
+# DEPENDS $<TARGET_FILE:root.exe> Cling Hist Tree Gpad Graf HistPainter move_artifacts)
endif()
-install(FILES ${CMAKE_BINARY_DIR}/tutorials/hsimple.root DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests)
+#install(FILES ${CMAKE_BINARY_DIR}/tutorials/hsimple.root DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests)
#---version--------------------------------------------------------------------------------------
add_custom_target(version COMMAND ${CMAKE_SOURCE_DIR}/build/unix/makeversion.sh ${CMAKE_BINARY_DIR}
|
sono arrivato a questa versione che supera la fase di configure e di compile:
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="
https://root.cern.ch/download/root_v6.10.08.source.tar.gz
"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="+root7 +cxx14"
SLOT="0/$(get_version_component_range 1-3 ${PV})"
# TODO: ...
CDEPEND=""
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
"
export CMAKE_BUILD_TYPE="Release"
src_prepare() {
epatch "${FILESDIR}"/root-6.10.08-CMakeLists.txt.patch
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
configure || die "adjusting configure for Gentoo failed"
}
src_configure() {
local mycmakeargs=(
$(cmake-utils_use_with root7)
$(cmake-utils_use_with cxx14)
)
cmake-utils_src_configure
}
|
purtroppo fallisce nell'install:
Code: |
...
-- Installing: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/image/usr/include/TMVA/BDT_Reg.h
-- Installing: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/image/usr/include/TMVA/BDTControlPlots.h
-- Installing: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/image/usr/include/TMVA/BDT.h
!!! dodoc: README is a directory
* ERROR: sci-physics/root-6.10.08-r1::localPortage failed (install phase):
* dodoc failed
*
|
adesso cercherò di rapinare qualche altro pezzo del vecchio ebuild. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Thu Nov 23, 2017 7:12 am Post subject: |
|
|
Questo e' facilmente risolvibile o rimuovendo in src_prepare la cartella README o crendo una nuova src_install dove dopo avere fatto emake installi to la doc.
Praticamente succede perche' la src_install di default e' la seguente
Code: | src_install() {
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
emake DESTDIR="${D}" install
fi
einstalldocs
} |
e il tuo problema e' la funzione einstalldocs che se controlli ha il pezzo
Code: |
...
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
... |
Il for cerca tutti i README e il tuo e' una cartella e quindi dodoc fallisce.
Un altro sistema e' anche dichiarare la variabile DOC all'inizio con tutti i file di doc che vuoi installare (vedi ad esempio dev-db/mysql-connector-c). _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Thu Nov 23, 2017 9:20 am Post subject: |
|
|
[quote="fedeliallalinea"]
Praticamente succede perche' la src_install di default e' la seguente
Code: | src_install() {
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
emake DESTDIR="${D}" install
fi
einstalldocs
} |
uffa. adesso ho girato l'ebuild in versione EAPI6 e ho preparato un src_install() un po' più intelligente.
mi sono anche accorto che il problema del ACCESS DENIED si può risolvere con l'istruzione addwrite /dev/random.
ma mi ha fatto questo:
Code: |
>>> Install root-6.10.08-r1 into /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/image/ category sci-physics
make -j5 -s DESTDIR=/tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08-r1/image/ install
Makefile:60: *** Please run ./configure first. Arresto.
|
praticamente, lo sciocco si è dimenticato che ho impostato cmake-utils in inherit e ha cercato di installare il contenuto di work/root-6.10.08 e non quello di work/root-6.10.08_build.
forse dovrei aggiungere il comando cmake-utils_src_install.
ma mi viene un dubbio: devo aggiungere questo comando prima o dopo di aver eseguito l'installazione (quasi manuale) dei docs? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Thu Nov 23, 2017 9:24 am Post subject: |
|
|
cloc3 wrote: | forse dovrei aggiungere il comando cmake-utils_src_install.
ma mi viene un dubbio: devo aggiungere questo comando prima o dopo di aver eseguito l'installazione (quasi manuale) dei docs? |
Di solito si mette prima _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Nov 27, 2017 8:18 am Post subject: |
|
|
sono arrivato a un ebuild che funzionicchia.
lo ho postato nel primo post in cima a questo thread.
l'ebuild rispetta le richieste che mi ero fissato:
- usa cmake, applicando (al meglio) la documentazione ufficiale;
- imposta di default la useflag root7 e la useflag cxx14;
inoltre, l'ebuild suggerisce un modo diverso di definire le useflag, evitando
l'uso estremo delle EXTRA_FLAGS suggerito dall'ebuild precedente.
io, infatti, ho costruito una variabile options che riporta esattamente
le flag contenute nel file configure del sorgente e quindi copre in modo
coerente e corretto le opzioni originarie.
per molti aspetti, tuttavia, mi restano dei dubbi.
- in certi punti ho emulato l'ebuild originario su aspetti che andrebbero
verificati e approfonditi meglio;
- sono riuscito a ottenere una compilazione completa, ma no ho potuto
verificare in modo esaustivo tutte le possibilità.
di conseguenza è ragionevole che il mio ebuild contenga dei bachi.
d'altra parte, sono sicuro che anche l'ebuild live contiene dei bachi (per
esempio, non compila con la useflag xinetd).
chissà, magari, se qualcuno ci dà un occhio, la cosa potrebbe tornare utile. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Mon Nov 27, 2017 8:45 am Post subject: |
|
|
Come mai hai commentato l'ecalss cmake-utils? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Nov 27, 2017 12:08 pm Post subject: |
|
|
fedeliallalinea wrote: | Come mai hai commentato l'ecalss cmake-utils? |
stai leggendo l'ebuild sbagliato.
quello era un lavoro iniziale.
in ogni caso, li è presente sia una riga con cmake-utils commentata (cioè un pasticcio), sia una riga cmake-utils non commentata (più sopra).
ho messo l'ebuild "vero" nel primissimo post del thread, in una finestra quote, in modo da lasciare sotto la discussione. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31300 Location: here
|
Posted: Mon Nov 27, 2017 12:19 pm Post subject: |
|
|
cloc3 wrote: | fedeliallalinea wrote: | Come mai hai commentato l'ecalss cmake-utils? |
stai leggendo l'ebuild sbagliato. |
Non l'ho visto perche' ha il tag quote. Potresti cambiarlo in code? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Nov 27, 2017 2:11 pm Post subject: |
|
|
fedeliallalinea wrote: | Potresti cambiarlo in code? |
fatto.
ho anche eliminato due righe di debug che mi erano scappate.
grazie per l'attenzione. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sun Dec 24, 2017 8:05 am Post subject: Re: ebuild per sci-physics/root |
|
|
cloc3 wrote: | era: ebuild per sci-physics/root :access denied
a quanto pare questo lungo thread è servito a qualcosa:
adesso è comparso un nuovo ebuild in github che tiene presente delle osservazioni fatte qui sotto.
se avete bisogno di compilare root non usate questi script ma cercate usate questo link:
ebuild per root.
---
il thread che segue ha portato a scrivere l'ebuild qui sotto, che comincia ad essere abbastanza funzionale e che cercherò di aggiornare successivamente.
si raccomanda di farne uso con cautela.
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
toolchain-funcs user versionator
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="
https://root.cern.ch/download/${PN}_v${PV}.source.tar.gz
"
SLOT="0/$(get_version_component_range 1-3 ${PV})"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
# options extracted from configure
options="
afdsmgrd \
afs \
alien \
alloc \
+asimage \
+astiff \
bonjour \
-builtin_afterimage \
-builtin_ftgl \
-builtin_freetype \
-builtin_gl2ps \
-builtin_glew \
-builtin_pcre \
-builtin_unuran \
-builtin_zlib \
-builtin_lzma \
-builtin_lz4 \
-builtin_llvm \
+cxx14 \
cxx17 \
cxxmodules \
libcxx \
castor \
chirp \
cocoa \
davix \
dcache \
+explicitlink \
fink \
+fftw3 \
+fitsio \
gviz \
+gdml \
+genvector \
geocad \
gfal \
glite \
globus \
+gsl_shared \
hdfs \
http \
imt \
krb5 \
ldap \
+mathmore \
+memstat \
+minuit2 \
monalisa \
+mysql \
odbc \
+opengl \
oracle \
pgsql \
pythia6 \
+pythia8 \
+python \
+qt \
+qtgsi \
+roofit \
+r \
ruby \
rfio \
+rpath \
search_usrlocal \
sapdb \
+shadowpw \
+shared \
+soversion \
sqlite \
srp \
+ssl \
+table \
tbb \
+tmva \
+unuran \
vc \
-werror \
winrtdebug \
+x11 \
+xft \
+xml \
+xrootd \
"
options="${options} all gminimal minimal +root7"
options+=" $EXTRA_ECONF"
IUSE="${options}"
IUSE="${IUSE} +X doc emacs examples fits
graphviz kerberos +math mpi openmp oracle postgres prefix
R +tiff xinetd zeroconf"
# TODO: patches and useflags tuning and testing are needed
CDEPEND="${CDEPEND}
app-arch/xz-utils:0=
>=dev-lang/cfortran-4.4-r2
dev-libs/libpcre:3=
media-fonts/dejavu
media-libs/freetype:2=
media-libs/libpng:0=
>=sys-devel/clang-3.4:=
sys-libs/ncurses:=
sys-libs/zlib:0=
X? (
media-libs/ftgl:0=
media-libs/glew:0=
x11-libs/libX11:0=
x11-libs/libXext:0=
x11-libs/libXpm:0=
|| (
media-libs/libafterimage[gif,jpeg,png,tiff?]
>=x11-wm/afterstep-2.2.11[gif,jpeg,png,tiff?]
)
opengl? ( virtual/opengl virtual/glu x11-libs/gl2ps:0= )
x11-libs/libXft:0=
)
afs? ( net-fs/openafs )
emacs? ( virtual/emacs )
fits? ( sci-libs/cfitsio:0= )
fftw3? ( sci-libs/fftw:3.0= )
geocad? ( <sci-libs/opencascade-6.8.0:= )
graphviz? ( media-gfx/graphviz:0= )
http? ( dev-libs/fcgi:0= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap:0= )
math? (
sci-libs/gsl:0=
sci-mathematics/unuran:0=
mpi? ( virtual/mpi )
)
mysql? ( virtual/mysql )
odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
oracle? ( dev-db/oracle-instantclient-basic:0= )
postgres? ( dev-db/postgresql:= )
pythia6? ( sci-physics/pythia:6= )
pythia8? ( >=sci-physics/pythia-8.1.80:8= )
python? ( ${PYTHON_DEPS} )
R? ( dev-lang/R )
shadowpw? ( virtual/shadow )
sqlite? ( dev-db/sqlite:3= )
ssl? ( dev-libs/openssl:0= )
xml? ( dev-libs/libxml2:2= )
xrootd? ( >=net-libs/xrootd-3.3.5:0= )
zeroconf? ( net-dns/avahi:0= )
"
DEPEND="
virtual/pkgconfig
"
RDEPEND="${CDEPEND}
xinetd? ( sys-apps/xinetd )"
PDEPEND="doc? ( ~app-doc/root-docs-${PV}[http=,math=] )"
# install stuff in ${P} and not ${PF} for easier tracking in root-docs
DOC_DIR="/usr/share/doc/${P}"
OC_UNSUPPORTED="6.8.0"
die_compiler() {
eerror "You are using a $(tc-getCXX)-$5 without C++$1 capabilities"
die "Need one of the following C++$1 capable compilers:\n"\
" >=sys-devel/gcc[cxx]-$2\n"\
" >=sys-devel/clang-$3\n"\
" >=dev-lang/icc-$4"
}
# check compiler to satisfy minimal versions
# $1 - std version
# $2 - g++
# $3 - clang++
# $4 - icc/icpc
check_compiler() {
local cur ver
case "$(tc-getCXX)" in
*clang++*)
ver="$(best_version sys-devel/clang | sed 's:sys-devel/clang-::')"
cur="$3"
;;
*g++*)
ver="$(gcc-version)"
cur="$2"
;;
*icc*|*icpc*)
ver="$(best_version dev-lang/icc | sed 's:dev-lang/icc-::')"
eerror "ROOT-6 is known not to build with ICC."
eerror "Please report any issues upstream."
cur="$4"
;;
*)
ewarn "You are using an unsupported compiler."
ewarn "Please report any issues upstream."
return 0
;;
esac
version_is_at_least "${cur}" "${ver}" || die_compiler "$1" "$2" "$3" "$4" "${ver}"
}
pkg_setup() {
fortran-2_pkg_setup
use python && python-single-r1_pkg_setup
echo
elog "There are extra options on packages not yet in Gentoo:"
elog "Afdsmgrd, AliEn, castor, Chirp, dCache, gfal, Globus, gLite,"
elog "HDFS, Monalisa, MaxDB/SapDB, SRP."
elog "You can use the env variable EXTRA_ECONF variable for this."
elog "For example, for SRP, you would set: "
elog "EXTRA_ECONF=\"--enable-srp --with-srp-libdir=${EROOT%/}/usr/$(get_libdir)\""
echo
enewgroup rootd
enewuser rootd -1 -1 /var/spool/rootd rootd
if use math; then
if use openmp; then
if [[ "$(tc-getCXX)" == *g++* && "$(tc-getCXX)" != *clang++* ]] && ! tc-has-openmp; then
ewarn "You are using a g++ without OpenMP capabilities"
die "Need an OpenMP capable compiler"
else
export USE_OPENMP=1 USE_PARALLEL_MINUIT2=1
fi
elif use mpi; then
export USE_MPI=1 USE_PARALLEL_MINUIT2=1
fi
fi
# c++11 support is mandatory
check_compiler "11" "4.8" "3.4" "13"
# Active version of opencascade may be >= $OC_UNSUPPORTED,
# so we need to eselect proper version (it must exist due to DEPEND requirement)
if use geocad; then
oc_current=$(eselect opencascade show)
# Proceed only if active version is unsupported
if version_is_at_least "${OC_UNSUPPORTED}" "${oc_current}"; then
local -a vlist
vlist=( $(version_sort $(eselect opencascade list | awk '/^ / { print $2 }')) )
local i
# search for higehr version < $OC_UNSUPPORTED
# list is sorted acsending, so loop backwards
for (( i=$(( ${#vlist[@]} -1 )); i>=0; i-- )); do
version_is_at_least "${OC_UNSUPPORTED}" "${vlist[i]}" || break
done
[[ $i == "-1" ]] && die "No suitable opencascade eselect slot is available (<${OC_UNSUPPORTED})"
einfo "Switching opencascade to supported slot: ${oc_current} -> ${vlist[i]}"
eselect opencascade set ${vlist[i]} > /dev/null || die "eselect opencascade set ${vlist[i]} failed!"
else
# forget it, effectively disabling eselect cleanup
unset oc_current
fi
fi
}
PATCHES=(
"${FILESDIR}/${PN}-5.32.00-afs.patch" \
"${FILESDIR}/${PN}-5.32.00-cfitsio.patch" \
"${FILESDIR}/${PN}-5.28.00b-glibc212.patch" \
"${FILESDIR}/${PN}-5.32.00-chklib64.patch" \
"${FILESDIR}/${PN}-6.00.01-dotfont.patch" \
"${FILESDIR}/${PN}-6.04.06-prop-flags.patch" \
)
PROPERTIES="interactive"
export CMAKE_BUILD_TYPE="Release"
src_prepare() {
# make sure we use system libs and headers
rm montecarlo/eg/inc/cfortran.h README/cfortran.doc || die
LANG=C LC_ALL=C find core/zip -type f -name "[a-z]*" -print0 | \
xargs -0 rm || die
rm -r core/lzma/src/*.tar.gz || die
sed -i -e 's/^GLLIBS *:= .* $(OPENGLLIB)/& -lgl2ps/' \
graf3d/gl/Module.mk || die
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
configure || die "adjusting configure for Gentoo failed"
default
}
src_configure() {
local mycmakeargs=(
-DWITH_root7=ON \
-DWITH_cxx14=ON \
-DWITH_builtin_afterimage=OFF \
-DWITH_builtin_ftgl=OFF \
-DWITH_builtin_freetype=OFF \
-DWITH_builtin_glew=OFF \
-DWITH_builtin_lzma=OFF \
-DWITH_builtin_pcre=OFF \
-DWITH_builtin_zlib=OFF \
-DWITH_explicitlink=ON \
-DWITH_soversion=ON \
-DWITH_fail-on-missing=ON \
)
for i in ${options}; do {
i=${i/-/}
i=${i/+/}
if use ${i}; then {
echo ON $i
mycmakeargs+="-DWITH_${i}=ON "
}
else {
echo OFF $i
mycmakeargs+="-DWITH_${i}=OFF "
}
fi
} done
CMAKE_C_FLAGS="${CFLAGS}"
CMAKE_CXX_FLAGS="${CXXFLAGS}"
CMAKE_CXX_LINK_FLAGS=${LDFLAGS}
CMAKE_Fortran_FLAGS="${FFLAGS}"
CMAKE_INSTALL_TUTDIR="${EPREFIX%/}/${DOC_DIR}/examples/tutorials"
CMAKE_INSTALL_TESTDIR="${EPREFIX%/}/${DOC_DIR}/examples/tests"
CMAKE_INSTALL_ICONDIR="${EPREFIX%/}/usr/share/pixmaps"
addwrite /dev/random
cmake-utils_src_configure
}
daemon_install() {
local daemons="rootd proofd"
dodir /var/spool/rootd
fowners rootd:rootd /var/spool/rootd
dodir /var/spool/rootd/{pub,tmp}
fperms 1777 /var/spool/rootd/{pub,tmp}
local i
for i in ${daemons}; do
newinitd "${FILESDIR}"/${i}.initd ${i}
newconfd "${FILESDIR}"/${i}.confd ${i}
done
if use xinetd; then
insinto /etc/xinetd
sed -e 's|@bindir@|/usr/bin/|' \
-e 's|@prefix@|/usr|' \
< ./config/rootd.xinetd.in > ${S}"/etc/daemons/rootd.xinetd"
sed -e 's|@bindir@|/usr/bin/|' \
-e 's|@prefix@|/usr|' \
< ./config/proofd.xinetd.in > ${S}"/etc/daemons/proofd.xinetd"
doins "${S}"/etc/daemons/{rootd,proofd}.xinetd
fi
}
desktop_install() {
cd "${S}"
echo "Icon=root-system-bin" >> etc/root.desktop
domenu etc/root.desktop
doicon build/package/debian/root-system-bin.png
insinto /usr/share/icons/hicolor/48x48/mimetypes
doins build/package/debian/application-x-root.png
insinto /usr/share/icons/hicolor/48x48/apps
doicon build/package/debian/root-system-bin.xpm
}
cleanup_install() {
rm "${D}"/usr/LICENSE
rm "${D}"/usr/lib64/libGLEW.so
rm "${D}"/usr/include/GL/glew.h
rm "${D}"/usr/include/GL/glxew.h
}
src_install() {
DOCS=($(find README/* -maxdepth 1 -type f))
insinto "${DOC_DIR}"
doins README.md
# /bin/bash -i
cmake-utils_src_install
daemon_install
desktop_install
cleanup_install
docompress -x "${DOC_DIR}"/{CREDITS,LICENSE,examples/tutorials}
dosym "${ED}"usr/portage/licenses/LGPL-2.1 "${DOC_DIR}/LICENSE"
}
|
sto cercando di produrre un ebuild per sci-physics/root visto che quello attuale è obsoleto.
in linea di principio, non dovrebbe essere una impresa impossibile, perché il software è ottimamente documentato.
in effetti, le istruzioni sono più che sufficienti per concludere felicemente la compilazione manuale in una cartella dedicata, a patto di introdurre le opzioni -Droot7=ON -Dcxx14=ON, necessarie per una installazione con gcc-5 o superiore.
appena provo a lanciare la compilazione in un ebuild, tuttavia, ottengo questo stupido errore:
Code: |
Scanning dependencies of target hsimple
[ 89%] Generating tutorials/hsimple.root
Processing hsimple.C...
* ACCESS DENIED: open_wr: /dev/random
open('/dev/random'): Permission denied
...
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: open_wr
S: deny
P: /dev/random
A: /dev/random
R: /dev/random
C: /tmp/ramtmp/.lnv/portage/sci-physics/root-6.10.08/work/root-6.10.08_build/bin/root.exe -l -q -b -n -x hsimple.C -e return
* --------------------------------------------------------------------------------
|
è colpa di uno stupido demo (hsimple.C) che probabilmente non dovrebbe neppure essere lanciato, ma che non riesco a eliminare.
se commento la riga che lo lancia (con una patch), infatti, nascono altri errori.
che cosa si può fare, in questi casi?
aggiungo anche l'ebuild, del tutto maccheronico, che sto usando.
il fatto che sia maccheronico, tuttavia, non è probabilmente una concausa del problema che sto descrivendo.
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit epatch cmake-utils
#elisp-common eutils fdo-mime fortran-2 multilib python-single-r1 \
# toolchain-funcs user versionator
DESCRIPTION="C++ data analysis framework and interpreter from CERN"
HOMEPAGE="https://root.cern.ch"
SRC_URI="
https://root.cern.ch/download/root_v6.10.08.source.tar.gz
"
LICENSE="LGPL-2.1 freedist MSttfEULA LGPL-3 libpng UoI-NCSA"
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""
SLOT="0/$(get_version_component_range 1-3 ${PV})"
# TODO: ...
CDEPEND=""
DEPEND="${CDEPEND}
virtual/pkgconfig"
RDEPEND="${CDEPEND}
"
#inherit eutils cmake-utils
export CMAKE_BUILD_TYPE="Release"
pkg_setup() {
fortran-2_pkg_setup
}
src_prepare() {
#epatch "${FILESDIR}"/root-6.10.08_exe.patch
# In Gentoo, libPythia6 is called libpythia6
# iodbc is in /usr/include/iodbc
# pg_config.h is checked instead of libpq-fe.h
sed -i \
-e 's:libPythia6:libpythia6:g' \
-e 's:$ODBCINCDIR:$ODBCINCDIR /usr/include/iodbc:' \
-e 's:libpq-fe.h:pg_config.h:' \
#configure || die "adjusting configure for Gentoo failed"
#rm tutorials -rf || die
}
src_configure() {
mkdir ../root-6.10.08_build
cd ../root-6.10.08_build
cmake -Droot7=ON -Dcxx14=ON ../root-6.10.08
}
|
|
_________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4808 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sun Dec 24, 2017 8:08 am Post subject: |
|
|
meraviglioso .
è comparso in github e in portage un ebuild che implementa le osservazioni contenute in questo thread in un modo molto migliore di quello che saprei fare io.
il nuovo ebuild usa le cmake-utils e introduce un modo di includere le useflag simile a quello che proponevo io.
c'è anche root7. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|