diff options
author | gabor <gabor@FreeBSD.org> | 2006-12-20 05:05:15 +0800 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2006-12-20 05:05:15 +0800 |
commit | da5169d521f3cfbed7f0a572a7ad9e5e0f88b03e (patch) | |
tree | e501fdbfeac5bca0048c1fb1c1292140e7531255 /audio/gnuitar | |
parent | 48988654d0978d3eed0ee6f792344ab53240daf7 (diff) | |
download | freebsd-ports-gnome-da5169d521f3cfbed7f0a572a7ad9e5e0f88b03e.tar.gz freebsd-ports-gnome-da5169d521f3cfbed7f0a572a7ad9e5e0f88b03e.tar.zst freebsd-ports-gnome-da5169d521f3cfbed7f0a572a7ad9e5e0f88b03e.zip |
- Add OPTION to install as suid so that it can set realtime scheduling [1]
- Install a desktop entry [1]
- Move to LOCALBASE [1]
- Makefile cleanups [1]
- Add support for NOPORTDOCS
- Bump PORTREVISION [1]
PR: ports/106730
Submitted by: jylefort [1]
Approved by: erwin (mentor)
Diffstat (limited to 'audio/gnuitar')
-rw-r--r-- | audio/gnuitar/Makefile | 41 | ||||
-rw-r--r-- | audio/gnuitar/files/patch-src_main.c | 35 | ||||
-rw-r--r-- | audio/gnuitar/pkg-plist | 16 |
3 files changed, 74 insertions, 18 deletions
diff --git a/audio/gnuitar/Makefile b/audio/gnuitar/Makefile index e3b78b1e0f96..f3004297cc41 100644 --- a/audio/gnuitar/Makefile +++ b/audio/gnuitar/Makefile @@ -5,6 +5,7 @@ PORTNAME= gnuitar PORTVERSION= 0.3.2 +PORTREVISION= 1 CATEGORIES= audio multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -13,14 +14,25 @@ MAINTAINER= gabor@FreeBSD.org COMMENT= The real-time guitar processor USE_BZIP2= yes -USE_X_PREFIX= YES -USE_GNOME= gtk20 glib20 -WANT_GNOME= YES -GNU_CONFIGURE= YES +USE_GNOME= gtk20 +GNU_CONFIGURE= yes CONFIGURE_ARGS+=--with-gtk2 \ --enable-clip-everywhere \ --enable-float +TXT_DOCS= AUTHORS COPYING FAQ INSTALL NEWS README TODO ChangeLog +HTML_DOCS= faq.html index.html install.html readme.html +PORTDOCS= ${TXT_DOCS} ${HTML_DOCS} + +OPTIONS= SUID "Use suid to allow highest priority (priv. dropped)" On + +DESKTOP_ENTRIES="GNUitar" \ + "Apply guitar effects in real-time" \ + "gnuitar" \ + "gnuitar" \ + "" \ + true + pre-fetch: @${CAT} pkg-message @@ -28,4 +40,25 @@ post-patch: @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \ ${WRKSRC}/configure ${WRKSRC}/src/Makefile +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/src/gnuitar ${PREFIX}/bin + +post-install: + @${MKDIR} ${PREFIX}/share/pixmaps + @${INSTALL_DATA} ${WRKSRC}/src/gnuitar.xpm ${PREFIX}/share/pixmaps +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for i in ${TXT_DOCS} + @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.for i in ${HTML_DOCS} + @${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR} +.endfor +.endif +.if defined(WITH_SUID) +# make it setuid-root to be able to set realtime priority (root +# privileges are dropped in the main routine) + @${CHMOD} u+s ${PREFIX}/bin/gnuitar +.endif + .include <bsd.port.mk> diff --git a/audio/gnuitar/files/patch-src_main.c b/audio/gnuitar/files/patch-src_main.c new file mode 100644 index 000000000000..b611da00e228 --- /dev/null +++ b/audio/gnuitar/files/patch-src_main.c @@ -0,0 +1,35 @@ +--- src/main.c.orig Fri Apr 15 16:37:41 2005 ++++ src/main.c Thu Dec 14 21:41:20 2006 +@@ -109,6 +109,9 @@ + #include <fcntl.h> + #include <sys/types.h> + ++#include <sys/types.h> ++#include <unistd.h> ++ + #ifdef DEMO + #define DEMO_MSG "\n\nThis is the demo version of the GNUitar program." \ + "\nYou may download the full version as a source distribution" \ +@@ -953,9 +956,6 @@ + struct sched_param p; + + +- if ((error = init_sound()) != ERR_NOERROR) +- return error; +- + max_priority = sched_get_priority_max(SCHED_FIFO); + p.sched_priority = max_priority; + +@@ -964,6 +964,12 @@ + ("\nFailed to set scheduler priority. (Are you running as root?)"); + printf("\nContinuing with default priority"); + } ++ ++ setuid(getuid()); /* drop root privileges */ ++ ++ if ((error = init_sound()) != ERR_NOERROR) ++ return error; ++ + if (pthread_create(&audio_thread, NULL, audio_thread_start, NULL)) { + fprintf(stderr, "\nAudio thread creation failed!"); + return ERR_THREAD; diff --git a/audio/gnuitar/pkg-plist b/audio/gnuitar/pkg-plist index 5ebded147d4b..c691cebccbad 100644 --- a/audio/gnuitar/pkg-plist +++ b/audio/gnuitar/pkg-plist @@ -1,15 +1,3 @@ bin/gnuitar -share/doc/gnuitar/docs/faq.html -share/doc/gnuitar/docs/index.html -share/doc/gnuitar/docs/install.html -share/doc/gnuitar/docs/readme.html -share/doc/gnuitar/COPYING -share/doc/gnuitar/AUTHORS -share/doc/gnuitar/FAQ -share/doc/gnuitar/INSTALL -share/doc/gnuitar/NEWS -share/doc/gnuitar/README -share/doc/gnuitar/TODO -share/doc/gnuitar/ChangeLog -@dirrm share/doc/gnuitar/docs -@dirrm share/doc/gnuitar +share/pixmaps/gnuitar.xpm +@dirrmtry share/pixmaps |