- Fix build on CURRENT

- Convert to OPTIONSng

Reported by:	pkg-fallout
This commit is contained in:
Pietro Cerutti 2013-09-26 15:31:53 +00:00
parent f7e3015924
commit 9f3b386977
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328371
9 changed files with 124 additions and 31 deletions

View File

@ -10,34 +10,32 @@ MASTER_SITES= http://mjr.towers.org.uk/comp/
MAINTAINER= gahr@FreeBSD.org
COMMENT= Window manager based on aewm++
OPTIONS_DEFINE= DOCS
ALL_TARGET= all
DOCS= Changelog Changelog.DLR Changelog.jewel INSTALL LICENSE README
PORTDOCS= *
MAN1= jewel.1x
USES+= gmake
USE_XORG= x11 xext xpm
USE_GMAKE= yes
NO_STAGE= yes
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's|^CC|#CC|g; \
s|^CFLAGS|#CFLAGS|g; \
s|^prefix|#prefix|g; \
s|prefix|PREFIX|g; \
s|/usr/X11R6|${LOCALBASE}|g; \
s|CC|CXX|g; \
s|CFLAGS|CXXFLAGS|g' \
${WRKSRC}/Makefile
${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
${REINPLACE_CMD} -i '' -e 's|g++|${CXX}|g; s|gcc|${CC}|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/jewel ${PREFIX}/bin/jewel
${INSTALL_PROGRAM} ${WRKSRC}/goodies/appbar/appbar ${PREFIX}/bin/jewel-appbar
${INSTALL_PROGRAM} ${WRKSRC}/goodies/fspanel/fspanel ${PREFIX}/bin/jewel-fspanel
${INSTALL_PROGRAM} ${WRKSRC}/goodies/setrootimage/setrootimage ${PREFIX}/bin/jewel-setrootimage
${INSTALL_PROGRAM} ${WRKSRC}/goodies/xsession/xsession ${PREFIX}/bin/jewel-xsession
${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_PROGRAM} ${WRKSRC}/jewel ${STAGEDIR}${PREFIX}/bin/jewel
${INSTALL_PROGRAM} ${WRKSRC}/goodies/appbar/appbar ${STAGEDIR}${PREFIX}/bin/jewel-appbar
${INSTALL_PROGRAM} ${WRKSRC}/goodies/fspanel/fspanel ${STAGEDIR}${PREFIX}/bin/jewel-fspanel
${INSTALL_PROGRAM} ${WRKSRC}/goodies/setrootimage/setrootimage ${STAGEDIR}${PREFIX}/bin/jewel-setrootimage
${INSTALL_PROGRAM} ${WRKSRC}/goodies/xsession/xsession ${STAGEDIR}${PREFIX}/bin/jewel-xsession
${INSTALL_MAN} ${WRKSRC}/${MAN1} ${STAGEDIR}${PREFIX}/man/man1
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for ii in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/${ii} ${STAGEDIR}${DOCSDIR}
.endfor
.endif

View File

@ -0,0 +1,11 @@
--- Makefile.orig 2013-09-26 16:58:49.000000000 +0200
+++ Makefile 2013-09-26 16:58:55.000000000 +0200
@@ -51,7 +51,7 @@
$(CC) $(OBJS) $(LDPATH) $(LIBS) -o $@
$(SUBDIRS):
- cd $@ && $(MAKE) $(MAKEFLAGS) $(MAKECMDGOALS)
+ cd $@ && $(MAKE) $(MAKECMDGOALS)
$(OBJS): %.o: %.cc $(HEADERS)
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@

View File

@ -0,0 +1,10 @@
--- goodies/appbar/image.cc.orig 2013-09-26 16:59:32.000000000 +0200
+++ goodies/appbar/image.cc 2013-09-26 17:00:23.000000000 +0200
@@ -24,6 +24,7 @@
#endif
#include "image.hh"
+#include <cstdlib>
#ifndef MIN
# define MIN(a, b) ((a < b) ? a : b)

View File

@ -1,8 +1,9 @@
--- goodies/fspanel/Makefile.orig 2007-12-06 22:49:22.000000000 +0100
+++ goodies/fspanel/Makefile 2007-12-06 22:49:58.000000000 +0100
--- goodies/fspanel/Makefile.orig 2005-01-03 22:54:58.000000000 +0100
+++ goodies/fspanel/Makefile 2013-09-26 17:14:21.000000000 +0200
@@ -1,8 +1,10 @@
CC = gcc
-CC = gcc
-C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -m386 -malign-loops=2 -malign-jumps=2 -malign-functions=2
+CC ?= gcc
+C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -falign-loops=2 -falign-jumps=2 -falign-functions=2
L_FLAGS = -O1 -Xlinker -s -L$(XROOT)/lib -lX11 -lXpm
PROGNAME = fspanel

View File

@ -1,5 +1,23 @@
--- goodies/fspanel/fspanel.c.orig 2007-12-06 22:35:02.000000000 +0100
+++ goodies/fspanel/fspanel.c 2007-12-06 22:37:02.000000000 +0100
--- goodies/fspanel/fspanel.c.orig 2005-01-03 22:54:58.000000000 +0100
+++ goodies/fspanel/fspanel.c 2013-09-26 17:27:52.000000000 +0200
@@ -179,7 +179,7 @@
XDeleteProperty(dd, win, net_wm_strut);
}
-void *get_prop_data (Window win, Atom prop, Atom type, int *items)
+unsigned long*get_prop_data (Window win, Atom prop, Atom type, int *items)
{
Atom type_ret;
int format_ret;
@@ -195,7 +195,7 @@
if (items)
*items = items_ret;
- return prop_data;
+ return (unsigned long *)prop_data;
}
void get_task_hinticon (task *tk)
@@ -393,7 +393,8 @@
void scale_icon (task *tk)
@ -10,3 +28,34 @@
Pixmap pix, mk = None;
XGCValues gcv;
GC mgc=None;
@@ -746,7 +747,7 @@
XMapWindow (dd, win);
- tb = calloc (1, sizeof (taskbar));
+ tb = (taskbar *)calloc (1, sizeof (taskbar));
tb->win = win;
return tb;
@@ -760,10 +761,10 @@
if (tb->my_desktop != find_desktop (win) || is_hidden (win))
return;
- tk = calloc (1, sizeof (task));
+ tk = (task *)calloc (1, sizeof (task));
tk->win = win;
tk->focused = focus;
- tk->name = get_prop_data (win, XA_WM_NAME, XA_STRING, 0);
+ tk->name = (char *)(void *)get_prop_data (win, XA_WM_NAME, XA_STRING, 0);
tk->iconified = is_iconified (win);
get_task_kdeicon (tk);
@@ -1075,7 +1076,7 @@
/* window's title changed */
if (tk->name)
XFree (tk->name);
- tk->name = get_prop_data (tk->win, XA_WM_NAME, XA_STRING, 0);
+ tk->name = (char *)(void *)get_prop_data (tk->win, XA_WM_NAME, XA_STRING, 0);
gui_draw_task (tb, tk);
} else if (at == atom_WM_STATE)
{

View File

@ -0,0 +1,11 @@
--- goodies/fspanel/fspanel.h.orig 2013-09-26 17:22:27.000000000 +0200
+++ goodies/fspanel/fspanel.h 2013-09-26 17:22:37.000000000 +0200
@@ -55,7 +55,7 @@
void set_bottom_strut();
void set_top_strut();
-void *get_prop_data (Window win, Atom prop, Atom type, int *items);
+unsigned long *get_prop_data (Window win, Atom prop, Atom type, int *items);
void set_foreground (int index);
void draw_line (taskbar *tb, int x, int y, int a, int b);
void fill_rect (taskbar *tb, int x, int y, int a, int b);

View File

@ -0,0 +1,10 @@
--- goodies/setrootimage/Makefile.orig 2013-09-26 17:15:12.000000000 +0200
+++ goodies/setrootimage/Makefile 2013-09-26 17:16:58.000000000 +0200
@@ -1,5 +1,5 @@
-CC = g++
-CFLAGS = -g -O2 -Wall
+CC ?= g++
+CFLAGS ?= -g -O2 -Wall
INCLUDES = -I$(XROOT)/include
LIBS = -lX11 -lXext
LDPATH = -L$(XROOT)/lib

View File

@ -0,0 +1,10 @@
--- goodies/setrootimage/image.cc.orig 2013-09-26 17:16:12.000000000 +0200
+++ goodies/setrootimage/image.cc 2013-09-26 17:16:27.000000000 +0200
@@ -24,6 +24,7 @@
#endif
#include "image.hh"
+#include <cstdlib>
#ifndef MIN
# define MIN(a, b) ((a < b) ? a : b)

View File

@ -3,10 +3,3 @@ bin/jewel-appbar
bin/jewel-fspanel
bin/jewel-setrootimage
bin/jewel-xsession
%%PORTDOCS%%%%DOCSDIR%%/Changelog
%%PORTDOCS%%%%DOCSDIR%%/Changelog.DLR
%%PORTDOCS%%%%DOCSDIR%%/Changelog.jewel
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%