Fixed identation in subshell in build files of following packages:

base/{busybox,enchant,fftw,kmod,llvm,musl}
Replaced CFLAGS and related CFLAGS with += operator for cleanliness
Fixed mkdir commands in:
base/{exiv2,fmt,glib,json-glib}
Fixed file/recompile_magic.mgc.sh script by discarding /usr in base/file build file
Tuned build options in base/flac
Discarded unnecessary CPPFLAGS and printf command in base/flex
Replaced CFLAGS with LDFLAGS in base/gawk
Discarded /usr/bin/update-mime-database with own /etc/rc.d.rc.gtk liner in base/glib's doinst.sh file
Discarded CXXFLAGS liner in base/glib
Discarded mkdir liner in base/initfs
Cause base/llvm build file to properly cd into the smbuild directory smoothly when attempting a rebuild in future
Discarded unnecessary CFLAGS options in base/mksh
Upgraded base/zstd to 1.5.2, rewrote its build options to use cmake build system
This commit is contained in:
PktSurf 2023-03-14 22:36:37 +05:30
parent 17f2f4cd42
commit b702d78311
29 changed files with 90 additions and 98 deletions

View file

@ -28,16 +28,18 @@ build() {
install -Dm 755 busybox $pkg/bin/busybox
cp LICENSE $pkgdocs/
(
cd $pkg/bin
cd $pkg/bin
for f in ntpd passwd udhcpc udhcpd route ifconfig \
telnet telnetd tftp microcom netstat killall5 setfont \
loadkmap wall ipcalc iostat brctl arp \
su login init chpst sv svc runsv runsvdir halt reboot poweroff getty \
adduser addgroup deluser delgroup mdev rev;
do ln -s busybox "$f";
done
for f in ntpd passwd udhcpc udhcpd route ifconfig \
telnet telnetd tftp microcom netstat killall5 setfont \
loadkmap wall ipcalc iostat brctl arp \
su login init chpst sv svc runsv runsvdir halt reboot poweroff getty \
adduser addgroup deluser delgroup mdev rev;
do ln -s busybox "$f";
done
)
install -Dm 755 $srcdir/udhcpc-script $pkg/etc/udhcpc-script
install -Dm 755 $srcdir/dhclient $pkg/bin/dhclient

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
CFLAGS="$CFLAGS -fcommon" \
CFLAGS+=" -fcommon" \
./configure \
--prefix=""

View file

@ -27,8 +27,9 @@ build() {
make
make install DESTDIR=$pkg
( cd docs/libcurl
(
cd docs/libcurl
make install-man3 DESTDIR=$pkg
cd opts
make install-man3 DESTDIR=$pkg

View file

@ -43,8 +43,7 @@ build() {
make
make install DESTDIR=$pkg
cd ..
cp LICENSE $pkgdocs/
cp ../LICENSE $pkgdocs/
mkfinalpkg
}

View file

@ -21,7 +21,7 @@ build() {
done
ac_cv_path_mkdir="mkdir -p" \
CFLAGS="$CFLAGS -D_GNU_SOURCE -D__uint64_t=u_int64_t -fPIC" \
CFLAGS+=" -D__uint64_t=u_int64_t" \
LDFLAGS="-L/lib -static" \
./configure \
--prefix="" \

View file

@ -24,12 +24,14 @@ build() {
make install DESTDIR=$pkg
cp COPYING.LIB $pkgdocs/
cd $pkg
( cd include ; ln -sfv enchant-2 enchant )
( cd bin ; ln -sfv enchant-2 enchant )
( cd lib ; ln -sfv libenchant-2.so libenchant.so )
( cd lib/pkgconfig ; ln -sfv enchant-2.pc enchant.pc )
(
cd $pkg
cd include ; ln -sfv enchant-2 enchant
cd ../bin ; ln -sfv enchant-2 enchant
cd ../lib ; ln -sfv libenchant-2.so libenchant.so
cd ../lib/pkgconfig ; ln -sfv enchant-2.pc enchant.pc
)
mkfinalpkg
}

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
CFLAGS="$CFLAGS -std=c99" \
CFLAGS+=" -std=c99" \
./configure \
--prefix="" \
--sbindir=/bin

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
mkdir smbuild && cd smbuild
mkdir -p smbuild && cd smbuild
cmake .. \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_INSTALL_LIBDIR=lib

View file

@ -32,10 +32,10 @@ build() {
}
defmakeopts() {
make
make install DESTDIR=$pkg
make clean
unset liboptions
make
make install DESTDIR=$pkg
make clean
unset liboptions
}
# Standard build

View file

@ -1,5 +1,5 @@
# Compile /etc/file/magic.mgc:
chroot . /usr/bin/file --compile 1> /dev/null 2> /dev/null
chroot . /bin/file --compile 1> /dev/null 2> /dev/null
if [ -r magic.mgc ]; then
mv magic.mgc etc/file
fi

View file

@ -20,7 +20,7 @@ prepbuilddir() {
build() {
# linking against libseccomp causes weird "Bad system call" issues
CFLAGS="$CFLAGS --std=c99" \
CFLAGS+=" --std=c99" \
./configure \
--prefix="" \
--datadir=/etc \
@ -29,7 +29,7 @@ build() {
# Install the flat files
# We'll regenerate /etc/file/magic.mgc in the doinst.sh
rm -rf $pkg/etc/file/magic.mgc
#rm $pkg/etc/file/magic.mgc
mkdir -p $pkg/etc/file/magic
cp -a magic/Magdir/* $pkg/etc/file/magic/
chmod 0644 $pkg/etc/file/magic/*

View file

@ -10,5 +10,5 @@ if [ ! "$UID" = "0" ]; then
fi
cd /etc/file
/usr/bin/file --compile
/bin/file --compile

View file

@ -16,9 +16,16 @@ prepbuilddir() {
}
build() {
if [[ $arch == "aarch64" ]] ; then
sseopts="--disable-sse"
else
sseopts="--enable-sse"
fi
./configure \
--prefix="" \
--disable-sse
$sseopts
make
make install DESTDIR=$pkg

View file

@ -16,9 +16,6 @@ prepbuilddir() {
}
build() {
unset CPPFLAGS
printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in
CPPFLAGS="$CFLAGS -DSTDC_HEADERS" \
./configure \
--prefix="" \

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
mkdir smbuild && cd smbuild
mkdir -p smbuild && cd smbuild
cmake .. \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_INSTALL_LIBDIR="/lib" \

View file

@ -16,7 +16,8 @@ prepbuilddir() {
}
build() {
CFLAGS="$CFLAGS -static" \
#CFLAGS+=" -static" \
LDFLAGS="-static" \
./configure \
--prefix="" \
--libexecdir=/lib \

View file

@ -1,5 +1 @@
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
[ -x /etc/rc.d/rc.gtk ] && /etc/rc.d/rc.gtk

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
mkdir smbuild && cd smbuild
mkdir -p smbuild && cd smbuild
meson .. --prefix="/" \
-Dman=false \

View file

@ -17,7 +17,6 @@ prepbuilddir() {
build() {
# TODO: disable linking against qt5
CXXFLAGS="$CXXFLAGS -mno-outline-atomics" \
./configure \
--prefix="" \
--disable-static \

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
CFLAGS="$CFLAGS -static" \
LDFLAGS="-static" \
./configure \
--prefix="" \
--bindir=/bin

View file

@ -19,7 +19,6 @@ build() {
mv initfs/* .
rmdir initfs
mkdir -p install
chmod 1777 tmp
chmod 0700 root

View file

@ -15,7 +15,7 @@ prepbuilddir() {
}
build() {
mkdir smbuild && cd smbuild
mkdir -p smbuild && cd smbuild
meson .. --prefix="/" \
-Dintrospection=false

View file

@ -27,11 +27,13 @@ build() {
make install DESTDIR=$pkg
cp COPYING $pkgdocs/
cd $pkg/bin
for file in depmod insmod lsmod modinfo modprobe rmmod ; do
ln -sf kmod $file
done
(
cd $pkg/bin
for file in depmod insmod lsmod modinfo modprobe rmmod ; do
ln -sf kmod $file
done
)
mkfinalpkg
}

View file

@ -16,7 +16,7 @@ prepbuilddir() {
}
build() {
CFLAGS="$CFLAGS -D_BSD_SOURCE -DIPPROTO_HOPOPTS=0 -include limits.h" \
CFLAGS+=" -D_BSD_SOURCE -DIPPROTO_HOPOPTS=0 -include limits.h" \
ac_cv_type_u_int64_t=yes \
./configure \
--prefix="" \

View file

@ -36,17 +36,20 @@ prepbuilddir() {
mv libunwind-$version.src libunwind
)
mkdir -p build && cd build
mkdir -p include
(
mkdir -p smbuild && cd smbuild
mkdir -p include
cp -r ../projects/libunwind/include/mach-o include/
rm -r ../projects/libunwind
cp -r ../projects/libunwind/include/mach-o include/
rm -r ../projects/libunwind
)
}
build() {
# We don't need our optimisations for small builds
unset CFLAGS CXXFLAGS
cd smbuild
cmake .. -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX="" \

View file

@ -18,7 +18,7 @@ prepbuilddir() {
build() {
chmod +x Build.sh
CFLAGS="-static -O3 -fPIC" ./Build.sh
CFLAGS+=" -static" ./Build.sh
install -Dm 644 mksh.1 $pkg/share/man/man1/mksh.1
install -Dm 755 mksh $pkg/bin/mksh

View file

@ -24,18 +24,17 @@ build() {
make install DESTDIR=$pkg
# Some additional stuff from alpine
mkdir -p $pkg/bin addons && cd addons
mkdir -p $pkg/bin
gcc -o $pkg/bin/getconf $srcdir/getconf.c
gcc -o $pkg/bin/getent $srcdir/getent.c
gcc -o $pkg/bin/iconv $srcdir/iconv.c
cd ..
( cd $pkg/lib
# Remove the symlink, it'll break upgrades and make the system useless
rm ld-musl-$arch.so.1
# Copy the libc.so as the $arch-specific file
cp libc.so ld-musl-$arch.so.1
(
cd $pkg/lib
# Remove the symlink, it'll break upgrades and make the system useless
rm ld-musl-$arch.so.1
# Copy the libc.so as the $arch-specific file
cp libc.so ld-musl-$arch.so.1
)
cp COPYRIGHT $pkgdocs/

View file

@ -1,7 +1,8 @@
app=zstd
version=1.4.4
version=1.5.2
build=1sml
homepage="http://zstd.net"
homepage="https://github.com/facebook/zstd"
download="https://github.com/facebook/zstd/releases/download/v$version/zstd-$version.tar.gz"
desc="Real-time compression algorithm providing high compression ratios"
requires="gcc-libs zlib xz lz4"
@ -12,31 +13,28 @@ prepbuilddir() {
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
applypatch $srcdir/zstd.dont.link.pzstd.to.static.libzstd.a.diff
}
build() {
make
make -C contrib/pzstd
mkdir -p smbuild && cd smbuild
cmake ../build/cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DZSTD_ZLIB_SUPPORT=ON \
-DZSTD_LZMA_SUPPORT=ON \
-DZSTD_LZ4_SUPPORT=ON \
-DZSTD_BUILD_STATIC=OFF \
-DZSTD_PROGRAMS_LINK_SHARED=ON
make \
prefix="" \
libdir="/lib" \
mandir="/share/man" \
DESTDIR=$pkg install
make
make install DESTDIR="$pkg"
install -Dm 755 contrib/pzstd/pzstd $pkg/bin/pzstd
# zstdmt and zstd are the same, so symlink them
( cd $pkg/bin ; ln -sf zstd zstdmt )
cp -a COPYING* LICENSE $pkgdocs/
cp ../LICENSE $pkgdocs/
mkfinalpkg
}
sha512sums="
1f15e07a051ba2ca066f6c0e2807fa309a2bd01c4994d9a0d12237c3371422316c69da92917d4729f84df82717fb97a0761001a94a9de9a2a538b9002c57fd63 zstd-1.4.4.tar.lz
356a47ea676262c70d0a22c20aedc98a4d1070972ec8910b2bb063c35e32b9beadb09ecab51beab36df24fd678e8948ace3efe485af5208d635dcc7c02d22948 zstd.dont.link.pzstd.to.static.libzstd.a.diff
7b7a6e3ca395eef68e40119f9168a0730d561b94b8fa5be9b3936ec7f86cad4b1333596604a260d3ab81d593de4bef9fad43d41eb9fe0d74e202173ef7f2728c zstd-1.5.2.tar.lz
"

View file

@ -1,13 +0,0 @@
--- ./contrib/pzstd/Makefile.orig 2018-12-29 22:36:55.196425576 -0600
+++ ./contrib/pzstd/Makefile 2018-12-29 22:37:54.123426836 -0600
@@ -171,8 +171,8 @@
$(TESTPROG) ./test/RoundTripTest$(EXT) $(TESTFLAGS)
# Build the main binary
-pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o $(ZSTDDIR)/libzstd.a
- $(LD_COMMAND)
+pzstd$(EXT): main.o $(PROGDIR)/util.o Options.o Pzstd.o SkippableFrame.o
+ $(LD_COMMAND) -L ../../lib -lzstd
# Target that depends on all the tests
.PHONY: tests