pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/fastfetch



Module Name:    pkgsrc
Committed By:   vins
Date:           Tue Jan  7 20:24:32 UTC 2025

Modified Files:
        pkgsrc/sysutils/fastfetch: Makefile options.mk

Log Message:
sysutils/fastfetch: few improvements

* Make multithreading optional
* Force disable options then unselected (avoids leaking base zlib
  and others)
* Add dependency on hwdata
* Point to pkgsrc prefix for file discovery
* Bump revision


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/fastfetch/Makefile \
    pkgsrc/sysutils/fastfetch/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/fastfetch/Makefile
diff -u pkgsrc/sysutils/fastfetch/Makefile:1.1 pkgsrc/sysutils/fastfetch/Makefile:1.2
--- pkgsrc/sysutils/fastfetch/Makefile:1.1      Mon Jan  6 19:34:59 2025
+++ pkgsrc/sysutils/fastfetch/Makefile  Tue Jan  7 20:24:32 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2025/01/06 19:34:59 vins Exp $
+# $NetBSD: Makefile,v 1.2 2025/01/07 20:24:32 vins Exp $
 
 DISTNAME=      fastfetch-2.33.0
+PKGREVISION=   1
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=fastfetch-cli/}
 GITHUB_TAG=    ${PKGVERSION_NOREV}
@@ -14,9 +15,14 @@ USE_TOOLS+=  pkg-config
 
 USE_LANGUAGES= c c++
 
+DEPENDS+=      hwdata-[0-9]*:../../misc/hwdata
+
 CMAKE_CONFIGURE_ARGS+= -DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_INSTALL_PREFIX='${PREFIX}' \
+                       -DTARGET_DIR_USR='${PREFIX}' \
                        -DTARGET_DIR_ETC='${PKG_SYSCONFDIR}' \
                        -DCMAKE_INSTALL_PREFIX='${PREFIX}' \
+                       -DCUSTOM_PCI_IDS_PATH=${PREFIX}/share/hwdata \
                        -DBUILD_FLASHFETCH=OFF \
                        -DBUILD_TESTS=ON
 
@@ -24,6 +30,5 @@ CMAKE_CONFIGURE_ARGS+=        -DCMAKE_BUILD_TYP
 
 .include "../../sysutils/libpciaccess/buildlink3.mk"
 .include "../../devel/cmake/build.mk"
-.include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/fastfetch/options.mk
diff -u pkgsrc/sysutils/fastfetch/options.mk:1.1 pkgsrc/sysutils/fastfetch/options.mk:1.2
--- pkgsrc/sysutils/fastfetch/options.mk:1.1    Mon Jan  6 19:34:59 2025
+++ pkgsrc/sysutils/fastfetch/options.mk        Tue Jan  7 20:24:32 2025
@@ -1,13 +1,21 @@
-# $NetBSD: options.mk,v 1.1 2025/01/06 19:34:59 vins Exp $
+# $NetBSD: options.mk,v 1.2 2025/01/07 20:24:32 vins Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.fastfetch
 PKG_OPTIONS_OPTIONAL_GROUPS=   server
 PKG_OPTIONS_GROUP.server=      wayland x11
 
 PKG_SUPPORTED_OPTIONS= chafa dconf dbus glib2 imagemagick libdrm libelf opencl \
-                       osmesa pulseaudio python sqlite3 wayland x11 xfce4-wm
+                       osmesa pulseaudio python sqlite3 threads wayland x11 xfce4-wm
 PKG_SUGGESTED_OPTIONS= glib2 libdrm opencl osmesa x11
 
+CHECK_BUILTIN.pthread:= yes
+.include "../../mk/pthread.builtin.mk"
+CHECK_BUILTIN.pthread:= no
+
+.if ${USE_BUILTIN.pthread:tl} == yes
+PKG_SUGGESTED_OPTIONS+=        threads
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 ##
@@ -15,7 +23,9 @@ PKG_SUGGESTED_OPTIONS=        glib2 libdrm open
 ## Supports NetworkManager (Linux), Player & Media detection.
 ##
 .if !empty(PKG_OPTIONS:Mdbus)
-.include "../../sysutils/dbus/buildlink3.mk"
+.  include "../../sysutils/dbus/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_DBUS=OFF
 .endif
 
 ##
@@ -24,7 +34,9 @@ PKG_SUGGESTED_OPTIONS=        glib2 libdrm open
 ## (+ Fallback for GSettings)
 ##
 .if !empty(PKG_OPTIONS:Mdconf)
-.include "../../devel/dconf/buildlink3.mk"
+.  include "../../devel/dconf/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_DCONF=OFF
 .endif
 
 ##
@@ -32,7 +44,9 @@ PKG_SUGGESTED_OPTIONS=        glib2 libdrm open
 ## Supports image output as ascii art
 ##
 .if !empty(PKG_OPTIONS:Mchafa)
-.include "../../graphics/chafa/buildlink3.mk"
+.  include "../../graphics/chafa/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_CHAFA=OFF
 .endif
 
 ##
@@ -41,7 +55,10 @@ PKG_SUGGESTED_OPTIONS=       glib2 libdrm open
 ## AMD GPU properties detection
 ##
 .if !empty(PKG_OPTIONS:Mlibdrm)
-.include "../../x11/libdrm/buildlink3.mk"
+.  include "../../x11/libdrm/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_DRM=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_DRM_AMDGPU=OFF
 .endif
 
 ##
@@ -49,7 +66,9 @@ PKG_SUGGESTED_OPTIONS=        glib2 libdrm open
 ## Provides output for values that are only stored in GSettings.
 ##
 .if !empty(PKG_OPTIONS:Mglib2)
-.include "../../devel/glib2/buildlink3.mk"
+.  include "../../devel/glib2/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_GIO=OFF
 .endif
 
 ##
@@ -57,7 +76,9 @@ PKG_SUGGESTED_OPTIONS=        glib2 libdrm open
 ## Needed for st terminal font detection.
 ##
 .if !empty(PKG_OPTIONS:Mlibelf)
-.include "../../devel/libelf/buildlink3.mk"
+.  include "../../devel/libelf/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_ELF=OFF
 .endif
 
 ##
@@ -65,8 +86,12 @@ PKG_SUGGESTED_OPTIONS=       glib2 libdrm open
 ## Supports image output using sixel or kitty graphics protocol.
 ##
 .if !empty(PKG_OPTIONS:Mimagemagick)
-.include "../../graphics/ImageMagick/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
+.  include "../../graphics/ImageMagick/buildlink3.mk"
+.  include "../../devel/zlib/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_IMAGEMAGICK6=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_IMAGEMAGICK7=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_ZLIB=OFF
 .endif
 
 ##
@@ -74,7 +99,10 @@ PKG_SUGGESTED_OPTIONS=       glib2 libdrm open
 ## Needed by the OpenGL module for gl context creation.
 ##
 .if !empty(PKG_OPTIONS:Mosmesa)
-.include "../../graphics/MesaLib/buildlink3.mk"
+.  include "../../graphics/MesaLib/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_EGL=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_OSMESA=OFF
 .endif
 
 ##
@@ -82,7 +110,7 @@ PKG_SUGGESTED_OPTIONS=       glib2 libdrm open
 ## Build OpenCL module.
 ##
 .if !empty(PKG_OPTIONS:Mopencl)
-.include "../../parallel/ocl-icd/buildlink3.mk"
+.  include "../../parallel/ocl-icd/buildlink3.mk"
 .else
 CMAKE_CONFIGURE_ARGS+=  -DENABLE_OPENCL=OFF
 .endif
@@ -92,7 +120,9 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_OPENCL=
 ## Provides sound device detection.
 ##
 .if !empty(PKG_OPTIONS:Mpulseaudio)
-.include "../../audio/pulseaudio/buildlink3.mk"
+.  include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_PULSE=OFF
 .endif
 
 ##
@@ -100,7 +130,7 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_OPENCL=
 ## Needed for zsh and fish completions.
 ##
 .if !empty(PKG_OPTIONS:Mpython)
-.include "../../lang/python/application.mk"
+.  include "../../lang/python/application.mk"
 .endif
 
 ##
@@ -108,10 +138,23 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_OPENCL=
 ## Needed for pkg (FreeBSD) & rpm package count.
 ##
 .if !empty(PKG_OPTIONS:Msqlite3)
-.include "../../databases/sqlite3/buildlink3.mk"
+.  include "../../databases/sqlite3/buildlink3.mk"
 .else
 CMAKE_CONFIGURE_ARGS+=  -DENABLE_SQLITE3=OFF
-CMAKE_CONFIGURE_ARGS+=  -DENABLE_RPM='OFF'
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_RPM=OFF
+.endif
+
+##
+## Threads
+## Enables multithreading.
+##
+.if !empty(PKG_OPTIONS:Mthreads)
+.  include "../../mk/pthread.buildlink3.mk"
+PTHREAD_AUTO_VARS=      yes
+PTHREAD_OPTS+=          require
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_THREADS=ON
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_THREADS=OFF
 .endif
 
 ##
@@ -119,7 +162,9 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_RPM='OF
 ## Better display performance and output in wayland sessions.
 ##
 .if !empty(PKG_OPTIONS:Mwayland)
-.include "../../devel/wayland/buildlink3.mk"
+.  include "../../devel/wayland/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_WAYLAND=OFF
 .endif
 
 ##
@@ -127,7 +172,9 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_RPM='OF
 ## Needed for XFWM theme and XFCE Terminal font detection.
 ##
 .if !empty(PKG_OPTIONS:Mxfce4-wm)
-.include "../../devel/xfce4-conf/buildlink3.mk"
+.  include "../../devel/xfce4-conf/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_XFCONF=OFF
 .endif
 
 ##
@@ -135,7 +182,11 @@ CMAKE_CONFIGURE_ARGS+=  -DENABLE_RPM='OF
 ## Required for display detection and faster WM detection.
 ##
 .if !empty(PKG_OPTIONS:Mx11)
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libxcb/buildlink3.mk"
-.include "../../x11/libdrm/buildlink3.mk"
+.  include "../../x11/libXrandr/buildlink3.mk"
+.  include "../../x11/libxcb/buildlink3.mk"
+.  include "../../x11/libX11/buildlink3.mk"
+.else
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_XRANDR=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_XCB=OFF
+CMAKE_CONFIGURE_ARGS+=  -DENABLE_X11=OFF
 .endif



Home | Main Index | Thread Index | Old Index