Skip to content

Commit

Permalink
add packages libopusenc and opus-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Jan 4, 2024
1 parent 8d8542f commit 213affe
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/libopusenc/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
PACKAGE_NAME="libopusenc"
PACKAGE_VERSION="0.2.1"
PACKAGE_SRC="https://github.com/xiph/libopusenc/archive/refs/tags/v${PACKAGE_VERSION}.tar.gz"
PACKAGE_DEPENDS="opus"

preconfigure_package() {
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" > ${PACKAGE_BUILD_DIR}/package_version
autoreconf -fi
}

configure_package() {
CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" \
CXX="${BUILD_CXX}" CXXFLAGS="${BUILD_CFLAGS}" CPPFLAGS="${BUILD_CFLAGS}" \
PKG_CONFIG_LIBDIR="${BUILD_PKG_CONFIG_LIBDIR}" PKG_CONFIG_SYSROOT_DIR="${BUILD_PKG_CONFIG_SYSROOT_DIR}" \
PKG_CONFIG_PATH="${BUILD_PKG_CONFIG_LIBDIR}" \
./configure --prefix=${INSTALL_PREFIX} --build=${MACHTYPE} --host=${BUILD_TARGET}
}

make_package() {
make -j${MAKE_JOBS}
}

install_package() {
make DESTDIR=${STAGING_DIR} install
}
31 changes: 31 additions & 0 deletions packages/opus-tools/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
PACKAGE_NAME="Opus-tools"
PACKAGE_VERSION="0.2-next"
PACKAGE_SRC="https://github.com/xiph/opus-tools/archive/ecd50e531fbf378499a3f71cdca05ad969c2e29f.tar.gz"
PACKAGE_DEPENDS="opus libopusenc"

preconfigure_package() {
autoreconf -fi && \
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" > ${PACKAGE_BUILD_DIR}/package_version
}

configure_package() {
CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" \
CXX="${BUILD_CXX}" CXXFLAGS="${BUILD_CFLAGS}" CPPFLAGS="${BUILD_CFLAGS}" \
PKG_CONFIG_LIBDIR="${BUILD_PKG_CONFIG_LIBDIR}" PKG_CONFIG_SYSROOT_DIR="${BUILD_PKG_CONFIG_SYSROOT_DIR}" \
PKG_CONFIG_PATH="${BUILD_PKG_CONFIG_LIBDIR}" \
./configure --prefix=${INSTALL_PREFIX} --build=${MACHTYPE} --host=${BUILD_TARGET} \
--disable-oggtest \
--disable-opustest \
--disable-opusfiletest \
--disable-libopusenctest \
--without-libopusenc \
--without-flac
}

make_package() {
make -j${MAKE_JOBS} && exit 1
}

install_package() {
make DESTDIR=${STAGING_DIR} install
}

0 comments on commit 213affe

Please sign in to comment.