metalock

Check-in [4095cc8966]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:- src/Makefile: Fix indentation. Fix terminology of PREFIX and LOCALBASE. Replace all usages of PREFIX with LOCALBASE, and DEST_PREFIX with PREFIX. DEST_PREFIX is obsolete.

- src/args.c: Default to font bitstream vera sans mono instead of liberation sans mono.

- src/config.mk: Increment version to 0.8.1. Fix indentation. Fix terminology of PREFIX and LOCALBASE.

Timelines: family | ancestors | descendants | both | trunk | 0.8.1-RELEASE
Files: files | file ages | folders
SHA1:4095cc8966457ae127a148c8ed78d5fac58e6250
User & Date: beyert 2012-04-03 22:32:21
Original Comment: - src/Makefile: Fix indentation. Fix terminology of PREFIX and LOCALBASE. Replace all usages of PREFIX with LOCALBASE, and DEST_PREFIX with PREFIX. DEST_PREFIX is obsolete.

- src/args.c: Default to font bitstream vera sans instead of liberation sans mono.

- src/config.mk: Increment version to 0.8.1. Fix indentation. Fix terminology of PREFIX and LOCALBASE.

Context
2012-04-03
22:40
- src/args.c: Default to font bitstream vera sans instead of bitstream vera sans mono. check-in: e9701e4b36 user: beyert tags: trunk, 0.8.1-RELEASE
22:32
- src/Makefile: Fix indentation. Fix terminology of PREFIX and LOCALBASE. Replace all usages of PREFIX with LOCALBASE, and DEST_PREFIX with PREFIX. DEST_PREFIX is obsolete.

- src/args.c: Default to font bitstream vera sans mono instead of liberation sans mono.

- src/config.mk: Increment version to 0.8.1. Fix indentation. Fix terminology of PREFIX and LOCALBASE. check-in: 4095cc8966 user: beyert tags: trunk, 0.8.1-RELEASE

2012-03-24
03:31
- src/config.mk: Increment version to 0.8.0, due to DPMS recovery improvements.

- src/draw_fns.c: Slightly adjust drawing code to avoid redundant extra calls to XClearWindow, and to reduce code length.

- src/event_loop.c: In event loop, make sure to redraw text if ev.type matches KeyPress, MotionNotify, or ButtonPress. This should get rid of issue where the login box is blank sometimes after recovering from DPMS mode. check-in: efc3f92307 user: beyert tags: trunk, 0.8.0-RELEASE

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/Makefile.

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

41

42
43
44
45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# © 2012 Timothy Beyer
# © 2006-2007 Anselm R. Garbe, Sander van Dijk

include config.mk
.include "../themes/${DEFAULT_THEME}/metadata.mk"

.if ${USE_ULTRAGETOPT} == "yes"
OPT_LIBS += -lultragetopt
OPT_CPPFLAGS += -DULTRAGETOPT_REPLACE_GETOPT
.endif

.if ${USE_IMLIB2} == "yes"
OPT_LIBS += -lImlib2
OPT_CPPFLAGS += -DWITH_IMLIB2
.endif

.if ${USE_XFT} == "yes"
OPT_LIBS += -lXft
OPT_CPPFLAGS += -DWITH_XFT
OPT_INCS += "-I${PREFIX}/include/freetype2"
.endif

# Linux probably needs this
.if ${USE_SHADOW} == "yes"
OPT_CPPFLAGS += -DWITH_SHADOW_H
.endif

# This variable does not apply to FreeBSD, it might to other BSDs, though.
.if ${USE_BSD_AUTH} == "yes"
OPT_CPPFLAGS += -DWITH_BSD_AUTH
.endif

# On OpenBSD and Darwin disable this, all others most likely need this enabled
.if ${USE_CRYPT} == "yes"
CRYPT= -lcrypt
.endif

# includes and libs
INCS = -I. -I${X11INC} -I${PREFIX}/include ${OPT_INCS} -I${PREFIX}/include/X11

LIBS = -lc ${CRYPT} -L${X11LIB} -L${PREFIX}/lib -lX11 -lXext -lXpm ${OPT_LIBS}


# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" \
           -DPREFIX=\"${PREFIX}\" \

           -DEMAIL=\"${EMAIL}\" \
           -DDEFAULT_THEME=\"${DEFAULT_THEME}\" \
		   ${OPT_CPPFLAGS}

.if ${CC} == "clang"
# -pedantic disabled because of annoying warnings
CFLAGS = -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
.elif ${CC} == "gcc"
# -pedantic disabled because of annoying warning:
# Xfuncproto.h:134:24: warning: ISO C does not permit named variadic macros
CFLAGS = -std=c99 -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
.else
CFLAGS = -std=c99 -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
.endif

SRC = main.c alloc.c args.c event_loop.c draw_fns.c helper_fns.c
HDR = data.h alloc.h args.h event_loop.h draw_fns.h helper_fns.h
OBJ = ${SRC:.c=.o}

all: options build postclean

options:
	@echo metalock build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
................................................................................

install: all
	@echo installing metalock
.if !exists(../themes/${DEFAULT_THEME}/metadata.mk)
	@echo -n "error: missing ../themes/${DEFAULT_THEME}/metadata.mk "
	@echo "(the default theme is missing)"
.else
	@echo installing executable file to ${DEST_PREFIX}/bin
	@mkdir -p ${DEST_PREFIX}/bin
	@cp -f metalock ${DEST_PREFIX}/bin
	@chmod 755 ${DEST_PREFIX}/bin/metalock
	@chmod u+s ${DEST_PREFIX}/bin/metalock
	@echo -n "installing theme to "
	@echo "${DEST_PREFIX}/share/metalock/themes/${DEFAULT_THEME}"
	@mkdir -p ${DEST_PREFIX}/share/metalock/themes
	@cp -pRf ../themes/${DEFAULT_THEME} ${DEST_PREFIX}/share/metalock/themes
	@chown 0:0 ${DEST_PREFIX}/share/metalock/themes/${DEFAULT_THEME}/*
	@chmod 644 ${DEST_PREFIX}/share/metalock/themes/${DEFAULT_THEME}/*
	@echo "finished installing metalock"
.endif

uninstall:
	@echo removing executable file from ${DEST_PREFIX}/bin
	@rm -rf ${DEST_PREFIX}/share/metalock/themes/${DEFAULT_THEME}
	@rmdir ${DEST_PREFIX}/share/metalock/themes
	@rmdir ${DEST_PREFIX}/share/metalock
	@rm -f ${DEST_PREFIX}/bin/metalock

.PHONY: all options clean dist install uninstall







|
|



|
|



|
|
|




|




|




|



|
>
|
>


|
|
>
|
|
|



|
|



|
|

|
|


|
|
|







 







|
|
|
|
|

|
|
|
|
|




|
|
|
|
|


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# © 2012 Timothy Beyer
# © 2006-2007 Anselm R. Garbe, Sander van Dijk

include config.mk
.include "../themes/${DEFAULT_THEME}/metadata.mk"

.if ${USE_ULTRAGETOPT} == "yes"
OPT_LIBS+=	-lultragetopt
OPT_CPPFLAGS+=	-DULTRAGETOPT_REPLACE_GETOPT
.endif

.if ${USE_IMLIB2} == "yes"
OPT_LIBS+=	-lImlib2
OPT_CPPFLAGS+=	-DWITH_IMLIB2
.endif

.if ${USE_XFT} == "yes"
OPT_LIBS+=	-lXft
OPT_CPPFLAGS+=	-DWITH_XFT
OPT_INCS+=	"-I${LOCALBASE}/include/freetype2"
.endif

# Linux probably needs this
.if ${USE_SHADOW} == "yes"
OPT_CPPFLAGS+=	-DWITH_SHADOW_H
.endif

# This variable does not apply to FreeBSD, it might to other BSDs, though.
.if ${USE_BSD_AUTH} == "yes"
OPT_CPPFLAGS+=	-DWITH_BSD_AUTH
.endif

# On OpenBSD and Darwin disable this, all others most likely need this enabled
.if ${USE_CRYPT} == "yes"
CRYPT=	-lcrypt
.endif

# includes and libs
INCS=	-I. -I${X11INC} -I${LOCALBASE}/include ${OPT_INCS} \
	-I${LOCALBASE}/include/X11
LIBS=	-lc ${CRYPT} -L${X11LIB} -L${LOCALBASE}/lib -lX11 -lXext -lXpm \
	${OPT_LIBS}

# flags
CPPFLAGS=	-DVERSION=\"${VERSION}\" \
			-DPREFIX=\"${PREFIX}\" \
			-DLOCALBASE=\"${LOCALBASE}\" \
			-DEMAIL=\"${EMAIL}\" \
			-DDEFAULT_THEME=\"${DEFAULT_THEME}\" \
			${OPT_CPPFLAGS}

.if ${CC} == "clang"
# -pedantic disabled because of annoying warnings
CFLAGS=	-Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS=	${LIBS}
.elif ${CC} == "gcc"
# -pedantic disabled because of annoying warning:
# Xfuncproto.h:134:24: warning: ISO C does not permit named variadic macros
CFLAGS=	-std=c99 -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS=	-s ${LIBS}
.else
CFLAGS=	-std=c99 -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS=	-s ${LIBS}
.endif

SRC=	main.c alloc.c args.c event_loop.c draw_fns.c helper_fns.c
HDR=	data.h alloc.h args.h event_loop.h draw_fns.h helper_fns.h
OBJ=	${SRC:.c=.o}

all: options build postclean

options:
	@echo metalock build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
................................................................................

install: all
	@echo installing metalock
.if !exists(../themes/${DEFAULT_THEME}/metadata.mk)
	@echo -n "error: missing ../themes/${DEFAULT_THEME}/metadata.mk "
	@echo "(the default theme is missing)"
.else
	@echo installing executable file to ${PREFIX}/bin
	@mkdir -p ${PREFIX}/bin
	@cp -f metalock ${PREFIX}/bin
	@chmod 755 ${PREFIX}/bin/metalock
	@chmod u+s ${PREFIX}/bin/metalock
	@echo -n "installing theme to "
	@echo "${PREFIX}/share/metalock/themes/${DEFAULT_THEME}"
	@mkdir -p ${PREFIX}/share/metalock/themes
	@cp -pRf ../themes/${DEFAULT_THEME} ${PREFIX}/share/metalock/themes
	@chown 0:0 ${PREFIX}/share/metalock/themes/${DEFAULT_THEME}/*
	@chmod 644 ${PREFIX}/share/metalock/themes/${DEFAULT_THEME}/*
	@echo "finished installing metalock"
.endif

uninstall:
	@echo removing executable file from ${PREFIX}/bin
	@rm -rf ${PREFIX}/share/metalock/themes/${DEFAULT_THEME}
	@rmdir ${PREFIX}/share/metalock/themes
	@rmdir ${PREFIX}/share/metalock
	@rm -f ${PREFIX}/bin/metalock

.PHONY: all options clean dist install uninstall

Changes to src/args.c.

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  bg_b = 0x00;

  fg_r = 0xFF;
  fg_g = 0xFF;
  fg_b = 0xFF;

#ifdef WITH_XFT
  fontname = "liberation sans mono-16";
#else
  fontname = "-*-helvetica-*-r-*-*-24-*-*-*-*-*-*-*";
#endif

  char *t;

  if (verbosity > 1) { puts("process command line arguments...\n"); }







|







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  bg_b = 0x00;

  fg_r = 0xFF;
  fg_g = 0xFF;
  fg_b = 0xFF;

#ifdef WITH_XFT
  fontname = "bitstream vera sans mono-16";
#else
  fontname = "-*-helvetica-*-r-*-*-24-*-*-*-*-*-*-*";
#endif

  char *t;

  if (verbosity > 1) { puts("process command line arguments...\n"); }

Changes to src/config.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# metalock version and author email address
VERSION = 0.8.0
EMAIL = "beyert AT SYMBOL fastmail DOT SYMBOL net"

# Customize below to fit your system

# paths (on some xservers, X11PREFIX should be set to /usr/X11R6)
PREFIX = /usr/local
DEST_PREFIX = ${PREFIX}
X11PREFIX = ${PREFIX}

X11INC = ${X11PREFIX}/include
X11LIB = ${X11PREFIX}/lib

DEFAULT_THEME = Blue_Marble

# compiler and linker (clang or gcc is supported)
CC = clang

# Linux probably needs this
USE_SHADOW = no

# This variable does not apply to FreeBSD, it might to other BSDs, though.
USE_BSD_AUTH = no

# On OpenBSD and Darwin disable this, all others most likely need this enabled
USE_CRYPT = yes

# Optional libraries
#
# If you care about security, Imlib2 is the biggest risk, followed by Xft.
# Ultragetopt is not a security risk.
USE_ULTRAGETOPT = yes
USE_IMLIB2 = yes
USE_XFT = yes

|
|




|
|
|

|
|

|


|


|


|


|





|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# metalock version and author email address
VERSION=	0.8.1
EMAIL=	"beyert AT SYMBOL fastmail DOT SYMBOL net"

# Customize below to fit your system

# paths (on some xservers, X11PREFIX should be set to /usr/X11R6)
LOCALBASE=	/usr/local
PREFIX=	${LOCALBASE}
X11PREFIX=	${LOCALBASE}

X11INC=	${X11PREFIX}/include
X11LIB=	${X11PREFIX}/lib

DEFAULT_THEME=	Blue_Marble

# compiler and linker (clang or gcc is supported)
CC=	clang

# Linux probably needs this
USE_SHADOW=	no

# This variable does not apply to FreeBSD, it might to other BSDs, though.
USE_BSD_AUTH=	no

# On OpenBSD and Darwin disable this, all others most likely need this enabled
USE_CRYPT=	yes

# Optional libraries
#
# If you care about security, Imlib2 is the biggest risk, followed by Xft.
# Ultragetopt is not a security risk.
USE_ULTRAGETOPT=	yes
USE_IMLIB2=	yes
USE_XFT=	yes