зеркало из https://github.com/mozilla/hubs-ops.git
This commit is contained in:
Родитель
20ca378c99
Коммит
d49755ed9c
|
@ -26,6 +26,6 @@ pkg_lib_dirs=(lib)
|
|||
pkg_include_dirs=(include)
|
||||
|
||||
do_build() {
|
||||
CFLAGS="${CFLAGS} -O3 -g" ./configure --prefix "${pkg_prefix}"
|
||||
CFLAGS="${CFLAGS} -O2 -g" CPPFLAGS="${CPPFLAGS} -O2 -g" CXXFLAGS="${CXXFLAGS} -O2 -g" ./configure --prefix "${pkg_prefix}"
|
||||
make
|
||||
}
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
source ../gcc/plan.sh
|
||||
|
||||
pkg_name=gcc-libs
|
||||
pkg_version=9.1.0
|
||||
pkg_origin=core
|
||||
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
|
||||
pkg_description="Runtime libraries shipped by GCC."
|
||||
pkg_upstream_url="https://gcc.gnu.org/"
|
||||
pkg_license=('GPL-2.0')
|
||||
pkg_license=('GPL-3.0-or-later' 'GCC Runtime Library Exception')
|
||||
|
||||
# The shared libraries only depend on core/glibc
|
||||
pkg_deps=(
|
||||
core/glibc
|
||||
mozillareality/zlib
|
||||
)
|
||||
# Add the same version of the full gcc package as a build dep
|
||||
pkg_build_deps=(
|
||||
mozillareality/gcc/$pkg_version
|
||||
mozillareality/patchelf
|
||||
mozillareality/gcc/"$pkg_version"
|
||||
core/patchelf
|
||||
)
|
||||
|
||||
# Zero out the bin and include paths, as we're only shipping shared libs
|
||||
|
@ -55,7 +57,7 @@ do_install() {
|
|||
find "$pkg_prefix/lib" \
|
||||
-type f \
|
||||
-name '*.so.*' \
|
||||
-exec patchelf --set-rpath "$(pkg_path_for glibc)/lib:$pkg_prefix/lib" {} \;
|
||||
-exec patchelf --set-rpath "$(pkg_path_for glibc)/lib:$(pkg_path_for zlib)/lib:$pkg_prefix/lib" {} \;
|
||||
find "$pkg_prefix/lib" \
|
||||
-type f \
|
||||
-name '*.so.*' \
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# libffi
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -0,0 +1,20 @@
|
|||
pkg_name=libffi
|
||||
pkg_version=3.2.1
|
||||
pkg_origin=mozillareality
|
||||
pkg_license=('MIT')
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_source=ftp://sourceware.org/pub/${pkg_name}/${pkg_name}-${pkg_version}.tar.gz
|
||||
pkg_upstream_url=https://sourceware.org/libffi
|
||||
pkg_description="The libffi library provides a portable, high level programming interface to various calling conventions.\
|
||||
This allows a programmer to call any function specified by a call interface description at run-time."
|
||||
pkg_filename=${pkg_name}-${pkg_version}.tar.gz
|
||||
pkg_shasum=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37
|
||||
pkg_deps=(core/glibc core/libtool)
|
||||
pkg_build_deps=(core/coreutils core/make core/gcc)
|
||||
pkg_lib_dirs=(lib)
|
||||
pkg_include_dirs=(lib/"${pkg_name}"-"${pkg_version}"/include)
|
||||
|
||||
do_build() {
|
||||
CFLAGS="${CFLAGS} -O2" CPPFLAGS="${CPPFLAGS} -O2" ./configure --prefix="${pkg_prefix}" --disable-multi-os-directory
|
||||
make
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
# libiconv
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -0,0 +1,29 @@
|
|||
--- libiconv-1.14/srclib/stdio.in.h.orig 2014-07-02 01:49:41.484192961 +0000
|
||||
+++ libiconv-1.14/srclib/stdio.in.h 2014-07-02 01:51:10.433127793 +0000
|
||||
@@ -679,26 +679,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#if @GNULIB_GETS@
|
||||
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
|
||||
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
-# undef gets
|
||||
-# define gets rpl_gets
|
||||
-# endif
|
||||
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
|
||||
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
|
||||
-# else
|
||||
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
|
||||
-# undef gets
|
||||
-# endif
|
||||
-_GL_CXXALIASWARN (gets);
|
||||
-/* It is very rare that the developer ever has full control of stdin,
|
||||
- so any use of gets warrants an unconditional warning. Assume it is
|
||||
- always declared, since it is required by C89. */
|
||||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
|
||||
struct obstack;
|
||||
/* Grow an obstack with formatted output. Return the number of
|
|
@ -0,0 +1,26 @@
|
|||
pkg_name=libiconv
|
||||
pkg_version=1.14
|
||||
pkg_origin=mozillareality
|
||||
pkg_license=('GPL-3.0-or-later')
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_source=http://ftp.gnu.org/pub/gnu/"${pkg_name}"/"${pkg_name}"-"${pkg_version}".tar.gz
|
||||
pkg_upstream_url="https://www.gnu.org/software/libiconv/"
|
||||
pkg_description="Some programs, like mailers and web browsers, must be able to convert \
|
||||
between a given text encoding and the user's encoding. Other programs \
|
||||
internally store strings in Unicode, to facilitate internal processing, \
|
||||
and need to convert between internal string representation (Unicode) \
|
||||
and external string representation (a traditional encoding) when they \
|
||||
are doing I/O. GNU libiconv is a conversion library for both kinds of \
|
||||
applications."
|
||||
pkg_filename="${pkg_name}"-"${pkg_version}".tar.gz
|
||||
pkg_shasum=72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613
|
||||
pkg_deps=(core/glibc)
|
||||
pkg_build_deps=(core/coreutils core/diffutils core/patch core/make core/gcc)
|
||||
pkg_lib_dirs=(lib)
|
||||
pkg_include_dirs=(include)
|
||||
|
||||
do_build() {
|
||||
patch -p1 -i "$PLAN_CONTEXT"/patches/libiconv-1.14_srclib_stdio.in.h-remove-gets-declarations.patch
|
||||
CFLAGS="${CFLAGS} -O2 -g" CPPFLAGS="${CPPFLAGS} -O2 -g" ./configure --prefix="${pkg_prefix}"
|
||||
make
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
# pcre
|
||||
|
||||
A library that implements Perl 5-style regular expressions
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -0,0 +1,67 @@
|
|||
pkg_name=pcre
|
||||
pkg_origin=mozillareality
|
||||
pkg_version=8.42
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_description="\
|
||||
The PCRE library is a set of functions that implement regular expression \
|
||||
pattern matching using the same syntax and semantics as Perl 5. PCRE has its \
|
||||
own native API, as well as a set of wrapper functions that correspond to the \
|
||||
POSIX regular expression API. The PCRE library is free, even for building \
|
||||
proprietary software.\
|
||||
"
|
||||
pkg_upstream_url="http://www.pcre.org/"
|
||||
pkg_license=('bsd')
|
||||
pkg_source="https://ftp.pcre.org/pub/${pkg_name}/${pkg_name}-${pkg_version}.tar.bz2"
|
||||
pkg_shasum="2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301"
|
||||
pkg_deps=(
|
||||
core/glibc
|
||||
mozillareality/gcc-libs
|
||||
)
|
||||
pkg_build_deps=(
|
||||
core/coreutils
|
||||
core/diffutils
|
||||
core/patch
|
||||
core/make
|
||||
core/gcc
|
||||
)
|
||||
pkg_bin_dirs=(bin)
|
||||
pkg_include_dirs=(include)
|
||||
pkg_lib_dirs=(lib)
|
||||
pkg_pconfig_dirs=(lib/pkgconfig)
|
||||
|
||||
do_build() {
|
||||
CFLAGS="${CFLAGS} -O2 -g" CPPFLAGS="${CPPFLAGS} -O2 -g" ./configure \
|
||||
--prefix="$pkg_prefix" \
|
||||
--enable-unicode-properties \
|
||||
--enable-utf \
|
||||
--enable-pcre16 \
|
||||
--enable-pcre32 \
|
||||
--enable-jit
|
||||
make -j"$(nproc)"
|
||||
}
|
||||
|
||||
do_check() {
|
||||
make check
|
||||
}
|
||||
|
||||
do_install() {
|
||||
do_default_install
|
||||
|
||||
# Install license file
|
||||
install -Dm644 LICENCE "$pkg_prefix/share/licenses/LICENSE"
|
||||
}
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# **NOTICE:** What follows are implementation details required for building a
|
||||
# first-pass, "stage1" toolchain and environment. It is only used when running
|
||||
# in a "stage1" Studio and can be safely ignored by almost everyone. Having
|
||||
# said that, it performs a vital bootstrapping process and cannot be removed or
|
||||
# significantly altered. Thank you!
|
||||
# ----------------------------------------------------------------------------
|
||||
if [[ "$STUDIO_TYPE" = "stage1" ]]; then
|
||||
pkg_build_deps=(
|
||||
core/gcc
|
||||
core/coreutils
|
||||
)
|
||||
fi
|
|
@ -0,0 +1,15 @@
|
|||
# util-linux
|
||||
|
||||
Miscellaneous system utilities for Linux
|
||||
|
||||
## Maintainers
|
||||
|
||||
* The Habitat Maintainers: <humans@habitat.sh>
|
||||
|
||||
## Type of Package
|
||||
|
||||
Binary package
|
||||
|
||||
## Usage
|
||||
|
||||
*TODO: Add instructions for usage*
|
|
@ -1,15 +1,15 @@
|
|||
pkg_name=util-linux
|
||||
pkg_origin=core
|
||||
pkg_version=2.32
|
||||
pkg_origin=mozillareality
|
||||
pkg_version=2.34
|
||||
pkg_maintainer="Mozilla Mixed Reality <mixreality@mozilla.com>"
|
||||
pkg_description="Miscellaneous system utilities for Linux"
|
||||
pkg_upstream_url="https://www.kernel.org/pub/linux/utils/util-linux"
|
||||
pkg_license=('GPLv2')
|
||||
pkg_license=('GPLv2-or-later')
|
||||
pkg_source="https://www.kernel.org/pub/linux/utils/${pkg_name}/v${pkg_version%.?}/${pkg_name}-${pkg_version}.tar.xz"
|
||||
pkg_shasum="6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734"
|
||||
pkg_shasum="743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
|
||||
pkg_deps=(
|
||||
core/glibc
|
||||
core/zlib
|
||||
mozillareality/zlib
|
||||
core/ncurses
|
||||
)
|
||||
pkg_build_deps=(
|
||||
|
@ -26,7 +26,7 @@ pkg_lib_dirs=(lib)
|
|||
pkg_pconfig_dirs=(lib/pkgconfig)
|
||||
|
||||
do_build() {
|
||||
./configure \
|
||||
CFLAGS="${CFLAGS} -O2 -g" CPPFLAGS="${CPPFLAGS} -O2 -g" CXXFLAGS="${CXXFLAGS} -O2 -g" ./configure \
|
||||
--prefix="$pkg_prefix" \
|
||||
--sbindir="$pkg_prefix/bin" \
|
||||
--localstatedir="$pkg_svc_var_path/run" \
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
@test "uuidgen produces known output" {
|
||||
run hab pkg exec $TEST_PKG_IDENT uuidgen --sha1 --namespace @dns --name "www.example.com"
|
||||
[ "$output" == "2ed6657d-e927-568b-95e1-2665a8aea6a2" ]
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
#/ Usage: test.sh <pkg_ident>
|
||||
#/
|
||||
#/ Example: test.sh core/php/7.2.8/20181108151533
|
||||
#/
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "${1:-}" ]]; then
|
||||
grep '^#/' < "${0}" | cut -c4-
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TEST_PKG_IDENT="${1}"
|
||||
export TEST_PKG_IDENT
|
||||
hab pkg install core/bats --binlink
|
||||
hab pkg install "${TEST_PKG_IDENT}"
|
||||
bats "$(dirname "${0}")/test.bats"
|
Загрузка…
Ссылка в новой задаче