summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/openbsd_baseutils.local.patch28
-rw-r--r--vars/build.vars6
-rw-r--r--vars/openbsd_baseutils.vars14
3 files changed, 47 insertions, 1 deletions
diff --git a/patches/openbsd_baseutils.local.patch b/patches/openbsd_baseutils.local.patch
new file mode 100644
index 00000000..f22fa4a1
--- /dev/null
+++ b/patches/openbsd_baseutils.local.patch
@@ -0,0 +1,28 @@
+diff -ru baseutils.orig/pax/Makefile baseutils/pax/Makefile
+--- baseutils.orig/pax/Makefile 2020-01-12 15:30:00.798505415 +0100
++++ baseutils/pax/Makefile 2020-01-12 16:17:01.446757336 +0100
+@@ -19,11 +19,7 @@
+
+ install:
+ install -c -s -m 555 ${PROG} ${PREFIX}/bin/${PROG}
+- install -c -s -m 555 ${PROG} ${PREFIX}/bin/tar
+- install -c -s -m 555 ${PROG} ${PREFIX}/bin/cpio
+ install -c -m 444 ${PROG}.1 ${MANDIR}/man1
+- install -c -m 444 tar.1 ${MANDIR}/man1
+- install -c -m 444 cpio.1 ${MANDIR}/man1
+
+ clean:
+ rm -f ${PROG} ${OBJS}
+diff --git a/pax/file_subs.c b/pax/file_subs.c
+index be8d065..41ffd57 100644
+--- a/pax/file_subs.c
++++ b/pax/file_subs.c
+@@ -823,7 +823,7 @@ set_attr(const struct file_times *ft, int force_times, mode_t mode,
+ * so do *not* use O_NOFOLLOW. The dev+ino check will
+ * protect us from evil.
+ */
+- fd = open(ft->ft_name, O_RDONLY | O_DIRECTORY);
++ fd = open(ft->ft_name, O_RDWR | O_DIRECTORY);
+ if (fd == -1) {
+ if (!in_sig)
+ syswarn(1, errno, "Unable to restore mode and times"
diff --git a/vars/build.vars b/vars/build.vars
index 5ed12792..650ec269 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -1527,7 +1527,7 @@ bison chicken cparser diffutils flex lunix m4 make mandoc nasm patch patchutils
# Packages list native_packages_etc
NATIVE_PACKAGES_ETC_PACKAGES="
bochs ca_certificates cron dante debianutils emacs fetchmail ffmpeg gdb gnuchess ghostscript hastyhex hexcurse htop icecast isync infounzip
-infozip imagemagick john less libredwg mlogin mc mintty nano ncdu nullmailer opensmtpd p7zip procps_ng qemu qpdf rdesktop rw rxvt_unicode st
+infozip imagemagick john less libredwg mlogin mc mintty nano ncdu nullmailer openbsd_baseutils opensmtpd p7zip procps_ng qemu qpdf rdesktop rw rxvt_unicode st
tmux tzdb vim yabasic xcowsay xeyes xorriso xterm xwd";
: ${PKG_BOCHS_SHA256SUM:=ee5b677fd9b1b9f484b5aeb4614f43df21993088c0c0571187f93acb0866e98c};
: ${PKG_BOCHS_VERSION:=2.6.9};
@@ -1681,6 +1681,10 @@ fi;
: ${PKG_NULLMAILER_CONFIGURE_ARGS_EXTRA:="--enable-tls"}
: ${PKG_NULLMAILER_IN_TREE:=1}
: ${PKG_NULLMAILER_SUBDIR:=nullmailer-${PKG_NULLMAILER_VERSION}};
+: ${PKG_OPENBSD_BASEUTILS_URLS_GIT:="baseutils=https://github.com/ibara/baseutils.git@master"};
+: ${PKG_OPENBSD_BASEUTILS_BUILD_DIR:=baseutils};
+: ${PKG_OPENBSD_BASEUTILS_ENV_VARS_EXTRA:="MANDIR=${PREFIX_NATIVE}/share/man"};
+: ${PKG_OPENBSD_BASEUTILS_BUILD_STEPS_DISABLE:=install_make};
: ${PKG_OPENSMTPD_SHA256SUM:=eb1bedbfb23d9f08f509d92d8efcaf51d56fb2f44492f40ec059d41124a2f1d9};
: ${PKG_OPENSMTPD_VERSION:=6.6.1p1};
: ${PKG_OPENSMTPD_URL:=https://www.opensmtpd.org/archives/opensmtpd-${PKG_OPENSMTPD_VERSION}.tar.gz}
diff --git a/vars/openbsd_baseutils.vars b/vars/openbsd_baseutils.vars
new file mode 100644
index 00000000..e709f6e8
--- /dev/null
+++ b/vars/openbsd_baseutils.vars
@@ -0,0 +1,14 @@
+#
+# set -o errexit -o noglob are assumed.
+#
+
+pkg_openbsd_baseutils_build() {
+ make -C ${PKG_BUILD_DIR}/libopenbsd CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}"
+ make -C ${PKG_BUILD_DIR}/pax CC="${DEFAULT_TARGET}-gcc --sysroot=${PREFIX_NATIVE}"
+};
+
+pkg_openbsd_baseutils_install() {
+ make -C ${PKG_BUILD_DIR}/pax install PREFIX="${PKG_DESTDIR}" MANDIR="${PKG_DESTDIR}/share/man"
+}
+
+# vim:filetype=sh