aboutsummaryrefslogtreecommitdiff
path: root/x11-wm
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2008-01-04 15:27:59 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2008-01-04 15:27:59 +0000
commit2d62d7a96b6f993797c81d665d6e5ce26ed896f3 (patch)
tree0b94df1d64ad5c634bbb1e27b24e730f79f31e68 /x11-wm
parent5f2b0bacf1e5b055c1130934bf1b2f6d5bc72274 (diff)
downloadports-2d62d7a96b6f993797c81d665d6e5ce26ed896f3.tar.gz
ports-2d62d7a96b6f993797c81d665d6e5ce26ed896f3.zip
Notes
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/vtwm/Makefile25
-rw-r--r--x11-wm/vtwm/files/Makefile.bsd65
-rw-r--r--x11-wm/vtwm/files/patch-util.c30
-rw-r--r--x11-wm/vtwm/pkg-plist3
4 files changed, 109 insertions, 14 deletions
diff --git a/x11-wm/vtwm/Makefile b/x11-wm/vtwm/Makefile
index 7cdfd249c9b3..c72deb99eedc 100644
--- a/x11-wm/vtwm/Makefile
+++ b/x11-wm/vtwm/Makefile
@@ -7,36 +7,35 @@
PORTNAME= vtwm
PORTVERSION= 5.4.7
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= x11-wm
MASTER_SITES= http://www.vtwm.org/downloads/
MAINTAINER= spam@rm-rf.kiev.ua
COMMENT= Twm with a virtual desktop and optional Motif-like features
-USE_IMAKE= yes
-USE_XORG= xpm
+USE_XORG= xpm xmu
+
+ETCDIR?= ${PREFIX}/etc
+
+MAKEFILE= ${FILESDIR}/Makefile.bsd
MAN1= vtwm.1
OPTIONS= SOUND "Sound support" on \
- NLS "Native language support" on
+ NLS "Native language support" on
.include <bsd.port.pre.mk>
-post-patch:
-.if defined(WITHOUT_SOUND)
- @${REINPLACE_CMD} -i "" -e \
- 's:^XCOMM NO_SOUND_SUPPORT: NO_SOUND_SUPPORT:; \
- s:^SOUNDLIB:XCOMM SOUNDLIB:; \
- s:^SOUNDINC:XCOMM SOUNDINC: ' ${WRKSRC}/Imakefile
-.else
+.if defined(WITH_SOUND)
LIB_DEPENDS+= rplay.1:${PORTSDIR}/audio/rplay
+MAKE_ENV+= SOUND=yes
+.else
+MAKE_ENV+= SOUND=no
.endif
.if defined(WITHOUT_NLS)
- @${REINPLACE_CMD} -i "" -e \
- 's:^XCOMM NO_I18N_SUPPORT: NO_I18N_SUPPORT:' ${WRKSRC}/Imakefile
+CFLAGS+= -DNO_I18N_SUPPORT
.endif
.include <bsd.port.post.mk>
diff --git a/x11-wm/vtwm/files/Makefile.bsd b/x11-wm/vtwm/files/Makefile.bsd
new file mode 100644
index 000000000000..d053e34ee643
--- /dev/null
+++ b/x11-wm/vtwm/files/Makefile.bsd
@@ -0,0 +1,65 @@
+PREFIX?= /usr/local
+BINDIR?= $(PREFIX)/bin
+ETCDIR?= $(PREFIX)/etc
+MANDIR?= $(PREFIX)/man/man
+
+NO_MANCOMPRESS?= yes
+MAN1= vtwm.1
+
+SOUND?= yes
+
+LN= ln -f
+LFLAGS+= -l
+
+# For the traditional look of TWM as the system fallback,
+# change this to "2D"
+SYS_VTWMRC_LOOK = 3D
+
+CONFDEFINES= '-DSYSTEM_VTWMRC="'$(ETCDIR)'/system.vtwmrc"' \
+ '-DSYSTEM_TWMRC="'$(ETCDIR)'/system.twmrc"'
+CFLAGS+= -I/usr/local/include $(CONFDEFINES)
+LDADD+= -L/usr/local/lib -ll -lXpm -lXmu
+
+.if ${SOUND} == "yes"
+LDADD+= -lrplay
+.else
+CFLAGS+= -DNO_SOUND_SUPPORT
+.endif
+
+PROG= vtwm
+
+SRCS= gram.y gram.h lex.l deftwmrc.c add_window.c gc.c list.c twm.c sound.c \
+ parse.c menus.c events.c resize.c util.c version.c iconmgr.c \
+ cursor.c regions.c applets.c icons.c desktop.c doors.c lastmake.c
+
+FILES= system.vtwmrc
+FILESDIR= $(ETCDIR)
+FILESMODE= 644
+
+deftwmrc.c: vtwm.man system.vtwmrc
+ echo '/* ' >$@
+ echo ' * This file is generated automatically from the default' >>$@
+ echo ' * VTWM bindings file system.vtwmrc.'$(SYS_VTWMRC_LOOK)' by the VTWM Makefile.' >>$@
+ echo ' */' >>$@
+ echo '' >>$@
+ echo 'char *defTwmrc[] = {' >>deftwmrc.c
+ sed -e '/^$$/d' -e '/^#/d' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/",/' -e 's/[ ]\{1,\}/ /g' -e 's/^" /"/' system.vtwmrc >>$@
+ echo '(char *)0 };' >>$@
+
+lastmake.c:
+ echo '/* ' >$@
+ echo ' * This file is generated automatically by the VTWM Makefile.' >>$@
+ echo ' */' >>$@
+ echo '' >>$@
+ echo 'char *lastmake[] = {' >>lastmake.c
+ echo ' "Platform: '`uname -r -s`'",' >>$@
+ echo ' "Build: '`date`'",' >>$@
+ echo ' "" };' >>$@
+
+vtwm.man:
+ $(LN) doc/$@ vtwm.1
+
+system.vtwmrc:
+ $(LN) $@.$(SYS_VTWMRC_LOOK) $@
+
+.include <bsd.prog.mk>
diff --git a/x11-wm/vtwm/files/patch-util.c b/x11-wm/vtwm/files/patch-util.c
new file mode 100644
index 000000000000..5bcdb6f4e12e
--- /dev/null
+++ b/x11-wm/vtwm/files/patch-util.c
@@ -0,0 +1,30 @@
+Index: util.c
+@@ -1211,7 +1211,7 @@
+ if (!font->name)
+ font->name = Scr->DefaultFont.name;
+ if ((basename2 = (char *)malloc(strlen(font->name) + 3)))
+- sprintf(basename2, "%s,*", font->name);
++ sprintf(basename2, "%s*", font->name);
+ else
+ basename2 = font->name;
+ if ((font->fontset = XCreateFontSet(dpy, basename2,
+@@ -1223,7 +1223,7 @@
+
+ if ((basename3 = (char *)realloc(basename2,
+ strlen(Scr->DefaultFont.name) + 3)))
+- sprintf(basename3, "%s,*", Scr->DefaultFont.name);
++ sprintf(basename3, "%s*", Scr->DefaultFont.name);
+ else
+ {
+ basename3 = Scr->DefaultFont.name;
+@@ -1249,8 +1249,8 @@
+ free(basename2);
+
+ for (i = 0; i < missing_charset_count_return; i++)
+- fprintf(stderr, "%s: font for charset %s is lacking\n",
+- ProgramName, missing_charset_list_return[i]);
++ fprintf(stderr, "%s: font(%s) for charset %s is lacking\n",
++ ProgramName, font->name, missing_charset_list_return[i]);
+
+ font_extents = XExtentsOfFontSet(font->fontset);
+ fnum = XFontsOfFontSet(font->fontset, &xfonts, &font_names);
diff --git a/x11-wm/vtwm/pkg-plist b/x11-wm/vtwm/pkg-plist
index f4e76dc5d55a..3cc57a48d7cf 100644
--- a/x11-wm/vtwm/pkg-plist
+++ b/x11-wm/vtwm/pkg-plist
@@ -1,3 +1,4 @@
bin/vtwm
-lib/X11/twm/system.vtwmrc
+etc/system.vtwmrc
+@unexec rm -f %D/lib/X11/twm/system.vtwmrc
@dirrmtry lib/X11/twm