forked from ports/contrib
27 lines
713 B
Plaintext
27 lines
713 B
Plaintext
# Description: Ultimate Packer for eXecutables.
|
|
# URL: http://upx.sourceforge.net/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: lz4 ucl zlib
|
|
|
|
name=upx
|
|
version=4.0.0
|
|
release=1
|
|
source=(https://github.com/upx/upx/releases/download/v$version/upx-$version-src.tar.xz
|
|
system-deps.patch)
|
|
|
|
build() {
|
|
patch -Np1 -d $name-$version-src -i $SRC/system-deps.patch
|
|
rm -rf $name-$version-src/vendor/ucl
|
|
|
|
cmake -S $name-$version-src -B build -G Ninja \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
}
|