system/man-db: Minor script updates.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2017-03-05 01:50:26 -05:00 committed by Willy Sudiarto Raharjo
parent 4da988f566
commit c6b05da296
2 changed files with 67 additions and 1 deletions

View file

@ -0,0 +1,50 @@
diff -Naur man-db-2.7.6.1/configure man-db-2.7.6.1.patched/configure
--- man-db-2.7.6.1/configure 2016-12-12 07:43:48.000000000 -0500
+++ man-db-2.7.6.1.patched/configure 2017-03-04 16:49:57.389893574 -0500
@@ -25809,46 +25809,8 @@
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
-$as_echo_n "checking for long file names... " >&6; }
-if ${ac_cv_sys_long_file_names+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_sys_long_file_names=yes
-# Test for long file names in all the places we know might matter:
-# . the current directory, where building will happen
-# $prefix/lib where we will be installing things
-# $exec_prefix/lib likewise
-# $TMPDIR if set, where it might want to write temporary files
-# /tmp where it might want to write temporary files
-# /var/tmp likewise
-# /usr/tmp likewise
-for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
- # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
- # in the usual case where exec_prefix is '${prefix}'.
- case $ac_dir in #(
- . | /* | ?:[\\/]*) ;; #(
- *) continue;;
- esac
- test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
- ac_xdir=$ac_dir/cf$$
- (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
- ac_tf1=$ac_xdir/conftest9012345
- ac_tf2=$ac_xdir/conftest9012346
- touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
- ac_cv_sys_long_file_names=no
- rm -f -r "$ac_xdir" 2>/dev/null
- test $ac_cv_sys_long_file_names = no && break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
-$as_echo "$ac_cv_sys_long_file_names" >&6; }
-if test $ac_cv_sys_long_file_names = yes; then
-
$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
-fi
-

View file

@ -6,6 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20170305 bkw:
# - BUILD=2
# - get rid of systemd-specific /usr/lib/tmpfiles.d from package.
# - patch configure so it doesn't write to /usr/lib.
# 20170215 bkw:
# - update for 2.7.6.1 (whoops, last update wasn't for the latest version
# - only update the cache in doinst.sh if it's over an hour old. this
@ -36,7 +41,7 @@
PRGNAM=man-db
VERSION=${VERSION:-2.7.6.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -135,6 +140,13 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# The 'checking for long filenames' test in the configure script writes to
# /usr/lib, which is bad behaviour for a configure script. Not to mention
# wrong (it assumes configure is always being run as root). We already
# know we have long filename support, because we live in the 21st century
# now, so this patch gets rid of the test and force-enables it.
patch -p1 < $CWD/dont_write_in_usr.diff
# The circumlocutions below are needed because doing it the sane way:
# libpipeline_LIBS="-L$PKG/usr/lib$LIBDIRSUFFIX -lpipeline"
# gets broken by libtool (it *insists* on replacing -lpipeline with
@ -161,6 +173,10 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
# This stuff is for systemd, we don't need it (and it might confuse
# people coming from systemd distros):
rm -rf $PKG/usr/lib/tmpfiles.d/
# There will always be man pages here, regardless of USR=yes or no.
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done