summaryrefslogtreecommitdiff
path: root/app-arch/precomp-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/precomp-cpp')
-rw-r--r--app-arch/precomp-cpp/Manifest1
-rw-r--r--app-arch/precomp-cpp/files/add_compile_definitions.patch28
-rw-r--r--app-arch/precomp-cpp/precomp-cpp-0.4.7.ebuild22
3 files changed, 51 insertions, 0 deletions
diff --git a/app-arch/precomp-cpp/Manifest b/app-arch/precomp-cpp/Manifest
new file mode 100644
index 0000000..c05a7a4
--- /dev/null
+++ b/app-arch/precomp-cpp/Manifest
@@ -0,0 +1 @@
+DIST precomp-cpp-0.4.7.tar.gz 708806 BLAKE2B cb38ac7b392514516a09a02600706d611073967f8bcc3d881a5e2135ee1fe9c0fc45b13f7569c9f5a1fb722eca6f4f4c55f577bb1c66a4cbe6fd961c29c1ba42 SHA512 88000213f19d8a17687f97b5d6a0eb6c4bdb8d1d788d5d2a1e609da8b02b16b9f2a025507d23ae067ce9967fe9d291037908714f408c743550c70964180eb7dd
diff --git a/app-arch/precomp-cpp/files/add_compile_definitions.patch b/app-arch/precomp-cpp/files/add_compile_definitions.patch
new file mode 100644
index 0000000..d66cfca
--- /dev/null
+++ b/app-arch/precomp-cpp/files/add_compile_definitions.patch
@@ -0,0 +1,28 @@
+From 730a7ab72b80f89bb89152e8e5ef555dacf05a45 Mon Sep 17 00:00:00 2001
+From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
+Date: Sat, 11 Sep 2021 13:32:57 -0400
+Subject: [PATCH] use add_compile_definitions instead of CMAKE_C_FLAGS
+
+this allows the user-specified CFLAGS/CXXFLAGS to take effect.
+---
+ CMakeLists.txt | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dbc0829..ba1c614 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,9 +17,8 @@ else()
+ endif()
+
+ if (UNIX)
+- set(CMAKE_C_FLAGS "-DLINUX -DUNIX -DHAVE_STDBOOL_H")
++ add_compile_definitions(LINUX UNIX HAVE_STDBOOL_H)
+ set(CMAKE_C_STANDARD 99)
+- set(CMAKE_CXX_FLAGS "-DUNIX")
+ set(CMAKE_CXX_STANDARD 11)
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+--
+2.33.0
+
diff --git a/app-arch/precomp-cpp/precomp-cpp-0.4.7.ebuild b/app-arch/precomp-cpp/precomp-cpp-0.4.7.ebuild
new file mode 100644
index 0000000..39f4a4b
--- /dev/null
+++ b/app-arch/precomp-cpp/precomp-cpp-0.4.7.ebuild
@@ -0,0 +1,22 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Precomp, C++ version - further compress already compressed files"
+HOMEPAGE="https://github.com/schnaader/precomp-cpp"
+SRC_URI="https://github.com/schnaader/precomp-cpp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}/add_compile_definitions.patch"
+)
+
+src_install() {
+ dobin "${BUILD_DIR}/precomp"
+}