ports/82171: Port devel/sdl12: libSDL-1.1 is broken in a world with NO_USB
Björn König
bkoenig at cs.tu-berlin.de
Sun Jun 12 19:40:12 UTC 2005
>Number: 82171
>Category: ports
>Synopsis: Port devel/sdl12: libSDL-1.1 is broken in a world with NO_USB
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Jun 12 19:40:11 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Björn König
>Release: FreeBSD 5.4-RELEASE-p1 i386
>Organization:
>Environment:
>Description:
If you have a world which was built with NO_USB=yes then
libusbhid.so doesn't exist. The current Makefile of the port
devel/sdl12 just assumes that the old libusb.so is present and
trusts in the correctness of the configure script; but it'll screw
up and won't specify any joystick subsystem in this case; not even
the dummy. This breaks libSDL-1.1 and causes that all ports that
depend on this library won't compile.
You'll get the following errors if you try to link with libSDL-1.1:
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickUpdate'
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickOpen'
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickQuit'
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickName'
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickInit'
libSDL-1.1.so: undefined reference to `SDL_SYS_JoystickClose'
>How-To-Repeat:
Rename usbhid.h to pretend that we live in a world with NO_USB.
cd /usr/include
mv usbhid.h usbhid.h.bak
Build and install devel/sdl12.
cd /usr/ports/devel/sdl12i
make install clean
Try to build a port that depends on devel/sdl12.
cd /usr/ports/x11/electricsheep
make build
This will fail with the error messages that were mentioned in the
description section of this PR.
>Fix:
The devel/sdl12 port should make a more accurate check whether USB
related libraries are available. If they aren't then disable
support for joysticks. Another solution would be to use the dummy
joystick subsystem, but I was too lazy to create a suitable patch
right now. I'll do this if desired.
--- Makefile.diff begins here ---
--- Makefile.orig Sun Jun 12 19:51:09 2005
+++ Makefile Sun Jun 12 19:52:01 2005
@@ -71,8 +71,10 @@
.if exists(/usr/include/libusbhid.h)
CONFIGURE_ENV+= USB_LIBS=-lusbhid
CFLAGS+= -DHAVE_LIBUSBHID_H
-.else
+.elif exists(/usr/include/libusb.h)
CONFIGURE_ENV+= USB_LIBS=-lusb
+.else
+CONFIGURE_ARGS+=--enable-joystick=no
.endif
MAN3!= ${CAT} ${FILESDIR}/man3
--- Makefile.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list