Skip to content

Commit

Permalink
dev-ada/gps: version bump to 2019
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Alfredo Tupone <[email protected]>
  • Loading branch information
atupone committed Nov 17, 2019
1 parent 037150d commit 558b74f
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-ada/gps/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
DIST ada_language_server-2019-src.tar.gz 169018 BLAKE2B 3ed7412773887f6ebe58a8b08a6befa8be780d10c1abb3a38f524918fb60d7213699e2c7a2cd845d5dd154f9eccf8672ce8833e408dcdaa3621d173a0a8e5818 SHA512 dd25878719c5237c2f1e01097076758f25a350705a58c2988ff3e92179ceaf659981cdd0887df9916e4c1e2226419ebd526f14716da4d3fda0fcf454b9122d37
DIST gps-gpl-2018-src.tar.gz 40541905 BLAKE2B abe38dd23d9afede27b4ec8294e3245c12d52d60491b6e7c1b2d120a6f1e5d808fdcfb648e72da31376e2de176f7a039c5493341ad295db33b6a1ce44bb64096 SHA512 da0eaa85eb753f215354c9765272d85378f36ebe207314bab9211642f9d9b505a3d05cdec9de6964ae9139c4f8942a29e06c72db32b2aeb053a694e9c982e470
DIST gps-gpl-2019-src.tar.gz 13758956 BLAKE2B 71158537d9d970b97db06c1a5ed40cfec2f7c8523dbced763227463450b4fd469817abcd61339cde96a13bb2b721141339b15444e55bdc64cee7ed2458fd42ed SHA512 4420311303122fd365794830fb7a7868832b8211804d6e11773f598c307229b139993b3c81d91646f7b5aa9a7fba118895234c4ac89193d960dd3170a04e52a7
DIST gtk+-3.14.15-src.tar.gz 32009863 BLAKE2B 93c6897c431fa8e1c19ea758378bc7e365d486d1decccefbba64876d8c51a488e6bcf932481daa11e7e43a960a328c3db746e41a845e574c6b6070ab71e23188 SHA512 add4607a1758319a938d2be0bbd0dd140c4099accffa9301e3049bc460bf94f395c5a092368214e8b28d53bc25335d1b8329b50c7eb80a1e9a65b2e154135b84
DIST libadalang-tools-2019-20190517-195C4-src.tar.gz 625775 BLAKE2B 2ec69e307576c505d20a43d229b13404966f4442778e5390da327ae71cc065873de4fff03a720949fa6bfb5ce66f405e7d45f7f0c21032a639efcff208323aed SHA512 b7368606847244cbb08ff2111fabfbfc8a9aa7f58e953febc70838006d94711dba1fd75bfb69ed2081a37a2dfaaad46097127870696c882d7cc54de5d7b051a1
DIST libadalang-tools-gpl-2018-src.tar.gz 19938182 BLAKE2B 34104f3bc43c165a9b74ba8c0c03ee2f34686bcd06b5ced730f70f654d8b808e129a85566e081830b4f20304c793eefe0af81b56984cf06190302ad2f6a419be SHA512 a1176575944cd88b9da5f4e9f03caa1a4d09358df71e6a91300d0b35c2a843d0ea1a77fbd93e7b7f16cef1b978022ee20991f5c2ff74f7d05878c3de1220f2b5
77 changes: 77 additions & 0 deletions dev-ada/gps/files/gps-2019-gentoo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
--- a/gps/Makefile 2018-07-09 20:27:34.950424490 +0200
+++ b/gps/Makefile 2018-07-09 20:37:39.510558817 +0200
@@ -47,7 +47,8 @@
for f in ../kernel/generated/*; do cat $$f | tr -d '\015' > $$f-aux; mv -f $$f-aux $$f; done
endif
$(GPRBUILD) $(GPRBUILD_FLAGS) -m -p -ws \
- $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 --libs`
+ $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 --libs` -lpython2.7 \
+ -cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS}

resources:
ifeq ($(OS),Windows_NT)
--- a/Makefile.in 2018-07-09 21:51:08.422550386 +0200
+++ b/Makefile.in 2018-07-09 21:51:32.187225891 +0200
@@ -10,7 +10,7 @@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
GNATCOLL_INSTALL = @GNATCOLL_INSTALL@
-prefix = @prefix@
+prefix = $(DESTDIR)@prefix@
bindir = $(prefix)/bin
sharedir = $(prefix)/share
examplesdir = $(prefix)/share/examples/gps
--- a/docs/Makefile.in 2018-07-09 21:53:33.074572729 +0200
+++ b/docs/Makefile.in 2018-07-09 21:53:52.149311484 +0200
@@ -1,4 +1,4 @@
-prefix = @prefix@
+prefix = $(DESTDIR)@prefix@
docdir = $(prefix)/share/doc/gps
sharedir = $(prefix)/share/gps

--- a/share/support/core/toolchains.py 2018-07-11 12:15:18.758674244 +0200
+++ b/share/support/core/toolchains.py 2018-07-11 12:20:20.389220849 +0200
@@ -16,11 +16,11 @@
nullified by using an empty value in the corresponding tag
-->
<toolchain_default>
- <gnat_driver>gnat</gnat_driver>
- <gnat_list>gnatls</gnat_list>
+ <gnat_driver>@GNAT@</gnat_driver>
+ <gnat_list>@GNATLS@</gnat_list>
<debugger>gdb</debugger>
<cpp_filt>c++filt</cpp_filt>
- <compiler lang="ada">gnatmake</compiler>
+ <compiler lang="ada">@GNATMAKE@</compiler>
<compiler lang="c">gcc</compiler>
<compiler lang="c++">g++</compiler>
<compiler lang="asm">gcc</compiler>
--- a/share/support/core/projects.py 2018-07-11 13:49:29.631289680 +0200
+++ b/share/support/core/projects.py 2018-07-11 13:51:46.568252607 +0200
@@ -146,7 +146,7 @@
<string />
</index>
<specialized_index value="Ada">
- <choice default="true" >gnatmake</choice>
+ <choice default="true" >@GNATMAKE@</choice>
</specialized_index>
</project_attribute>

@@ -166,7 +166,7 @@
description="The gnatls command used to find where the Ada run time files are installed (including optional arguments, e.g. gnatls --RTS=sjlj)."
hide_in="all"
label="Gnatls">
- <choice default="true" >gnatls</choice>
+ <choice default="true" >@GNATLS@</choice>
<string />
</project_attribute>

@@ -206,7 +206,7 @@
description="The gnat driver used to run the various commands associated with the GNAT toolchain."
hide_in="all"
label="GNAT">
- <choice default="true" >gnat</choice>
+ <choice default="true" >@GNAT@</choice>
<string />
</project_attribute>

114 changes: 114 additions & 0 deletions dev-ada/gps/gps-2019.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
PYTHON_COMPAT=( python2_7 )
ADA_COMPAT=( gnat_2018 )
inherit ada python-single-r1 autotools desktop llvm multilib

MYP=${PN}-gpl-${PV}-src

commitId="8606676b6b4fb245faad5e91127b15c2e61174e9"
alsId="286f2d6bb14ccd4583034b26fd923e1b80cf522c"

DESCRIPTION="The GNAT Programming Studio"
HOMEPAGE="http://libre.adacore.com/tools/gps/"
SRC_URI="https://github.com/AdaCore/${PN}/archive/${commitId}.tar.gz
-> ${MYP}.tar.gz
http://mirrors.cdn.adacore.com/art/5cdf8f4e31e87a8f1d42509f
-> libadalang-tools-2019-20190517-195C4-src.tar.gz
https://github.com/AdaCore/ada_language_server/archive/${alsId}.tar.gz
-> ada_language_server-2019-src.tar.gz
http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a61 ->
gtk+-3.14.15-src.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="${PYTHON_DEPS}
dev-ada/gnatcoll-db[${ADA_USEDEP},db2ada,gnatinspect,xref]
dev-ada/gnatcoll-bindings[${ADA_USEDEP},python]
~dev-ada/gtkada-2019[${ADA_USEDEP}]
~dev-ada/libadalang-2019[${ADA_USEDEP}]
dev-libs/gobject-introspection
dev-libs/libffi
|| (
sys-devel/llvm:6
sys-devel/llvm:7
)
sys-devel/clang:=
x11-themes/adwaita-icon-theme
x11-themes/hicolor-icon-theme
dev-python/pep8[${PYTHON_USEDEP}]
dev-python/jedi[${PYTHON_USEDEP}]"

DEPEND="${RDEPEND}"

REQUIRED_USE="${PYTHON_REQUIRED_USE}
${ADA_REQUIRED_USE}"

RESTRICT="test"

S="${WORKDIR}"/${PN}-${commitId}

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )

pkg_setup() {
LLVM_MAX_SLOT=7
llvm_pkg_setup
python-single-r1_pkg_setup
ada_pkg_setup
}

src_prepare() {
default
sed -i \
-e "s:@GNATMAKE@:${GNATMAKE}:g" \
-e "s:@GNAT@:${GNAT}:g" \
-e "s:@GNATLS@:${GNATLS}:g" \
share/support/core/toolchains.py \
share/support/core/projects.py \
|| die
mv "${WORKDIR}"/libadalang-tools-2019-20190517-195C4-src laltools
mv "${WORKDIR}"/ada_language_server-${alsId} ada_language_server
echo "#!/bin/bash" > gps.sh
echo "export LD_LIBRARY_PATH=/usr/$(get_libdir)/gps" >> gps.sh
echo 'exec /usr/bin/gps_exe "$@"' >> gps.sh
cd ../gtk+-3.14.15-src
sed -i \
-e "/^libadd/s:=.*$:= \\\:" \
-e "/^deps/s:=.*$:= \\\:" \
../gtk+-3.14.15-src/gtk/Makefile.in
}

src_configure() {
econf \
--with-clang=$(llvm-config --libdir)
cd ../gtk+-3.14.15-src
econf --disable-cups
}

src_compile() {
emake -C gps GPRBUILD_FLAGS="-v ${MAKEOPTS} \
-XGPR_BUILD=relocatable" \
Build=Production
gprbuild -v -p -Pcli/cli.gpr ${MAKEOPTS} -XLIBRARY_TYPE=relocatable \
-XGPR_BUILD=relocatable -cargs:Ada ${ADAFLAGS} || die
cd ../gtk+-3.14.15-src
emake -C gtk/inspector
emake -C gtk gtk.gresource.xml gtkdbusgenerated.c gtkdbusgenerated.h
emake -C gtk libgtk-3.la
}

src_install() {
default
make_desktop_entry "${PN}" "GPS" "${EPREFIX}/usr/share/gps/icons/hicolor/32x32/apps/gps_32.png" "Development;IDE;"
mv "${D}"/usr/bin/gps{,_exe}
newbin gps.sh gps
cd ../gtk+-3.14.15-src
emake -C gtk DESTDIR="${D}" install-libLTLIBRARIES
rm "${D}"/usr/$(get_libdir)/libgtk-3.{la,so,so.0} || die
dosym ../libgtk-3.so.0.1400.15 /usr/$(get_libdir)/gps/libgtk-3.so.0
}

0 comments on commit 558b74f

Please sign in to comment.