Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458978 - dev-libs/libnsfb - add USE="sdl vnc xcb"
Summary: dev-libs/libnsfb - add USE="sdl vnc xcb"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Michael Weber (RETIRED)
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-02-24 12:48 UTC by Another Mortal
Modified: 2013-02-28 18:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Add USE="vnc sdl xcb" to libnsfb-0.0.2 (0.0.2.patch,1.05 KB, patch)
2013-02-24 12:54 UTC, Another Mortal
Details | Diff
Add USE="vnc sdl xcb" to libnsfb-9999 (9999.patch,1.03 KB, patch)
2013-02-24 12:54 UTC, Another Mortal
Details | Diff
fix building netsurf-2.9 against libnsfb-9999 (netsurf-libnsfb-cursor.patch,836 bytes, patch)
2013-02-28 18:52 UTC, Another Mortal
Details | Diff
companion patch to netsurf-2.9.ebuild (ebuild.patch,439 bytes, patch)
2013-02-28 18:54 UTC, Another Mortal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2013-02-24 12:48:16 UTC
libnsfb does not need to depend on vnc, sdl and/or xcb.
The way the Makefile is constructed, it will use these
packages _whenever they are present_ on the system, but
doesn't really requires any of those three.

Personally, I want only Linux framebuffer support and
don't have space on my 32MB SD-card for all the extra
libraries.  (-;

I'm attaching patches to make those dependencies
optional via USE flags (the gentoo way ;-)).

Reproducible: Always
Comment 1 Another Mortal 2013-02-24 12:54:03 UTC
Created attachment 339934 [details, diff]
Add USE="vnc sdl xcb" to libnsfb-0.0.2
Comment 2 Another Mortal 2013-02-24 12:54:20 UTC
Created attachment 339936 [details, diff]
Add USE="vnc sdl xcb" to libnsfb-9999
Comment 3 Michael Weber (RETIRED) gentoo-dev 2013-02-27 07:42:51 UTC
Amazing sed statements, it creates folling diff.
IMHO the second part should define NSFB_XCB_UTIL_AVAILABLE but redefines NSFB_XCB_AVAILABLE.

--- /tmp/portage/dev-libs/libnsfb-0.0.2/work/libnsfb-0.0.2/Makefile.orig        2013-02-27 08:22:36.589000000 +0100
+++ /tmp/portage/dev-libs/libnsfb-0.0.2/work/libnsfb-0.0.2/Makefile     2013-02-27 08:22:36.707000000 +0100
@@ -20,9 +20,12 @@
 
 NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms
 
-$(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
-$(eval $(call pkg_config_package_available,NSFB_SDL_AVAILABLE,sdl))
-$(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
+#$(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
+NSFB_VNC_AVAILABLE := no
+#$(eval $(call pkg_config_package_available,NSFB_SDL_AVAILABLE,sdl))
+NSFB_SDL_AVAILABLE := yes
+#$(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
+NSFB_XCB_AVAILABLE := yes
 
 ifeq ($(NSFB_SDL_AVAILABLE),yes)
   $(eval $(call pkg_config_package_add_flags,sdl,CFLAGS))
@@ -63,7 +66,8 @@
 
   REQUIRED_PKGS := $(REQUIRED_PKGS) $(NSFB_XCB_PKG_NAMES)
 
-  $(eval $(call pkg_config_package_available,NSFB_XCB_UTIL_AVAILABLE,xcb-util))
+#  $(eval $(call pkg_config_package_available,NSFB_XCB_UTIL_AVAILABLE,xcb-util))
+NSFB_XCB_AVAILABLE := yes
   ifeq ($(NSFB_XCB_UTIL_AVAILABLE),yes)
     REQUIRED_PKGS := $(REQUIRED_PKGS) xcb-util
   endif


I'll use this patch

--- libnsfb-0.0.2/Makefile
+++ libnsfb-0.0.2/Makefile
@@ -20,9 +20,17 @@
 
 NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms
 
+ifndef NSFB_VNC_AVAILABLE
 $(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
+endif
+
+ifndef NSFB_SDL_AVAILABLE
 $(eval $(call pkg_config_package_available,NSFB_SDL_AVAILABLE,sdl))
+endif
+
+ifndef NSFB_XCB_AVAILABLE
 $(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
+endif
 
 ifeq ($(NSFB_SDL_AVAILABLE),yes)
   $(eval $(call pkg_config_package_add_flags,sdl,CFLAGS))
@@ -63,7 +71,10 @@
 
   REQUIRED_PKGS := $(REQUIRED_PKGS) $(NSFB_XCB_PKG_NAMES)
 
+  ifndef NSFB_XCB_UTIL_AVAILABLE
   $(eval $(call pkg_config_package_available,NSFB_XCB_UTIL_AVAILABLE,xcb-util))
+  endif
+
   ifeq ($(NSFB_XCB_UTIL_AVAILABLE),yes)
     REQUIRED_PKGS := $(REQUIRED_PKGS) xcb-util
   endif


and try to get it upstream.
Comment 4 Michael Weber (RETIRED) gentoo-dev 2013-02-27 08:01:30 UTC
+  27 Feb 2013; Michael Weber <xmw@gentoo.org> libnsfb-0.0.2.ebuild,
+  +files/libnsfb-0.0.2-autodetect.patch, libnsfb-9999.ebuild:
+  Add use flags sdl, vnx, xcb (thanks a.m@freemail.hu, bug 458978). Restore
+  cross-compile functionality (thanks James Le Cuirot, bug 431884)
+
Comment 5 Another Mortal 2013-02-28 18:52:22 UTC
Created attachment 340538 [details, diff]
fix building netsurf-2.9 against libnsfb-9999

I like the final patch.  A lot cleaner than my sed wizardry.  (-;
I didn't even know usex existed...   Oh, well; good to learn.

I guess this doesn't directly belong here, but I was too lazy to open a new bug.
I'm attaching a patch to fix building netsurf-2.9 against libnsfb-9999.
// fbcon-only still doesn't quite work; so, this isn't so important
Comment 6 Another Mortal 2013-02-28 18:54:00 UTC
Created attachment 340540 [details, diff]
companion patch to netsurf-2.9.ebuild

just for completeness...