Skip to content

Commit

Permalink
ports: Backports from Vinix
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Jun 11, 2024
1 parent 883acc3 commit 1d028c1
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 47 deletions.
2 changes: 1 addition & 1 deletion host-recipes/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build() {
cp -rp "${source_dir}"/. ./
mkdir build && cd build

CXXFLAGS_FOR_TARGET="$CFLAGS" \
CXXFLAGS_FOR_TARGET="$CXXFLAGS" \
CFLAGS_FOR_TARGET="$CFLAGS" \
../configure \
--prefix="${prefix}" \
Expand Down
74 changes: 72 additions & 2 deletions patches/ncurses/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
diff --git ncurses-clean/c++/Makefile.in ncurses-workdir/c++/Makefile.in
index 99f21da..d0c6eb0 100644
index 99f21da..5db41d8 100644
--- ncurses-clean/c++/Makefile.in
+++ ncurses-workdir/c++/Makefile.in
@@ -118,7 +118,7 @@ SHLIB_LIST = $(SHLIB_DIRS) \
-l@FORM_NAME@@USE_LIB_SUFFIX@ \
-l@MENU_NAME@@USE_LIB_SUFFIX@ \
-l@PANEL_NAME@@USE_LIB_SUFFIX@ \
- -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+ -lncurses@USE_LIB_SUFFIX@

LIBROOT = ncurses++

@@ -157,7 +157,7 @@ LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)

# flags for library built by this makefile
-LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \
+LDFLAGS = @LDFLAGS@ \
@LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)

AUTO_SRC = \
@@ -182,7 +182,7 @@ AUTO_SRC = \
all \
libs :: $(AUTO_SRC) $(LIBRARIES)
Expand Down Expand Up @@ -45,7 +63,7 @@ index 99f21da..d0c6eb0 100644
etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
cp $(srcdir)/etip.h.in $@
diff --git ncurses-clean/configure ncurses-workdir/configure
index 814eb2f..3e2ae5c 100755
index 488d93f..677d4a9 100755
--- ncurses-clean/configure
+++ ncurses-workdir/configure
@@ -6925,6 +6925,10 @@ CF_EOF
Expand All @@ -59,3 +77,55 @@ index 814eb2f..3e2ae5c 100755
(mingw*)
cf_cv_shlib_version=mingw
cf_cv_shlib_version_infix=mingw
diff --git ncurses-clean/form/Makefile.in ncurses-workdir/form/Makefile.in
index a950a3e..9b092c0 100644
--- ncurses-clean/form/Makefile.in
+++ ncurses-workdir/form/Makefile.in
@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@

SHLIB_DIRS = -L../lib
-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@

RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@
diff --git ncurses-clean/misc/gen-pkgconfig.in ncurses-workdir/misc/gen-pkgconfig.in
index 89a5cd4..07d94d1 100644
--- ncurses-clean/misc/gen-pkgconfig.in
+++ ncurses-workdir/misc/gen-pkgconfig.in
@@ -83,7 +83,7 @@ if [ "$includedir" != "/usr/include" ]; then
fi

lib_flags=
-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@
+for opt in -L$libdir @LIBS@
do
case $opt in
-l*) # LIBS is handled specially below
diff --git ncurses-clean/misc/ncurses-config.in ncurses-workdir/misc/ncurses-config.in
index c9f1cf8..51798da 100644
--- ncurses-clean/misc/ncurses-config.in
+++ ncurses-workdir/misc/ncurses-config.in
@@ -101,7 +101,7 @@ fi
# There is no portable way to find the list of standard library directories.
# Require a POSIX shell anyway, to keep this simple.
lib_flags=
-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS
+for opt in -L$libdir $LIBS
do
case $opt in
-specs*) # ignore linker specs-files which were used to build library
diff --git ncurses-clean/panel/Makefile.in ncurses-workdir/panel/Makefile.in
index 380f80c..a77ef15 100644
--- ncurses-clean/panel/Makefile.in
+++ ncurses-workdir/panel/Makefile.in
@@ -112,7 +112,7 @@ LINK = $(LIBTOOL_LINK)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@

SHLIB_DIRS = -L../lib
-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@

RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@
21 changes: 20 additions & 1 deletion patches/readline/jinx-working-patch.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git readline-clean/support/shlib-install readline-workdir/support/shlib-install
index 661355d..cd7d659 100755
index 661355d..d23b65c 100644
--- readline-clean/support/shlib-install
+++ readline-workdir/support/shlib-install
@@ -71,7 +71,7 @@ fi
Expand All @@ -20,3 +20,22 @@ index 661355d..cd7d659 100755
# libname.so -> libname.so.M
${echo} ${RM} ${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
diff --git readline-clean/support/shobj-conf readline-workdir/support/shobj-conf
index cd7634d..2beb0e6 100644
--- readline-clean/support/shobj-conf
+++ readline-workdir/support/shobj-conf
@@ -123,12 +123,12 @@ sunos5*|solaris2*)
;;

# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
-linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
+linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*|*-mlibc-*)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'

- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
;;

2 changes: 1 addition & 1 deletion recipes/bzip2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build() {

make CC=${OS_TRIPLET}-gcc CFLAGS="$CFLAGS -fPIC" LDFLAGS="$LDFLAGS" -f Makefile-libbz2_so
make clean
make CC=${OS_TRIPLET}-gcc AR=${OS_TRIPLET}-ar CFLAGS="$CFLAGS -fPIC" LDFLAGS="$LDFLAGS" -j${parallelism}
make CC=${OS_TRIPLET}-gcc AR=${OS_TRIPLET}-ar CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" -j${parallelism}
}

package() {
Expand Down
4 changes: 2 additions & 2 deletions recipes/cxxshim
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name=cxxshim
version=6f146a41dda736572879fc524cf729eb193dc0a6
version=9325f9f75672e50a4fbab5bef3b57c9c02705725
revision=1
tarball_url="https://github.com/managarm/cxxshim/archive/${version}.tar.gz"
tarball_blake2b="05d8cbad3d46b4272c7e31b1c8041cc5e640cc66853dddf58af953aeba6697dcbc05decb01dc6d4669fec52acd18b3265706dbf710d11dd98e7c1771ac598a49"
tarball_blake2b="bf5faec55dd05fb839cf9f48936c11744f4040441066952fa0910b875be30da6464f835de80bafd9aa0f0c5bb6da678275cec0348ebc03fe66960cfbd81fda4f"
imagedeps="meson ninja"
hostdeps="pkg-config"

Expand Down
2 changes: 1 addition & 1 deletion recipes/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ regenerate() {
}

build() {
CXXFLAGS_FOR_TARGET="$CFLAGS" \
CXXFLAGS_FOR_TARGET="$CXXFLAGS" \
CFLAGS_FOR_TARGET="$CFLAGS" \
autotools_configure \
--target=${OS_TRIPLET} \
Expand Down
2 changes: 1 addition & 1 deletion recipes/gdbm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build() {

configure_script_path=./configure \
autotools_configure \
--disable-libgdbm-compat
--enable-libgdbm-compat

make -j${parallelism}
}
Expand Down
21 changes: 6 additions & 15 deletions recipes/groff
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=groff
version=1.22.4
version=1.23.0
revision=1
tarball_url="https://ftp.gnu.org/gnu/groff/groff-${version}.tar.gz"
tarball_blake2b="cdda8a7e8e42b8d8991656ecfbffe0cd0ed5d8932467cab2f3c1eecb3365f4a5c03321b6ed929d451c3dfb00a46046a781303a1c55c4aa65eb7d178fb36b1cbc"
tarball_blake2b="9fc5a2302f034761a17f0639a04b82c536ba8a7db15b062dd736e0011fc5a27fddcaf035af128d09f06762825d9bb965e8f5561e4be7a9fea3fe86ca5f6cb2dd"
source_hostdeps="automake autoconf libtool pkg-config"
imagedeps="sed"
imagedeps="groff"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs"

Expand All @@ -13,22 +13,13 @@ regenerate() {
}

build() {
cp -rp "${source_dir}"/. ./
autotools_configure

sed -i s/"_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)"//g lib/math.in.h
sed -i s/"_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)"//g lib/math.in.h
sed -i s/"# undef signbit"//g lib/math.in.h

PAGE="A4" \
configure_script_path=./configure \
autotools_configure \
--with-doc=no

make -j${parallelism} AR="x86_64-pc-ironclad-mlibc-ar"
make -j${parallelism} GROFFBIN=/usr/bin/groff
}

package() {
DESTDIR="${dest_dir}" make install AR="x86_64-pc-ironclad-mlibc-ar"
DESTDIR="${dest_dir}" make install

rm -f "${dest_dir}${prefix}/lib/charset.alias"

Expand Down
3 changes: 0 additions & 3 deletions recipes/libpipeline
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ regenerate() {
}

build() {
cp -rp "${source_dir}"/. ./

configure_script_path=./configure \
autotools_configure

make -j${parallelism}
Expand Down
9 changes: 3 additions & 6 deletions recipes/man-db
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name=man-db
version=2.9.4
version=2.12.1
revision=1
tarball_url="https://download.savannah.nongnu.org/releases/man-db/man-db-${version}.tar.xz"
tarball_blake2b="43427e851f0e661ca1cee55211dd7636f4ffde067c75de7715f525029b22c205728f8e86ac49abff60e47a4a4c9e1fbd78e2c87e70bd37778b88594a3897275f"
tarball_blake2b="b06c48431608cf798659d19df754d992dca8ba31842613a3326e376e80fe74d913146f45a7f3c5e70c421a2401aeabdb091de78ebb3102b9d70c194286c245a7"
source_hostdeps="automake autoconf libtool pkg-config"
imagedeps="groff"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs mpfr gmp readline libiconv groff less libpipeline gdbm"
deps="core-libs bash gdbm groff less libpipeline zlib"

regenerate() {
autotools_recursive_regen
}

build() {
cp -rp "${source_dir}"/. ./

configure_script_path=./configure \
autotools_configure \
--disable-setuid \
--with-systemdtmpfilesdir= \
Expand Down
4 changes: 2 additions & 2 deletions recipes/mlibc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name=mlibc
version=080eee7ef526d7c4a4d2140b73a95af2db76e5bf
version=8beb05f23fa6b61cb38852e7633fda2b1eb27226
revision=1
tarball_url="https://github.com/mintsuki/mlibc/archive/${version}.tar.gz"
tarball_blake2b="99759377c3df65ed1f38bcd6b63d8772a713a46975535dcca0d97eb9e3d6141edf84faf0425091460ed75e137bee34caaca6cf73e781888008f7ee6faec739bf"
tarball_blake2b="fecb3cd10bb2fedd4807033b45ccca292d71c86008f91a89d4efa43b3456966a697bf9dc8058dd9c7eeb970f17e0a83bfd1572c54b5bd60ee4f180f08c76f324"
imagedeps="meson ninja"
hostdeps="gcc pkg-config libgcc-binaries"
builddeps="cshim cxxshim frigg"
Expand Down
9 changes: 3 additions & 6 deletions recipes/readline
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ tarball_blake2b="7974322b9c092a756a79e537df08e8532f8e0fcb598f77732e28287c33ebec9
source_allow_network="yes"
source_imagedeps="curl"
source_hostdeps="automake autoconf libtool pkg-config"
imagedeps="patchelf"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs ncurses"

Expand Down Expand Up @@ -39,12 +38,10 @@ build() {
}

package() {
make SHLIB_LIBS="-lncursesw" install DESTDIR="${dest_dir}"
make install DESTDIR="${dest_dir}"

# libraries are created without soname... fix that
for lib in libhistory.so.8 libreadline.so.8; do
patchelf --set-soname $lib "${dest_dir}${prefix}/lib/$lib"
done
ln -s libreadline.so.8.2 "${dest_dir}${prefix}"/lib/libreadline.so.8
ln -s libhistory.so.8.2 "${dest_dir}${prefix}"/lib/libhistory.so.8

post_package_strip
}
13 changes: 7 additions & 6 deletions recipes/xorg-xauth
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name=xorg-xauth
version=1.1.2
version=1.1.3
revision=1
tarball_url="https://www.x.org/pub/individual/app/xauth-${version}.tar.xz"
tarball_blake2b="2ba168229bdf0c1d0fdd4c352e434abfc6f527cbafce35abac8d403a0dea91f00fd858f91f177128d13a0e618d1d95061c71ef32a3e12ac91b72a257dcfcd12b"
tarball_url="https://www.x.org/releases/individual/app/xauth-${version}.tar.xz"
tarball_blake2b="6acc6f360b7ed947d5dbc0b197b7ed0a87916f38cd8a0c74215b96ca44e98ead45987614e88833b0d2a957776b6e6a1d69d1a3dc4563774e451c2d5f5c55394d"
source_hostdeps="autoconf automake libtool pkg-config"
source_deps="xtrans xorg-util-macros libiconv gettext"
source_deps="xorg-util-macros xtrans"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs libxmu libxaw libiconv xtrans"
deps="core-libs libx11 libxau libxext libxmu"

regenerate() {
autotools_recursive_regen
Expand All @@ -19,6 +19,7 @@ build() {
}

package() {
make DESTDIR=${dest_dir} install
DESTDIR="${dest_dir}" make install

post_package_strip
}

0 comments on commit 1d028c1

Please sign in to comment.