ports/contrib (3.7): upx: 3.96 -> 4.0.0
commit 1bcfe9b2b814c3e0b99567612038a9d8523289ad Author: Tim Biermann <tbier@posteo.de> Date: Sat Oct 29 19:28:56 2022 +0000 upx: 3.96 -> 4.0.0 diff --git a/upx/.footprint b/upx/.footprint index 02137e3b1..c7b9a2a43 100644 --- a/upx/.footprint +++ b/upx/.footprint @@ -2,6 +2,14 @@ drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/upx drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/doc/ +drwxr-xr-x root/root usr/share/doc/upx/ +-rw-r--r-- root/root usr/share/doc/upx/COPYING +-rw-r--r-- root/root usr/share/doc/upx/LICENSE +-rw-r--r-- root/root usr/share/doc/upx/NEWS +-rw-r--r-- root/root usr/share/doc/upx/README +-rw-r--r-- root/root usr/share/doc/upx/upx-doc.html +-rw-r--r-- root/root usr/share/doc/upx/upx-doc.txt drwxr-xr-x root/root usr/share/man/ drwxr-xr-x root/root usr/share/man/man1/ -rw-r--r-- root/root usr/share/man/man1/upx.1.gz diff --git a/upx/.signature b/upx/.signature index bcbcb3665..3bd1b39ba 100644 --- a/upx/.signature +++ b/upx/.signature @@ -1,6 +1,6 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3zyqMnPnKzyx+rETvISGrYEU15/61nGYsgt+PUGp/6BHnK6hYvJaLAgkG+AVHd3KoGtfyI/lLzi9v4iT3LwfbgQ= -SHA256 (Pkgfile) = 15bb33c4ad792f2b84803e7a9cc0db576b330a3a4f31c7e6983dfa23fa9e3834 -SHA256 (.footprint) = 4c1267857f05230db56e631d77bd98e5e15f48f232b4a188bc1eed8a5320ebad -SHA256 (upx-3.96-src.tar.xz) = 47774df5c958f2868ef550fb258b97c73272cb1f44fe776b798e393465993714 -SHA256 (lzma465.tar.bz2) = c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e +RWSagIOpLGJF3xUb8PGldfPlH0YC+Vl4iKPWbSEsHZ8ZNp0v9qyFC+zk/uHfTT4GZQCGyOhKuHSn01ym6l1uMlX18l5KOljjZgM= +SHA256 (Pkgfile) = dc38af7fe9d7a32fdf9bc648e867b9de29f09e4517b8b29e315de8482c7a2253 +SHA256 (.footprint) = eafcf5d42a5e4db6a1c1da6b0cf425357368b8a4b1e1565adf8c4500145918fa +SHA256 (upx-4.0.0-src.tar.xz) = eaf938f8824e65f06852142fda97f8349ad660612979fa311618109c819f36ea +SHA256 (system-deps.patch) = 3afbbf23b7e902a00c96a27036188566a8405dc54abe2d57d444a1fe748adb1c diff --git a/upx/Pkgfile b/upx/Pkgfile index 94c06026c..04ac8c5d8 100644 --- a/upx/Pkgfile +++ b/upx/Pkgfile @@ -1,21 +1,26 @@ # Description: Ultimate Packer for eXecutables. # URL: http://upx.sourceforge.net/ # Maintainer: Danny Rawlins, crux at romster dot me -# Packager: Younes Hafri, ycrux at club-internet dot fr -# Depends on: ucl zlib +# Depends on: lz4 ucl zlib name=upx -version=3.96 +version=4.0.0 release=1 -source=(https://github.com/upx/upx/releases/download/v$version/$name-$version-src.ta... - http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2) +source=(https://github.com/upx/upx/releases/download/v$version/upx-$version-src.tar.... + system-deps.patch) build() { - cd $name-$version-src + patch -Np1 -d $name-$version-src -i $SRC/system-deps.patch + rm -rf $name-$version-src/vendor/ucl - sed -i 's/bool warn = true/bool warn = false/' src/main.cpp - make UPX_LZMA_VERSION=0x465 UPX_LZMADIR=$SRC all + 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 - install -m 0644 -D doc/upx.1 $PKG/usr/share/man/man1/upx.1 - install -m 0755 -D src/upx.out $PKG/usr/bin/upx + cmake --build build + DESTDIR=$PKG cmake --install build } diff --git a/upx/system-deps.patch b/upx/system-deps.patch new file mode 100644 index 000000000..390dde38a --- /dev/null +++ b/upx/system-deps.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22db99a..abf8f65 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,21 +70,18 @@ endif() + # targets and compilation flags + #*********************************************************************** + +-file(GLOB ucl_SOURCES "vendor/ucl/src/*.c") +-list(SORT ucl_SOURCES) +-add_library(upx_vendor_ucl STATIC ${ucl_SOURCES}) +-set_property(TARGET upx_vendor_ucl PROPERTY C_STANDARD 11) +- + file(GLOB zlib_SOURCES "vendor/zlib/*.c") + list(SORT zlib_SOURCES) + add_library(upx_vendor_zlib STATIC ${zlib_SOURCES}) + set_property(TARGET upx_vendor_zlib PROPERTY C_STANDARD 11) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(upx_vendor_ucl REQUIRED ucl IMPORTED_TARGET GLOBAL) + + file(GLOB upx_SOURCES "src/*.cpp" "src/util/*.cpp") + list(SORT upx_SOURCES) + add_executable(upx ${upx_SOURCES}) + set_property(TARGET upx PROPERTY CXX_STANDARD 14) +-target_link_libraries(upx upx_vendor_ucl upx_vendor_zlib) ++target_link_libraries(upx ucl upx_vendor_zlib) + + if(UPX_CONFIG_DISABLE_WERROR) + set(warn_Werror "") +@@ -118,25 +115,8 @@ else() + add_definitions(-fno-tree-vectorize) + endif() + +-set(t upx_vendor_ucl) +-target_include_directories(${t} PRIVATE vendor/ucl/include vendor/ucl) +-if(MSVC) +- target_compile_options(${t} PRIVATE -J -W4 ${warn_WX}) +-else() +- target_compile_options(${t} PRIVATE -Wall -Wextra -Wvla ${warn_Werror}) +-endif() +- +-set(t upx_vendor_zlib) +-if(MSVC) +- target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_VSNPRINTF -J -W3 ${warn_WX}) +-else() +- target_compile_options(${t} PRIVATE -DHAVE_STDARG_H -DHAVE_UNISTD_H -DHAVE_VSNPRINTF) +- # clang-15: -Wno-strict-prototypes is needed to silence the new -Wdeprecated-non-prototype warning +- target_compile_options(${t} PRIVATE -Wall -Wextra -Wvla -Wno-strict-prototypes ${warn_Werror}) +-endif() +- + set(t upx) +-target_include_directories(${t} PRIVATE vendor) ++target_include_directories(${t} PRIVATE upx_vendor_ucl_INCLUDE_DIRS vendor) + target_compile_definitions(${t} PRIVATE $<$<CONFIG:Debug>:DEBUG=1>) + if(GITREV_SHORT) + target_compile_definitions(${t} PRIVATE UPX_VERSION_GITREV="${GITREV_SHORT}${GITREV_PLUS}") +diff --git a/src/conf.h b/src/conf.h +index e50b250..449161d 100644 +--- a/src/conf.h ++++ b/src/conf.h +@@ -161,8 +161,8 @@ typedef unsigned char upx_byte; + #define WITH_ZLIB 1 + #if (WITH_UCL) + # define ucl_compress_config_t REAL_ucl_compress_config_t +-# include <ucl/include/ucl/uclconf.h> +-# include <ucl/include/ucl/ucl.h> ++# include <ucl/uclconf.h> ++# include <ucl/ucl.h> + # undef ucl_compress_config_t + # undef ucl_compress_config_p + #endif
participants (1)
-
crux@crux.nu