Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Add snappy and use in arrow #19

Merged
merged 1 commit into from
Jun 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
C:\msys64\usr\bin\pacman --noconfirm --ask 20 --sync --refresh --refresh --sysupgrade --sysupgrade
displayName: Installing msys64 build environment
- script: |
rmdir /s /Q "C:\Program Files\Boost"
C:\msys64\usr\bin\pacman --noconfirm --needed -S git
C:\msys64\usr\bin\bash --login -c "$(cygpath ${SYSTEM_DEFAULTWORKINGDIRECTORY})/ci-build.sh"
displayName: Building Packages
env:
Expand Down
3 changes: 2 additions & 1 deletion ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ if [[ $(cygpath -m /) == *"rtools40"* ]]; then
curl -L https://raw.githubusercontent.com/r-windows/rtools-installer/master/disable-msys.patch | patch -d/ -R -p0
else
# msys64: remove preinstalled toolchains and swith to rtools40 repositories
pacman --noconfirm -Rcsu mingw-w64-{i686,x86_64}-toolchain gcc pkg-config
pacman --noconfirm -Rcsu $(pacman -Qqe | grep "^mingw-w64-")
pacman --noconfirm -Rcsu gcc pkg-config
cp -f pacman.conf /etc/pacman.conf
fi

Expand Down
23 changes: 15 additions & 8 deletions mingw-w64-arrow/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=arrow
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.13.0
pkgver=0.13.9000
pkgrel=1
pkgdesc="Apache Arrow is a cross-language development platform for in-memory data (mingw-w64)"
arch=("any")
Expand All @@ -12,18 +12,25 @@ license=("Apache-2.0")
depends=("${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-double-conversion"
"${MINGW_PACKAGE_PREFIX}-thrift")
"${MINGW_PACKAGE_PREFIX}-snappy"
"${MINGW_PACKAGE_PREFIX}-thrift")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc")
options=("staticlibs" "strip" "!buildflags")
source=("https://archive.apache.org/dist/arrow/arrow-${pkgver}/apache-arrow-${pkgver}.tar.gz")
sha256sums=("ac2a77dd9168e9892e432c474611e86ded0be6dfe15f689c948751d37f81391a")

# For released version:
#source=("https://archive.apache.org/dist/arrow/arrow-${pkgver}/apache-arrow-${pkgver}.tar.gz")
#sha256sums=("ac2a77dd9168e9892e432c474611e86ded0be6dfe15f689c948751d37f81391a")
#source_dir=apache-${_realname}-${pkgver}

# For git version
source=("${_realname}"::"git+https://github.com/apache/arrow")
sha256sums=("SKIP")
source_dir=${_realname}

# Other stuff
cmake_build_type=release
meson_build_type=debugoptimized

#source_dir=${_realname}-${pkgver}
source_dir=apache-${_realname}-${pkgver}
cpp_build_dir=build-${CARCH}-cpp
c_glib_build_dir=build-${CARCH}-c-glib

Expand Down Expand Up @@ -58,7 +65,7 @@ build() {
-DARROW_HDFS=OFF \
-DARROW_PYTHON=OFF \
-DARROW_BOOST_USE_SHARED=OFF \
-DARROW_WITH_SNAPPY=OFF \
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_ZSTD=OFF \
-DARROW_WITH_LZ4=OFF \
-DARROW_JEMALLOC=OFF \
Expand Down
41 changes: 41 additions & 0 deletions mingw-w64-snappy/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainer: Norbert Pfeiler <[email protected]>
# Contributor: Andrew Sun <[email protected]>

_realname=snappy
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.1.7
pkgrel=2
pkgdesc="A fast C++ compressor/decompressor library (mingw-w64)"
arch=('any')
license=('New BSD License')
url="https://github.com/google/snappy"
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc"
"make")
checkdepends=("${MINGW_PACKAGE_PREFIX}-zlib"
"${MINGW_PACKAGE_PREFIX}-lzo2")
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/snappy/archive/${pkgver}.tar.gz")
sha256sums=('3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4')

build() {
[[ -d "${srcdir}"/build-${MINGW_CHOST}-static ]] && rm -rf "${srcdir}"/build-${MINGW_CHOST}-static
mkdir -p ${srcdir}/build-${MINGW_CHOST}-static
cd ${srcdir}/build-${MINGW_CHOST}-static

MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-G'MSYS Makefiles' \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DSNAPPY_BUILD_TESTS=OFF \
../${_realname}-${pkgver}

make
}

package() {
cd "${srcdir}/build-${MINGW_CHOST}-static"
make DESTDIR=${pkgdir} install
}