Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: haikuports/haikuports
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1cbbf6ef9312
Choose a base ref
...
head repository: haikuports/haikuports
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a97e9d4d9c9d
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Aug 3, 2021

  1. bind_utils: Add initial port work. Not 100% yet

    * Provides the standard dig,host,nslookup tools
    * While working, it's having trouble finding haiku's
      default resolvers.  Manually passing @8.8.8.8 fixes
      resolution and it works as expected
    * Flagged unknown on all platforms for now
    kallisti5 committed Aug 3, 2021
    Copy the full SHA
    a97e9d4 View commit details
Showing with 146 additions and 0 deletions.
  1. +71 −0 net-dns/bind_utils/bind_utils-9.16.19.recipe
  2. +75 −0 net-dns/bind_utils/patches/bind_utils-9.16.19.patchset
71 changes: 71 additions & 0 deletions net-dns/bind_utils/bind_utils-9.16.19.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
SUMMARY="A collection of client side programs for DNS troubleshooting"
DESCRIPTION="bind_utils is a collection of DNS troubleshooting applications"
HOMEPAGE="https://isc.org"
COPYRIGHT="Internet Systems Consortium, Inc. ('ISC')"
LICENSE="MPL v2.0"
REVISION="1"
SOURCE_URI="ftp://ftp.isc.org/isc/bind9/$portVersion/bind-$portVersion.tar.xz"
CHECKSUM_SHA256="20bf727559302c933475904847041916bb6c279680c170babc01a76998e80ad3"
SOURCE_DIR="bind-$portVersion"
PATCHES="bind_utils-$portVersion.patchset"

ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"

PROVIDES="
bind_utils$secondaryArchSuffix = $portVersion
cmd:dig
cmd:host
cmd:nslookup
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libuv$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libuv$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autom4te
cmd:automake
cmd:autoreconf
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:makeinfo
cmd:pkg_config
cmd:find
cmd:xargs
"

BUILD()
{
runConfigure ./configure --without-python

make -C lib/dns $jobArgs
make -C lib/isc $jobArgs
make -C lib/bind9 $jobArgs
make -C lib/isccfg $jobArgs
make -C lib/irs $jobArgs
make -C bin/dig $jobArgs
make -C doc $jobArgs
}

INSTALL()
{
mkdir -p $docDir

make -C bin/dig install
cp -v doc/man/{dig.1,host.1,nslookup.1} $docDir
}

TEST()
{
LIBS="-Wl,--as-needed -lbnetapi -lnetwork" make check
}
75 changes: 75 additions & 0 deletions net-dns/bind_utils/patches/bind_utils-9.16.19.patchset
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From 63a8d2da718c751d8d4134b8cb9a66c80216fbfe Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Tue, 3 Aug 2021 13:10:12 -0500
Subject: [PATCH] haiku: patch in our endian code

* There's likely better ways to do this with
_BSD_SOURCE, but I wasn't able to get the standard
methods working
---
lib/isc/include/isc/endian.h | 49 +++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/lib/isc/include/isc/endian.h b/lib/isc/include/isc/endian.h
index dc770f6..e1a3c50 100644
--- a/lib/isc/include/isc/endian.h
+++ b/lib/isc/include/isc/endian.h
@@ -11,7 +11,54 @@

#pragma once

-#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+#if defined(__HAIKU__)
+
+#include <config/HaikuConfig.h>
+#include <support/ByteOrder.h>
+#include <support/SupportDefs.h>
+
+/*
+ * General byte order swapping functions.
+ */
+#define bswap16(x) __swap_int16(x)
+#define bswap32(x) __swap_int32(x)
+#define bswap64(x) __swap_int64(x)
+
+/*
+ * Host to big endian, host to little endian, big endian to host, and little
+ * endian to host byte order functions as detailed in byteorder(9).
+ */
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define htobe16(x) bswap16((x))
+#define htobe32(x) bswap32((x))
+#define htobe64(x) bswap64((x))
+#define htole16(x) ((uint16_t)(x))
+#define htole32(x) ((uint32_t)(x))
+#define htole64(x) ((uint64_t)(x))
+
+#define be16toh(x) bswap16((x))
+#define be32toh(x) bswap32((x))
+#define be64toh(x) bswap64((x))
+#define le16toh(x) ((uint16_t)(x))
+#define le32toh(x) ((uint32_t)(x))
+#define le64toh(x) ((uint64_t)(x))
+#else /* BYTE_ORDER != LITTLE_ENDIAN */
+#define htobe16(x) ((uint16_t)(x))
+#define htobe32(x) ((uint32_t)(x))
+#define htobe64(x) ((uint64_t)(x))
+#define htole16(x) bswap16((x))
+#define htole32(x) bswap32((x))
+#define htole64(x) bswap64((x))
+
+#define be16toh(x) ((uint16_t)(x))
+#define be32toh(x) ((uint32_t)(x))
+#define be64toh(x) ((uint64_t)(x))
+#define le16toh(x) bswap16((x))
+#define le32toh(x) bswap32((x))
+#define le64toh(x) bswap64((x))
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
+
+#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__bsdi__)

#include <sys/endian.h>
--
2.30.2