ports

morpheus ports
git clone git://git.2f30.org/ports.git
Log | Files | Refs | LICENSE

commit af62f7f764f5ae107fb8887c328c74eaa5464a8c
parent bdd898693bf695b18c8dbef1d3d372e17cd4f51f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu Jun 19 16:23:20 +0200

permission fixes for install etc

improve fontconfig install, various fixes overall.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
cacertificates/cacertificates.mk | 4++--
expat/depsinc.mk | 8++++++--
fontconfig/depsinc.mk | 8++++++--
fontconfig/fontconfig.mk | 56++++++++++++++++++++++++++++++++++++++++----------------
freetype/freetype.mk | 12+++++-------
libedit/libedit.mk | 2+-
linux-firmware/linux-firmware.mk | 6++----
nginx/nginx.mk | 2+-
ntfs3g/depsinc.mk | 8++++++--
ntfs3g/ntfs3g.mk | 4++--
vim/vim.mk | 7++++---
xorgserver/xorgserver.mk | 2+-
12 files changed, 76 insertions(+), 43 deletions(-)
diff --git a/cacertificates/cacertificates.mk b/cacertificates/cacertificates.mk @@ -9,7 +9,7 @@ cacertificates:QV: install:QV: make -j$nprocs install DESTDIR="$ROOT" - mkdir -p "$ROOT/etc/ssl/certs" + $INSTALL -d -m 755 "$ROOT/etc/ssl/certs" ( cd "$ROOT/share/ca-certificates/"; \ find . -name '*.crt' | sort | cut -b3- > "$ROOT/etc/ca-certificates.conf" ) cp sbin/update-ca-certificates . @@ -17,5 +17,5 @@ install:QV: sed -e 's#=/share/#=${DESTDIR}/share/#' -i update-ca-certificates sed -e 's#=/local/#=${DESTDIR}/local/#' -i update-ca-certificates # create dir update.d, called in script update-ca-certificates. - mkdir -p "$ROOT/etc/ca-certificates/update.d" + $INSTALL -d -m 755 "$ROOT/etc/ca-certificates/update.d" DESTDIR="$ROOT" sh ./update-ca-certificates --fresh diff --git a/expat/depsinc.mk b/expat/depsinc.mk @@ -2,5 +2,9 @@ expat_libdir = $expat_DEPDIR/expat-$v/lib/lib expat_includedir = $expat_DEPDIR/expat-$v/lib/include -DEPS_CFLAGS = $DEPS_CFLAGS -I${expat_includedir} -DEPS_LDFLAGS = $DEPS_LDFLAGS -L${expat_libdir} -lexpat + +expat_CFLAGS = -I${expat_includedir} +expat_LDFLAGS = -L${expat_libdir} -lexpat + +DEPS_CFLAGS = $DEPS_CFLAGS ${expat_CFLAGS} +DEPS_LDFLAGS = $DEPS_LDFLAGS ${expat_LDFLAGS} diff --git a/fontconfig/depsinc.mk b/fontconfig/depsinc.mk @@ -2,5 +2,9 @@ fontconfig_libdir = $fontconfig_DEPDIR/fontconfig-$v/lib/lib fontconfig_includedir = $fontconfig_DEPDIR/fontconfig-$v/lib/include -DEPS_CFLAGS = $DEPS_CFLAGS -I${fontconfig_includedir} -DEPS_LDFLAGS = $DEPS_LDFLAGS -L${fontconfig_libdir} -lfontconfig + +fontconfig_CFLAGS = -I${fontconfig_includedir} +fontconfig_LDFLAGS = -L${fontconfig_libdir} -lfontconfig + +DEPS_CFLAGS = $DEPS_CFLAGS ${fontconfig_CFLAGS} +DEPS_LDFLAGS = $DEPS_LDFLAGS ${fontconfig_LDFLAGS} diff --git a/fontconfig/fontconfig.mk b/fontconfig/fontconfig.mk @@ -1,17 +1,47 @@ TARG = fontconfig DEPS = expat freetype libpng zlib -<$mkbuild/mk.common-noinst +<$mkbuild/mk.common + +INSTALL_DIRS = \ + /var/cache/fontconfig + +INSTALL_MAN1 = \ + fc-cache/fc-cache.1 \ + fc-cat/fc-cat.1 \ + fc-list/fc-list.1 \ + fc-match/fc-match.1 \ + fc-pattern/fc-pattern.1 \ + fc-query/fc-query.1 \ + fc-scan/fc-scan.1 \ + fc-validate/fc-validate.1 + +INSTALL_BIN = \ + lib/bin/fc-cache \ + lib/bin/fc-cat \ + lib/bin/fc-list \ + lib/bin/fc-match \ + lib/bin/fc-pattern \ + lib/bin/fc-query \ + lib/bin/fc-scan \ + lib/bin/fc-validate + +installetc: + $INSTALL -d -m 755 "$ROOT/etc" + cp -a lib/etc/fonts "$ROOT/etc" + chmod 755 "$ROOT/etc/fonts" + chmod 755 "$ROOT/etc/fonts/conf.d" + chmod 755 "$ROOT/etc/fonts/conf.avail" + +install: installetc fontconfig:QV: # skip building tests. printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > test/Makefile.in -# export CFLAGS="$CFLAGS $DEPS_CFLAGS" -# export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" - export EXPAT_CFLAGS="-I${expat_includedir}" - export EXPAT_LIBS="-L${expat_libdir} -lexpat" - export FREETYPE_CFLAGS="-I${freetype_includedir}/" - export FREETYPE_LIBS="-lfreetype -L${freetype_libdir}" + export EXPAT_CFLAGS="${expat_CFLAGS}" + export EXPAT_LIBS="${expat_LDFLAGS}" + export FREETYPE_CFLAGS="${freetype_CFLAGS}" + export FREETYPE_LIBS="${freetype_LDFLAGS}" CC="${CC} -static" ./configure \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ @@ -24,7 +54,7 @@ fontconfig:QV: --disable-docs \ --disable-shared \ --enable-static - # build these ourselves later. + # build these tools ourselves later. for f in fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan fc-validate; do printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > "$f/Makefile" done @@ -35,14 +65,8 @@ fontconfig:QV: for f in fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan fc-validate; do ${CC} "$f/$f.c" -o "$f/$f" -Lsrc/.libs/ -I. -lfontconfig \ ${CFLAGS} ${LDFLAGS} ${DEPS_CFLAGS} ${DEPS_LDFLAGS} - cp "$f/$f" "`pwd`/lib/bin/" && echo "$f" + echo "Copy $f -> `pwd`/lib/bin/" + $INSTALL -m 755 "$f/$f" "`pwd`/lib/bin/" done # remove .la files for now ? find `pwd`/lib -iname "*.la" -exec rm {} \; - -install:QV: - # TODO: better way to install. - mkdir -p "$ROOT" - for d in bin etc var; do - cp -a "`pwd`/lib/$d" "$ROOT/$d" - done diff --git a/freetype/freetype.mk b/freetype/freetype.mk @@ -5,15 +5,13 @@ DEPS = zlib libpng freetype:QV: # CCexe is set to build apinames for host (needed in build). -# export CFLAGS="$CFLAGS $DEPS_CFLAGS" -# export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" - export ZLIB_CFLAGS="-I${zlib_includedir}" - export ZLIB_LIBS="-L${zlib_libdir} -lzlib" + export ZLIB_CFLAGS="${zlib_CFLAGS}" + export ZLIB_LIBS="${zlib_LDFLAGS}" export HARFBUZZ_CFLAGS=" " export HARFBUZZ_LDFLAGS=" " # needed because build system calls libpng-config. - export LIBPNG_CFLAGS="-I${libpng_includedir}" - export LIBPNG_LIBS="-L${libpng_libdir} -lpng16" + export LIBPNG_CFLAGS="${libpng_CFLAGS}" + export LIBPNG_LIBS="${libpng_LDFLAGS}" CC="$CC" ./configure \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ @@ -29,7 +27,7 @@ freetype:QV: --with-harfbuzz=no \ --with-zlib=yes \ --with-png=yes - make -j$nprocs CCexe="${HOSTCC}" # DESTDIR="`pwd`/lib" + make -j$nprocs CCexe="${HOSTCC}" make -j$nprocs install CCexe="${HOSTCC}" DESTDIR="`pwd`/lib" # make symlink for includes, some packages depend on this (fontconfig). mkdir -p "`pwd`/lib/include/freetype2/config" diff --git a/libedit/libedit.mk b/libedit/libedit.mk @@ -16,7 +16,7 @@ libedit:QV: --enable-widec make -j$nprocs # install lib for use as a dependency. - make -j$nprocs install DESTDIR=`pwd`/lib + make -j$nprocs install DESTDIR="`pwd`/lib" # remove .la files for now ? find `pwd`/lib -iname "*.la" -exec rm {} \; # make symlink for use as a readline replacement. diff --git a/linux-firmware/linux-firmware.mk b/linux-firmware/linux-firmware.mk @@ -1,10 +1,8 @@ <$mkbuild/mk.common-noinst install:QV: - mkdir -p "$ROOT/lib/firmware" - cp -r * "$ROOT/lib/firmware" + $INSTALL -d -m 755 "$ROOT/lib/firmware" + cp -a * "$ROOT/lib/firmware/" rm -f "$ROOT/lib/firmware/WHENCE" rm -f "$ROOT/lib/firmware/"LICENSE.* rm -f "$ROOT/lib/firmware/"LICENCE.* - - diff --git a/nginx/nginx.mk b/nginx/nginx.mk @@ -33,5 +33,5 @@ nginx:QV: make -j$nprocs install:QV: - mkdir -p "$ROOT/run/lock" + $INSTALL -d -m 755 "$ROOT/run/lock" make -j$nprocs install DESTDIR="$ROOT" diff --git a/ntfs3g/depsinc.mk b/ntfs3g/depsinc.mk @@ -2,5 +2,9 @@ ntfs3g_libdir = $ntfs3g_DEPDIR/ntfs-3g_ntfsprogs-$v/libntfs-3g/.libs ntfs3g_includedir = $ntfs3g_DEPDIR/ntfs-3g_ntfsprogs-$v/liba/include -DEPS_CFLAGS = $DEPS_CFLAGS -I${ntfs3g_includedir} -DEPS_LDFLAGS = $DEPS_LDFLAGS -L${ntfs3g_libdir} -lntfs-3g + +ntfs3g_CFLAGS = -I${ntfs3g_includedir} +ntfs3g_LDFLAGS = -L${ntfs3g_libdir} -lntfs-3g + +DEPS_CFLAGS = $DEPS_CFLAGS ${ntfs3g_CFLAGS} +DEPS_LDFLAGS = $DEPS_LDFLAGS ${ntfs3g_LDFLAGS} diff --git a/ntfs3g/ntfs3g.mk b/ntfs3g/ntfs3g.mk @@ -28,11 +28,11 @@ INSTALL_SYMLINK = \ # man pages are suffixed with .in, so copy those manually. installman8:QV: i=8 - mkdir -p ${ROOT}${PREFIX}$MANDIR/man$i + $INSTALL -d -m 755 ${ROOT}${PREFIX}$MANDIR/man$i for f in ` ls -1 src/*.8.in; ls -1 ntfsprogs/*.$i.in`; do fn=`basename $f | sed 's@.in$@@g'` echo INSTALL ${ROOT}${PREFIX}$MANDIR/man$i/$fn - $INSTALL -m 755 $f ${ROOT}${PREFIX}$MANDIR/man$i/$fn + $INSTALL -m 644 $f ${ROOT}${PREFIX}$MANDIR/man$i/$fn done install_man: installman8 diff --git a/vim/vim.mk b/vim/vim.mk @@ -4,9 +4,10 @@ DEPS = ncurses <$mkbuild/mk.common-noinst $TARG:QV: - export CPPFLAGS="$DEPS_CFLAGS $CFLAGS" LDFLAGS="$DEPS_LDFLAGS $LDFLAGS" + export CPPFLAGS="$DEPS_CFLAGS $CFLAGS" + export LDFLAGS="$DEPS_LDFLAGS $LDFLAGS" ./configure \ - --prefix=$PREFIX/ \ + --prefix="$PREFIX/" \ --disable-gui \ --disable-nls \ --disable-netbeans \ @@ -17,5 +18,5 @@ $TARG:QV: install:QV: make DESTDIR="$ROOT" install - install -m 755 -d $ROOT/$BINDIR + $INSTALL -d -m 755 $ROOT/$BINDIR ln -sf vim $ROOT/$BINDIR/vi diff --git a/xorgserver/xorgserver.mk b/xorgserver/xorgserver.mk @@ -67,4 +67,4 @@ xorgserver:QV: install:QV: # NOTE: "-all-static" is needed. make -j$nprocs install DESTDIR="$ROOT" LDFLAGS="-all-static $LDFLAGS" - install -m 755 -d "$ROOT/etc/X11/xorg.conf.d" + $INSTALL -m 755 -d "$ROOT/etc/X11/xorg.conf.d"