aboutsummaryrefslogtreecommitdiffstats
path: root/audio/gramofile
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2016-11-19 23:56:53 +0800
committermarino <marino@FreeBSD.org>2016-11-19 23:56:53 +0800
commit3b6b4609c9e753743121f0c69b1c0b68338f10b6 (patch)
tree4bcd2996341f53db18b605267ca27f531a7e9f9d /audio/gramofile
parente3d46fbd592c4e7354de4c98e5c7a157b2e1bc1c (diff)
downloadfreebsd-ports-gnome-3b6b4609c9e753743121f0c69b1c0b68338f10b6.tar.gz
freebsd-ports-gnome-3b6b4609c9e753743121f0c69b1c0b68338f10b6.tar.zst
freebsd-ports-gnome-3b6b4609c9e753743121f0c69b1c0b68338f10b6.zip
audio/gramofile: Document ncurses requirement and honor CFLAGS
While here, add DragonFly support
Diffstat (limited to 'audio/gramofile')
-rw-r--r--audio/gramofile/Makefile13
-rw-r--r--audio/gramofile/files/patch-bplaysrc_shmbuf.c18
2 files changed, 25 insertions, 6 deletions
diff --git a/audio/gramofile/Makefile b/audio/gramofile/Makefile
index 3763df2b6c64..cc2dcff13d52 100644
--- a/audio/gramofile/Makefile
+++ b/audio/gramofile/Makefile
@@ -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 \
diff --git a/audio/gramofile/files/patch-bplaysrc_shmbuf.c b/audio/gramofile/files/patch-bplaysrc_shmbuf.c
new file mode 100644
index 000000000000..26e42e069eb3
--- /dev/null
+++ b/audio/gramofile/files/patch-bplaysrc_shmbuf.c
@@ -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)