Bug 149754 - New port: audio/ctronome A console-based metronome
Summary: New port: audio/ctronome A console-based metronome
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 03:00 UTC by Charles Mercadal
Modified: 2010-08-19 02:30 UTC (History)
0 users

See Also:


Attachments
file.shar (2.59 KB, text/plain)
2010-08-18 03:00 UTC, Charles Mercadal
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Mercadal 2010-08-18 03:00:14 UTC
ctronome for the FreeBSD ports system

How-To-Repeat: N/A
Comment 1 Dmitry Marakasov freebsd_committer 2010-08-18 18:39:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 2 Dmitry Marakasov 2010-08-18 18:50:12 UTC
* Charles Mercadal (mercadal@diablonet.net) wrote:

> >Synopsis:       New port:  audio/ctronome A console-based metronome

Shar and/or port is broken. For example, part of makefile is duplicated.
Also:

> XUSE_REINPLACE= yes

Deprecated long ago, not needed.

> Xpost-patch:
> X   @${REINPLACE_CMD} -e 's|linux/soundcard.h|sys/soundcard.h|' ${WRKSRC}/ctronome.

I think you've meant ctronome.h, not ctronome. Also can be merged with
the next line (just ${REINPLACE_CMD} ... ${WRKSRC}/ctronome.h ${WRKSRC}/dsp.c

> X   @${REINPLACE_CMD} -e 's|linux/soundcard.h|sys/soundcard.h|' ${WRKSRC}/dsp.c
	
> Xdo-install:
> X   ${INSTALL_PROGRAM} ${WRKSRC}/ctronome ${PREFIX}/bin
> X   ${MKDIR} ${PREFIX}/share/ctronome
> X   ${INSTALL_DATA} ${WRKSRC}/metronome1.wav ${PREFIX}/share/ctronome
> X   ${INSTALL_DATA} ${WRKSRC}/metronome2.wav ${PREFIX}/share/ctronome

Please use ${DATADIR} instead of ${PREFIX}/share/ctronome. It should
also be used in the second REINPLACE (one for .wav paths).

> Xbin/ctronome
> Xshare/ctronome/metronome1.wav
> Xshare/ctronome/metronome2.wav
> X@dirrm share/ctronome

Should use %%DATADIR%% instead of share/ctronome here

> XMD5 (ctronome-0.5.3.tar.gz) = 12b46a7825ea5156100ac1f0bcd148ab
> XSHA256 (ctronome-0.5.3.tar.gz) = 0ceb6ab2f243ac45d0475e901f70f5ac20100c7489d28375f

Probably your editor cuts away long lines or something. SHA256 is truncated.

You should patch the software's Makefile to respect systemwide CC and
CFLAGS. Like that:

--- patch-Makefile begins here ---
--- Makefile.orig	2008-12-18 13:49:32.000000000 +0300
+++ Makefile	2010-08-18 21:47:01.000000000 +0400
@@ -1,11 +1,11 @@
 VERSION = 0.5.3
-CC = gcc
+CC ?= gcc
 OBJS = ctronome.o dsp.o routines.o
 
 all: ctronome
 
 %.o: %.c ctronome.h routines.h
-	$(CC) -c $<
+	$(CC) $(CFLAGS) -c $<
 
 ctronome: $(OBJS)
 	$(CC) -o ctronome $(OBJS)
--- patch-Makefile ends here ---

Finally, please use tabs instead of spaces for identation.

You can use ports-mgmt/portlint to check your port before submission, it
points out common errors.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru
Comment 3 Dmitry Marakasov freebsd_committer 2010-08-18 18:50:30 UTC
State Changed
From-To: open->feedback

Ask for submitter fix.
Comment 4 Charles Mercadal 2010-08-18 19:55:19 UTC
Thank you, Dmitry.  I've made the changes and run the new version
through portlint to ensure there is nothing else out of place.

I think everything is good now, but pleaase let me know if I 
missed anything.

You're right -- it appears that I mangled something when I put the
shar file into the PR.  I wish I could blame it on my editor, but
it was just my own nincompoopery.

New shar file in follow-up email.  I really appreciate your assistance
with this.  I was following the Porter's Handbook, but it looks
like I missed some steps along the way.


Best regards,
Charles Mercadal
Comment 5 Charles Mercadal 2010-08-18 19:56:56 UTC
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ctronome
#	ctronome/Makefile
#	ctronome/pkg-descr
#	ctronome/pkg-plist
#	ctronome/distinfo
#	ctronome/files
#	ctronome/files/patch-Makefile
#
echo c - ctronome
mkdir -p ctronome > /dev/null 2>&1
echo x - ctronome/Makefile
sed 's/^X//' >ctronome/Makefile << 'END-of-ctronome/Makefile'
X# New ports collection makefile for:	ctronome
X# Date created:		11 August 2010
X# Whom:			Charles Mercadal <mercadal@diablonet.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	ctronome
XPORTVERSION=	0.5.3
XCATEGORIES=	audio
XMASTER_SITES=	http://ctronome.kign.org/source/
X
XMAINTAINER=	mercadal@diablonet.net
XCOMMENT=	A programmable console-based metronome
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|linux/soundcard.h|sys/soundcard.h|' ${WRKSRC}/ctronome.h ${WRKSRC}/dsp.c
X	@${REINPLACE_CMD} -e 's|/usr/share/ctronome|${DATADIR}|' ${WRKSRC}/ctronome.h
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/ctronome ${PREFIX}/bin
X	${MKDIR} ${DATADIR}
X	${INSTALL_DATA} ${WRKSRC}/metronome1.wav ${DATADIR}
X	${INSTALL_DATA} ${WRKSRC}/metronome2.wav ${DATADIR}
X
X.include <bsd.port.mk>
END-of-ctronome/Makefile
echo x - ctronome/pkg-descr
sed 's/^X//' >ctronome/pkg-descr << 'END-of-ctronome/pkg-descr'
XA very simple yet powerful programmable console metronome.
X
XWWW:  http://ctronome.kign.org/
END-of-ctronome/pkg-descr
echo x - ctronome/pkg-plist
sed 's/^X//' >ctronome/pkg-plist << 'END-of-ctronome/pkg-plist'
Xbin/ctronome
X%%DATADIR%%/metronome1.wav
X%%DATADIR%%/metronome2.wav
X@dirrm %%DATADIR%%
END-of-ctronome/pkg-plist
echo x - ctronome/distinfo
sed 's/^X//' >ctronome/distinfo << 'END-of-ctronome/distinfo'
XMD5 (ctronome-0.5.3.tar.gz) = 12b46a7825ea5156100ac1f0bcd148ab
XSHA256 (ctronome-0.5.3.tar.gz) = 0ceb6ab2f243ac45d0475e901f70f5ac20100c7489d28375fc2b5ce38c0124ad
XSIZE (ctronome-0.5.3.tar.gz) = 25979
END-of-ctronome/distinfo
echo c - ctronome/files
mkdir -p ctronome/files > /dev/null 2>&1
echo x - ctronome/files/patch-Makefile
sed 's/^X//' >ctronome/files/patch-Makefile << 'END-of-ctronome/files/patch-Makefile'
Xexit--- Makefile.orig	2008-12-18 13:49:32.000000000 +0300
X+++ Makefile	2010-08-18 21:47:01.000000000 +0400
X@@ -1,11 +1,11 @@
X VERSION = 0.5.3
X-CC = gcc
X+CC ?= gcc
X OBJS = ctronome.o dsp.o routines.o
X 
X all: ctronome
X 
X %.o: %.c ctronome.h routines.h
X-	$(CC) -c $<
X+	$(CC) $(CFLAGS) -c $<
X 
X ctronome: $(OBJS)
X 	$(CC) -o ctronome $(OBJS)
END-of-ctronome/files/patch-Makefile
exit
Comment 6 Dmitry Marakasov freebsd_committer 2010-08-19 02:29:08 UTC
State Changed
From-To: feedback->open

Submitter has fixed.
Comment 7 Dmitry Marakasov freebsd_committer 2010-08-19 02:29:50 UTC
State Changed
From-To: open->closed

New port added. Thanks!
Comment 8 dfilter service freebsd_committer 2010-08-19 02:29:50 UTC
amdmi3      2010-08-19 01:29:41 UTC

  FreeBSD ports repository

  Modified files:
    audio                Makefile 
  Added files:
    audio/ctronome       Makefile distinfo pkg-descr pkg-plist 
    audio/ctronome/files patch-Makefile 
  Log:
  A very simple yet powerful programmable console metronome.
  
  WWW:  http://ctronome.kign.org/
  
  PR:             149754
  Submitted by:   Charles Mercadal <mercadal@diablonet.net>
  
  Revision  Changes    Path
  1.1128    +1 -0      ports/audio/Makefile
  1.1       +26 -0     ports/audio/ctronome/Makefile (new)
  1.1       +3 -0      ports/audio/ctronome/distinfo (new)
  1.1       +16 -0     ports/audio/ctronome/files/patch-Makefile (new)
  1.1       +3 -0      ports/audio/ctronome/pkg-descr (new)
  1.1       +4 -0      ports/audio/ctronome/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"