This commit is contained in:
Alcali 2020-09-21 08:52:26 +00:00
commit 493cceed1b
8 changed files with 245 additions and 0 deletions

68
sysutils/conky/Makefile Normal file
View File

@ -0,0 +1,68 @@
# $OpenBSD: Makefile,v 1.60 2020/07/17 08:36:04 tb Exp $
ONLY_FOR_ARCHS= ${APM_ARCHS}
COMMENT= light-weight system monitor
CATEGORIES= sysutils
GH_ACCOUNT = brndnmtthws
GH_PROJECT = conky
GH_TAGNAME = v1.11.6
# mostly GPLv3; see COPYING
PERMIT_PACKAGE= Yes
BUILD_DEPENDS= textproc/docbook2x
CONFIGURE_ARGS= -Wno-dev
CONFIGURE_ENV= CMAKE_C_FLAGS="${CFLAGS} -I${X11BASE}/include" \
CMAKE_CXX_FLAGS="${CXXFLAGS} -I${X11BASE}/include"
WANTLIB= c crypto curl curses glib-2.0 iconv intl kvm lzma m \
nghttp2 ossaudio pcre pthread ssl xml2 z ${MODLUA_WANTLIB}
MODULES= lang/lua devel/cmake
MODLUA_SA= Yes
LIB_DEPENDS= devel/glib2 \
devel/pcre \
net/curl \
textproc/libxml \
${MODLUA_LIB_DEPENDS}
FLAVORS= no_x11 xmms2
FLAVOR?=
.if ${FLAVOR:Mno_x11}
. if ${FLAVOR:Mxmms2}
ERRORS+="Fatal: nonsense combination of flavors"
. else
CONFIGURE_ARGS+=--disable-double-buffer \
--disable-own-window \
--disable-xdamage \
--disable-xft \
--disable-x11
. endif
.else
CONFIGURE_ARGS+=--enable-imlib2
LIB_DEPENDS+= graphics/imlib2
WANTLIB += Imlib2 X11 Xdamage Xext Xfixes Xft
WANTLIB += Xrender expat fontconfig freetype xcb
.endif
.if ${FLAVOR:Mxmms2}
CONFIGURE_ARGS+=--enable-xmms2
LIB_DEPENDS+= audio/xmms2
WANTLIB+= xmmsclient
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/conky
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/conky
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/conky
FAKE_FLAGS= configdir=${PREFIX}/share/examples/conky
.include <bsd.port.mk>

View File

@ -0,0 +1,75 @@
# $OpenBSD: Makefile,v 1.60 2020/07/17 08:36:04 tb Exp $
ONLY_FOR_ARCHS= ${APM_ARCHS}
COMMENT= light-weight system monitor
DISTNAME= conky-1.9.0
CATEGORIES= sysutils
HOMEPAGE= http://conky.sourceforge.net/
REVISION= 20
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=conky/}
# mostly GPLv3; see COPYING
PERMIT_PACKAGE= Yes
WANTLIB= c crypto curl curses glib-2.0 iconv intl kvm lzma m \
nghttp2 ossaudio pcre pthread ssl xml2 z ${MODLUA_WANTLIB}
MODULES= lang/lua
MODLUA_SA= Yes
LIB_DEPENDS= devel/glib2 \
devel/pcre \
net/curl \
textproc/libxml \
${MODLUA_LIB_DEPENDS}
FLAVORS= no_x11 xmms2
FLAVOR?=
.if ${FLAVOR:Mno_x11}
. if ${FLAVOR:Mxmms2}
ERRORS+="Fatal: nonsense combination of flavors"
. else
CONFIGURE_ARGS+=--disable-double-buffer \
--disable-own-window \
--disable-xdamage \
--disable-xft \
--disable-x11
. endif
.else
CONFIGURE_ARGS+=--enable-imlib2
LIB_DEPENDS+= graphics/imlib2
WANTLIB += Imlib2 X11 Xdamage Xext Xfixes Xft
WANTLIB += Xrender expat fontconfig freetype xcb
.endif
.if ${FLAVOR:Mxmms2}
CONFIGURE_ARGS+=--enable-xmms2
LIB_DEPENDS+= audio/xmms2
WANTLIB+= xmmsclient
.endif
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS+=--enable-mpd \
--enable-rss \
--disable-config-output \
--disable-moc \
--disable-portmon \
--enable-lua \
--enable-curl \
--with-libiconv-prefix="${LOCALBASE}"
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" \
LUA_CFLAGS="`pkg-config --cflags ${MODLUA_DEP}`" \
LUA_LIBS="`pkg-config --libs ${MODLUA_DEP}`"
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/conky
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/conky
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/conky
FAKE_FLAGS= configdir=${PREFIX}/share/examples/conky
.include <bsd.port.mk>

2
sysutils/conky/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (conky-1.11.6.tar.gz) = 58AeSRB0SFHgX4XwoKqz9QaCFbGvhQUVGJrEDn3usm0=
SIZE (conky-1.11.6.tar.gz) = 2402216

View File

@ -0,0 +1,30 @@
$OpenBSD$
Index: cmake/ConkyPlatformChecks.cmake
--- cmake/ConkyPlatformChecks.cmake.orig
+++ cmake/ConkyPlatformChecks.cmake
@@ -136,9 +136,13 @@ else(OS_LINUX)
check_include_files("sys/soundcard.h" HAVE_SOME_SOUNDCARD_H)
endif(OS_LINUX)
-if(BUILD_I18N AND OS_DRAGONFLY)
- set(conky_libs ${conky_libs} -lintl)
-endif(BUILD_I18N AND OS_DRAGONFLY)
+if(BUILD_I18N)
+ find_package(Intl)
+ if (Intl_FOUND)
+ set(conky_includes ${conky_includes} ${Intl_INCLUDE_DIRS})
+ set(conky_libs ${conky_libs} ${Intl_LIBRARIES})
+ endif(Intl_FOUND)
+endif(BUILD_I18N)
if(BUILD_I18N AND OS_DARWIN)
find_path(LIBINTL_H_N libintl.h
@@ -340,6 +344,7 @@ if(BUILD_X11)
find_path(freetype_INCLUDE_PATH
freetype/config/ftconfig.h
${INCLUDE_SEARCH_PATH}
+ ${X11_INCLUDE_DIR}/freetype2
/usr/include/freetype2
/usr/local/include/freetype2
/usr/pkg/include/freetype2)

View File

@ -0,0 +1,37 @@
$OpenBSD$
Index: cmake/Conky.cmake
--- cmake/Conky.cmake.orig
+++ cmake/Conky.cmake
@@ -96,14 +96,14 @@ set(conky_includes ${CMAKE_BINARY_DIR})
# enabled! Thus disable this and _LARGEFILE64_SOURCE isnt needed, it is already
# used on macOS.
#
-if(NOT OS_DARWIN)
+if(NOT OS_DARWIN AND NOT OS_OPENBSD)
add_definitions(-D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L) # Standard
# definitions
set(
CMAKE_REQUIRED_DEFINITIONS
"${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L"
)
-endif(NOT OS_DARWIN)
+endif(NOT OS_DARWIN AND NOT OS_OPENBSD)
if(OS_FREEBSD)
add_definitions(-D__BSD_VISIBLE=1 -D_XOPEN_SOURCE=700)
@@ -112,6 +112,14 @@ if(OS_FREEBSD)
"${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -D__BSD_VISIBLE=1 -D_XOPEN_SOURCE=700"
)
endif(OS_FREEBSD)
+
+if(OS_OPENBSD)
+ add_definitions(-D_LARGEFILE64_SOURCE)
+ set(
+ CMAKE_REQUIRED_DEFINITIONS
+ "${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE"
+ )
+endif(OS_OPENBSD)
if(OS_DRAGONFLY)
set(conky_libs ${conky_libs} -L/usr/pkg/lib)

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-data_conky_no_x11_conf,v 1.1 2012/12/31 09:36:38 chrisz Exp $
Index: data/conky_no_x11.conf
--- data/conky_no_x11.conf.orig
+++ data/conky_no_x11.conf
@@ -28,7 +28,8 @@ conky.config = {
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
- out_to_stderr = false,
+ out_to_x = no,
+ out_to_ncurses = yes,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',

6
sysutils/conky/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Conky is a system monitor for X originally based on the torsmo code.
Since it's original conception, Conky has changed a fair bit from it's
predecessor. Conky can display just about anything, either on your root
desktop or in it's own window. Conky has many built-in objects, as well
as the ability to execute programs and scripts, then display the output
from stdout.

13
sysutils/conky/pkg/PLIST Normal file
View File

@ -0,0 +1,13 @@
@comment $OpenBSD: PLIST,v$
@bin bin/conky
lib/conky/
@man man/man1/conky.1
share/doc/conky/
share/doc/conky/README
share/doc/conky/config_settings.html
share/doc/conky/docs.html
share/doc/conky/lua.html
share/doc/conky/variables.html
share/examples/conky/
share/examples/conky/conky.conf
share/examples/conky/conky_no_x11.conf