crux-musl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/crux-musl
Log | Files | Refs | README | LICENSE

Pkgfile (1406B)


      1 # Description: Lightweight panel/taskbar.
      2 # URL: https://gitlab.com/nick87720z/tint2
      3 # Maintainer: Emmett1, emmett1 dot 2miligrams at protonmail dot com
      4 # Depends on: imlib2 librsvg startup-notification xorg-libxcomposite xorg-libxdamage xorg-libxinerama xorg-libxrandr
      5 
      6 name=tint2
      7 version=17.1.3
      8 release=2
      9 source=(https://gitlab.com/nick87720z/$name/-/archive/$version/$name-$version.tar.bz2 $name-glib.patch)
     10 
     11 build() {
     12     patch -p1 -d $name-$version -i $SRC/$name-glib.patch
     13 
     14     # fix an off-by-two error in the pointer arithmetic, stemming from
     15     # upstream commit 120f72a77e8e73398dc5334848b23ee1ae13dd94.
     16     # This commit introduced the abstraction strlen_const(stuff) to replace
     17     # sizeof(stuff) - 1, but failed to apply the distributive law when
     18     # doing the subtraction to calculate dir_end.
     19     sed -e "/dir_end = userpath/s/);/) - 2;/" \
     20         -i $name-$version/src/config.c
     21 
     22     # gcc14 fix
     23     export CFLAGS="$CFLAGS -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"
     24 
     25     cmake -S $name-$version -B build -G Ninja \
     26         -D CMAKE_INSTALL_PREFIX=/usr \
     27         -D CMAKE_BUILD_TYPE=Release \
     28         -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
     29         -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
     30         -D ENABLE_TINT2CONF=OFF \
     31         -Wno-dev
     32 
     33     ninja -C build -j ${JOBS:-1}
     34     DESTDIR=$PKG ninja -C build install
     35 
     36     rm -r $PKG/{etc,usr/share/doc}
     37 }