summaryrefslogtreecommitdiff
path: root/news/knews/scripts/pre-configure
blob: e740606572628d8904005c8262be5263a9303305 (plain) (blame)
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
#! /bin/sh
echo "You should tell knews the name of your NNTP server"
echo "You can do this by setting the environment variable NNTPSERVER"
echo "csh users: in .cshrc:   setenv NNTPSERVER host.domain"
echo "sh  users: in .profile: NNTPSERVER=host.domain; export NNTPSERVER"

# work around a problem with bmake regarding files ending in .l
#
FILES_TO_PATCH="kedit.c widgets.c save.c search.c"
for file in $FILES_TO_PATCH
do
	ed -s ${WRKSRC}/src/${file} <<-EOF
		g/^#include.*\.l/s/\.l/.h/
		w
		q
		EOF
done

for file in ${WRKSRC}/src/layouts/*
do
	mv $file `echo $file | sed -e 's/\.l/.h/'`
done

perl -pi -e "s|!!LOCALBASE!!|$LOCALBASE|" ${WRKSRC}/knews.tmpl

exit 0