tint2: fix the creation of a default config in user directory

This commit is contained in:
John McQuah 2024-06-01 12:11:59 +00:00
parent 01fcd3f66f
commit 74e6965671
2 changed files with 21 additions and 13 deletions

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF38HkN0uJM0b3NhJJOJ2QEGQ94X7IpUDVwWLz9IAs8YR9lQuA1cfGk/Q5lL8/zhAl2pVh3/mfoNCPe5dMqd0iDQ0=
SHA256 (Pkgfile) = 374b03035a4cecf9d053799797ef69022f626746eeb7127171137e63c6d4cc6b
RWSagIOpLGJF37C5g70iWMdw8EeHDmqky75/59Q9xzMnpEHBFSa5v/pTAwevoFAf9JLs1SRUlDgZA+310sbpAeqBFbqD38cE3ww=
SHA256 (Pkgfile) = 996b52426f164eca36338d32e2f64323c95b39b495fc8d9fc12dd7be7597f220
SHA256 (.footprint) = b746628a98545b6c2444ccae628c80abc67c9ec030f83ac4837870fc89d3aa54
SHA256 (tint2-17.1.3.tar.bz2) = d49103d60a8753fa5e808e57f4cc028f677009a3594eb0f64dcfdc6d2b96e33c
SHA256 (tint2-glib.patch) = 7e1b68ae24efd0c394270d55dd0237c2777b526e10b37198991b483b634b8424

View File

@ -9,18 +9,26 @@ release=2
source=(https://gitlab.com/nick87720z/$name/-/archive/$version/$name-$version.tar.bz2 $name-glib.patch)
build() {
patch -p1 -d $name-$version -i $SRC/$name-glib.patch
patch -p1 -d $name-$version -i $SRC/$name-glib.patch
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D ENABLE_TINT2CONF=OFF \
-Wno-dev
# fix an off-by-two error in the pointer arithmetic, stemming from
# upstream commit 120f72a77e8e73398dc5334848b23ee1ae13dd94.
# This commit introduced the abstraction strlen_const(stuff) to replace
# sizeof(stuff) - 1, but failed to apply the distributive law when
# doing the subtraction to calculate dir_end.
sed -e "/dir_end = userpath/s/);/) - 2;/" \
-i $name-$version/src/config.c
ninja -C build -j ${JOBS:-1}
DESTDIR=$PKG ninja -C build install
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D ENABLE_TINT2CONF=OFF \
-Wno-dev
rm -r $PKG/{etc,usr/share/doc}
ninja -C build -j ${JOBS:-1}
DESTDIR=$PKG ninja -C build install
rm -r $PKG/{etc,usr/share/doc}
}