summaryrefslogtreecommitdiffstats
path: root/build
blob: 0b94e740dfe20aeb9ed89cfbe86bf92c5cbaf564 (plain)
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
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
#!/usr/bin/make -f

include ../source.mk

common_opts = \
	--without-ada \
	--without-tests \
	--with-pkg-config-libdir='/usr/lib/$(OPK_HOST_ARCH)/pkgconfig' \
	--enable-pc-files \
	--with-install-prefix="$${PWD}/dest" \
	--with-shared \
	--without-debug \
	--without-profile \
	--with-termlib=tinfo \
	--with-ticlib=tic \
	--disable-termcap \
	--enable-symlinks \
	--enable-const

nop:
	@:

build-ncurses:
	oh-autoconfigure -B obj-ncurses -- \
		$(common_opts) \
		--enable-overwrite
	oh-autobuild -B obj-ncurses
	touch $@

build-ncursesw:
	oh-autoconfigure -B obj-ncursesw -- \
		$(common_opts) \
		--includedir=/usr/include/ncursesw \
		--without-progs \
		--disable-overwrite \
		--enable-widec
	oh-autobuild -B obj-ncursesw
	touch $@

build: build-ncurses build-ncursesw

install: build
	(cd obj-ncurses && make install)
	(cd obj-ncursesw && make install.libs)
	mv dest/usr/bin/clear dest/usr/bin/clear.ncurses
	mv dest/usr/bin/reset dest/usr/bin/reset.ncurses
	rm dest/usr/bin/ncurses*-config
	@# Extract a few individual terminal type definitions.  This would be
	@# hard to do with oh-installfiles.
	@# terminfo-base
	mkdir -p terminfo-base.data/usr/share/terminfo/a/
	mkdir -p terminfo-base.data/usr/share/terminfo/d/
	mkdir -p terminfo-base.data/usr/share/terminfo/v/
	mv dest/usr/share/terminfo/a/ansi \
		terminfo-base.data/usr/share/terminfo/a/ansi
	mv dest/usr/share/terminfo/d/dumb \
		terminfo-base.data/usr/share/terminfo/d/dumb
	mv dest/usr/share/terminfo/v/vt102 \
		terminfo-base.data/usr/share/terminfo/v/vt102
	@# terminfo-linux
	mkdir -p terminfo-linux.data/usr/share/terminfo/l/
	mv dest/usr/share/terminfo/l/linux \
		terminfo-linux.data/usr/share/terminfo/l/linux
	oh-installfiles
	oh-shlibdeps