38 |
sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \ |
sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \ |
39 |
include/builddefs.in || die |
include/builddefs.in || die |
40 |
|
|
|
# remove static |
|
|
sed -i '1iLLDFLAGS = -static-libtool-libs' {estimate,fsr}/Makefile || die |
|
|
sed -i "/LLDFLAGS/s:-static-libtool-libs::" $(find -name Makefile) || die |
|
|
sed -i '1iLLDFLAGS = -static' {estimate,fsr}/Makefile || die |
|
|
sed -i "/LLDFLAGS/s:-static::" $(find -name Makefile) || die |
|
|
|
|
|
# libdisk has broken blkid conditional checking |
|
|
sed -i '/LIB_SUBDIRS/s:libdisk::' Makefile || die |
|
|
|
|
|
# fix as-needed |
|
|
echo 'LTLIBS += $(LIBUUID) $(LIBXFS)' >> libxlog/Makefile || die |
|
|
echo 'LTLIBS += $(LIBUUID)' >> libxfs/Makefile || die |
|
|
echo 'LTLIBS += $(LIBBLKID) $(LIBXFS)' >> libxcmd/Makefile || die |
|
|
echo 'LTLIBS += $(LIBBLKID) $(LIBXFS)' >> libfrog/Makefile || die |
|
|
|
|
|
# build libfrog after libxfs to fix as-needed |
|
|
sed -i -e '/^$(LIBFROG_SUBDIR)\:/s:include:& libxfs:' \ |
|
|
-e '/^$(LIB_SUBDIRS) $(TOOL_SUBDIRS)\:/s:include libfrog:include:' \ |
|
|
Makefile || die |
|
|
|
|
41 |
# honor usr-move |
# honor usr-move |
42 |
sed -i -e "s:root_sbindir='/sbin':root_sbindir='/usr/sbin':" \ |
sed -i -e "s:root_sbindir='/sbin':root_sbindir='/usr/sbin':" \ |
43 |
-e 's:root_libdir="/${base_libdir}":root_libdir="/usr/${base_libdir}":' \ |
-e 's:root_libdir="/${base_libdir}":root_libdir="/usr/${base_libdir}":' \ |
54 |
# disable debug code |
# disable debug code |
55 |
export DEBUG=-DNDEBUG |
export DEBUG=-DNDEBUG |
56 |
|
|
57 |
mconfigure \ |
# disable-lto: disable link time optimization |
58 |
|
# |
59 |
|
# do not use mconfigure: |
60 |
|
# it enables disable-static, and this messes with the makefile |
61 |
|
# which causes the --as-needed flags added 3 times to the LDFLAGS and this will break the build |
62 |
|
# to prevent this nasty bug of the makefile, call configure without --disable-static |
63 |
|
# see: https://www.spinics.net/lists/linux-xfs/msg30191.html |
64 |
|
./configure \ |
65 |
|
--host=${CHOST} \ |
66 |
|
--build=${CHOST} \ |
67 |
|
--prefix=/usr \ |
68 |
|
--mandir=/usr/share/man \ |
69 |
|
--infodir=/usr/share/info \ |
70 |
|
--datadir=/usr/share \ |
71 |
|
--sysconfdir=/etc \ |
72 |
|
--localstatedir=/var/lib \ |
73 |
|
--libdir=/usr/$(mlibdir) \ |
74 |
|
\ |
75 |
--libexecdir=/usr/$(mlibdir) \ |
--libexecdir=/usr/$(mlibdir) \ |
76 |
--enable-gettext \ |
--enable-gettext \ |
77 |
--enable-readline \ |
--enable-readline \ |
78 |
--enable-blkid \ |
--enable-blkid \ |
79 |
--disable-editline \ |
--disable-editline \ |
80 |
|
--disable-lto \ |
81 |
|| die |
|| die |
82 |
|
|
83 |
mmake -j1 V=1 || die |
mmake -j1 V=1 || die |