1 |
On Fri, 18 Sep 2015 10:36:02 +0200 |
2 |
hasufell <hasufell@g.o> wrote: |
3 |
|
4 |
> How about something like |
5 |
> |
6 |
> case ${EAPI} in |
7 |
> 5) : ;; |
8 |
> *) die "EAPI=${EAPI:-0} is not supported" ;; |
9 |
> esac |
10 |
> |
11 |
> to force people to stay up2date... then you can also drop most of |
12 |
> those redunant "|| die"s for EAPI functions |
13 |
> |
14 |
|
15 |
|
16 |
ewww yes, thanks, I thought about this but somehow forgot it |
17 |
afterwards... |
18 |
|
19 |
just some note: I don't think it's eclasses role to "force" people to |
20 |
stay up to date, but rather to declare what eapi doesn't work with it, |
21 |
which in this case is anything before 5. |
22 |
|
23 |
fixed locally anyway |
24 |
|
25 |
> > |
26 |
> > IUSE="test" |
27 |
> > RDEPEND=" |
28 |
> > dev-util/catkin${CATKIN_PYTHON_USEDEP} |
29 |
> > dev-python/empy${CATKIN_PYTHON_USEDEP} |
30 |
> > " |
31 |
> > DEPEND="${RDEPEND}" |
32 |
> > |
33 |
> > if [ -n "${CATKIN_DO_PYTHON_MULTIBUILD}" ] ; then |
34 |
> > RDEPEND="${RDEPEND} dev-lang/python-exec:2" |
35 |
> > fi |
36 |
> > |
37 |
> > # @ECLASS-VARIABLE: CATKIN_HAS_MESSAGES |
38 |
> > # @DESCRIPTION: |
39 |
> > # Set it to a non-empty value before inherit to tell the eclass the |
40 |
> > package has messages to build. # Messages will be built based on |
41 |
> > ROS_MESSAGES USE_EXPANDed variable. |
42 |
> > |
43 |
> > # @ECLASS-VARIABLE: CATKIN_MESSAGES_TRANSITIVE_DEPS |
44 |
> > # @DESCRIPTION: |
45 |
> > # Some messages have dependencies on other messages. |
46 |
> > # In that case, CATKIN_MESSAGES_TRANSITIVE_DEPS should contain a |
47 |
> > space-separated list of atoms # representing those dependencies. |
48 |
> > The eclass uses it to ensure proper dependencies on these packages. |
49 |
> > if [ -n "${CATKIN_HAS_MESSAGES}" ] ; then IUSE="${IUSE} |
50 |
> > +ros_messages_python +ros_messages_cxx ros_messages_eus |
51 |
> > ros_messages_lisp" RDEPEND="${RDEPEND} ros_messages_cxx? |
52 |
> > ( dev-ros/gencpp:=${CATKIN_PYTHON_USEDEP} ) ros_messages_eus? |
53 |
> > ( dev-ros/geneus:=${CATKIN_PYTHON_USEDEP} ) ros_messages_python? |
54 |
> > ( dev-ros/genpy:=${CATKIN_PYTHON_USEDEP} ) ros_messages_lisp? |
55 |
> > ( dev-ros/genlisp:=${CATKIN_PYTHON_USEDEP} ) dev-ros/message_runtime |
56 |
> > " |
57 |
> > DEPEND="${DEPEND} ${RDEPEND} |
58 |
> > dev-ros/message_generation |
59 |
> > dev-ros/genmsg${CATKIN_PYTHON_USEDEP} |
60 |
> > " |
61 |
> > if [ -n "${CATKIN_MESSAGES_TRANSITIVE_DEPS}" ] ; then |
62 |
> > for i in ${CATKIN_MESSAGES_TRANSITIVE_DEPS} ; do |
63 |
> > ds="${i}[ros_messages_python?,ros_messages_cxx?,ros_messages_lisp?,ros_messages_eus?] |
64 |
> > ros_messages_python? ( ${i}[${PYTHON_USEDEP}] )" |
65 |
> > RDEPEND="${RDEPEND} ${ds}" DEPEND="${DEPEND} ${ds}" |
66 |
> > done |
67 |
> > fi |
68 |
> > fi |
69 |
> > |
70 |
> |
71 |
> Keep in mind what this implies when you change these dependencies |
72 |
> without bumping the ebuilds that use them. |
73 |
|
74 |
only way i see these changing is with a new ros_messages_*** useflag, |
75 |
which will cause a rebuild anyway |
76 |
|
77 |
> > |
78 |
> > # @FUNCTION: ros-catkin_src_test_internal |
79 |
> > # @DESCRIPTION: |
80 |
> > # Decorator around cmake-utils_src_test to ensure tests are built |
81 |
> > before running them. ros-catkin_src_test_internal() { |
82 |
> > cd "${BUILD_DIR}" |
83 |
> |
84 |
> here is definitely a "|| die" missing, alternatively |
85 |
|
86 |
yup thx |
87 |
|
88 |
> emake -C "${BUILD_DIR}" ... |
89 |
> should work too and it seems cmake-utils_src_test already switches to |
90 |
> "${BUILD_DIR}" (with missing error handling, lol) |
91 |
> |
92 |
> > |
93 |
> > # @FUNCTION: ros-catkin_src_install_with_python |
94 |
> > # @DESCRIPTION: |
95 |
> > # Decorator around cmake-utils_src_install to ensure python scripts |
96 |
> > are properly handled w.r.t. python-exec2. |
97 |
> > ros-catkin_src_install_with_python() { python_export |
98 |
> > PYTHON_SCRIPTDIR cmake-utils_src_install |
99 |
> > if [ ! -f "${T}/.catkin_python_symlinks_generated" -a -d |
100 |
> > "${D}/${PYTHON_SCRIPTDIR}" ]; then dodir /usr/bin |
101 |
> > for i in "${D}/${PYTHON_SCRIPTDIR}"/* ; do |
102 |
> > dosym ../lib/python-exec/python-exec2 |
103 |
> > "/usr/bin/${i##*/}" || die done |
104 |
> > touch "${T}/.catkin_python_symlinks_generated" |
105 |
> |
106 |
> touch can fail too, e.g. if the directory does not exist, so "|| die" |
107 |
> seems to make sense too |
108 |
|
109 |
I think $T is guaranteed to exist, but die doesnt hurt, so added |
110 |
locally too |
111 |
|
112 |
|
113 |
|
114 |
thx for the review |