Skip to content

Commit

Permalink
chore(x11/kf6-breeze-icons): fix rpath and move icons to platform-ind…
Browse files Browse the repository at this point in the history
…ependent subpackage
  • Loading branch information
twaik committed Oct 25, 2024
1 parent 976cf5a commit 085ae81
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
33 changes: 17 additions & 16 deletions x11-packages/kf6-breeze-icons/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ TERMUX_PKG_HOMEPAGE='https://community.kde.org/Frameworks'
TERMUX_PKG_DESCRIPTION='Breeze icon theme'
TERMUX_PKG_LICENSE="GPL-3.0, LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=6.7.0
TERMUX_PKG_VERSION="6.7.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://download.kde.org/stable/frameworks/${TERMUX_PKG_VERSION%.*}/breeze-icons-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=39037e3fcbbb7a65011685c498cae31ff496a5f2493269c955bb29c94a688b74
TERMUX_PKG_DEPENDS="qt6-qtbase"
TERMUX_PKG_BUILD_DEPENDS="extra-cmake-modules (>= ${TERMUX_PKG_VERSION}), python-lxml"
TERMUX_PKG_BUILD_DEPENDS="extra-cmake-modules (>= ${TERMUX_PKG_VERSION}), python-lxml, qt6-qtbase-cross-tools"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
Expand All @@ -20,38 +21,38 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="

termux_step_host_build() {
termux_setup_cmake
cd $TERMUX_PKG_SRCDIR/src/tools
cd "$TERMUX_PKG_SRCDIR/src/tools"
# patch CMakeLists.txt
mv CMakeLists.txt CMakeLists.txt.bak
cat >CMakeLists.txt <<-EOF
cat > CMakeLists.txt <<-EOF
cmake_minimum_required(VERSION 3.16)
add_link_options("-Wl,-rpath=${TERMUX_PREFIX}/opt/qt6/cross/lib")
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Xml)
function(ecm_mark_nongui_executable)
endfunction()
EOF
cat CMakeLists.txt.bak >>CMakeLists.txt
cat >>CMakeLists.txt <<-EOF
cat CMakeLists.txt.bak >> CMakeLists.txt
cat >> CMakeLists.txt <<-EOF
install(TARGETS qrcAlias DESTINATION bin)
install(TARGETS generate-symbolic-dark DESTINATION bin)
EOF

mkdir build
cd build
cmake \
mkdir -p build
cmake -B build \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_PREFIX_PATH=$TERMUX_PREFIX/opt/qt6/cross/lib/cmake \
..
cmake --build .
cd ..
-DCMAKE_PREFIX_PATH="$TERMUX_PREFIX/opt/qt6/cross/lib/cmake" \
.
cmake --build build
mv CMakeLists.txt.bak CMakeLists.txt
cd $TERMUX_PKG_SRCDIR
}

termux_step_pre_configure() {
sed -e 's|qrcAlias -o|'$TERMUX_PKG_SRCDIR'/src/tools/build/qrcAlias -o|' -i src/lib/CMakeLists.txt
export LD_LIBRARY_PATH="$TERMUX_PREFIX/opt/qt6/cross/lib"
# this is a workaround for build-all.sh issue
TERMUX_PKG_DEPENDS+=", kf6-breeze-icons-data"

sed -e 's|qrcAlias -o|'"$TERMUX_PKG_SRCDIR"'/src/tools/build/qrcAlias -o|' -i src/lib/CMakeLists.txt
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TERMUX_SUBPKG_DESCRIPTION="Platform-independent data for kf6-breeze-icons"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="
share/icons
"

0 comments on commit 085ae81

Please sign in to comment.