audio/gramofile: Document ncurses requirement and honor CFLAGS

While here, add DragonFly support
This commit is contained in:
John Marino 2016-11-19 15:56:53 +00:00
parent 4f4cbf3064
commit 576f0b67bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=426382
2 changed files with 25 additions and 6 deletions

View File

@ -17,7 +17,7 @@ COMMENT= Audio recording and tick/scratch reduction for e.g. vinyl records
LIB_DEPENDS= libfftw.so:math/fftw
ALL_TARGET= gramofile
USES= gmake perl5
USES= alias gmake ncurses perl5
USE_CSTD= gnu89
MAKE_ARGS= CC="${CC}" \
CXX="${CXX}" \
@ -35,11 +35,12 @@ post-patch:
for i in `${LS} ${FILESDIR}/post-patch-* |${SED} /.orig$$/d`; do \
${PATCH} -d ${WRKSRC} --forward --quiet <$$i ;\
done
.for file in bplay.c sndfunc.c
@${SED} -e 's,machine/soundcard.h,sys/soundcard.h,' < \
${WRKSRC}/bplaysrc/${file} > ${WRKSRC}/bplaysrc/${file}.new
@${MV} ${WRKSRC}/bplaysrc/${file}.new ${WRKSRC}/bplaysrc/${file}
.endfor
${REINPLACE_CMD} -e "s@-lncurses@-L${LOCALBASE}/lib -lncurses@g" \
-e "s|CFLAGS =|CFLAGS +=|" \
${WRKSRC}/bplaysrc/Makefile
${REINPLACE_CMD} -e 's,machine/soundcard.h,sys/soundcard.h,' \
${WRKSRC}/bplaysrc/bplay.c \
${WRKSRC}/bplaysrc/sndfunc.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gramofile ${WRKSRC}/bplay_gramo \

View File

@ -0,0 +1,18 @@
--- bplaysrc/shmbuf.c.orig 2000-03-27 21:38:56 UTC
+++ bplaysrc/shmbuf.c
@@ -142,6 +142,7 @@ void init_shm(void)
if(shmctl(shmid2, IPC_RMID, NULL))
ErrDie("shmctl");
+#ifndef __DragonFly__
#if USEBUFFLOCK
/* Ok, go root to lock the buffers down */
if(setreuid(geteuid(), getuid()) == -1)
@@ -173,6 +174,7 @@ void init_shm(void)
}
#endif
+#endif
/* Set up the appropriate number of semaphore blocks */
numsemblks = numbuffs/SEMMSL;
if((numsemblks * SEMMSL) < numbuffs)