diff options
-rw-r--r-- | audio/lmms/Makefile | 7 | ||||
-rw-r--r-- | audio/lmms/files/patch-src_core_main.cpp | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/audio/lmms/Makefile b/audio/lmms/Makefile index 21c96373b789..d6f57154a135 100644 --- a/audio/lmms/Makefile +++ b/audio/lmms/Makefile @@ -7,7 +7,7 @@ PORTNAME= lmms PORTVERSION= 20061204 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= jylefort @@ -49,4 +49,9 @@ post-patch: pre-configure: @cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE} +post-install: + # make it setuid-root to be able to set realtime priority + # (root privileges are dropped in the main routine) + ${CHMOD} u+s ${PREFIX}/bin/lmms + .include <bsd.port.mk> diff --git a/audio/lmms/files/patch-src_core_main.cpp b/audio/lmms/files/patch-src_core_main.cpp new file mode 100644 index 000000000000..42964de206ef --- /dev/null +++ b/audio/lmms/files/patch-src_core_main.cpp @@ -0,0 +1,20 @@ +--- src/core/main.cpp.orig Mon Dec 4 15:22:34 2006 ++++ src/core/main.cpp Wed Dec 6 11:52:51 2006 +@@ -49,6 +49,9 @@ + #include <sched.h> + #endif + ++#include <sys/types.h> ++#include <unistd.h> ++ + + #include "main_window.h" + #include "embed.h" +@@ -89,6 +92,7 @@ + printf( "could not set realtime priority.\n" ); + } + #endif ++ setuid(getuid()); // drop root privileges + + QApplication app( argc, argv ); + |