Subject: pkg/36755: x11/aterm: fails to build if wm/afterstep installed
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Yakovetsky Vladimir <yx@x.ua>
List: pkgsrc-bugs
Date: 08/09/2007 11:00:01
>Number:         36755
>Category:       pkg
>Synopsis:       x11/aterm: fails to build if wm/afterstep installed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 09 11:00:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        NetBSD 4.99.27
>Organization:
>Environment:
System: NetBSD lrou.x.ua 4.99.27 NetBSD 4.99.27 (lrou_odd-1.840) #0: Wed Aug 8 16:16:50 EEST 2007 yx@lrou.x.ua:/sys/arch/i386/compile/lrou_odd i386
Architecture: i386
Machine: i386
>Description:
	x11/aterm fails to build if wm/afterstep installed

>How-To-Repeat:
% cd /usr/pkgsrc/wm/afterstep
% make update
...

% cd /usr/pkgsrc/x11/aterm
% make
cc -DHAVE_CONFIG_H  -c -O2 -march=pentium4 -march=pentium4 -finline-functions -fomit-frame-pointer -ffast-math -I/usr/pkg/include -I/usr/include -Wall -DNO_DEBUG_OUTPUT -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/libAfterImage -I/usr/pkg/include -I/usr/pkg/include/libAfterStep -I/usr/pkg/include     -I. -I.. -I.  command.c
In file included from command.c:50:
rxvt.h:149:38: error: libAfterImage/afterimage.h: No such file or directory
In file included from command.c:50:
rxvt.h:150: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
rxvt.h:158:36: error: libAfterStep/afterstep.h: No such file or directory
rxvt.h:159:32: error: libAfterStep/asapp.h: No such file or directory
rxvt.h:160:33: error: libAfterStep/screen.h: No such file or directory
rxvt.h:161:34: error: libAfterStep/mystyle.h: No such file or directory
rxvt.h:162:43: error: libAfterStep/mystyle_property.h: No such file or directory
rxvt.h:163:38: error: libAfterStep/clientprops.h: No such file or directory
rxvt.h:164:34: error: libAfterStep/wmprops.h: No such file or directory
rxvt.h:298: error: expected specifier-qualifier-list before 'ShadingInfo'
In file included from protos.h:20,
                 from rxvt.h:1116,
                 from command.c:50:
pixmap.pro:5: error: expected declaration specifiers or '...' before 'ShadingInfo'
command.c:52:32: error: libAfterStep/event.h: No such file or directory
command.c: In function 'init_command':
command.c:1230: warning: array subscript has type 'char'
command.c:1231: warning: array subscript has type 'char'
command.c:1232: warning: array subscript has type 'char'
command.c: In function 'process_x_event':
command.c:2434: error: '_AS_STYLE' undeclared (first use in this function)
command.c:2434: error: (Each undeclared identifier is reported only once
command.c:2434: error: for each function it appears in.)
command.c:2437: error: 'rs_mystyle' undeclared (first use in this function)
command.c:2442: warning: implicit declaration of function 'mystyle_handle_property_event'
command.c:2443: warning: implicit declaration of function 'mystyle_find'
command.c:2443: warning: passing argument 1 of 'set_mystyle' makes pointer from integer without a cast
command.c:2445: error: '_XROOTPMAP_ID' undeclared (first use in this function)
command.c:2447: error: 'BGT_MyStyle' undeclared (first use in this function)
command.c:2449: warning: implicit declaration of function 'TransparentMS'
command.c:2456: warning: implicit declaration of function 'destroy_asimage'
command.c:2456: error: 'Scr' undeclared (first use in this function)
command.c:2479: warning: implicit declaration of function 'get_flags'
command.c:2486: error: '_XA_NET_SUPPORTING_WM_CHECK' undeclared (first use in this function)
command.c:2492: error: '_XA_NET_CURRENT_DESKTOP' undeclared (first use in this function)
command.c:2495: warning: implicit declaration of function 'clear_flags'
command.c:2497: warning: implicit declaration of function 'set_flags'
command.c:2511: error: '_XA_NET_WM_DESKTOP' undeclared (first use in this function)
command.c:2523: error: '_XA_NET_WM_STATE' undeclared (first use in this function)
command.c:2595: warning: pointer targets in passing argument 6 of 'XQueryTree' differ in signedness
command.c: In function 'tt_printf':
command.c:2952: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
*** Error code 1

Stop.
make: stopped in /usr/obj/x11/aterm/work/aterm-1.0.0/src


>Fix:
	1) afterstep bl3ifying:
% cd /usr/pkgsrc/wm/afterstep
% createbuildlink | sed 's/^#\.include/.include/' >buildlink3.mk

	2) aterm with afterstep support (optional), default - without.
--- x11/aterm/Makefile.orig
+++ x11/aterm/Makefile
@@ -49,6 +49,9 @@
 
 .include "../../graphics/jpeg/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Materm-astep)
+.include "../../wm/afterstep/buildlink3.mk"
+.endif
 .include "../../x11/libSM/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXpm/buildlink3.mk"
--- x11/aterm/options.mk.orig
+++ x11/aterm/options.mk
@@ -2,6 +2,7 @@
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.aterm
 PKG_SUPPORTED_OPTIONS=	aterm-big5 aterm-greek aterm-kanji aterm-xterm-scroll
+PKG_SUPPORTED_OPTIONS+=	aterm-astep
 
 .include "../../mk/bsd.options.mk"
 
@@ -20,3 +21,8 @@
 .if !empty(PKG_OPTIONS:Materm-xterm-scroll)
 CONFIGURE_ARGS+=--enable-xterm-scroll
 .endif
+
+.if empty(PKG_OPTIONS:Materm-astep)
+CONFIGURE_ARGS+=--without-afterimage_config
+CONFIGURE_ARGS+=--without-afterstep_config
+.endif
--- mk/defaults/options.description.orig
+++ mk/defaults/options.description
@@ -19,6 +19,7 @@
 aterm-greek		Enable Greek keyboard support.
 aterm-kanji		Enable kanji support.
 aterm-xterm-scroll	Use xterm-scrollbar instead of a NeXT-like one.
+aterm-astep		Use afterstep support.
 audiofile	
 authlib	
 avifile