Skip to content

Commit

Permalink
dev-ada/xmlada: Fix and simplify install
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.40, Repoman-2.3.9
  • Loading branch information
atupone committed Jun 28, 2018
1 parent bca84ff commit bcb3755
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions dev-ada/xmlada/xmlada-2018.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,23 @@ src_test() {
}

src_install () {
local includedir=/usr/include/${PN}

fix_install () {
mv "${D}"${includedir}/$1.$2/* "${D}"${includedir}/$1/ || die
for file in "${D}"${includedir}/$1/*; do
dosym ../$1/$(basename ${file}) \
${includedir}/$1.$2/$(basename ${file})
done
build () {
gprinstall -XLIBRARY_TYPE=$1 -f -p -XBUILD=Production \
-XPROCESSORS=$(makeopts_jobs) --prefix="${D}"usr \
--install-name=xmlada --build-var=LIBRARY_TYPE \
--build-var=XMLADA_BUILD \
--build-name=$1 xmlada.gpr || die "gprinstall failed"
}

if use shared; then
build relocatable
fi
if use static-libs; then
emake PROCESSORS=$(makeopts_jobs) install-static
build static
fi
for kind in shared static-pic; do
if use ${kind}; then
emake PROCESSORS=$(makeopts_jobs) install-${kind}
fi
done
rm "${D}"/usr/lib/libxmlada_* || die
for dir in xmlada_{dom,input,sax,schema,unicode}; do
dodir /usr/include/${PN}/${dir}
if use shared; then
fix_install ${dir} relocatable
fi
if use static-libs; then
fix_install ${dir} static
fi
if use static-pic; then
fix_install ${dir} static-pic
fi
done
if use static-pic; then
build static-pic
fi

einstalldocs
dodoc xmlada-roadmap.txt
rm "${D}"/usr/share/doc/${PN}/.buildinfo || die
Expand Down

0 comments on commit bcb3755

Please sign in to comment.