dev-libs/gbinder: bug fixes for gbinder: fixed ranlib, debug and user optimisations, fixed tests

Closes: https://bugs.gentoo.org/843899
Closes: https://bugs.gentoo.org/843902
Closes: https://bugs.gentoo.org/887297
Closes: https://bugs.gentoo.org/859736
Closes: https://bugs.gentoo.org/887299
Signed-off-by: Denis Reva <denis7774@gmail.com>
This commit is contained in:
Denis Reva
2022-12-20 16:07:43 +05:00
parent cf0304f9f3
commit 26ec25c825
2 changed files with 70 additions and 3 deletions

View File

@@ -0,0 +1,49 @@
diff --git a/Makefile b/Makefile
index e838b7e..adb886f 100644
--- a/Makefile
+++ b/Makefile
@@ -140,15 +140,15 @@ DEBUG_FLAGS = -g
RELEASE_FLAGS =
COVERAGE_FLAGS = -g
-KEEP_SYMBOLS ?= 0
-ifneq ($(KEEP_SYMBOLS),0)
-RELEASE_FLAGS += -g
-endif
+#KEEP_SYMBOLS ?= 0
+#ifneq ($(KEEP_SYMBOLS),0)
+#RELEASE_FLAGS += -g
+#endif
DEBUG_LDFLAGS = $(FULL_LDFLAGS) $(DEBUG_LIBS) $(DEBUG_FLAGS)
RELEASE_LDFLAGS = $(FULL_LDFLAGS) $(RELEASE_LIBS) $(RELEASE_FLAGS)
DEBUG_CFLAGS = $(FULL_CFLAGS) $(DEBUG_FLAGS) -DDEBUG
-RELEASE_CFLAGS = $(FULL_CFLAGS) $(RELEASE_FLAGS) -O2
+RELEASE_CFLAGS = $(FULL_CFLAGS) $(RELEASE_FLAGS)
COVERAGE_CFLAGS = $(FULL_CFLAGS) $(COVERAGE_FLAGS) --coverage
#
@@ -274,17 +274,17 @@ $(DEBUG_SO): $(DEBUG_OBJS)
$(RELEASE_SO): $(RELEASE_OBJS)
$(LD) $(RELEASE_OBJS) $(RELEASE_LDFLAGS) -o $@
-ifeq ($(KEEP_SYMBOLS),0)
- $(STRIP) $@
-endif
+#ifeq ($(KEEP_SYMBOLS),0)
+# $(STRIP) $@
+#endif
$(DEBUG_LIB): $(DEBUG_OBJS)
$(AR) rc $@ $?
ranlib $@
-$(RELEASE_LIB): $(RELEASE_OBJS)
- $(AR) rc $@ $?
- ranlib $@
+$(RELEASE_LIB): $(RELEASE_OBJS)
+ $(AR) rc $@ $?
+ ranlib $@
$(DEBUG_LINK):
ln -sf $(LIB_SO) $@

View File

@@ -3,6 +3,8 @@
EAPI=8
inherit toolchain-funcs
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/mer-hybris/libgbinder.git"
@@ -18,15 +20,31 @@ DESCRIPTION="GLib-style interface to binder"
HOMEPAGE="https://github.com/mer-hybris/libgbinder"
LICENSE="BSD"
SLOT="0"
IUSE=""
DEPEND="dev-libs/libglibutil"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
BDEPEND="virtual/pkgconfig
sys-apps/sed"
PATCHES=(
"${FILESDIR}/gbinder-1.1.30-respect-env.patch"
)
src_prepare() {
default
sed -i -e "s|ranlib|$(tc-getRANLIB)|" \
Makefile \
|| die
}
src_compile() {
emake KEEP_SYMBOLS=1 ABS_LIBDIR="/usr/$(get_libdir)" LIBDIR="/usr/$(get_libdir)"
emake LIBDIR="/usr/$(get_libdir)"
}
src_install() {
emake DESTDIR="${D}" ABS_LIBDIR="/usr/$(get_libdir)" LIBDIR="/usr/$(get_libdir)" install-dev
emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" install-dev
}
src_test() {
emake test
}