mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Use MLINKS instead of .so directive against the problem of linked pages.
Submitted by: Yasuhiro Fukuma <yasuf@big.or.jp> in ports-jp ML #7987
This commit is contained in:
parent
66b96f9bda
commit
96bbf588b8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=22727
@ -20,6 +20,7 @@ NO_MTREE= yes
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
USE_BZIP2= yes
|
||||
WRKSRC= ${WRKDIR}/man/ja_JP.ujis
|
||||
SCRIPTS_ENV+= MANSECS="${MANSECS}"
|
||||
|
||||
MANSECS= 1 3 5
|
||||
|
||||
@ -27,15 +28,6 @@ post-extract:
|
||||
.for i in Makefile Makefile.inc
|
||||
@${CP} ${FILESDIR}/$i ${WRKSRC}
|
||||
.endfor
|
||||
.for i in ${MANSECS}
|
||||
@cd ${WRKSRC}/man$i; \
|
||||
ls *.$ix|${AWK} 'BEGIN{printf"MAN$i ="}{printf"\\\n\t%s",$$0}' >Makefile; \
|
||||
${ECHO} >>Makefile; \
|
||||
${ECHO} pages-list: >>${WRKSRC}/man$i/Makefile; \
|
||||
${ECHO} " @\$${ECHO} \$${MAN$i}" >>${WRKSRC}/man$i/Makefile; \
|
||||
${ECHO} >>Makefile; \
|
||||
${ECHO} '.include "bsd.prog.mk"' >>Makefile
|
||||
.endfor
|
||||
|
||||
post-build:
|
||||
@${RM} -f ${PLIST}
|
||||
|
@ -1,3 +1,23 @@
|
||||
PREFIX?= /usr/local
|
||||
MANDIR= ${PREFIX}/man/ja/man
|
||||
MROFF_CMD= /usr/local/bin/groff -Tnippon -man
|
||||
|
||||
NOMLINKS= yes
|
||||
|
||||
afterinstall:
|
||||
.if defined(MLINKS) && !empty(MLINKS)
|
||||
@set `echo ${MLINKS} " " | sed 's/\.\([^.]\)\([^.]*\) /.\1\2 \1 /g'`; \
|
||||
while : ; do \
|
||||
case $$# in \
|
||||
0) break;; \
|
||||
[123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \
|
||||
esac; \
|
||||
name=$$1; shift; sect=$$1; shift; \
|
||||
l=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
|
||||
name=$$1; shift; sect=$$1; shift; \
|
||||
t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
|
||||
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
|
||||
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
|
||||
ln $${l}${ZEXT} $${t}${ZEXT}; \
|
||||
done
|
||||
.endif
|
||||
|
47
japanese/xjman-3/scripts/configure
vendored
Normal file
47
japanese/xjman-3/scripts/configure
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
exec /usr/bin/perl -Sx "$0" ${1+"$@"}
|
||||
#! perl
|
||||
|
||||
$WRKSRC = $ENV{'WRKSRC'};
|
||||
@MANSECS = split(/\s+/, $ENV{'MANSECS'});
|
||||
|
||||
for $sec (@MANSECS) {
|
||||
print "===> Creating Makefile in man${sec}\n";
|
||||
|
||||
chdir "$WRKSRC/man$sec";
|
||||
@manpages = ();
|
||||
@mlinks = ();
|
||||
|
||||
for $manpage (<*.${sec}x>) {
|
||||
open(F, $manpage) || die "cannot open $manpage: $!\n";
|
||||
$_ = <F>;
|
||||
chop;
|
||||
close(F);
|
||||
if (/^\.so /) {
|
||||
($real = $') =~ s!^man./!!;
|
||||
push(@mlinks, "$real\t$manpage");
|
||||
}
|
||||
else {
|
||||
push(@manpages, $manpage);
|
||||
}
|
||||
}
|
||||
|
||||
open(MAKEFILE, '>Makefile');
|
||||
|
||||
if (@manpages) {
|
||||
print MAKEFILE join("\t\\\n\t", "MAN${sec} =", sort @manpages);
|
||||
print MAKEFILE "\n\n";
|
||||
}
|
||||
if (@mlinks) {
|
||||
print MAKEFILE join("\t\\\n\t", "MLINKS =", sort @mlinks);
|
||||
print MAKEFILE "\n\n";
|
||||
}
|
||||
|
||||
print MAKEFILE <<EOF;
|
||||
pages-list:
|
||||
@\${ECHO} \${MAN${sec}} \${MLINKS}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
}
|
@ -20,6 +20,7 @@ NO_MTREE= yes
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
USE_BZIP2= yes
|
||||
WRKSRC= ${WRKDIR}/man/ja_JP.ujis
|
||||
SCRIPTS_ENV+= MANSECS="${MANSECS}"
|
||||
|
||||
MANSECS= 1 3 5
|
||||
|
||||
@ -27,15 +28,6 @@ post-extract:
|
||||
.for i in Makefile Makefile.inc
|
||||
@${CP} ${FILESDIR}/$i ${WRKSRC}
|
||||
.endfor
|
||||
.for i in ${MANSECS}
|
||||
@cd ${WRKSRC}/man$i; \
|
||||
ls *.$ix|${AWK} 'BEGIN{printf"MAN$i ="}{printf"\\\n\t%s",$$0}' >Makefile; \
|
||||
${ECHO} >>Makefile; \
|
||||
${ECHO} pages-list: >>${WRKSRC}/man$i/Makefile; \
|
||||
${ECHO} " @\$${ECHO} \$${MAN$i}" >>${WRKSRC}/man$i/Makefile; \
|
||||
${ECHO} >>Makefile; \
|
||||
${ECHO} '.include "bsd.prog.mk"' >>Makefile
|
||||
.endfor
|
||||
|
||||
post-build:
|
||||
@${RM} -f ${PLIST}
|
||||
|
@ -1,3 +1,23 @@
|
||||
PREFIX?= /usr/local
|
||||
MANDIR= ${PREFIX}/man/ja/man
|
||||
MROFF_CMD= /usr/local/bin/groff -Tnippon -man
|
||||
|
||||
NOMLINKS= yes
|
||||
|
||||
afterinstall:
|
||||
.if defined(MLINKS) && !empty(MLINKS)
|
||||
@set `echo ${MLINKS} " " | sed 's/\.\([^.]\)\([^.]*\) /.\1\2 \1 /g'`; \
|
||||
while : ; do \
|
||||
case $$# in \
|
||||
0) break;; \
|
||||
[123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \
|
||||
esac; \
|
||||
name=$$1; shift; sect=$$1; shift; \
|
||||
l=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
|
||||
name=$$1; shift; sect=$$1; shift; \
|
||||
t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
|
||||
${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
|
||||
rm -f $${t} $${t}${MCOMPRESS_EXT}; \
|
||||
ln $${l}${ZEXT} $${t}${ZEXT}; \
|
||||
done
|
||||
.endif
|
||||
|
47
japanese/xjman/scripts/configure
vendored
Normal file
47
japanese/xjman/scripts/configure
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
exec /usr/bin/perl -Sx "$0" ${1+"$@"}
|
||||
#! perl
|
||||
|
||||
$WRKSRC = $ENV{'WRKSRC'};
|
||||
@MANSECS = split(/\s+/, $ENV{'MANSECS'});
|
||||
|
||||
for $sec (@MANSECS) {
|
||||
print "===> Creating Makefile in man${sec}\n";
|
||||
|
||||
chdir "$WRKSRC/man$sec";
|
||||
@manpages = ();
|
||||
@mlinks = ();
|
||||
|
||||
for $manpage (<*.${sec}x>) {
|
||||
open(F, $manpage) || die "cannot open $manpage: $!\n";
|
||||
$_ = <F>;
|
||||
chop;
|
||||
close(F);
|
||||
if (/^\.so /) {
|
||||
($real = $') =~ s!^man./!!;
|
||||
push(@mlinks, "$real\t$manpage");
|
||||
}
|
||||
else {
|
||||
push(@manpages, $manpage);
|
||||
}
|
||||
}
|
||||
|
||||
open(MAKEFILE, '>Makefile');
|
||||
|
||||
if (@manpages) {
|
||||
print MAKEFILE join("\t\\\n\t", "MAN${sec} =", sort @manpages);
|
||||
print MAKEFILE "\n\n";
|
||||
}
|
||||
if (@mlinks) {
|
||||
print MAKEFILE join("\t\\\n\t", "MLINKS =", sort @mlinks);
|
||||
print MAKEFILE "\n\n";
|
||||
}
|
||||
|
||||
print MAKEFILE <<EOF;
|
||||
pages-list:
|
||||
@\${ECHO} \${MAN${sec}} \${MLINKS}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
}
|
Loading…
Reference in New Issue
Block a user