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.cross
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 894fb0cf70df
Choose a base ref
...
head repository: haikuports/haikuports.cross
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fa2aea163348
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 21, 2021

  1. Copy the full SHA
    85fdb12 View commit details
  2. Add recipe for zstd

    Now a mandatory dependency of the Haiku package
    pulkomandy committed Oct 21, 2021
    Copy the full SHA
    fa2aea1 View commit details
22 changes: 22 additions & 0 deletions app-arch/zstd_bootstrap/patches/zstd-1.5.0.patchset
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From d10c479911497738d482862559b94c7617d57a61 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Wed, 29 Sep 2021 17:58:52 -0400
Subject: Disable weak symbols; they do not seem to behave correctly.


diff --git a/lib/common/zstd_trace.h b/lib/common/zstd_trace.h
index 2da5640..aeb126a 100644
--- a/lib/common/zstd_trace.h
+++ b/lib/common/zstd_trace.h
@@ -20,7 +20,7 @@ extern "C" {
/* weak symbol support */
#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && defined(__GNUC__) && \
!defined(__APPLE__) && !defined(_WIN32) && !defined(__MINGW32__) && \
- !defined(__CYGWIN__)
+ !defined(__CYGWIN__) && !defined(__HAIKU__)
# define ZSTD_HAVE_WEAK_SYMBOLS 1
#else
# define ZSTD_HAVE_WEAK_SYMBOLS 0
--
2.28.0

96 changes: 96 additions & 0 deletions app-arch/zstd_bootstrap/zstd_bootstrap-1.5.0.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
SUMMARY="Zstandard, a fast real-time compression algorithm"
DESCRIPTION="Zstd, short for Zstandard, is a fast lossless compression \
algorithm, targeting real-time compression scenarios at zlib-level and better \
compression ratios. The zstd compression library provides in-memory \
compression and decompression functions. It offers a very wide range of \
compression / speed trade-off, while being backed by a very fast decoder. It \
also offers a special mode for small data, called dictionary compression, and \
can create dictionaries from any sample set."
HOMEPAGE="https://facebook.github.io/zstd/"
COPYRIGHT="2016-2018 Facebook, Inc."
LICENSE="BSD (2-clause)
GNU GPL v2"
REVISION="2"
SOURCE_URI="https://github.com/facebook/zstd/archive/v$portVersion.tar.gz"
SOURCE_FILENAME="zstd-$portVersion.tar.gz"
SOURCE_DIR="zstd-$portVersion"
CHECKSUM_SHA256="0d9ade222c64e912d6957b11c923e214e2e010a18f39bec102f572e693ba2867"
PATCHES="zstd-$portVersion.patchset"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
PATCHES="$PATCHES
zstd-$portVersion-gcc2.patchset
"
fi

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

PROVIDES="
zstd$secondaryArchSuffix = $portVersion
lib:libzstd$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"

PROVIDES_devel="
zstd${secondaryArchSuffix}_devel = $portVersion
devel:libzstd$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
zstd$secondaryArchSuffix == $portVersion base
"

BUILD_REQUIRES="
gcc${secondaryArchSuffix}_syslibs_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku_devel
binutils_cross_$effectiveTargetArchitecture
gcc_cross_$effectiveTargetArchitecture
cmd:gcc$secondaryArchSuffix
cmd:cmake
cmd:make
cmd:sed
cmd:find
"

BUILD()
{
cd build/cmake

# prepare a toolchain file
cat > toolchain.cmake << EOF
SET(CMAKE_SYSTEM_NAME Haiku)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER $effectiveTargetMachineTriple-gcc)
SET(CMAKE_CXX_COMPILER $effectiveTargetMachineTriple-g++)
SET(CMAKE_FIND_ROOT_PATH $crossSysrootDir)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
EOF

cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \
-DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_TESTS=OFF $cmakeDirArgs
make
}

INSTALL()
{
cd build/cmake
make DESTDIR=$installDestDir install

prepareInstalledDevelLib libzstd
fixPkgconfig
fixCMake

packageEntries devel \
$installDestDir$developDir

}
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="c5de95ccaa68d271d702689ba3cfd3852170451441c9e084d1f3db40c8cc184f"
REVISION="1"

ARCHITECTURES="!x86_gcc2 ?x86_64 ?sparc riscv64 ?arm arm64 ?ppc ?m68k"
ARCHITECTURES="!x86_gcc2 ?x86_64 sparc riscv64 ?arm arm64 ?ppc ?m68k"
SECONDARY_ARCHITECTURES="?x86"

libstdcxxSoVersion="6"