1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

x11-wm/picom: Update to 12.1

Add patch for meson build, which disables git detection while building.
Submitter takes maintainership.
Pet portclippy, portlint, portfmt.

Changelog: https://github.com/yshui/picom/blob/next/CHANGELOG.md

PR:		281767
Approved by:	submitter is maintainer
This commit is contained in:
José Maldonado 2024-10-02 19:23:48 +02:00 committed by Zsolt Udvari
parent 6e8e7ac134
commit 0ce6146f9b
4 changed files with 72 additions and 115 deletions

View File

@ -1,9 +1,9 @@
PORTNAME= picom
DISTVERSIONPREFIX= v
DISTVERSION= 11.2
DISTVERSION= 12.1
CATEGORIES= x11-wm
MAINTAINER= ports@FreeBSD.org
MAINTAINER= yukiteruamano@volfread.xyz
COMMENT= Lightweight X11 compositor
WWW= https://github.com/yshui/picom
@ -14,55 +14,60 @@ LICENSE_FILE_MIT= ${WRKSRC}/LICENSES/MIT
BUILD_DEPENDS= ${LOCALBASE}/include/uthash.h:devel/uthash
LIB_DEPENDS= libev.so:devel/libev \
libxcb-image.so:x11/xcb-util-image \
libxcb-render-util.so:x11/xcb-util-renderutil
libxcb-render-util.so:x11/xcb-util-renderutil \
libxcb-util.so:x11/xcb-util
RUN_DEPENDS= xprop:x11/xprop \
xwininfo:x11/xwininfo
USES= compiler:c11 meson localbase pkgconfig xorg
USES= compiler:c11 desktop-file-utils localbase meson pkgconfig xorg
USE_GITHUB= yes
USE_XORG= x11 xcb xext pixman
GH_ACCOUNT= yshui
GH_PROJECT= picom
USE_XORG= pixman x11 xcb xext
MESON_ARGS= -Dcompton=false -Dunittest=true
TEST_TARGET= test
PLIST_FILES= bin/${PORTNAME} \
bin/${PORTNAME}-inspect \
bin/${PORTNAME}-trans \
etc/xdg/autostart/${PORTNAME}.desktop \
"@sample etc/xdg/${PORTNAME}.conf.sample" \
etc/xdg/autostart/${PORTNAME}.desktop \
libdata/pkgconfig/${PORTNAME}-api.pc \
share/applications/${PORTNAME}.desktop
OPTIONS_DEFINE= CONFIG DBUS DOCS DRM OPENGL PCRE
OPTIONS_DEFAULT=CONFIG DBUS OPENGL PCRE
OPTIONS_DEFINE= CONFIG DBUS DOCS DRM OPENGL PCRE
OPTIONS_DEFAULT= CONFIG DBUS OPENGL PCRE
CONFIG_DESC= Configuration file parsing support
DRM_DESC= DRM VSync fallback (deprecated)
CONFIG_DESC= Configuration file parsing support
CONFIG_LIB_DEPENDS= libconfig.so:devel/libconfig
CONFIG_MESON_TRUE= config_file
PCRE_LIB_DEPENDS= libpcre2-8.so:devel/pcre2
PCRE_MESON_TRUE= regex
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
DBUS_MESON_TRUE= dbus
DOCS_BUILD_DEPENDS= a2x:textproc/asciidoc \
asciidoctor:textproc/rubygem-asciidoctor
DOCS_MESON_TRUE= with_docs
DOCS_PLIST_FILES= share/man/man1/${PORTNAME}-inspect.1.gz \
share/man/man1/${PORTNAME}-trans.1.gz \
share/man/man1/${PORTNAME}.1.gz
DRM_DESC= DRM VSync fallback (deprecated)
DRM_LIB_DEPENDS= libdrm.so:graphics/libdrm
DRM_MESON_TRUE= vsync_drm
OPENGL_LIB_DEPENDS= libepoxy.so:graphics/libepoxy
OPENGL_MESON_TRUE= opengl
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
DBUS_MESON_TRUE= dbus
DOCS_BUILD_DEPENDS= a2x:textproc/asciidoc
DOCS_MESON_TRUE= with_docs
DOCS_PLIST_FILES= share/man/man1/${PORTNAME}.1.gz \
share/man/man1/${PORTNAME}-trans.1.gz
PCRE_LIB_DEPENDS= libpcre2-8.so:devel/pcre2
PCRE_MESON_TRUE= regex
post-patch:
@${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \
${WRKSRC}/man/${PORTNAME}.1.asciidoc \
${WRKSRC}/man/${PORTNAME}.1.adoc \
${WRKSRC}/src/config.c
# Extract (snapshot) version from the port instead of meson.build
@${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \
-e "/project_version/s/=.*/= '${DISTVERSIONFULL}'/" \
${WRKSRC}/meson.build
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1707820562
SHA256 (yshui-picom-v11.2_GH0.tar.gz) = 1c1063936faf09ed9bba726e7737a562564b7a5f8cdef79d48fcdaf3669a4df4
SIZE (yshui-picom-v11.2_GH0.tar.gz) = 308679
TIMESTAMP = 1727632550
SHA256 (yshui-picom-v12.1_GH0.tar.gz) = d1aab4277e3a123c41621fa57c1ed66cc4a6553174a69e259d3027cf984c452c
SIZE (yshui-picom-v12.1_GH0.tar.gz) = 672958

View File

@ -0,0 +1,39 @@
# Configure PICOM_VERSION and PICOM_FULL_VERSION
--- meson.build.orig 2024-09-28 23:22:13 UTC
+++ meson.build
@@ -3,33 +3,8 @@ cc = meson.get_compiler('c')
cc = meson.get_compiler('c')
-# use git describe if that's available
-git = find_program('git', required: false)
-if git.found()
- gitv = run_command('git', 'rev-parse', '--short=7', 'HEAD', check: false)
- if gitv.returncode() == 0
- commit_hash_short = gitv.stdout().strip()
- endif
- git_upstream = run_command('git', 'rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}', check: false)
- if git_upstream.returncode() == 0
- remote = git_upstream.stdout().strip().split('/')[0]
- else
- remote = 'origin'
- endif
- git_repository = run_command('git', 'remote', 'get-url', remote, check: false)
- if git_repository.returncode() == 0
- repository = git_repository.stdout().strip()
- endif
-endif
-
-add_global_arguments('-DPICOM_VERSION="v'+meson.project_version()+'"', language: 'c')
-if is_variable('repository')
- add_global_arguments('-DPICOM_FULL_VERSION="v'+meson.project_version()+' ('+repository+' revision '+commit_hash_short+')"', language: 'c')
-elif is_variable('commit_hash_short')
- add_global_arguments('-DPICOM_FULL_VERSION="v'+meson.project_version()+' (revision '+commit_hash_short+')"', language: 'c')
-else
- add_global_arguments('-DPICOM_FULL_VERSION="v'+meson.project_version()+'"', language: 'c')
-endif
+add_global_arguments('-DPICOM_VERSION="v12.1"', language: 'c')
+add_global_arguments('-DPICOM_FULL_VERSION="v12.1"', language: 'c')
if get_option('buildtype') == 'release'
add_global_arguments('-DNDEBUG', language: 'c')

View File

@ -1,87 +0,0 @@
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276962
https://github.com/yshui/picom/commit/dff77aae27cf
--- src/meson.build.orig 2024-02-13 10:36:02 UTC
+++ src/meson.build
@@ -23,7 +23,7 @@ required_packages = [
# Some XCB packages are here because their versioning differs (see check below).
required_packages = [
'pixman-1', 'x11', 'x11-xcb', 'xcb-image', 'xcb-renderutil', 'xcb-util',
- 'xext'
+ 'xext', 'threads',
]
foreach i : required_packages
@@ -59,7 +59,7 @@ if get_option('opengl')
if get_option('opengl')
cflags += ['-DCONFIG_OPENGL']
- deps += [dependency('epoxy', required: true), dependency('threads', required:true)]
+ deps += [dependency('epoxy', required: true)]
srcs += [ 'opengl.c' ]
endif
@@ -84,10 +84,6 @@ elif (host_system == 'freebsd' or host_system == 'netb
elif (host_system == 'freebsd' or host_system == 'netbsd' or
host_system == 'dragonfly' or host_system == 'openbsd')
cflags += ['-DHAS_KQUEUE']
-endif
-
-if host_system == 'openbsd'
- deps += [dependency('threads', required: true)]
endif
subdir('backend')
--- src/picom.c.orig 2024-02-13 10:36:02 UTC
+++ src/picom.c
@@ -17,6 +17,7 @@
#include <fcntl.h>
#include <inttypes.h>
#include <math.h>
+#include <pthread.h>
#include <sched.h>
#include <stddef.h>
#include <stdio.h>
@@ -33,9 +34,6 @@
#include <xcb/render.h>
#include <xcb/sync.h>
#include <xcb/xfixes.h>
-#ifdef __OpenBSD__
-#include <pthread.h>
-#endif
#include <ev.h>
#include <test.h>
@@ -2606,14 +2604,8 @@ void set_rr_scheduling(void) {
int ret;
struct sched_param param;
-
-#ifndef __OpenBSD__
- ret = sched_getparam(0, &param);
-#else
int old_policy;
ret = pthread_getschedparam(pthread_self(), &old_policy, &param);
-#endif
-
if (ret != 0) {
log_debug("Failed to get old scheduling priority");
return;
@@ -2621,16 +2613,12 @@ void set_rr_scheduling(void) {
param.sched_priority = priority;
-#ifndef __OpenBSD__
- ret = sched_setscheduler(0, SCHED_RR, &param);
-#else
ret = pthread_setschedparam(pthread_self(), SCHED_RR, &param);
-#endif
-
if (ret != 0) {
log_info("Failed to set real-time scheduling priority to %d.", priority);
return;
}
+
log_info("Set real-time scheduling priority to %d", priority);
}