Skip to content

Commit 2bf45c1

Browse files
committed
ports: Misc backports
1 parent e52b8e4 commit 2bf45c1

File tree

22 files changed

+83
-71
lines changed

22 files changed

+83
-71
lines changed

patches/gcc-host/jinx-working-patch.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ index 95c91ee..dd17677 100644
8888
x86_64-*-fuchsia*)
8989
tmake_file="${tmake_file} i386/t-x86_64-elf"
9090
tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
91+
diff --git gcc-host-clean/libatomic/configure.tgt gcc-host-workdir/libatomic/configure.tgt
92+
index 4237f28..8327bfa 100644
93+
--- gcc-host-clean/libatomic/configure.tgt
94+
+++ gcc-host-workdir/libatomic/configure.tgt
95+
@@ -151,7 +151,7 @@ case "${target}" in
96+
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
97+
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
98+
| *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
99+
- | *-*-darwin* | *-*-aix* | *-*-cygwin*)
100+
+ | *-*-darwin* | *-*-aix* | *-*-cygwin* | *-*-mlibc*)
101+
# POSIX system. The OS is supported.
102+
config_path="${config_path} posix"
103+
;;
91104
diff --git gcc-host-clean/libcpp/Makefile.in gcc-host-workdir/libcpp/Makefile.in
92105
index ebbca37..ea97ba4 100644
93106
--- gcc-host-clean/libcpp/Makefile.in

patches/xbps/jinx-working-patch.patch

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
diff --git xbps-clean/bin/xbps-create/main.c xbps-workdir/bin/xbps-create/main.c
2-
index 373e744..73ed280 100644
3-
--- xbps-clean/bin/xbps-create/main.c
4-
+++ xbps-workdir/bin/xbps-create/main.c
5-
@@ -41,7 +41,7 @@
6-
#include <libgen.h>
7-
#include <locale.h>
8-
#include <dirent.h>
9-
-
10-
+#include <limits.h>
11-
#include <xbps.h>
12-
#include "queue.h"
13-
141
diff --git xbps-clean/bin/xbps-install/util.c xbps-workdir/bin/xbps-install/util.c
152
index 7cabdd1..0182300 100644
163
--- xbps-clean/bin/xbps-install/util.c
@@ -46,21 +33,12 @@ index 57df730..a4109d0 100755
4633

4734
echo "CC = $CC" >>$CONFIG_MK
4835
echo "CFLAGS = -O2" >>$CONFIG_MK
49-
@@ -275,7 +275,7 @@ fi
50-
#
51-
# Check for some compiler warning flags.
52-
#
53-
-for f in all extra error shadow "format=2" missing-prototypes \
54-
+for f in all extra shadow "format=2" missing-prototypes \
55-
missing-declarations nested-externs vla overlength-strings \
56-
unsafe-loop-optimizations undef sign-compare \
57-
missing-include-dirs old-style-definition \
5836
@@ -677,7 +677,7 @@ fi
5937
# pkg-config is required to know dependencies for static linking.
6038
#
6139
printf "Checking for pkg-config ... "
6240
-PKGCONFIG_BIN=$(_which pkg-config)
63-
+PKGCONFIG_BIN="x86_64-vinix-mlibc-pkg-config"
41+
+PKGCONFIG_BIN=$(_which ${HOST}-pkg-config)
6442
if [ -z "$PKGCONFIG_BIN" ]; then
6543
echo "not found, exiting."
6644
exit 1
@@ -164,7 +142,7 @@ index 9890a84..ba3b073 100644
164142
+++ xbps-workdir/data/repod-main.conf
165143
@@ -1 +1 @@
166144
-repository=https://a-hel-fi.m.voidlinux.org/current
167-
+repository=https://localhost/repo/current
145+
+repository=https://example.com/repo/current
168146
diff --git xbps-clean/lib/Makefile xbps-workdir/lib/Makefile
169147
index 847bfdd..f80c0f6 100644
170148
--- xbps-clean/lib/Makefile
@@ -215,27 +193,3 @@ index f7b9142..d68b8f8 100644
215193
#include <netinet/in.h>
216194
#include <netinet/tcp.h>
217195

218-
diff --git xbps-clean/lib/portableproplib/prop_object.c xbps-workdir/lib/portableproplib/prop_object.c
219-
index 50cd918..8295b44 100644
220-
--- xbps-clean/lib/portableproplib/prop_object.c
221-
+++ xbps-workdir/lib/portableproplib/prop_object.c
222-
@@ -956,14 +956,14 @@ _prop_object_internalize_map_file(const char *fname)
223-
if ((sb.st_size & pgmask) == 0)
224-
need_guard = true;
225-
226-
- mf->poimf_xml = mmap(NULL, need_guard ? mf->poimf_mapsize + pgsize
227-
- : mf->poimf_mapsize,
228-
- PROT_READ, MAP_SHARED, fd, (off_t)0);
229-
- (void) close(fd);
230-
- if (mf->poimf_xml == MAP_FAILED) {
231-
+ mf->poimf_xml = malloc(need_guard ? mf->poimf_mapsize + pgsize : mf->poimf_mapsize);
232-
+ if (mf->poimf_xml == NULL) {
233-
_PROP_FREE(mf, M_TEMP);
234-
return (NULL);
235-
}
236-
+ ssize_t rsz = read(fd, mf->poimf_xml, need_guard ? mf->poimf_mapsize + pgsize : mf->poimf_mapsize);
237-
+ (void) close(fd);
238-
+
239-
(void)posix_madvise(mf->poimf_xml, mf->poimf_mapsize, POSIX_MADV_SEQUENTIAL);
240-
241-
if (need_guard) {

recipes/core-libs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ name=core-libs
44
skip_pkg_check=yes
55
version=0.0
66
revision=1
7-
deps="mlibc libgcc libstdc++ libintl libiconv libxcrypt tzdata"
7+
deps="mlibc libgcc libstdc++ libatomic libintl libiconv libxcrypt tzdata"

recipes/dbus

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@ build() {
3434
package() {
3535
DESTDIR="${dest_dir}" ninja install
3636

37+
touch "${dest_dir}/${prefix}"/share/dbus-1/session.d/.keep
38+
touch "${dest_dir}"/var/lib/dbus/.keep
39+
3740
post_package_strip
3841
}

recipes/freetype2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ prepare() {
1818

1919
configure() {
2020
autotools_configure \
21+
--enable-freetype-config \
2122
--with-harfbuzz=no
2223
}
2324

recipes/glib

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ version=2.84.1
55
revision=1
66
tarball_url="https://download.gnome.org/sources/glib/2.84/glib-${version}.tar.xz"
77
tarball_blake2b="d20ade482eb95873adaefc656e22c57e6712a6263a4812e448220040e30144919331cb279566a89a2ab46495b46d6a79e3821e491317587325fa3a64b40d62cc"
8-
imagedeps="meson ninja-build python3-setuptools"
8+
imagedeps="meson ninja-build python3-docutils"
99
hostdeps="gcc pkg-config"
1010
deps="core-libs pcre2 libffi zlib"
1111

1212
configure() {
1313
meson_configure \
14+
-Dglib_debug=disabled \
15+
-Dman-pages=enabled \
16+
-Dsysprof=disabled \
17+
-Dintrospection=disabled \
1418
-Dxattr=false
1519
}
1620

recipes/groff

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ package() {
2727

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

30+
# Move documentation to the correct location
31+
mv ${dest_dir}${prefix}/share/doc/groff-${version} ${dest_dir}${prefix}/share/doc/groff
32+
3033
post_package_strip
3134
}

recipes/libatomic

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#! /bin/sh
2+
3+
name=libatomic
4+
from_source=gcc-host
5+
revision=1
6+
hostdeps="gcc autoconf-2.69 automake libtool pkg-config"
7+
imagedeps="build-essential"
8+
deps="mlibc libgcc libstdc++"
9+
10+
build() {
11+
cd "${base_dir}"/host-builds/gcc/build
12+
13+
make -j${parallelism} all-target-libatomic
14+
}
15+
16+
package() {
17+
cd "${base_dir}"/host-builds/gcc/build
18+
19+
rm -rf tmp_libatomic_dir
20+
mkdir tmp_libatomic_dir
21+
22+
DESTDIR="$(realpath tmp_libatomic_dir)" make install-target-libatomic
23+
24+
mkdir -p "${dest_dir}${prefix}"
25+
cp -r tmp_libatomic_dir/usr/local/${OS_TRIPLET}/* "${dest_dir}${prefix}"/
26+
27+
# Copy libatomic into GCC's tree else it will complain.
28+
mkdir -p "${base_dir}"/host-pkgs/gcc/usr/local/${OS_TRIPLET}
29+
cp -r tmp_libatomic_dir/usr/local/${OS_TRIPLET}/* "${base_dir}"/host-pkgs/gcc/usr/local/${OS_TRIPLET}/
30+
}

recipes/libgcc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#! /bin/sh
22

33
name=libgcc
4-
skip_pkg_check=yes
5-
version="$(. "${base_dir}"/source-recipes/gcc-host && echo $version)"
4+
from_source=gcc-host
65
revision=1
76
hostdeps="gcc autoconf-2.69 automake libtool pkg-config"
87
imagedeps="build-essential"

recipes/libiconv

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tarball_blake2b="374e7a7299d4814d372d8e63246c11f403f9fc990be5b129d016b92a875d2f8
88
source_hostdeps="automake autoconf libtool pkg-config"
99
imagedeps="binutils"
1010
hostdeps="gcc autoconf automake libtool pkg-config"
11-
deps="mlibc libgcc libstdc++"
11+
deps="mlibc libgcc libstdc++ libatomic"
1212

1313
prepare() {
1414
cp /usr/local/share/aclocal/libtool.m4 ./m4/
@@ -32,5 +32,9 @@ build() {
3232
package() {
3333
DESTDIR="${dest_dir}" make install
3434

35+
# Move documentation into a sub-directory
36+
mkdir -p "${dest_dir}${prefix}/share/doc/libiconv"
37+
mv "${dest_dir}${prefix}/share/doc"/*.html "${dest_dir}${prefix}/share/doc/libiconv/"
38+
3539
post_package_strip
3640
}

0 commit comments

Comments
 (0)